@zama-fhe/relayer-sdk 0.4.0-alpha.1 → 0.4.0-alpha.2
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/bin/commands/config.js +13 -0
- package/bin/commands/handle.js +22 -0
- package/bin/commands/input-proof.js +75 -0
- package/bin/commands/pubkey-clear.js +18 -0
- package/bin/commands/pubkey-fetch.js +9 -0
- package/bin/commands/pubkey-info.js +44 -0
- package/bin/commands/public-decrypt.js +64 -0
- package/bin/commands/test-fhecounter-getcount.js +49 -0
- package/bin/commands/zkproof-generate.js +68 -0
- package/bin/instance.js +15 -0
- package/bin/pubkeyCache.js +126 -0
- package/bin/relayer.js +132 -59
- package/bin/utils.js +345 -8
- package/bundle/relayer-sdk-js.js +5902 -5206
- package/bundle/relayer-sdk-js.umd.cjs +5 -5
- package/lib/internal.js +6138 -0
- package/lib/node.cjs +1061 -215
- package/lib/node.d.ts +8 -1
- package/lib/node.js +1061 -215
- package/lib/web.d.ts +8 -1
- package/lib/web.js +1060 -214
- package/package.json +1 -1
package/lib/web.d.ts
CHANGED
|
@@ -11,10 +11,13 @@ import type { FhevmInstanceOptions } from './types/relayer';
|
|
|
11
11
|
import { InitInput as KMSInput } from 'tkms';
|
|
12
12
|
import type { PublicDecryptResults } from './types/relayer';
|
|
13
13
|
import type { RelayerV2InputProofOptions } from '../relayer-provider/v2/types/types';
|
|
14
|
+
import type { RelayerV2InputProofOptions as RelayerV2InputProofOptions_2 } from './relayer-provider/v2/types/types';
|
|
14
15
|
import type { RelayerV2PublicDecryptOptions } from './relayer-provider/v2/types/types';
|
|
15
16
|
import type { RelayerV2UserDecryptOptions } from './relayer-provider/v2/types/types';
|
|
16
17
|
import { InitInput as TFHEInput } from 'tfhe';
|
|
17
18
|
import type { UserDecryptResults } from './types/relayer';
|
|
19
|
+
import type { ZKProof } from '../types/primitives';
|
|
20
|
+
import type { ZKProof as ZKProof_2 } from './types/primitives';
|
|
18
21
|
|
|
19
22
|
export { ApiKeyCookie }
|
|
20
23
|
|
|
@@ -68,6 +71,10 @@ export { EncryptionBits }
|
|
|
68
71
|
|
|
69
72
|
export declare type FhevmInstance = {
|
|
70
73
|
createEncryptedInput: (contractAddress: string, userAddress: string) => RelayerEncryptedInput;
|
|
74
|
+
requestZKProofVerification: (zkProof: ZKProof_2, options?: RelayerV2InputProofOptions_2) => Promise<{
|
|
75
|
+
handles: Uint8Array[];
|
|
76
|
+
inputProof: Uint8Array;
|
|
77
|
+
}>;
|
|
71
78
|
generateKeypair: () => {
|
|
72
79
|
publicKey: string;
|
|
73
80
|
privateKey: string;
|
|
@@ -132,7 +139,7 @@ export declare type RelayerEncryptedInput = {
|
|
|
132
139
|
add256: (value: number | bigint) => RelayerEncryptedInput;
|
|
133
140
|
addAddress: (value: string) => RelayerEncryptedInput;
|
|
134
141
|
getBits: () => EncryptionBits_2[];
|
|
135
|
-
|
|
142
|
+
generateZKProof(): ZKProof;
|
|
136
143
|
encrypt: (options?: RelayerV2InputProofOptions) => Promise<{
|
|
137
144
|
handles: Uint8Array[];
|
|
138
145
|
inputProof: Uint8Array;
|