@arcium-hq/client 0.8.5 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -116,11 +116,14 @@ console.log("Computation finalized:", finalizeSig);
116
116
  ### 5. Decrypt Results
117
117
 
118
118
  ```typescript
119
- // Listen for program events
120
- const event = await awaitEvent("yourResultEvent");
119
+ // After finalization, fetch your program's result account
120
+ const resultAccount = await program.account.yourResultAccount.fetch(resultAddress);
121
121
 
122
- // Decrypt the result using the same cipher
123
- const decrypted = cipher.decrypt([event.encryptedResult], event.nonce)[0];
122
+ // Decrypt the result using the same cipher and nonce
123
+ const decrypted = cipher.decrypt(
124
+ resultAccount.encryptedResult,
125
+ nonce,
126
+ );
124
127
  console.log("Decrypted result:", decrypted);
125
128
  ```
126
129