@swapkit/core 4.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/dist/types/index.d.ts +554 -678
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +4 -15
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { QuoteResponseRoute } from "@swapkit/helpers/api";
|
|
2
1
|
import { AssetValue, Chain, type ChainWallet, type ConditionalAssetValueReturn, type EVMChain, type FeeOption, type GenericTransferParams, ProviderName as PluginNameEnum, type SKConfigState, type SwapParams } from "@swapkit/helpers";
|
|
2
|
+
import type { QuoteResponseRoute } from "@swapkit/helpers/api";
|
|
3
3
|
import type { createPlugin } from "@swapkit/plugins";
|
|
4
4
|
import type { FullWallet } from "@swapkit/toolboxes";
|
|
5
5
|
import type { EVMCreateTransactionParams, EVMTransferParams } from "@swapkit/toolboxes/evm";
|
|
@@ -9,11 +9,12 @@ export type SwapKitParams<P, W> = {
|
|
|
9
9
|
plugins?: P;
|
|
10
10
|
wallets?: W;
|
|
11
11
|
};
|
|
12
|
-
export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>, Wallets extends ReturnType<typeof createWallet>>({ config, plugins, wallets
|
|
12
|
+
export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>, Wallets extends ReturnType<typeof createWallet>>({ config, plugins, wallets }?: {
|
|
13
13
|
config?: SKConfigState;
|
|
14
14
|
plugins?: Plugins;
|
|
15
15
|
wallets?: Wallets;
|
|
16
16
|
}): (keyof Plugins extends infer T extends keyof Plugins ? { [key in T]: ReturnType<Plugins[key]>; } : never) & { [key_1 in keyof Wallets]: ReturnType<Wallets[key_1]["connectWallet"]>; } & {
|
|
17
|
+
approveAssetValue: (assetValue: AssetValue, contractAddress: string | keyof Plugins) => Promise<string>;
|
|
17
18
|
disconnectAll: () => void;
|
|
18
19
|
disconnectChain: <T_1 extends Chain>(chain: T_1) => void;
|
|
19
20
|
estimateTransactionFee: <P extends keyof Plugins, T_1 extends "transfer" | "approve" | "swap">({ type, feeOptionKey, params, }: {
|
|
@@ -28,134 +29,134 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
28
29
|
feeOptionKey?: FeeOption;
|
|
29
30
|
};
|
|
30
31
|
swap: import("@swapkit/helpers").GenericSwapParams<{
|
|
31
|
-
providers: PluginNameEnum[];
|
|
32
|
-
sellAsset: string;
|
|
33
|
-
sellAmount: string;
|
|
34
32
|
buyAsset: string;
|
|
33
|
+
destinationAddress: string;
|
|
35
34
|
expectedBuyAmount: string;
|
|
36
35
|
expectedBuyAmountMaxSlippage: string;
|
|
37
|
-
sourceAddress: string;
|
|
38
|
-
destinationAddress: string;
|
|
39
36
|
fees: {
|
|
40
|
-
type: import("@swapkit/helpers").FeeTypeEnum;
|
|
41
37
|
amount: string;
|
|
42
38
|
asset: string;
|
|
43
39
|
chain: string;
|
|
44
40
|
protocol: PluginNameEnum;
|
|
41
|
+
type: import("@swapkit/helpers").FeeTypeEnum;
|
|
45
42
|
}[];
|
|
46
|
-
totalSlippageBps: number;
|
|
47
43
|
legs: {
|
|
48
|
-
provider: PluginNameEnum;
|
|
49
|
-
sellAsset: string;
|
|
50
|
-
sellAmount: string;
|
|
51
|
-
buyAsset: string;
|
|
52
44
|
buyAmount: string;
|
|
53
45
|
buyAmountMaxSlippage: string;
|
|
46
|
+
buyAsset: string;
|
|
47
|
+
provider: PluginNameEnum;
|
|
48
|
+
sellAmount: string;
|
|
49
|
+
sellAsset: string;
|
|
54
50
|
fees?: {
|
|
55
|
-
type: import("@swapkit/helpers").FeeTypeEnum;
|
|
56
51
|
amount: string;
|
|
57
52
|
asset: string;
|
|
58
53
|
chain: string;
|
|
59
54
|
protocol: PluginNameEnum;
|
|
55
|
+
type: import("@swapkit/helpers").FeeTypeEnum;
|
|
60
56
|
}[] | undefined;
|
|
61
57
|
}[];
|
|
62
|
-
warnings: {
|
|
63
|
-
code: import("@swapkit/helpers").WarningCodeEnum;
|
|
64
|
-
display: string;
|
|
65
|
-
tooltip?: string | undefined;
|
|
66
|
-
}[];
|
|
67
58
|
meta: {
|
|
68
59
|
tags: import("@swapkit/helpers/api").PriorityLabel[];
|
|
69
60
|
assets?: {
|
|
70
61
|
asset: string;
|
|
71
|
-
price: number;
|
|
72
62
|
image: string;
|
|
63
|
+
price: number;
|
|
73
64
|
}[] | undefined;
|
|
74
|
-
streamingInterval?: number | undefined;
|
|
75
65
|
maxStreamingQuantity?: number | undefined;
|
|
76
|
-
|
|
77
|
-
approvalAddress?: string | undefined;
|
|
66
|
+
streamingInterval?: number | undefined;
|
|
78
67
|
affiliate?: string | undefined;
|
|
79
68
|
affiliateFee?: string | undefined;
|
|
80
|
-
|
|
69
|
+
approvalAddress?: string | undefined;
|
|
81
70
|
chainflip?: {
|
|
82
71
|
destinationAddress: string;
|
|
83
|
-
sellAsset: {
|
|
84
|
-
chain: string;
|
|
85
|
-
asset: string;
|
|
86
|
-
};
|
|
87
72
|
buyAsset: {
|
|
73
|
+
asset: string;
|
|
88
74
|
chain: string;
|
|
75
|
+
};
|
|
76
|
+
sellAsset: {
|
|
89
77
|
asset: string;
|
|
78
|
+
chain: string;
|
|
90
79
|
};
|
|
91
|
-
channelMetadata?: {
|
|
92
|
-
cfParameters?: string | undefined;
|
|
93
|
-
gasBudget?: string | undefined;
|
|
94
|
-
message?: string | undefined;
|
|
95
|
-
} | undefined;
|
|
96
80
|
affiliateFees?: {
|
|
97
81
|
brokerAddress: string;
|
|
98
82
|
feeBps: number;
|
|
99
83
|
}[] | undefined;
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
84
|
+
brokerCommissionBps?: number | undefined;
|
|
85
|
+
channelMetadata?: {
|
|
86
|
+
cfParameters?: string | undefined;
|
|
87
|
+
gasBudget?: string | undefined;
|
|
88
|
+
message?: string | undefined;
|
|
104
89
|
} | undefined;
|
|
105
90
|
dcaParameters?: {
|
|
106
91
|
chunkInterval?: number | undefined;
|
|
107
92
|
numberOfChunks?: number | undefined;
|
|
108
93
|
} | undefined;
|
|
109
|
-
brokerCommissionBps?: number | undefined;
|
|
110
94
|
maxBoostFeeBps?: number | undefined;
|
|
95
|
+
refundParameters?: {
|
|
96
|
+
minPrice?: string | undefined;
|
|
97
|
+
refundAddress?: string | undefined;
|
|
98
|
+
retryDuration?: number | undefined;
|
|
99
|
+
} | undefined;
|
|
111
100
|
} | undefined;
|
|
112
101
|
near?: {
|
|
113
102
|
destinationAddress: string;
|
|
114
|
-
sellAsset: string;
|
|
115
103
|
buyAsset: string;
|
|
116
|
-
sourceAddress: string;
|
|
117
104
|
sellAmount: string;
|
|
105
|
+
sellAsset: string;
|
|
118
106
|
slippage: number;
|
|
107
|
+
sourceAddress: string;
|
|
119
108
|
affiliateFees?: {
|
|
120
|
-
nearId: string;
|
|
121
109
|
feeBps: number;
|
|
110
|
+
nearId: string;
|
|
122
111
|
} | undefined;
|
|
123
112
|
} | undefined;
|
|
113
|
+
priceImpact?: number | undefined;
|
|
124
114
|
referrer?: string | undefined;
|
|
115
|
+
txType?: import("@swapkit/helpers/api").RouteQuoteTxType | undefined;
|
|
125
116
|
};
|
|
126
|
-
|
|
127
|
-
|
|
117
|
+
providers: PluginNameEnum[];
|
|
118
|
+
sellAmount: string;
|
|
119
|
+
sellAsset: string;
|
|
120
|
+
sourceAddress: string;
|
|
121
|
+
totalSlippageBps: number;
|
|
122
|
+
warnings: {
|
|
123
|
+
code: import("@swapkit/helpers").WarningCodeEnum;
|
|
124
|
+
display: string;
|
|
125
|
+
tooltip?: string | undefined;
|
|
126
|
+
}[];
|
|
127
|
+
estimatedTime?: {
|
|
128
|
+
total: number;
|
|
129
|
+
inbound?: number | undefined;
|
|
130
|
+
outbound?: number | undefined;
|
|
131
|
+
swap?: number | undefined;
|
|
132
|
+
} | undefined;
|
|
128
133
|
expiration?: string | undefined;
|
|
134
|
+
inboundAddress?: string | undefined;
|
|
129
135
|
memo?: string | undefined;
|
|
130
|
-
|
|
136
|
+
targetAddress?: string | undefined;
|
|
131
137
|
tx?: string | {
|
|
132
|
-
|
|
138
|
+
data: string;
|
|
133
139
|
from: string;
|
|
140
|
+
to: string;
|
|
134
141
|
value: string;
|
|
135
|
-
data: string;
|
|
136
142
|
} | {
|
|
137
|
-
memo: string;
|
|
138
143
|
accountNumber: number;
|
|
139
|
-
sequence: number;
|
|
140
144
|
chainId: import("@swapkit/helpers").ChainId;
|
|
141
|
-
msgs: {
|
|
142
|
-
typeUrl: string;
|
|
143
|
-
value: unknown;
|
|
144
|
-
}[];
|
|
145
145
|
fee: {
|
|
146
146
|
amount: {
|
|
147
|
-
denom: string;
|
|
148
147
|
amount: string;
|
|
148
|
+
denom: string;
|
|
149
149
|
}[];
|
|
150
150
|
gas: string;
|
|
151
151
|
};
|
|
152
|
+
memo: string;
|
|
153
|
+
msgs: {
|
|
154
|
+
typeUrl: string;
|
|
155
|
+
value: unknown;
|
|
156
|
+
}[];
|
|
157
|
+
sequence: number;
|
|
152
158
|
} | undefined;
|
|
153
|
-
|
|
154
|
-
total: number;
|
|
155
|
-
inbound?: number | undefined;
|
|
156
|
-
swap?: number | undefined;
|
|
157
|
-
outbound?: number | undefined;
|
|
158
|
-
} | undefined;
|
|
159
|
+
txType?: import("@swapkit/helpers/api").RouteQuoteTxType | undefined;
|
|
159
160
|
}> & {
|
|
160
161
|
pluginName?: P | undefined;
|
|
161
162
|
} & {
|
|
@@ -167,24 +168,19 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
167
168
|
getAddress: <T_1 extends Chain>(chain: T_1) => string;
|
|
168
169
|
getAllWallets: () => {
|
|
169
170
|
ARB: ChainWallet<Chain.Arbitrum> & {
|
|
170
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
171
171
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
172
|
-
|
|
173
|
-
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
174
|
-
feeOption: FeeOption;
|
|
175
|
-
chain: EVMChain;
|
|
176
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
177
|
-
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
178
|
-
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
179
|
-
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
172
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
180
173
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
181
174
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<bigint>;
|
|
182
175
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
183
|
-
|
|
176
|
+
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
177
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
184
178
|
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
185
179
|
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
186
|
-
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
187
180
|
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
181
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
182
|
+
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
183
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
188
184
|
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EVMTransferParams & {
|
|
189
185
|
assetValue: import("@swapkit/helpers").AssetValue;
|
|
190
186
|
funcName?: string;
|
|
@@ -198,7 +194,12 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
198
194
|
maxFeePerGas?: bigint;
|
|
199
195
|
maxPriorityFeePerGas?: bigint;
|
|
200
196
|
}; }>;
|
|
201
|
-
|
|
197
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
198
|
+
feeOption: FeeOption;
|
|
199
|
+
chain: EVMChain;
|
|
200
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
201
|
+
getAddress: () => string | Promise<string> | undefined;
|
|
202
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<boolean>;
|
|
202
203
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
203
204
|
feeOptionKey?: FeeOption;
|
|
204
205
|
}) => Promise<string>;
|
|
@@ -207,24 +208,19 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
207
208
|
validateAddress: (address: string) => boolean;
|
|
208
209
|
};
|
|
209
210
|
AURORA: ChainWallet<Chain.Aurora> & {
|
|
210
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
211
211
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
212
|
-
|
|
213
|
-
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
214
|
-
feeOption: FeeOption;
|
|
215
|
-
chain: EVMChain;
|
|
216
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
217
|
-
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
218
|
-
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
219
|
-
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
212
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
220
213
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
221
214
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<bigint>;
|
|
222
215
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
223
|
-
|
|
216
|
+
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
217
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
224
218
|
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
225
219
|
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
226
|
-
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
227
220
|
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
221
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
222
|
+
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
223
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
228
224
|
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EVMTransferParams & {
|
|
229
225
|
assetValue: import("@swapkit/helpers").AssetValue;
|
|
230
226
|
funcName?: string;
|
|
@@ -238,7 +234,12 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
238
234
|
maxFeePerGas?: bigint;
|
|
239
235
|
maxPriorityFeePerGas?: bigint;
|
|
240
236
|
}; }>;
|
|
241
|
-
|
|
237
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
238
|
+
feeOption: FeeOption;
|
|
239
|
+
chain: EVMChain;
|
|
240
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
241
|
+
getAddress: () => string | Promise<string> | undefined;
|
|
242
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<boolean>;
|
|
242
243
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
243
244
|
feeOptionKey?: FeeOption;
|
|
244
245
|
}) => Promise<string>;
|
|
@@ -247,24 +248,19 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
247
248
|
validateAddress: (address: string) => boolean;
|
|
248
249
|
};
|
|
249
250
|
AVAX: ChainWallet<Chain.Avalanche> & {
|
|
250
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
251
251
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
252
|
-
|
|
253
|
-
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
254
|
-
feeOption: FeeOption;
|
|
255
|
-
chain: EVMChain;
|
|
256
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
257
|
-
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
258
|
-
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
259
|
-
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
252
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
260
253
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
261
254
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<bigint>;
|
|
262
255
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
263
|
-
|
|
256
|
+
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
257
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
264
258
|
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
265
259
|
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
266
|
-
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
267
260
|
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
261
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
262
|
+
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
263
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
268
264
|
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EVMTransferParams & {
|
|
269
265
|
assetValue: import("@swapkit/helpers").AssetValue;
|
|
270
266
|
funcName?: string;
|
|
@@ -278,7 +274,12 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
278
274
|
maxFeePerGas?: bigint;
|
|
279
275
|
maxPriorityFeePerGas?: bigint;
|
|
280
276
|
}; }>;
|
|
281
|
-
|
|
277
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
278
|
+
feeOption: FeeOption;
|
|
279
|
+
chain: EVMChain;
|
|
280
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
281
|
+
getAddress: () => string | Promise<string> | undefined;
|
|
282
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<boolean>;
|
|
282
283
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
283
284
|
feeOptionKey?: FeeOption;
|
|
284
285
|
}) => Promise<string>;
|
|
@@ -287,24 +288,19 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
287
288
|
validateAddress: (address: string) => boolean;
|
|
288
289
|
};
|
|
289
290
|
BASE: ChainWallet<Chain.Base> & {
|
|
290
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
291
291
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
292
|
-
|
|
293
|
-
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
294
|
-
feeOption: FeeOption;
|
|
295
|
-
chain: EVMChain;
|
|
296
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
297
|
-
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
298
|
-
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
299
|
-
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
292
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
300
293
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
301
294
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<bigint>;
|
|
302
295
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
303
|
-
|
|
296
|
+
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
297
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
304
298
|
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
305
299
|
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
306
|
-
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
307
300
|
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
301
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
302
|
+
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
303
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
308
304
|
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EVMTransferParams & {
|
|
309
305
|
assetValue: import("@swapkit/helpers").AssetValue;
|
|
310
306
|
funcName?: string;
|
|
@@ -318,7 +314,12 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
318
314
|
maxFeePerGas?: bigint;
|
|
319
315
|
maxPriorityFeePerGas?: bigint;
|
|
320
316
|
}; }>;
|
|
321
|
-
|
|
317
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
318
|
+
feeOption: FeeOption;
|
|
319
|
+
chain: EVMChain;
|
|
320
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
321
|
+
getAddress: () => string | Promise<string> | undefined;
|
|
322
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<boolean>;
|
|
322
323
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
323
324
|
feeOptionKey?: FeeOption;
|
|
324
325
|
}) => Promise<string>;
|
|
@@ -327,24 +328,19 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
327
328
|
validateAddress: (address: string) => boolean;
|
|
328
329
|
};
|
|
329
330
|
BERA: ChainWallet<Chain.Berachain> & {
|
|
330
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
331
331
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
332
|
-
|
|
333
|
-
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
334
|
-
feeOption: FeeOption;
|
|
335
|
-
chain: EVMChain;
|
|
336
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
337
|
-
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
338
|
-
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
339
|
-
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
332
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
340
333
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
341
334
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<bigint>;
|
|
342
335
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
343
|
-
|
|
336
|
+
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
337
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
344
338
|
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
345
339
|
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
346
|
-
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
347
340
|
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
341
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
342
|
+
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
343
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
348
344
|
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EVMTransferParams & {
|
|
349
345
|
assetValue: import("@swapkit/helpers").AssetValue;
|
|
350
346
|
funcName?: string;
|
|
@@ -358,7 +354,12 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
358
354
|
maxFeePerGas?: bigint;
|
|
359
355
|
maxPriorityFeePerGas?: bigint;
|
|
360
356
|
}; }>;
|
|
361
|
-
|
|
357
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
358
|
+
feeOption: FeeOption;
|
|
359
|
+
chain: EVMChain;
|
|
360
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
361
|
+
getAddress: () => string | Promise<string> | undefined;
|
|
362
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<boolean>;
|
|
362
363
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
363
364
|
feeOptionKey?: FeeOption;
|
|
364
365
|
}) => Promise<string>;
|
|
@@ -367,24 +368,19 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
367
368
|
validateAddress: (address: string) => boolean;
|
|
368
369
|
};
|
|
369
370
|
BSC: ChainWallet<Chain.BinanceSmartChain> & {
|
|
370
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
371
371
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
372
|
-
|
|
373
|
-
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
374
|
-
feeOption: FeeOption;
|
|
375
|
-
chain: EVMChain;
|
|
376
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
377
|
-
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
378
|
-
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
379
|
-
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
372
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
380
373
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
381
374
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<bigint>;
|
|
382
375
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
383
|
-
|
|
376
|
+
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
377
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
384
378
|
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
385
379
|
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
386
|
-
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
387
380
|
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
381
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
382
|
+
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
383
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
388
384
|
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EVMTransferParams & {
|
|
389
385
|
assetValue: import("@swapkit/helpers").AssetValue;
|
|
390
386
|
funcName?: string;
|
|
@@ -398,7 +394,12 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
398
394
|
maxFeePerGas?: bigint;
|
|
399
395
|
maxPriorityFeePerGas?: bigint;
|
|
400
396
|
}; }>;
|
|
401
|
-
|
|
397
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
398
|
+
feeOption: FeeOption;
|
|
399
|
+
chain: EVMChain;
|
|
400
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
401
|
+
getAddress: () => string | Promise<string> | undefined;
|
|
402
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<boolean>;
|
|
402
403
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
403
404
|
feeOptionKey?: FeeOption;
|
|
404
405
|
}) => Promise<string>;
|
|
@@ -407,84 +408,68 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
407
408
|
validateAddress: (address: string) => boolean;
|
|
408
409
|
};
|
|
409
410
|
BTC: ChainWallet<Chain.Bitcoin> & {
|
|
410
|
-
accumulative:
|
|
411
|
-
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
412
|
-
chain: import("@swapkit/helpers").UTXOChain;
|
|
413
|
-
changeAddress?: string;
|
|
414
|
-
}) => {
|
|
415
|
-
inputs: (import("@swapkit/toolboxes/utxo").UTXOType | import("@swapkit/toolboxes/utxo").UTXOInputWithScriptType)[];
|
|
416
|
-
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
417
|
-
fee: number;
|
|
418
|
-
} | {
|
|
419
|
-
fee: number;
|
|
420
|
-
inputs?: undefined;
|
|
421
|
-
outputs?: undefined;
|
|
422
|
-
};
|
|
423
|
-
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo").UTXOCalculateTxSizeParams) => number;
|
|
424
|
-
getAddressFromKeys: (keys: import("ecpair").ECPairInterface | import("@swapkit/toolboxes/utxo").BchECPair) => string;
|
|
425
|
-
getAddress: () => Promise<string | undefined>;
|
|
426
|
-
validateAddress: (address: string) => boolean;
|
|
411
|
+
accumulative: typeof import("@swapkit/toolboxes/utxo").accumulative;
|
|
427
412
|
broadcastTx: (txHash: string) => Promise<string>;
|
|
428
|
-
|
|
429
|
-
psbt: import("bitcoinjs-lib").Psbt;
|
|
430
|
-
utxos: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
431
|
-
inputs: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
432
|
-
}>;
|
|
413
|
+
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo").UTXOCalculateTxSizeParams) => number;
|
|
433
414
|
createKeysForPath: (params: {
|
|
434
415
|
wif?: string;
|
|
435
416
|
phrase?: string;
|
|
436
417
|
derivationPath?: string;
|
|
437
418
|
}) => import("ecpair").ECPairInterface;
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
419
|
+
createTransaction: ({ assetValue, recipient, memo, feeRate, sender, fetchTxHex, }: import("@swapkit/toolboxes/utxo").UTXOBuildTxParams) => Promise<{
|
|
420
|
+
psbt: import("bitcoinjs-lib").Psbt;
|
|
421
|
+
utxos: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
422
|
+
inputs: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
442
423
|
}>;
|
|
443
|
-
|
|
424
|
+
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
425
|
+
from: string;
|
|
426
|
+
memo?: string;
|
|
427
|
+
feeRate?: number;
|
|
428
|
+
feeOptionKey?: FeeOption;
|
|
429
|
+
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
430
|
+
}) => Promise<AssetValue>;
|
|
431
|
+
estimateTransactionFee: (params: {
|
|
432
|
+
assetValue: AssetValue;
|
|
433
|
+
recipient: string;
|
|
434
|
+
sender: string;
|
|
435
|
+
memo?: string;
|
|
444
436
|
feeOptionKey?: FeeOption;
|
|
445
437
|
feeRate?: number;
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
438
|
+
fetchTxHex?: boolean;
|
|
439
|
+
}) => Promise<AssetValue>;
|
|
440
|
+
getAddress: () => Promise<string | undefined>;
|
|
441
|
+
getAddressFromKeys: (keys: import("ecpair").ECPairInterface | import("@swapkit/toolboxes/utxo").BchECPair) => string;
|
|
442
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<AssetValue[]>;
|
|
443
|
+
getFeeRates: () => Promise<{
|
|
444
|
+
average: number;
|
|
445
|
+
fast: number;
|
|
446
|
+
fastest: number;
|
|
447
|
+
}>;
|
|
448
|
+
getInputsOutputsFee: ({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<import("@swapkit/toolboxes/utxo").UTXOBuildTxParams, "feeRate"> & {
|
|
449
|
+
feeOptionKey?: FeeOption;
|
|
450
|
+
feeRate?: number;
|
|
451
|
+
}) => Promise<{
|
|
449
452
|
fee: number;
|
|
453
|
+
inputs: (import("@swapkit/toolboxes/utxo").UTXOType | import("@swapkit/toolboxes/utxo").UTXOInputWithScriptType)[];
|
|
454
|
+
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
450
455
|
} | {
|
|
451
456
|
fee: number;
|
|
452
457
|
inputs?: undefined;
|
|
453
458
|
outputs?: undefined;
|
|
454
459
|
}>;
|
|
455
|
-
transfer: ({ memo, recipient, feeOptionKey, feeRate, assetValue, }: import("@swapkit/toolboxes/utxo").UTXOTransferParams) => Promise<string>;
|
|
456
460
|
getPrivateKeyFromMnemonic: (params: {
|
|
457
461
|
phrase: string;
|
|
458
462
|
derivationPath: string;
|
|
459
463
|
}) => string;
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
assetValue: AssetValue;
|
|
463
|
-
recipient: string;
|
|
464
|
-
sender: string;
|
|
465
|
-
memo?: string;
|
|
466
|
-
feeOptionKey?: FeeOption;
|
|
467
|
-
feeRate?: number;
|
|
468
|
-
fetchTxHex?: boolean;
|
|
469
|
-
}) => Promise<AssetValue>;
|
|
470
|
-
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
471
|
-
from: string;
|
|
472
|
-
memo?: string;
|
|
473
|
-
feeRate?: number;
|
|
474
|
-
feeOptionKey?: FeeOption;
|
|
475
|
-
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
476
|
-
}) => Promise<AssetValue>;
|
|
464
|
+
transfer: ({ memo, recipient, feeOptionKey, feeRate, assetValue }: import("@swapkit/toolboxes/utxo").UTXOTransferParams) => Promise<string>;
|
|
465
|
+
validateAddress: (address: string) => boolean;
|
|
477
466
|
};
|
|
478
467
|
BCH: ChainWallet<Chain.BitcoinCash> & {
|
|
479
|
-
getAddress: () => Promise<string | undefined>;
|
|
480
468
|
broadcastTx: (txHash: string) => Promise<string>;
|
|
481
|
-
createTransaction: ({ assetValue, recipient, memo, feeRate, sender, }: import("@swapkit/toolboxes/utxo").UTXOBuildTxParams) => Promise<{
|
|
482
|
-
builder: import("@swapkit/toolboxes/utxo").TransactionBuilderType;
|
|
483
|
-
utxos: (import("@swapkit/toolboxes/utxo").UTXOType | import("@swapkit/toolboxes/utxo").UTXOInputWithScriptType)[];
|
|
484
|
-
}>;
|
|
485
469
|
buildTx: ({ assetValue, recipient, memo, feeRate, sender, setSigHashType, }: import("@swapkit/toolboxes/utxo").UTXOBuildTxParams & {
|
|
486
470
|
setSigHashType?: boolean;
|
|
487
471
|
}) => Promise<{
|
|
472
|
+
inputs: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
488
473
|
psbt: import("bitcoinjs-lib").Psbt;
|
|
489
474
|
utxos: {
|
|
490
475
|
address: string;
|
|
@@ -493,12 +478,16 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
493
478
|
txHex: string | undefined;
|
|
494
479
|
value: number;
|
|
495
480
|
witnessUtxo: {
|
|
496
|
-
value: number;
|
|
497
481
|
script: Buffer<ArrayBuffer>;
|
|
482
|
+
value: number;
|
|
498
483
|
};
|
|
499
484
|
}[];
|
|
500
|
-
inputs: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
501
485
|
}>;
|
|
486
|
+
createTransaction: ({ assetValue, recipient, memo, feeRate, sender }: import("@swapkit/toolboxes/utxo").UTXOBuildTxParams) => Promise<{
|
|
487
|
+
builder: import("@swapkit/toolboxes/utxo").TransactionBuilderType;
|
|
488
|
+
utxos: (import("@swapkit/toolboxes/utxo").UTXOType | import("@swapkit/toolboxes/utxo").UTXOInputWithScriptType)[];
|
|
489
|
+
}>;
|
|
490
|
+
getAddress: () => Promise<string | undefined>;
|
|
502
491
|
getAddressFromKeys: (keys: {
|
|
503
492
|
getAddress: (index?: number) => string;
|
|
504
493
|
}) => string;
|
|
@@ -510,34 +499,38 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
510
499
|
}>;
|
|
511
500
|
stripPrefix: typeof import("@swapkit/toolboxes/utxo").stripPrefix;
|
|
512
501
|
stripToCashAddress: typeof import("@swapkit/toolboxes/utxo").stripToCashAddress;
|
|
513
|
-
validateAddress: typeof import("@swapkit/toolboxes/utxo").bchValidateAddress;
|
|
514
502
|
transfer: ({ recipient, assetValue, feeOptionKey, ...rest }: import("@swapkit/toolboxes/utxo").UTXOTransferParams) => Promise<string>;
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
chain: import("@swapkit/helpers").UTXOChain;
|
|
518
|
-
changeAddress?: string;
|
|
519
|
-
}) => {
|
|
520
|
-
inputs: (import("@swapkit/toolboxes/utxo").UTXOType | import("@swapkit/toolboxes/utxo").UTXOInputWithScriptType)[];
|
|
521
|
-
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
522
|
-
fee: number;
|
|
523
|
-
} | {
|
|
524
|
-
fee: number;
|
|
525
|
-
inputs?: undefined;
|
|
526
|
-
outputs?: undefined;
|
|
527
|
-
};
|
|
503
|
+
validateAddress: typeof import("@swapkit/toolboxes/utxo").bchValidateAddress;
|
|
504
|
+
accumulative: typeof import("@swapkit/toolboxes/utxo").accumulative;
|
|
528
505
|
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo").UTXOCalculateTxSizeParams) => number;
|
|
529
506
|
createKeysForPath: (params: {
|
|
530
507
|
wif?: string;
|
|
531
508
|
phrase?: string;
|
|
532
509
|
derivationPath?: string;
|
|
533
510
|
}) => import("@swapkit/toolboxes/utxo").BchECPair;
|
|
511
|
+
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
512
|
+
from: string;
|
|
513
|
+
memo?: string;
|
|
514
|
+
feeRate?: number;
|
|
515
|
+
feeOptionKey?: FeeOption;
|
|
516
|
+
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
517
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
518
|
+
estimateTransactionFee: (params: {
|
|
519
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
520
|
+
recipient: string;
|
|
521
|
+
sender: string;
|
|
522
|
+
memo?: string;
|
|
523
|
+
feeOptionKey?: FeeOption;
|
|
524
|
+
feeRate?: number;
|
|
525
|
+
fetchTxHex?: boolean;
|
|
526
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
534
527
|
getInputsOutputsFee: ({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<import("@swapkit/toolboxes/utxo").UTXOBuildTxParams, "feeRate"> & {
|
|
535
528
|
feeOptionKey?: FeeOption;
|
|
536
529
|
feeRate?: number;
|
|
537
530
|
}) => Promise<{
|
|
531
|
+
fee: number;
|
|
538
532
|
inputs: (import("@swapkit/toolboxes/utxo").UTXOType | import("@swapkit/toolboxes/utxo").UTXOInputWithScriptType)[];
|
|
539
533
|
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
540
|
-
fee: number;
|
|
541
534
|
} | {
|
|
542
535
|
fee: number;
|
|
543
536
|
inputs?: undefined;
|
|
@@ -547,70 +540,31 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
547
540
|
phrase: string;
|
|
548
541
|
derivationPath: string;
|
|
549
542
|
}) => string;
|
|
550
|
-
estimateTransactionFee: (params: {
|
|
551
|
-
assetValue: import("@swapkit/helpers").AssetValue;
|
|
552
|
-
recipient: string;
|
|
553
|
-
sender: string;
|
|
554
|
-
memo?: string;
|
|
555
|
-
feeOptionKey?: FeeOption;
|
|
556
|
-
feeRate?: number;
|
|
557
|
-
fetchTxHex?: boolean;
|
|
558
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
559
|
-
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
560
|
-
from: string;
|
|
561
|
-
memo?: string;
|
|
562
|
-
feeRate?: number;
|
|
563
|
-
feeOptionKey?: FeeOption;
|
|
564
|
-
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
565
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
566
543
|
};
|
|
567
544
|
GAIA: ChainWallet<Chain.Cosmos> & {
|
|
568
|
-
transfer: ({ recipient, assetValue, memo, feeRate, feeOptionKey, }: GenericTransferParams) => Promise<string>;
|
|
569
|
-
getAddress: () => Promise<string | undefined>;
|
|
570
|
-
getAccount: (address: string) => Promise<import("@cosmjs/stargate").Account | null>;
|
|
571
|
-
getBalance: (address: string, _potentialScamFilter?: boolean) => Promise<AssetValue[]>;
|
|
572
|
-
getSignerFromPhrase: ({ phrase, derivationPath, }: {
|
|
573
|
-
phrase: string;
|
|
574
|
-
derivationPath: import("@swapkit/helpers").DerivationPathArray;
|
|
575
|
-
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
576
|
-
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
577
545
|
createPrivateKeyFromPhrase: (phrase: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
578
|
-
|
|
579
|
-
getPubKey: () => Promise<string>;
|
|
580
|
-
getFees: () => Promise<{
|
|
581
|
-
average: import("@swapkit/helpers").SwapKitNumber;
|
|
582
|
-
fast: import("@swapkit/helpers").SwapKitNumber;
|
|
583
|
-
fastest: import("@swapkit/helpers").SwapKitNumber;
|
|
584
|
-
}>;
|
|
546
|
+
createTransaction: typeof import("@swapkit/toolboxes/cosmos").cosmosCreateTransaction;
|
|
585
547
|
fetchFeeRateFromSwapKit: typeof import("@swapkit/toolboxes/cosmos").fetchFeeRateFromSwapKit;
|
|
548
|
+
getAccount: (address: string) => Promise<import("@cosmjs/stargate").Account | null>;
|
|
549
|
+
getAddress: () => Promise<string | undefined>;
|
|
550
|
+
getBalance: (address: string, _potentialScamFilter?: boolean) => Promise<AssetValue[]>;
|
|
586
551
|
getBalanceAsDenoms: (address: string) => Promise<{
|
|
587
552
|
denom: string;
|
|
588
553
|
amount: string;
|
|
589
554
|
}[]>;
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
amount: {
|
|
595
|
-
denom: string;
|
|
596
|
-
amount: string;
|
|
597
|
-
}[];
|
|
598
|
-
gas: string;
|
|
599
|
-
};
|
|
600
|
-
memo: string;
|
|
601
|
-
sequence: number;
|
|
602
|
-
msgs: {
|
|
603
|
-
typeUrl: string;
|
|
604
|
-
value: {
|
|
605
|
-
fromAddress: string;
|
|
606
|
-
toAddress: string;
|
|
607
|
-
amount: {
|
|
608
|
-
amount: string;
|
|
609
|
-
denom: string;
|
|
610
|
-
}[];
|
|
611
|
-
};
|
|
612
|
-
}[];
|
|
555
|
+
getFees: () => Promise<{
|
|
556
|
+
average: import("@swapkit/helpers").SwapKitNumber;
|
|
557
|
+
fast: import("@swapkit/helpers").SwapKitNumber;
|
|
558
|
+
fastest: import("@swapkit/helpers").SwapKitNumber;
|
|
613
559
|
}>;
|
|
560
|
+
getPubKey: () => Promise<string>;
|
|
561
|
+
getSignerFromPhrase: ({ phrase, derivationPath }: {
|
|
562
|
+
phrase: string;
|
|
563
|
+
derivationPath: import("@swapkit/helpers").DerivationPathArray;
|
|
564
|
+
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
565
|
+
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
566
|
+
transfer: ({ recipient, assetValue, memo, feeRate, feeOptionKey, }: GenericTransferParams) => Promise<string>;
|
|
567
|
+
validateAddress: (address: string) => boolean;
|
|
614
568
|
verifySignature: ({ signature, message, address, }: {
|
|
615
569
|
signature: string;
|
|
616
570
|
message: string;
|
|
@@ -618,34 +572,38 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
618
572
|
}) => Promise<boolean>;
|
|
619
573
|
};
|
|
620
574
|
DASH: ChainWallet<Chain.Dash> & {
|
|
621
|
-
accumulative:
|
|
622
|
-
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
623
|
-
chain: import("@swapkit/helpers").UTXOChain;
|
|
624
|
-
changeAddress?: string;
|
|
625
|
-
}) => {
|
|
626
|
-
inputs: (import("@swapkit/toolboxes/utxo").UTXOType | import("@swapkit/toolboxes/utxo").UTXOInputWithScriptType)[];
|
|
627
|
-
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
628
|
-
fee: number;
|
|
629
|
-
} | {
|
|
630
|
-
fee: number;
|
|
631
|
-
inputs?: undefined;
|
|
632
|
-
outputs?: undefined;
|
|
633
|
-
};
|
|
634
|
-
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo").UTXOCalculateTxSizeParams) => number;
|
|
635
|
-
getAddressFromKeys: (keys: import("ecpair").ECPairInterface | import("@swapkit/toolboxes/utxo").BchECPair) => string;
|
|
636
|
-
getAddress: () => Promise<string | undefined>;
|
|
637
|
-
validateAddress: (address: string) => boolean;
|
|
575
|
+
accumulative: typeof import("@swapkit/toolboxes/utxo").accumulative;
|
|
638
576
|
broadcastTx: (txHash: string) => Promise<string>;
|
|
639
|
-
|
|
640
|
-
psbt: import("bitcoinjs-lib").Psbt;
|
|
641
|
-
utxos: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
642
|
-
inputs: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
643
|
-
}>;
|
|
577
|
+
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo").UTXOCalculateTxSizeParams) => number;
|
|
644
578
|
createKeysForPath: (params: {
|
|
645
579
|
wif?: string;
|
|
646
580
|
phrase?: string;
|
|
647
581
|
derivationPath?: string;
|
|
648
582
|
}) => import("ecpair").ECPairInterface;
|
|
583
|
+
createTransaction: ({ assetValue, recipient, memo, feeRate, sender, fetchTxHex, }: import("@swapkit/toolboxes/utxo").UTXOBuildTxParams) => Promise<{
|
|
584
|
+
psbt: import("bitcoinjs-lib").Psbt;
|
|
585
|
+
utxos: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
586
|
+
inputs: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
587
|
+
}>;
|
|
588
|
+
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
589
|
+
from: string;
|
|
590
|
+
memo?: string;
|
|
591
|
+
feeRate?: number;
|
|
592
|
+
feeOptionKey?: FeeOption;
|
|
593
|
+
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
594
|
+
}) => Promise<AssetValue>;
|
|
595
|
+
estimateTransactionFee: (params: {
|
|
596
|
+
assetValue: AssetValue;
|
|
597
|
+
recipient: string;
|
|
598
|
+
sender: string;
|
|
599
|
+
memo?: string;
|
|
600
|
+
feeOptionKey?: FeeOption;
|
|
601
|
+
feeRate?: number;
|
|
602
|
+
fetchTxHex?: boolean;
|
|
603
|
+
}) => Promise<AssetValue>;
|
|
604
|
+
getAddress: () => Promise<string | undefined>;
|
|
605
|
+
getAddressFromKeys: (keys: import("ecpair").ECPairInterface | import("@swapkit/toolboxes/utxo").BchECPair) => string;
|
|
606
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<AssetValue[]>;
|
|
649
607
|
getFeeRates: () => Promise<{
|
|
650
608
|
average: number;
|
|
651
609
|
fast: number;
|
|
@@ -655,20 +613,42 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
655
613
|
feeOptionKey?: FeeOption;
|
|
656
614
|
feeRate?: number;
|
|
657
615
|
}) => Promise<{
|
|
616
|
+
fee: number;
|
|
658
617
|
inputs: (import("@swapkit/toolboxes/utxo").UTXOType | import("@swapkit/toolboxes/utxo").UTXOInputWithScriptType)[];
|
|
659
618
|
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
660
|
-
fee: number;
|
|
661
619
|
} | {
|
|
662
620
|
fee: number;
|
|
663
621
|
inputs?: undefined;
|
|
664
622
|
outputs?: undefined;
|
|
665
623
|
}>;
|
|
666
|
-
transfer: ({ memo, recipient, feeOptionKey, feeRate, assetValue, }: import("@swapkit/toolboxes/utxo").UTXOTransferParams) => Promise<string>;
|
|
667
624
|
getPrivateKeyFromMnemonic: (params: {
|
|
668
625
|
phrase: string;
|
|
669
626
|
derivationPath: string;
|
|
670
627
|
}) => string;
|
|
671
|
-
|
|
628
|
+
transfer: ({ memo, recipient, feeOptionKey, feeRate, assetValue }: import("@swapkit/toolboxes/utxo").UTXOTransferParams) => Promise<string>;
|
|
629
|
+
validateAddress: (address: string) => boolean;
|
|
630
|
+
};
|
|
631
|
+
DOGE: ChainWallet<Chain.Dogecoin> & {
|
|
632
|
+
accumulative: typeof import("@swapkit/toolboxes/utxo").accumulative;
|
|
633
|
+
broadcastTx: (txHash: string) => Promise<string>;
|
|
634
|
+
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo").UTXOCalculateTxSizeParams) => number;
|
|
635
|
+
createKeysForPath: (params: {
|
|
636
|
+
wif?: string;
|
|
637
|
+
phrase?: string;
|
|
638
|
+
derivationPath?: string;
|
|
639
|
+
}) => import("ecpair").ECPairInterface;
|
|
640
|
+
createTransaction: ({ assetValue, recipient, memo, feeRate, sender, fetchTxHex, }: import("@swapkit/toolboxes/utxo").UTXOBuildTxParams) => Promise<{
|
|
641
|
+
psbt: import("bitcoinjs-lib").Psbt;
|
|
642
|
+
utxos: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
643
|
+
inputs: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
644
|
+
}>;
|
|
645
|
+
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
646
|
+
from: string;
|
|
647
|
+
memo?: string;
|
|
648
|
+
feeRate?: number;
|
|
649
|
+
feeOptionKey?: FeeOption;
|
|
650
|
+
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
651
|
+
}) => Promise<AssetValue>;
|
|
672
652
|
estimateTransactionFee: (params: {
|
|
673
653
|
assetValue: AssetValue;
|
|
674
654
|
recipient: string;
|
|
@@ -678,43 +658,9 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
678
658
|
feeRate?: number;
|
|
679
659
|
fetchTxHex?: boolean;
|
|
680
660
|
}) => Promise<AssetValue>;
|
|
681
|
-
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
682
|
-
from: string;
|
|
683
|
-
memo?: string;
|
|
684
|
-
feeRate?: number;
|
|
685
|
-
feeOptionKey?: FeeOption;
|
|
686
|
-
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
687
|
-
}) => Promise<AssetValue>;
|
|
688
|
-
};
|
|
689
|
-
DOGE: ChainWallet<Chain.Dogecoin> & {
|
|
690
|
-
accumulative: ({ inputs, outputs, feeRate: initialFeeRate, chain, changeAddress, }: import("@swapkit/toolboxes/utxo").UTXOCalculateTxSizeParams & {
|
|
691
|
-
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
692
|
-
chain: import("@swapkit/helpers").UTXOChain;
|
|
693
|
-
changeAddress?: string;
|
|
694
|
-
}) => {
|
|
695
|
-
inputs: (import("@swapkit/toolboxes/utxo").UTXOType | import("@swapkit/toolboxes/utxo").UTXOInputWithScriptType)[];
|
|
696
|
-
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
697
|
-
fee: number;
|
|
698
|
-
} | {
|
|
699
|
-
fee: number;
|
|
700
|
-
inputs?: undefined;
|
|
701
|
-
outputs?: undefined;
|
|
702
|
-
};
|
|
703
|
-
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo").UTXOCalculateTxSizeParams) => number;
|
|
704
|
-
getAddressFromKeys: (keys: import("ecpair").ECPairInterface | import("@swapkit/toolboxes/utxo").BchECPair) => string;
|
|
705
661
|
getAddress: () => Promise<string | undefined>;
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
createTransaction: ({ assetValue, recipient, memo, feeRate, sender, fetchTxHex, }: import("@swapkit/toolboxes/utxo").UTXOBuildTxParams) => Promise<{
|
|
709
|
-
psbt: import("bitcoinjs-lib").Psbt;
|
|
710
|
-
utxos: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
711
|
-
inputs: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
712
|
-
}>;
|
|
713
|
-
createKeysForPath: (params: {
|
|
714
|
-
wif?: string;
|
|
715
|
-
phrase?: string;
|
|
716
|
-
derivationPath?: string;
|
|
717
|
-
}) => import("ecpair").ECPairInterface;
|
|
662
|
+
getAddressFromKeys: (keys: import("ecpair").ECPairInterface | import("@swapkit/toolboxes/utxo").BchECPair) => string;
|
|
663
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<AssetValue[]>;
|
|
718
664
|
getFeeRates: () => Promise<{
|
|
719
665
|
average: number;
|
|
720
666
|
fast: number;
|
|
@@ -724,60 +670,39 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
724
670
|
feeOptionKey?: FeeOption;
|
|
725
671
|
feeRate?: number;
|
|
726
672
|
}) => Promise<{
|
|
673
|
+
fee: number;
|
|
727
674
|
inputs: (import("@swapkit/toolboxes/utxo").UTXOType | import("@swapkit/toolboxes/utxo").UTXOInputWithScriptType)[];
|
|
728
675
|
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
729
|
-
fee: number;
|
|
730
676
|
} | {
|
|
731
677
|
fee: number;
|
|
732
678
|
inputs?: undefined;
|
|
733
679
|
outputs?: undefined;
|
|
734
680
|
}>;
|
|
735
|
-
transfer: ({ memo, recipient, feeOptionKey, feeRate, assetValue, }: import("@swapkit/toolboxes/utxo").UTXOTransferParams) => Promise<string>;
|
|
736
681
|
getPrivateKeyFromMnemonic: (params: {
|
|
737
682
|
phrase: string;
|
|
738
683
|
derivationPath: string;
|
|
739
684
|
}) => string;
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
assetValue: AssetValue;
|
|
743
|
-
recipient: string;
|
|
744
|
-
sender: string;
|
|
745
|
-
memo?: string;
|
|
746
|
-
feeOptionKey?: FeeOption;
|
|
747
|
-
feeRate?: number;
|
|
748
|
-
fetchTxHex?: boolean;
|
|
749
|
-
}) => Promise<AssetValue>;
|
|
750
|
-
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
751
|
-
from: string;
|
|
752
|
-
memo?: string;
|
|
753
|
-
feeRate?: number;
|
|
754
|
-
feeOptionKey?: FeeOption;
|
|
755
|
-
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
756
|
-
}) => Promise<AssetValue>;
|
|
685
|
+
transfer: ({ memo, recipient, feeOptionKey, feeRate, assetValue }: import("@swapkit/toolboxes/utxo").UTXOTransferParams) => Promise<string>;
|
|
686
|
+
validateAddress: (address: string) => boolean;
|
|
757
687
|
};
|
|
758
688
|
ETH: ChainWallet<Chain.Ethereum> & {
|
|
759
689
|
multicall: (callTuples: {
|
|
760
690
|
address: string;
|
|
761
691
|
data: string;
|
|
762
692
|
}[], multicallAddress?: string, funcName?: string, feeOptionKey?: FeeOption) => Promise<string>;
|
|
763
|
-
getNetworkParams: () => undefined;
|
|
764
693
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
765
|
-
|
|
766
|
-
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
767
|
-
feeOption: FeeOption;
|
|
768
|
-
chain: EVMChain;
|
|
769
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
770
|
-
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
771
|
-
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
772
|
-
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
694
|
+
getNetworkParams: () => undefined;
|
|
773
695
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
774
696
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<bigint>;
|
|
775
697
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
776
|
-
|
|
698
|
+
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
699
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
777
700
|
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
778
701
|
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
779
|
-
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
780
702
|
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
703
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
704
|
+
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
705
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
781
706
|
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EVMTransferParams & {
|
|
782
707
|
assetValue: import("@swapkit/helpers").AssetValue;
|
|
783
708
|
funcName?: string;
|
|
@@ -791,7 +716,12 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
791
716
|
maxFeePerGas?: bigint;
|
|
792
717
|
maxPriorityFeePerGas?: bigint;
|
|
793
718
|
}; }>;
|
|
794
|
-
|
|
719
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
720
|
+
feeOption: FeeOption;
|
|
721
|
+
chain: EVMChain;
|
|
722
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
723
|
+
getAddress: () => string | Promise<string> | undefined;
|
|
724
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<boolean>;
|
|
795
725
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
796
726
|
feeOptionKey?: FeeOption;
|
|
797
727
|
}) => Promise<string>;
|
|
@@ -801,24 +731,19 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
801
731
|
};
|
|
802
732
|
FIAT: ChainWallet<Chain.Fiat>;
|
|
803
733
|
GNO: ChainWallet<Chain.Gnosis> & {
|
|
804
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
805
734
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
806
|
-
|
|
807
|
-
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
808
|
-
feeOption: FeeOption;
|
|
809
|
-
chain: EVMChain;
|
|
810
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
811
|
-
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
812
|
-
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
813
|
-
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
735
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
814
736
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
815
737
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<bigint>;
|
|
816
738
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
817
|
-
|
|
739
|
+
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
740
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
818
741
|
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
819
742
|
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
820
|
-
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
821
743
|
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
744
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
745
|
+
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
746
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
822
747
|
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EVMTransferParams & {
|
|
823
748
|
assetValue: import("@swapkit/helpers").AssetValue;
|
|
824
749
|
funcName?: string;
|
|
@@ -832,7 +757,12 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
832
757
|
maxFeePerGas?: bigint;
|
|
833
758
|
maxPriorityFeePerGas?: bigint;
|
|
834
759
|
}; }>;
|
|
835
|
-
|
|
760
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
761
|
+
feeOption: FeeOption;
|
|
762
|
+
chain: EVMChain;
|
|
763
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
764
|
+
getAddress: () => string | Promise<string> | undefined;
|
|
765
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<boolean>;
|
|
836
766
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
837
767
|
feeOptionKey?: FeeOption;
|
|
838
768
|
}) => Promise<string>;
|
|
@@ -841,52 +771,29 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
841
771
|
validateAddress: (address: string) => boolean;
|
|
842
772
|
};
|
|
843
773
|
KUJI: ChainWallet<Chain.Kujira> & {
|
|
844
|
-
transfer: ({ recipient, assetValue, memo, feeRate, feeOptionKey, }: GenericTransferParams) => Promise<string>;
|
|
845
|
-
getAddress: () => Promise<string | undefined>;
|
|
846
|
-
getAccount: (address: string) => Promise<import("@cosmjs/stargate").Account | null>;
|
|
847
|
-
getBalance: (address: string, _potentialScamFilter?: boolean) => Promise<AssetValue[]>;
|
|
848
|
-
getSignerFromPhrase: ({ phrase, derivationPath, }: {
|
|
849
|
-
phrase: string;
|
|
850
|
-
derivationPath: import("@swapkit/helpers").DerivationPathArray;
|
|
851
|
-
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
852
|
-
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
853
774
|
createPrivateKeyFromPhrase: (phrase: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
854
|
-
|
|
855
|
-
getPubKey: () => Promise<string>;
|
|
856
|
-
getFees: () => Promise<{
|
|
857
|
-
average: import("@swapkit/helpers").SwapKitNumber;
|
|
858
|
-
fast: import("@swapkit/helpers").SwapKitNumber;
|
|
859
|
-
fastest: import("@swapkit/helpers").SwapKitNumber;
|
|
860
|
-
}>;
|
|
775
|
+
createTransaction: typeof import("@swapkit/toolboxes/cosmos").cosmosCreateTransaction;
|
|
861
776
|
fetchFeeRateFromSwapKit: typeof import("@swapkit/toolboxes/cosmos").fetchFeeRateFromSwapKit;
|
|
777
|
+
getAccount: (address: string) => Promise<import("@cosmjs/stargate").Account | null>;
|
|
778
|
+
getAddress: () => Promise<string | undefined>;
|
|
779
|
+
getBalance: (address: string, _potentialScamFilter?: boolean) => Promise<AssetValue[]>;
|
|
862
780
|
getBalanceAsDenoms: (address: string) => Promise<{
|
|
863
781
|
denom: string;
|
|
864
782
|
amount: string;
|
|
865
783
|
}[]>;
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
amount: {
|
|
871
|
-
denom: string;
|
|
872
|
-
amount: string;
|
|
873
|
-
}[];
|
|
874
|
-
gas: string;
|
|
875
|
-
};
|
|
876
|
-
memo: string;
|
|
877
|
-
sequence: number;
|
|
878
|
-
msgs: {
|
|
879
|
-
typeUrl: string;
|
|
880
|
-
value: {
|
|
881
|
-
fromAddress: string;
|
|
882
|
-
toAddress: string;
|
|
883
|
-
amount: {
|
|
884
|
-
amount: string;
|
|
885
|
-
denom: string;
|
|
886
|
-
}[];
|
|
887
|
-
};
|
|
888
|
-
}[];
|
|
784
|
+
getFees: () => Promise<{
|
|
785
|
+
average: import("@swapkit/helpers").SwapKitNumber;
|
|
786
|
+
fast: import("@swapkit/helpers").SwapKitNumber;
|
|
787
|
+
fastest: import("@swapkit/helpers").SwapKitNumber;
|
|
889
788
|
}>;
|
|
789
|
+
getPubKey: () => Promise<string>;
|
|
790
|
+
getSignerFromPhrase: ({ phrase, derivationPath }: {
|
|
791
|
+
phrase: string;
|
|
792
|
+
derivationPath: import("@swapkit/helpers").DerivationPathArray;
|
|
793
|
+
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
794
|
+
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
795
|
+
transfer: ({ recipient, assetValue, memo, feeRate, feeOptionKey, }: GenericTransferParams) => Promise<string>;
|
|
796
|
+
validateAddress: (address: string) => boolean;
|
|
890
797
|
verifySignature: ({ signature, message, address, }: {
|
|
891
798
|
signature: string;
|
|
892
799
|
message: string;
|
|
@@ -894,34 +801,38 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
894
801
|
}) => Promise<boolean>;
|
|
895
802
|
};
|
|
896
803
|
LTC: ChainWallet<Chain.Litecoin> & {
|
|
897
|
-
accumulative:
|
|
898
|
-
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
899
|
-
chain: import("@swapkit/helpers").UTXOChain;
|
|
900
|
-
changeAddress?: string;
|
|
901
|
-
}) => {
|
|
902
|
-
inputs: (import("@swapkit/toolboxes/utxo").UTXOType | import("@swapkit/toolboxes/utxo").UTXOInputWithScriptType)[];
|
|
903
|
-
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
904
|
-
fee: number;
|
|
905
|
-
} | {
|
|
906
|
-
fee: number;
|
|
907
|
-
inputs?: undefined;
|
|
908
|
-
outputs?: undefined;
|
|
909
|
-
};
|
|
910
|
-
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo").UTXOCalculateTxSizeParams) => number;
|
|
911
|
-
getAddressFromKeys: (keys: import("ecpair").ECPairInterface | import("@swapkit/toolboxes/utxo").BchECPair) => string;
|
|
912
|
-
getAddress: () => Promise<string | undefined>;
|
|
913
|
-
validateAddress: (address: string) => boolean;
|
|
804
|
+
accumulative: typeof import("@swapkit/toolboxes/utxo").accumulative;
|
|
914
805
|
broadcastTx: (txHash: string) => Promise<string>;
|
|
915
|
-
|
|
916
|
-
psbt: import("bitcoinjs-lib").Psbt;
|
|
917
|
-
utxos: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
918
|
-
inputs: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
919
|
-
}>;
|
|
806
|
+
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo").UTXOCalculateTxSizeParams) => number;
|
|
920
807
|
createKeysForPath: (params: {
|
|
921
808
|
wif?: string;
|
|
922
809
|
phrase?: string;
|
|
923
810
|
derivationPath?: string;
|
|
924
811
|
}) => import("ecpair").ECPairInterface;
|
|
812
|
+
createTransaction: ({ assetValue, recipient, memo, feeRate, sender, fetchTxHex, }: import("@swapkit/toolboxes/utxo").UTXOBuildTxParams) => Promise<{
|
|
813
|
+
psbt: import("bitcoinjs-lib").Psbt;
|
|
814
|
+
utxos: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
815
|
+
inputs: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
816
|
+
}>;
|
|
817
|
+
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
818
|
+
from: string;
|
|
819
|
+
memo?: string;
|
|
820
|
+
feeRate?: number;
|
|
821
|
+
feeOptionKey?: FeeOption;
|
|
822
|
+
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
823
|
+
}) => Promise<AssetValue>;
|
|
824
|
+
estimateTransactionFee: (params: {
|
|
825
|
+
assetValue: AssetValue;
|
|
826
|
+
recipient: string;
|
|
827
|
+
sender: string;
|
|
828
|
+
memo?: string;
|
|
829
|
+
feeOptionKey?: FeeOption;
|
|
830
|
+
feeRate?: number;
|
|
831
|
+
fetchTxHex?: boolean;
|
|
832
|
+
}) => Promise<AssetValue>;
|
|
833
|
+
getAddress: () => Promise<string | undefined>;
|
|
834
|
+
getAddressFromKeys: (keys: import("ecpair").ECPairInterface | import("@swapkit/toolboxes/utxo").BchECPair) => string;
|
|
835
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<AssetValue[]>;
|
|
925
836
|
getFeeRates: () => Promise<{
|
|
926
837
|
average: number;
|
|
927
838
|
fast: number;
|
|
@@ -931,36 +842,20 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
931
842
|
feeOptionKey?: FeeOption;
|
|
932
843
|
feeRate?: number;
|
|
933
844
|
}) => Promise<{
|
|
845
|
+
fee: number;
|
|
934
846
|
inputs: (import("@swapkit/toolboxes/utxo").UTXOType | import("@swapkit/toolboxes/utxo").UTXOInputWithScriptType)[];
|
|
935
847
|
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
936
|
-
fee: number;
|
|
937
848
|
} | {
|
|
938
849
|
fee: number;
|
|
939
850
|
inputs?: undefined;
|
|
940
851
|
outputs?: undefined;
|
|
941
852
|
}>;
|
|
942
|
-
transfer: ({ memo, recipient, feeOptionKey, feeRate, assetValue, }: import("@swapkit/toolboxes/utxo").UTXOTransferParams) => Promise<string>;
|
|
943
853
|
getPrivateKeyFromMnemonic: (params: {
|
|
944
854
|
phrase: string;
|
|
945
855
|
derivationPath: string;
|
|
946
856
|
}) => string;
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
assetValue: AssetValue;
|
|
950
|
-
recipient: string;
|
|
951
|
-
sender: string;
|
|
952
|
-
memo?: string;
|
|
953
|
-
feeOptionKey?: FeeOption;
|
|
954
|
-
feeRate?: number;
|
|
955
|
-
fetchTxHex?: boolean;
|
|
956
|
-
}) => Promise<AssetValue>;
|
|
957
|
-
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
958
|
-
from: string;
|
|
959
|
-
memo?: string;
|
|
960
|
-
feeRate?: number;
|
|
961
|
-
feeOptionKey?: FeeOption;
|
|
962
|
-
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
963
|
-
}) => Promise<AssetValue>;
|
|
857
|
+
transfer: ({ memo, recipient, feeOptionKey, feeRate, assetValue }: import("@swapkit/toolboxes/utxo").UTXOTransferParams) => Promise<string>;
|
|
858
|
+
validateAddress: (address: string) => boolean;
|
|
964
859
|
};
|
|
965
860
|
MAYA: ChainWallet<Chain.Maya> & {
|
|
966
861
|
broadcastMultisigTx: (tx: string, signers: import("@swapkit/toolboxes/cosmos").MultiSigSigner[], membersPubKeys: string[], threshold: number, bodyBytes: Uint8Array) => Promise<string>;
|
|
@@ -970,36 +865,36 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
970
865
|
assetValue: import("@swapkit/helpers").AssetValue;
|
|
971
866
|
memo?: string;
|
|
972
867
|
}) => {
|
|
973
|
-
type: "thorchain/
|
|
868
|
+
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
974
869
|
value: {
|
|
975
|
-
|
|
976
|
-
to_address: string | undefined;
|
|
977
|
-
amount: {
|
|
870
|
+
coins: {
|
|
978
871
|
amount: string;
|
|
979
|
-
|
|
872
|
+
asset: string;
|
|
980
873
|
}[];
|
|
874
|
+
memo: string;
|
|
875
|
+
signer: string;
|
|
981
876
|
};
|
|
982
877
|
} | {
|
|
983
|
-
type: "thorchain/
|
|
878
|
+
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
984
879
|
value: {
|
|
985
|
-
|
|
880
|
+
amount: {
|
|
986
881
|
amount: string;
|
|
987
|
-
|
|
882
|
+
denom: string;
|
|
988
883
|
}[];
|
|
989
|
-
|
|
990
|
-
|
|
884
|
+
from_address: string;
|
|
885
|
+
to_address: string | undefined;
|
|
991
886
|
};
|
|
992
887
|
};
|
|
993
888
|
buildEncodedTxBody: typeof import("@swapkit/toolboxes/cosmos").buildEncodedTxBody;
|
|
994
889
|
convertToSignable: (msg: {
|
|
995
890
|
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
996
891
|
value: {
|
|
997
|
-
from_address: string;
|
|
998
|
-
to_address: string | undefined;
|
|
999
892
|
amount: {
|
|
1000
893
|
amount: string;
|
|
1001
894
|
denom: string;
|
|
1002
895
|
}[];
|
|
896
|
+
from_address: string;
|
|
897
|
+
to_address: string | undefined;
|
|
1003
898
|
};
|
|
1004
899
|
} | {
|
|
1005
900
|
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
@@ -1008,40 +903,47 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1008
903
|
amount: string;
|
|
1009
904
|
asset: string;
|
|
1010
905
|
}[];
|
|
1011
|
-
signer: string;
|
|
1012
906
|
memo: string;
|
|
907
|
+
signer: string;
|
|
1013
908
|
};
|
|
1014
909
|
}, chain: Chain.THORChain | Chain.Maya) => Promise<import("@cosmjs/proto-signing").EncodeObject>;
|
|
1015
910
|
createDefaultAminoTypes: () => Promise<import("@cosmjs/stargate").AminoTypes>;
|
|
1016
911
|
createDefaultRegistry: typeof import("@swapkit/toolboxes/cosmos").createDefaultRegistry;
|
|
1017
912
|
createMultisig: (pubKeys: string[], threshold: number, noSortPubKeys?: boolean) => Promise<import("@cosmjs/amino").MultisigThresholdPubkey>;
|
|
1018
913
|
createTransaction: (params: import("@swapkit/toolboxes/cosmos").ThorchainCreateTransactionParams) => Promise<{
|
|
1019
|
-
chainId: import("@swapkit/helpers").ChainId;
|
|
1020
914
|
accountNumber: number;
|
|
1021
|
-
|
|
915
|
+
chainId: import("@swapkit/helpers").ChainId;
|
|
916
|
+
fee: {
|
|
917
|
+
amount: {
|
|
918
|
+
amount: string;
|
|
919
|
+
denom: string;
|
|
920
|
+
}[];
|
|
921
|
+
gas: string;
|
|
922
|
+
};
|
|
923
|
+
memo: string;
|
|
1022
924
|
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
1023
925
|
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
1024
926
|
value: {
|
|
1025
|
-
from_address: string;
|
|
1026
|
-
to_address: string | undefined;
|
|
1027
927
|
amount: {
|
|
1028
928
|
amount: string;
|
|
1029
929
|
denom: string;
|
|
1030
930
|
}[];
|
|
931
|
+
from_address: string;
|
|
932
|
+
to_address: string | undefined;
|
|
1031
933
|
};
|
|
1032
934
|
})[];
|
|
935
|
+
sequence: number;
|
|
936
|
+
}> | Promise<{
|
|
937
|
+
accountNumber: number;
|
|
938
|
+
chainId: import("@swapkit/helpers").ChainId;
|
|
1033
939
|
fee: {
|
|
1034
940
|
amount: {
|
|
1035
|
-
denom: string;
|
|
1036
941
|
amount: string;
|
|
942
|
+
denom: string;
|
|
1037
943
|
}[];
|
|
1038
944
|
gas: string;
|
|
1039
945
|
};
|
|
1040
946
|
memo: string;
|
|
1041
|
-
}> | Promise<{
|
|
1042
|
-
chainId: import("@swapkit/helpers").ChainId;
|
|
1043
|
-
accountNumber: number;
|
|
1044
|
-
sequence: number;
|
|
1045
947
|
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
1046
948
|
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
1047
949
|
value: {
|
|
@@ -1049,18 +951,11 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1049
951
|
amount: string;
|
|
1050
952
|
asset: string;
|
|
1051
953
|
}[];
|
|
1052
|
-
signer: string;
|
|
1053
954
|
memo: string;
|
|
955
|
+
signer: string;
|
|
1054
956
|
};
|
|
1055
957
|
})[];
|
|
1056
|
-
|
|
1057
|
-
amount: {
|
|
1058
|
-
denom: string;
|
|
1059
|
-
amount: string;
|
|
1060
|
-
}[];
|
|
1061
|
-
gas: string;
|
|
1062
|
-
};
|
|
1063
|
-
memo: string;
|
|
958
|
+
sequence: number;
|
|
1064
959
|
}>;
|
|
1065
960
|
deposit: ({ assetValue, memo, recipient, }: Omit<GenericTransferParams, "recipient"> & {
|
|
1066
961
|
recipient?: string;
|
|
@@ -1072,38 +967,38 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1072
967
|
}>;
|
|
1073
968
|
importSignature: (signature: string) => Uint8Array<ArrayBufferLike>;
|
|
1074
969
|
parseAminoMessageForDirectSigning: typeof import("@swapkit/toolboxes/cosmos").parseAminoMessageForDirectSigning;
|
|
970
|
+
pubkeyToAddress: (pubkey: import("@cosmjs/amino").Pubkey) => Promise<string>;
|
|
1075
971
|
secp256k1HdWalletFromMnemonic: (mnemonic: string, index?: number) => Promise<import("@cosmjs/amino").Secp256k1HdWallet>;
|
|
1076
|
-
signMultisigTx: ({ wallet, tx
|
|
972
|
+
signMultisigTx: ({ wallet, tx }: {
|
|
1077
973
|
wallet: import("@cosmjs/amino").Secp256k1HdWallet;
|
|
1078
974
|
tx: string | import("@swapkit/toolboxes/cosmos").MultisigTx;
|
|
1079
975
|
}) => Promise<{
|
|
1080
|
-
signature: string;
|
|
1081
976
|
bodyBytes: Uint8Array<ArrayBufferLike>;
|
|
977
|
+
signature: string;
|
|
1082
978
|
}>;
|
|
1083
|
-
signWithPrivateKey: ({ privateKey, message
|
|
979
|
+
signWithPrivateKey: ({ privateKey, message }: {
|
|
1084
980
|
privateKey: Uint8Array;
|
|
1085
981
|
message: string;
|
|
1086
982
|
}) => Promise<string>;
|
|
1087
983
|
transfer: ({ assetValue, memo, recipient, }: Omit<GenericTransferParams, "recipient"> & {
|
|
1088
984
|
recipient?: string;
|
|
1089
985
|
}) => Promise<string>;
|
|
1090
|
-
|
|
1091
|
-
|
|
986
|
+
createPrivateKeyFromPhrase: (phrase: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
987
|
+
fetchFeeRateFromSwapKit: typeof import("@swapkit/toolboxes/cosmos").fetchFeeRateFromSwapKit;
|
|
1092
988
|
getAccount: (address: string) => Promise<import("@cosmjs/stargate").Account | null>;
|
|
989
|
+
getAddress: () => Promise<string | undefined>;
|
|
1093
990
|
getBalance: (address: string, _potentialScamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
1094
|
-
|
|
991
|
+
getBalanceAsDenoms: (address: string) => Promise<{
|
|
992
|
+
denom: string;
|
|
993
|
+
amount: string;
|
|
994
|
+
}[]>;
|
|
995
|
+
getPubKey: () => Promise<string>;
|
|
996
|
+
getSignerFromPhrase: ({ phrase, derivationPath }: {
|
|
1095
997
|
phrase: string;
|
|
1096
998
|
derivationPath: import("@swapkit/helpers").DerivationPathArray;
|
|
1097
999
|
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
1098
1000
|
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
1099
|
-
createPrivateKeyFromPhrase: (phrase: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
1100
1001
|
validateAddress: (address: string) => boolean;
|
|
1101
|
-
getPubKey: () => Promise<string>;
|
|
1102
|
-
fetchFeeRateFromSwapKit: typeof import("@swapkit/toolboxes/cosmos").fetchFeeRateFromSwapKit;
|
|
1103
|
-
getBalanceAsDenoms: (address: string) => Promise<{
|
|
1104
|
-
denom: string;
|
|
1105
|
-
amount: string;
|
|
1106
|
-
}[]>;
|
|
1107
1002
|
verifySignature: ({ signature, message, address, }: {
|
|
1108
1003
|
signature: string;
|
|
1109
1004
|
message: string;
|
|
@@ -1112,52 +1007,29 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1112
1007
|
};
|
|
1113
1008
|
NEAR: ChainWallet<Chain.Near> & import("@swapkit/toolboxes/near").NearToolbox;
|
|
1114
1009
|
NOBLE: ChainWallet<Chain.Noble> & {
|
|
1115
|
-
transfer: ({ recipient, assetValue, memo, feeRate, feeOptionKey, }: GenericTransferParams) => Promise<string>;
|
|
1116
|
-
getAddress: () => Promise<string | undefined>;
|
|
1117
|
-
getAccount: (address: string) => Promise<import("@cosmjs/stargate").Account | null>;
|
|
1118
|
-
getBalance: (address: string, _potentialScamFilter?: boolean) => Promise<AssetValue[]>;
|
|
1119
|
-
getSignerFromPhrase: ({ phrase, derivationPath, }: {
|
|
1120
|
-
phrase: string;
|
|
1121
|
-
derivationPath: import("@swapkit/helpers").DerivationPathArray;
|
|
1122
|
-
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
1123
|
-
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
1124
1010
|
createPrivateKeyFromPhrase: (phrase: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
1125
|
-
|
|
1126
|
-
getPubKey: () => Promise<string>;
|
|
1127
|
-
getFees: () => Promise<{
|
|
1128
|
-
average: import("@swapkit/helpers").SwapKitNumber;
|
|
1129
|
-
fast: import("@swapkit/helpers").SwapKitNumber;
|
|
1130
|
-
fastest: import("@swapkit/helpers").SwapKitNumber;
|
|
1131
|
-
}>;
|
|
1011
|
+
createTransaction: typeof import("@swapkit/toolboxes/cosmos").cosmosCreateTransaction;
|
|
1132
1012
|
fetchFeeRateFromSwapKit: typeof import("@swapkit/toolboxes/cosmos").fetchFeeRateFromSwapKit;
|
|
1013
|
+
getAccount: (address: string) => Promise<import("@cosmjs/stargate").Account | null>;
|
|
1014
|
+
getAddress: () => Promise<string | undefined>;
|
|
1015
|
+
getBalance: (address: string, _potentialScamFilter?: boolean) => Promise<AssetValue[]>;
|
|
1133
1016
|
getBalanceAsDenoms: (address: string) => Promise<{
|
|
1134
1017
|
denom: string;
|
|
1135
1018
|
amount: string;
|
|
1136
1019
|
}[]>;
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
amount: {
|
|
1142
|
-
denom: string;
|
|
1143
|
-
amount: string;
|
|
1144
|
-
}[];
|
|
1145
|
-
gas: string;
|
|
1146
|
-
};
|
|
1147
|
-
memo: string;
|
|
1148
|
-
sequence: number;
|
|
1149
|
-
msgs: {
|
|
1150
|
-
typeUrl: string;
|
|
1151
|
-
value: {
|
|
1152
|
-
fromAddress: string;
|
|
1153
|
-
toAddress: string;
|
|
1154
|
-
amount: {
|
|
1155
|
-
amount: string;
|
|
1156
|
-
denom: string;
|
|
1157
|
-
}[];
|
|
1158
|
-
};
|
|
1159
|
-
}[];
|
|
1020
|
+
getFees: () => Promise<{
|
|
1021
|
+
average: import("@swapkit/helpers").SwapKitNumber;
|
|
1022
|
+
fast: import("@swapkit/helpers").SwapKitNumber;
|
|
1023
|
+
fastest: import("@swapkit/helpers").SwapKitNumber;
|
|
1160
1024
|
}>;
|
|
1025
|
+
getPubKey: () => Promise<string>;
|
|
1026
|
+
getSignerFromPhrase: ({ phrase, derivationPath }: {
|
|
1027
|
+
phrase: string;
|
|
1028
|
+
derivationPath: import("@swapkit/helpers").DerivationPathArray;
|
|
1029
|
+
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
1030
|
+
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
1031
|
+
transfer: ({ recipient, assetValue, memo, feeRate, feeOptionKey, }: GenericTransferParams) => Promise<string>;
|
|
1032
|
+
validateAddress: (address: string) => boolean;
|
|
1161
1033
|
verifySignature: ({ signature, message, address, }: {
|
|
1162
1034
|
signature: string;
|
|
1163
1035
|
message: string;
|
|
@@ -1165,6 +1037,26 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1165
1037
|
}) => Promise<boolean>;
|
|
1166
1038
|
};
|
|
1167
1039
|
OP: ChainWallet<Chain.Optimism> & {
|
|
1040
|
+
estimateGasPrices: Promise<{
|
|
1041
|
+
average: {
|
|
1042
|
+
l1GasPrice?: bigint;
|
|
1043
|
+
gasPrice?: bigint;
|
|
1044
|
+
maxFeePerGas?: bigint;
|
|
1045
|
+
maxPriorityFeePerGas?: bigint;
|
|
1046
|
+
};
|
|
1047
|
+
fast: {
|
|
1048
|
+
l1GasPrice?: bigint;
|
|
1049
|
+
gasPrice?: bigint;
|
|
1050
|
+
maxFeePerGas?: bigint;
|
|
1051
|
+
maxPriorityFeePerGas?: bigint;
|
|
1052
|
+
};
|
|
1053
|
+
fastest: {
|
|
1054
|
+
l1GasPrice?: bigint;
|
|
1055
|
+
gasPrice?: bigint;
|
|
1056
|
+
maxFeePerGas?: bigint;
|
|
1057
|
+
maxPriorityFeePerGas?: bigint;
|
|
1058
|
+
};
|
|
1059
|
+
}>;
|
|
1168
1060
|
estimateL1Gas: (tx: import("ethers").TransactionRequest) => Promise<any>;
|
|
1169
1061
|
estimateL1GasCost: (tx: import("ethers").TransactionRequest) => Promise<any>;
|
|
1170
1062
|
estimateL2GasCost: (tx: import("ethers").TransactionRequest) => Promise<any>;
|
|
@@ -1172,32 +1064,27 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1172
1064
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
1173
1065
|
getL1GasPrice: () => bigint | undefined;
|
|
1174
1066
|
getNetworkParams: () => {
|
|
1067
|
+
blockExplorerUrls: string[];
|
|
1175
1068
|
chainId: import("@swapkit/helpers").ChainId;
|
|
1176
1069
|
chainName: string;
|
|
1177
1070
|
nativeCurrency: {
|
|
1071
|
+
decimals: number;
|
|
1178
1072
|
name: string;
|
|
1179
1073
|
symbol: Chain;
|
|
1180
|
-
decimals: number;
|
|
1181
1074
|
};
|
|
1182
1075
|
rpcUrls: string[];
|
|
1183
|
-
blockExplorerUrls: string[];
|
|
1184
1076
|
};
|
|
1185
|
-
getAddress: () => Promise<string> | undefined;
|
|
1186
|
-
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
1187
|
-
feeOption: import("@swapkit/helpers").FeeOption;
|
|
1188
|
-
chain: import("@swapkit/helpers").EVMChain;
|
|
1189
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1190
|
-
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
1191
|
-
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
1192
|
-
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
1193
1077
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
1194
1078
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<bigint>;
|
|
1195
1079
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
1196
|
-
|
|
1080
|
+
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
1081
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
1197
1082
|
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
1198
1083
|
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
1199
|
-
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
1200
1084
|
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
1085
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
1086
|
+
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
1087
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
1201
1088
|
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EVMTransferParams & {
|
|
1202
1089
|
assetValue: import("@swapkit/helpers").AssetValue;
|
|
1203
1090
|
funcName?: string;
|
|
@@ -1205,15 +1092,14 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1205
1092
|
txOverrides?: import("@swapkit/toolboxes/evm").EVMTxParams;
|
|
1206
1093
|
data?: string;
|
|
1207
1094
|
}) => Promise<bigint>;
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
}
|
|
1214
|
-
isApproved: ({ assetAddress, spenderAddress, from, amount, }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<boolean>;
|
|
1095
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
1096
|
+
feeOption: FeeOption;
|
|
1097
|
+
chain: import("@swapkit/helpers").EVMChain;
|
|
1098
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1099
|
+
getAddress: () => string | Promise<string> | undefined;
|
|
1100
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<boolean>;
|
|
1215
1101
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
1216
|
-
feeOptionKey?:
|
|
1102
|
+
feeOptionKey?: FeeOption;
|
|
1217
1103
|
}) => Promise<string>;
|
|
1218
1104
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | ((message: string | Uint8Array) => Promise<string>) | ((_message: string | Uint8Array) => Promise<string>) | undefined;
|
|
1219
1105
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
@@ -1221,67 +1107,62 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1221
1107
|
};
|
|
1222
1108
|
DOT: ChainWallet<Chain.Polkadot> & {
|
|
1223
1109
|
api: import("@polkadot/api").ApiPromise;
|
|
1224
|
-
|
|
1225
|
-
gasAsset: AssetValue;
|
|
1226
|
-
decodeAddress: (address: string, networkPrefix?: number) => Uint8Array<ArrayBufferLike>;
|
|
1227
|
-
encodeAddress: (address: Uint8Array, encoding?: "ss58" | "hex", networkPrefix?: number) => string;
|
|
1110
|
+
broadcast: (tx: import("@polkadot/api-base/types").SubmittableExtrinsic<"promise">, callback?: import("@polkadot/types/types").Callback<import("@polkadot/types/types").ISubmittableResult>) => Promise<string | (() => void)>;
|
|
1228
1111
|
convertAddress: (address: string, newPrefix: number) => string;
|
|
1229
|
-
getBalance: (address: string) => Promise<AssetValue[]>;
|
|
1230
1112
|
createKeyring: (phrase: string) => Promise<import("@polkadot/keyring/types").KeyringPair>;
|
|
1231
|
-
getAddress: (keyring?: import("@polkadot/types/types").IKeyringPair | import("@polkadot/types/types").Signer) => string | undefined;
|
|
1232
1113
|
createTransaction: (params: import("@swapkit/helpers").GenericCreateTransactionParams) => import("@polkadot/api-base/types").SubmittableExtrinsic<"promise", import("@polkadot/types/types").ISubmittableResult> | undefined;
|
|
1233
|
-
|
|
1234
|
-
|
|
1114
|
+
decodeAddress: (address: string, networkPrefix?: number) => Uint8Array<ArrayBufferLike>;
|
|
1115
|
+
encodeAddress: (address: Uint8Array, encoding?: "ss58" | "hex", networkPrefix?: number) => string;
|
|
1235
1116
|
estimateTransactionFee: (params: import("@swapkit/toolboxes/substrate").SubstrateTransferParams) => Promise<AssetValue | undefined>;
|
|
1117
|
+
gasAsset: AssetValue;
|
|
1118
|
+
getAddress: (keyring?: import("@polkadot/types/types").IKeyringPair | import("@polkadot/types/types").Signer) => string | undefined;
|
|
1119
|
+
getBalance: (address: string) => Promise<AssetValue[]>;
|
|
1120
|
+
network: import("@swapkit/toolboxes/substrate").SubstrateNetwork;
|
|
1236
1121
|
sign: (tx: import("@polkadot/api-base/types").SubmittableExtrinsic<"promise">) => Promise<import("@polkadot/api-base/types").SubmittableExtrinsic<"promise", import("@polkadot/types/types").ISubmittableResult>>;
|
|
1237
|
-
broadcast: (tx: import("@polkadot/api-base/types").SubmittableExtrinsic<"promise">, callback?: import("@polkadot/types/types").Callback<import("@polkadot/types/types").ISubmittableResult>) => Promise<string | (() => void)>;
|
|
1238
1122
|
signAndBroadcast: ({ tx, callback, address, }: {
|
|
1239
1123
|
tx: import("@polkadot/api-base/types").SubmittableExtrinsic<"promise">;
|
|
1240
1124
|
callback?: import("@polkadot/types/types").Callback<import("@polkadot/types/types").ISubmittableResult>;
|
|
1241
1125
|
address?: string;
|
|
1242
1126
|
}) => string | Promise<string> | Promise<() => void>;
|
|
1127
|
+
transfer: (params: import("@swapkit/toolboxes/substrate").SubstrateTransferParams) => Promise<string | undefined>;
|
|
1128
|
+
validateAddress: (address: string) => boolean;
|
|
1243
1129
|
};
|
|
1244
1130
|
FLIP: ChainWallet<Chain.Chainflip> & {
|
|
1245
1131
|
api: import("@polkadot/api").ApiPromise;
|
|
1246
|
-
|
|
1247
|
-
gasAsset: AssetValue;
|
|
1248
|
-
decodeAddress: (address: string, networkPrefix?: number) => Uint8Array<ArrayBufferLike>;
|
|
1249
|
-
encodeAddress: (address: Uint8Array, encoding?: "ss58" | "hex", networkPrefix?: number) => string;
|
|
1132
|
+
broadcast: (tx: import("@polkadot/api-base/types").SubmittableExtrinsic<"promise">, callback?: import("@polkadot/types/types").Callback<import("@polkadot/types/types").ISubmittableResult>) => Promise<string | (() => void)>;
|
|
1250
1133
|
convertAddress: (address: string, newPrefix: number) => string;
|
|
1251
|
-
getBalance: (address: string) => Promise<AssetValue[]>;
|
|
1252
1134
|
createKeyring: (phrase: string) => Promise<import("@polkadot/keyring/types").KeyringPair>;
|
|
1253
|
-
getAddress: (keyring?: import("@polkadot/types/types").IKeyringPair | import("@polkadot/types/types").Signer) => string | undefined;
|
|
1254
1135
|
createTransaction: (params: import("@swapkit/helpers").GenericCreateTransactionParams) => import("@polkadot/api-base/types").SubmittableExtrinsic<"promise", import("@polkadot/types/types").ISubmittableResult> | undefined;
|
|
1255
|
-
|
|
1256
|
-
|
|
1136
|
+
decodeAddress: (address: string, networkPrefix?: number) => Uint8Array<ArrayBufferLike>;
|
|
1137
|
+
encodeAddress: (address: Uint8Array, encoding?: "ss58" | "hex", networkPrefix?: number) => string;
|
|
1257
1138
|
estimateTransactionFee: (params: import("@swapkit/toolboxes/substrate").SubstrateTransferParams) => Promise<AssetValue | undefined>;
|
|
1139
|
+
gasAsset: AssetValue;
|
|
1140
|
+
getAddress: (keyring?: import("@polkadot/types/types").IKeyringPair | import("@polkadot/types/types").Signer) => string | undefined;
|
|
1141
|
+
getBalance: (address: string) => Promise<AssetValue[]>;
|
|
1142
|
+
network: import("@swapkit/toolboxes/substrate").SubstrateNetwork;
|
|
1258
1143
|
sign: (tx: import("@polkadot/api-base/types").SubmittableExtrinsic<"promise">) => Promise<import("@polkadot/api-base/types").SubmittableExtrinsic<"promise", import("@polkadot/types/types").ISubmittableResult>>;
|
|
1259
|
-
broadcast: (tx: import("@polkadot/api-base/types").SubmittableExtrinsic<"promise">, callback?: import("@polkadot/types/types").Callback<import("@polkadot/types/types").ISubmittableResult>) => Promise<string | (() => void)>;
|
|
1260
1144
|
signAndBroadcast: ({ tx, callback, address, }: {
|
|
1261
1145
|
tx: import("@polkadot/api-base/types").SubmittableExtrinsic<"promise">;
|
|
1262
1146
|
callback?: import("@polkadot/types/types").Callback<import("@polkadot/types/types").ISubmittableResult>;
|
|
1263
1147
|
address?: string;
|
|
1264
1148
|
}) => string | Promise<string> | Promise<() => void>;
|
|
1149
|
+
transfer: (params: import("@swapkit/toolboxes/substrate").SubstrateTransferParams) => Promise<string | undefined>;
|
|
1150
|
+
validateAddress: (address: string) => boolean;
|
|
1265
1151
|
};
|
|
1266
1152
|
POL: ChainWallet<Chain.Polygon> & {
|
|
1267
|
-
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
1268
1153
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
1269
|
-
|
|
1270
|
-
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
1271
|
-
feeOption: FeeOption;
|
|
1272
|
-
chain: EVMChain;
|
|
1273
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1274
|
-
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
1275
|
-
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
1276
|
-
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
1154
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
1277
1155
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
1278
1156
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<bigint>;
|
|
1279
1157
|
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
1280
|
-
|
|
1158
|
+
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
1159
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
1281
1160
|
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
1282
1161
|
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
1283
|
-
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
1284
1162
|
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
1163
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
1164
|
+
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
1165
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
1285
1166
|
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EVMTransferParams & {
|
|
1286
1167
|
assetValue: import("@swapkit/helpers").AssetValue;
|
|
1287
1168
|
funcName?: string;
|
|
@@ -1295,7 +1176,12 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1295
1176
|
maxFeePerGas?: bigint;
|
|
1296
1177
|
maxPriorityFeePerGas?: bigint;
|
|
1297
1178
|
}; }>;
|
|
1298
|
-
|
|
1179
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
1180
|
+
feeOption: FeeOption;
|
|
1181
|
+
chain: EVMChain;
|
|
1182
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1183
|
+
getAddress: () => string | Promise<string> | undefined;
|
|
1184
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<boolean>;
|
|
1299
1185
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
1300
1186
|
feeOptionKey?: FeeOption;
|
|
1301
1187
|
}) => Promise<string>;
|
|
@@ -1307,35 +1193,38 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1307
1193
|
getAddress: () => string;
|
|
1308
1194
|
getBalance: (address: string) => Promise<AssetValue[]>;
|
|
1309
1195
|
networkApi: import("@radixdlt/babylon-gateway-api-sdk").GatewayApiClient;
|
|
1310
|
-
validateAddress: typeof import("@swapkit/toolboxes/radix").radixValidateAddress;
|
|
1311
1196
|
signAndBroadcast: (params: any) => Promise<string>;
|
|
1197
|
+
validateAddress: typeof import("@swapkit/toolboxes/radix").radixValidateAddress;
|
|
1312
1198
|
};
|
|
1313
1199
|
XRP: ChainWallet<Chain.Ripple> & {
|
|
1314
|
-
|
|
1315
|
-
tx_blob: string;
|
|
1316
|
-
hash: string;
|
|
1317
|
-
}> | undefined;
|
|
1200
|
+
broadcastTransaction: (signedTxHex: string) => Promise<string>;
|
|
1318
1201
|
createSigner: (phrase: string) => import("@swapkit/helpers").ChainSigner<import("xrpl").Transaction, {
|
|
1319
1202
|
tx_blob: string;
|
|
1320
1203
|
hash: string;
|
|
1321
1204
|
}>;
|
|
1322
|
-
getAddress: () => Promise<string>;
|
|
1323
|
-
validateAddress: typeof import("@swapkit/toolboxes/ripple").rippleValidateAddress;
|
|
1324
|
-
getBalance: (address?: string) => Promise<AssetValue[]>;
|
|
1325
1205
|
createTransaction: ({ assetValue, recipient, memo, sender, }: {
|
|
1326
1206
|
assetValue: AssetValue;
|
|
1327
1207
|
recipient: string;
|
|
1328
1208
|
sender?: string;
|
|
1329
1209
|
memo?: string;
|
|
1330
1210
|
}) => Promise<import("xrpl").Payment>;
|
|
1331
|
-
|
|
1211
|
+
disconnect: () => Promise<void>;
|
|
1212
|
+
estimateTransactionFee: () => Promise<AssetValue>;
|
|
1213
|
+
getAddress: () => string | Promise<string>;
|
|
1214
|
+
getBalance: (address?: string) => Promise<AssetValue[]>;
|
|
1215
|
+
signer: import("@swapkit/helpers").ChainSigner<import("xrpl").Transaction, {
|
|
1216
|
+
tx_blob: string;
|
|
1217
|
+
hash: string;
|
|
1218
|
+
}> | undefined;
|
|
1219
|
+
signTransaction: (tx: import("xrpl").Transaction) => {
|
|
1220
|
+
tx_blob: string;
|
|
1221
|
+
hash: string;
|
|
1222
|
+
} | Promise<{
|
|
1332
1223
|
tx_blob: string;
|
|
1333
1224
|
hash: string;
|
|
1334
1225
|
}>;
|
|
1335
|
-
broadcastTransaction: (signedTxHex: string) => Promise<string>;
|
|
1336
1226
|
transfer: (params: GenericTransferParams) => Promise<string>;
|
|
1337
|
-
|
|
1338
|
-
disconnect: () => Promise<void>;
|
|
1227
|
+
validateAddress: typeof import("@swapkit/toolboxes/ripple").rippleValidateAddress;
|
|
1339
1228
|
};
|
|
1340
1229
|
THOR: ChainWallet<Chain.THORChain> & {
|
|
1341
1230
|
broadcastMultisigTx: (tx: string, signers: import("@swapkit/toolboxes/cosmos").MultiSigSigner[], membersPubKeys: string[], threshold: number, bodyBytes: Uint8Array) => Promise<string>;
|
|
@@ -1345,36 +1234,36 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1345
1234
|
assetValue: import("@swapkit/helpers").AssetValue;
|
|
1346
1235
|
memo?: string;
|
|
1347
1236
|
}) => {
|
|
1348
|
-
type: "thorchain/
|
|
1237
|
+
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
1349
1238
|
value: {
|
|
1350
|
-
|
|
1351
|
-
to_address: string | undefined;
|
|
1352
|
-
amount: {
|
|
1239
|
+
coins: {
|
|
1353
1240
|
amount: string;
|
|
1354
|
-
|
|
1241
|
+
asset: string;
|
|
1355
1242
|
}[];
|
|
1243
|
+
memo: string;
|
|
1244
|
+
signer: string;
|
|
1356
1245
|
};
|
|
1357
1246
|
} | {
|
|
1358
|
-
type: "thorchain/
|
|
1247
|
+
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
1359
1248
|
value: {
|
|
1360
|
-
|
|
1249
|
+
amount: {
|
|
1361
1250
|
amount: string;
|
|
1362
|
-
|
|
1251
|
+
denom: string;
|
|
1363
1252
|
}[];
|
|
1364
|
-
|
|
1365
|
-
|
|
1253
|
+
from_address: string;
|
|
1254
|
+
to_address: string | undefined;
|
|
1366
1255
|
};
|
|
1367
1256
|
};
|
|
1368
1257
|
buildEncodedTxBody: typeof import("@swapkit/toolboxes/cosmos").buildEncodedTxBody;
|
|
1369
1258
|
convertToSignable: (msg: {
|
|
1370
1259
|
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
1371
1260
|
value: {
|
|
1372
|
-
from_address: string;
|
|
1373
|
-
to_address: string | undefined;
|
|
1374
1261
|
amount: {
|
|
1375
1262
|
amount: string;
|
|
1376
1263
|
denom: string;
|
|
1377
1264
|
}[];
|
|
1265
|
+
from_address: string;
|
|
1266
|
+
to_address: string | undefined;
|
|
1378
1267
|
};
|
|
1379
1268
|
} | {
|
|
1380
1269
|
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
@@ -1383,40 +1272,47 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1383
1272
|
amount: string;
|
|
1384
1273
|
asset: string;
|
|
1385
1274
|
}[];
|
|
1386
|
-
signer: string;
|
|
1387
1275
|
memo: string;
|
|
1276
|
+
signer: string;
|
|
1388
1277
|
};
|
|
1389
1278
|
}, chain: Chain.THORChain | Chain.Maya) => Promise<import("@cosmjs/proto-signing").EncodeObject>;
|
|
1390
1279
|
createDefaultAminoTypes: () => Promise<import("@cosmjs/stargate").AminoTypes>;
|
|
1391
1280
|
createDefaultRegistry: typeof import("@swapkit/toolboxes/cosmos").createDefaultRegistry;
|
|
1392
1281
|
createMultisig: (pubKeys: string[], threshold: number, noSortPubKeys?: boolean) => Promise<import("@cosmjs/amino").MultisigThresholdPubkey>;
|
|
1393
1282
|
createTransaction: (params: import("@swapkit/toolboxes/cosmos").ThorchainCreateTransactionParams) => Promise<{
|
|
1394
|
-
chainId: import("@swapkit/helpers").ChainId;
|
|
1395
1283
|
accountNumber: number;
|
|
1396
|
-
|
|
1284
|
+
chainId: import("@swapkit/helpers").ChainId;
|
|
1285
|
+
fee: {
|
|
1286
|
+
amount: {
|
|
1287
|
+
amount: string;
|
|
1288
|
+
denom: string;
|
|
1289
|
+
}[];
|
|
1290
|
+
gas: string;
|
|
1291
|
+
};
|
|
1292
|
+
memo: string;
|
|
1397
1293
|
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
1398
1294
|
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
1399
1295
|
value: {
|
|
1400
|
-
from_address: string;
|
|
1401
|
-
to_address: string | undefined;
|
|
1402
1296
|
amount: {
|
|
1403
1297
|
amount: string;
|
|
1404
1298
|
denom: string;
|
|
1405
1299
|
}[];
|
|
1300
|
+
from_address: string;
|
|
1301
|
+
to_address: string | undefined;
|
|
1406
1302
|
};
|
|
1407
1303
|
})[];
|
|
1304
|
+
sequence: number;
|
|
1305
|
+
}> | Promise<{
|
|
1306
|
+
accountNumber: number;
|
|
1307
|
+
chainId: import("@swapkit/helpers").ChainId;
|
|
1408
1308
|
fee: {
|
|
1409
1309
|
amount: {
|
|
1410
|
-
denom: string;
|
|
1411
1310
|
amount: string;
|
|
1311
|
+
denom: string;
|
|
1412
1312
|
}[];
|
|
1413
1313
|
gas: string;
|
|
1414
1314
|
};
|
|
1415
1315
|
memo: string;
|
|
1416
|
-
}> | Promise<{
|
|
1417
|
-
chainId: import("@swapkit/helpers").ChainId;
|
|
1418
|
-
accountNumber: number;
|
|
1419
|
-
sequence: number;
|
|
1420
1316
|
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
1421
1317
|
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
1422
1318
|
value: {
|
|
@@ -1424,18 +1320,11 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1424
1320
|
amount: string;
|
|
1425
1321
|
asset: string;
|
|
1426
1322
|
}[];
|
|
1427
|
-
signer: string;
|
|
1428
1323
|
memo: string;
|
|
1324
|
+
signer: string;
|
|
1429
1325
|
};
|
|
1430
1326
|
})[];
|
|
1431
|
-
|
|
1432
|
-
amount: {
|
|
1433
|
-
denom: string;
|
|
1434
|
-
amount: string;
|
|
1435
|
-
}[];
|
|
1436
|
-
gas: string;
|
|
1437
|
-
};
|
|
1438
|
-
memo: string;
|
|
1327
|
+
sequence: number;
|
|
1439
1328
|
}>;
|
|
1440
1329
|
deposit: ({ assetValue, memo, recipient, }: Omit<GenericTransferParams, "recipient"> & {
|
|
1441
1330
|
recipient?: string;
|
|
@@ -1447,38 +1336,38 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1447
1336
|
}>;
|
|
1448
1337
|
importSignature: (signature: string) => Uint8Array<ArrayBufferLike>;
|
|
1449
1338
|
parseAminoMessageForDirectSigning: typeof import("@swapkit/toolboxes/cosmos").parseAminoMessageForDirectSigning;
|
|
1339
|
+
pubkeyToAddress: (pubkey: import("@cosmjs/amino").Pubkey) => Promise<string>;
|
|
1450
1340
|
secp256k1HdWalletFromMnemonic: (mnemonic: string, index?: number) => Promise<import("@cosmjs/amino").Secp256k1HdWallet>;
|
|
1451
|
-
signMultisigTx: ({ wallet, tx
|
|
1341
|
+
signMultisigTx: ({ wallet, tx }: {
|
|
1452
1342
|
wallet: import("@cosmjs/amino").Secp256k1HdWallet;
|
|
1453
1343
|
tx: string | import("@swapkit/toolboxes/cosmos").MultisigTx;
|
|
1454
1344
|
}) => Promise<{
|
|
1455
|
-
signature: string;
|
|
1456
1345
|
bodyBytes: Uint8Array<ArrayBufferLike>;
|
|
1346
|
+
signature: string;
|
|
1457
1347
|
}>;
|
|
1458
|
-
signWithPrivateKey: ({ privateKey, message
|
|
1348
|
+
signWithPrivateKey: ({ privateKey, message }: {
|
|
1459
1349
|
privateKey: Uint8Array;
|
|
1460
1350
|
message: string;
|
|
1461
1351
|
}) => Promise<string>;
|
|
1462
1352
|
transfer: ({ assetValue, memo, recipient, }: Omit<GenericTransferParams, "recipient"> & {
|
|
1463
1353
|
recipient?: string;
|
|
1464
1354
|
}) => Promise<string>;
|
|
1465
|
-
|
|
1466
|
-
|
|
1355
|
+
createPrivateKeyFromPhrase: (phrase: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
1356
|
+
fetchFeeRateFromSwapKit: typeof import("@swapkit/toolboxes/cosmos").fetchFeeRateFromSwapKit;
|
|
1467
1357
|
getAccount: (address: string) => Promise<import("@cosmjs/stargate").Account | null>;
|
|
1358
|
+
getAddress: () => Promise<string | undefined>;
|
|
1468
1359
|
getBalance: (address: string, _potentialScamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
1469
|
-
|
|
1360
|
+
getBalanceAsDenoms: (address: string) => Promise<{
|
|
1361
|
+
denom: string;
|
|
1362
|
+
amount: string;
|
|
1363
|
+
}[]>;
|
|
1364
|
+
getPubKey: () => Promise<string>;
|
|
1365
|
+
getSignerFromPhrase: ({ phrase, derivationPath }: {
|
|
1470
1366
|
phrase: string;
|
|
1471
1367
|
derivationPath: import("@swapkit/helpers").DerivationPathArray;
|
|
1472
1368
|
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
1473
1369
|
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
1474
|
-
createPrivateKeyFromPhrase: (phrase: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
1475
1370
|
validateAddress: (address: string) => boolean;
|
|
1476
|
-
getPubKey: () => Promise<string>;
|
|
1477
|
-
fetchFeeRateFromSwapKit: typeof import("@swapkit/toolboxes/cosmos").fetchFeeRateFromSwapKit;
|
|
1478
|
-
getBalanceAsDenoms: (address: string) => Promise<{
|
|
1479
|
-
denom: string;
|
|
1480
|
-
amount: string;
|
|
1481
|
-
}[]>;
|
|
1482
1371
|
verifySignature: ({ signature, message, address, }: {
|
|
1483
1372
|
signature: string;
|
|
1484
1373
|
message: string;
|
|
@@ -1486,24 +1375,24 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1486
1375
|
}) => Promise<boolean>;
|
|
1487
1376
|
};
|
|
1488
1377
|
SOL: ChainWallet<Chain.Solana> & {
|
|
1489
|
-
|
|
1490
|
-
getAddress: () => string;
|
|
1378
|
+
broadcastTransaction: (transaction: import("@solana/web3.js").Transaction | import("@solana/web3.js").VersionedTransaction) => Promise<string>;
|
|
1491
1379
|
createKeysForPath: typeof import("@swapkit/toolboxes/solana").createKeysForPath;
|
|
1492
|
-
|
|
1493
|
-
getPubkeyFromAddress: (address: string) => Promise<import("@solana/web3.js").PublicKey>;
|
|
1494
|
-
createTransaction: ({ recipient, assetValue, memo, isProgramDerivedAddress, sender, }: import("@swapkit/toolboxes/solana").SolanaCreateTransactionParams) => Promise<import("@solana/web3.js").Transaction>;
|
|
1380
|
+
createTransaction: ({ recipient, assetValue, memo, isProgramDerivedAddress, sender }: import("@swapkit/toolboxes/solana").SolanaCreateTransactionParams) => Promise<import("@solana/web3.js").Transaction>;
|
|
1495
1381
|
createTransactionFromInstructions: ({ instructions, }: {
|
|
1496
1382
|
instructions: import("@solana/web3.js").TransactionInstruction[];
|
|
1497
1383
|
isProgramDerivedAddress?: boolean;
|
|
1498
1384
|
}) => Promise<import("@solana/web3.js").Transaction>;
|
|
1499
|
-
getBalance: (addressParam?: string) => Promise<AssetValue[]>;
|
|
1500
|
-
transfer: ({ recipient, assetValue, memo, isProgramDerivedAddress }: import("@swapkit/toolboxes/solana").SolanaTransferParams) => Promise<string>;
|
|
1501
|
-
broadcastTransaction: (transaction: import("@solana/web3.js").Transaction | import("@solana/web3.js").VersionedTransaction) => Promise<string>;
|
|
1502
|
-
getAddressValidator: typeof import("@swapkit/toolboxes/solana").getSolanaAddressValidator;
|
|
1503
|
-
signTransaction: (transaction: import("@solana/web3.js").Transaction | import("@solana/web3.js").VersionedTransaction) => Promise<import("@solana/web3.js").Transaction | import("@solana/web3.js").VersionedTransaction>;
|
|
1504
1385
|
estimateTransactionFee: ({ recipient, assetValue, memo, isProgramDerivedAddress, sender, }: Omit<import("@swapkit/helpers").GenericCreateTransactionParams, "feeRate"> & {
|
|
1505
1386
|
isProgramDerivedAddress?: boolean;
|
|
1506
1387
|
}) => Promise<AssetValue>;
|
|
1388
|
+
getAddress: () => string;
|
|
1389
|
+
getAddressFromPubKey: (publicKey: import("@solana/web3.js").PublicKey) => string;
|
|
1390
|
+
getAddressValidator: typeof import("@swapkit/toolboxes/solana").getSolanaAddressValidator;
|
|
1391
|
+
getBalance: (addressParam?: string) => Promise<AssetValue[]>;
|
|
1392
|
+
getConnection: () => Promise<import("@solana/web3.js").Connection>;
|
|
1393
|
+
getPubkeyFromAddress: (address: string) => Promise<import("@solana/web3.js").PublicKey>;
|
|
1394
|
+
signTransaction: (transaction: import("@solana/web3.js").Transaction | import("@solana/web3.js").VersionedTransaction) => Promise<import("@solana/web3.js").Transaction | import("@solana/web3.js").VersionedTransaction>;
|
|
1395
|
+
transfer: ({ recipient, assetValue, memo, isProgramDerivedAddress }: import("@swapkit/toolboxes/solana").SolanaTransferParams) => Promise<string>;
|
|
1507
1396
|
};
|
|
1508
1397
|
TRON: ChainWallet<Chain.Tron> & {
|
|
1509
1398
|
tronWeb: import("tronweb").TronWeb;
|
|
@@ -1522,38 +1411,43 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1522
1411
|
getApprovedAmount: (params: import("@swapkit/toolboxes/tron").TronApprovedParams) => Promise<bigint>;
|
|
1523
1412
|
};
|
|
1524
1413
|
ZEC: ChainWallet<Chain.Zcash> & {
|
|
1525
|
-
|
|
1414
|
+
createKeysForPath: ({ phrase, derivationPath, }: {
|
|
1415
|
+
phrase: string;
|
|
1416
|
+
derivationPath?: string;
|
|
1417
|
+
}) => import("@bitgo/utxo-lib").ECPairInterface;
|
|
1526
1418
|
createTransaction: (buildTxParams: import("@swapkit/toolboxes/utxo").UTXOBuildTxParams) => Promise<{
|
|
1527
1419
|
inputs: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
1528
1420
|
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
1529
1421
|
psbt: import("@bitgo/utxo-lib/dist/src/bitgo").ZcashPsbt;
|
|
1530
1422
|
}>;
|
|
1531
|
-
createKeysForPath: ({ phrase, derivationPath, }: {
|
|
1532
|
-
phrase: string;
|
|
1533
|
-
derivationPath?: string;
|
|
1534
|
-
}) => import("@bitgo/utxo-lib").ECPairInterface;
|
|
1535
1423
|
getPrivateKeyFromMnemonic: ({ phrase, derivationPath, }: {
|
|
1536
1424
|
phrase: string;
|
|
1537
1425
|
derivationPath: string;
|
|
1538
1426
|
}) => string;
|
|
1427
|
+
transfer: ({ recipient, assetValue, feeOptionKey, ...rest }: import("@swapkit/toolboxes/utxo").UTXOTransferParams) => Promise<string>;
|
|
1539
1428
|
validateAddress: typeof import("@swapkit/toolboxes/utxo").validateZcashAddress;
|
|
1540
|
-
accumulative:
|
|
1541
|
-
|
|
1542
|
-
chain: import("@swapkit/helpers").UTXOChain;
|
|
1543
|
-
changeAddress?: string;
|
|
1544
|
-
}) => {
|
|
1545
|
-
inputs: (import("@swapkit/toolboxes/utxo").UTXOType | import("@swapkit/toolboxes/utxo").UTXOInputWithScriptType)[];
|
|
1546
|
-
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
1547
|
-
fee: number;
|
|
1548
|
-
} | {
|
|
1549
|
-
fee: number;
|
|
1550
|
-
inputs?: undefined;
|
|
1551
|
-
outputs?: undefined;
|
|
1552
|
-
};
|
|
1429
|
+
accumulative: typeof import("@swapkit/toolboxes/utxo").accumulative;
|
|
1430
|
+
broadcastTx: (txHash: string) => Promise<string>;
|
|
1553
1431
|
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo").UTXOCalculateTxSizeParams) => number;
|
|
1554
|
-
|
|
1432
|
+
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
1433
|
+
from: string;
|
|
1434
|
+
memo?: string;
|
|
1435
|
+
feeRate?: number;
|
|
1436
|
+
feeOptionKey?: FeeOption;
|
|
1437
|
+
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
1438
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1439
|
+
estimateTransactionFee: (params: {
|
|
1440
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
1441
|
+
recipient: string;
|
|
1442
|
+
sender: string;
|
|
1443
|
+
memo?: string;
|
|
1444
|
+
feeOptionKey?: FeeOption;
|
|
1445
|
+
feeRate?: number;
|
|
1446
|
+
fetchTxHex?: boolean;
|
|
1447
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1555
1448
|
getAddress: () => Promise<string | undefined>;
|
|
1556
|
-
|
|
1449
|
+
getAddressFromKeys: (keys: import("ecpair").ECPairInterface | import("@swapkit/toolboxes/utxo").BchECPair) => string;
|
|
1450
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
1557
1451
|
getFeeRates: () => Promise<{
|
|
1558
1452
|
average: number;
|
|
1559
1453
|
fast: number;
|
|
@@ -1563,31 +1457,14 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1563
1457
|
feeOptionKey?: FeeOption;
|
|
1564
1458
|
feeRate?: number;
|
|
1565
1459
|
}) => Promise<{
|
|
1460
|
+
fee: number;
|
|
1566
1461
|
inputs: (import("@swapkit/toolboxes/utxo").UTXOType | import("@swapkit/toolboxes/utxo").UTXOInputWithScriptType)[];
|
|
1567
1462
|
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
1568
|
-
fee: number;
|
|
1569
1463
|
} | {
|
|
1570
1464
|
fee: number;
|
|
1571
1465
|
inputs?: undefined;
|
|
1572
1466
|
outputs?: undefined;
|
|
1573
1467
|
}>;
|
|
1574
|
-
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
1575
|
-
estimateTransactionFee: (params: {
|
|
1576
|
-
assetValue: import("@swapkit/helpers").AssetValue;
|
|
1577
|
-
recipient: string;
|
|
1578
|
-
sender: string;
|
|
1579
|
-
memo?: string;
|
|
1580
|
-
feeOptionKey?: FeeOption;
|
|
1581
|
-
feeRate?: number;
|
|
1582
|
-
fetchTxHex?: boolean;
|
|
1583
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1584
|
-
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
1585
|
-
from: string;
|
|
1586
|
-
memo?: string;
|
|
1587
|
-
feeRate?: number;
|
|
1588
|
-
feeOptionKey?: FeeOption;
|
|
1589
|
-
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
1590
|
-
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1591
1468
|
};
|
|
1592
1469
|
};
|
|
1593
1470
|
getBalance: <T_1 extends Chain, R extends boolean>(chain: T_1, refresh?: R) => ConditionalAssetValueReturn<R>;
|
|
@@ -1595,7 +1472,6 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1595
1472
|
getWalletWithBalance: <T_1 extends Chain>(chain: T_1, scamFilter?: boolean) => Promise<ReturnType<(<T_2 extends Chain>(chain: T_2) => FullWallet[T_2])> & {
|
|
1596
1473
|
balance: AssetValue[];
|
|
1597
1474
|
}>;
|
|
1598
|
-
approveAssetValue: (assetValue: AssetValue, contractAddress: string | keyof Plugins) => Promise<string>;
|
|
1599
1475
|
isAssetValueApproved: (assetValue: AssetValue, contractAddress: string | keyof Plugins) => Promise<boolean>;
|
|
1600
1476
|
signMessage: ({ chain, message }: {
|
|
1601
1477
|
chain: Chain;
|