Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/prehex pkp pubkey #423

Closed
wants to merge 2 commits into from
Closed

Feat/prehex pkp pubkey #423

wants to merge 2 commits into from

Conversation

Ansonhkg
Copy link
Collaborator

@Ansonhkg Ansonhkg commented Apr 11, 2024

Description

When creating session sigs, user will need to prefix their pkp public key with hex 0x, and if they don't, they will run into invalid arrayify value while using bytes32 array when trying to sign. We should really just prefix it for them if it's not already.

Before

  const sessionSigs = await litNodeClient.getSessionSigs({
    pkpPublicKey: `0x${pkpPublicKey}`;
    expiration: expiration,
    chain: 'ethereum',
    resourceAbilityRequests: [
      {
        resource: new LitPKPResource('*'),
        ability: LitAbility.PKPSigning,
      },
    ],

After

  const sessionSigs = await litNodeClient.getSessionSigs({
    pkpPublicKey: pkpPublicKey,
    expiration: expiration,
    chain: 'ethereum',
    resourceAbilityRequests: [
      {
        resource: new LitPKPResource('*'),
        ability: LitAbility.PKPSigning,
      },
    ],

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

…t providing a relay API, also forcing using to pass in 'litNetwork' field if litNodeClient is not provided, so that it won't always default to 'cayenne' network
@Ansonhkg Ansonhkg requested a review from joshLong145 as a code owner April 11, 2024 21:24
@Ansonhkg Ansonhkg closed this Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant