@dodoex/wallet-web3 0.0.43-beta.2 → 0.0.43-beta.3
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/dist/alchemy-provider-5870b6fa-233c80b6.js +1 -0
- package/dist/alchemy-websocket-provider-213da986-64068b80.js +1 -0
- package/dist/blocto-4c3b71f5.js +1 -0
- package/dist/ccip-da46c435.js +1 -0
- package/dist/cjs/alchemy-provider-5870b6fa-686578f0.cjs +1 -0
- package/dist/cjs/alchemy-websocket-provider-213da986-fff1f59d.cjs +1 -0
- package/dist/cjs/blocto-621f54a9.cjs +1 -0
- package/dist/cjs/ccip-4b1d6858.cjs +1 -0
- package/dist/cjs/{draggabilly-5c45132c.cjs → draggabilly-5b36eaf0.cjs} +1 -1
- package/dist/cjs/id-0b41bc31.cjs +1 -0
- package/dist/{index-9a0e5b83.js → cjs/index-1e729250.cjs} +2 -2
- package/dist/cjs/index-283b89ff.cjs +1 -0
- package/dist/cjs/index-2d5de895.cjs +1 -0
- package/dist/cjs/{index-eb09e54d.cjs → index-35edc6a0.cjs} +1 -1
- package/dist/cjs/{index-3f7251ad.cjs → index-44b7a45e.cjs} +3 -3
- package/dist/cjs/index-5560dc58.cjs +17 -0
- package/dist/cjs/index-73e4d7eb.cjs +6 -0
- package/dist/cjs/{index-df8e5839.cjs → index-9f2a69d5.cjs} +1 -1
- package/dist/cjs/index-a4478ddb.cjs +1 -0
- package/dist/cjs/index-d528b9d2.cjs +1 -0
- package/dist/cjs/index-d54b57b8.cjs +1 -0
- package/dist/cjs/index-db36b0fa.cjs +29 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.es-e3bf027a.cjs +9 -0
- package/dist/cjs/{interface-bc5624b1.cjs → interface-d076e79e.cjs} +1 -1
- package/dist/cjs/{lib-typedarrays-7f24496d.cjs → lib-typedarrays-68c72268.cjs} +1 -1
- package/dist/cjs/{portis-211bf6ad.cjs → portis-7f3437fb.cjs} +1 -1
- package/dist/cjs/provider-e53a855b.cjs +1 -0
- package/dist/cjs/providers/connector/alchemy/index.d.ts +913 -0
- package/dist/cjs/providers/connector/alchemy/provider.d.ts +914 -0
- package/dist/cjs/providers/connector/alchemy/signer.d.ts +23 -0
- package/dist/cjs/providers/connector/index.d.ts +951 -43
- package/dist/cjs/providers/connector/ledgerUSB/index.d.ts +43 -43
- package/dist/cjs/providers/connector/ledgerUSB/provider.d.ts +10 -10
- package/dist/cjs/providers/connector/types.d.ts +4 -0
- package/dist/cjs/providers/connector/uniPass/index.d.ts +43 -43
- package/dist/cjs/providers/connector/uniPass/provider.d.ts +10 -10
- package/dist/cjs/providers/wallets/index.d.ts +2 -1
- package/dist/cjs/providers/wallets/standalone.d.ts +1 -0
- package/dist/cjs/providers/wallets/types.d.ts +1 -0
- package/dist/cjs/rainbow-dc533bc9.cjs +1 -0
- package/dist/cjs/sha224-d1ef1120.cjs +1 -0
- package/dist/cjs/sha256-0f5b78af.cjs +1 -0
- package/dist/cjs/typed-data-248c37d5.cjs +1 -0
- package/dist/cjs/uAuth-d9d66e7c.cjs +1 -0
- package/dist/cjs/walletConnect-0d1d9c65.cjs +1 -0
- package/dist/cjs/walletLink-a6046616.cjs +3 -0
- package/dist/{draggabilly-fb1c9db3.js → draggabilly-ad95d562.js} +1 -1
- package/dist/id-d4f3e36f.js +1 -0
- package/dist/index-21179dd1.js +1 -0
- package/dist/index-2691f407.js +1 -0
- package/dist/index-4f86d0d9.js +1 -0
- package/dist/{index-0e53e209.js → index-52949a22.js} +2 -2
- package/dist/index-5526977f.js +17 -0
- package/dist/index-5a7908b7.js +1 -0
- package/dist/{index-0ee5ef8d.js → index-65d96278.js} +1 -1
- package/dist/index-7e9e2ba1.js +1 -0
- package/dist/{index-2068a4fe.js → index-7f74b1e8.js} +3 -3
- package/dist/index-af6c16a1.js +29 -0
- package/dist/{cjs/index-2a741fbb.cjs → index-cd1a9a88.js} +2 -2
- package/dist/{index-e0d3617a.js → index-f08d6a6b.js} +1 -1
- package/dist/index.es-bb0f01ae.js +9 -0
- package/dist/index.js +1 -1
- package/dist/{interface-cb5e1e98.js → interface-8030d5f3.js} +1 -1
- package/dist/{lib-typedarrays-f8420380.js → lib-typedarrays-a4c67579.js} +1 -1
- package/dist/{portis-0d9d874b.js → portis-e2bba602.js} +1 -1
- package/dist/provider-459277d5.js +1 -0
- package/dist/providers/connector/alchemy/index.d.ts +913 -0
- package/dist/providers/connector/alchemy/provider.d.ts +914 -0
- package/dist/providers/connector/alchemy/signer.d.ts +23 -0
- package/dist/providers/connector/index.d.ts +951 -43
- package/dist/providers/connector/ledgerUSB/index.d.ts +43 -43
- package/dist/providers/connector/ledgerUSB/provider.d.ts +10 -10
- package/dist/providers/connector/types.d.ts +4 -0
- package/dist/providers/connector/uniPass/index.d.ts +43 -43
- package/dist/providers/connector/uniPass/provider.d.ts +10 -10
- package/dist/providers/wallets/index.d.ts +2 -1
- package/dist/providers/wallets/standalone.d.ts +1 -0
- package/dist/providers/wallets/types.d.ts +1 -0
- package/dist/rainbow-a06575a1.js +1 -0
- package/dist/sha224-10712709.js +1 -0
- package/dist/sha256-656b18f4.js +1 -0
- package/dist/typed-data-b07573b9.js +1 -0
- package/dist/uAuth-7b727766.js +1 -0
- package/dist/walletConnect-9c01b144.js +1 -0
- package/dist/{walletLink-000fcb81.js → walletLink-1b8c2056.js} +2 -2
- package/package.json +11 -4
- package/dist/DefaultJsonRpcProvider-a5375519.js +0 -1
- package/dist/__node-resolve_empty-0ed2c058.js +0 -1
- package/dist/blocto-739837e0.js +0 -1
- package/dist/bn-dbf1b053.js +0 -1
- package/dist/browser-ponyfill-65b68016.js +0 -1
- package/dist/cjs/DefaultJsonRpcProvider-af04cc55.cjs +0 -1
- package/dist/cjs/__node-resolve_empty-e2dee16c.cjs +0 -1
- package/dist/cjs/blocto-e8847b99.cjs +0 -1
- package/dist/cjs/bn-87cba44d.cjs +0 -1
- package/dist/cjs/browser-ponyfill-de0a8ec9.cjs +0 -1
- package/dist/cjs/ethers-2b86e17d.cjs +0 -1
- package/dist/cjs/id-1eb25db0.cjs +0 -1
- package/dist/cjs/index-0740e7fe.cjs +0 -1
- package/dist/cjs/index-18446412.cjs +0 -1
- package/dist/cjs/index-1af4ac9a.cjs +0 -1
- package/dist/cjs/index-21b90e8c.cjs +0 -6
- package/dist/cjs/index-2587eef5.cjs +0 -1
- package/dist/cjs/index-38ed564c.cjs +0 -15
- package/dist/cjs/index-53583bbc.cjs +0 -1
- package/dist/cjs/index-aaf32aa5.cjs +0 -9
- package/dist/cjs/index-d22bf825.cjs +0 -1
- package/dist/cjs/index-e9e5106b.cjs +0 -1
- package/dist/cjs/index.es-3e845f07.cjs +0 -9
- package/dist/cjs/provider-0ddad67c.cjs +0 -1
- package/dist/cjs/rainbow-73e82c82.cjs +0 -1
- package/dist/cjs/sha224-8056f6e3.cjs +0 -1
- package/dist/cjs/sha256-43414cf6.cjs +0 -1
- package/dist/cjs/uAuth-5166de3a.cjs +0 -1
- package/dist/cjs/walletConnect-41dc68ec.cjs +0 -1
- package/dist/cjs/walletLink-689340b5.cjs +0 -3
- package/dist/ethers-b291db18.js +0 -1
- package/dist/id-4e950ad4.js +0 -1
- package/dist/index-05ecccce.js +0 -1
- package/dist/index-1aa609d8.js +0 -1
- package/dist/index-27d4b342.js +0 -1
- package/dist/index-54955d07.js +0 -1
- package/dist/index-8151dacc.js +0 -1
- package/dist/index-929dd85e.js +0 -15
- package/dist/index-948c094e.js +0 -9
- package/dist/index-d00482ad.js +0 -1
- package/dist/index-ede11a7b.js +0 -1
- package/dist/index.es-818610ea.js +0 -9
- package/dist/provider-0b6bd3ac.js +0 -1
- package/dist/rainbow-688b2e16.js +0 -1
- package/dist/sha224-3fa562e2.js +0 -1
- package/dist/sha256-39cd7493.js +0 -1
- package/dist/uAuth-4ba62d4b.js +0 -1
- package/dist/walletConnect-96c9baa7.js +0 -1
|
@@ -18,30 +18,30 @@ export default function connector(params: ConnectorParams): Promise<{
|
|
|
18
18
|
detectNetwork(): Promise<import("@ethersproject/networks").Network>;
|
|
19
19
|
_uncachedDetectNetwork(): Promise<import("@ethersproject/networks").Network>;
|
|
20
20
|
getUncheckedSigner(addressOrIndex?: string | number | undefined): {
|
|
21
|
-
sendTransaction(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
21
|
+
sendTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("alchemy-sdk").TransactionResponse>;
|
|
22
22
|
readonly provider: import("@ethersproject/providers").JsonRpcProvider;
|
|
23
23
|
_index: number;
|
|
24
24
|
_address: string;
|
|
25
25
|
connect(provider: import("@ethersproject/abstract-provider").Provider): import("@ethersproject/providers").JsonRpcSigner;
|
|
26
26
|
connectUnchecked(): import("@ethersproject/providers").JsonRpcSigner;
|
|
27
27
|
getAddress(): Promise<string>;
|
|
28
|
-
sendUncheckedTransaction(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
29
|
-
signTransaction(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
28
|
+
sendUncheckedTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<string>;
|
|
29
|
+
signTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<string>;
|
|
30
30
|
signMessage(message: string | import("ethers").Bytes): Promise<string>;
|
|
31
31
|
_legacySignMessage(message: string | import("ethers").Bytes): Promise<string>;
|
|
32
32
|
_signTypedData(domain: import("ethers").TypedDataDomain, types: Record<string, import("ethers").TypedDataField[]>, value: Record<string, any>): Promise<string>;
|
|
33
33
|
unlock(password: string): Promise<boolean>;
|
|
34
34
|
readonly _isSigner: boolean;
|
|
35
|
-
getBalance(blockTag?: import("
|
|
36
|
-
getTransactionCount(blockTag?: import("
|
|
37
|
-
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
38
|
-
call(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
35
|
+
getBalance(blockTag?: import("alchemy-sdk").BlockTag | undefined): Promise<import("alchemy-sdk").BigNumber>;
|
|
36
|
+
getTransactionCount(blockTag?: import("alchemy-sdk").BlockTag | undefined): Promise<number>;
|
|
37
|
+
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("alchemy-sdk").BigNumber>;
|
|
38
|
+
call(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>, blockTag?: import("alchemy-sdk").BlockTag | undefined): Promise<string>;
|
|
39
39
|
getChainId(): Promise<number>;
|
|
40
|
-
getGasPrice(): Promise<import("
|
|
41
|
-
getFeeData(): Promise<import("
|
|
40
|
+
getGasPrice(): Promise<import("alchemy-sdk").BigNumber>;
|
|
41
|
+
getFeeData(): Promise<import("alchemy-sdk").FeeData>;
|
|
42
42
|
resolveName(name: string): Promise<string>;
|
|
43
|
-
checkTransaction(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
44
|
-
populateTransaction(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
43
|
+
checkTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>;
|
|
44
|
+
populateTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("alchemy-sdk").TransactionRequest>;
|
|
45
45
|
_checkProvider(operation?: string | undefined): void;
|
|
46
46
|
};
|
|
47
47
|
send(method: string, params: any[]): Promise<any>;
|
|
@@ -86,52 +86,52 @@ export default function connector(params: ConnectorParams): Promise<{
|
|
|
86
86
|
pollingInterval: number;
|
|
87
87
|
_getFastBlockNumber(): Promise<number>;
|
|
88
88
|
_setFastBlockNumber(blockNumber: number): void;
|
|
89
|
-
waitForTransaction(transactionHash: string, confirmations?: number | undefined, timeout?: number | undefined): Promise<import("
|
|
89
|
+
waitForTransaction(transactionHash: string, confirmations?: number | undefined, timeout?: number | undefined): Promise<import("alchemy-sdk").TransactionReceipt>;
|
|
90
90
|
_waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: {
|
|
91
91
|
data: string;
|
|
92
92
|
from: string;
|
|
93
93
|
nonce: number;
|
|
94
94
|
to: string;
|
|
95
|
-
value: import("
|
|
95
|
+
value: import("alchemy-sdk").BigNumber;
|
|
96
96
|
startBlock: number;
|
|
97
|
-
}): Promise<import("
|
|
97
|
+
}): Promise<import("alchemy-sdk").TransactionReceipt>;
|
|
98
98
|
getBlockNumber(): Promise<number>;
|
|
99
|
-
getGasPrice(): Promise<import("
|
|
100
|
-
getBalance(addressOrName: string | Promise<string>, blockTag?: import("
|
|
101
|
-
getTransactionCount(addressOrName: string | Promise<string>, blockTag?: import("
|
|
102
|
-
getCode(addressOrName: string | Promise<string>, blockTag?: import("
|
|
103
|
-
getStorageAt(addressOrName: string | Promise<string>, position: import("
|
|
104
|
-
_wrapTransaction(tx: import("ethers").Transaction, hash?: string | undefined, startBlock?: number | undefined): import("
|
|
105
|
-
sendTransaction(signedTransaction: string | Promise<string>): Promise<import("
|
|
106
|
-
_getTransactionRequest(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
99
|
+
getGasPrice(): Promise<import("alchemy-sdk").BigNumber>;
|
|
100
|
+
getBalance(addressOrName: string | Promise<string>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<import("alchemy-sdk").BigNumber>;
|
|
101
|
+
getTransactionCount(addressOrName: string | Promise<string>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<number>;
|
|
102
|
+
getCode(addressOrName: string | Promise<string>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<string>;
|
|
103
|
+
getStorageAt(addressOrName: string | Promise<string>, position: import("alchemy-sdk").BigNumberish | Promise<import("alchemy-sdk").BigNumberish>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<string>;
|
|
104
|
+
_wrapTransaction(tx: import("ethers").Transaction, hash?: string | undefined, startBlock?: number | undefined): import("alchemy-sdk").TransactionResponse;
|
|
105
|
+
sendTransaction(signedTransaction: string | Promise<string>): Promise<import("alchemy-sdk").TransactionResponse>;
|
|
106
|
+
_getTransactionRequest(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("ethers").Transaction>;
|
|
107
107
|
_getFilter(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>;
|
|
108
|
-
_call(transaction: import("
|
|
109
|
-
call(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
110
|
-
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
108
|
+
_call(transaction: import("alchemy-sdk").TransactionRequest, blockTag: import("alchemy-sdk").BlockTag, attempt: number): Promise<string>;
|
|
109
|
+
call(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<string>;
|
|
110
|
+
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("alchemy-sdk").BigNumber>;
|
|
111
111
|
_getAddress(addressOrName: string | Promise<string>): Promise<string>;
|
|
112
|
-
_getBlock(blockHashOrBlockTag: import("
|
|
113
|
-
getBlock(blockHashOrBlockTag: import("
|
|
114
|
-
getBlockWithTransactions(blockHashOrBlockTag: import("
|
|
115
|
-
getTransaction(transactionHash: string | Promise<string>): Promise<import("
|
|
116
|
-
getTransactionReceipt(transactionHash: string | Promise<string>): Promise<import("
|
|
117
|
-
getLogs(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("
|
|
112
|
+
_getBlock(blockHashOrBlockTag: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag>, includeTransactions?: boolean | undefined): Promise<import("alchemy-sdk").Block | import("alchemy-sdk").BlockWithTransactions>;
|
|
113
|
+
getBlock(blockHashOrBlockTag: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag>): Promise<import("alchemy-sdk").Block>;
|
|
114
|
+
getBlockWithTransactions(blockHashOrBlockTag: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag>): Promise<import("alchemy-sdk").BlockWithTransactions>;
|
|
115
|
+
getTransaction(transactionHash: string | Promise<string>): Promise<import("alchemy-sdk").TransactionResponse>;
|
|
116
|
+
getTransactionReceipt(transactionHash: string | Promise<string>): Promise<import("alchemy-sdk").TransactionReceipt>;
|
|
117
|
+
getLogs(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("alchemy-sdk").Log[]>;
|
|
118
118
|
getEtherPrice(): Promise<number>;
|
|
119
|
-
_getBlockTag(blockTag: import("
|
|
119
|
+
_getBlockTag(blockTag: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag>): Promise<import("alchemy-sdk").BlockTag>;
|
|
120
120
|
getResolver(name: string): Promise<import("@ethersproject/providers").Resolver | null>;
|
|
121
121
|
_getResolver(name: string, operation?: string | undefined): Promise<string>;
|
|
122
122
|
resolveName(name: string | Promise<string>): Promise<string | null>;
|
|
123
123
|
lookupAddress(address: string | Promise<string>): Promise<string | null>;
|
|
124
124
|
getAvatar(nameOrAddress: string): Promise<string | null>;
|
|
125
|
-
_addEventListener(eventName: import("
|
|
126
|
-
on(eventName: import("
|
|
127
|
-
once(eventName: import("
|
|
128
|
-
emit(eventName: import("
|
|
129
|
-
listenerCount(eventName?: import("
|
|
130
|
-
listeners(eventName?: import("
|
|
131
|
-
off(eventName: import("
|
|
132
|
-
removeAllListeners(eventName?: import("
|
|
133
|
-
getFeeData(): Promise<import("
|
|
134
|
-
addListener(eventName: import("
|
|
135
|
-
removeListener(eventName: import("
|
|
125
|
+
_addEventListener(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener, once: boolean): any;
|
|
126
|
+
on(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener): any;
|
|
127
|
+
once(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener): any;
|
|
128
|
+
emit(eventName: import("alchemy-sdk").EventType, ...args: any[]): boolean;
|
|
129
|
+
listenerCount(eventName?: import("alchemy-sdk").EventType | undefined): number;
|
|
130
|
+
listeners(eventName?: import("alchemy-sdk").EventType | undefined): import("@ethersproject/abstract-provider").Listener[];
|
|
131
|
+
off(eventName: import("alchemy-sdk").EventType, listener?: import("@ethersproject/abstract-provider").Listener | undefined): any;
|
|
132
|
+
removeAllListeners(eventName?: import("alchemy-sdk").EventType | undefined): any;
|
|
133
|
+
getFeeData(): Promise<import("alchemy-sdk").FeeData>;
|
|
134
|
+
addListener(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener): import("@ethersproject/abstract-provider").Provider;
|
|
135
|
+
removeListener(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener): import("@ethersproject/abstract-provider").Provider;
|
|
136
136
|
readonly _isProvider: boolean;
|
|
137
137
|
}>;
|
|
@@ -27,12 +27,12 @@ export declare function createLedgerUSBProvider({ chainId, rpcUrl, fetchGasPrice
|
|
|
27
27
|
_signTypedData(domain: import("ethers").TypedDataDomain, types: Record<string, import("ethers").TypedDataField[]>, value: Record<string, any>): Promise<string>;
|
|
28
28
|
unlock(password: string): Promise<boolean>;
|
|
29
29
|
readonly _isSigner: boolean;
|
|
30
|
-
getBalance(blockTag?: import("@ethersproject/abstract-provider").BlockTag | undefined): Promise<import("
|
|
30
|
+
getBalance(blockTag?: import("@ethersproject/abstract-provider").BlockTag | undefined): Promise<import("alchemy-sdk").BigNumber>;
|
|
31
31
|
getTransactionCount(blockTag?: import("@ethersproject/abstract-provider").BlockTag | undefined): Promise<number>;
|
|
32
|
-
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("
|
|
32
|
+
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("alchemy-sdk").BigNumber>;
|
|
33
33
|
call(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | undefined): Promise<string>;
|
|
34
34
|
getChainId(): Promise<number>;
|
|
35
|
-
getGasPrice(): Promise<import("
|
|
35
|
+
getGasPrice(): Promise<import("alchemy-sdk").BigNumber>;
|
|
36
36
|
getFeeData(): Promise<import("@ethersproject/abstract-provider").FeeData>;
|
|
37
37
|
resolveName(name: string): Promise<string>;
|
|
38
38
|
checkTransaction(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>;
|
|
@@ -87,26 +87,26 @@ export declare function createLedgerUSBProvider({ chainId, rpcUrl, fetchGasPrice
|
|
|
87
87
|
from: string;
|
|
88
88
|
nonce: number;
|
|
89
89
|
to: string;
|
|
90
|
-
value: import("
|
|
90
|
+
value: import("alchemy-sdk").BigNumber;
|
|
91
91
|
startBlock: number;
|
|
92
92
|
}): Promise<import("@ethersproject/abstract-provider").TransactionReceipt>;
|
|
93
93
|
getBlockNumber(): Promise<number>;
|
|
94
|
-
getGasPrice(): Promise<import("
|
|
95
|
-
getBalance(addressOrName: string | Promise<string>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<import("
|
|
94
|
+
getGasPrice(): Promise<import("alchemy-sdk").BigNumber>;
|
|
95
|
+
getBalance(addressOrName: string | Promise<string>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<import("alchemy-sdk").BigNumber>;
|
|
96
96
|
getTransactionCount(addressOrName: string | Promise<string>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<number>;
|
|
97
97
|
getCode(addressOrName: string | Promise<string>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<string>;
|
|
98
|
-
getStorageAt(addressOrName: string | Promise<string>, position: import("
|
|
98
|
+
getStorageAt(addressOrName: string | Promise<string>, position: import("alchemy-sdk").BigNumberish | Promise<import("alchemy-sdk").BigNumberish>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<string>;
|
|
99
99
|
_wrapTransaction(tx: import("ethers").Transaction, hash?: string | undefined, startBlock?: number | undefined): import("@ethersproject/abstract-provider").TransactionResponse;
|
|
100
100
|
sendTransaction(signedTransaction: string | Promise<string>): Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
|
|
101
101
|
_getTransactionRequest(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("ethers").Transaction>;
|
|
102
102
|
_getFilter(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>;
|
|
103
103
|
_call(transaction: import("@ethersproject/abstract-provider").TransactionRequest, blockTag: import("@ethersproject/abstract-provider").BlockTag, attempt: number): Promise<string>;
|
|
104
104
|
call(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<string>;
|
|
105
|
-
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("
|
|
105
|
+
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("alchemy-sdk").BigNumber>;
|
|
106
106
|
_getAddress(addressOrName: string | Promise<string>): Promise<string>;
|
|
107
|
-
_getBlock(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>, includeTransactions?: boolean | undefined): Promise<import("@ethersproject/abstract-provider").Block | import("
|
|
107
|
+
_getBlock(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>, includeTransactions?: boolean | undefined): Promise<import("@ethersproject/abstract-provider").Block | import("alchemy-sdk").BlockWithTransactions>;
|
|
108
108
|
getBlock(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>): Promise<import("@ethersproject/abstract-provider").Block>;
|
|
109
|
-
getBlockWithTransactions(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>): Promise<import("
|
|
109
|
+
getBlockWithTransactions(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>): Promise<import("alchemy-sdk").BlockWithTransactions>;
|
|
110
110
|
getTransaction(transactionHash: string | Promise<string>): Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
|
|
111
111
|
getTransactionReceipt(transactionHash: string | Promise<string>): Promise<import("@ethersproject/abstract-provider").TransactionReceipt>;
|
|
112
112
|
getLogs(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("@ethersproject/abstract-provider").Log[]>;
|
|
@@ -5,6 +5,7 @@ import { FetchGasPrice } from '../../helpers/transactions';
|
|
|
5
5
|
import type { WalletEntryOption } from '@particle-network/auth';
|
|
6
6
|
import { Wallet } from '../wallets';
|
|
7
7
|
import { ConnectEvents } from '../wallets/types';
|
|
8
|
+
import { AuthParams } from '@alchemy/aa-alchemy';
|
|
8
9
|
export type ConnectorParams = {
|
|
9
10
|
chainId?: number;
|
|
10
11
|
rpcUrl?: string;
|
|
@@ -64,4 +65,7 @@ export type ConnectorParams = {
|
|
|
64
65
|
appId?: string;
|
|
65
66
|
wallet?: WalletEntryOption;
|
|
66
67
|
};
|
|
68
|
+
alchemyParams?: {
|
|
69
|
+
authParams: AuthParams;
|
|
70
|
+
};
|
|
67
71
|
};
|
|
@@ -22,30 +22,30 @@ export default function connector(params: ConnectorParams, events: ConnectEvents
|
|
|
22
22
|
detectNetwork(): Promise<import("@ethersproject/networks").Network>;
|
|
23
23
|
_uncachedDetectNetwork(): Promise<import("@ethersproject/networks").Network>;
|
|
24
24
|
getUncheckedSigner(addressOrIndex?: string | number | undefined): {
|
|
25
|
-
sendTransaction(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
25
|
+
sendTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("alchemy-sdk").TransactionResponse>;
|
|
26
26
|
readonly provider: import("@ethersproject/providers").JsonRpcProvider;
|
|
27
27
|
_index: number;
|
|
28
28
|
_address: string;
|
|
29
29
|
connect(provider: import("@ethersproject/abstract-provider").Provider): import("@ethersproject/providers").JsonRpcSigner;
|
|
30
30
|
connectUnchecked(): import("@ethersproject/providers").JsonRpcSigner;
|
|
31
31
|
getAddress(): Promise<string>;
|
|
32
|
-
sendUncheckedTransaction(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
33
|
-
signTransaction(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
32
|
+
sendUncheckedTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<string>;
|
|
33
|
+
signTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<string>;
|
|
34
34
|
signMessage(message: string | import("ethers").Bytes): Promise<string>;
|
|
35
35
|
_legacySignMessage(message: string | import("ethers").Bytes): Promise<string>;
|
|
36
36
|
_signTypedData(domain: import("ethers").TypedDataDomain, types: Record<string, import("ethers").TypedDataField[]>, value: Record<string, any>): Promise<string>;
|
|
37
37
|
unlock(password: string): Promise<boolean>;
|
|
38
38
|
readonly _isSigner: boolean;
|
|
39
|
-
getBalance(blockTag?: import("
|
|
40
|
-
getTransactionCount(blockTag?: import("
|
|
41
|
-
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
42
|
-
call(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
39
|
+
getBalance(blockTag?: import("alchemy-sdk").BlockTag | undefined): Promise<import("alchemy-sdk").BigNumber>;
|
|
40
|
+
getTransactionCount(blockTag?: import("alchemy-sdk").BlockTag | undefined): Promise<number>;
|
|
41
|
+
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("alchemy-sdk").BigNumber>;
|
|
42
|
+
call(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>, blockTag?: import("alchemy-sdk").BlockTag | undefined): Promise<string>;
|
|
43
43
|
getChainId(): Promise<number>;
|
|
44
|
-
getGasPrice(): Promise<import("
|
|
45
|
-
getFeeData(): Promise<import("
|
|
44
|
+
getGasPrice(): Promise<import("alchemy-sdk").BigNumber>;
|
|
45
|
+
getFeeData(): Promise<import("alchemy-sdk").FeeData>;
|
|
46
46
|
resolveName(name: string): Promise<string>;
|
|
47
|
-
checkTransaction(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
48
|
-
populateTransaction(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
47
|
+
checkTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>;
|
|
48
|
+
populateTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("alchemy-sdk").TransactionRequest>;
|
|
49
49
|
_checkProvider(operation?: string | undefined): void;
|
|
50
50
|
};
|
|
51
51
|
send(method: string, params: any[]): Promise<any>;
|
|
@@ -90,53 +90,53 @@ export default function connector(params: ConnectorParams, events: ConnectEvents
|
|
|
90
90
|
pollingInterval: number;
|
|
91
91
|
_getFastBlockNumber(): Promise<number>;
|
|
92
92
|
_setFastBlockNumber(blockNumber: number): void;
|
|
93
|
-
waitForTransaction(transactionHash: string, confirmations?: number | undefined, timeout?: number | undefined): Promise<import("
|
|
93
|
+
waitForTransaction(transactionHash: string, confirmations?: number | undefined, timeout?: number | undefined): Promise<import("alchemy-sdk").TransactionReceipt>;
|
|
94
94
|
_waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: {
|
|
95
95
|
data: string;
|
|
96
96
|
from: string;
|
|
97
97
|
nonce: number;
|
|
98
98
|
to: string;
|
|
99
|
-
value: import("
|
|
99
|
+
value: import("alchemy-sdk").BigNumber;
|
|
100
100
|
startBlock: number;
|
|
101
|
-
}): Promise<import("
|
|
101
|
+
}): Promise<import("alchemy-sdk").TransactionReceipt>;
|
|
102
102
|
getBlockNumber(): Promise<number>;
|
|
103
|
-
getGasPrice(): Promise<import("
|
|
104
|
-
getBalance(addressOrName: string | Promise<string>, blockTag?: import("
|
|
105
|
-
getTransactionCount(addressOrName: string | Promise<string>, blockTag?: import("
|
|
106
|
-
getCode(addressOrName: string | Promise<string>, blockTag?: import("
|
|
107
|
-
getStorageAt(addressOrName: string | Promise<string>, position: import("
|
|
108
|
-
_wrapTransaction(tx: import("ethers").Transaction, hash?: string | undefined, startBlock?: number | undefined): import("
|
|
109
|
-
sendTransaction(signedTransaction: string | Promise<string>): Promise<import("
|
|
110
|
-
_getTransactionRequest(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
103
|
+
getGasPrice(): Promise<import("alchemy-sdk").BigNumber>;
|
|
104
|
+
getBalance(addressOrName: string | Promise<string>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<import("alchemy-sdk").BigNumber>;
|
|
105
|
+
getTransactionCount(addressOrName: string | Promise<string>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<number>;
|
|
106
|
+
getCode(addressOrName: string | Promise<string>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<string>;
|
|
107
|
+
getStorageAt(addressOrName: string | Promise<string>, position: import("alchemy-sdk").BigNumberish | Promise<import("alchemy-sdk").BigNumberish>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<string>;
|
|
108
|
+
_wrapTransaction(tx: import("ethers").Transaction, hash?: string | undefined, startBlock?: number | undefined): import("alchemy-sdk").TransactionResponse;
|
|
109
|
+
sendTransaction(signedTransaction: string | Promise<string>): Promise<import("alchemy-sdk").TransactionResponse>;
|
|
110
|
+
_getTransactionRequest(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("ethers").Transaction>;
|
|
111
111
|
_getFilter(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>;
|
|
112
|
-
_call(transaction: import("
|
|
113
|
-
call(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
114
|
-
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("
|
|
112
|
+
_call(transaction: import("alchemy-sdk").TransactionRequest, blockTag: import("alchemy-sdk").BlockTag, attempt: number): Promise<string>;
|
|
113
|
+
call(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<string>;
|
|
114
|
+
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("alchemy-sdk").BigNumber>;
|
|
115
115
|
_getAddress(addressOrName: string | Promise<string>): Promise<string>;
|
|
116
|
-
_getBlock(blockHashOrBlockTag: import("
|
|
117
|
-
getBlock(blockHashOrBlockTag: import("
|
|
118
|
-
getBlockWithTransactions(blockHashOrBlockTag: import("
|
|
119
|
-
getTransaction(transactionHash: string | Promise<string>): Promise<import("
|
|
120
|
-
getTransactionReceipt(transactionHash: string | Promise<string>): Promise<import("
|
|
121
|
-
getLogs(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("
|
|
116
|
+
_getBlock(blockHashOrBlockTag: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag>, includeTransactions?: boolean | undefined): Promise<import("alchemy-sdk").Block | import("alchemy-sdk").BlockWithTransactions>;
|
|
117
|
+
getBlock(blockHashOrBlockTag: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag>): Promise<import("alchemy-sdk").Block>;
|
|
118
|
+
getBlockWithTransactions(blockHashOrBlockTag: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag>): Promise<import("alchemy-sdk").BlockWithTransactions>;
|
|
119
|
+
getTransaction(transactionHash: string | Promise<string>): Promise<import("alchemy-sdk").TransactionResponse>;
|
|
120
|
+
getTransactionReceipt(transactionHash: string | Promise<string>): Promise<import("alchemy-sdk").TransactionReceipt>;
|
|
121
|
+
getLogs(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("alchemy-sdk").Log[]>;
|
|
122
122
|
getEtherPrice(): Promise<number>;
|
|
123
|
-
_getBlockTag(blockTag: import("
|
|
123
|
+
_getBlockTag(blockTag: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag>): Promise<import("alchemy-sdk").BlockTag>;
|
|
124
124
|
getResolver(name: string): Promise<import("@ethersproject/providers").Resolver | null>;
|
|
125
125
|
_getResolver(name: string, operation?: string | undefined): Promise<string>;
|
|
126
126
|
resolveName(name: string | Promise<string>): Promise<string | null>;
|
|
127
127
|
lookupAddress(address: string | Promise<string>): Promise<string | null>;
|
|
128
128
|
getAvatar(nameOrAddress: string): Promise<string | null>;
|
|
129
|
-
_addEventListener(eventName: import("
|
|
130
|
-
on(eventName: import("
|
|
131
|
-
once(eventName: import("
|
|
132
|
-
emit(eventName: import("
|
|
133
|
-
listenerCount(eventName?: import("
|
|
134
|
-
listeners(eventName?: import("
|
|
135
|
-
off(eventName: import("
|
|
136
|
-
removeAllListeners(eventName?: import("
|
|
137
|
-
getFeeData(): Promise<import("
|
|
138
|
-
addListener(eventName: import("
|
|
139
|
-
removeListener(eventName: import("
|
|
129
|
+
_addEventListener(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener, once: boolean): any;
|
|
130
|
+
on(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener): any;
|
|
131
|
+
once(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener): any;
|
|
132
|
+
emit(eventName: import("alchemy-sdk").EventType, ...args: any[]): boolean;
|
|
133
|
+
listenerCount(eventName?: import("alchemy-sdk").EventType | undefined): number;
|
|
134
|
+
listeners(eventName?: import("alchemy-sdk").EventType | undefined): import("@ethersproject/abstract-provider").Listener[];
|
|
135
|
+
off(eventName: import("alchemy-sdk").EventType, listener?: import("@ethersproject/abstract-provider").Listener | undefined): any;
|
|
136
|
+
removeAllListeners(eventName?: import("alchemy-sdk").EventType | undefined): any;
|
|
137
|
+
getFeeData(): Promise<import("alchemy-sdk").FeeData>;
|
|
138
|
+
addListener(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener): import("@ethersproject/abstract-provider").Provider;
|
|
139
|
+
removeListener(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener): import("@ethersproject/abstract-provider").Provider;
|
|
140
140
|
readonly _isProvider: boolean;
|
|
141
141
|
}>;
|
|
142
142
|
export declare function disconnectWallet(): void;
|
|
@@ -35,12 +35,12 @@ export declare function createProvider(connectorParams: ConnectorParams): Promis
|
|
|
35
35
|
_signTypedData(domain: import("ethers").TypedDataDomain, types: Record<string, import("ethers").TypedDataField[]>, value: Record<string, any>): Promise<string>;
|
|
36
36
|
unlock(password: string): Promise<boolean>;
|
|
37
37
|
readonly _isSigner: boolean;
|
|
38
|
-
getBalance(blockTag?: import("@ethersproject/abstract-provider").BlockTag | undefined): Promise<import("
|
|
38
|
+
getBalance(blockTag?: import("@ethersproject/abstract-provider").BlockTag | undefined): Promise<import("alchemy-sdk").BigNumber>;
|
|
39
39
|
getTransactionCount(blockTag?: import("@ethersproject/abstract-provider").BlockTag | undefined): Promise<number>;
|
|
40
|
-
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("
|
|
40
|
+
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("alchemy-sdk").BigNumber>;
|
|
41
41
|
call(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | undefined): Promise<string>;
|
|
42
42
|
getChainId(): Promise<number>;
|
|
43
|
-
getGasPrice(): Promise<import("
|
|
43
|
+
getGasPrice(): Promise<import("alchemy-sdk").BigNumber>;
|
|
44
44
|
getFeeData(): Promise<import("@ethersproject/abstract-provider").FeeData>;
|
|
45
45
|
resolveName(name: string): Promise<string>;
|
|
46
46
|
checkTransaction(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>;
|
|
@@ -95,26 +95,26 @@ export declare function createProvider(connectorParams: ConnectorParams): Promis
|
|
|
95
95
|
from: string;
|
|
96
96
|
nonce: number;
|
|
97
97
|
to: string;
|
|
98
|
-
value: import("
|
|
98
|
+
value: import("alchemy-sdk").BigNumber;
|
|
99
99
|
startBlock: number;
|
|
100
100
|
}): Promise<import("@ethersproject/abstract-provider").TransactionReceipt>;
|
|
101
101
|
getBlockNumber(): Promise<number>;
|
|
102
|
-
getGasPrice(): Promise<import("
|
|
103
|
-
getBalance(addressOrName: string | Promise<string>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<import("
|
|
102
|
+
getGasPrice(): Promise<import("alchemy-sdk").BigNumber>;
|
|
103
|
+
getBalance(addressOrName: string | Promise<string>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<import("alchemy-sdk").BigNumber>;
|
|
104
104
|
getTransactionCount(addressOrName: string | Promise<string>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<number>;
|
|
105
105
|
getCode(addressOrName: string | Promise<string>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<string>;
|
|
106
|
-
getStorageAt(addressOrName: string | Promise<string>, position: import("
|
|
106
|
+
getStorageAt(addressOrName: string | Promise<string>, position: import("alchemy-sdk").BigNumberish | Promise<import("alchemy-sdk").BigNumberish>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<string>;
|
|
107
107
|
_wrapTransaction(tx: import("ethers").Transaction, hash?: string | undefined, startBlock?: number | undefined): import("@ethersproject/abstract-provider").TransactionResponse;
|
|
108
108
|
sendTransaction(signedTransaction: string | Promise<string>): Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
|
|
109
109
|
_getTransactionRequest(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("ethers").Transaction>;
|
|
110
110
|
_getFilter(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>;
|
|
111
111
|
_call(transaction: import("@ethersproject/abstract-provider").TransactionRequest, blockTag: import("@ethersproject/abstract-provider").BlockTag, attempt: number): Promise<string>;
|
|
112
112
|
call(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<string>;
|
|
113
|
-
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("
|
|
113
|
+
estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("alchemy-sdk").BigNumber>;
|
|
114
114
|
_getAddress(addressOrName: string | Promise<string>): Promise<string>;
|
|
115
|
-
_getBlock(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>, includeTransactions?: boolean | undefined): Promise<import("@ethersproject/abstract-provider").Block | import("
|
|
115
|
+
_getBlock(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>, includeTransactions?: boolean | undefined): Promise<import("@ethersproject/abstract-provider").Block | import("alchemy-sdk").BlockWithTransactions>;
|
|
116
116
|
getBlock(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>): Promise<import("@ethersproject/abstract-provider").Block>;
|
|
117
|
-
getBlockWithTransactions(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>): Promise<import("
|
|
117
|
+
getBlockWithTransactions(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>): Promise<import("alchemy-sdk").BlockWithTransactions>;
|
|
118
118
|
getTransaction(transactionHash: string | Promise<string>): Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
|
|
119
119
|
getTransactionReceipt(transactionHash: string | Promise<string>): Promise<import("@ethersproject/abstract-provider").TransactionReceipt>;
|
|
120
120
|
getLogs(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("@ethersproject/abstract-provider").Log[]>;
|
|
@@ -33,6 +33,7 @@ export declare const allWalletObject: {
|
|
|
33
33
|
Gate: Wallet;
|
|
34
34
|
Rabby: Wallet;
|
|
35
35
|
SocialLogin: Wallet;
|
|
36
|
+
Alchemy: Wallet;
|
|
36
37
|
MetamaskWallet: Wallet;
|
|
37
38
|
};
|
|
38
39
|
export declare const standaloneList: Wallet[];
|
|
@@ -70,7 +71,7 @@ export declare const OpenBlockIframeWallet: {
|
|
|
70
71
|
account: string;
|
|
71
72
|
typedData: Record<string, unknown>;
|
|
72
73
|
}) => Promise<string | null>) | undefined;
|
|
73
|
-
sendTransaction?: ((params: import("./types").Deferrable<import("
|
|
74
|
+
sendTransaction?: ((params: import("./types").Deferrable<import("alchemy-sdk").TransactionRequest>) => Promise<any>) | undefined;
|
|
74
75
|
} | undefined;
|
|
75
76
|
notSupported?: {
|
|
76
77
|
sign?: boolean | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./index-db36b0fa.cjs"),r=require("./index.es-e3bf027a.cjs");require("@ethersproject/address"),require("@ethersproject/providers"),require("zustand"),require("events"),require("@ethersproject/bytes"),require("@ethersproject/properties"),require("@ethersproject/abstract-signer"),require("buffer"),require("@ethersproject/abstract-provider"),require("@ethersproject/contracts"),require("@ethersproject/constants"),require("@ethersproject/transactions"),require("./_commonjs-dynamic-modules-f09a98c7.cjs"),exports.default=function({chainId:o,rpcUrl:t,rpc:n,walletConnectParams:i,darkMode:c},a){return e.__awaiter(this,void 0,void 0,(function*(){let s,d,u="wss://relay.walletconnect.com",l=!0;i&&(u=i.bridge||u,l=void 0!==i.qrcode?i.qrcode:l,i.infuraId,d=i.qrModalOptions||void 0),n?s=n:o&&t&&(s={[o]:t});const p=e.getIsMobile(),h=yield r.EthereumProvider.init({projectId:"59e050d1f27ed617e65bb9637c9498d6",chains:o?[o]:[],showQrModal:!p,rpcMap:s,qrModalOptions:Object.assign({themeMode:c?"dark":"light"},d)});return h.on("display_uri",(e=>{(null==d?void 0:d.openCallback)&&d.openCallback(e)})),h.on("connect",a.connect),h.on("disconnect",(e=>{a.disconnect(e),a.accountsChanged([])})),h.on("accountsChanged",a.accountsChanged),h.on("chainChanged",a.chainChanged),h.on("message",(({type:e,data:r})=>a.message(e,r))),new Promise((r=>e.__awaiter(this,void 0,void 0,(function*(){p?(h.once("display_uri",(o=>{let t=o;e.getIsIOS()&&(t=`rainbow://wc?uri=${encodeURIComponent(o)}&connector=rainbowkit`),window.location.href=t,r(e.convertWeb3Provider(h))})),h.enable()):(yield h.enable(),r(e.convertWeb3Provider(h)))}))))}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,r=require("./index-db36b0fa.cjs"),i=require("./sha256-0f5b78af.cjs"),a={exports:{}};exports.requireSha224=function(){return e||(e=1,t=a,r.commonjsGlobal,t.exports=(l=i.requireCore(),i.requireSha256(),s=(o=l).lib.WordArray,n=o.algo,c=n.SHA256,u=n.SHA224=c.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=c._doFinalize.call(this);return e.sigBytes-=4,e}}),o.SHA224=c._createHelper(u),o.HmacSHA224=c._createHmacHelper(u),l.SHA224)),a.exports;var t,o,s,n,c,u,l};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var t,n=require("./index-db36b0fa.cjs"),e=require("./_commonjs-dynamic-modules-f09a98c7.cjs"),r={exports:{}};function i(){return t||(t=1,i=r,n.commonjsGlobal,i.exports=(o=o||function(t,r){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==n.commonjsGlobal&&n.commonjsGlobal.crypto&&(i=n.commonjsGlobal.crypto),!i&&"function"==typeof e.commonjsRequire)try{i=n.require$$1}catch(t){}var o=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function t(){}return function(n){var e;return t.prototype=n,e=new t,t.prototype=null,e}}(),a={},c=a.lib={},u=c.Base={extend:function(t){var n=s(this);return t&&n.mixIn(t),n.hasOwnProperty("init")&&this.init!==n.init||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},f=c.WordArray=u.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=r?n:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var n=this.words,e=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=e[o>>>2]>>>24-o%4*8&255;n[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var a=0;a<i;a+=4)n[r+a>>>2]=e[a>>>2];return this.sigBytes+=i,this},clamp:function(){var n=this.words,e=this.sigBytes;n[e>>>2]&=4294967295<<32-e%4*8,n.length=t.ceil(e/4)},clone:function(){var t=u.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var n=[],e=0;e<t;e+=4)n.push(o());return new f.init(n,t)}}),h=a.enc={},l=h.Hex={stringify:function(t){for(var n=t.words,e=t.sigBytes,r=[],i=0;i<e;i++){var o=n[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var n=t.length,e=[],r=0;r<n;r+=2)e[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new f.init(e,n/2)}},p=h.Latin1={stringify:function(t){for(var n=t.words,e=t.sigBytes,r=[],i=0;i<e;i++){var o=n[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var n=t.length,e=[],r=0;r<n;r++)e[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new f.init(e,n)}},d=h.Utf8={stringify:function(t){try{return decodeURIComponent(escape(p.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return p.parse(unescape(encodeURIComponent(t)))}},y=c.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(n){var e,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=n?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*s,u=t.min(4*c,o);if(c){for(var h=0;h<c;h+=s)this._doProcessBlock(i,h);e=i.splice(0,c),r.sigBytes-=u}return new f.init(e,u)},clone:function(){var t=u.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});c.Hasher=y.extend({cfg:u.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){y.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(n,e){return new t.init(e).finalize(n)}},_createHmacHelper:function(t){return function(n,e){return new g.HMAC.init(t,e).finalize(n)}}});var g=a.algo={};return a}(Math),o)),r.exports;var i,o}var o,s={exports:{}};exports.requireCore=i,exports.requireSha256=function(){return o||(o=1,t=s,n.commonjsGlobal,t.exports=(e=i(),function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[],c=[];!function(){function n(n){for(var e=t.sqrt(n),r=2;r<=e;r++)if(!(n%r))return!1;return!0}function e(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)n(r)&&(i<8&&(a[i]=e(t.pow(r,.5))),c[i]=e(t.pow(r,1/3)),i++),r++}();var u=[],f=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(t,n){for(var e=this._hash.words,r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],f=e[5],h=e[6],l=e[7],p=0;p<64;p++){if(p<16)u[p]=0|t[n+p];else{var d=u[p-15],y=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,g=u[p-2],m=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;u[p]=y+u[p-7]+m+u[p-16]}var w=r&i^r&o^i&o,v=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),_=l+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&f^~a&h)+c[p]+u[p];l=h,h=f,f=a,a=s+_|0,s=o,o=i,i=r,r=_+(v+w)|0}e[0]=e[0]+r|0,e[1]=e[1]+i|0,e[2]=e[2]+o|0,e[3]=e[3]+s|0,e[4]=e[4]+a|0,e[5]=e[5]+f|0,e[6]=e[6]+h|0,e[7]=e[7]+l|0},_doFinalize:function(){var n=this._data,e=n.words,r=8*this._nDataBytes,i=8*n.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=t.floor(r/4294967296),e[15+(i+64>>>9<<4)]=r,n.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});n.SHA256=o._createHelper(f),n.HmacSHA256=o._createHmacHelper(f)}(Math),e.SHA256)),s.exports;var t,e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var t=require("@ethersproject/address"),r=require("@ethersproject/bytes"),e=require("./index-db36b0fa.cjs"),n=require("@ethersproject/properties"),i=require("./id-0b41bc31.cjs");const o="hash/5.7.0";var a=function(t,r,e,n){return new(e||(e=Promise))((function(i,o){function a(t){try{c(n.next(t))}catch(t){o(t)}}function s(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var r;t.done?i(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(a,s)}c((n=n.apply(t,r||[])).next())}))};const s=new e.Logger(o),c=new Uint8Array(32);c.fill(0);const f=e.BigNumber.from(-1),u=e.BigNumber.from(0),h=e.BigNumber.from(1),y=e.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const m=r.hexZeroPad(h.toHexString(),32),d=r.hexZeroPad(u.toHexString(),32),g={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},p=["name","version","chainId","verifyingContract","salt"];function l(t){return function(r){return"string"!=typeof r&&s.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,r),r}}const v={name:l("name"),version:l("version"),chainId:function(t){try{return e.BigNumber.from(t).toString()}catch(t){}return s.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(r){try{return t.getAddress(r).toLowerCase()}catch(t){}return s.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",r)},salt:function(t){try{const e=r.arrayify(t);if(32!==e.length)throw new Error("bad length");return r.hexlify(e)}catch(t){}return s.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function w(n){{const t=n.match(/^(u?)int(\d*)$/);if(t){const i=""===t[1],o=parseInt(t[2]||"256");(o%8!=0||o>256||t[2]&&t[2]!==String(o))&&s.throwArgumentError("invalid numeric width","type",n);const a=y.mask(i?o-1:o),c=i?a.add(h).mul(f):u;return function(t){const i=e.BigNumber.from(t);return(i.lt(c)||i.gt(a))&&s.throwArgumentError(`value out-of-bounds for ${n}`,"value",t),r.hexZeroPad(i.toTwos(256).toHexString(),32)}}}{const t=n.match(/^bytes(\d+)$/);if(t){const e=parseInt(t[1]);return(0===e||e>32||t[1]!==String(e))&&s.throwArgumentError("invalid bytes width","type",n),function(t){return r.arrayify(t).length!==e&&s.throwArgumentError(`invalid length for ${n}`,"value",t),function(t){const e=r.arrayify(t),n=e.length%32;return n?r.hexConcat([e,c.slice(n)]):r.hexlify(e)}(t)}}}switch(n){case"address":return function(e){return r.hexZeroPad(t.getAddress(e),32)};case"bool":return function(t){return t?m:d};case"bytes":return function(t){return e.keccak256(t)};case"string":return function(t){return i.id(t)}}return null}function E(t,r){return`${t}(${r.map((({name:t,type:r})=>r+" "+t)).join(",")})`}class x{constructor(t){n.defineReadOnly(this,"types",Object.freeze(n.deepCopy(t))),n.defineReadOnly(this,"_encoderCache",{}),n.defineReadOnly(this,"_types",{});const r={},e={},i={};Object.keys(t).forEach((t=>{r[t]={},e[t]=[],i[t]={}}));for(const n in t){const i={};t[n].forEach((o=>{i[o.name]&&s.throwArgumentError(`duplicate variable name ${JSON.stringify(o.name)} in ${JSON.stringify(n)}`,"types",t),i[o.name]=!0;const a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===n&&s.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",t);w(a)||(e[a]||s.throwArgumentError(`unknown type ${JSON.stringify(a)}`,"types",t),e[a].push(n),r[n][a]=!0)}))}const o=Object.keys(e).filter((t=>0===e[t].length));0===o.length?s.throwArgumentError("missing primary type","types",t):o.length>1&&s.throwArgumentError(`ambiguous primary types or unused types: ${o.map((t=>JSON.stringify(t))).join(", ")}`,"types",t),n.defineReadOnly(this,"primaryType",o[0]),function n(o,a){a[o]&&s.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",t),a[o]=!0,Object.keys(r[o]).forEach((t=>{e[t]&&(n(t,a),Object.keys(a).forEach((r=>{i[r][t]=!0})))})),delete a[o]}(this.primaryType,{});for(const r in i){const e=Object.keys(i[r]);e.sort(),this._types[r]=E(r,t[r])+e.map((r=>E(r,t[r]))).join("")}}getEncoder(t){let r=this._encoderCache[t];return r||(r=this._encoderCache[t]=this._getEncoder(t)),r}_getEncoder(t){{const r=w(t);if(r)return r}const n=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const t=n[1],i=this.getEncoder(t),o=parseInt(n[3]);return n=>{o>=0&&n.length!==o&&s.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",n);let a=n.map(i);return this._types[t]&&(a=a.map(e.keccak256)),e.keccak256(r.hexConcat(a))}}const o=this.types[t];if(o){const n=i.id(this._types[t]);return t=>{const i=o.map((({name:r,type:n})=>{const i=this.getEncoder(n)(t[r]);return this._types[n]?e.keccak256(i):i}));return i.unshift(n),r.hexConcat(i)}}return s.throwArgumentError(`unknown type: ${t}`,"type",t)}encodeType(t){const r=this._types[t];return r||s.throwArgumentError(`unknown type: ${JSON.stringify(t)}`,"name",t),r}encodeData(t,r){return this.getEncoder(t)(r)}hashStruct(t,r){return e.keccak256(this.encodeData(t,r))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,r,e){if(w(t))return e(t,r);const n=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const t=n[1],i=parseInt(n[3]);return i>=0&&r.length!==i&&s.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map((r=>this._visit(t,r,e)))}const i=this.types[t];return i?i.reduce(((t,{name:n,type:i})=>(t[n]=this._visit(i,r[n],e),t)),{}):s.throwArgumentError(`unknown type: ${t}`,"type",t)}visit(t,r){return this._visit(this.primaryType,t,r)}static from(t){return new x(t)}static getPrimaryType(t){return x.from(t).primaryType}static hashStruct(t,r,e){return x.from(r).hashStruct(t,e)}static hashDomain(t){const r=[];for(const e in t){const n=g[e];n||s.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(e)}`,"domain",t),r.push({name:e,type:n})}return r.sort(((t,r)=>p.indexOf(t.name)-p.indexOf(r.name))),x.hashStruct("EIP712Domain",{EIP712Domain:r},t)}static encode(t,e,n){return r.hexConcat(["0x1901",x.hashDomain(t),x.from(e).hash(n)])}static hash(t,r,n){return e.keccak256(x.encode(t,r,n))}static resolveNames(t,e,i,o){return a(this,void 0,void 0,(function*(){t=n.shallowCopy(t);const a={};t.verifyingContract&&!r.isHexString(t.verifyingContract,20)&&(a[t.verifyingContract]="0x");const s=x.from(e);s.visit(i,((t,e)=>("address"!==t||r.isHexString(e,20)||(a[e]="0x"),e)));for(const t in a)a[t]=yield o(t);return t.verifyingContract&&a[t.verifyingContract]&&(t.verifyingContract=a[t.verifyingContract]),i=s.visit(i,((t,r)=>"address"===t&&a[r]?a[r]:r)),{domain:t,value:i}}))}static getPayload(t,i,o){x.hashDomain(t);const a={},c=[];p.forEach((r=>{const e=t[r];null!=e&&(a[r]=v[r](e),c.push({name:r,type:g[r]}))}));const f=x.from(i),u=n.shallowCopy(i);return u.EIP712Domain?s.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",i):u.EIP712Domain=c,f.encode(o),{types:u,domain:a,primaryType:f.primaryType,message:f.visit(o,((t,n)=>{if(t.match(/^bytes(\d*)/))return r.hexlify(r.arrayify(n));if(t.match(/^u?int/))return e.BigNumber.from(n).toString();switch(t){case"address":return n.toLowerCase();case"bool":return!!n;case"string":return"string"!=typeof n&&s.throwArgumentError("invalid string","value",n),n}return s.throwArgumentError("unsupported type","type",t)}))}}}exports.TypedDataEncoder=x,exports.version=o;
|