@inco/js 0.1.36 → 0.1.38
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 +20 -0
- package/dist/encryption/index.cjs +24706 -0
- package/dist/encryption/index.mjs +25787 -0
- package/dist/fhevm/index.cjs +87 -0
- package/dist/fhevm/index.mjs +90 -0
- package/dist/generated/abis/index.cjs +12493 -0
- package/dist/generated/abis/index.mjs +12496 -0
- package/dist/generated/abis/lightning.d.ts +189 -24
- package/dist/generated/abis/lightning.js +119 -13
- package/dist/generated/lightning.d.ts +21 -0
- package/dist/generated/lightning.js +23 -1
- package/dist/index.cjs +24883 -0
- package/dist/index.mjs +25964 -0
- package/dist/lite/index.cjs +52789 -0
- package/dist/lite/index.mjs +71691 -0
- package/dist/local/index.cjs +24479 -0
- package/dist/local/index.mjs +42864 -0
- package/dist/reencryption/index.cjs +24681 -0
- package/dist/reencryption/index.mjs +24684 -0
- package/package.json +1 -1
package/README.md
CHANGED
@@ -72,6 +72,26 @@ const resultPlaintext = await reencryptor({ handle: resultHandle });
|
|
72
72
|
console.log(resultPlaintext.value); // The decrypted value
|
73
73
|
```
|
74
74
|
|
75
|
+
Handles are processed asynchronously so you may need to wait for our covalidators to catch and compute the value. If you request a reencrypt before it has been processed you will get an error. To help ameliorate this the `reencryptor` has built-in retries, you can further customise by passing a `BackoffConfig` as a second argument:
|
76
|
+
|
77
|
+
```ts
|
78
|
+
type BackoffConfig = {
|
79
|
+
maxRetries: number;
|
80
|
+
baseDelayInMs: number;
|
81
|
+
backoffFactor: number;
|
82
|
+
};
|
83
|
+
|
84
|
+
const resultHandle = "0x..." as Hex;
|
85
|
+
const reencryptor = await zap.getReencryptor(walletClient);
|
86
|
+
// Default backoff config shown for reference
|
87
|
+
const backoffConfig: BackoffConfig = {
|
88
|
+
maxRetries: 10,
|
89
|
+
baseDelayInMs: 1000,
|
90
|
+
backoffFactor: 1.5,
|
91
|
+
};
|
92
|
+
const resultPlaintext = await reencryptor({ handle: resultHandle }, backoffConfig);
|
93
|
+
```
|
94
|
+
|
75
95
|
## License
|
76
96
|
|
77
97
|
See the [LICENSE](./LICENSE) file.
|