Skip to content

Conversation

@glitch003
Copy link
Collaborator

@glitch003 glitch003 commented Dec 9, 2025

I was writing some actions and testing them on naga-dev and ran into this bug, where I couldn't use jsParams in actions. The node logs look like this: js_params: Some(Object {"jsParams": Object {"pkpPublicKey": String("0x043704b08b784eb590327173a960baf4970b0a6fb1080bd3710f858b5ecbb6c4b19011114efc759565fe23c4aeb4fd9c695755af32c002a0511bfa526ae4dea3cf")}})

My js code on the client looks like this:

const result = await litClient.executeJs({
          code: litActionCode,
          authContext,
          jsParams: { pkpPublicKey: publicKey },
        });

My action looks like this:

  const sigShare = await Lit.Actions.signEcdsa({
    toSign,
    publicKey: pkpPublicKey,
    sigName: "oracle-signature",
  });

The error is:

          "error": "Uncaught (in promise) ReferenceError: pkpPublicKey is not defined\n    at go (<user_provided_script>:20:16)\n    at eventLoopTick (ext:core/01_core.js:177:7)"

My action works when I do this, which makes me think this extra jsParams key is the problem:

  const toSign = ethers.utils.arrayify(priceHash);
  const sigShare = await Lit.Actions.signEcdsa({
    toSign,
    publicKey: jsParams.pkpPublicKey,
    sigName: "oracle-signature",
  });

I think this PR might fix it but I have not tested it at all.

@glitch003
Copy link
Collaborator Author

this is an intentional change for naga, closing

@glitch003 glitch003 closed this Dec 9, 2025
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.

2 participants