You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/changelog.mdx
+57-67Lines changed: 57 additions & 67 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,90 +6,79 @@ rss: true
6
6
7
7
| Package | Latest version | Summary |
8
8
| ------- | -------------- | ------- |
9
-
|[@lit-protocol/lit-client](#lit-client)|[8.2.0](https://www.npmjs.com/package/%40lit-protocol%2Flit-client)|LitClient now offers `getIpfsId` via `@lit-protocol/lit-client/ipfs`, letting apps compute CIDv0 hashes (e.g., `await getIpfsId('hello')`) while keeping bundles lean. |
10
-
|[@lit-protocol/auth](#auth)|[8.1.0](https://www.npmjs.com/package/%40lit-protocol%2Fauth)|Converted viem from a bundled dependency to a peer dependency to avoid build errors from version conflicts (e.g., missing exports like sendCallsSync) and improve compatibility by reducing dependency lock-in. Consumers must now install compatible versions manually. |
11
-
|[@lit-protocol/networks](#networks)|[8.2.0](https://www.npmjs.com/package/%40lit-protocol%2Fnetworks)|introduce `litClient.utils.getDerivedKeyId` - a little helper to resolve the Lit Action public key outside of the Action runtime|
|[@lit-protocol/lit-client](#lit-client)|[8.2.3](https://www.npmjs.com/package/%40lit-protocol%2Flit-client)|update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test. |
10
+
|[@lit-protocol/auth](#auth)|[8.1.2](https://www.npmjs.com/package/%40lit-protocol%2Fauth)|update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test. |
11
+
|[@lit-protocol/networks](#networks)|[8.3.1](https://www.npmjs.com/package/%40lit-protocol%2Fnetworks)|update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test.|
12
+
|[@lit-protocol/auth-services](#auth-services)|[2.0.7](https://www.npmjs.com/package/%40lit-protocol%2Fauth-services)|update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test.|
|[@lit-protocol/auth-helpers](#auth-helpers)|[8.1.0](https://www.npmjs.com/package/%40lit-protocol%2Fauth-helpers)|Converted viem from a bundled dependency to a peer dependency to avoid build errors from version conflicts (e.g., missing exports like sendCallsSync) and improve compatibility by reducing dependency lock-in. Consumers must now install compatible versions manually. |
|[@lit-protocol/contracts](#contracts)|[0.7.0](https://www.npmjs.com/package/%40lit-protocol%2Fcontracts)|introduce `litClient.utils.getDerivedKeyId` - a little helper to resolve the Lit Action public key outside of the Action runtime|
|[@lit-protocol/auth-helpers](#auth-helpers)|[8.1.1](https://www.npmjs.com/package/%40lit-protocol%2Fauth-helpers)|Update the naga-dev staking address. users are expected to reinstall the SDK to apply this patch to continue using the naga-dev network. |
|[@lit-protocol/contracts](#contracts)|[0.8.1](https://www.npmjs.com/package/%40lit-protocol%2Fcontracts)|update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test.|
|[@lit-protocol/e2e](#e2e)|[3.0.0](https://www.npmjs.com/package/%40lit-protocol%2Fe2e)|introduce `litClient.utils.getDerivedKeyId` - a little helper to resolve the Lit Action public key outside of the Action runtime|
20
+
|[@lit-protocol/e2e](#e2e)|[4.0.1](https://www.npmjs.com/package/%40lit-protocol%2Fe2e)|update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test.|
|[@lit-protocol/wasm](#wasm)|[8.1.0](https://www.npmjs.com/package/%40lit-protocol%2Fwasm)|Naga-local consumers can now point at a local networkContext.json with a lightweight withLocalContext call (or by setting NAGA_LOCAL_CONTEXT_PATH) while the default bundled signatures keep working as before.|
25
25
|[@lit-protocol/wrapped-keys](#wrapped-keys)|[8.0.1](https://www.npmjs.com/package/%40lit-protocol%2Fwrapped-keys)| fix package metadata so bundlers load the CommonJS builds again |
26
26
|[@lit-protocol/wrapped-keys-lit-actions](#wrapped-keys-lit-actions)|[8.0.1](https://www.npmjs.com/package/%40lit-protocol%2Fwrapped-keys-lit-actions)| fix package metadata so bundlers load the CommonJS builds again |
27
27
28
28
<Update
29
29
label="lit-client"
30
-
description="v8.2.0"
31
-
tags={["Minor Changes"]}
32
-
rss={{ title: "lit-client", description: "LitClient now offers `getIpfsId` via `@lit-protocol/lit-client/ipfs`, letting apps compute CIDv0 hashes (e.g., `await getIpfsId('hello')`) while keeping bundles lean." }}
30
+
description="v8.2.3"
31
+
tags={["Patch Changes"]}
32
+
rss={{ title: "lit-client", description: "update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test." }}
33
33
id="lit-client"
34
34
>
35
35
36
-
## Minor Changes
36
+
## Patch Changes
37
37
38
-
- LitClient now offers `getIpfsId` via `@lit-protocol/lit-client/ipfs`, letting apps compute CIDv0 hashes (e.g., `await getIpfsId('hello')`) while keeping bundles lean.
- introduce `litClient.utils.getDerivedKeyId` - a little helper to resolve the Lit Action public key outside of the Action runtime
38
+
- update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test.
44
39
</Update>
45
40
46
41
<Update
47
42
label="auth"
48
-
description="v8.1.0"
49
-
tags={["Minor Changes", "Patch Changes"]}
50
-
rss={{ title: "auth", description: "Converted viem from a bundled dependency to a peer dependency to avoid build errors from version conflicts (e.g., missing exports like sendCallsSync) and improve compatibility by reducing dependency lock-in. Consumers must now install compatible versions manually." }}
43
+
description="v8.1.2"
44
+
tags={["Patch Changes"]}
45
+
rss={{ title: "auth", description: "update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test." }}
51
46
id="auth"
52
47
>
53
48
54
-
## Minor Changes
55
-
56
-
- Converted viem from a bundled dependency to a peer dependency to avoid build errors from version conflicts (e.g., missing exports like sendCallsSync) and improve compatibility by reducing dependency lock-in. Consumers must now install compatible versions manually.
57
-
58
49
## Patch Changes
59
50
60
-
- Allows `WalletClientAuthenticator.authenticate` to build SIWE messages with user-specified fields (`domain`, `uri`, `statement`, etc.) while still managing the nonce internally.
51
+
-update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test.
61
52
</Update>
62
53
63
54
<Update
64
55
label="networks"
65
-
description="v8.2.0"
66
-
tags={["Minor Changes", "Patch Changes"]}
67
-
rss={{ title: "networks", description: "introduce `litClient.utils.getDerivedKeyId` - a little helper to resolve the Lit Action public key outside of the Action runtime" }}
56
+
description="v8.3.1"
57
+
tags={["Patch Changes"]}
58
+
rss={{ title: "networks", description: "update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test." }}
68
59
id="networks"
69
60
>
70
61
71
-
## Minor Changes
72
-
73
-
- introduce `litClient.utils.getDerivedKeyId` - a little helper to resolve the Lit Action public key outside of the Action runtime
74
-
75
62
## Patch Changes
76
63
64
+
- update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test.
rss={{ title: "auth-services", description: "update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test." }}
86
74
id="auth-services"
87
75
>
88
76
89
77
## Patch Changes
90
78
79
+
- update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test.
rss={{ title: "auth-helpers", description: "Converted viem from a bundled dependency to a peer dependency to avoid build errors from version conflicts (e.g., missing exports like sendCallsSync) and improve compatibility by reducing dependency lock-in. Consumers must now install compatible versions manually." }}
122
+
description="v8.1.1"
123
+
tags={["Patch Changes"]}
124
+
rss={{ title: "auth-helpers", description: "Update the naga-dev staking address. users are expected to reinstall the SDK to apply this patch to continue using the naga-dev network." }}
136
125
id="auth-helpers"
137
126
>
138
127
139
-
## Minor Changes
128
+
## Patch Changes
140
129
141
-
- Converted viem from a bundled dependency to a peer dependency to avoid build errors from version conflicts (e.g., missing exports like sendCallsSync) and improve compatibility by reducing dependency lock-in. Consumers must now install compatible versions manually.
130
+
-Update the naga-dev staking address. users are expected to reinstall the SDK to apply this patch to continue using the naga-dev network.
rss={{ title: "contracts", description: "introduce `litClient.utils.getDerivedKeyId` - a little helper to resolve the Lit Action public key outside of the Action runtime" }}
149
+
description="v0.8.1"
150
+
tags={["Patch Changes"]}
151
+
rss={{ title: "contracts", description: "update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test." }}
163
152
id="contracts"
164
153
>
165
154
166
-
## Minor Changes
155
+
## Patch Changes
167
156
168
-
- introduce `litClient.utils.getDerivedKeyId` - a little helper to resolve the Lit Action public key outside of the Action runtime
157
+
-update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test.
169
158
</Update>
170
159
171
160
<Update
@@ -181,22 +170,21 @@ rss: true
181
170
182
171
<Update
183
172
label="e2e"
184
-
description="v3.0.0"
185
-
tags={["Minor Changes", "Patch Changes"]}
186
-
rss={{ title: "e2e", description: "introduce `litClient.utils.getDerivedKeyId` - a little helper to resolve the Lit Action public key outside of the Action runtime" }}
173
+
description="v4.0.1"
174
+
tags={["Patch Changes"]}
175
+
rss={{ title: "e2e", description: "update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test." }}
187
176
id="e2e"
188
177
>
189
178
190
-
## Minor Changes
191
-
192
-
- introduce `litClient.utils.getDerivedKeyId` - a little helper to resolve the Lit Action public key outside of the Action runtime
193
-
194
179
## Patch Changes
195
180
181
+
- update naga-test contract addresses. Users are expected to update and reinstall the SDK to continue using naga-test.
rss={{ title: "wasm", description: "No release notes provided yet." }}
225
+
description="v8.1.0"
226
+
tags={["Minor Changes"]}
227
+
rss={{ title: "wasm", description: "Naga-local consumers can now point at a local networkContext.json with a lightweight withLocalContext call (or by setting NAGA_LOCAL_CONTEXT_PATH) while the default bundled signatures keep working as before." }}
240
228
id="wasm"
241
229
>
242
230
243
-
No release notes available.
231
+
## Minor Changes
232
+
233
+
- Naga-local consumers can now point at a local networkContext.json with a lightweight withLocalContext call (or by setting NAGA_LOCAL_CONTEXT_PATH) while the default bundled signatures keep working as before.
Copy file name to clipboardExpand all lines: docs/guides/lit-action-sign-as-action.mdx
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,28 @@
1
1
---
2
2
title: 'Derive Lit Action Public Keys'
3
-
description: 'How to deterministically derive and verify a Lit Action identity without executing it externally.'
3
+
description: 'Deterministically derive and verify a Lit Action identity without executing it externally.'
4
4
---
5
5
6
+
# Details
7
+
8
+
`Lit.Actions.signAsAction` enables a Lit Action to generate signatures that authenticate data without needing external keys.
9
+
Any system can later verify these signatures using `Lit.Actions.verifyActionSignature`, or retrieve the associated public key with `Lit.Actions.getActionPublicKey` and perform verification independently.
10
+
6
11
# Derive a Lit Action Public Key Locally
7
12
8
13
## Question
9
14
10
-
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?
15
+
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 the Action runtime. `Lit.Actions.getActionPublicKey` works within the Action. However,`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?
11
16
12
17
## Answer
13
18
14
19
Yes. Inside the Lit Action you can deterministically derive the Action identity (and therefore its public key) from the same inputs the nodes use: the Action's IPFS CID and the signing scheme. The snippet below shows the complete flow:
15
20
16
21
1. Produce the 32-byte message hash the Lit nodes expect.
17
22
2. Call `Lit.Actions.signAsAction` to sign that message with the Action identity.
18
-
3.Derive the Action public key via `Lit.Actions.getActionPublicKey`, passing the Action CID and signing scheme.
23
+
3.Optionally derive the action public key via `Lit.Actions.getActionPublicKey`, passing the Action IPFS CID and signing scheme.
19
24
4. Optionally verify the signature with `Lit.Actions.verifyActionSignature`.
25
+
5. NOTE: `Lit.Actions.getActionPublicKey` and `Lit.Actions.verifyActionSignature` can be called from any Lit Action to verify signatures, not just from the same Action that called `Lit.Actions.signAsAction`.
20
26
21
27
```js
22
28
const { sigName, toSign } = jsParams; // 'publicKey' not required; derive it from the Action IPFS CID
@@ -72,7 +78,7 @@ This approach keeps the derivation entirely within the Lit Action context. Becau
72
78
73
79
## Derive the Same Public Key from Client Code
74
80
75
-
If you prefer to resolve the Lit Action public key outside of the Action runtime - e.g., inside tests or other tooling—the SDK now exposes a helper that calls the on-chain PubkeyRouter contract.
81
+
If you prefer to resolve the Lit Action public key outside the Action runtime - e.g., inside tests or other tooling—the SDK now exposes a helper that calls the on-chain PubkeyRouter contract.
constUNSUPPORTED_MESSAGE="@lit-protocol/contracts/custom-network-signatures is not supported in browser environments. Please pre-generate contract signatures in a Node.js process and ship the artifacts instead.";
* Browser stub for @lit-protocol/contracts/custom-network-signatures.
3
+
* These utilities require Node.js filesystem access and cannot run in the browser.
4
+
*/
5
+
constUNSUPPORTED_MESSAGE="@lit-protocol/contracts/custom-network-signatures is not supported in browser environments. Please pre-generate contract signatures in a Node.js process and ship the artifacts instead.";
0 commit comments