@zama-fhe/sdk 3.0.0-alpha.2 → 3.0.0-alpha.21
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 +207 -122
- package/dist/cjs/build.cjs +2 -0
- package/dist/cjs/build.cjs.map +1 -0
- package/dist/cjs/chains/index.cjs +1 -0
- package/dist/cjs/chains.cjs +2 -0
- package/dist/cjs/chains.cjs.map +1 -0
- package/dist/cjs/cleartext/index.cjs +1 -1
- package/dist/cjs/eip1193-subscribe.cjs +1 -1
- package/dist/cjs/eip1193-subscribe.cjs.map +1 -1
- package/dist/cjs/encryption.cjs +2 -0
- package/dist/cjs/encryption.cjs.map +1 -0
- package/dist/cjs/ethers/index.cjs +1 -1
- package/dist/cjs/ethers/index.cjs.map +1 -1
- package/dist/cjs/index.cjs +73 -73
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/query/index.cjs +1 -1
- package/dist/cjs/query/index.cjs.map +1 -1
- package/dist/cjs/readonly-token.cjs +1 -1
- package/dist/cjs/readonly-token.cjs.map +1 -1
- package/dist/cjs/relayer-cleartext.cjs +2 -0
- package/dist/cjs/relayer-cleartext.cjs.map +1 -0
- package/dist/cjs/relayer-sdk.worker.js +71 -71
- package/dist/cjs/relayer.cjs +1 -1
- package/dist/cjs/relayer.cjs.map +1 -1
- package/dist/cjs/viem/index.cjs +1 -1
- package/dist/cjs/viem/index.cjs.map +1 -1
- package/dist/cjs/wrappers-registry.cjs +1 -1
- package/dist/cjs/wrappers-registry.cjs.map +1 -1
- package/dist/esm/{assertions-BARApuMj.js → assertions-CfqI3AJv.js} +1 -1
- package/dist/esm/{assertions-BARApuMj.js.map → assertions-CfqI3AJv.js.map} +1 -1
- package/dist/esm/build-CvenCk6R.js +2 -0
- package/dist/esm/build-CvenCk6R.js.map +1 -0
- package/dist/esm/chains/index.d.ts +3 -0
- package/dist/esm/chains/index.js +1 -0
- package/dist/esm/chains-aHmrozPh.js +2 -0
- package/dist/esm/chains-aHmrozPh.js.map +1 -0
- package/dist/esm/cleartext/index.d.ts +2 -86
- package/dist/esm/cleartext/index.js +1 -1
- package/dist/esm/cleartext-BHu6-LCv.d.ts +19 -0
- package/dist/esm/cleartext-I-etE_7S.js +2 -0
- package/dist/esm/cleartext-I-etE_7S.js.map +1 -0
- package/dist/esm/eip1193-subscribe-CcotSOIm.js +2 -0
- package/dist/esm/eip1193-subscribe-CcotSOIm.js.map +1 -0
- package/dist/esm/{encryption-CmIPBcfP.js → encryption-YS-Kb7qm.js} +2 -2
- package/dist/esm/{encryption-CmIPBcfP.js.map → encryption-YS-Kb7qm.js.map} +1 -1
- package/dist/esm/ethers/index.d.ts +53 -8
- package/dist/esm/ethers/index.js +1 -1
- package/dist/esm/ethers/index.js.map +1 -1
- package/dist/esm/{hex-D_B-zoId.js → hex-BZVTzEK6.js} +2 -2
- package/dist/esm/{hex-D_B-zoId.js.map → hex-BZVTzEK6.js.map} +1 -1
- package/dist/esm/{relayer-utils-iSPis4x-.d.ts → index-BTY0MxOt.d.ts} +50 -23
- package/dist/esm/{onchain-events-2VNiL78c.d.ts → index-BdyljG1F.d.ts} +387 -1505
- package/dist/esm/index.d.ts +61 -93
- package/dist/esm/index.js +73 -73
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/memory-storage-CFXqXUcm.js +2 -0
- package/dist/esm/memory-storage-CFXqXUcm.js.map +1 -0
- package/dist/esm/node/index.d.ts +88 -110
- package/dist/esm/node/index.js +1 -1
- package/dist/esm/node/index.js.map +1 -1
- package/dist/esm/node/relayer-sdk.node-worker.js +1 -1
- package/dist/esm/node/relayer-sdk.node-worker.js.map +1 -1
- package/dist/esm/query/index.d.ts +40 -50
- package/dist/esm/query/index.js +1 -1
- package/dist/esm/query/index.js.map +1 -1
- package/dist/esm/readonly-token-DCLOYhws.js +2 -0
- package/dist/esm/readonly-token-DCLOYhws.js.map +1 -0
- package/dist/esm/{relayer-C6u3eOlN.js → relayer-7Hd00A6X.js} +2 -2
- package/dist/esm/relayer-7Hd00A6X.js.map +1 -0
- package/dist/esm/{relayer-sdk.types-CGfXwKcB.d.ts → relayer-cleartext-DJkSUlZ2.d.ts} +263 -106
- package/dist/esm/relayer-cleartext-SZCM9wTx.js +2 -0
- package/dist/esm/relayer-cleartext-SZCM9wTx.js.map +1 -0
- package/dist/esm/relayer-sdk.worker.js +71 -71
- package/dist/esm/types-C1S426x4.d.ts +48 -0
- package/dist/esm/types-CVyJHEya.d.ts +14 -0
- package/dist/esm/types-DePjTTbo.d.ts +30 -0
- package/dist/esm/types-FY7ciI37.d.ts +615 -0
- package/dist/esm/viem/index.d.ts +39 -11
- package/dist/esm/viem/index.js +1 -1
- package/dist/esm/viem/index.js.map +1 -1
- package/dist/esm/wrappers-registry-CXNs4eR0.js +2 -0
- package/dist/esm/wrappers-registry-CXNs4eR0.js.map +1 -0
- package/package.json +17 -3
- package/dist/cjs/cleartext.cjs +0 -2
- package/dist/cjs/cleartext.cjs.map +0 -1
- package/dist/esm/cleartext-Cs28cTsa.js +0 -2
- package/dist/esm/cleartext-Cs28cTsa.js.map +0 -1
- package/dist/esm/eip1193-subscribe-Cl_wlVuQ.js +0 -2
- package/dist/esm/eip1193-subscribe-Cl_wlVuQ.js.map +0 -1
- package/dist/esm/memory-storage-F8xjMzVy.js +0 -2
- package/dist/esm/memory-storage-F8xjMzVy.js.map +0 -1
- package/dist/esm/readonly-token-D4GjTj0q.js +0 -2
- package/dist/esm/readonly-token-D4GjTj0q.js.map +0 -1
- package/dist/esm/relayer-C6u3eOlN.js.map +0 -1
- package/dist/esm/relayer-sdk-DPqytEbO.d.ts +0 -44
- package/dist/esm/relayer-utils-BeoTNDM4.js +0 -2
- package/dist/esm/relayer-utils-BeoTNDM4.js.map +0 -1
- package/dist/esm/wrappers-registry-ydyySM9g.js +0 -2
- package/dist/esm/wrappers-registry-ydyySM9g.js.map +0 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as FheChain } from "./types-C1S426x4.js";
|
|
2
|
+
import { A as GenericSigner, D as StoredCredentials, E as DelegatedStoredCredentials, I as TransactionResult, N as SignerIdentityListener, O as GenericStorage, S as UnshieldOptions, T as UnshieldCallbacks, b as ShieldOptions, d as PublicDecryptResult, j as SignerIdentity, k as GenericProvider, l as Handle, n as RelayerSDK, r as ClearValueType, w as TransferCallbacks, x as TransferOptions } from "./relayer-cleartext-DJkSUlZ2.js";
|
|
3
|
+
import { U as ZamaSDKEventInput, W as ZamaSDKEventListener, u as RelayerDispatcher } from "./types-FY7ciI37.js";
|
|
3
4
|
import { Address, Hex } from "viem";
|
|
5
|
+
import { UserDecryptResults } from "@zama-fhe/relayer-sdk/bundle";
|
|
4
6
|
import { MutationFunctionContext, QueryKey, QueryObserverOptions, skipToken } from "@tanstack/query-core";
|
|
5
7
|
|
|
6
8
|
//#region src/contracts/encrypted.d.ts
|
|
@@ -9,7 +11,7 @@ import { MutationFunctionContext, QueryKey, QueryObserverOptions, skipToken } fr
|
|
|
9
11
|
*
|
|
10
12
|
* @example
|
|
11
13
|
* ```ts
|
|
12
|
-
* const handle = await
|
|
14
|
+
* const handle = await provider.readContract(
|
|
13
15
|
* confidentialBalanceOfContract(tokenAddress, userAddress),
|
|
14
16
|
* );
|
|
15
17
|
* ```
|
|
@@ -3996,7 +3998,7 @@ declare function confidentialTransferFromContract(encryptedErc20: Address, from:
|
|
|
3996
3998
|
*
|
|
3997
3999
|
* @example
|
|
3998
4000
|
* ```ts
|
|
3999
|
-
* const isApproved = await
|
|
4001
|
+
* const isApproved = await provider.readContract(
|
|
4000
4002
|
* isOperatorContract(tokenAddress, holder, spender),
|
|
4001
4003
|
* );
|
|
4002
4004
|
* ```
|
|
@@ -9313,7 +9315,7 @@ declare function unwrapFromBalanceContract(encryptedErc20: Address, from: Addres
|
|
|
9313
9315
|
*
|
|
9314
9316
|
* @example
|
|
9315
9317
|
* ```ts
|
|
9316
|
-
* const handle = await
|
|
9318
|
+
* const handle = await provider.readContract(
|
|
9317
9319
|
* confidentialTotalSupplyContract(tokenAddress),
|
|
9318
9320
|
* );
|
|
9319
9321
|
* ```
|
|
@@ -10638,1006 +10640,32 @@ declare function confidentialTotalSupplyContract(tokenAddress: Address): {
|
|
|
10638
10640
|
readonly args: readonly [];
|
|
10639
10641
|
};
|
|
10640
10642
|
/**
|
|
10641
|
-
* Returns the contract config to read the
|
|
10642
|
-
*
|
|
10643
|
-
* @deprecated
|
|
10644
|
-
*
|
|
10645
|
-
*
|
|
10646
|
-
* @example
|
|
10647
|
-
* ```ts
|
|
10648
|
-
* const supply = await
|
|
10649
|
-
* totalSupplyContract(wrapperAddress),
|
|
10650
|
-
* );
|
|
10651
|
-
* ```
|
|
10652
|
-
*/
|
|
10653
|
-
declare function totalSupplyContract(wrapperAddress: Address): {
|
|
10654
|
-
readonly address: `0x${string}`;
|
|
10655
|
-
readonly abi: readonly [{
|
|
10656
|
-
readonly type: "constructor";
|
|
10657
|
-
readonly inputs: readonly [];
|
|
10658
|
-
readonly stateMutability: "nonpayable";
|
|
10659
|
-
}, {
|
|
10660
|
-
readonly type: "function";
|
|
10661
|
-
readonly name: "UPGRADE_INTERFACE_VERSION";
|
|
10662
|
-
readonly inputs: readonly [];
|
|
10663
|
-
readonly outputs: readonly [{
|
|
10664
|
-
readonly name: "";
|
|
10665
|
-
readonly type: "string";
|
|
10666
|
-
readonly internalType: "string";
|
|
10667
|
-
}];
|
|
10668
|
-
readonly stateMutability: "view";
|
|
10669
|
-
}, {
|
|
10670
|
-
readonly type: "function";
|
|
10671
|
-
readonly name: "acceptOwnership";
|
|
10672
|
-
readonly inputs: readonly [];
|
|
10673
|
-
readonly outputs: readonly [];
|
|
10674
|
-
readonly stateMutability: "nonpayable";
|
|
10675
|
-
}, {
|
|
10676
|
-
readonly type: "function";
|
|
10677
|
-
readonly name: "confidentialBalanceOf";
|
|
10678
|
-
readonly inputs: readonly [{
|
|
10679
|
-
readonly name: "account";
|
|
10680
|
-
readonly type: "address";
|
|
10681
|
-
readonly internalType: "address";
|
|
10682
|
-
}];
|
|
10683
|
-
readonly outputs: readonly [{
|
|
10684
|
-
readonly name: "";
|
|
10685
|
-
readonly type: "bytes32";
|
|
10686
|
-
readonly internalType: "euint64";
|
|
10687
|
-
}];
|
|
10688
|
-
readonly stateMutability: "view";
|
|
10689
|
-
}, {
|
|
10690
|
-
readonly type: "function";
|
|
10691
|
-
readonly name: "confidentialProtocolId";
|
|
10692
|
-
readonly inputs: readonly [];
|
|
10693
|
-
readonly outputs: readonly [{
|
|
10694
|
-
readonly name: "";
|
|
10695
|
-
readonly type: "uint256";
|
|
10696
|
-
readonly internalType: "uint256";
|
|
10697
|
-
}];
|
|
10698
|
-
readonly stateMutability: "view";
|
|
10699
|
-
}, {
|
|
10700
|
-
readonly type: "function";
|
|
10701
|
-
readonly name: "confidentialTotalSupply";
|
|
10702
|
-
readonly inputs: readonly [];
|
|
10703
|
-
readonly outputs: readonly [{
|
|
10704
|
-
readonly name: "";
|
|
10705
|
-
readonly type: "bytes32";
|
|
10706
|
-
readonly internalType: "euint64";
|
|
10707
|
-
}];
|
|
10708
|
-
readonly stateMutability: "view";
|
|
10709
|
-
}, {
|
|
10710
|
-
readonly type: "function";
|
|
10711
|
-
readonly name: "confidentialTransfer";
|
|
10712
|
-
readonly inputs: readonly [{
|
|
10713
|
-
readonly name: "to";
|
|
10714
|
-
readonly type: "address";
|
|
10715
|
-
readonly internalType: "address";
|
|
10716
|
-
}, {
|
|
10717
|
-
readonly name: "encryptedAmount";
|
|
10718
|
-
readonly type: "bytes32";
|
|
10719
|
-
readonly internalType: "externalEuint64";
|
|
10720
|
-
}, {
|
|
10721
|
-
readonly name: "inputProof";
|
|
10722
|
-
readonly type: "bytes";
|
|
10723
|
-
readonly internalType: "bytes";
|
|
10724
|
-
}];
|
|
10725
|
-
readonly outputs: readonly [{
|
|
10726
|
-
readonly name: "";
|
|
10727
|
-
readonly type: "bytes32";
|
|
10728
|
-
readonly internalType: "euint64";
|
|
10729
|
-
}];
|
|
10730
|
-
readonly stateMutability: "nonpayable";
|
|
10731
|
-
}, {
|
|
10732
|
-
readonly type: "function";
|
|
10733
|
-
readonly name: "confidentialTransfer";
|
|
10734
|
-
readonly inputs: readonly [{
|
|
10735
|
-
readonly name: "to";
|
|
10736
|
-
readonly type: "address";
|
|
10737
|
-
readonly internalType: "address";
|
|
10738
|
-
}, {
|
|
10739
|
-
readonly name: "amount";
|
|
10740
|
-
readonly type: "bytes32";
|
|
10741
|
-
readonly internalType: "euint64";
|
|
10742
|
-
}];
|
|
10743
|
-
readonly outputs: readonly [{
|
|
10744
|
-
readonly name: "";
|
|
10745
|
-
readonly type: "bytes32";
|
|
10746
|
-
readonly internalType: "euint64";
|
|
10747
|
-
}];
|
|
10748
|
-
readonly stateMutability: "nonpayable";
|
|
10749
|
-
}, {
|
|
10750
|
-
readonly type: "function";
|
|
10751
|
-
readonly name: "confidentialTransferAndCall";
|
|
10752
|
-
readonly inputs: readonly [{
|
|
10753
|
-
readonly name: "to";
|
|
10754
|
-
readonly type: "address";
|
|
10755
|
-
readonly internalType: "address";
|
|
10756
|
-
}, {
|
|
10757
|
-
readonly name: "amount";
|
|
10758
|
-
readonly type: "bytes32";
|
|
10759
|
-
readonly internalType: "euint64";
|
|
10760
|
-
}, {
|
|
10761
|
-
readonly name: "data";
|
|
10762
|
-
readonly type: "bytes";
|
|
10763
|
-
readonly internalType: "bytes";
|
|
10764
|
-
}];
|
|
10765
|
-
readonly outputs: readonly [{
|
|
10766
|
-
readonly name: "transferred";
|
|
10767
|
-
readonly type: "bytes32";
|
|
10768
|
-
readonly internalType: "euint64";
|
|
10769
|
-
}];
|
|
10770
|
-
readonly stateMutability: "nonpayable";
|
|
10771
|
-
}, {
|
|
10772
|
-
readonly type: "function";
|
|
10773
|
-
readonly name: "confidentialTransferAndCall";
|
|
10774
|
-
readonly inputs: readonly [{
|
|
10775
|
-
readonly name: "to";
|
|
10776
|
-
readonly type: "address";
|
|
10777
|
-
readonly internalType: "address";
|
|
10778
|
-
}, {
|
|
10779
|
-
readonly name: "encryptedAmount";
|
|
10780
|
-
readonly type: "bytes32";
|
|
10781
|
-
readonly internalType: "externalEuint64";
|
|
10782
|
-
}, {
|
|
10783
|
-
readonly name: "inputProof";
|
|
10784
|
-
readonly type: "bytes";
|
|
10785
|
-
readonly internalType: "bytes";
|
|
10786
|
-
}, {
|
|
10787
|
-
readonly name: "data";
|
|
10788
|
-
readonly type: "bytes";
|
|
10789
|
-
readonly internalType: "bytes";
|
|
10790
|
-
}];
|
|
10791
|
-
readonly outputs: readonly [{
|
|
10792
|
-
readonly name: "transferred";
|
|
10793
|
-
readonly type: "bytes32";
|
|
10794
|
-
readonly internalType: "euint64";
|
|
10795
|
-
}];
|
|
10796
|
-
readonly stateMutability: "nonpayable";
|
|
10797
|
-
}, {
|
|
10798
|
-
readonly type: "function";
|
|
10799
|
-
readonly name: "confidentialTransferFrom";
|
|
10800
|
-
readonly inputs: readonly [{
|
|
10801
|
-
readonly name: "from";
|
|
10802
|
-
readonly type: "address";
|
|
10803
|
-
readonly internalType: "address";
|
|
10804
|
-
}, {
|
|
10805
|
-
readonly name: "to";
|
|
10806
|
-
readonly type: "address";
|
|
10807
|
-
readonly internalType: "address";
|
|
10808
|
-
}, {
|
|
10809
|
-
readonly name: "encryptedAmount";
|
|
10810
|
-
readonly type: "bytes32";
|
|
10811
|
-
readonly internalType: "externalEuint64";
|
|
10812
|
-
}, {
|
|
10813
|
-
readonly name: "inputProof";
|
|
10814
|
-
readonly type: "bytes";
|
|
10815
|
-
readonly internalType: "bytes";
|
|
10816
|
-
}];
|
|
10817
|
-
readonly outputs: readonly [{
|
|
10818
|
-
readonly name: "transferred";
|
|
10819
|
-
readonly type: "bytes32";
|
|
10820
|
-
readonly internalType: "euint64";
|
|
10821
|
-
}];
|
|
10822
|
-
readonly stateMutability: "nonpayable";
|
|
10823
|
-
}, {
|
|
10824
|
-
readonly type: "function";
|
|
10825
|
-
readonly name: "confidentialTransferFrom";
|
|
10826
|
-
readonly inputs: readonly [{
|
|
10827
|
-
readonly name: "from";
|
|
10828
|
-
readonly type: "address";
|
|
10829
|
-
readonly internalType: "address";
|
|
10830
|
-
}, {
|
|
10831
|
-
readonly name: "to";
|
|
10832
|
-
readonly type: "address";
|
|
10833
|
-
readonly internalType: "address";
|
|
10834
|
-
}, {
|
|
10835
|
-
readonly name: "amount";
|
|
10836
|
-
readonly type: "bytes32";
|
|
10837
|
-
readonly internalType: "euint64";
|
|
10838
|
-
}];
|
|
10839
|
-
readonly outputs: readonly [{
|
|
10840
|
-
readonly name: "transferred";
|
|
10841
|
-
readonly type: "bytes32";
|
|
10842
|
-
readonly internalType: "euint64";
|
|
10843
|
-
}];
|
|
10844
|
-
readonly stateMutability: "nonpayable";
|
|
10845
|
-
}, {
|
|
10846
|
-
readonly type: "function";
|
|
10847
|
-
readonly name: "confidentialTransferFromAndCall";
|
|
10848
|
-
readonly inputs: readonly [{
|
|
10849
|
-
readonly name: "from";
|
|
10850
|
-
readonly type: "address";
|
|
10851
|
-
readonly internalType: "address";
|
|
10852
|
-
}, {
|
|
10853
|
-
readonly name: "to";
|
|
10854
|
-
readonly type: "address";
|
|
10855
|
-
readonly internalType: "address";
|
|
10856
|
-
}, {
|
|
10857
|
-
readonly name: "encryptedAmount";
|
|
10858
|
-
readonly type: "bytes32";
|
|
10859
|
-
readonly internalType: "externalEuint64";
|
|
10860
|
-
}, {
|
|
10861
|
-
readonly name: "inputProof";
|
|
10862
|
-
readonly type: "bytes";
|
|
10863
|
-
readonly internalType: "bytes";
|
|
10864
|
-
}, {
|
|
10865
|
-
readonly name: "data";
|
|
10866
|
-
readonly type: "bytes";
|
|
10867
|
-
readonly internalType: "bytes";
|
|
10868
|
-
}];
|
|
10869
|
-
readonly outputs: readonly [{
|
|
10870
|
-
readonly name: "transferred";
|
|
10871
|
-
readonly type: "bytes32";
|
|
10872
|
-
readonly internalType: "euint64";
|
|
10873
|
-
}];
|
|
10874
|
-
readonly stateMutability: "nonpayable";
|
|
10875
|
-
}, {
|
|
10876
|
-
readonly type: "function";
|
|
10877
|
-
readonly name: "confidentialTransferFromAndCall";
|
|
10878
|
-
readonly inputs: readonly [{
|
|
10879
|
-
readonly name: "from";
|
|
10880
|
-
readonly type: "address";
|
|
10881
|
-
readonly internalType: "address";
|
|
10882
|
-
}, {
|
|
10883
|
-
readonly name: "to";
|
|
10884
|
-
readonly type: "address";
|
|
10885
|
-
readonly internalType: "address";
|
|
10886
|
-
}, {
|
|
10887
|
-
readonly name: "amount";
|
|
10888
|
-
readonly type: "bytes32";
|
|
10889
|
-
readonly internalType: "euint64";
|
|
10890
|
-
}, {
|
|
10891
|
-
readonly name: "data";
|
|
10892
|
-
readonly type: "bytes";
|
|
10893
|
-
readonly internalType: "bytes";
|
|
10894
|
-
}];
|
|
10895
|
-
readonly outputs: readonly [{
|
|
10896
|
-
readonly name: "transferred";
|
|
10897
|
-
readonly type: "bytes32";
|
|
10898
|
-
readonly internalType: "euint64";
|
|
10899
|
-
}];
|
|
10900
|
-
readonly stateMutability: "nonpayable";
|
|
10901
|
-
}, {
|
|
10902
|
-
readonly type: "function";
|
|
10903
|
-
readonly name: "contractURI";
|
|
10904
|
-
readonly inputs: readonly [];
|
|
10905
|
-
readonly outputs: readonly [{
|
|
10906
|
-
readonly name: "";
|
|
10907
|
-
readonly type: "string";
|
|
10908
|
-
readonly internalType: "string";
|
|
10909
|
-
}];
|
|
10910
|
-
readonly stateMutability: "view";
|
|
10911
|
-
}, {
|
|
10912
|
-
readonly type: "function";
|
|
10913
|
-
readonly name: "decimals";
|
|
10914
|
-
readonly inputs: readonly [];
|
|
10915
|
-
readonly outputs: readonly [{
|
|
10916
|
-
readonly name: "";
|
|
10917
|
-
readonly type: "uint8";
|
|
10918
|
-
readonly internalType: "uint8";
|
|
10919
|
-
}];
|
|
10920
|
-
readonly stateMutability: "view";
|
|
10921
|
-
}, {
|
|
10922
|
-
readonly type: "function";
|
|
10923
|
-
readonly name: "discloseEncryptedAmount";
|
|
10924
|
-
readonly inputs: readonly [{
|
|
10925
|
-
readonly name: "encryptedAmount";
|
|
10926
|
-
readonly type: "bytes32";
|
|
10927
|
-
readonly internalType: "euint64";
|
|
10928
|
-
}, {
|
|
10929
|
-
readonly name: "cleartextAmount";
|
|
10930
|
-
readonly type: "uint64";
|
|
10931
|
-
readonly internalType: "uint64";
|
|
10932
|
-
}, {
|
|
10933
|
-
readonly name: "decryptionProof";
|
|
10934
|
-
readonly type: "bytes";
|
|
10935
|
-
readonly internalType: "bytes";
|
|
10936
|
-
}];
|
|
10937
|
-
readonly outputs: readonly [];
|
|
10938
|
-
readonly stateMutability: "nonpayable";
|
|
10939
|
-
}, {
|
|
10940
|
-
readonly type: "function";
|
|
10941
|
-
readonly name: "finalizeUnwrap";
|
|
10942
|
-
readonly inputs: readonly [{
|
|
10943
|
-
readonly name: "unwrapRequestId";
|
|
10944
|
-
readonly type: "bytes32";
|
|
10945
|
-
readonly internalType: "bytes32";
|
|
10946
|
-
}, {
|
|
10947
|
-
readonly name: "burntAmountCleartext";
|
|
10948
|
-
readonly type: "uint64";
|
|
10949
|
-
readonly internalType: "uint64";
|
|
10950
|
-
}, {
|
|
10951
|
-
readonly name: "decryptionProof";
|
|
10952
|
-
readonly type: "bytes";
|
|
10953
|
-
readonly internalType: "bytes";
|
|
10954
|
-
}];
|
|
10955
|
-
readonly outputs: readonly [];
|
|
10956
|
-
readonly stateMutability: "nonpayable";
|
|
10957
|
-
}, {
|
|
10958
|
-
readonly type: "function";
|
|
10959
|
-
readonly name: "initialize";
|
|
10960
|
-
readonly inputs: readonly [{
|
|
10961
|
-
readonly name: "name_";
|
|
10962
|
-
readonly type: "string";
|
|
10963
|
-
readonly internalType: "string";
|
|
10964
|
-
}, {
|
|
10965
|
-
readonly name: "symbol_";
|
|
10966
|
-
readonly type: "string";
|
|
10967
|
-
readonly internalType: "string";
|
|
10968
|
-
}, {
|
|
10969
|
-
readonly name: "contractURI_";
|
|
10970
|
-
readonly type: "string";
|
|
10971
|
-
readonly internalType: "string";
|
|
10972
|
-
}, {
|
|
10973
|
-
readonly name: "underlying_";
|
|
10974
|
-
readonly type: "address";
|
|
10975
|
-
readonly internalType: "contract IERC20";
|
|
10976
|
-
}, {
|
|
10977
|
-
readonly name: "owner_";
|
|
10978
|
-
readonly type: "address";
|
|
10979
|
-
readonly internalType: "address";
|
|
10980
|
-
}];
|
|
10981
|
-
readonly outputs: readonly [];
|
|
10982
|
-
readonly stateMutability: "nonpayable";
|
|
10983
|
-
}, {
|
|
10984
|
-
readonly type: "function";
|
|
10985
|
-
readonly name: "isOperator";
|
|
10986
|
-
readonly inputs: readonly [{
|
|
10987
|
-
readonly name: "holder";
|
|
10988
|
-
readonly type: "address";
|
|
10989
|
-
readonly internalType: "address";
|
|
10990
|
-
}, {
|
|
10991
|
-
readonly name: "spender";
|
|
10992
|
-
readonly type: "address";
|
|
10993
|
-
readonly internalType: "address";
|
|
10994
|
-
}];
|
|
10995
|
-
readonly outputs: readonly [{
|
|
10996
|
-
readonly name: "";
|
|
10997
|
-
readonly type: "bool";
|
|
10998
|
-
readonly internalType: "bool";
|
|
10999
|
-
}];
|
|
11000
|
-
readonly stateMutability: "view";
|
|
11001
|
-
}, {
|
|
11002
|
-
readonly type: "function";
|
|
11003
|
-
readonly name: "maxTotalSupply";
|
|
11004
|
-
readonly inputs: readonly [];
|
|
11005
|
-
readonly outputs: readonly [{
|
|
11006
|
-
readonly name: "";
|
|
11007
|
-
readonly type: "uint256";
|
|
11008
|
-
readonly internalType: "uint256";
|
|
11009
|
-
}];
|
|
11010
|
-
readonly stateMutability: "view";
|
|
11011
|
-
}, {
|
|
11012
|
-
readonly type: "function";
|
|
11013
|
-
readonly name: "name";
|
|
11014
|
-
readonly inputs: readonly [];
|
|
11015
|
-
readonly outputs: readonly [{
|
|
11016
|
-
readonly name: "";
|
|
11017
|
-
readonly type: "string";
|
|
11018
|
-
readonly internalType: "string";
|
|
11019
|
-
}];
|
|
11020
|
-
readonly stateMutability: "view";
|
|
11021
|
-
}, {
|
|
11022
|
-
readonly type: "function";
|
|
11023
|
-
readonly name: "onTransferReceived";
|
|
11024
|
-
readonly inputs: readonly [{
|
|
11025
|
-
readonly name: "";
|
|
11026
|
-
readonly type: "address";
|
|
11027
|
-
readonly internalType: "address";
|
|
11028
|
-
}, {
|
|
11029
|
-
readonly name: "from";
|
|
11030
|
-
readonly type: "address";
|
|
11031
|
-
readonly internalType: "address";
|
|
11032
|
-
}, {
|
|
11033
|
-
readonly name: "amount";
|
|
11034
|
-
readonly type: "uint256";
|
|
11035
|
-
readonly internalType: "uint256";
|
|
11036
|
-
}, {
|
|
11037
|
-
readonly name: "data";
|
|
11038
|
-
readonly type: "bytes";
|
|
11039
|
-
readonly internalType: "bytes";
|
|
11040
|
-
}];
|
|
11041
|
-
readonly outputs: readonly [{
|
|
11042
|
-
readonly name: "";
|
|
11043
|
-
readonly type: "bytes4";
|
|
11044
|
-
readonly internalType: "bytes4";
|
|
11045
|
-
}];
|
|
11046
|
-
readonly stateMutability: "nonpayable";
|
|
11047
|
-
}, {
|
|
11048
|
-
readonly type: "function";
|
|
11049
|
-
readonly name: "owner";
|
|
11050
|
-
readonly inputs: readonly [];
|
|
11051
|
-
readonly outputs: readonly [{
|
|
11052
|
-
readonly name: "";
|
|
11053
|
-
readonly type: "address";
|
|
11054
|
-
readonly internalType: "address";
|
|
11055
|
-
}];
|
|
11056
|
-
readonly stateMutability: "view";
|
|
11057
|
-
}, {
|
|
11058
|
-
readonly type: "function";
|
|
11059
|
-
readonly name: "pendingOwner";
|
|
11060
|
-
readonly inputs: readonly [];
|
|
11061
|
-
readonly outputs: readonly [{
|
|
11062
|
-
readonly name: "";
|
|
11063
|
-
readonly type: "address";
|
|
11064
|
-
readonly internalType: "address";
|
|
11065
|
-
}];
|
|
11066
|
-
readonly stateMutability: "view";
|
|
11067
|
-
}, {
|
|
11068
|
-
readonly type: "function";
|
|
11069
|
-
readonly name: "proxiableUUID";
|
|
11070
|
-
readonly inputs: readonly [];
|
|
11071
|
-
readonly outputs: readonly [{
|
|
11072
|
-
readonly name: "";
|
|
11073
|
-
readonly type: "bytes32";
|
|
11074
|
-
readonly internalType: "bytes32";
|
|
11075
|
-
}];
|
|
11076
|
-
readonly stateMutability: "view";
|
|
11077
|
-
}, {
|
|
11078
|
-
readonly type: "function";
|
|
11079
|
-
readonly name: "rate";
|
|
11080
|
-
readonly inputs: readonly [];
|
|
11081
|
-
readonly outputs: readonly [{
|
|
11082
|
-
readonly name: "";
|
|
11083
|
-
readonly type: "uint256";
|
|
11084
|
-
readonly internalType: "uint256";
|
|
11085
|
-
}];
|
|
11086
|
-
readonly stateMutability: "view";
|
|
11087
|
-
}, {
|
|
11088
|
-
readonly type: "function";
|
|
11089
|
-
readonly name: "renounceOwnership";
|
|
11090
|
-
readonly inputs: readonly [];
|
|
11091
|
-
readonly outputs: readonly [];
|
|
11092
|
-
readonly stateMutability: "nonpayable";
|
|
11093
|
-
}, {
|
|
11094
|
-
readonly type: "function";
|
|
11095
|
-
readonly name: "requestDiscloseEncryptedAmount";
|
|
11096
|
-
readonly inputs: readonly [{
|
|
11097
|
-
readonly name: "encryptedAmount";
|
|
11098
|
-
readonly type: "bytes32";
|
|
11099
|
-
readonly internalType: "euint64";
|
|
11100
|
-
}];
|
|
11101
|
-
readonly outputs: readonly [];
|
|
11102
|
-
readonly stateMutability: "nonpayable";
|
|
11103
|
-
}, {
|
|
11104
|
-
readonly type: "function";
|
|
11105
|
-
readonly name: "setOperator";
|
|
11106
|
-
readonly inputs: readonly [{
|
|
11107
|
-
readonly name: "operator";
|
|
11108
|
-
readonly type: "address";
|
|
11109
|
-
readonly internalType: "address";
|
|
11110
|
-
}, {
|
|
11111
|
-
readonly name: "until";
|
|
11112
|
-
readonly type: "uint48";
|
|
11113
|
-
readonly internalType: "uint48";
|
|
11114
|
-
}];
|
|
11115
|
-
readonly outputs: readonly [];
|
|
11116
|
-
readonly stateMutability: "nonpayable";
|
|
11117
|
-
}, {
|
|
11118
|
-
readonly type: "function";
|
|
11119
|
-
readonly name: "supportsInterface";
|
|
11120
|
-
readonly inputs: readonly [{
|
|
11121
|
-
readonly name: "interfaceId";
|
|
11122
|
-
readonly type: "bytes4";
|
|
11123
|
-
readonly internalType: "bytes4";
|
|
11124
|
-
}];
|
|
11125
|
-
readonly outputs: readonly [{
|
|
11126
|
-
readonly name: "";
|
|
11127
|
-
readonly type: "bool";
|
|
11128
|
-
readonly internalType: "bool";
|
|
11129
|
-
}];
|
|
11130
|
-
readonly stateMutability: "view";
|
|
11131
|
-
}, {
|
|
11132
|
-
readonly type: "function";
|
|
11133
|
-
readonly name: "symbol";
|
|
11134
|
-
readonly inputs: readonly [];
|
|
11135
|
-
readonly outputs: readonly [{
|
|
11136
|
-
readonly name: "";
|
|
11137
|
-
readonly type: "string";
|
|
11138
|
-
readonly internalType: "string";
|
|
11139
|
-
}];
|
|
11140
|
-
readonly stateMutability: "view";
|
|
11141
|
-
}, {
|
|
11142
|
-
readonly type: "function";
|
|
11143
|
-
readonly name: "inferredTotalSupply";
|
|
11144
|
-
readonly inputs: readonly [];
|
|
11145
|
-
readonly outputs: readonly [{
|
|
11146
|
-
readonly name: "";
|
|
11147
|
-
readonly type: "uint256";
|
|
11148
|
-
readonly internalType: "uint256";
|
|
11149
|
-
}];
|
|
11150
|
-
readonly stateMutability: "view";
|
|
11151
|
-
}, {
|
|
11152
|
-
readonly type: "function";
|
|
11153
|
-
readonly name: "transferOwnership";
|
|
11154
|
-
readonly inputs: readonly [{
|
|
11155
|
-
readonly name: "newOwner";
|
|
11156
|
-
readonly type: "address";
|
|
11157
|
-
readonly internalType: "address";
|
|
11158
|
-
}];
|
|
11159
|
-
readonly outputs: readonly [];
|
|
11160
|
-
readonly stateMutability: "nonpayable";
|
|
11161
|
-
}, {
|
|
11162
|
-
readonly type: "function";
|
|
11163
|
-
readonly name: "underlying";
|
|
11164
|
-
readonly inputs: readonly [];
|
|
11165
|
-
readonly outputs: readonly [{
|
|
11166
|
-
readonly name: "";
|
|
11167
|
-
readonly type: "address";
|
|
11168
|
-
readonly internalType: "address";
|
|
11169
|
-
}];
|
|
11170
|
-
readonly stateMutability: "view";
|
|
11171
|
-
}, {
|
|
11172
|
-
readonly type: "function";
|
|
11173
|
-
readonly name: "unwrap";
|
|
11174
|
-
readonly inputs: readonly [{
|
|
11175
|
-
readonly name: "from";
|
|
11176
|
-
readonly type: "address";
|
|
11177
|
-
readonly internalType: "address";
|
|
11178
|
-
}, {
|
|
11179
|
-
readonly name: "to";
|
|
11180
|
-
readonly type: "address";
|
|
11181
|
-
readonly internalType: "address";
|
|
11182
|
-
}, {
|
|
11183
|
-
readonly name: "encryptedAmount";
|
|
11184
|
-
readonly type: "bytes32";
|
|
11185
|
-
readonly internalType: "externalEuint64";
|
|
11186
|
-
}, {
|
|
11187
|
-
readonly name: "inputProof";
|
|
11188
|
-
readonly type: "bytes";
|
|
11189
|
-
readonly internalType: "bytes";
|
|
11190
|
-
}];
|
|
11191
|
-
readonly outputs: readonly [{
|
|
11192
|
-
readonly name: "";
|
|
11193
|
-
readonly type: "bytes32";
|
|
11194
|
-
readonly internalType: "bytes32";
|
|
11195
|
-
}];
|
|
11196
|
-
readonly stateMutability: "nonpayable";
|
|
11197
|
-
}, {
|
|
11198
|
-
readonly type: "function";
|
|
11199
|
-
readonly name: "unwrap";
|
|
11200
|
-
readonly inputs: readonly [{
|
|
11201
|
-
readonly name: "from";
|
|
11202
|
-
readonly type: "address";
|
|
11203
|
-
readonly internalType: "address";
|
|
11204
|
-
}, {
|
|
11205
|
-
readonly name: "to";
|
|
11206
|
-
readonly type: "address";
|
|
11207
|
-
readonly internalType: "address";
|
|
11208
|
-
}, {
|
|
11209
|
-
readonly name: "amount";
|
|
11210
|
-
readonly type: "bytes32";
|
|
11211
|
-
readonly internalType: "euint64";
|
|
11212
|
-
}];
|
|
11213
|
-
readonly outputs: readonly [{
|
|
11214
|
-
readonly name: "";
|
|
11215
|
-
readonly type: "bytes32";
|
|
11216
|
-
readonly internalType: "bytes32";
|
|
11217
|
-
}];
|
|
11218
|
-
readonly stateMutability: "nonpayable";
|
|
11219
|
-
}, {
|
|
11220
|
-
readonly type: "function";
|
|
11221
|
-
readonly name: "unwrapAmount";
|
|
11222
|
-
readonly inputs: readonly [{
|
|
11223
|
-
readonly name: "unwrapRequestId";
|
|
11224
|
-
readonly type: "bytes32";
|
|
11225
|
-
readonly internalType: "bytes32";
|
|
11226
|
-
}];
|
|
11227
|
-
readonly outputs: readonly [{
|
|
11228
|
-
readonly name: "";
|
|
11229
|
-
readonly type: "bytes32";
|
|
11230
|
-
readonly internalType: "euint64";
|
|
11231
|
-
}];
|
|
11232
|
-
readonly stateMutability: "view";
|
|
11233
|
-
}, {
|
|
11234
|
-
readonly type: "function";
|
|
11235
|
-
readonly name: "unwrapRequester";
|
|
11236
|
-
readonly inputs: readonly [{
|
|
11237
|
-
readonly name: "unwrapRequestId";
|
|
11238
|
-
readonly type: "bytes32";
|
|
11239
|
-
readonly internalType: "bytes32";
|
|
11240
|
-
}];
|
|
11241
|
-
readonly outputs: readonly [{
|
|
11242
|
-
readonly name: "";
|
|
11243
|
-
readonly type: "address";
|
|
11244
|
-
readonly internalType: "address";
|
|
11245
|
-
}];
|
|
11246
|
-
readonly stateMutability: "view";
|
|
11247
|
-
}, {
|
|
11248
|
-
readonly type: "function";
|
|
11249
|
-
readonly name: "upgradeToAndCall";
|
|
11250
|
-
readonly inputs: readonly [{
|
|
11251
|
-
readonly name: "newImplementation";
|
|
11252
|
-
readonly type: "address";
|
|
11253
|
-
readonly internalType: "address";
|
|
11254
|
-
}, {
|
|
11255
|
-
readonly name: "data";
|
|
11256
|
-
readonly type: "bytes";
|
|
11257
|
-
readonly internalType: "bytes";
|
|
11258
|
-
}];
|
|
11259
|
-
readonly outputs: readonly [];
|
|
11260
|
-
readonly stateMutability: "payable";
|
|
11261
|
-
}, {
|
|
11262
|
-
readonly type: "function";
|
|
11263
|
-
readonly name: "wrap";
|
|
11264
|
-
readonly inputs: readonly [{
|
|
11265
|
-
readonly name: "to";
|
|
11266
|
-
readonly type: "address";
|
|
11267
|
-
readonly internalType: "address";
|
|
11268
|
-
}, {
|
|
11269
|
-
readonly name: "amount";
|
|
11270
|
-
readonly type: "uint256";
|
|
11271
|
-
readonly internalType: "uint256";
|
|
11272
|
-
}];
|
|
11273
|
-
readonly outputs: readonly [];
|
|
11274
|
-
readonly stateMutability: "nonpayable";
|
|
11275
|
-
}, {
|
|
11276
|
-
readonly type: "event";
|
|
11277
|
-
readonly name: "AmountDiscloseRequested";
|
|
11278
|
-
readonly inputs: readonly [{
|
|
11279
|
-
readonly name: "encryptedAmount";
|
|
11280
|
-
readonly type: "bytes32";
|
|
11281
|
-
readonly indexed: true;
|
|
11282
|
-
readonly internalType: "euint64";
|
|
11283
|
-
}, {
|
|
11284
|
-
readonly name: "requester";
|
|
11285
|
-
readonly type: "address";
|
|
11286
|
-
readonly indexed: true;
|
|
11287
|
-
readonly internalType: "address";
|
|
11288
|
-
}];
|
|
11289
|
-
readonly anonymous: false;
|
|
11290
|
-
}, {
|
|
11291
|
-
readonly type: "event";
|
|
11292
|
-
readonly name: "AmountDisclosed";
|
|
11293
|
-
readonly inputs: readonly [{
|
|
11294
|
-
readonly name: "encryptedAmount";
|
|
11295
|
-
readonly type: "bytes32";
|
|
11296
|
-
readonly indexed: true;
|
|
11297
|
-
readonly internalType: "euint64";
|
|
11298
|
-
}, {
|
|
11299
|
-
readonly name: "amount";
|
|
11300
|
-
readonly type: "uint64";
|
|
11301
|
-
readonly indexed: false;
|
|
11302
|
-
readonly internalType: "uint64";
|
|
11303
|
-
}];
|
|
11304
|
-
readonly anonymous: false;
|
|
11305
|
-
}, {
|
|
11306
|
-
readonly type: "event";
|
|
11307
|
-
readonly name: "ConfidentialTransfer";
|
|
11308
|
-
readonly inputs: readonly [{
|
|
11309
|
-
readonly name: "from";
|
|
11310
|
-
readonly type: "address";
|
|
11311
|
-
readonly indexed: true;
|
|
11312
|
-
readonly internalType: "address";
|
|
11313
|
-
}, {
|
|
11314
|
-
readonly name: "to";
|
|
11315
|
-
readonly type: "address";
|
|
11316
|
-
readonly indexed: true;
|
|
11317
|
-
readonly internalType: "address";
|
|
11318
|
-
}, {
|
|
11319
|
-
readonly name: "amount";
|
|
11320
|
-
readonly type: "bytes32";
|
|
11321
|
-
readonly indexed: true;
|
|
11322
|
-
readonly internalType: "euint64";
|
|
11323
|
-
}];
|
|
11324
|
-
readonly anonymous: false;
|
|
11325
|
-
}, {
|
|
11326
|
-
readonly type: "event";
|
|
11327
|
-
readonly name: "Initialized";
|
|
11328
|
-
readonly inputs: readonly [{
|
|
11329
|
-
readonly name: "version";
|
|
11330
|
-
readonly type: "uint64";
|
|
11331
|
-
readonly indexed: false;
|
|
11332
|
-
readonly internalType: "uint64";
|
|
11333
|
-
}];
|
|
11334
|
-
readonly anonymous: false;
|
|
11335
|
-
}, {
|
|
11336
|
-
readonly type: "event";
|
|
11337
|
-
readonly name: "OperatorSet";
|
|
11338
|
-
readonly inputs: readonly [{
|
|
11339
|
-
readonly name: "holder";
|
|
11340
|
-
readonly type: "address";
|
|
11341
|
-
readonly indexed: true;
|
|
11342
|
-
readonly internalType: "address";
|
|
11343
|
-
}, {
|
|
11344
|
-
readonly name: "operator";
|
|
11345
|
-
readonly type: "address";
|
|
11346
|
-
readonly indexed: true;
|
|
11347
|
-
readonly internalType: "address";
|
|
11348
|
-
}, {
|
|
11349
|
-
readonly name: "until";
|
|
11350
|
-
readonly type: "uint48";
|
|
11351
|
-
readonly indexed: false;
|
|
11352
|
-
readonly internalType: "uint48";
|
|
11353
|
-
}];
|
|
11354
|
-
readonly anonymous: false;
|
|
11355
|
-
}, {
|
|
11356
|
-
readonly type: "event";
|
|
11357
|
-
readonly name: "OwnershipTransferStarted";
|
|
11358
|
-
readonly inputs: readonly [{
|
|
11359
|
-
readonly name: "previousOwner";
|
|
11360
|
-
readonly type: "address";
|
|
11361
|
-
readonly indexed: true;
|
|
11362
|
-
readonly internalType: "address";
|
|
11363
|
-
}, {
|
|
11364
|
-
readonly name: "newOwner";
|
|
11365
|
-
readonly type: "address";
|
|
11366
|
-
readonly indexed: true;
|
|
11367
|
-
readonly internalType: "address";
|
|
11368
|
-
}];
|
|
11369
|
-
readonly anonymous: false;
|
|
11370
|
-
}, {
|
|
11371
|
-
readonly type: "event";
|
|
11372
|
-
readonly name: "OwnershipTransferred";
|
|
11373
|
-
readonly inputs: readonly [{
|
|
11374
|
-
readonly name: "previousOwner";
|
|
11375
|
-
readonly type: "address";
|
|
11376
|
-
readonly indexed: true;
|
|
11377
|
-
readonly internalType: "address";
|
|
11378
|
-
}, {
|
|
11379
|
-
readonly name: "newOwner";
|
|
11380
|
-
readonly type: "address";
|
|
11381
|
-
readonly indexed: true;
|
|
11382
|
-
readonly internalType: "address";
|
|
11383
|
-
}];
|
|
11384
|
-
readonly anonymous: false;
|
|
11385
|
-
}, {
|
|
11386
|
-
readonly type: "event";
|
|
11387
|
-
readonly name: "PublicDecryptionVerified";
|
|
11388
|
-
readonly inputs: readonly [{
|
|
11389
|
-
readonly name: "handlesList";
|
|
11390
|
-
readonly type: "bytes32[]";
|
|
11391
|
-
readonly indexed: false;
|
|
11392
|
-
readonly internalType: "bytes32[]";
|
|
11393
|
-
}, {
|
|
11394
|
-
readonly name: "abiEncodedCleartexts";
|
|
11395
|
-
readonly type: "bytes";
|
|
11396
|
-
readonly indexed: false;
|
|
11397
|
-
readonly internalType: "bytes";
|
|
11398
|
-
}];
|
|
11399
|
-
readonly anonymous: false;
|
|
11400
|
-
}, {
|
|
11401
|
-
readonly type: "event";
|
|
11402
|
-
readonly name: "UnwrapFinalized";
|
|
11403
|
-
readonly inputs: readonly [{
|
|
11404
|
-
readonly name: "receiver";
|
|
11405
|
-
readonly type: "address";
|
|
11406
|
-
readonly indexed: true;
|
|
11407
|
-
readonly internalType: "address";
|
|
11408
|
-
}, {
|
|
11409
|
-
readonly name: "unwrapRequestId";
|
|
11410
|
-
readonly type: "bytes32";
|
|
11411
|
-
readonly indexed: true;
|
|
11412
|
-
readonly internalType: "bytes32";
|
|
11413
|
-
}, {
|
|
11414
|
-
readonly name: "encryptedAmount";
|
|
11415
|
-
readonly type: "bytes32";
|
|
11416
|
-
readonly indexed: false;
|
|
11417
|
-
readonly internalType: "euint64";
|
|
11418
|
-
}, {
|
|
11419
|
-
readonly name: "cleartextAmount";
|
|
11420
|
-
readonly type: "uint64";
|
|
11421
|
-
readonly indexed: false;
|
|
11422
|
-
readonly internalType: "uint64";
|
|
11423
|
-
}];
|
|
11424
|
-
readonly anonymous: false;
|
|
11425
|
-
}, {
|
|
11426
|
-
readonly type: "event";
|
|
11427
|
-
readonly name: "UnwrapRequested";
|
|
11428
|
-
readonly inputs: readonly [{
|
|
11429
|
-
readonly name: "receiver";
|
|
11430
|
-
readonly type: "address";
|
|
11431
|
-
readonly indexed: true;
|
|
11432
|
-
readonly internalType: "address";
|
|
11433
|
-
}, {
|
|
11434
|
-
readonly name: "unwrapRequestId";
|
|
11435
|
-
readonly type: "bytes32";
|
|
11436
|
-
readonly indexed: true;
|
|
11437
|
-
readonly internalType: "bytes32";
|
|
11438
|
-
}, {
|
|
11439
|
-
readonly name: "amount";
|
|
11440
|
-
readonly type: "bytes32";
|
|
11441
|
-
readonly indexed: false;
|
|
11442
|
-
readonly internalType: "euint64";
|
|
11443
|
-
}];
|
|
11444
|
-
readonly anonymous: false;
|
|
11445
|
-
}, {
|
|
11446
|
-
readonly type: "event";
|
|
11447
|
-
readonly name: "Upgraded";
|
|
11448
|
-
readonly inputs: readonly [{
|
|
11449
|
-
readonly name: "implementation";
|
|
11450
|
-
readonly type: "address";
|
|
11451
|
-
readonly indexed: true;
|
|
11452
|
-
readonly internalType: "address";
|
|
11453
|
-
}];
|
|
11454
|
-
readonly anonymous: false;
|
|
11455
|
-
}, {
|
|
11456
|
-
readonly type: "error";
|
|
11457
|
-
readonly name: "AddressEmptyCode";
|
|
11458
|
-
readonly inputs: readonly [{
|
|
11459
|
-
readonly name: "target";
|
|
11460
|
-
readonly type: "address";
|
|
11461
|
-
readonly internalType: "address";
|
|
11462
|
-
}];
|
|
11463
|
-
}, {
|
|
11464
|
-
readonly type: "error";
|
|
11465
|
-
readonly name: "ERC1967InvalidImplementation";
|
|
11466
|
-
readonly inputs: readonly [{
|
|
11467
|
-
readonly name: "implementation";
|
|
11468
|
-
readonly type: "address";
|
|
11469
|
-
readonly internalType: "address";
|
|
11470
|
-
}];
|
|
11471
|
-
}, {
|
|
11472
|
-
readonly type: "error";
|
|
11473
|
-
readonly name: "ERC1967NonPayable";
|
|
10643
|
+
* Returns the contract config to read the legacy plaintext total supply.
|
|
10644
|
+
*
|
|
10645
|
+
* @deprecated Prefer higher-level APIs such as `totalSupplyQueryOptions` / `useTotalSupply`,
|
|
10646
|
+
* which choose between legacy `totalSupply()` and upgraded `inferredTotalSupply()` via ERC-165.
|
|
10647
|
+
*
|
|
10648
|
+
* @example
|
|
10649
|
+
* ```ts
|
|
10650
|
+
* const supply = await provider.readContract(
|
|
10651
|
+
* totalSupplyContract(wrapperAddress),
|
|
10652
|
+
* );
|
|
10653
|
+
* ```
|
|
10654
|
+
*/
|
|
10655
|
+
declare function totalSupplyContract(wrapperAddress: Address): {
|
|
10656
|
+
readonly address: `0x${string}`;
|
|
10657
|
+
readonly abi: readonly [{
|
|
11474
10658
|
readonly inputs: readonly [];
|
|
11475
|
-
|
|
11476
|
-
readonly
|
|
11477
|
-
readonly name: "ERC7984InvalidGatewayRequest";
|
|
11478
|
-
readonly inputs: readonly [{
|
|
11479
|
-
readonly name: "requestId";
|
|
11480
|
-
readonly type: "uint256";
|
|
10659
|
+
readonly name: "totalSupply";
|
|
10660
|
+
readonly outputs: readonly [{
|
|
11481
10661
|
readonly internalType: "uint256";
|
|
11482
|
-
|
|
11483
|
-
}, {
|
|
11484
|
-
readonly type: "error";
|
|
11485
|
-
readonly name: "ERC7984InvalidReceiver";
|
|
11486
|
-
readonly inputs: readonly [{
|
|
11487
|
-
readonly name: "receiver";
|
|
11488
|
-
readonly type: "address";
|
|
11489
|
-
readonly internalType: "address";
|
|
11490
|
-
}];
|
|
11491
|
-
}, {
|
|
11492
|
-
readonly type: "error";
|
|
11493
|
-
readonly name: "ERC7984InvalidReceiver";
|
|
11494
|
-
readonly inputs: readonly [{
|
|
11495
|
-
readonly name: "receiver";
|
|
11496
|
-
readonly type: "address";
|
|
11497
|
-
readonly internalType: "address";
|
|
11498
|
-
}];
|
|
11499
|
-
}, {
|
|
11500
|
-
readonly type: "error";
|
|
11501
|
-
readonly name: "ERC7984InvalidSender";
|
|
11502
|
-
readonly inputs: readonly [{
|
|
11503
|
-
readonly name: "sender";
|
|
11504
|
-
readonly type: "address";
|
|
11505
|
-
readonly internalType: "address";
|
|
11506
|
-
}];
|
|
11507
|
-
}, {
|
|
11508
|
-
readonly type: "error";
|
|
11509
|
-
readonly name: "ERC7984TotalSupplyOverflow";
|
|
11510
|
-
readonly inputs: readonly [];
|
|
11511
|
-
}, {
|
|
11512
|
-
readonly type: "error";
|
|
11513
|
-
readonly name: "ERC7984UnauthorizedCaller";
|
|
11514
|
-
readonly inputs: readonly [{
|
|
11515
|
-
readonly name: "caller";
|
|
11516
|
-
readonly type: "address";
|
|
11517
|
-
readonly internalType: "address";
|
|
11518
|
-
}];
|
|
11519
|
-
}, {
|
|
11520
|
-
readonly type: "error";
|
|
11521
|
-
readonly name: "ERC7984UnauthorizedSpender";
|
|
11522
|
-
readonly inputs: readonly [{
|
|
11523
|
-
readonly name: "holder";
|
|
11524
|
-
readonly type: "address";
|
|
11525
|
-
readonly internalType: "address";
|
|
11526
|
-
}, {
|
|
11527
|
-
readonly name: "spender";
|
|
11528
|
-
readonly type: "address";
|
|
11529
|
-
readonly internalType: "address";
|
|
11530
|
-
}];
|
|
11531
|
-
}, {
|
|
11532
|
-
readonly type: "error";
|
|
11533
|
-
readonly name: "ERC7984UnauthorizedUseOfEncryptedAmount";
|
|
11534
|
-
readonly inputs: readonly [{
|
|
11535
|
-
readonly name: "amount";
|
|
11536
|
-
readonly type: "bytes32";
|
|
11537
|
-
readonly internalType: "euint64";
|
|
11538
|
-
}, {
|
|
11539
|
-
readonly name: "user";
|
|
11540
|
-
readonly type: "address";
|
|
11541
|
-
readonly internalType: "address";
|
|
11542
|
-
}];
|
|
11543
|
-
}, {
|
|
11544
|
-
readonly type: "error";
|
|
11545
|
-
readonly name: "ERC7984ZeroBalance";
|
|
11546
|
-
readonly inputs: readonly [{
|
|
11547
|
-
readonly name: "holder";
|
|
11548
|
-
readonly type: "address";
|
|
11549
|
-
readonly internalType: "address";
|
|
11550
|
-
}];
|
|
11551
|
-
}, {
|
|
11552
|
-
readonly type: "error";
|
|
11553
|
-
readonly name: "FailedCall";
|
|
11554
|
-
readonly inputs: readonly [];
|
|
11555
|
-
}, {
|
|
11556
|
-
readonly type: "error";
|
|
11557
|
-
readonly name: "InvalidInitialization";
|
|
11558
|
-
readonly inputs: readonly [];
|
|
11559
|
-
}, {
|
|
11560
|
-
readonly type: "error";
|
|
11561
|
-
readonly name: "InvalidKMSSignatures";
|
|
11562
|
-
readonly inputs: readonly [];
|
|
11563
|
-
}, {
|
|
11564
|
-
readonly type: "error";
|
|
11565
|
-
readonly name: "InvalidUnwrapRequest";
|
|
11566
|
-
readonly inputs: readonly [{
|
|
11567
|
-
readonly name: "unwrapRequestId";
|
|
11568
|
-
readonly type: "bytes32";
|
|
11569
|
-
readonly internalType: "bytes32";
|
|
11570
|
-
}];
|
|
11571
|
-
}, {
|
|
11572
|
-
readonly type: "error";
|
|
11573
|
-
readonly name: "NotInitializing";
|
|
11574
|
-
readonly inputs: readonly [];
|
|
11575
|
-
}, {
|
|
11576
|
-
readonly type: "error";
|
|
11577
|
-
readonly name: "OwnableInvalidOwner";
|
|
11578
|
-
readonly inputs: readonly [{
|
|
11579
|
-
readonly name: "owner";
|
|
11580
|
-
readonly type: "address";
|
|
11581
|
-
readonly internalType: "address";
|
|
11582
|
-
}];
|
|
11583
|
-
}, {
|
|
11584
|
-
readonly type: "error";
|
|
11585
|
-
readonly name: "OwnableUnauthorizedAccount";
|
|
11586
|
-
readonly inputs: readonly [{
|
|
11587
|
-
readonly name: "account";
|
|
11588
|
-
readonly type: "address";
|
|
11589
|
-
readonly internalType: "address";
|
|
11590
|
-
}];
|
|
11591
|
-
}, {
|
|
11592
|
-
readonly type: "error";
|
|
11593
|
-
readonly name: "SafeCastOverflowedUintDowncast";
|
|
11594
|
-
readonly inputs: readonly [{
|
|
11595
|
-
readonly name: "bits";
|
|
11596
|
-
readonly type: "uint8";
|
|
11597
|
-
readonly internalType: "uint8";
|
|
11598
|
-
}, {
|
|
11599
|
-
readonly name: "value";
|
|
10662
|
+
readonly name: "";
|
|
11600
10663
|
readonly type: "uint256";
|
|
11601
|
-
readonly internalType: "uint256";
|
|
11602
|
-
}];
|
|
11603
|
-
}, {
|
|
11604
|
-
readonly type: "error";
|
|
11605
|
-
readonly name: "SafeERC20FailedOperation";
|
|
11606
|
-
readonly inputs: readonly [{
|
|
11607
|
-
readonly name: "token";
|
|
11608
|
-
readonly type: "address";
|
|
11609
|
-
readonly internalType: "address";
|
|
11610
|
-
}];
|
|
11611
|
-
}, {
|
|
11612
|
-
readonly type: "error";
|
|
11613
|
-
readonly name: "SenderNotAllowedToUseHandle";
|
|
11614
|
-
readonly inputs: readonly [{
|
|
11615
|
-
readonly name: "handle";
|
|
11616
|
-
readonly type: "bytes32";
|
|
11617
|
-
readonly internalType: "bytes32";
|
|
11618
|
-
}, {
|
|
11619
|
-
readonly name: "sender";
|
|
11620
|
-
readonly type: "address";
|
|
11621
|
-
readonly internalType: "address";
|
|
11622
|
-
}];
|
|
11623
|
-
}, {
|
|
11624
|
-
readonly type: "error";
|
|
11625
|
-
readonly name: "UUPSUnauthorizedCallContext";
|
|
11626
|
-
readonly inputs: readonly [];
|
|
11627
|
-
}, {
|
|
11628
|
-
readonly type: "error";
|
|
11629
|
-
readonly name: "UUPSUnsupportedProxiableUUID";
|
|
11630
|
-
readonly inputs: readonly [{
|
|
11631
|
-
readonly name: "slot";
|
|
11632
|
-
readonly type: "bytes32";
|
|
11633
|
-
readonly internalType: "bytes32";
|
|
11634
10664
|
}];
|
|
11635
|
-
|
|
11636
|
-
readonly type: "
|
|
11637
|
-
readonly name: "ZamaProtocolUnsupported";
|
|
11638
|
-
readonly inputs: readonly [];
|
|
10665
|
+
readonly stateMutability: "view";
|
|
10666
|
+
readonly type: "function";
|
|
11639
10667
|
}];
|
|
11640
|
-
readonly functionName: "
|
|
10668
|
+
readonly functionName: "totalSupply";
|
|
11641
10669
|
readonly args: readonly [];
|
|
11642
10670
|
};
|
|
11643
10671
|
/**
|
|
@@ -11645,7 +10673,7 @@ declare function totalSupplyContract(wrapperAddress: Address): {
|
|
|
11645
10673
|
*
|
|
11646
10674
|
* @example
|
|
11647
10675
|
* ```ts
|
|
11648
|
-
* const rate = await
|
|
10676
|
+
* const rate = await provider.readContract(rateContract(tokenAddress));
|
|
11649
10677
|
* ```
|
|
11650
10678
|
*/
|
|
11651
10679
|
declare function rateContract(tokenAddress: Address): {
|
|
@@ -12975,11 +12003,11 @@ declare function rateContract(tokenAddress: Address): {
|
|
|
12975
12003
|
* @example
|
|
12976
12004
|
* ```ts
|
|
12977
12005
|
* const txHash = await signer.writeContract(
|
|
12978
|
-
* finalizeUnwrapContract(wrapper,
|
|
12006
|
+
* finalizeUnwrapContract(wrapper, unwrapRequestIdOrAmount, cleartext, proof),
|
|
12979
12007
|
* );
|
|
12980
12008
|
* ```
|
|
12981
12009
|
*/
|
|
12982
|
-
declare function finalizeUnwrapContract(wrapper: Address,
|
|
12010
|
+
declare function finalizeUnwrapContract(wrapper: Address, unwrapRequestIdOrAmount: Handle, unwrapAmountCleartext: bigint, decryptionProof: Hex): {
|
|
12983
12011
|
readonly address: `0x${string}`;
|
|
12984
12012
|
readonly abi: readonly [{
|
|
12985
12013
|
readonly type: "constructor";
|
|
@@ -13726,6 +12754,26 @@ declare function finalizeUnwrapContract(wrapper: Address, unwrapRequestId: Handl
|
|
|
13726
12754
|
readonly internalType: "bytes";
|
|
13727
12755
|
}];
|
|
13728
12756
|
readonly anonymous: false;
|
|
12757
|
+
}, {
|
|
12758
|
+
readonly type: "event";
|
|
12759
|
+
readonly name: "UnwrapFinalized";
|
|
12760
|
+
readonly inputs: readonly [{
|
|
12761
|
+
readonly name: "receiver";
|
|
12762
|
+
readonly type: "address";
|
|
12763
|
+
readonly indexed: true;
|
|
12764
|
+
readonly internalType: "address";
|
|
12765
|
+
}, {
|
|
12766
|
+
readonly name: "encryptedAmount";
|
|
12767
|
+
readonly type: "bytes32";
|
|
12768
|
+
readonly indexed: false;
|
|
12769
|
+
readonly internalType: "euint64";
|
|
12770
|
+
}, {
|
|
12771
|
+
readonly name: "cleartextAmount";
|
|
12772
|
+
readonly type: "uint64";
|
|
12773
|
+
readonly indexed: false;
|
|
12774
|
+
readonly internalType: "uint64";
|
|
12775
|
+
}];
|
|
12776
|
+
readonly anonymous: false;
|
|
13729
12777
|
}, {
|
|
13730
12778
|
readonly type: "event";
|
|
13731
12779
|
readonly name: "UnwrapFinalized";
|
|
@@ -13751,6 +12799,21 @@ declare function finalizeUnwrapContract(wrapper: Address, unwrapRequestId: Handl
|
|
|
13751
12799
|
readonly internalType: "uint64";
|
|
13752
12800
|
}];
|
|
13753
12801
|
readonly anonymous: false;
|
|
12802
|
+
}, {
|
|
12803
|
+
readonly type: "event";
|
|
12804
|
+
readonly name: "UnwrapRequested";
|
|
12805
|
+
readonly inputs: readonly [{
|
|
12806
|
+
readonly name: "receiver";
|
|
12807
|
+
readonly type: "address";
|
|
12808
|
+
readonly indexed: true;
|
|
12809
|
+
readonly internalType: "address";
|
|
12810
|
+
}, {
|
|
12811
|
+
readonly name: "amount";
|
|
12812
|
+
readonly type: "bytes32";
|
|
12813
|
+
readonly indexed: false;
|
|
12814
|
+
readonly internalType: "euint64";
|
|
12815
|
+
}];
|
|
12816
|
+
readonly anonymous: false;
|
|
13754
12817
|
}, {
|
|
13755
12818
|
readonly type: "event";
|
|
13756
12819
|
readonly name: "UnwrapRequested";
|
|
@@ -13974,7 +13037,7 @@ declare function finalizeUnwrapContract(wrapper: Address, unwrapRequestId: Handl
|
|
|
13974
13037
|
*
|
|
13975
13038
|
* @example
|
|
13976
13039
|
* ```ts
|
|
13977
|
-
* const token = await
|
|
13040
|
+
* const token = await provider.readContract(underlyingContract(wrapperAddress));
|
|
13978
13041
|
* ```
|
|
13979
13042
|
*/
|
|
13980
13043
|
declare function underlyingContract(wrapperAddress: Address): {
|
|
@@ -14713,15 +13776,35 @@ declare function underlyingContract(wrapperAddress: Address): {
|
|
|
14713
13776
|
readonly type: "event";
|
|
14714
13777
|
readonly name: "PublicDecryptionVerified";
|
|
14715
13778
|
readonly inputs: readonly [{
|
|
14716
|
-
readonly name: "handlesList";
|
|
14717
|
-
readonly type: "bytes32[]";
|
|
13779
|
+
readonly name: "handlesList";
|
|
13780
|
+
readonly type: "bytes32[]";
|
|
13781
|
+
readonly indexed: false;
|
|
13782
|
+
readonly internalType: "bytes32[]";
|
|
13783
|
+
}, {
|
|
13784
|
+
readonly name: "abiEncodedCleartexts";
|
|
13785
|
+
readonly type: "bytes";
|
|
13786
|
+
readonly indexed: false;
|
|
13787
|
+
readonly internalType: "bytes";
|
|
13788
|
+
}];
|
|
13789
|
+
readonly anonymous: false;
|
|
13790
|
+
}, {
|
|
13791
|
+
readonly type: "event";
|
|
13792
|
+
readonly name: "UnwrapFinalized";
|
|
13793
|
+
readonly inputs: readonly [{
|
|
13794
|
+
readonly name: "receiver";
|
|
13795
|
+
readonly type: "address";
|
|
13796
|
+
readonly indexed: true;
|
|
13797
|
+
readonly internalType: "address";
|
|
13798
|
+
}, {
|
|
13799
|
+
readonly name: "encryptedAmount";
|
|
13800
|
+
readonly type: "bytes32";
|
|
14718
13801
|
readonly indexed: false;
|
|
14719
|
-
readonly internalType: "
|
|
13802
|
+
readonly internalType: "euint64";
|
|
14720
13803
|
}, {
|
|
14721
|
-
readonly name: "
|
|
14722
|
-
readonly type: "
|
|
13804
|
+
readonly name: "cleartextAmount";
|
|
13805
|
+
readonly type: "uint64";
|
|
14723
13806
|
readonly indexed: false;
|
|
14724
|
-
readonly internalType: "
|
|
13807
|
+
readonly internalType: "uint64";
|
|
14725
13808
|
}];
|
|
14726
13809
|
readonly anonymous: false;
|
|
14727
13810
|
}, {
|
|
@@ -14749,6 +13832,21 @@ declare function underlyingContract(wrapperAddress: Address): {
|
|
|
14749
13832
|
readonly internalType: "uint64";
|
|
14750
13833
|
}];
|
|
14751
13834
|
readonly anonymous: false;
|
|
13835
|
+
}, {
|
|
13836
|
+
readonly type: "event";
|
|
13837
|
+
readonly name: "UnwrapRequested";
|
|
13838
|
+
readonly inputs: readonly [{
|
|
13839
|
+
readonly name: "receiver";
|
|
13840
|
+
readonly type: "address";
|
|
13841
|
+
readonly indexed: true;
|
|
13842
|
+
readonly internalType: "address";
|
|
13843
|
+
}, {
|
|
13844
|
+
readonly name: "amount";
|
|
13845
|
+
readonly type: "bytes32";
|
|
13846
|
+
readonly indexed: false;
|
|
13847
|
+
readonly internalType: "euint64";
|
|
13848
|
+
}];
|
|
13849
|
+
readonly anonymous: false;
|
|
14752
13850
|
}, {
|
|
14753
13851
|
readonly type: "event";
|
|
14754
13852
|
readonly name: "UnwrapRequested";
|
|
@@ -14972,7 +14070,7 @@ declare function underlyingContract(wrapperAddress: Address): {
|
|
|
14972
14070
|
*
|
|
14973
14071
|
* @example
|
|
14974
14072
|
* ```ts
|
|
14975
|
-
* const supply = await
|
|
14073
|
+
* const supply = await provider.readContract(
|
|
14976
14074
|
* inferredTotalSupplyContract(wrapperAddress),
|
|
14977
14075
|
* );
|
|
14978
14076
|
* ```
|
|
@@ -15724,6 +14822,26 @@ declare function inferredTotalSupplyContract(wrapperAddress: Address): {
|
|
|
15724
14822
|
readonly internalType: "bytes";
|
|
15725
14823
|
}];
|
|
15726
14824
|
readonly anonymous: false;
|
|
14825
|
+
}, {
|
|
14826
|
+
readonly type: "event";
|
|
14827
|
+
readonly name: "UnwrapFinalized";
|
|
14828
|
+
readonly inputs: readonly [{
|
|
14829
|
+
readonly name: "receiver";
|
|
14830
|
+
readonly type: "address";
|
|
14831
|
+
readonly indexed: true;
|
|
14832
|
+
readonly internalType: "address";
|
|
14833
|
+
}, {
|
|
14834
|
+
readonly name: "encryptedAmount";
|
|
14835
|
+
readonly type: "bytes32";
|
|
14836
|
+
readonly indexed: false;
|
|
14837
|
+
readonly internalType: "euint64";
|
|
14838
|
+
}, {
|
|
14839
|
+
readonly name: "cleartextAmount";
|
|
14840
|
+
readonly type: "uint64";
|
|
14841
|
+
readonly indexed: false;
|
|
14842
|
+
readonly internalType: "uint64";
|
|
14843
|
+
}];
|
|
14844
|
+
readonly anonymous: false;
|
|
15727
14845
|
}, {
|
|
15728
14846
|
readonly type: "event";
|
|
15729
14847
|
readonly name: "UnwrapFinalized";
|
|
@@ -15749,6 +14867,21 @@ declare function inferredTotalSupplyContract(wrapperAddress: Address): {
|
|
|
15749
14867
|
readonly internalType: "uint64";
|
|
15750
14868
|
}];
|
|
15751
14869
|
readonly anonymous: false;
|
|
14870
|
+
}, {
|
|
14871
|
+
readonly type: "event";
|
|
14872
|
+
readonly name: "UnwrapRequested";
|
|
14873
|
+
readonly inputs: readonly [{
|
|
14874
|
+
readonly name: "receiver";
|
|
14875
|
+
readonly type: "address";
|
|
14876
|
+
readonly indexed: true;
|
|
14877
|
+
readonly internalType: "address";
|
|
14878
|
+
}, {
|
|
14879
|
+
readonly name: "amount";
|
|
14880
|
+
readonly type: "bytes32";
|
|
14881
|
+
readonly indexed: false;
|
|
14882
|
+
readonly internalType: "euint64";
|
|
14883
|
+
}];
|
|
14884
|
+
readonly anonymous: false;
|
|
15752
14885
|
}, {
|
|
15753
14886
|
readonly type: "event";
|
|
15754
14887
|
readonly name: "UnwrapRequested";
|
|
@@ -16724,6 +15857,26 @@ declare function wrapContract(wrapperAddress: Address, to: Address, amount: bigi
|
|
|
16724
15857
|
readonly internalType: "bytes";
|
|
16725
15858
|
}];
|
|
16726
15859
|
readonly anonymous: false;
|
|
15860
|
+
}, {
|
|
15861
|
+
readonly type: "event";
|
|
15862
|
+
readonly name: "UnwrapFinalized";
|
|
15863
|
+
readonly inputs: readonly [{
|
|
15864
|
+
readonly name: "receiver";
|
|
15865
|
+
readonly type: "address";
|
|
15866
|
+
readonly indexed: true;
|
|
15867
|
+
readonly internalType: "address";
|
|
15868
|
+
}, {
|
|
15869
|
+
readonly name: "encryptedAmount";
|
|
15870
|
+
readonly type: "bytes32";
|
|
15871
|
+
readonly indexed: false;
|
|
15872
|
+
readonly internalType: "euint64";
|
|
15873
|
+
}, {
|
|
15874
|
+
readonly name: "cleartextAmount";
|
|
15875
|
+
readonly type: "uint64";
|
|
15876
|
+
readonly indexed: false;
|
|
15877
|
+
readonly internalType: "uint64";
|
|
15878
|
+
}];
|
|
15879
|
+
readonly anonymous: false;
|
|
16727
15880
|
}, {
|
|
16728
15881
|
readonly type: "event";
|
|
16729
15882
|
readonly name: "UnwrapFinalized";
|
|
@@ -16749,6 +15902,21 @@ declare function wrapContract(wrapperAddress: Address, to: Address, amount: bigi
|
|
|
16749
15902
|
readonly internalType: "uint64";
|
|
16750
15903
|
}];
|
|
16751
15904
|
readonly anonymous: false;
|
|
15905
|
+
}, {
|
|
15906
|
+
readonly type: "event";
|
|
15907
|
+
readonly name: "UnwrapRequested";
|
|
15908
|
+
readonly inputs: readonly [{
|
|
15909
|
+
readonly name: "receiver";
|
|
15910
|
+
readonly type: "address";
|
|
15911
|
+
readonly indexed: true;
|
|
15912
|
+
readonly internalType: "address";
|
|
15913
|
+
}, {
|
|
15914
|
+
readonly name: "amount";
|
|
15915
|
+
readonly type: "bytes32";
|
|
15916
|
+
readonly indexed: false;
|
|
15917
|
+
readonly internalType: "euint64";
|
|
15918
|
+
}];
|
|
15919
|
+
readonly anonymous: false;
|
|
16752
15920
|
}, {
|
|
16753
15921
|
readonly type: "event";
|
|
16754
15922
|
readonly name: "UnwrapRequested";
|
|
@@ -16974,7 +16142,7 @@ declare function wrapContract(wrapperAddress: Address, to: Address, amount: bigi
|
|
|
16974
16142
|
*
|
|
16975
16143
|
* @example
|
|
16976
16144
|
* ```ts
|
|
16977
|
-
* const name = await
|
|
16145
|
+
* const name = await provider.readContract(nameContract(tokenAddress));
|
|
16978
16146
|
* ```
|
|
16979
16147
|
*/
|
|
16980
16148
|
declare function nameContract(tokenAddress: Address): {
|
|
@@ -17122,7 +16290,7 @@ declare function nameContract(tokenAddress: Address): {
|
|
|
17122
16290
|
*
|
|
17123
16291
|
* @example
|
|
17124
16292
|
* ```ts
|
|
17125
|
-
* const symbol = await
|
|
16293
|
+
* const symbol = await provider.readContract(symbolContract(tokenAddress));
|
|
17126
16294
|
* ```
|
|
17127
16295
|
*/
|
|
17128
16296
|
declare function symbolContract(tokenAddress: Address): {
|
|
@@ -17270,7 +16438,7 @@ declare function symbolContract(tokenAddress: Address): {
|
|
|
17270
16438
|
*
|
|
17271
16439
|
* @example
|
|
17272
16440
|
* ```ts
|
|
17273
|
-
* const decimals = await
|
|
16441
|
+
* const decimals = await provider.readContract(decimalsContract(tokenAddress));
|
|
17274
16442
|
* ```
|
|
17275
16443
|
*/
|
|
17276
16444
|
declare function decimalsContract(tokenAddress: Address): {
|
|
@@ -17418,7 +16586,7 @@ declare function decimalsContract(tokenAddress: Address): {
|
|
|
17418
16586
|
*
|
|
17419
16587
|
* @example
|
|
17420
16588
|
* ```ts
|
|
17421
|
-
* const balance = await
|
|
16589
|
+
* const balance = await provider.readContract(
|
|
17422
16590
|
* balanceOfContract(tokenAddress, account),
|
|
17423
16591
|
* );
|
|
17424
16592
|
* ```
|
|
@@ -17568,7 +16736,7 @@ declare function balanceOfContract(tokenAddress: Address, account: Address): {
|
|
|
17568
16736
|
*
|
|
17569
16737
|
* @example
|
|
17570
16738
|
* ```ts
|
|
17571
|
-
* const allowance = await
|
|
16739
|
+
* const allowance = await provider.readContract(
|
|
17572
16740
|
* allowanceContract(tokenAddress, owner, spender),
|
|
17573
16741
|
* );
|
|
17574
16742
|
* ```
|
|
@@ -17867,17 +17035,30 @@ declare function approveContract(tokenAddress: Address, spender: Address, value:
|
|
|
17867
17035
|
//#region src/contracts/erc165.d.ts
|
|
17868
17036
|
/** ERC-165 interface ID for IERC7984 (confidential fungible token). */
|
|
17869
17037
|
declare const ERC7984_INTERFACE_ID: "0x4958f2a4";
|
|
17870
|
-
/** ERC-165 interface ID for IERC7984ERC20Wrapper (confidential wrapper). */
|
|
17871
|
-
declare const
|
|
17038
|
+
/** ERC-165 interface ID for IERC7984ERC20Wrapper (confidential wrapper) — current deployed baseline. */
|
|
17039
|
+
declare const ERC7984_WRAPPER_INTERFACE_ID_LEGACY: "0xd04584ba";
|
|
17040
|
+
/**
|
|
17041
|
+
* ERC-165 interface ID for IERC7984ERC20Wrapper (confidential wrapper) — upgraded interface.
|
|
17042
|
+
*
|
|
17043
|
+
* Verified against the protocol-apps upgraded wrapper line: commit b06eb263 asserts
|
|
17044
|
+
* `supportsInterface(0x1f1c62b2)` for `type(IERC7984ERC20Wrapper).interfaceId`,
|
|
17045
|
+
* and the implementation exposes `inferredTotalSupply()`.
|
|
17046
|
+
* During the transition period, both {@link ERC7984_WRAPPER_INTERFACE_ID_LEGACY} and this
|
|
17047
|
+
* constant must be checked to support old and new wrappers simultaneously.
|
|
17048
|
+
*
|
|
17049
|
+
* @see {@link ERC7984_WRAPPER_INTERFACE_ID_LEGACY} for the legacy interface ID.
|
|
17050
|
+
*/
|
|
17051
|
+
declare const ERC7984_WRAPPER_INTERFACE_ID: "0x1f1c62b2";
|
|
17872
17052
|
/**
|
|
17873
17053
|
* Returns the contract config for an ERC-165 `supportsInterface` check.
|
|
17874
17054
|
*
|
|
17875
17055
|
* Use with {@link ERC7984_INTERFACE_ID} to detect confidential tokens,
|
|
17876
|
-
* or {@link
|
|
17056
|
+
* or {@link ERC7984_WRAPPER_INTERFACE_ID_LEGACY} / {@link ERC7984_WRAPPER_INTERFACE_ID}
|
|
17057
|
+
* to detect wrappers (both must be checked during the transition period).
|
|
17877
17058
|
*
|
|
17878
17059
|
* @example
|
|
17879
17060
|
* ```ts
|
|
17880
|
-
* const isConfidential = await
|
|
17061
|
+
* const isConfidential = await provider.readContract(
|
|
17881
17062
|
* supportsInterfaceContract(tokenAddress, ERC7984_INTERFACE_ID),
|
|
17882
17063
|
* );
|
|
17883
17064
|
* ```
|
|
@@ -17907,7 +17088,7 @@ declare function supportsInterfaceContract(tokenAddress: Address, interfaceId: A
|
|
|
17907
17088
|
*
|
|
17908
17089
|
* @example
|
|
17909
17090
|
* ```ts
|
|
17910
|
-
* const isConfidential = await
|
|
17091
|
+
* const isConfidential = await provider.readContract(
|
|
17911
17092
|
* isConfidentialTokenContract("0xTokenAddress"),
|
|
17912
17093
|
* );
|
|
17913
17094
|
* ```
|
|
@@ -17933,11 +17114,17 @@ declare function isConfidentialTokenContract(tokenAddress: Address): {
|
|
|
17933
17114
|
readonly args: readonly [`0x${string}`];
|
|
17934
17115
|
};
|
|
17935
17116
|
/**
|
|
17936
|
-
* Returns contract config to check if a token implements IERC7984ERC20Wrapper (confidential wrapper)
|
|
17117
|
+
* Returns contract config to check if a token implements IERC7984ERC20Wrapper (confidential wrapper)
|
|
17118
|
+
* using the **current deployed baseline** interface ID
|
|
17119
|
+
* ({@link ERC7984_WRAPPER_INTERFACE_ID_LEGACY}, `0xd04584ba`).
|
|
17120
|
+
*
|
|
17121
|
+
* Note: During the transition period, calling this alone is insufficient. Upgraded wrappers
|
|
17122
|
+
* respond only to {@link ERC7984_WRAPPER_INTERFACE_ID}. Prefer higher-level APIs
|
|
17123
|
+
* (`ReadonlyToken.isWrapper()`, `isWrapperQueryOptions()`) which check both interface IDs.
|
|
17937
17124
|
*
|
|
17938
17125
|
* @example
|
|
17939
17126
|
* ```ts
|
|
17940
|
-
* const isWrapper = await
|
|
17127
|
+
* const isWrapper = await provider.readContract(
|
|
17941
17128
|
* isConfidentialWrapperContract("0xWrapperAddress"),
|
|
17942
17129
|
* );
|
|
17943
17130
|
* ```
|
|
@@ -18161,7 +17348,7 @@ declare function revokeDelegationContract(aclAddress: Address, delegateAddress:
|
|
|
18161
17348
|
*
|
|
18162
17349
|
* @example
|
|
18163
17350
|
* ```ts
|
|
18164
|
-
* const expiry = await
|
|
17351
|
+
* const expiry = await provider.readContract(
|
|
18165
17352
|
* getDelegationExpiryContract(aclAddress, delegatorAddress, delegateAddress, contractAddress),
|
|
18166
17353
|
* );
|
|
18167
17354
|
* ```
|
|
@@ -18257,7 +17444,7 @@ declare function getDelegationExpiryContract(aclAddress: Address, delegatorAddre
|
|
|
18257
17444
|
*
|
|
18258
17445
|
* @example
|
|
18259
17446
|
* ```ts
|
|
18260
|
-
* const isDelegated = await
|
|
17447
|
+
* const isDelegated = await provider.readContract(
|
|
18261
17448
|
* isHandleDelegatedContract(aclAddress, delegatorAddress, delegateAddress, contractAddress, handle),
|
|
18262
17449
|
* );
|
|
18263
17450
|
* ```
|
|
@@ -19763,198 +18950,6 @@ declare class DecryptCache {
|
|
|
19763
18950
|
clearAll(): Promise<void>;
|
|
19764
18951
|
}
|
|
19765
18952
|
//#endregion
|
|
19766
|
-
//#region src/events/sdk-events.d.ts
|
|
19767
|
-
/**
|
|
19768
|
-
* All SDK event keys, accessible as `ZamaSDKEvents.EncryptStart` etc.
|
|
19769
|
-
*/
|
|
19770
|
-
declare const ZamaSDKEvents: {
|
|
19771
|
-
readonly CredentialsLoading: "credentials:loading";
|
|
19772
|
-
readonly CredentialsCached: "credentials:cached";
|
|
19773
|
-
readonly CredentialsExpired: "credentials:expired";
|
|
19774
|
-
readonly CredentialsCreating: "credentials:creating";
|
|
19775
|
-
readonly CredentialsCreated: "credentials:created";
|
|
19776
|
-
readonly CredentialsRevoked: "credentials:revoked";
|
|
19777
|
-
readonly CredentialsPersistFailed: "credentials:persist_failed";
|
|
19778
|
-
readonly CredentialsAllowed: "credentials:allowed";
|
|
19779
|
-
readonly CredentialsCorrupted: "credentials:corrupted";
|
|
19780
|
-
readonly SessionExpired: "session:expired";
|
|
19781
|
-
readonly EncryptStart: "encrypt:start";
|
|
19782
|
-
readonly EncryptEnd: "encrypt:end";
|
|
19783
|
-
readonly EncryptError: "encrypt:error";
|
|
19784
|
-
readonly DecryptStart: "decrypt:start";
|
|
19785
|
-
readonly DecryptEnd: "decrypt:end";
|
|
19786
|
-
readonly DecryptError: "decrypt:error";
|
|
19787
|
-
readonly TransactionError: "transaction:error";
|
|
19788
|
-
readonly ShieldSubmitted: "shield:submitted";
|
|
19789
|
-
readonly TransferSubmitted: "transfer:submitted";
|
|
19790
|
-
readonly TransferFromSubmitted: "transferFrom:submitted";
|
|
19791
|
-
readonly ApproveSubmitted: "approve:submitted";
|
|
19792
|
-
readonly ApproveUnderlyingSubmitted: "approveUnderlying:submitted";
|
|
19793
|
-
readonly UnwrapSubmitted: "unwrap:submitted";
|
|
19794
|
-
readonly FinalizeUnwrapSubmitted: "finalizeUnwrap:submitted";
|
|
19795
|
-
readonly DelegationSubmitted: "delegation:submitted";
|
|
19796
|
-
readonly RevokeDelegationSubmitted: "revokeDelegation:submitted";
|
|
19797
|
-
readonly UnshieldPhase1Submitted: "unshield:phase1_submitted";
|
|
19798
|
-
readonly UnshieldPhase2Started: "unshield:phase2_started";
|
|
19799
|
-
readonly UnshieldPhase2Submitted: "unshield:phase2_submitted";
|
|
19800
|
-
};
|
|
19801
|
-
/** Union of all SDK event type strings. */
|
|
19802
|
-
type ZamaSDKEventType = (typeof ZamaSDKEvents)[keyof typeof ZamaSDKEvents];
|
|
19803
|
-
interface BaseEvent {
|
|
19804
|
-
tokenAddress?: Address;
|
|
19805
|
-
timestamp: number;
|
|
19806
|
-
/** Shared identifier linking related events in multi-phase operations (e.g. unshield). */
|
|
19807
|
-
operationId?: string;
|
|
19808
|
-
}
|
|
19809
|
-
interface CredentialsLoadingEvent extends BaseEvent {
|
|
19810
|
-
type: typeof ZamaSDKEvents.CredentialsLoading;
|
|
19811
|
-
/** Contract addresses being requested. */
|
|
19812
|
-
contractAddresses?: Address[];
|
|
19813
|
-
}
|
|
19814
|
-
interface CredentialsCachedEvent extends BaseEvent {
|
|
19815
|
-
type: typeof ZamaSDKEvents.CredentialsCached;
|
|
19816
|
-
/** Contract addresses covered by the cached credentials. */
|
|
19817
|
-
contractAddresses?: Address[];
|
|
19818
|
-
}
|
|
19819
|
-
interface CredentialsExpiredEvent extends BaseEvent {
|
|
19820
|
-
type: typeof ZamaSDKEvents.CredentialsExpired;
|
|
19821
|
-
/** Contract addresses that need re-authorization. */
|
|
19822
|
-
contractAddresses?: Address[];
|
|
19823
|
-
}
|
|
19824
|
-
interface CredentialsCreatingEvent extends BaseEvent {
|
|
19825
|
-
type: typeof ZamaSDKEvents.CredentialsCreating;
|
|
19826
|
-
/** Contract addresses being authorized. */
|
|
19827
|
-
contractAddresses?: Address[];
|
|
19828
|
-
}
|
|
19829
|
-
interface CredentialsCreatedEvent extends BaseEvent {
|
|
19830
|
-
type: typeof ZamaSDKEvents.CredentialsCreated;
|
|
19831
|
-
/** Contract addresses covered by the new credentials. */
|
|
19832
|
-
contractAddresses?: Address[];
|
|
19833
|
-
}
|
|
19834
|
-
interface CredentialsRevokedEvent extends BaseEvent {
|
|
19835
|
-
type: typeof ZamaSDKEvents.CredentialsRevoked;
|
|
19836
|
-
contractAddresses?: Address[];
|
|
19837
|
-
}
|
|
19838
|
-
interface CredentialsPersistFailedEvent extends BaseEvent {
|
|
19839
|
-
type: typeof ZamaSDKEvents.CredentialsPersistFailed;
|
|
19840
|
-
/** The error that caused the persist failure. */
|
|
19841
|
-
error: Error;
|
|
19842
|
-
}
|
|
19843
|
-
interface CredentialsAllowedEvent extends BaseEvent {
|
|
19844
|
-
type: typeof ZamaSDKEvents.CredentialsAllowed;
|
|
19845
|
-
/** Contract addresses covered by the authorized credentials. */
|
|
19846
|
-
contractAddresses?: Address[];
|
|
19847
|
-
}
|
|
19848
|
-
interface CredentialsCorruptedEvent extends BaseEvent {
|
|
19849
|
-
type: typeof ZamaSDKEvents.CredentialsCorrupted;
|
|
19850
|
-
/** The error that revealed storage corruption. */
|
|
19851
|
-
error: Error;
|
|
19852
|
-
}
|
|
19853
|
-
interface SessionExpiredEvent extends BaseEvent {
|
|
19854
|
-
type: typeof ZamaSDKEvents.SessionExpired;
|
|
19855
|
-
/** Why the session expired. Currently always `"ttl"`, extensible for future inactivity timeout. */
|
|
19856
|
-
reason: "ttl";
|
|
19857
|
-
}
|
|
19858
|
-
interface EncryptStartEvent extends BaseEvent {
|
|
19859
|
-
type: typeof ZamaSDKEvents.EncryptStart;
|
|
19860
|
-
}
|
|
19861
|
-
interface EncryptEndEvent extends BaseEvent {
|
|
19862
|
-
type: typeof ZamaSDKEvents.EncryptEnd;
|
|
19863
|
-
durationMs: number;
|
|
19864
|
-
}
|
|
19865
|
-
interface EncryptErrorEvent extends BaseEvent {
|
|
19866
|
-
type: typeof ZamaSDKEvents.EncryptError;
|
|
19867
|
-
/** The error that caused the encryption to fail. */
|
|
19868
|
-
error: Error;
|
|
19869
|
-
durationMs: number;
|
|
19870
|
-
}
|
|
19871
|
-
interface DecryptStartEvent extends BaseEvent {
|
|
19872
|
-
type: typeof ZamaSDKEvents.DecryptStart;
|
|
19873
|
-
/** Handles being decrypted — correlate with matching DecryptEnd/DecryptError. */
|
|
19874
|
-
handles: Handle[];
|
|
19875
|
-
}
|
|
19876
|
-
interface DecryptEndEvent extends BaseEvent {
|
|
19877
|
-
type: typeof ZamaSDKEvents.DecryptEnd;
|
|
19878
|
-
durationMs: number;
|
|
19879
|
-
/** Handles that were decrypted. */
|
|
19880
|
-
handles: Handle[];
|
|
19881
|
-
/** Decrypted values keyed by handle — use this to correlate events to specific handles. */
|
|
19882
|
-
result: Record<Handle, ClearValueType>;
|
|
19883
|
-
}
|
|
19884
|
-
interface DecryptErrorEvent extends BaseEvent {
|
|
19885
|
-
type: typeof ZamaSDKEvents.DecryptError;
|
|
19886
|
-
/** The error that caused the decryption to fail. */
|
|
19887
|
-
error: Error;
|
|
19888
|
-
durationMs: number;
|
|
19889
|
-
/** Handles that were being decrypted when the error occurred. */
|
|
19890
|
-
handles: Handle[];
|
|
19891
|
-
}
|
|
19892
|
-
interface TransactionErrorEvent extends BaseEvent {
|
|
19893
|
-
type: typeof ZamaSDKEvents.TransactionError;
|
|
19894
|
-
/** Which write operation failed. */
|
|
19895
|
-
operation: string;
|
|
19896
|
-
/** The error that caused the transaction to fail. */
|
|
19897
|
-
error: Error;
|
|
19898
|
-
}
|
|
19899
|
-
interface ShieldSubmittedEvent extends BaseEvent {
|
|
19900
|
-
type: typeof ZamaSDKEvents.ShieldSubmitted;
|
|
19901
|
-
txHash: Hex;
|
|
19902
|
-
}
|
|
19903
|
-
interface TransferSubmittedEvent extends BaseEvent {
|
|
19904
|
-
type: typeof ZamaSDKEvents.TransferSubmitted;
|
|
19905
|
-
txHash: Hex;
|
|
19906
|
-
}
|
|
19907
|
-
interface TransferFromSubmittedEvent extends BaseEvent {
|
|
19908
|
-
type: typeof ZamaSDKEvents.TransferFromSubmitted;
|
|
19909
|
-
txHash: Hex;
|
|
19910
|
-
}
|
|
19911
|
-
interface ApproveSubmittedEvent extends BaseEvent {
|
|
19912
|
-
type: typeof ZamaSDKEvents.ApproveSubmitted;
|
|
19913
|
-
txHash: Hex;
|
|
19914
|
-
}
|
|
19915
|
-
interface ApproveUnderlyingSubmittedEvent extends BaseEvent {
|
|
19916
|
-
type: typeof ZamaSDKEvents.ApproveUnderlyingSubmitted;
|
|
19917
|
-
txHash: Hex;
|
|
19918
|
-
}
|
|
19919
|
-
interface UnwrapSubmittedEvent extends BaseEvent {
|
|
19920
|
-
type: typeof ZamaSDKEvents.UnwrapSubmitted;
|
|
19921
|
-
txHash: Hex;
|
|
19922
|
-
}
|
|
19923
|
-
interface FinalizeUnwrapSubmittedEvent extends BaseEvent {
|
|
19924
|
-
type: typeof ZamaSDKEvents.FinalizeUnwrapSubmitted;
|
|
19925
|
-
txHash: Hex;
|
|
19926
|
-
}
|
|
19927
|
-
interface DelegationSubmittedEvent extends BaseEvent {
|
|
19928
|
-
type: typeof ZamaSDKEvents.DelegationSubmitted;
|
|
19929
|
-
txHash: Hex;
|
|
19930
|
-
}
|
|
19931
|
-
interface RevokeDelegationSubmittedEvent extends BaseEvent {
|
|
19932
|
-
type: typeof ZamaSDKEvents.RevokeDelegationSubmitted;
|
|
19933
|
-
txHash: Hex;
|
|
19934
|
-
}
|
|
19935
|
-
interface UnshieldPhase1SubmittedEvent extends BaseEvent {
|
|
19936
|
-
type: typeof ZamaSDKEvents.UnshieldPhase1Submitted;
|
|
19937
|
-
txHash: Hex;
|
|
19938
|
-
}
|
|
19939
|
-
interface UnshieldPhase2StartedEvent extends BaseEvent {
|
|
19940
|
-
type: typeof ZamaSDKEvents.UnshieldPhase2Started;
|
|
19941
|
-
}
|
|
19942
|
-
interface UnshieldPhase2SubmittedEvent extends BaseEvent {
|
|
19943
|
-
type: typeof ZamaSDKEvents.UnshieldPhase2Submitted;
|
|
19944
|
-
txHash: Hex;
|
|
19945
|
-
}
|
|
19946
|
-
/**
|
|
19947
|
-
* Discriminated union of all SDK events.
|
|
19948
|
-
*
|
|
19949
|
-
* Decrypt events carry handles and decrypted clear-text values so event
|
|
19950
|
-
* subscribers can correlate and bind them in UI layers. Events never carry
|
|
19951
|
-
* private keys, session signatures, or ZK proofs.
|
|
19952
|
-
*/
|
|
19953
|
-
type ZamaSDKEvent = CredentialsLoadingEvent | CredentialsCachedEvent | CredentialsExpiredEvent | CredentialsCreatingEvent | CredentialsCreatedEvent | CredentialsRevokedEvent | CredentialsPersistFailedEvent | CredentialsAllowedEvent | CredentialsCorruptedEvent | SessionExpiredEvent | EncryptStartEvent | EncryptEndEvent | EncryptErrorEvent | DecryptStartEvent | DecryptEndEvent | DecryptErrorEvent | TransactionErrorEvent | ShieldSubmittedEvent | TransferSubmittedEvent | TransferFromSubmittedEvent | ApproveSubmittedEvent | ApproveUnderlyingSubmittedEvent | UnwrapSubmittedEvent | FinalizeUnwrapSubmittedEvent | DelegationSubmittedEvent | RevokeDelegationSubmittedEvent | UnshieldPhase1SubmittedEvent | UnshieldPhase2StartedEvent | UnshieldPhase2SubmittedEvent;
|
|
19954
|
-
type ZamaSDKEventListener = (event: ZamaSDKEvent) => void;
|
|
19955
|
-
/** Distributive Omit that preserves the discriminated union. */
|
|
19956
|
-
type ZamaSDKEventInput = ZamaSDKEvent extends infer E ? E extends ZamaSDKEvent ? Omit<E, "timestamp" | "tokenAddress"> : never : never;
|
|
19957
|
-
//#endregion
|
|
19958
18953
|
//#region src/credentials/credential-crypto.d.ts
|
|
19959
18954
|
/** Encrypted data format with IV for AES-GCM decryption. */
|
|
19960
18955
|
interface EncryptedData {
|
|
@@ -20182,8 +19177,8 @@ declare class CredentialsManager extends BaseCredentialsManager<StoredCredential
|
|
|
20182
19177
|
isExpired(contractAddress?: Address): Promise<boolean>;
|
|
20183
19178
|
/** Revoke the session signature. Next decrypt requires a fresh wallet signature. */
|
|
20184
19179
|
revoke(...contractAddresses: Address[]): Promise<void>;
|
|
20185
|
-
/** Revoke the session signature for a
|
|
20186
|
-
|
|
19180
|
+
/** Revoke the session signature for a specific wallet identity (address, chainId). */
|
|
19181
|
+
revokeFor(identity: SignerIdentity): Promise<void>;
|
|
20187
19182
|
/** Whether a session signature is currently cached and covers the given contracts. */
|
|
20188
19183
|
isAllowed(contractAddresses: [Address, ...Address[]]): Promise<boolean>;
|
|
20189
19184
|
/** Delete stored credentials (best-effort). */
|
|
@@ -20275,9 +19270,6 @@ declare const zamaQueryKeys: {
|
|
|
20275
19270
|
readonly scope: (scope: number) => readonly ["zama.signerAddress", {
|
|
20276
19271
|
readonly scope: number;
|
|
20277
19272
|
}];
|
|
20278
|
-
readonly token: (tokenAddress: Address) => readonly ["zama.signerAddress", {
|
|
20279
|
-
readonly tokenAddress: `0x${string}`;
|
|
20280
|
-
}];
|
|
20281
19273
|
};
|
|
20282
19274
|
readonly confidentialBalance: {
|
|
20283
19275
|
readonly all: readonly ["zama.confidentialBalance"];
|
|
@@ -20451,7 +19443,8 @@ interface DecryptHandle {
|
|
|
20451
19443
|
handle: Handle;
|
|
20452
19444
|
contractAddress: Address;
|
|
20453
19445
|
}
|
|
20454
|
-
|
|
19446
|
+
/** Alias for {@link UserDecryptResults}. */
|
|
19447
|
+
type DecryptResult = UserDecryptResults;
|
|
20455
19448
|
interface UserDecryptQueryConfig {
|
|
20456
19449
|
handles: DecryptHandle[];
|
|
20457
19450
|
}
|
|
@@ -20498,7 +19491,8 @@ declare const ZamaErrorCode: {
|
|
|
20498
19491
|
readonly DelegationContractIsSelf: "DELEGATION_CONTRACT_IS_SELF"; /** The ACL contract is paused. */
|
|
20499
19492
|
readonly AclPaused: "ACL_PAUSED"; /** Expiration date is too soon (must be at least 1 hour in the future). */
|
|
20500
19493
|
readonly DelegationExpirationTooSoon: "DELEGATION_EXPIRATION_TOO_SOON"; /** Delegation exists on-chain but hasn't propagated to the gateway yet. */
|
|
20501
|
-
readonly DelegationNotPropagated: "DELEGATION_NOT_PROPAGATED";
|
|
19494
|
+
readonly DelegationNotPropagated: "DELEGATION_NOT_PROPAGATED"; /** Signer and provider are connected to different chains. */
|
|
19495
|
+
readonly ChainMismatch: "CHAIN_MISMATCH";
|
|
20502
19496
|
};
|
|
20503
19497
|
/** Union of all {@link ZamaErrorCode} string values. */
|
|
20504
19498
|
type ZamaErrorCode = (typeof ZamaErrorCode)[keyof typeof ZamaErrorCode];
|
|
@@ -20586,6 +19580,43 @@ declare class ConfigurationError extends ZamaError {
|
|
|
20586
19580
|
constructor(message: string, options?: ErrorOptions);
|
|
20587
19581
|
}
|
|
20588
19582
|
//#endregion
|
|
19583
|
+
//#region src/errors/chain.d.ts
|
|
19584
|
+
/**
|
|
19585
|
+
* Thrown when the signer and provider are connected to different chains at the
|
|
19586
|
+
* start of a write operation.
|
|
19587
|
+
*
|
|
19588
|
+
* Every write method calls {@link ZamaSDK.requireChainAlignment} as a pre-flight
|
|
19589
|
+
* check. If `signer.getChainId()` and `provider.getChainId()` return different
|
|
19590
|
+
* values, this error is thrown before any RPC mutation is attempted.
|
|
19591
|
+
*
|
|
19592
|
+
* @example
|
|
19593
|
+
* ```ts
|
|
19594
|
+
* try {
|
|
19595
|
+
* await token.shield(1000n);
|
|
19596
|
+
* } catch (e) {
|
|
19597
|
+
* if (e instanceof ChainMismatchError) {
|
|
19598
|
+
* console.error(
|
|
19599
|
+
* `Signer is on chain ${e.signerChainId} but provider is on chain ${e.providerChainId}`,
|
|
19600
|
+
* );
|
|
19601
|
+
* }
|
|
19602
|
+
* }
|
|
19603
|
+
* ```
|
|
19604
|
+
*/
|
|
19605
|
+
declare class ChainMismatchError extends ZamaError {
|
|
19606
|
+
readonly operation: string;
|
|
19607
|
+
readonly signerChainId: number;
|
|
19608
|
+
readonly providerChainId: number;
|
|
19609
|
+
constructor({
|
|
19610
|
+
operation,
|
|
19611
|
+
signerChainId,
|
|
19612
|
+
providerChainId
|
|
19613
|
+
}: {
|
|
19614
|
+
operation: string;
|
|
19615
|
+
signerChainId: number;
|
|
19616
|
+
providerChainId: number;
|
|
19617
|
+
}, options?: ErrorOptions);
|
|
19618
|
+
}
|
|
19619
|
+
//#endregion
|
|
20589
19620
|
//#region src/errors/delegation.d.ts
|
|
20590
19621
|
/** Delegation cannot target self (delegate === msg.sender). */
|
|
20591
19622
|
declare class DelegationSelfNotAllowedError extends ZamaError {
|
|
@@ -20703,8 +19734,15 @@ interface BatchDecryptAsOptions {
|
|
|
20703
19734
|
delegatorAddress: Address;
|
|
20704
19735
|
/** Pre-fetched encrypted handles. When omitted, handles are fetched from the chain. */
|
|
20705
19736
|
handles?: Handle[];
|
|
20706
|
-
/**
|
|
20707
|
-
|
|
19737
|
+
/**
|
|
19738
|
+
* The account whose on-chain balance to read. Defaults to the delegator
|
|
19739
|
+
* address, which is the common case (the delegator grants permission to
|
|
19740
|
+
* decrypt their own balance). Only set this when the account differs
|
|
19741
|
+
* from the delegator.
|
|
19742
|
+
*
|
|
19743
|
+
* Matches the `account` parameter of `confidentialBalanceOf(account)` on-chain.
|
|
19744
|
+
*/
|
|
19745
|
+
accountAddress?: Address;
|
|
20708
19746
|
/** Maximum number of concurrent decrypt calls. Default: Infinity. */
|
|
20709
19747
|
maxConcurrency?: number;
|
|
20710
19748
|
/** Called when decryption fails for a single token. Return a fallback bigint. */
|
|
@@ -20735,30 +19773,28 @@ declare class ReadonlyToken {
|
|
|
20735
19773
|
* Decrypt and return the plaintext balance for the given owner.
|
|
20736
19774
|
* Acquires FHE credentials via a wallet signature if none are cached.
|
|
20737
19775
|
*
|
|
20738
|
-
* @param owner -
|
|
19776
|
+
* @param owner - Balance owner address.
|
|
20739
19777
|
* @returns The decrypted plaintext balance as a bigint.
|
|
20740
19778
|
* @throws {@link DecryptionFailedError} if FHE decryption fails.
|
|
20741
19779
|
*
|
|
20742
19780
|
* @example
|
|
20743
19781
|
* ```ts
|
|
20744
|
-
* const balance = await token.balanceOf();
|
|
20745
|
-
* // or for another address:
|
|
20746
19782
|
* const balance = await token.balanceOf("0xOwner");
|
|
20747
19783
|
* ```
|
|
20748
19784
|
*/
|
|
20749
|
-
balanceOf(owner
|
|
19785
|
+
balanceOf(owner: Address): Promise<bigint>;
|
|
20750
19786
|
/**
|
|
20751
19787
|
* Return the raw encrypted balance handle without decrypting.
|
|
20752
19788
|
*
|
|
20753
|
-
* @param owner -
|
|
19789
|
+
* @param owner - Balance owner address.
|
|
20754
19790
|
* @returns The encrypted balance handle as a hex string.
|
|
20755
19791
|
*
|
|
20756
19792
|
* @example
|
|
20757
19793
|
* ```ts
|
|
20758
|
-
* const handle = await token.confidentialBalanceOf();
|
|
19794
|
+
* const handle = await token.confidentialBalanceOf("0xOwner");
|
|
20759
19795
|
* ```
|
|
20760
19796
|
*/
|
|
20761
|
-
confidentialBalanceOf(owner
|
|
19797
|
+
confidentialBalanceOf(owner: Address): Promise<Handle>;
|
|
20762
19798
|
/**
|
|
20763
19799
|
* ERC-165 check for {@link ERC7984_INTERFACE_ID} support.
|
|
20764
19800
|
*
|
|
@@ -20766,7 +19802,11 @@ declare class ReadonlyToken {
|
|
|
20766
19802
|
*/
|
|
20767
19803
|
isConfidential(): Promise<boolean>;
|
|
20768
19804
|
/**
|
|
20769
|
-
* ERC-165 check for
|
|
19805
|
+
* ERC-165 check for IERC7984ERC20Wrapper support.
|
|
19806
|
+
*
|
|
19807
|
+
* During the transition period, checks both {@link ERC7984_WRAPPER_INTERFACE_ID_LEGACY}
|
|
19808
|
+
* (`0xd04584ba`) and {@link ERC7984_WRAPPER_INTERFACE_ID} (`0x1f1c62b2`) in parallel,
|
|
19809
|
+
* returning `true` if either matches.
|
|
20770
19810
|
*
|
|
20771
19811
|
* @returns `true` if the contract implements the ERC-7984 wrapper interface.
|
|
20772
19812
|
*/
|
|
@@ -20781,15 +19821,15 @@ declare class ReadonlyToken {
|
|
|
20781
19821
|
* whole batch — caller decides how to surface them.
|
|
20782
19822
|
*
|
|
20783
19823
|
* @param tokens - Array of {@link ReadonlyToken} instances bound to the same SDK.
|
|
20784
|
-
* @param owner -
|
|
19824
|
+
* @param owner - Balance owner address.
|
|
20785
19825
|
* @returns `{ results, errors }` partitioning the per-token outcomes.
|
|
20786
19826
|
*
|
|
20787
19827
|
* @example
|
|
20788
19828
|
* ```ts
|
|
20789
|
-
* const { results, errors } = await ReadonlyToken.batchBalancesOf(tokens);
|
|
19829
|
+
* const { results, errors } = await ReadonlyToken.batchBalancesOf(tokens, owner);
|
|
20790
19830
|
* ```
|
|
20791
19831
|
*/
|
|
20792
|
-
static batchBalancesOf(tokens: ReadonlyToken[], owner
|
|
19832
|
+
static batchBalancesOf(tokens: ReadonlyToken[], owner: Address): Promise<BatchBalancesResult>;
|
|
20793
19833
|
/**
|
|
20794
19834
|
* Batch decrypt confidential balances as a delegate across multiple tokens.
|
|
20795
19835
|
* Mirrors {@link batchBalancesOf} but uses delegated credentials.
|
|
@@ -20827,10 +19867,10 @@ declare class ReadonlyToken {
|
|
|
20827
19867
|
* Read the ERC-20 allowance of the underlying token for a given wrapper.
|
|
20828
19868
|
*
|
|
20829
19869
|
* @param wrapper - The wrapper contract address to check allowance for.
|
|
20830
|
-
* @param owner -
|
|
19870
|
+
* @param owner - The owner address whose allowance to read.
|
|
20831
19871
|
* @returns The current allowance as a bigint.
|
|
20832
19872
|
*/
|
|
20833
|
-
allowance(wrapper: Address, owner
|
|
19873
|
+
allowance(wrapper: Address, owner: Address): Promise<bigint>;
|
|
20834
19874
|
/**
|
|
20835
19875
|
* Read the token name from the contract.
|
|
20836
19876
|
*
|
|
@@ -20860,7 +19900,7 @@ declare class ReadonlyToken {
|
|
|
20860
19900
|
* ```ts
|
|
20861
19901
|
* await token.allow();
|
|
20862
19902
|
* // Credentials are now cached — subsequent decrypts won't prompt
|
|
20863
|
-
* const balance = await token.balanceOf();
|
|
19903
|
+
* const balance = await token.balanceOf(owner);
|
|
20864
19904
|
* ```
|
|
20865
19905
|
*/
|
|
20866
19906
|
allow(): Promise<void>;
|
|
@@ -20923,14 +19963,19 @@ declare class ReadonlyToken {
|
|
|
20923
19963
|
protected readConfidentialBalanceOf(owner: Address): Promise<Handle>;
|
|
20924
19964
|
/**
|
|
20925
19965
|
* Decrypt the balance of a delegator using delegated decryption credentials.
|
|
20926
|
-
* The connected signer acts as the
|
|
19966
|
+
* The connected signer acts as the delegatee who has been granted permission
|
|
20927
19967
|
* by the delegator to decrypt their balance.
|
|
20928
19968
|
*
|
|
20929
|
-
* Decrypted values are cached in storage keyed by
|
|
19969
|
+
* Decrypted values are cached in storage keyed by
|
|
19970
|
+
* `(account, token, handle)`. Because every on-chain balance change
|
|
19971
|
+
* produces a new encrypted handle, stale cache entries are never served.
|
|
20930
19972
|
* Cache write failures are silently ignored — they do not affect the returned value.
|
|
20931
19973
|
*
|
|
20932
19974
|
* @param delegatorAddress - The address of the account that delegated decryption rights.
|
|
20933
|
-
* @param
|
|
19975
|
+
* @param account - The account whose on-chain balance to read (matches
|
|
19976
|
+
* `confidentialBalanceOf(account)` on-chain). Defaults to the delegator
|
|
19977
|
+
* address (the common case where the delegator grants permission to
|
|
19978
|
+
* decrypt their own balance).
|
|
20934
19979
|
* @returns The decrypted plaintext balance as a bigint.
|
|
20935
19980
|
* @throws {@link DelegationNotFoundError} if no active delegation exists from the delegator to the connected signer.
|
|
20936
19981
|
* @throws {@link DelegationExpiredError} if the delegation has expired.
|
|
@@ -20945,10 +19990,10 @@ declare class ReadonlyToken {
|
|
|
20945
19990
|
*/
|
|
20946
19991
|
decryptBalanceAs({
|
|
20947
19992
|
delegatorAddress,
|
|
20948
|
-
|
|
19993
|
+
accountAddress
|
|
20949
19994
|
}: {
|
|
20950
19995
|
delegatorAddress: Address;
|
|
20951
|
-
|
|
19996
|
+
accountAddress?: Address;
|
|
20952
19997
|
}): Promise<bigint>;
|
|
20953
19998
|
/**
|
|
20954
19999
|
* Emit a decrypt-related event scoped to this token. Events are routed
|
|
@@ -20986,6 +20031,7 @@ declare class Token extends ReadonlyToken {
|
|
|
20986
20031
|
* @param amount - Plaintext amount to transfer (encrypted automatically via FHE).
|
|
20987
20032
|
* @param options - Optional: `skipBalanceCheck` (default `false`).
|
|
20988
20033
|
* @returns The transaction hash and mined receipt.
|
|
20034
|
+
* @throws {@link ChainMismatchError} if signer and provider are on different chains.
|
|
20989
20035
|
* @throws {@link InsufficientConfidentialBalanceError} if the confidential balance is less than `amount`.
|
|
20990
20036
|
* @throws {@link BalanceCheckUnavailableError} if balance validation is required but decryption is not possible (no cached credentials).
|
|
20991
20037
|
* @throws {@link EncryptionFailedError} if FHE encryption fails.
|
|
@@ -21007,6 +20053,7 @@ declare class Token extends ReadonlyToken {
|
|
|
21007
20053
|
* @param to - Recipient address.
|
|
21008
20054
|
* @param amount - Plaintext amount to transfer (encrypted automatically via FHE).
|
|
21009
20055
|
* @returns The transaction hash and mined receipt.
|
|
20056
|
+
* @throws {@link ChainMismatchError} if signer and provider are on different chains.
|
|
21010
20057
|
* @throws {@link EncryptionFailedError} if FHE encryption fails.
|
|
21011
20058
|
* @throws {@link TransactionRevertedError} if the on-chain transfer reverts.
|
|
21012
20059
|
*
|
|
@@ -21023,6 +20070,7 @@ declare class Token extends ReadonlyToken {
|
|
|
21023
20070
|
* @param spender - The address to approve as an operator.
|
|
21024
20071
|
* @param until - Optional Unix timestamp for approval expiry. Defaults to now + 1 hour.
|
|
21025
20072
|
* @returns The transaction hash and mined receipt.
|
|
20073
|
+
* @throws {@link ChainMismatchError} if signer and provider are on different chains.
|
|
21026
20074
|
* @throws {@link ApprovalFailedError} if the approval transaction fails.
|
|
21027
20075
|
*
|
|
21028
20076
|
* @example
|
|
@@ -21035,19 +20083,17 @@ declare class Token extends ReadonlyToken {
|
|
|
21035
20083
|
* Check if a spender is an approved operator for a given holder.
|
|
21036
20084
|
*
|
|
21037
20085
|
* @param spender - The address to check operator approval for.
|
|
21038
|
-
* @param holder - The token holder address.
|
|
20086
|
+
* @param holder - The token holder address.
|
|
21039
20087
|
* @returns `true` if the spender is an approved operator for the holder.
|
|
21040
20088
|
*
|
|
21041
20089
|
* @example
|
|
21042
20090
|
* ```ts
|
|
21043
|
-
* if (await token.isApproved("0xSpender")) {
|
|
21044
|
-
* // spender can call transferFrom on behalf of
|
|
20091
|
+
* if (await token.isApproved("0xSpender", "0xHolder")) {
|
|
20092
|
+
* // spender can call transferFrom on behalf of holder
|
|
21045
20093
|
* }
|
|
21046
|
-
* // or check for a specific holder:
|
|
21047
|
-
* if (await token.isApproved("0xSpender", "0xHolder")) { ... }
|
|
21048
20094
|
* ```
|
|
21049
20095
|
*/
|
|
21050
|
-
isApproved(spender: Address, holder
|
|
20096
|
+
isApproved(spender: Address, holder: Address): Promise<boolean>;
|
|
21051
20097
|
/**
|
|
21052
20098
|
* Shield public ERC-20 tokens into confidential tokens.
|
|
21053
20099
|
* Handles ERC-20 approval automatically based on `approvalStrategy`
|
|
@@ -21059,6 +20105,7 @@ declare class Token extends ReadonlyToken {
|
|
|
21059
20105
|
* @param amount - The plaintext amount to shield.
|
|
21060
20106
|
* @param options - Optional configuration: `approvalStrategy` (`"exact"` | `"max"` | `"skip"`, default `"exact"`).
|
|
21061
20107
|
* @returns The transaction hash and mined receipt.
|
|
20108
|
+
* @throws {@link ChainMismatchError} if signer and provider are on different chains.
|
|
21062
20109
|
* @throws {@link InsufficientERC20BalanceError} if the ERC-20 balance is less than `amount`.
|
|
21063
20110
|
* @throws {@link ApprovalFailedError} if the ERC-20 approval step fails.
|
|
21064
20111
|
* @throws {@link TransactionRevertedError} if the shield transaction reverts.
|
|
@@ -21077,6 +20124,7 @@ declare class Token extends ReadonlyToken {
|
|
|
21077
20124
|
*
|
|
21078
20125
|
* @param amount - The plaintext amount to unwrap (encrypted automatically).
|
|
21079
20126
|
* @returns The transaction hash and mined receipt.
|
|
20127
|
+
* @throws {@link ChainMismatchError} if signer and provider are on different chains.
|
|
21080
20128
|
* @throws {@link EncryptionFailedError} if FHE encryption fails.
|
|
21081
20129
|
* @throws {@link TransactionRevertedError} if the unwrap transaction reverts.
|
|
21082
20130
|
*
|
|
@@ -21092,6 +20140,7 @@ declare class Token extends ReadonlyToken {
|
|
|
21092
20140
|
* Throws if the balance is zero.
|
|
21093
20141
|
*
|
|
21094
20142
|
* @returns The transaction hash and mined receipt.
|
|
20143
|
+
* @throws {@link ChainMismatchError} if signer and provider are on different chains.
|
|
21095
20144
|
* @throws {@link DecryptionFailedError} if the balance is zero.
|
|
21096
20145
|
* @throws {@link TransactionRevertedError} if the unwrap transaction reverts.
|
|
21097
20146
|
*
|
|
@@ -21159,18 +20208,19 @@ declare class Token extends ReadonlyToken {
|
|
|
21159
20208
|
* Complete an unwrap by providing the public decryption proof.
|
|
21160
20209
|
* Call this after an unshield request has been processed on-chain.
|
|
21161
20210
|
*
|
|
21162
|
-
* @param
|
|
20211
|
+
* @param unwrapRequestIdOrAmount - `unwrapRequestId` from upgraded wrappers, or the encrypted amount handle from legacy wrappers.
|
|
21163
20212
|
* @returns The transaction hash and mined receipt.
|
|
20213
|
+
* @throws {@link ChainMismatchError} if signer and provider are on different chains.
|
|
21164
20214
|
* @throws {@link DecryptionFailedError} if public decryption fails.
|
|
21165
20215
|
* @throws {@link TransactionRevertedError} if the finalize transaction reverts.
|
|
21166
20216
|
*
|
|
21167
20217
|
* @example
|
|
21168
20218
|
* ```ts
|
|
21169
20219
|
* const event = findUnwrapRequested(receipt.logs);
|
|
21170
|
-
* const txHash = await token.finalizeUnwrap(event.unwrapRequestId);
|
|
20220
|
+
* const txHash = await token.finalizeUnwrap(event.unwrapRequestId ?? event.encryptedAmount);
|
|
21171
20221
|
* ```
|
|
21172
20222
|
*/
|
|
21173
|
-
finalizeUnwrap(
|
|
20223
|
+
finalizeUnwrap(unwrapRequestIdOrAmount: Handle): Promise<TransactionResult>;
|
|
21174
20224
|
/**
|
|
21175
20225
|
* Approve this token contract to spend the underlying ERC-20.
|
|
21176
20226
|
* Defaults to max uint256. Resets to zero first if there's an existing
|
|
@@ -21178,6 +20228,7 @@ declare class Token extends ReadonlyToken {
|
|
|
21178
20228
|
*
|
|
21179
20229
|
* @param amount - Optional approval amount. Defaults to max uint256.
|
|
21180
20230
|
* @returns The transaction hash and mined receipt.
|
|
20231
|
+
* @throws {@link ChainMismatchError} if signer and provider are on different chains.
|
|
21181
20232
|
* @throws {@link ApprovalFailedError} if the approval transaction fails.
|
|
21182
20233
|
*
|
|
21183
20234
|
* @example
|
|
@@ -21201,6 +20252,7 @@ declare class Token extends ReadonlyToken {
|
|
|
21201
20252
|
* @param delegateAddress - Address to delegate decryption rights to.
|
|
21202
20253
|
* @param expirationDate - Optional expiration date (defaults to permanent delegation via `uint64.max`).
|
|
21203
20254
|
* @returns The transaction hash and mined receipt.
|
|
20255
|
+
* @throws {@link ChainMismatchError} if signer and provider are on different chains.
|
|
21204
20256
|
* @throws {@link TransactionRevertedError} if the delegation transaction reverts.
|
|
21205
20257
|
*/
|
|
21206
20258
|
delegateDecryption({
|
|
@@ -21216,6 +20268,7 @@ declare class Token extends ReadonlyToken {
|
|
|
21216
20268
|
*
|
|
21217
20269
|
* @param delegateAddress - Address to revoke delegation from.
|
|
21218
20270
|
* @returns The transaction hash and mined receipt.
|
|
20271
|
+
* @throws {@link ChainMismatchError} if signer and provider are on different chains.
|
|
21219
20272
|
* @throws {@link TransactionRevertedError} if the revocation transaction reverts.
|
|
21220
20273
|
*/
|
|
21221
20274
|
revokeDelegation({
|
|
@@ -21266,8 +20319,8 @@ declare class Token extends ReadonlyToken {
|
|
|
21266
20319
|
declare const DefaultRegistryAddresses: Record<number, Address>;
|
|
21267
20320
|
/** Configuration for {@link WrappersRegistry}. */
|
|
21268
20321
|
interface WrappersRegistryConfig {
|
|
21269
|
-
/**
|
|
21270
|
-
|
|
20322
|
+
/** Read-only chain provider used for every registry lookup. */
|
|
20323
|
+
provider: GenericProvider;
|
|
21271
20324
|
/**
|
|
21272
20325
|
* Per-chain registry address overrides, merged on top of
|
|
21273
20326
|
* {@link DefaultRegistryAddresses}. Use this to supply a registry
|
|
@@ -21276,7 +20329,7 @@ interface WrappersRegistryConfig {
|
|
|
21276
20329
|
* @example
|
|
21277
20330
|
* ```ts
|
|
21278
20331
|
* new WrappersRegistry({
|
|
21279
|
-
*
|
|
20332
|
+
* provider,
|
|
21280
20333
|
* registryAddresses: { [31337]: "0xYourHardhatRegistry" },
|
|
21281
20334
|
* });
|
|
21282
20335
|
* ```
|
|
@@ -21304,14 +20357,14 @@ interface ListPairsOptions {
|
|
|
21304
20357
|
/**
|
|
21305
20358
|
* High-level interface for the on-chain token wrappers registry.
|
|
21306
20359
|
*
|
|
21307
|
-
* Uses the
|
|
21308
|
-
* address for the current chain and exposes typed read helpers for
|
|
21309
|
-
* every registry query. Results are cached in memory with a
|
|
21310
|
-
*
|
|
20360
|
+
* Uses the configured {@link GenericProvider} to resolve the correct registry
|
|
20361
|
+
* contract address for the current chain and exposes typed read helpers for
|
|
20362
|
+
* every registry query. Results are cached in memory with a configurable TTL
|
|
20363
|
+
* (default 24 hours).
|
|
21311
20364
|
*
|
|
21312
20365
|
* @example
|
|
21313
20366
|
* ```ts
|
|
21314
|
-
* const registry = new WrappersRegistry({
|
|
20367
|
+
* const registry = new WrappersRegistry({ provider });
|
|
21315
20368
|
*
|
|
21316
20369
|
* // Paginated listing
|
|
21317
20370
|
* const page1 = await registry.listPairs({ page: 1, pageSize: 20 });
|
|
@@ -21326,7 +20379,7 @@ interface ListPairsOptions {
|
|
|
21326
20379
|
*/
|
|
21327
20380
|
declare class WrappersRegistry {
|
|
21328
20381
|
#private;
|
|
21329
|
-
readonly
|
|
20382
|
+
readonly provider: GenericProvider;
|
|
21330
20383
|
constructor(config: WrappersRegistryConfig);
|
|
21331
20384
|
/**
|
|
21332
20385
|
* Synchronous lookup of the registry address for a given chain ID.
|
|
@@ -21472,9 +20525,21 @@ declare class WrappersRegistry {
|
|
|
21472
20525
|
//#region src/zama-sdk.d.ts
|
|
21473
20526
|
/** Configuration for {@link ZamaSDK}. */
|
|
21474
20527
|
interface ZamaSDKConfig {
|
|
20528
|
+
/** FHE chain configurations. Registry addresses are extracted from each chain's `registryAddress`. */
|
|
20529
|
+
chains?: readonly FheChain[];
|
|
21475
20530
|
/** FHE relayer backend (`RelayerWeb` for browser, `RelayerNode` for server). */
|
|
21476
|
-
relayer:
|
|
21477
|
-
/**
|
|
20531
|
+
relayer: RelayerDispatcher;
|
|
20532
|
+
/**
|
|
20533
|
+
* Read-only chain provider (`ViemProvider`, `EthersProvider`, `WagmiProvider`,
|
|
20534
|
+
* or custom {@link GenericProvider}). Used for every public chain read the
|
|
20535
|
+
* SDK issues.
|
|
20536
|
+
*/
|
|
20537
|
+
provider: GenericProvider;
|
|
20538
|
+
/**
|
|
20539
|
+
* Wallet signer (`ViemSigner`, `EthersSigner`, `WagmiSigner`, or custom
|
|
20540
|
+
* {@link GenericSigner}). Required for writes, EIP-712 signatures, and
|
|
20541
|
+
* wallet-lifecycle subscriptions.
|
|
20542
|
+
*/
|
|
21478
20543
|
signer: GenericSigner;
|
|
21479
20544
|
/** Credential storage backend (`IndexedDBStorage` for browser, `MemoryStorage` for tests). */
|
|
21480
20545
|
storage: GenericStorage;
|
|
@@ -21502,18 +20567,16 @@ interface ZamaSDKConfig {
|
|
|
21502
20567
|
sessionTTL?: number | "infinite";
|
|
21503
20568
|
/** Optional structured event listener for debugging and telemetry. Never receives sensitive data. */
|
|
21504
20569
|
onEvent?: ZamaSDKEventListener;
|
|
21505
|
-
/**
|
|
21506
|
-
* Per-chain wrappers registry address overrides, merged on top of built-in defaults.
|
|
21507
|
-
* Use this for custom or local chains (e.g. Hardhat) where no default registry exists.
|
|
21508
|
-
*/
|
|
21509
|
-
registryAddresses?: Record<number, Address>;
|
|
21510
20570
|
/**
|
|
21511
20571
|
* How long cached registry results remain valid, in seconds.
|
|
21512
20572
|
* Default: `86400` (24 hours).
|
|
21513
20573
|
*/
|
|
21514
20574
|
registryTTL?: number;
|
|
21515
|
-
/**
|
|
21516
|
-
|
|
20575
|
+
/**
|
|
20576
|
+
* Per-chain wrappers registry address overrides, merged on top of chain definitions.
|
|
20577
|
+
* Use for custom or local chains (e.g. Hardhat) where no default registry exists.
|
|
20578
|
+
*/
|
|
20579
|
+
registryAddresses?: Record<number, Address>;
|
|
21517
20580
|
}
|
|
21518
20581
|
/**
|
|
21519
20582
|
* ZamaSDK — composes a RelayerSDK with contract abstraction.
|
|
@@ -21521,7 +20584,8 @@ interface ZamaSDKConfig {
|
|
|
21521
20584
|
*/
|
|
21522
20585
|
declare class ZamaSDK {
|
|
21523
20586
|
#private;
|
|
21524
|
-
readonly relayer:
|
|
20587
|
+
readonly relayer: RelayerDispatcher;
|
|
20588
|
+
readonly provider: GenericProvider;
|
|
21525
20589
|
readonly signer: GenericSigner;
|
|
21526
20590
|
readonly storage: GenericStorage;
|
|
21527
20591
|
readonly sessionStorage: GenericStorage;
|
|
@@ -21531,7 +20595,7 @@ declare class ZamaSDK {
|
|
|
21531
20595
|
readonly cache: DecryptCache;
|
|
21532
20596
|
/**
|
|
21533
20597
|
* A {@link WrappersRegistry} instance auto-configured for the current chain.
|
|
21534
|
-
* Uses built-in defaults
|
|
20598
|
+
* Uses built-in defaults from chain configs, and the SDK's `registryTTL` if configured.
|
|
21535
20599
|
*
|
|
21536
20600
|
* @example
|
|
21537
20601
|
* ```ts
|
|
@@ -21541,6 +20605,25 @@ declare class ZamaSDK {
|
|
|
21541
20605
|
*/
|
|
21542
20606
|
readonly registry: WrappersRegistry;
|
|
21543
20607
|
constructor(config: ZamaSDKConfig);
|
|
20608
|
+
/**
|
|
20609
|
+
* Subscribe to wallet identity transitions. The SDK maintains a single
|
|
20610
|
+
* internal subscription to `signer.subscribe` and fans out to listeners
|
|
20611
|
+
* after running core cleanup (credential revocation + cache clear).
|
|
20612
|
+
*
|
|
20613
|
+
* Returns a no-op unsubscribe if the signer cannot emit lifecycle events.
|
|
20614
|
+
*/
|
|
20615
|
+
onIdentityChange(listener: SignerIdentityListener): () => void;
|
|
20616
|
+
/**
|
|
20617
|
+
* Pre-flight chain coherence check for write operations.
|
|
20618
|
+
*
|
|
20619
|
+
* Calls `signer.getChainId()` and `provider.getChainId()` in parallel.
|
|
20620
|
+
* Throws {@link ChainMismatchError} if they differ.
|
|
20621
|
+
*
|
|
20622
|
+
* @param operation - The operation name, included in the error message.
|
|
20623
|
+
* @returns The chain ID shared by both signer and provider.
|
|
20624
|
+
* @throws {@link ChainMismatchError} if signer and provider report different chain IDs.
|
|
20625
|
+
*/
|
|
20626
|
+
requireChainAlignment(operation: string): Promise<number>;
|
|
21544
20627
|
/**
|
|
21545
20628
|
* Create a read-only interface for a confidential token.
|
|
21546
20629
|
* Supports balance queries and authorization without a wrapper address.
|
|
@@ -21572,7 +20655,7 @@ declare class ZamaSDK {
|
|
|
21572
20655
|
*/
|
|
21573
20656
|
emitEvent(input: ZamaSDKEventInput, tokenAddress?: Address): void;
|
|
21574
20657
|
/**
|
|
21575
|
-
* Create a {@link WrappersRegistry} instance bound to this SDK's
|
|
20658
|
+
* Create a {@link WrappersRegistry} instance bound to this SDK's provider.
|
|
21576
20659
|
* On Mainnet and Sepolia the registry address is resolved automatically.
|
|
21577
20660
|
*
|
|
21578
20661
|
* @param registryAddresses - Optional per-chain overrides (e.g. Hardhat).
|
|
@@ -21617,6 +20700,7 @@ declare class ZamaSDK {
|
|
|
21617
20700
|
*
|
|
21618
20701
|
* @param handles - Handles to decrypt, each paired with its contract address.
|
|
21619
20702
|
* @returns A record mapping each handle to its decrypted clear-text value.
|
|
20703
|
+
* @throws {@link ChainMismatchError} if signer and provider are on different chains.
|
|
21620
20704
|
*
|
|
21621
20705
|
* @example
|
|
21622
20706
|
* ```ts
|
|
@@ -21673,8 +20757,8 @@ declare class ZamaSDK {
|
|
|
21673
20757
|
* @example
|
|
21674
20758
|
* ```ts
|
|
21675
20759
|
* {
|
|
21676
|
-
* using sdk = new ZamaSDK({ relayer, signer, storage });
|
|
21677
|
-
* await sdk.
|
|
20760
|
+
* using sdk = new ZamaSDK({ relayer, provider, signer, storage });
|
|
20761
|
+
* await sdk.allow([cUSDT]);
|
|
21678
20762
|
* const balance = await sdk.createReadonlyToken(cUSDT).balanceOf();
|
|
21679
20763
|
* } // sdk.terminate() called automatically here
|
|
21680
20764
|
* ```
|
|
@@ -21683,245 +20767,43 @@ declare class ZamaSDK {
|
|
|
21683
20767
|
}
|
|
21684
20768
|
//#endregion
|
|
21685
20769
|
//#region src/token/pending-unshield.d.ts
|
|
20770
|
+
/**
|
|
20771
|
+
* Persisted state for an in-progress unshield request.
|
|
20772
|
+
* Used to resume an interrupted unshield after page reload.
|
|
20773
|
+
*/
|
|
20774
|
+
interface PendingUnshieldRequest {
|
|
20775
|
+
/** Transaction hash of the original unwrap call. */
|
|
20776
|
+
readonly unwrapTxHash: Hex;
|
|
20777
|
+
/**
|
|
20778
|
+
* Request identifier emitted by upgraded wrapper contracts.
|
|
20779
|
+
* Present only for requests initiated after the protocol upgrade.
|
|
20780
|
+
* When defined, pass this as `unwrapRequestId` to `finalizeUnwrap`.
|
|
20781
|
+
* When absent (legacy request), pass the `encryptedAmount` from the `UnwrapRequested` event.
|
|
20782
|
+
*/
|
|
20783
|
+
readonly unwrapRequestId?: Handle;
|
|
20784
|
+
}
|
|
21686
20785
|
/**
|
|
21687
20786
|
* Persist the unwrap tx hash so an interrupted unshield can be resumed later
|
|
21688
20787
|
* (e.g. after a page reload).
|
|
21689
20788
|
*/
|
|
21690
|
-
declare function savePendingUnshield(storage: GenericStorage, wrapperAddress: Address, unwrapTxHash: Hex): Promise<void>;
|
|
20789
|
+
declare function savePendingUnshield(storage: GenericStorage, wrapperAddress: Address, unwrapTxHash: Hex, unwrapRequestId?: Handle): Promise<void>;
|
|
21691
20790
|
/**
|
|
21692
20791
|
* Load a previously saved unwrap tx hash, or `null` if none exists.
|
|
21693
20792
|
*/
|
|
21694
20793
|
declare function loadPendingUnshield(storage: GenericStorage, wrapperAddress: Address): Promise<Hex | null>;
|
|
21695
20794
|
/**
|
|
21696
|
-
*
|
|
21697
|
-
*/
|
|
21698
|
-
declare function clearPendingUnshield(storage: GenericStorage, wrapperAddress: Address): Promise<void>;
|
|
21699
|
-
//#endregion
|
|
21700
|
-
//#region src/events/onchain-events.d.ts
|
|
21701
|
-
/**
|
|
21702
|
-
* Event topic0 constants (keccak256 of the canonical Solidity signature).
|
|
21703
|
-
* Pass to `getLogs({ topics: [Object.values(Topics)] })` to fetch all events.
|
|
21704
|
-
*/
|
|
21705
|
-
declare const Topics: {
|
|
21706
|
-
/** `ConfidentialTransfer(address indexed from, address indexed to, bytes32 indexed amount)` */readonly ConfidentialTransfer: `0x${string}`; /** `Wrapped(address indexed to, uint256 amountIn)` */
|
|
21707
|
-
readonly Wrapped: `0x${string}`; /** `UnwrapRequested(address indexed receiver, bytes32 indexed unwrapRequestId, bytes32 amount)` */
|
|
21708
|
-
readonly UnwrapRequested: `0x${string}`; /** `UnwrapFinalized(address indexed receiver, bytes32 indexed unwrapRequestId, bytes32 encryptedAmount, uint64 cleartextAmount)` */
|
|
21709
|
-
readonly UnwrappedFinalized: `0x${string}`; /** `UnwrappedStarted(bool returnVal, uint256 indexed requestId, ...)` */
|
|
21710
|
-
readonly UnwrappedStarted: `0x${string}`;
|
|
21711
|
-
};
|
|
21712
|
-
/** Decoded `ConfidentialTransfer` event — an encrypted token transfer. */
|
|
21713
|
-
interface ConfidentialTransferEvent {
|
|
21714
|
-
readonly eventName: "ConfidentialTransfer";
|
|
21715
|
-
/** Sender address. */
|
|
21716
|
-
readonly from: Address;
|
|
21717
|
-
/** Receiver address. */
|
|
21718
|
-
readonly to: Address;
|
|
21719
|
-
/** FHE ciphertext handle for the transferred amount. */
|
|
21720
|
-
readonly encryptedAmountHandle: Handle;
|
|
21721
|
-
}
|
|
21722
|
-
/** Decoded `Wrapped` event — an ERC-20 shield (wrap) operation. */
|
|
21723
|
-
interface WrappedEvent {
|
|
21724
|
-
readonly eventName: "Wrapped";
|
|
21725
|
-
/** Receiver of the minted confidential tokens. */
|
|
21726
|
-
readonly to: Address;
|
|
21727
|
-
/** Underlying ERC-20 tokens deposited. */
|
|
21728
|
-
readonly amountIn: bigint;
|
|
21729
|
-
}
|
|
21730
|
-
/** Decoded `UnwrapRequested` event — an unshield request submitted. */
|
|
21731
|
-
interface UnwrapRequestedEvent {
|
|
21732
|
-
readonly eventName: "UnwrapRequested";
|
|
21733
|
-
/** Address that will receive the unwrapped ERC-20 tokens. */
|
|
21734
|
-
readonly receiver: Address;
|
|
21735
|
-
/** Unique identifier for this unwrap request (bytes32). */
|
|
21736
|
-
readonly unwrapRequestId: Hex;
|
|
21737
|
-
/** FHE ciphertext handle for the requested unshield amount. */
|
|
21738
|
-
readonly encryptedAmount: Handle;
|
|
21739
|
-
}
|
|
21740
|
-
/** Decoded `UnwrapFinalized` event — an unshield completed on-chain. */
|
|
21741
|
-
interface UnwrappedFinalizedEvent {
|
|
21742
|
-
readonly eventName: "UnwrappedFinalized";
|
|
21743
|
-
/** Address receiving the unwrapped ERC-20 tokens. */
|
|
21744
|
-
readonly receiver: Address;
|
|
21745
|
-
/** Unique identifier for this unwrap request (bytes32). */
|
|
21746
|
-
readonly unwrapRequestId: Hex;
|
|
21747
|
-
/** FHE ciphertext handle of the burnt confidential balance. */
|
|
21748
|
-
readonly encryptedAmount: Handle;
|
|
21749
|
-
/** Cleartext amount of underlying ERC-20 tokens returned. */
|
|
21750
|
-
readonly cleartextAmount: bigint;
|
|
21751
|
-
}
|
|
21752
|
-
/** Decoded `UnwrappedStarted` event — the relayer began processing an unshield. */
|
|
21753
|
-
interface UnwrappedStartedEvent {
|
|
21754
|
-
readonly eventName: "UnwrappedStarted";
|
|
21755
|
-
/** Whether the unwrap start succeeded. */
|
|
21756
|
-
readonly returnVal: boolean;
|
|
21757
|
-
/** On-chain request ID. */
|
|
21758
|
-
readonly requestId: bigint;
|
|
21759
|
-
/** On-chain transaction ID. */
|
|
21760
|
-
readonly txId: bigint;
|
|
21761
|
-
/** Receiver address. */
|
|
21762
|
-
readonly to: Address;
|
|
21763
|
-
/** Refund address (if applicable). */
|
|
21764
|
-
readonly refund: Address;
|
|
21765
|
-
/** FHE handle of the requested amount. */
|
|
21766
|
-
readonly requestedAmount: Handle;
|
|
21767
|
-
/** FHE handle of the burn amount. */
|
|
21768
|
-
readonly burnAmount: Handle;
|
|
21769
|
-
}
|
|
21770
|
-
/** Union of all decoded confidential token event types. */
|
|
21771
|
-
type OnChainEvent = ConfidentialTransferEvent | WrappedEvent | UnwrapRequestedEvent | UnwrappedFinalizedEvent | UnwrappedStartedEvent;
|
|
21772
|
-
/**
|
|
21773
|
-
* ConfidentialTransfer(address indexed from, address indexed to, bytes32 indexed amount)
|
|
21774
|
-
* All 3 params indexed → topics[1..3], no data.
|
|
21775
|
-
*/
|
|
21776
|
-
declare function decodeConfidentialTransfer(log: RawLog): ConfidentialTransferEvent | null;
|
|
21777
|
-
/**
|
|
21778
|
-
* Wrapped(address indexed to, uint256 amountIn)
|
|
21779
|
-
* Indexed: to (topics[1])
|
|
21780
|
-
* Data: amountIn (uint256)
|
|
21781
|
-
*/
|
|
21782
|
-
declare function decodeWrapped(log: RawLog): WrappedEvent | null;
|
|
21783
|
-
/**
|
|
21784
|
-
* UnwrapRequested(address indexed receiver, bytes32 indexed unwrapRequestId, bytes32 amount)
|
|
21785
|
-
* Indexed: receiver (topics[1]), unwrapRequestId (topics[2])
|
|
21786
|
-
* Data: amount (bytes32)
|
|
21787
|
-
*/
|
|
21788
|
-
declare function decodeUnwrapRequested(log: RawLog): UnwrapRequestedEvent | null;
|
|
21789
|
-
/**
|
|
21790
|
-
* UnwrapFinalized(address indexed receiver, bytes32 indexed unwrapRequestId, bytes32 encryptedAmount, uint64 cleartextAmount)
|
|
21791
|
-
* Indexed: receiver (topics[1]), unwrapRequestId (topics[2])
|
|
21792
|
-
* Data: encryptedAmount (bytes32 FHE handle, word 0), cleartextAmount (uint64, word 1)
|
|
21793
|
-
*/
|
|
21794
|
-
declare function decodeUnwrappedFinalized(log: RawLog): UnwrappedFinalizedEvent | null;
|
|
21795
|
-
/**
|
|
21796
|
-
* UnwrappedStarted(bool returnVal, uint256 indexed requestId, uint256 indexed txId, address indexed to,
|
|
21797
|
-
* address refund, bytes32 requestedAmount, bytes32 burnAmount)
|
|
21798
|
-
* Indexed: requestId (topics[1]), txId (topics[2]), to (topics[3])
|
|
21799
|
-
* Data: returnVal, refund, requestedAmount, burnAmount
|
|
21800
|
-
*/
|
|
21801
|
-
declare function decodeUnwrappedStarted(log: RawLog): UnwrappedStartedEvent | null;
|
|
21802
|
-
/**
|
|
21803
|
-
* Try all decoders on a single log and return the first match, or `null`.
|
|
21804
|
-
*
|
|
21805
|
-
* @example
|
|
21806
|
-
* ```ts
|
|
21807
|
-
* const event = decodeOnChainEvent(log);
|
|
21808
|
-
* if (event?.eventName === "ConfidentialTransfer") {
|
|
21809
|
-
* console.log(event.from, event.to);
|
|
21810
|
-
* }
|
|
21811
|
-
* ```
|
|
21812
|
-
*/
|
|
21813
|
-
declare function decodeOnChainEvent(log: RawLog): OnChainEvent | null;
|
|
21814
|
-
/**
|
|
21815
|
-
* Batch-decode an array of logs, skipping unrecognized entries.
|
|
21816
|
-
*
|
|
21817
|
-
* @example
|
|
21818
|
-
* ```ts
|
|
21819
|
-
* const events = decodeOnChainEvents(receipt.logs);
|
|
21820
|
-
* ```
|
|
21821
|
-
*/
|
|
21822
|
-
declare function decodeOnChainEvents(logs: readonly RawLog[]): OnChainEvent[];
|
|
21823
|
-
/**
|
|
21824
|
-
* Find the first {@link UnwrapRequestedEvent} in a logs array.
|
|
21825
|
-
*
|
|
21826
|
-
* @example
|
|
21827
|
-
* ```ts
|
|
21828
|
-
* const event = findUnwrapRequested(receipt.logs);
|
|
21829
|
-
* if (event) console.log(event.receiver, event.encryptedAmount);
|
|
21830
|
-
* ```
|
|
21831
|
-
*/
|
|
21832
|
-
declare function findUnwrapRequested(logs: readonly RawLog[]): UnwrapRequestedEvent | null;
|
|
21833
|
-
/**
|
|
21834
|
-
* Find the first {@link WrappedEvent} in a logs array.
|
|
20795
|
+
* Load a previously saved unwrap request, including `unwrapRequestId` when available.
|
|
21835
20796
|
*
|
|
21836
|
-
*
|
|
21837
|
-
*
|
|
21838
|
-
*
|
|
21839
|
-
*
|
|
21840
|
-
* ```
|
|
21841
|
-
*/
|
|
21842
|
-
declare function findWrapped(logs: readonly RawLog[]): WrappedEvent | null;
|
|
21843
|
-
/**
|
|
21844
|
-
* All 5 confidential token event topic0 hashes.
|
|
21845
|
-
* Pass to `getLogs({ topics: [TOKEN_TOPICS] })` to fetch
|
|
21846
|
-
* all confidential token events in a single RPC call.
|
|
21847
|
-
*/
|
|
21848
|
-
declare const TOKEN_TOPICS: readonly [`0x${string}`, `0x${string}`, `0x${string}`, `0x${string}`, `0x${string}`];
|
|
21849
|
-
/**
|
|
21850
|
-
* ACL delegation event topic0 constants (keccak256 of the canonical Solidity signature).
|
|
21851
|
-
* These are ACL events, NOT token events — they are emitted by the ACL contract.
|
|
21852
|
-
*/
|
|
21853
|
-
declare const AclTopics: {
|
|
21854
|
-
/** `DelegatedForUserDecryption(address indexed delegator, address indexed delegate, address contractAddress, uint64 delegationCounter, uint64 oldExpirationDate, uint64 newExpirationDate)` */readonly DelegatedForUserDecryption: `0x${string}`; /** `RevokedDelegationForUserDecryption(address indexed delegator, address indexed delegate, address contractAddress, uint64 delegationCounter, uint64 oldExpirationDate)` */
|
|
21855
|
-
readonly RevokedDelegationForUserDecryption: `0x${string}`;
|
|
21856
|
-
};
|
|
21857
|
-
/** Decoded `DelegatedForUserDecryption` event — a delegation was created or renewed. */
|
|
21858
|
-
interface DelegatedForUserDecryptionEvent {
|
|
21859
|
-
readonly eventName: "DelegatedForUserDecryption";
|
|
21860
|
-
/** Address of the delegator (the account granting access). */
|
|
21861
|
-
readonly delegator: Address;
|
|
21862
|
-
/** Address of the delegate (the account receiving access). */
|
|
21863
|
-
readonly delegate: Address;
|
|
21864
|
-
/** Contract address the delegation applies to. */
|
|
21865
|
-
readonly contractAddress: Address;
|
|
21866
|
-
/** Monotonic delegation counter. */
|
|
21867
|
-
readonly delegationCounter: bigint;
|
|
21868
|
-
/** Previous expiration timestamp (0 if first delegation). */
|
|
21869
|
-
readonly oldExpirationDate: bigint;
|
|
21870
|
-
/** New expiration timestamp. */
|
|
21871
|
-
readonly newExpirationDate: bigint;
|
|
21872
|
-
}
|
|
21873
|
-
/** Decoded `RevokedDelegationForUserDecryption` event — a delegation was revoked. */
|
|
21874
|
-
interface RevokedDelegationForUserDecryptionEvent {
|
|
21875
|
-
readonly eventName: "RevokedDelegationForUserDecryption";
|
|
21876
|
-
/** Address of the delegator. */
|
|
21877
|
-
readonly delegator: Address;
|
|
21878
|
-
/** Address of the delegate. */
|
|
21879
|
-
readonly delegate: Address;
|
|
21880
|
-
/** Contract address the revocation applies to. */
|
|
21881
|
-
readonly contractAddress: Address;
|
|
21882
|
-
/** Monotonic delegation counter. */
|
|
21883
|
-
readonly delegationCounter: bigint;
|
|
21884
|
-
/** Expiration date that was active before revocation. */
|
|
21885
|
-
readonly oldExpirationDate: bigint;
|
|
21886
|
-
}
|
|
21887
|
-
/** Union of all decoded ACL delegation event types. */
|
|
21888
|
-
type AclEvent = DelegatedForUserDecryptionEvent | RevokedDelegationForUserDecryptionEvent;
|
|
21889
|
-
/**
|
|
21890
|
-
* DelegatedForUserDecryption(address indexed delegator, address indexed delegate,
|
|
21891
|
-
* address contractAddress, uint64 delegationCounter, uint64 oldExpirationDate, uint64 newExpirationDate)
|
|
21892
|
-
* Indexed: delegator (topics[1]), delegate (topics[2])
|
|
21893
|
-
* Data: contractAddress, delegationCounter, oldExpirationDate, newExpirationDate
|
|
21894
|
-
*/
|
|
21895
|
-
declare function decodeDelegatedForUserDecryption(log: RawLog): DelegatedForUserDecryptionEvent | null;
|
|
21896
|
-
/**
|
|
21897
|
-
* RevokedDelegationForUserDecryption(address indexed delegator, address indexed delegate,
|
|
21898
|
-
* address contractAddress, uint64 delegationCounter, uint64 oldExpirationDate)
|
|
21899
|
-
* Indexed: delegator (topics[1]), delegate (topics[2])
|
|
21900
|
-
* Data: contractAddress, delegationCounter, oldExpirationDate
|
|
21901
|
-
*/
|
|
21902
|
-
declare function decodeRevokedDelegationForUserDecryption(log: RawLog): RevokedDelegationForUserDecryptionEvent | null;
|
|
21903
|
-
/**
|
|
21904
|
-
* Try all ACL delegation decoders on a single log and return the first match, or `null`.
|
|
20797
|
+
* `resumeUnshield()` only needs `unwrapTxHash`: it reloads the transaction receipt and
|
|
20798
|
+
* rediscovers the right finalize handle from the emitted `UnwrapRequested` event.
|
|
20799
|
+
* Use `unwrapRequestId` directly only for custom flows that call `finalizeUnwrap()`
|
|
20800
|
+
* without reloading the original unwrap receipt.
|
|
21905
20801
|
*/
|
|
21906
|
-
declare function
|
|
20802
|
+
declare function loadPendingUnshieldRequest(storage: GenericStorage, wrapperAddress: Address): Promise<PendingUnshieldRequest | null>;
|
|
21907
20803
|
/**
|
|
21908
|
-
*
|
|
21909
|
-
*/
|
|
21910
|
-
declare function decodeAclEvents(logs: readonly RawLog[]): AclEvent[];
|
|
21911
|
-
/**
|
|
21912
|
-
* Find the first {@link DelegatedForUserDecryptionEvent} in a logs array.
|
|
21913
|
-
*/
|
|
21914
|
-
declare function findDelegatedForUserDecryption(logs: readonly RawLog[]): DelegatedForUserDecryptionEvent | null;
|
|
21915
|
-
/**
|
|
21916
|
-
* Find the first {@link RevokedDelegationForUserDecryptionEvent} in a logs array.
|
|
21917
|
-
*/
|
|
21918
|
-
declare function findRevokedDelegationForUserDecryption(logs: readonly RawLog[]): RevokedDelegationForUserDecryptionEvent | null;
|
|
21919
|
-
/**
|
|
21920
|
-
* Both ACL delegation event topic0 hashes.
|
|
21921
|
-
* Pass to `getLogs({ topics: [ACL_TOPICS] })` to fetch
|
|
21922
|
-
* all delegation events in a single RPC call.
|
|
20804
|
+
* Clear the saved unwrap tx hash after a successful finalization.
|
|
21923
20805
|
*/
|
|
21924
|
-
declare
|
|
20806
|
+
declare function clearPendingUnshield(storage: GenericStorage, wrapperAddress: Address): Promise<void>;
|
|
21925
20807
|
//#endregion
|
|
21926
|
-
export {
|
|
21927
|
-
//# sourceMappingURL=
|
|
20808
|
+
export { zamaQueryKeys as $, DelegationExpiryUnchangedError as A, decimalsContract as At, ApprovalFailedError as B, confidentialTransferFromContract as Bt, InsufficientERC20BalanceError as C, ERC7984_WRAPPER_INTERFACE_ID_LEGACY as Ct, DelegationDelegateEqualsContractError as D, allowanceContract as Dt, DelegationCooldownError as E, supportsInterfaceContract as Et, ConfigurationError as F, underlyingContract as Ft, SigningRejectedError as G, unwrapContract as Gt, DecryptionFailedError as H, rateContract as Ht, RelayerRequestFailedError as I, wrapContract as It, matchZamaError as J, ZamaError as K, unwrapFromBalanceContract as Kt, InvalidKeypairError as L, confidentialBalanceOfContract as Lt, DelegationNotPropagatedError as M, symbolContract as Mt, DelegationSelfNotAllowedError as N, finalizeUnwrapContract as Nt, DelegationExpirationTooSoonError as O, approveContract as Ot, ChainMismatchError as P, inferredTotalSupplyContract as Pt, userDecryptQueryOptions as Q, KeypairExpiredError as R, confidentialTotalSupplyContract as Rt, InsufficientConfidentialBalanceError as S, ERC7984_WRAPPER_INTERFACE_ID as St, DelegationContractIsSelfError as T, isConfidentialWrapperContract as Tt, EncryptionFailedError as U, setOperatorContract as Ut, TransactionRevertedError as V, isOperatorContract as Vt, SigningFailedError as W, totalSupplyContract as Wt, DecryptResult as X, DecryptHandle as Y, UserDecryptQueryConfig as Z, isZeroHandle as _, delegateForUserDecryptionContract as _t, savePendingUnshield as a, CredentialsManagerConfig as at, BalanceErrorDetails as b, revokeDelegationContract as bt, DefaultRegistryAddresses as c, TokenWrapperPair as ct, WrappersRegistryConfig as d, getTokenAddressContract as dt, MutationFactoryOptions as et, Token as f, getTokenPairContract as ft, ZERO_HANDLE as g, isConfidentialTokenValidContract as gt, ReadonlyToken as h, getTokenPairsSliceContract as ht, loadPendingUnshieldRequest as i, CredentialsManager as it, DelegationNotFoundError as j, nameContract as jt, DelegationExpiredError as k, balanceOfContract as kt, ListPairsOptions as l, TokenWrapperPairWithMetadata as lt, BatchDecryptAsOptions as m, getTokenPairsLengthContract as mt, clearPendingUnshield as n, DelegatedCredentialsManager as nt, ZamaSDK as o, DecryptCache as ot, BatchBalancesResult as p, getTokenPairsContract as pt, ZamaErrorCode as q, loadPendingUnshield as r, DelegatedCredentialsManagerConfig as rt, ZamaSDKConfig as s, PaginatedResult as st, PendingUnshieldRequest as t, QueryFactoryOptions as tt, WrappersRegistry as u, getConfidentialTokenAddressContract as ut, matchAclRevert as v, getDelegationExpiryContract as vt, AclPausedError as w, isConfidentialTokenContract as wt, ERC20ReadFailedError as x, ERC7984_INTERFACE_ID as xt, BalanceCheckUnavailableError as y, isHandleDelegatedContract as yt, NoCiphertextError as z, confidentialTransferContract as zt };
|
|
20809
|
+
//# sourceMappingURL=index-BdyljG1F.d.ts.map
|