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/sdk/auth-context-consumption/execute-js.mdx
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -233,6 +233,38 @@ Unlike traditional client-side decryption, this approach ensures that sensitive
233
233
</Step>
234
234
</Steps>
235
235
236
+
#### Important Considerations
237
+
238
+
When using `decryptAndCombine` within your Lit Actions, there are several critical requirements and potential issues to be aware of:
239
+
240
+
#### Unified Access Control Conditions Required
241
+
242
+
<Warning>
243
+
The `decryptAndCombine` function **only accepts unified access control conditions**. Standard or legacy access control condition formats are not supported.
244
+
</Warning>
245
+
246
+
When encrypting data that you plan to decrypt within a Lit Action, ensure you use the unified access control conditions format. EVM contract conditions are supported, but they must be specified as unified access control conditions with `conditionType: "evmContract"` in the JSON structure.
247
+
248
+
#### Timeout Issues and Determinism
249
+
250
+
<Warning>
251
+
**Common Cause of Timeouts**: If you experience timeouts when using `decryptAndCombine`, the most likely cause is nondeterminism in your Lit Action.
252
+
</Warning>
253
+
254
+
For decryption to succeed, all Lit nodes must reach consensus on:
255
+
- The access control conditions being evaluated
256
+
- The ciphertext being decrypted
257
+
- The dataToEncryptHash being validated
258
+
259
+
If nodes receive different values for any of these parameters, they cannot reach consensus and the operation will timeout. Common sources of nondeterminism include:
260
+
261
+
-**Dynamic Construction**: Building access control conditions dynamically within the Lit Action
262
+
-**Variable Data**: Using timestamps, random values, or other changing data in your conditions
263
+
-**External Data**: Fetching data that may differ between nodes (e.g., latest block numbers, API responses)
264
+
-**Conditional Logic**: Logic that produces different results on different nodes
265
+
266
+
To avoid timeouts, ensure all parameters passed to `decryptAndCombine` are static and deterministic across all nodes. Pass these values via `jsParams` from the client rather than generating them within the Lit Action.
0 commit comments