@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 +7 -4
- package/build/index.cjs +1534 -443
- package/build/index.d.ts +1430 -330
- package/build/index.mjs +1534 -443
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -116,11 +116,14 @@ console.log("Computation finalized:", finalizeSig);
|
|
|
116
116
|
### 5. Decrypt Results
|
|
117
117
|
|
|
118
118
|
```typescript
|
|
119
|
-
//
|
|
120
|
-
const
|
|
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(
|
|
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
|
|