Skip to content

Conversation

@Ansonhkg
Copy link
Collaborator

WHAT

Add a new guide section for the docs

Copilot AI review requested due to automatic review settings October 21, 2025 14:05
@Ansonhkg Ansonhkg merged commit 5035dd9 into naga Oct 21, 2025
6 checks passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new guide section to the documentation that explains how to deterministically derive Lit Action public keys without executing the action externally. The guide demonstrates using Lit.Actions.getActionPublicKey and Lit.Actions.signAsAction to work with action identities derived from IPFS CIDs.

Key Changes

  • Added comprehensive documentation for deriving Lit Action public keys locally
  • Included complete code example showing signature generation, key derivation, and verification
  • Integrated new guide into the documentation navigation structure

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docs/guides/lit-action-sign-as-action.mdx New guide document explaining the complete workflow for deriving and verifying Lit Action public keys with code examples
docs/docs.json Updated navigation structure to include new "Guides" section with reference to the new guide

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


## Question

I want to call `Lit.Actions.signAsAction`. I know the action identity is derived from the Action's IPFS CID, but I cannot find a way to obtain the public key outside of the Action runtime. `Lit.Actions.getActionPublicKey` works within the Action, while `executeJs` only exposes `signatures.<name>.publicKey` after a signing operation. Is there a way to deterministically derive the Action's public key locally without running the Action?
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The question describes obtaining the public key 'outside of the Action runtime' and 'locally without running the Action', but the answer demonstrates deriving the key from within the Action context. This creates confusion about whether the solution actually addresses the stated problem of getting the key without executing the Action.

Copilot uses AI. Check for mistakes.
4. Optionally verify the signature with `Lit.Actions.verifyActionSignature`.

```js
const { sigName, toSign } = jsParams; // 'publicKey' not required; derive it from the Action IPFS CID
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment states 'derive it from the Action IPFS CID', but the code doesn't demonstrate deriving anything at this line. The derivation happens later at line 43. This comment could mislead readers about where the derivation actually occurs.

Suggested change
const { sigName, toSign } = jsParams; // 'publicKey' not required; derive it from the Action IPFS CID
const { sigName, toSign } = jsParams; // 'publicKey' not required in jsParams; it will be derived later from the Action IPFS CID

Copilot uses AI. Check for mistakes.
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