@swapkit/toolboxes 4.3.7 → 4.3.8
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/src/evm/index.cjs +2 -2
- package/dist/src/evm/index.cjs.map +7 -7
- package/dist/src/evm/index.js +2 -2
- package/dist/src/evm/index.js.map +7 -7
- package/dist/src/index.cjs +3 -3
- package/dist/src/index.cjs.map +12 -12
- package/dist/src/index.js +3 -3
- package/dist/src/index.js.map +12 -12
- package/dist/src/near/index.cjs +2 -2
- package/dist/src/near/index.cjs.map +3 -3
- package/dist/src/near/index.js +2 -2
- package/dist/src/near/index.js.map +3 -3
- package/dist/src/radix/index.cjs +2 -2
- package/dist/src/radix/index.cjs.map +3 -3
- package/dist/src/radix/index.js +2 -2
- package/dist/src/radix/index.js.map +3 -3
- package/dist/src/solana/index.cjs +2 -2
- package/dist/src/solana/index.cjs.map +3 -3
- package/dist/src/solana/index.js +2 -2
- package/dist/src/solana/index.js.map +3 -3
- package/dist/src/substrate/index.cjs +2 -2
- package/dist/src/substrate/index.cjs.map +3 -3
- package/dist/src/substrate/index.js +2 -2
- package/dist/src/substrate/index.js.map +3 -3
- package/dist/src/sui/index.cjs +2 -2
- package/dist/src/sui/index.cjs.map +3 -3
- package/dist/src/sui/index.js +2 -2
- package/dist/src/sui/index.js.map +3 -3
- package/dist/src/ton/index.cjs +2 -2
- package/dist/src/ton/index.cjs.map +3 -3
- package/dist/src/ton/index.js +2 -2
- package/dist/src/ton/index.js.map +3 -3
- package/dist/src/utxo/index.cjs +3 -3
- package/dist/src/utxo/index.cjs.map +3 -3
- package/dist/src/utxo/index.js +3 -3
- package/dist/src/utxo/index.js.map +3 -3
- package/dist/types/evm/helpers.d.ts +1 -1
- package/dist/types/evm/helpers.d.ts.map +1 -1
- package/dist/types/evm/toolbox/baseEVMToolbox.d.ts +2 -0
- package/dist/types/evm/toolbox/baseEVMToolbox.d.ts.map +1 -1
- package/dist/types/evm/toolbox/evm.d.ts +38 -38
- package/dist/types/evm/toolbox/evm.d.ts.map +1 -1
- package/dist/types/evm/toolbox/op.d.ts +2 -14
- package/dist/types/evm/toolbox/op.d.ts.map +1 -1
- package/dist/types/radix/index.d.ts.map +1 -1
- package/dist/types/solana/toolbox.d.ts.map +1 -1
- package/dist/types/sui/toolbox.d.ts.map +1 -1
- package/dist/types/utils.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/evm/helpers.ts +7 -9
- package/src/evm/toolbox/baseEVMToolbox.ts +4 -1
- package/src/evm/toolbox/evm.ts +2 -3
- package/src/evm/toolbox/op.ts +1 -21
- package/src/radix/index.ts +7 -1
- package/src/solana/toolbox.ts +2 -8
- package/src/substrate/balance.ts +2 -2
- package/src/sui/toolbox.ts +4 -3
- package/src/ton/toolbox.ts +2 -2
- package/src/utils.ts +8 -1
|
@@ -5,8 +5,6 @@ export declare function ETHToolbox({ provider, ...signer }: EVMToolboxParams): P
|
|
|
5
5
|
address: string;
|
|
6
6
|
data: string;
|
|
7
7
|
}[], multicallAddress?: string, funcName?: string, feeOptionKey?: FeeOption) => Promise<string>;
|
|
8
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
9
|
-
getNetworkParams: () => undefined;
|
|
10
8
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
11
9
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
12
10
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -36,6 +34,8 @@ export declare function ETHToolbox({ provider, ...signer }: EVMToolboxParams): P
|
|
|
36
34
|
chain: EVMChain;
|
|
37
35
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
38
36
|
getAddress: () => string | Promise<string> | undefined;
|
|
37
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
38
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
39
39
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
40
40
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
41
41
|
feeOptionKey?: FeeOption;
|
|
@@ -45,8 +45,6 @@ export declare function ETHToolbox({ provider, ...signer }: EVMToolboxParams): P
|
|
|
45
45
|
validateAddress: (address: string) => boolean;
|
|
46
46
|
}>;
|
|
47
47
|
export declare const ARBToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
48
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
49
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
50
48
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
51
49
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
52
50
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -76,6 +74,8 @@ export declare const ARBToolbox: ({ provider: providerParam, ...toolboxSignerPar
|
|
|
76
74
|
chain: EVMChain;
|
|
77
75
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
78
76
|
getAddress: () => string | Promise<string> | undefined;
|
|
77
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
78
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
79
79
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
80
80
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
81
81
|
feeOptionKey?: FeeOption;
|
|
@@ -85,8 +85,6 @@ export declare const ARBToolbox: ({ provider: providerParam, ...toolboxSignerPar
|
|
|
85
85
|
validateAddress: (address: string) => boolean;
|
|
86
86
|
}>;
|
|
87
87
|
export declare const AURORAToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
88
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
89
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
90
88
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
91
89
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
92
90
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -116,6 +114,8 @@ export declare const AURORAToolbox: ({ provider: providerParam, ...toolboxSigner
|
|
|
116
114
|
chain: EVMChain;
|
|
117
115
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
118
116
|
getAddress: () => string | Promise<string> | undefined;
|
|
117
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
118
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
119
119
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
120
120
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
121
121
|
feeOptionKey?: FeeOption;
|
|
@@ -125,8 +125,6 @@ export declare const AURORAToolbox: ({ provider: providerParam, ...toolboxSigner
|
|
|
125
125
|
validateAddress: (address: string) => boolean;
|
|
126
126
|
}>;
|
|
127
127
|
export declare const AVAXToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
128
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
129
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
130
128
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
131
129
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
132
130
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -156,6 +154,8 @@ export declare const AVAXToolbox: ({ provider: providerParam, ...toolboxSignerPa
|
|
|
156
154
|
chain: EVMChain;
|
|
157
155
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
158
156
|
getAddress: () => string | Promise<string> | undefined;
|
|
157
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
158
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
159
159
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
160
160
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
161
161
|
feeOptionKey?: FeeOption;
|
|
@@ -165,8 +165,6 @@ export declare const AVAXToolbox: ({ provider: providerParam, ...toolboxSignerPa
|
|
|
165
165
|
validateAddress: (address: string) => boolean;
|
|
166
166
|
}>;
|
|
167
167
|
export declare const BASEToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
168
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
169
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
170
168
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
171
169
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
172
170
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -196,6 +194,8 @@ export declare const BASEToolbox: ({ provider: providerParam, ...toolboxSignerPa
|
|
|
196
194
|
chain: EVMChain;
|
|
197
195
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
198
196
|
getAddress: () => string | Promise<string> | undefined;
|
|
197
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
198
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
199
199
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
200
200
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
201
201
|
feeOptionKey?: FeeOption;
|
|
@@ -205,8 +205,6 @@ export declare const BASEToolbox: ({ provider: providerParam, ...toolboxSignerPa
|
|
|
205
205
|
validateAddress: (address: string) => boolean;
|
|
206
206
|
}>;
|
|
207
207
|
export declare const BERAToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
208
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
209
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
210
208
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
211
209
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
212
210
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -236,6 +234,8 @@ export declare const BERAToolbox: ({ provider: providerParam, ...toolboxSignerPa
|
|
|
236
234
|
chain: EVMChain;
|
|
237
235
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
238
236
|
getAddress: () => string | Promise<string> | undefined;
|
|
237
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
238
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
239
239
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
240
240
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
241
241
|
feeOptionKey?: FeeOption;
|
|
@@ -245,8 +245,6 @@ export declare const BERAToolbox: ({ provider: providerParam, ...toolboxSignerPa
|
|
|
245
245
|
validateAddress: (address: string) => boolean;
|
|
246
246
|
}>;
|
|
247
247
|
export declare const BSCToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
248
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
249
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
250
248
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
251
249
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
252
250
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -276,6 +274,8 @@ export declare const BSCToolbox: ({ provider: providerParam, ...toolboxSignerPar
|
|
|
276
274
|
chain: EVMChain;
|
|
277
275
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
278
276
|
getAddress: () => string | Promise<string> | undefined;
|
|
277
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
278
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
279
279
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
280
280
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
281
281
|
feeOptionKey?: FeeOption;
|
|
@@ -285,8 +285,6 @@ export declare const BSCToolbox: ({ provider: providerParam, ...toolboxSignerPar
|
|
|
285
285
|
validateAddress: (address: string) => boolean;
|
|
286
286
|
}>;
|
|
287
287
|
export declare const BotanixToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
288
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
289
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
290
288
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
291
289
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
292
290
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -316,6 +314,8 @@ export declare const BotanixToolbox: ({ provider: providerParam, ...toolboxSigne
|
|
|
316
314
|
chain: EVMChain;
|
|
317
315
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
318
316
|
getAddress: () => string | Promise<string> | undefined;
|
|
317
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
318
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
319
319
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
320
320
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
321
321
|
feeOptionKey?: FeeOption;
|
|
@@ -325,8 +325,6 @@ export declare const BotanixToolbox: ({ provider: providerParam, ...toolboxSigne
|
|
|
325
325
|
validateAddress: (address: string) => boolean;
|
|
326
326
|
}>;
|
|
327
327
|
export declare const COREToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
328
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
329
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
330
328
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
331
329
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
332
330
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -356,6 +354,8 @@ export declare const COREToolbox: ({ provider: providerParam, ...toolboxSignerPa
|
|
|
356
354
|
chain: EVMChain;
|
|
357
355
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
358
356
|
getAddress: () => string | Promise<string> | undefined;
|
|
357
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
358
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
359
359
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
360
360
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
361
361
|
feeOptionKey?: FeeOption;
|
|
@@ -365,8 +365,6 @@ export declare const COREToolbox: ({ provider: providerParam, ...toolboxSignerPa
|
|
|
365
365
|
validateAddress: (address: string) => boolean;
|
|
366
366
|
}>;
|
|
367
367
|
export declare const CORNToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
368
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
369
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
370
368
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
371
369
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
372
370
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -396,6 +394,8 @@ export declare const CORNToolbox: ({ provider: providerParam, ...toolboxSignerPa
|
|
|
396
394
|
chain: EVMChain;
|
|
397
395
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
398
396
|
getAddress: () => string | Promise<string> | undefined;
|
|
397
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
398
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
399
399
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
400
400
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
401
401
|
feeOptionKey?: FeeOption;
|
|
@@ -405,8 +405,6 @@ export declare const CORNToolbox: ({ provider: providerParam, ...toolboxSignerPa
|
|
|
405
405
|
validateAddress: (address: string) => boolean;
|
|
406
406
|
}>;
|
|
407
407
|
export declare const CROToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
408
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
409
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
410
408
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
411
409
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
412
410
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -436,6 +434,8 @@ export declare const CROToolbox: ({ provider: providerParam, ...toolboxSignerPar
|
|
|
436
434
|
chain: EVMChain;
|
|
437
435
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
438
436
|
getAddress: () => string | Promise<string> | undefined;
|
|
437
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
438
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
439
439
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
440
440
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
441
441
|
feeOptionKey?: FeeOption;
|
|
@@ -445,8 +445,6 @@ export declare const CROToolbox: ({ provider: providerParam, ...toolboxSignerPar
|
|
|
445
445
|
validateAddress: (address: string) => boolean;
|
|
446
446
|
}>;
|
|
447
447
|
export declare const GNOToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
448
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
449
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
450
448
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
451
449
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
452
450
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -476,6 +474,8 @@ export declare const GNOToolbox: ({ provider: providerParam, ...toolboxSignerPar
|
|
|
476
474
|
chain: EVMChain;
|
|
477
475
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
478
476
|
getAddress: () => string | Promise<string> | undefined;
|
|
477
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
478
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
479
479
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
480
480
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
481
481
|
feeOptionKey?: FeeOption;
|
|
@@ -485,8 +485,6 @@ export declare const GNOToolbox: ({ provider: providerParam, ...toolboxSignerPar
|
|
|
485
485
|
validateAddress: (address: string) => boolean;
|
|
486
486
|
}>;
|
|
487
487
|
export declare const HYPEREVMToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
488
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
489
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
490
488
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
491
489
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
492
490
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -516,6 +514,8 @@ export declare const HYPEREVMToolbox: ({ provider: providerParam, ...toolboxSign
|
|
|
516
514
|
chain: EVMChain;
|
|
517
515
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
518
516
|
getAddress: () => string | Promise<string> | undefined;
|
|
517
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
518
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
519
519
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
520
520
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
521
521
|
feeOptionKey?: FeeOption;
|
|
@@ -525,8 +525,6 @@ export declare const HYPEREVMToolbox: ({ provider: providerParam, ...toolboxSign
|
|
|
525
525
|
validateAddress: (address: string) => boolean;
|
|
526
526
|
}>;
|
|
527
527
|
export declare const MATICToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
528
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
529
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
530
528
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
531
529
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
532
530
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -556,6 +554,8 @@ export declare const MATICToolbox: ({ provider: providerParam, ...toolboxSignerP
|
|
|
556
554
|
chain: EVMChain;
|
|
557
555
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
558
556
|
getAddress: () => string | Promise<string> | undefined;
|
|
557
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
558
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
559
559
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
560
560
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
561
561
|
feeOptionKey?: FeeOption;
|
|
@@ -565,8 +565,6 @@ export declare const MATICToolbox: ({ provider: providerParam, ...toolboxSignerP
|
|
|
565
565
|
validateAddress: (address: string) => boolean;
|
|
566
566
|
}>;
|
|
567
567
|
export declare const SONICToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
568
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
569
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
570
568
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
571
569
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
572
570
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -596,6 +594,8 @@ export declare const SONICToolbox: ({ provider: providerParam, ...toolboxSignerP
|
|
|
596
594
|
chain: EVMChain;
|
|
597
595
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
598
596
|
getAddress: () => string | Promise<string> | undefined;
|
|
597
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
598
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
599
599
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
600
600
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
601
601
|
feeOptionKey?: FeeOption;
|
|
@@ -605,8 +605,6 @@ export declare const SONICToolbox: ({ provider: providerParam, ...toolboxSignerP
|
|
|
605
605
|
validateAddress: (address: string) => boolean;
|
|
606
606
|
}>;
|
|
607
607
|
export declare const UNIToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
608
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
609
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
610
608
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
611
609
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
612
610
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -636,6 +634,8 @@ export declare const UNIToolbox: ({ provider: providerParam, ...toolboxSignerPar
|
|
|
636
634
|
chain: EVMChain;
|
|
637
635
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
638
636
|
getAddress: () => string | Promise<string> | undefined;
|
|
637
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
638
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
639
639
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
640
640
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
641
641
|
feeOptionKey?: FeeOption;
|
|
@@ -645,8 +645,6 @@ export declare const UNIToolbox: ({ provider: providerParam, ...toolboxSignerPar
|
|
|
645
645
|
validateAddress: (address: string) => boolean;
|
|
646
646
|
}>;
|
|
647
647
|
export declare const XLayerToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
648
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
649
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
650
648
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
651
649
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
652
650
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -676,6 +674,8 @@ export declare const XLayerToolbox: ({ provider: providerParam, ...toolboxSigner
|
|
|
676
674
|
chain: EVMChain;
|
|
677
675
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
678
676
|
getAddress: () => string | Promise<string> | undefined;
|
|
677
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
678
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
679
679
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
680
680
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
681
681
|
feeOptionKey?: FeeOption;
|
|
@@ -685,8 +685,6 @@ export declare const XLayerToolbox: ({ provider: providerParam, ...toolboxSigner
|
|
|
685
685
|
validateAddress: (address: string) => boolean;
|
|
686
686
|
}>;
|
|
687
687
|
export declare const MONADToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
688
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
689
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
690
688
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
691
689
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
692
690
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -716,6 +714,8 @@ export declare const MONADToolbox: ({ provider: providerParam, ...toolboxSignerP
|
|
|
716
714
|
chain: EVMChain;
|
|
717
715
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
718
716
|
getAddress: () => string | Promise<string> | undefined;
|
|
717
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
718
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
719
719
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
720
720
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
721
721
|
feeOptionKey?: FeeOption;
|
|
@@ -725,8 +725,6 @@ export declare const MONADToolbox: ({ provider: providerParam, ...toolboxSignerP
|
|
|
725
725
|
validateAddress: (address: string) => boolean;
|
|
726
726
|
}>;
|
|
727
727
|
export declare const MEGAETHToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
728
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
729
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
730
728
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
731
729
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
732
730
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -756,6 +754,8 @@ export declare const MEGAETHToolbox: ({ provider: providerParam, ...toolboxSigne
|
|
|
756
754
|
chain: EVMChain;
|
|
757
755
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
758
756
|
getAddress: () => string | Promise<string> | undefined;
|
|
757
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
758
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
759
759
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
760
760
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
761
761
|
feeOptionKey?: FeeOption;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../../src/evm/toolbox/evm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,QAAQ,EAAE,SAAS,EAAa,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../../src/evm/toolbox/evm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,QAAQ,EAAE,SAAS,EAAa,MAAM,kBAAkB,CAAC;AAK9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGjD,wBAAsB,UAAU,CAAC,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,EAAE,gBAAgB;4BAG1D;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,+DAGjC,SAAS;;;;;;;;;;;;;;gBAoD2od,CAAC;kBAAwB,CAAC;mBAA4B,CAAC;YAAuB,CAAC;;;kBAAnoV,CAAC;gBAAkB,CAAC;oBAAsB,CAAC;4BAA8B,CAAC;;;;;;;;;;;oBAAoqX,CAAC;;;;;GAvCh2f;AAED,eAAO,MAAM,UAA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AuB,CAAC;;;kBAAnoV,CAAC;gBAAkB,CAAC;oBAAsB,CAAC;4BAA8B,CAAC;;;;;;;;;;;oBAAoqX,CAAC;;;;;EArBxyf,CAAC;AAC1D,eAAO,MAAM,cAAc,wDAGmE,gBAAgB;;;;;;;;;;;;;;gBAiBwjd,CAAC;kBAAwB,CAAC;mBAA4B,CAAC;YAAuB,CAAC;;;kBAAnoV,CAAC;gBAAkB,CAAC;oBAAsB,CAAC;4BAA8B,CAAC;;;;;;;;;;;oBAAoqX,CAAC;;;;;EApBxxf,CAAC"}
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FeeOption } from "@swapkit/helpers";
|
|
2
2
|
import type { TransactionRequest } from "ethers";
|
|
3
3
|
import { Contract } from "ethers";
|
|
4
4
|
import type { EVMToolboxParams } from "../types";
|
|
5
|
-
declare function getNetworkParams(): {
|
|
6
|
-
blockExplorerUrls: "https://optimistic.etherscan.io"[];
|
|
7
|
-
chainId: import("@swapkit/types").ChainId.Optimism;
|
|
8
|
-
chainName: "Optimism";
|
|
9
|
-
nativeCurrency: {
|
|
10
|
-
decimals: 18;
|
|
11
|
-
name: string;
|
|
12
|
-
symbol: Chain;
|
|
13
|
-
};
|
|
14
|
-
rpcUrls: ["https://mainnet.optimism.io", "https://optimism.llamarpc.com", "https://1rpc.io/op"];
|
|
15
|
-
};
|
|
16
5
|
export declare function OPToolbox({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams): Promise<{
|
|
17
6
|
estimateGasPrices: Promise<{
|
|
18
7
|
average: {
|
|
@@ -40,7 +29,6 @@ export declare function OPToolbox({ provider: providerParam, ...toolboxSignerPar
|
|
|
40
29
|
estimateTotalGasCost: (tx: TransactionRequest) => Promise<any>;
|
|
41
30
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
42
31
|
getL1GasPrice: () => Promise<bigint | undefined>;
|
|
43
|
-
getNetworkParams: typeof getNetworkParams;
|
|
44
32
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
45
33
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
46
34
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
@@ -64,6 +52,7 @@ export declare function OPToolbox({ provider: providerParam, ...toolboxSignerPar
|
|
|
64
52
|
chain: import("@swapkit/types").EVMChain;
|
|
65
53
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
66
54
|
getAddress: () => string | Promise<string> | undefined;
|
|
55
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
67
56
|
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
68
57
|
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
69
58
|
feeOptionKey?: FeeOption;
|
|
@@ -72,5 +61,4 @@ export declare function OPToolbox({ provider: providerParam, ...toolboxSignerPar
|
|
|
72
61
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("..").EVMTransferParams) => Promise<string>;
|
|
73
62
|
validateAddress: (address: string) => boolean;
|
|
74
63
|
}>;
|
|
75
|
-
export {};
|
|
76
64
|
//# sourceMappingURL=op.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"op.d.ts","sourceRoot":"","sources":["../../../../src/evm/toolbox/op.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"op.d.ts","sourceRoot":"","sources":["../../../../src/evm/toolbox/op.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,SAAS,EAA2B,MAAM,kBAAkB,CAAC;AACzG,OAAO,KAAK,EAA6D,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAC5G,OAAO,EAAE,QAAQ,EAAgB,MAAM,QAAQ,CAAC;AAKhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAiHjD,wBAAsB,SAAS,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,mBAAmB,EAAE,EAAE,gBAAgB;;;yBAbhF,MAAM;uBACR,MAAM;2BACF,MAAM;mCACE,MAAM;;;yBAHhB,MAAM;uBACR,MAAM;2BACF,MAAM;mCACE,MAAM;;;yBAHhB,MAAM;uBACR,MAAM;2BACF,MAAM;mCACE,MAAM;;;wBAvCK,kBAAkB;4BA3Bd,kBAAkB;4BAWlB,kBAAkB;+BAQf,kBAAkB;;;;;;;;;;;;;;;;gBAgFyjY,CAAC;kBAAwB,CAAC;mBAA4B,CAAC;YAAuB,CAAC;;;;;;;;;;oBAA2mC,CAAC;;;;;GADtza"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/radix/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,gBAAgB,EAIjB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAmB,KAAK,oBAAoB,EAAgB,MAAM,kBAAkB,CAAC;AAExG,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC;AAInE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,WAEnD;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/radix/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,gBAAgB,EAIjB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAmB,KAAK,oBAAoB,EAAgB,MAAM,kBAAkB,CAAC;AAExG,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC;AAInE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,WAEnD;AAwGD,eAAO,MAAM,YAAY,GAAU,iBAAgB;IAAE,UAAU,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAA;CAAO;;0BArG1D,MAAM;;sBAoHxC,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,CAAC,MAAM,CAAC;;EAGzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbox.d.ts","sourceRoot":"","sources":["../../../src/solana/toolbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACN,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,UAAU,EAGV,KAAK,mBAAmB,EAExB,KAAK,8BAA8B,EAMpC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,6BAA6B,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEnG,KAAK,YAAY,GAAG,cAAc,GAAG,MAAM,CAAC;AAE5C,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,wBAAsB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CA0B3F;
|
|
1
|
+
{"version":3,"file":"toolbox.d.ts","sourceRoot":"","sources":["../../../src/solana/toolbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,MAAM,EACN,WAAW,EACX,sBAAsB,EACtB,oBA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BAAuB,CAAC,EAAE,OAAO,CAAC;CACnC,wBASA;AA6DD,wBAAsB,iBAAiB,CAAC,EACtC,MAAM,EACN,cAAmC,GACpC,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,8CAQA;AAED,iBAAS,oBAAoB,CAAC,SAAS,EAAE,SAAS,UAEjD;AAED,iBAAe,oBAAoB,CAAC,OAAO,EAAE,MAAM,sBAGlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbox.d.ts","sourceRoot":"","sources":["../../../src/sui/toolbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAuC,MAAM,kBAAkB,CAAC;AAEnF,OAAO,KAAK,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE/F,wBAAsB,sBAAsB,sBAGD,MAAM,cAOhD;AAED,wBAAsB,aAAa,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,YAAY,EAAE,GAAE,gBAAqB;
|
|
1
|
+
{"version":3,"file":"toolbox.d.ts","sourceRoot":"","sources":["../../../src/sui/toolbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAuC,MAAM,kBAAkB,CAAC;AAEnF,OAAO,KAAK,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE/F,wBAAsB,sBAAsB,sBAGD,MAAM,cAOhD;AAED,wBAAsB,aAAa,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,YAAY,EAAE,GAAE,gBAAqB;sEA0EtB,0BAA0B;;;;sCAtB1D,0BAA0B;;iCAhC/B,MAAM;8BAwFtC,UAAU,CAAC,WAAW,CAAC,GAAG,0BAA0B,GAAG,OAAO,CAAC,UAAU,gDAlCJ,0BAA0B;;;OAkCI,CAAC;qDAehD,iBAAiB;+BApItC,MAAM;GA8JhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,KAAK,EAAkB,MAAM,kBAAkB,CAAC;AAM1E,wBAAgB,MAAM,WAUrB;AAED,wBAAgB,UAAU,CAAC,CAAC,SAAS,KAAK,EAAE,KAAK,EAAE,CAAC,IACjB,SAAS,MAAM,EAAE,oBAAiB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,KAAK,EAAkB,MAAM,kBAAkB,CAAC;AAM1E,wBAAgB,MAAM,WAUrB;AAED,wBAAgB,UAAU,CAAC,CAAC,SAAS,KAAK,EAAE,KAAK,EAAE,CAAC,IACjB,SAAS,MAAM,EAAE,oBAAiB,2BAcpE"}
|
package/package.json
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@solana/spl-memo": "~0.2.5",
|
|
31
31
|
"@solana/spl-token": "~0.4.14",
|
|
32
32
|
"@solana/web3.js": "~1.98.0",
|
|
33
|
-
"@swapkit/helpers": "4.5.
|
|
33
|
+
"@swapkit/helpers": "4.5.8",
|
|
34
34
|
"@ton/crypto": "~3.3.0",
|
|
35
35
|
"@ton/ton": "~15.4.0",
|
|
36
36
|
"base64-js": "~1.5.1",
|
|
@@ -201,5 +201,5 @@
|
|
|
201
201
|
"type-check:go": "tsgo"
|
|
202
202
|
},
|
|
203
203
|
"type": "module",
|
|
204
|
-
"version": "4.3.
|
|
204
|
+
"version": "4.3.8"
|
|
205
205
|
}
|
package/src/evm/helpers.ts
CHANGED
|
@@ -14,15 +14,13 @@ export function toHexString(value: bigint) {
|
|
|
14
14
|
export function getNetworkParams<C extends EVMChain>(chain: C) {
|
|
15
15
|
const { explorerUrl, chainIdHex, rpcUrls } = getChainConfig(chain);
|
|
16
16
|
|
|
17
|
-
return ()
|
|
18
|
-
(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
rpcUrls,
|
|
25
|
-
}) as C extends typeof Chain.Ethereum ? undefined : NetworkParams;
|
|
17
|
+
return function getNetworkParams(): C extends Chain.Ethereum ? undefined : NetworkParams {
|
|
18
|
+
return (
|
|
19
|
+
chain !== Chain.Ethereum
|
|
20
|
+
? { ...getNetworkInfo({ chain }), blockExplorerUrls: [explorerUrl], chainId: chainIdHex, rpcUrls }
|
|
21
|
+
: undefined
|
|
22
|
+
) as C extends Chain.Ethereum ? undefined : NetworkParams;
|
|
23
|
+
};
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
export function getIsEIP1559Compatible<C extends EVMChain>(chain: C) {
|
|
@@ -26,7 +26,8 @@ import {
|
|
|
26
26
|
type Signer,
|
|
27
27
|
} from "ethers";
|
|
28
28
|
import { match } from "ts-pattern";
|
|
29
|
-
import {
|
|
29
|
+
import { getEvmApi } from "../api";
|
|
30
|
+
import { getNetworkParams, toHexString } from "../helpers";
|
|
30
31
|
import type {
|
|
31
32
|
ApproveParams,
|
|
32
33
|
CallParams,
|
|
@@ -80,6 +81,8 @@ export function BaseEVMToolbox<
|
|
|
80
81
|
getAddress: () => {
|
|
81
82
|
return signer ? signer.getAddress() : undefined;
|
|
82
83
|
},
|
|
84
|
+
getBalance: getEvmApi(chain).getBalance,
|
|
85
|
+
getNetworkParams: getNetworkParams(chain),
|
|
83
86
|
isApproved: getIsApproved({ chain, provider }),
|
|
84
87
|
sendTransaction: getSendTransaction({ chain, isEIP1559Compatible, provider, signer }),
|
|
85
88
|
signMessage: signer ? (message: string | Uint8Array) => signer.signMessage(message) : undefined,
|
package/src/evm/toolbox/evm.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Chain, type EVMChain, FeeOption, getRPCUrl } from "@swapkit/helpers";
|
|
2
2
|
import { match, P } from "ts-pattern";
|
|
3
3
|
|
|
4
|
-
import { getEvmApi } from "../api";
|
|
5
4
|
import { multicallAbi } from "../contracts/eth/multicall";
|
|
6
|
-
import { getIsEIP1559Compatible,
|
|
5
|
+
import { getIsEIP1559Compatible, getProvider } from "../helpers";
|
|
7
6
|
import type { EVMToolboxParams } from "../types";
|
|
8
7
|
import { BaseEVMToolbox } from "./baseEVMToolbox";
|
|
9
8
|
|
|
@@ -62,6 +61,6 @@ function createEvmToolbox<C extends EVMChain>(chain: C) {
|
|
|
62
61
|
|
|
63
62
|
const evmToolbox = BaseEVMToolbox({ chain, isEIP1559Compatible, provider, signer });
|
|
64
63
|
|
|
65
|
-
return
|
|
64
|
+
return evmToolbox;
|
|
66
65
|
};
|
|
67
66
|
}
|
package/src/evm/toolbox/op.ts
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
applyFeeMultiplierToBigInt,
|
|
3
|
-
Chain,
|
|
4
|
-
FeeOption,
|
|
5
|
-
getChainConfig,
|
|
6
|
-
getRPCUrl,
|
|
7
|
-
SwapKitError,
|
|
8
|
-
} from "@swapkit/helpers";
|
|
1
|
+
import { applyFeeMultiplierToBigInt, Chain, FeeOption, getRPCUrl, SwapKitError } from "@swapkit/helpers";
|
|
9
2
|
import type { Authorization, BrowserProvider, JsonRpcProvider, Provider, TransactionRequest } from "ethers";
|
|
10
3
|
import { Contract, HDNodeWallet } from "ethers";
|
|
11
4
|
import { match, P } from "ts-pattern";
|
|
@@ -86,18 +79,6 @@ function estimateL1Gas<P extends JsonRpcProvider | BrowserProvider>(provider: P)
|
|
|
86
79
|
};
|
|
87
80
|
}
|
|
88
81
|
|
|
89
|
-
function getNetworkParams() {
|
|
90
|
-
const { baseDecimal, chainId, explorerUrl, name, rpcUrls } = getChainConfig(Chain.Optimism);
|
|
91
|
-
|
|
92
|
-
return {
|
|
93
|
-
blockExplorerUrls: [explorerUrl],
|
|
94
|
-
chainId,
|
|
95
|
-
chainName: name,
|
|
96
|
-
nativeCurrency: { decimals: baseDecimal, name: "Ethereum", symbol: Chain.Ethereum },
|
|
97
|
-
rpcUrls,
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
|
|
101
82
|
async function estimateGasPrices(provider: Provider) {
|
|
102
83
|
try {
|
|
103
84
|
const { maxFeePerGas, maxPriorityFeePerGas, gasPrice } = await provider.getFeeData();
|
|
@@ -158,6 +139,5 @@ export async function OPToolbox({ provider: providerParam, ...toolboxSignerParam
|
|
|
158
139
|
estimateTotalGasCost: estimateTotalGasCost(provider),
|
|
159
140
|
getBalance: getEvmApi(Chain.Optimism).getBalance,
|
|
160
141
|
getL1GasPrice,
|
|
161
|
-
getNetworkParams,
|
|
162
142
|
};
|
|
163
143
|
}
|
package/src/radix/index.ts
CHANGED
|
@@ -18,7 +18,13 @@ export function radixValidateAddress(address: string) {
|
|
|
18
18
|
function getBalance({ networkApi }: { networkApi: GatewayApiClient }) {
|
|
19
19
|
return async function getBalance(address: string) {
|
|
20
20
|
const fungibleResources = await fetchFungibleResources({ address, networkApi });
|
|
21
|
-
const fungibleBalances = convertResourcesToBalances({ networkApi, resources: fungibleResources });
|
|
21
|
+
const fungibleBalances = await convertResourcesToBalances({ networkApi, resources: fungibleResources });
|
|
22
|
+
|
|
23
|
+
const hasNativeAsset = fungibleBalances.some((asset) => asset.isGasAsset);
|
|
24
|
+
if (!hasNativeAsset) {
|
|
25
|
+
return [AssetValue.from({ chain: Chain.Radix }), ...fungibleBalances];
|
|
26
|
+
}
|
|
27
|
+
|
|
22
28
|
return fungibleBalances;
|
|
23
29
|
};
|
|
24
30
|
}
|
package/src/solana/toolbox.ts
CHANGED
|
@@ -67,17 +67,11 @@ async function getSolanaBalance(address: string) {
|
|
|
67
67
|
const { PublicKey } = await import("@solana/web3.js");
|
|
68
68
|
const { TOKEN_PROGRAM_ID } = await import("@solana/spl-token");
|
|
69
69
|
const publicKey = new PublicKey(address);
|
|
70
|
+
const { baseDecimal } = getChainConfig(Chain.Solana);
|
|
70
71
|
|
|
71
|
-
const balances: AssetValue[] = [];
|
|
72
|
-
|
|
73
|
-
// Get SOL balance
|
|
74
72
|
const solBalance = await connection.getBalance(publicKey);
|
|
75
|
-
|
|
76
|
-
const { baseDecimal } = getChainConfig(Chain.Solana);
|
|
77
|
-
balances.push(AssetValue.from({ chain: Chain.Solana, fromBaseDecimal: baseDecimal, value: solBalance }));
|
|
78
|
-
}
|
|
73
|
+
const balances = [AssetValue.from({ chain: Chain.Solana, fromBaseDecimal: baseDecimal, value: solBalance || 0 })];
|
|
79
74
|
|
|
80
|
-
// Get token balances
|
|
81
75
|
const tokenAccounts = await connection.getParsedTokenAccountsByOwner(publicKey, { programId: TOKEN_PROGRAM_ID });
|
|
82
76
|
|
|
83
77
|
for (const { account } of tokenAccounts.value) {
|
package/src/substrate/balance.ts
CHANGED
|
@@ -29,7 +29,7 @@ export async function getSubstrateBalance(
|
|
|
29
29
|
} catch (error) {
|
|
30
30
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
31
31
|
console.error(`Error fetching substrate balance: ${errorMessage}`);
|
|
32
|
-
return [];
|
|
32
|
+
return [gasAsset.set(0)];
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -66,7 +66,7 @@ export async function getChainflipBalance(
|
|
|
66
66
|
} catch (error) {
|
|
67
67
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
68
68
|
console.error(`Error fetching chainflip balance: ${errorMessage}`);
|
|
69
|
-
return [];
|
|
69
|
+
return [gasAsset.set(0)];
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|