@swapkit/core 4.1.11 → 4.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE +246 -0
- package/dist/index.cjs +1 -4
- package/dist/index.js +1 -4
- package/dist/types/index.d.ts +905 -559
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +13 -17
- package/dist/index.cjs.map +0 -10
- package/dist/index.js.map +0 -10
- package/src/index.ts +0 -361
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AssetValue, Chain, type ChainWallet, type ConditionalAssetValueReturn, type
|
|
1
|
+
import { AssetValue, Chain, type ChainWallet, type ConditionalAssetValueReturn, type FeeOption, type GenericTransferParams, ProviderName as PluginNameEnum, type SKConfigState, type SwapParams } from "@swapkit/helpers";
|
|
2
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
|
-
import type { EVMCreateTransactionParams, EVMTransferParams } from "@swapkit/toolboxes/evm";
|
|
5
|
+
import type { EVMCreateTransactionParams, EVMTransferParams, TypedDataField } from "@swapkit/toolboxes/evm";
|
|
6
6
|
import type { createWallet } from "@swapkit/wallets";
|
|
7
7
|
export type SwapKitParams<P, W> = {
|
|
8
8
|
config?: SKConfigState;
|
|
@@ -56,7 +56,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
56
56
|
}[] | undefined;
|
|
57
57
|
}[];
|
|
58
58
|
meta: {
|
|
59
|
-
tags: import("@swapkit/helpers
|
|
59
|
+
tags: import("@swapkit/helpers").PriorityLabel[];
|
|
60
60
|
assets?: {
|
|
61
61
|
asset: string;
|
|
62
62
|
image: string;
|
|
@@ -124,7 +124,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
124
124
|
} | undefined;
|
|
125
125
|
priceImpact?: number | undefined;
|
|
126
126
|
referrer?: string | undefined;
|
|
127
|
-
txType?: import("@swapkit/helpers
|
|
127
|
+
txType?: import("@swapkit/helpers").RouteQuoteTxType | undefined;
|
|
128
128
|
};
|
|
129
129
|
providers: PluginNameEnum[];
|
|
130
130
|
routeId: string;
|
|
@@ -165,21 +165,126 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
165
165
|
memo: string;
|
|
166
166
|
msgs: {
|
|
167
167
|
typeUrl: string;
|
|
168
|
-
value:
|
|
168
|
+
value: {
|
|
169
|
+
typeUrl: string;
|
|
170
|
+
value: {
|
|
171
|
+
amount: {
|
|
172
|
+
amount: string;
|
|
173
|
+
denom: string;
|
|
174
|
+
}[];
|
|
175
|
+
fromAddress: string;
|
|
176
|
+
toAddress: string;
|
|
177
|
+
};
|
|
178
|
+
} | {
|
|
179
|
+
typeUrl: string;
|
|
180
|
+
value: {
|
|
181
|
+
coins: {
|
|
182
|
+
amount: string;
|
|
183
|
+
asset: {
|
|
184
|
+
chain: string;
|
|
185
|
+
symbol: string;
|
|
186
|
+
synth: boolean;
|
|
187
|
+
ticker: string;
|
|
188
|
+
};
|
|
189
|
+
}[];
|
|
190
|
+
memo: string;
|
|
191
|
+
signer: string;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
169
194
|
}[];
|
|
170
195
|
sequence: number;
|
|
171
|
-
} |
|
|
172
|
-
|
|
196
|
+
} | {
|
|
197
|
+
raw_data: {
|
|
198
|
+
contract: any;
|
|
199
|
+
expiration: number;
|
|
200
|
+
ref_block_bytes: string;
|
|
201
|
+
ref_block_hash: string;
|
|
202
|
+
timestamp: number;
|
|
203
|
+
};
|
|
204
|
+
raw_data_hex: string;
|
|
205
|
+
txID: string;
|
|
206
|
+
visible: boolean;
|
|
207
|
+
} | {
|
|
208
|
+
calldata: string[];
|
|
209
|
+
contractAddress: string;
|
|
210
|
+
entrypoint: string;
|
|
211
|
+
}[] | {
|
|
212
|
+
address: string;
|
|
213
|
+
amount: string;
|
|
214
|
+
payload?: string | undefined;
|
|
215
|
+
stateInit?: string | undefined;
|
|
216
|
+
}[] | undefined;
|
|
217
|
+
txType?: import("@swapkit/helpers").RouteQuoteTxType | undefined;
|
|
173
218
|
}> & {
|
|
174
219
|
pluginName?: P | undefined;
|
|
220
|
+
useApiTx?: boolean;
|
|
175
221
|
} & {
|
|
176
222
|
assetValue: AssetValue;
|
|
177
223
|
};
|
|
178
224
|
}[T_1];
|
|
179
225
|
feeOptionKey: FeeOption;
|
|
180
|
-
}) => Promise<AssetValue
|
|
226
|
+
}) => Promise<AssetValue>;
|
|
181
227
|
getAddress: <T_1 extends Chain>(chain: T_1) => string;
|
|
182
228
|
getAllWallets: () => {
|
|
229
|
+
ADI: ChainWallet<Chain.Adi> & {
|
|
230
|
+
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
231
|
+
approvedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<bigint>;
|
|
232
|
+
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
233
|
+
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
234
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
235
|
+
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
236
|
+
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
237
|
+
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
238
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
239
|
+
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
240
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
241
|
+
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EVMTransferParams & {
|
|
242
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
243
|
+
funcName?: string;
|
|
244
|
+
funcParams?: unknown[];
|
|
245
|
+
txOverrides?: import("@swapkit/toolboxes/evm").EVMTxParams;
|
|
246
|
+
data?: string;
|
|
247
|
+
}) => Promise<bigint>;
|
|
248
|
+
estimateGasPrices: () => Promise<{ [key_2 in FeeOption]: {
|
|
249
|
+
l1GasPrice?: bigint;
|
|
250
|
+
gasPrice?: bigint;
|
|
251
|
+
maxFeePerGas?: bigint;
|
|
252
|
+
maxPriorityFeePerGas?: bigint;
|
|
253
|
+
}; }>;
|
|
254
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
255
|
+
feeOption: FeeOption;
|
|
256
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
257
|
+
getAddress: () => string | Promise<string> | undefined;
|
|
258
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
259
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
260
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<boolean>;
|
|
261
|
+
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
262
|
+
feeOptionKey?: FeeOption;
|
|
263
|
+
}) => Promise<string>;
|
|
264
|
+
signAuthorization: ((params: {
|
|
265
|
+
address: string;
|
|
266
|
+
nonce?: number | bigint;
|
|
267
|
+
chainId?: bigint;
|
|
268
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
269
|
+
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
270
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
271
|
+
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
272
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
273
|
+
};
|
|
274
|
+
APT: ChainWallet<Chain.Aptos> & {
|
|
275
|
+
broadcastTransaction: ({ senderAuthenticator, transaction, }: {
|
|
276
|
+
senderAuthenticator: Awaited<ReturnType<(transaction: Awaited<ReturnType<({ recipient, assetValue, maxGasAmount, sender: _senderAddress, }: import("@swapkit/toolboxes/aptos/index").AptosCreateTransactionParams) => Promise<import("@aptos-labs/ts-sdk").SimpleTransaction>>>) => Promise<import("@aptos-labs/ts-sdk").AccountAuthenticator>>>;
|
|
277
|
+
transaction: Awaited<ReturnType<({ recipient, assetValue, maxGasAmount, sender: _senderAddress, }: import("@swapkit/toolboxes/aptos/index").AptosCreateTransactionParams) => Promise<import("@aptos-labs/ts-sdk").SimpleTransaction>>>;
|
|
278
|
+
}) => Promise<string>;
|
|
279
|
+
createTransaction: ({ recipient, assetValue, maxGasAmount, sender: _senderAddress, }: import("@swapkit/toolboxes/aptos/index").AptosCreateTransactionParams) => Promise<import("@aptos-labs/ts-sdk").SimpleTransaction>;
|
|
280
|
+
estimateTransactionFee: (params?: import("@swapkit/toolboxes/aptos/index").AptosCreateTransactionParams) => Promise<AssetValue>;
|
|
281
|
+
getAddress: () => Promise<"" | `0x${string}`>;
|
|
282
|
+
getBalance: (targetAddress?: string) => Promise<AssetValue[]>;
|
|
283
|
+
signAndBroadcastTransaction: (transaction: Awaited<ReturnType<({ recipient, assetValue, maxGasAmount, sender: _senderAddress, }: import("@swapkit/toolboxes/aptos/index").AptosCreateTransactionParams) => Promise<import("@aptos-labs/ts-sdk").SimpleTransaction>>>) => Promise<string>;
|
|
284
|
+
signTransaction: (transaction: Awaited<ReturnType<({ recipient, assetValue, maxGasAmount, sender: _senderAddress, }: import("@swapkit/toolboxes/aptos/index").AptosCreateTransactionParams) => Promise<import("@aptos-labs/ts-sdk").SimpleTransaction>>>) => Promise<import("@aptos-labs/ts-sdk").AccountAuthenticator>;
|
|
285
|
+
transfer: ({ assetValue, maxGasAmount, recipient }: import("@swapkit/toolboxes/aptos/index").AptosTransferParams) => Promise<string>;
|
|
286
|
+
validateAddress: typeof import("@swapkit/toolboxes/aptos/index").validateAptosAddress;
|
|
287
|
+
};
|
|
183
288
|
ARB: ChainWallet<Chain.Arbitrum> & {
|
|
184
289
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
185
290
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<bigint>;
|
|
@@ -205,9 +310,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
205
310
|
maxFeePerGas?: bigint;
|
|
206
311
|
maxPriorityFeePerGas?: bigint;
|
|
207
312
|
}; }>;
|
|
208
|
-
estimateTransactionFee: ({ feeOption,
|
|
313
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
209
314
|
feeOption: FeeOption;
|
|
210
|
-
chain: EVMChain;
|
|
211
315
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
212
316
|
getAddress: () => string | Promise<string> | undefined;
|
|
213
317
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -216,9 +320,15 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
216
320
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
217
321
|
feeOptionKey?: FeeOption;
|
|
218
322
|
}) => Promise<string>;
|
|
323
|
+
signAuthorization: ((params: {
|
|
324
|
+
address: string;
|
|
325
|
+
nonce?: number | bigint;
|
|
326
|
+
chainId?: bigint;
|
|
327
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
219
328
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
329
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
220
330
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
221
|
-
validateAddress: (
|
|
331
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
222
332
|
};
|
|
223
333
|
AURORA: ChainWallet<Chain.Aurora> & {
|
|
224
334
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
@@ -245,9 +355,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
245
355
|
maxFeePerGas?: bigint;
|
|
246
356
|
maxPriorityFeePerGas?: bigint;
|
|
247
357
|
}; }>;
|
|
248
|
-
estimateTransactionFee: ({ feeOption,
|
|
358
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
249
359
|
feeOption: FeeOption;
|
|
250
|
-
chain: EVMChain;
|
|
251
360
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
252
361
|
getAddress: () => string | Promise<string> | undefined;
|
|
253
362
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -256,9 +365,15 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
256
365
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
257
366
|
feeOptionKey?: FeeOption;
|
|
258
367
|
}) => Promise<string>;
|
|
368
|
+
signAuthorization: ((params: {
|
|
369
|
+
address: string;
|
|
370
|
+
nonce?: number | bigint;
|
|
371
|
+
chainId?: bigint;
|
|
372
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
259
373
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
374
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
260
375
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
261
|
-
validateAddress: (
|
|
376
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
262
377
|
};
|
|
263
378
|
AVAX: ChainWallet<Chain.Avalanche> & {
|
|
264
379
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
@@ -285,9 +400,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
285
400
|
maxFeePerGas?: bigint;
|
|
286
401
|
maxPriorityFeePerGas?: bigint;
|
|
287
402
|
}; }>;
|
|
288
|
-
estimateTransactionFee: ({ feeOption,
|
|
403
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
289
404
|
feeOption: FeeOption;
|
|
290
|
-
chain: EVMChain;
|
|
291
405
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
292
406
|
getAddress: () => string | Promise<string> | undefined;
|
|
293
407
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -296,9 +410,15 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
296
410
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
297
411
|
feeOptionKey?: FeeOption;
|
|
298
412
|
}) => Promise<string>;
|
|
413
|
+
signAuthorization: ((params: {
|
|
414
|
+
address: string;
|
|
415
|
+
nonce?: number | bigint;
|
|
416
|
+
chainId?: bigint;
|
|
417
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
299
418
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
419
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
300
420
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
301
|
-
validateAddress: (
|
|
421
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
302
422
|
};
|
|
303
423
|
BASE: ChainWallet<Chain.Base> & {
|
|
304
424
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
@@ -325,9 +445,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
325
445
|
maxFeePerGas?: bigint;
|
|
326
446
|
maxPriorityFeePerGas?: bigint;
|
|
327
447
|
}; }>;
|
|
328
|
-
estimateTransactionFee: ({ feeOption,
|
|
448
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
329
449
|
feeOption: FeeOption;
|
|
330
|
-
chain: EVMChain;
|
|
331
450
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
332
451
|
getAddress: () => string | Promise<string> | undefined;
|
|
333
452
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -336,9 +455,15 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
336
455
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
337
456
|
feeOptionKey?: FeeOption;
|
|
338
457
|
}) => Promise<string>;
|
|
458
|
+
signAuthorization: ((params: {
|
|
459
|
+
address: string;
|
|
460
|
+
nonce?: number | bigint;
|
|
461
|
+
chainId?: bigint;
|
|
462
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
339
463
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
464
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
340
465
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
341
|
-
validateAddress: (
|
|
466
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
342
467
|
};
|
|
343
468
|
BERA: ChainWallet<Chain.Berachain> & {
|
|
344
469
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
@@ -365,9 +490,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
365
490
|
maxFeePerGas?: bigint;
|
|
366
491
|
maxPriorityFeePerGas?: bigint;
|
|
367
492
|
}; }>;
|
|
368
|
-
estimateTransactionFee: ({ feeOption,
|
|
493
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
369
494
|
feeOption: FeeOption;
|
|
370
|
-
chain: EVMChain;
|
|
371
495
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
372
496
|
getAddress: () => string | Promise<string> | undefined;
|
|
373
497
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -376,9 +500,15 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
376
500
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
377
501
|
feeOptionKey?: FeeOption;
|
|
378
502
|
}) => Promise<string>;
|
|
503
|
+
signAuthorization: ((params: {
|
|
504
|
+
address: string;
|
|
505
|
+
nonce?: number | bigint;
|
|
506
|
+
chainId?: bigint;
|
|
507
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
379
508
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
509
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
380
510
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
381
|
-
validateAddress: (
|
|
511
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
382
512
|
};
|
|
383
513
|
BSC: ChainWallet<Chain.BinanceSmartChain> & {
|
|
384
514
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
@@ -405,9 +535,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
405
535
|
maxFeePerGas?: bigint;
|
|
406
536
|
maxPriorityFeePerGas?: bigint;
|
|
407
537
|
}; }>;
|
|
408
|
-
estimateTransactionFee: ({ feeOption,
|
|
538
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
409
539
|
feeOption: FeeOption;
|
|
410
|
-
chain: EVMChain;
|
|
411
540
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
412
541
|
getAddress: () => string | Promise<string> | undefined;
|
|
413
542
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -416,30 +545,62 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
416
545
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
417
546
|
feeOptionKey?: FeeOption;
|
|
418
547
|
}) => Promise<string>;
|
|
548
|
+
signAuthorization: ((params: {
|
|
549
|
+
address: string;
|
|
550
|
+
nonce?: number | bigint;
|
|
551
|
+
chainId?: bigint;
|
|
552
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
419
553
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
554
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
420
555
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
421
|
-
validateAddress: (
|
|
556
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
422
557
|
};
|
|
423
558
|
BTC: ChainWallet<Chain.Bitcoin> & {
|
|
424
|
-
accumulative: typeof import("@swapkit/toolboxes/utxo").accumulative;
|
|
559
|
+
accumulative: typeof import("@swapkit/toolboxes/utxo/index").accumulative;
|
|
425
560
|
broadcastTx: (txHash: string) => Promise<string>;
|
|
426
|
-
|
|
561
|
+
bumpFee: ({ txid, newFeeRate, recipient, memo }: import("@swapkit/toolboxes/utxo/index").RBFTransactionParams) => Promise<{
|
|
562
|
+
newFee: number;
|
|
563
|
+
originalFee: number;
|
|
564
|
+
txid: string;
|
|
565
|
+
}>;
|
|
566
|
+
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo/index").UTXOCalculateTxSizeParams) => number;
|
|
427
567
|
createKeysForPath: (params: {
|
|
428
568
|
wif?: string;
|
|
429
569
|
phrase?: string;
|
|
430
570
|
derivationPath?: string;
|
|
431
|
-
}) =>
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
571
|
+
}) => {
|
|
572
|
+
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
573
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
574
|
+
};
|
|
575
|
+
createReplacementTransaction: ({ txid, newFeeRate, recipient, memo, }: import("@swapkit/toolboxes/utxo/index").RBFTransactionParams) => Promise<import("node_modules/@swapkit/toolboxes/dist/types/utxo/toolbox/utxo").ReplacementTransactionResult>;
|
|
576
|
+
createTransaction: ({ assetValue, recipient, memo, feeRate, sender, fetchTxHex, enableRBF, }: import("@swapkit/toolboxes/utxo/index").UTXOBuildTxParams) => Promise<{
|
|
577
|
+
inputs: import("@swapkit/toolboxes/utxo/index").UTXOType[];
|
|
578
|
+
tx: import("@swapkit/utxo-signer").Transaction;
|
|
579
|
+
utxos: {
|
|
580
|
+
address: string;
|
|
581
|
+
hash: string;
|
|
582
|
+
index: number;
|
|
583
|
+
txHex: string | undefined;
|
|
584
|
+
value: number;
|
|
585
|
+
witnessUtxo: {
|
|
586
|
+
script: Buffer<ArrayBuffer>;
|
|
587
|
+
value: number;
|
|
588
|
+
};
|
|
589
|
+
}[];
|
|
436
590
|
}>;
|
|
591
|
+
deriveAddressAtIndex: ({ index, change }: import("@swapkit/toolboxes/utxo/index").DeriveAddressParams) => {
|
|
592
|
+
address: string;
|
|
593
|
+
change: boolean;
|
|
594
|
+
index: number;
|
|
595
|
+
pubkey: string;
|
|
596
|
+
} | undefined;
|
|
597
|
+
derivePrivateKeyAtIndex: ({ index, change }: import("@swapkit/toolboxes/utxo/index").DeriveAddressParams) => Uint8Array<ArrayBufferLike> | undefined;
|
|
437
598
|
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
438
599
|
from: string;
|
|
439
600
|
memo?: string;
|
|
440
601
|
feeRate?: number;
|
|
441
602
|
feeOptionKey?: FeeOption;
|
|
442
|
-
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
603
|
+
recipients?: number | import("@swapkit/toolboxes/utxo/index").TargetOutput[];
|
|
443
604
|
}) => Promise<AssetValue>;
|
|
444
605
|
estimateTransactionFee: (params: {
|
|
445
606
|
assetValue: AssetValue;
|
|
@@ -450,40 +611,77 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
450
611
|
feeRate?: number;
|
|
451
612
|
fetchTxHex?: boolean;
|
|
452
613
|
}) => Promise<AssetValue>;
|
|
453
|
-
getAddress: () => Promise<string | undefined>;
|
|
454
|
-
getAddressFromKeys: (keys:
|
|
614
|
+
getAddress: () => string | Promise<string> | Promise<undefined>;
|
|
615
|
+
getAddressFromKeys: (keys: {
|
|
616
|
+
publicKey: Uint8Array;
|
|
617
|
+
}) => string;
|
|
455
618
|
getBalance: (address: string, scamFilter?: boolean) => Promise<AssetValue[]>;
|
|
619
|
+
getExtendedPublicKey: () => string | undefined;
|
|
456
620
|
getFeeRates: () => Promise<{
|
|
457
621
|
average: number;
|
|
458
622
|
fast: number;
|
|
459
623
|
fastest: number;
|
|
460
624
|
}>;
|
|
461
|
-
getInputsOutputsFee: ({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<import("@swapkit/toolboxes/utxo").UTXOBuildTxParams, "feeRate"> & {
|
|
625
|
+
getInputsOutputsFee: ({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<import("@swapkit/toolboxes/utxo/index").UTXOBuildTxParams, "feeRate"> & {
|
|
462
626
|
feeOptionKey?: FeeOption;
|
|
463
627
|
feeRate?: number;
|
|
464
628
|
}) => Promise<{
|
|
465
629
|
fee: number;
|
|
466
|
-
inputs:
|
|
467
|
-
|
|
630
|
+
inputs: {
|
|
631
|
+
address: string;
|
|
632
|
+
hash: string;
|
|
633
|
+
index: number;
|
|
634
|
+
txHex: string | undefined;
|
|
635
|
+
value: number;
|
|
636
|
+
witnessUtxo: {
|
|
637
|
+
script: Buffer<ArrayBuffer>;
|
|
638
|
+
value: number;
|
|
639
|
+
};
|
|
640
|
+
}[];
|
|
641
|
+
outputs: import("@swapkit/toolboxes/utxo/index").TargetOutput[];
|
|
468
642
|
} | {
|
|
469
643
|
fee: number;
|
|
470
644
|
inputs?: undefined;
|
|
471
645
|
outputs?: undefined;
|
|
472
646
|
}>;
|
|
647
|
+
getNetworkForChain: () => import("@swapkit/utxo-signer").BTCNetwork;
|
|
473
648
|
getPrivateKeyFromMnemonic: (params: {
|
|
474
649
|
phrase: string;
|
|
475
650
|
derivationPath: string;
|
|
476
651
|
}) => string;
|
|
477
|
-
|
|
652
|
+
isRBFEnabled: (txid: string) => Promise<import("node_modules/@swapkit/toolboxes/dist/types/utxo/toolbox/utxo").RBFStatusResult>;
|
|
653
|
+
keys: {
|
|
654
|
+
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
655
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
656
|
+
} | undefined;
|
|
657
|
+
resolveDerivationIndex: ({ address, gapLimit }: import("@swapkit/toolboxes/utxo/index").ResolveDerivationParams) => {
|
|
658
|
+
change: boolean;
|
|
659
|
+
index: number;
|
|
660
|
+
} | undefined;
|
|
661
|
+
signAndBroadcastTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => Promise<string>;
|
|
662
|
+
signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
|
|
663
|
+
tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>;
|
|
664
|
+
inputDerivations: import("@swapkit/toolboxes/utxo/index").InputDerivation[];
|
|
665
|
+
}) => import("@swapkit/utxo-signer").Transaction;
|
|
666
|
+
transfer: ({ memo, recipient, feeOptionKey, feeRate, assetValue, enableRBF, }: import("@swapkit/toolboxes/utxo/index").UTXOTransferParams & {
|
|
667
|
+
enableRBF?: boolean;
|
|
668
|
+
}) => Promise<string>;
|
|
669
|
+
transferFromMultipleAddresses: ({ utxos, recipient, assetValue, memo, feeRate, feeOptionKey, changeAddress, }: {
|
|
670
|
+
utxos: import("@swapkit/toolboxes").UTXOForMultiAddressTransfer[];
|
|
671
|
+
recipient: string;
|
|
672
|
+
assetValue: AssetValue;
|
|
673
|
+
memo?: string;
|
|
674
|
+
feeRate?: number;
|
|
675
|
+
feeOptionKey?: FeeOption;
|
|
676
|
+
changeAddress?: string;
|
|
677
|
+
}) => Promise<string>;
|
|
478
678
|
validateAddress: (address: string) => boolean;
|
|
479
679
|
};
|
|
480
680
|
BCH: ChainWallet<Chain.BitcoinCash> & {
|
|
481
681
|
broadcastTx: (txHash: string) => Promise<string>;
|
|
482
|
-
buildTx: ({ assetValue, recipient, memo, feeRate, sender
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
inputs: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
486
|
-
psbt: import("bitcoinjs-lib").Psbt;
|
|
682
|
+
buildTx: ({ assetValue, recipient, memo, feeRate, sender }: import("@swapkit/toolboxes/utxo/index").UTXOBuildTxParams) => Promise<{
|
|
683
|
+
inputs: import("@swapkit/toolboxes/utxo/index").UTXOType[];
|
|
684
|
+
tx: import("@swapkit/utxo-signer").Transaction;
|
|
487
685
|
utxos: {
|
|
488
686
|
address: string;
|
|
489
687
|
hash: string;
|
|
@@ -496,13 +694,24 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
496
694
|
};
|
|
497
695
|
}[];
|
|
498
696
|
}>;
|
|
499
|
-
createTransaction: ({ assetValue, recipient, memo, feeRate, sender }: import("@swapkit/toolboxes/utxo").UTXOBuildTxParams) => Promise<{
|
|
500
|
-
|
|
501
|
-
|
|
697
|
+
createTransaction: ({ assetValue, recipient, memo, feeRate, sender }: import("@swapkit/toolboxes/utxo/index").UTXOBuildTxParams) => Promise<{
|
|
698
|
+
inputs: import("@swapkit/toolboxes/utxo/index").UTXOType[];
|
|
699
|
+
tx: import("@swapkit/utxo-signer").Transaction;
|
|
700
|
+
utxos: {
|
|
701
|
+
address: string;
|
|
702
|
+
hash: string;
|
|
703
|
+
index: number;
|
|
704
|
+
txHex: string | undefined;
|
|
705
|
+
value: number;
|
|
706
|
+
witnessUtxo: {
|
|
707
|
+
script: Buffer<ArrayBuffer>;
|
|
708
|
+
value: number;
|
|
709
|
+
};
|
|
710
|
+
}[];
|
|
502
711
|
}>;
|
|
503
712
|
getAddress: () => Promise<string | undefined>;
|
|
504
713
|
getAddressFromKeys: (keys: {
|
|
505
|
-
|
|
714
|
+
publicKey: Uint8Array;
|
|
506
715
|
}) => string;
|
|
507
716
|
getBalance: (address: string, _scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
508
717
|
getFeeRates: () => Promise<{
|
|
@@ -510,23 +719,39 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
510
719
|
fast: number;
|
|
511
720
|
fastest: number;
|
|
512
721
|
}>;
|
|
513
|
-
stripPrefix: typeof import("@swapkit/toolboxes/utxo").stripPrefix;
|
|
514
|
-
stripToCashAddress: typeof import("@swapkit/toolboxes/utxo").stripToCashAddress;
|
|
515
|
-
transfer: ({ recipient, assetValue, feeOptionKey, ...rest }: import("@swapkit/toolboxes/utxo").UTXOTransferParams) => Promise<string>;
|
|
516
|
-
validateAddress: typeof import("@swapkit/toolboxes/utxo").
|
|
517
|
-
accumulative: typeof import("@swapkit/toolboxes/utxo").accumulative;
|
|
518
|
-
|
|
722
|
+
stripPrefix: typeof import("@swapkit/toolboxes/utxo/index").stripPrefix;
|
|
723
|
+
stripToCashAddress: typeof import("@swapkit/toolboxes/utxo/index").stripToCashAddress;
|
|
724
|
+
transfer: ({ recipient, assetValue, feeOptionKey, ...rest }: import("@swapkit/toolboxes/utxo/index").UTXOTransferParams) => Promise<string>;
|
|
725
|
+
validateAddress: typeof import("@swapkit/toolboxes/utxo/index").validateBchAddress;
|
|
726
|
+
accumulative: typeof import("@swapkit/toolboxes/utxo/index").accumulative;
|
|
727
|
+
bumpFee: ({ txid, newFeeRate, recipient, memo }: import("@swapkit/toolboxes/utxo/index").RBFTransactionParams) => Promise<{
|
|
728
|
+
newFee: number;
|
|
729
|
+
originalFee: number;
|
|
730
|
+
txid: string;
|
|
731
|
+
}>;
|
|
732
|
+
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo/index").UTXOCalculateTxSizeParams) => number;
|
|
519
733
|
createKeysForPath: (params: {
|
|
520
734
|
wif?: string;
|
|
521
735
|
phrase?: string;
|
|
522
736
|
derivationPath?: string;
|
|
523
|
-
}) =>
|
|
737
|
+
}) => {
|
|
738
|
+
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
739
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
740
|
+
};
|
|
741
|
+
createReplacementTransaction: ({ txid, newFeeRate, recipient, memo, }: import("@swapkit/toolboxes/utxo/index").RBFTransactionParams) => Promise<import("node_modules/@swapkit/toolboxes/dist/types/utxo/toolbox/utxo").ReplacementTransactionResult>;
|
|
742
|
+
deriveAddressAtIndex: ({ index, change }: import("@swapkit/toolboxes/utxo/index").DeriveAddressParams) => {
|
|
743
|
+
address: string;
|
|
744
|
+
change: boolean;
|
|
745
|
+
index: number;
|
|
746
|
+
pubkey: string;
|
|
747
|
+
} | undefined;
|
|
748
|
+
derivePrivateKeyAtIndex: ({ index, change }: import("@swapkit/toolboxes/utxo/index").DeriveAddressParams) => Uint8Array<ArrayBufferLike> | undefined;
|
|
524
749
|
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
525
750
|
from: string;
|
|
526
751
|
memo?: string;
|
|
527
752
|
feeRate?: number;
|
|
528
753
|
feeOptionKey?: FeeOption;
|
|
529
|
-
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
754
|
+
recipients?: number | import("@swapkit/toolboxes/utxo/index").TargetOutput[];
|
|
530
755
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
531
756
|
estimateTransactionFee: (params: {
|
|
532
757
|
assetValue: import("@swapkit/helpers").AssetValue;
|
|
@@ -537,22 +762,57 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
537
762
|
feeRate?: number;
|
|
538
763
|
fetchTxHex?: boolean;
|
|
539
764
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
540
|
-
|
|
765
|
+
getExtendedPublicKey: () => string | undefined;
|
|
766
|
+
getInputsOutputsFee: ({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<import("@swapkit/toolboxes/utxo/index").UTXOBuildTxParams, "feeRate"> & {
|
|
541
767
|
feeOptionKey?: FeeOption;
|
|
542
768
|
feeRate?: number;
|
|
543
769
|
}) => Promise<{
|
|
544
770
|
fee: number;
|
|
545
|
-
inputs:
|
|
546
|
-
|
|
771
|
+
inputs: {
|
|
772
|
+
address: string;
|
|
773
|
+
hash: string;
|
|
774
|
+
index: number;
|
|
775
|
+
txHex: string | undefined;
|
|
776
|
+
value: number;
|
|
777
|
+
witnessUtxo: {
|
|
778
|
+
script: Buffer<ArrayBuffer>;
|
|
779
|
+
value: number;
|
|
780
|
+
};
|
|
781
|
+
}[];
|
|
782
|
+
outputs: import("@swapkit/toolboxes/utxo/index").TargetOutput[];
|
|
547
783
|
} | {
|
|
548
784
|
fee: number;
|
|
549
785
|
inputs?: undefined;
|
|
550
786
|
outputs?: undefined;
|
|
551
787
|
}>;
|
|
788
|
+
getNetworkForChain: () => import("@swapkit/utxo-signer").BTCNetwork;
|
|
552
789
|
getPrivateKeyFromMnemonic: (params: {
|
|
553
790
|
phrase: string;
|
|
554
791
|
derivationPath: string;
|
|
555
792
|
}) => string;
|
|
793
|
+
isRBFEnabled: (txid: string) => Promise<import("node_modules/@swapkit/toolboxes/dist/types/utxo/toolbox/utxo").RBFStatusResult>;
|
|
794
|
+
keys: {
|
|
795
|
+
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
796
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
797
|
+
} | undefined;
|
|
798
|
+
resolveDerivationIndex: ({ address, gapLimit }: import("@swapkit/toolboxes/utxo/index").ResolveDerivationParams) => {
|
|
799
|
+
change: boolean;
|
|
800
|
+
index: number;
|
|
801
|
+
} | undefined;
|
|
802
|
+
signAndBroadcastTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => Promise<string>;
|
|
803
|
+
signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
|
|
804
|
+
tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>;
|
|
805
|
+
inputDerivations: import("@swapkit/toolboxes/utxo/index").InputDerivation[];
|
|
806
|
+
}) => import("@swapkit/utxo-signer").Transaction;
|
|
807
|
+
transferFromMultipleAddresses: ({ utxos, recipient, assetValue, memo, feeRate, feeOptionKey, changeAddress, }: {
|
|
808
|
+
utxos: import("@swapkit/toolboxes").UTXOForMultiAddressTransfer[];
|
|
809
|
+
recipient: string;
|
|
810
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
811
|
+
memo?: string;
|
|
812
|
+
feeRate?: number;
|
|
813
|
+
feeOptionKey?: FeeOption;
|
|
814
|
+
changeAddress?: string;
|
|
815
|
+
}) => Promise<string>;
|
|
556
816
|
};
|
|
557
817
|
BOTANIX: ChainWallet<Chain.Botanix> & {
|
|
558
818
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
@@ -579,9 +839,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
579
839
|
maxFeePerGas?: bigint;
|
|
580
840
|
maxPriorityFeePerGas?: bigint;
|
|
581
841
|
}; }>;
|
|
582
|
-
estimateTransactionFee: ({ feeOption,
|
|
842
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
583
843
|
feeOption: FeeOption;
|
|
584
|
-
chain: EVMChain;
|
|
585
844
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
586
845
|
getAddress: () => string | Promise<string> | undefined;
|
|
587
846
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -590,50 +849,49 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
590
849
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
591
850
|
feeOptionKey?: FeeOption;
|
|
592
851
|
}) => Promise<string>;
|
|
852
|
+
signAuthorization: ((params: {
|
|
853
|
+
address: string;
|
|
854
|
+
nonce?: number | bigint;
|
|
855
|
+
chainId?: bigint;
|
|
856
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
593
857
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
858
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
594
859
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
595
|
-
validateAddress: (
|
|
860
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
596
861
|
};
|
|
597
862
|
ADA: ChainWallet<Chain.Cardano> & {
|
|
598
|
-
createTransaction: ({ recipient, assetValue, memo, }: {
|
|
599
|
-
|
|
600
|
-
assetValue: AssetValue;
|
|
601
|
-
memo?: string;
|
|
602
|
-
}) => Promise<{
|
|
603
|
-
tx: import("@meshsdk/core").Transaction;
|
|
863
|
+
createTransaction: ({ sender, recipient, assetValue, memo, pureLovelaceOnly, }: import("@swapkit/toolboxes/cardano/index").CardanoCreateTransactionParams) => Promise<{
|
|
864
|
+
tx: import("@stricahq/typhonjs").Transaction;
|
|
604
865
|
unsignedTx: string;
|
|
605
866
|
}>;
|
|
606
|
-
estimateTransactionFee: () => Promise<AssetValue>;
|
|
607
|
-
getAddress: () => string
|
|
867
|
+
estimateTransactionFee: (params?: import("@swapkit/toolboxes/cardano/index").CardanoCreateTransactionParams) => Promise<AssetValue>;
|
|
868
|
+
getAddress: () => Promise<string>;
|
|
608
869
|
getBalance: (addressParam?: string) => Promise<AssetValue[]>;
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
memo?: string;
|
|
614
|
-
}) => Promise<string>;
|
|
615
|
-
validateAddress: (address: string) => boolean;
|
|
870
|
+
signAndBroadcastTransaction: (txInput: string) => Promise<string>;
|
|
871
|
+
signTransaction: (tx: string) => Promise<string>;
|
|
872
|
+
transfer: ({ recipient, assetValue, memo }: import("@swapkit/toolboxes/cardano/index").CardanoTransferParams) => Promise<string>;
|
|
873
|
+
validateAddress: typeof import("@swapkit/toolboxes/cardano/index").validateCardanoAddress;
|
|
616
874
|
};
|
|
617
875
|
FLIP: ChainWallet<Chain.Chainflip> & {
|
|
618
|
-
api: import("@polkadot/api").ApiPromise;
|
|
619
876
|
broadcast: (tx: import("@polkadot/api/types").SubmittableExtrinsic<"promise">, callback?: import("@polkadot/types/types").Callback<import("@polkadot/types/types").ISubmittableResult>) => Promise<string | (() => void)>;
|
|
620
877
|
convertAddress: (address: string, newPrefix: number) => string;
|
|
621
878
|
createKeyring: (phrase: string) => Promise<import("@polkadot/keyring/types").KeyringPair>;
|
|
622
|
-
createTransaction: (params: import("@swapkit/helpers").GenericCreateTransactionParams) => import("@polkadot/api/types").SubmittableExtrinsic<"promise", import("@polkadot/types/types").ISubmittableResult> | undefined
|
|
879
|
+
createTransaction: (params: import("@swapkit/helpers").GenericCreateTransactionParams) => Promise<import("@polkadot/api/types").SubmittableExtrinsic<"promise", import("@polkadot/types/types").ISubmittableResult> | undefined>;
|
|
623
880
|
decodeAddress: (address: string, networkPrefix?: number) => Uint8Array<ArrayBufferLike>;
|
|
624
881
|
encodeAddress: (address: Uint8Array, encoding?: "ss58" | "hex", networkPrefix?: number) => string;
|
|
625
|
-
estimateTransactionFee: (params: import("@swapkit/toolboxes/substrate").SubstrateTransferParams) => Promise<AssetValue
|
|
882
|
+
estimateTransactionFee: (params: import("@swapkit/toolboxes/substrate/index").SubstrateTransferParams) => Promise<AssetValue>;
|
|
626
883
|
gasAsset: AssetValue;
|
|
627
|
-
getAddress: (keyring?: import("@polkadot/types/types").IKeyringPair | import("@polkadot/types/types").Signer) => string | undefined
|
|
628
|
-
|
|
629
|
-
|
|
884
|
+
getAddress: (keyring?: import("@polkadot/types/types").IKeyringPair | import("@polkadot/types/types").Signer) => Promise<string | undefined>;
|
|
885
|
+
getApi: () => Promise<import("@polkadot/api").ApiPromise>;
|
|
886
|
+
getBalance: (targetAddress?: string) => Promise<AssetValue[]>;
|
|
887
|
+
network: import("@swapkit/toolboxes/substrate/index").SubstrateNetwork;
|
|
630
888
|
sign: (tx: import("@polkadot/api/types").SubmittableExtrinsic<"promise">) => Promise<import("@polkadot/api/types").SubmittableExtrinsic<"promise", import("@polkadot/types/types").ISubmittableResult>>;
|
|
631
889
|
signAndBroadcast: ({ tx, callback, address, }: {
|
|
632
890
|
tx: import("@polkadot/api/types").SubmittableExtrinsic<"promise">;
|
|
633
891
|
callback?: import("@polkadot/types/types").Callback<import("@polkadot/types/types").ISubmittableResult>;
|
|
634
892
|
address?: string;
|
|
635
|
-
}) =>
|
|
636
|
-
transfer: (params: import("@swapkit/toolboxes/substrate").SubstrateTransferParams) => Promise<string>;
|
|
893
|
+
}) => Promise<string | (() => void)>;
|
|
894
|
+
transfer: (params: import("@swapkit/toolboxes/substrate/index").SubstrateTransferParams) => Promise<string>;
|
|
637
895
|
validateAddress: (address: string) => boolean;
|
|
638
896
|
};
|
|
639
897
|
CORE: ChainWallet<Chain.Core> & {
|
|
@@ -661,9 +919,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
661
919
|
maxFeePerGas?: bigint;
|
|
662
920
|
maxPriorityFeePerGas?: bigint;
|
|
663
921
|
}; }>;
|
|
664
|
-
estimateTransactionFee: ({ feeOption,
|
|
922
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
665
923
|
feeOption: FeeOption;
|
|
666
|
-
chain: EVMChain;
|
|
667
924
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
668
925
|
getAddress: () => string | Promise<string> | undefined;
|
|
669
926
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -672,9 +929,15 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
672
929
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
673
930
|
feeOptionKey?: FeeOption;
|
|
674
931
|
}) => Promise<string>;
|
|
932
|
+
signAuthorization: ((params: {
|
|
933
|
+
address: string;
|
|
934
|
+
nonce?: number | bigint;
|
|
935
|
+
chainId?: bigint;
|
|
936
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
675
937
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
938
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
676
939
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
677
|
-
validateAddress: (
|
|
940
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
678
941
|
};
|
|
679
942
|
CORN: ChainWallet<Chain.Corn> & {
|
|
680
943
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
@@ -701,9 +964,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
701
964
|
maxFeePerGas?: bigint;
|
|
702
965
|
maxPriorityFeePerGas?: bigint;
|
|
703
966
|
}; }>;
|
|
704
|
-
estimateTransactionFee: ({ feeOption,
|
|
967
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
705
968
|
feeOption: FeeOption;
|
|
706
|
-
chain: EVMChain;
|
|
707
969
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
708
970
|
getAddress: () => string | Promise<string> | undefined;
|
|
709
971
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -712,9 +974,15 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
712
974
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
713
975
|
feeOptionKey?: FeeOption;
|
|
714
976
|
}) => Promise<string>;
|
|
977
|
+
signAuthorization: ((params: {
|
|
978
|
+
address: string;
|
|
979
|
+
nonce?: number | bigint;
|
|
980
|
+
chainId?: bigint;
|
|
981
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
715
982
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
983
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
716
984
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
717
|
-
validateAddress: (
|
|
985
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
718
986
|
};
|
|
719
987
|
GAIA: ChainWallet<Chain.Cosmos> & {
|
|
720
988
|
createPrivateKeyFromPhrase: (phrase: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
@@ -738,10 +1006,9 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
738
1006
|
derivationPath: import("@swapkit/helpers").DerivationPathArray;
|
|
739
1007
|
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
740
1008
|
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
}) => Promise<string>;
|
|
1009
|
+
signAndBroadcastTransaction: (transaction: import("@swapkit/helpers").CosmosTransaction) => Promise<string>;
|
|
1010
|
+
signTransaction: (transaction: import("@swapkit/helpers").CosmosTransaction) => Promise<import("cosmjs-types/cosmos/tx/v1beta1/tx").TxRaw>;
|
|
1011
|
+
transfer: ({ recipient, assetValue, memo, feeRate, feeOptionKey, }: GenericTransferParams) => Promise<string>;
|
|
745
1012
|
validateAddress: (address: string) => boolean;
|
|
746
1013
|
verifySignature: ({ signature, message, address, }: {
|
|
747
1014
|
signature: string;
|
|
@@ -774,9 +1041,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
774
1041
|
maxFeePerGas?: bigint;
|
|
775
1042
|
maxPriorityFeePerGas?: bigint;
|
|
776
1043
|
}; }>;
|
|
777
|
-
estimateTransactionFee: ({ feeOption,
|
|
1044
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
778
1045
|
feeOption: FeeOption;
|
|
779
|
-
chain: EVMChain;
|
|
780
1046
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
781
1047
|
getAddress: () => string | Promise<string> | undefined;
|
|
782
1048
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -785,30 +1051,62 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
785
1051
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
786
1052
|
feeOptionKey?: FeeOption;
|
|
787
1053
|
}) => Promise<string>;
|
|
1054
|
+
signAuthorization: ((params: {
|
|
1055
|
+
address: string;
|
|
1056
|
+
nonce?: number | bigint;
|
|
1057
|
+
chainId?: bigint;
|
|
1058
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
788
1059
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
1060
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
789
1061
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
790
|
-
validateAddress: (
|
|
1062
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
791
1063
|
};
|
|
792
1064
|
DASH: ChainWallet<Chain.Dash> & {
|
|
793
|
-
accumulative: typeof import("@swapkit/toolboxes/utxo").accumulative;
|
|
1065
|
+
accumulative: typeof import("@swapkit/toolboxes/utxo/index").accumulative;
|
|
794
1066
|
broadcastTx: (txHash: string) => Promise<string>;
|
|
795
|
-
|
|
1067
|
+
bumpFee: ({ txid, newFeeRate, recipient, memo }: import("@swapkit/toolboxes/utxo/index").RBFTransactionParams) => Promise<{
|
|
1068
|
+
newFee: number;
|
|
1069
|
+
originalFee: number;
|
|
1070
|
+
txid: string;
|
|
1071
|
+
}>;
|
|
1072
|
+
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo/index").UTXOCalculateTxSizeParams) => number;
|
|
796
1073
|
createKeysForPath: (params: {
|
|
797
1074
|
wif?: string;
|
|
798
1075
|
phrase?: string;
|
|
799
1076
|
derivationPath?: string;
|
|
800
|
-
}) =>
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
1077
|
+
}) => {
|
|
1078
|
+
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
1079
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
1080
|
+
};
|
|
1081
|
+
createReplacementTransaction: ({ txid, newFeeRate, recipient, memo, }: import("@swapkit/toolboxes/utxo/index").RBFTransactionParams) => Promise<import("node_modules/@swapkit/toolboxes/dist/types/utxo/toolbox/utxo").ReplacementTransactionResult>;
|
|
1082
|
+
createTransaction: ({ assetValue, recipient, memo, feeRate, sender, fetchTxHex, enableRBF, }: import("@swapkit/toolboxes/utxo/index").UTXOBuildTxParams) => Promise<{
|
|
1083
|
+
inputs: import("@swapkit/toolboxes/utxo/index").UTXOType[];
|
|
1084
|
+
tx: import("@swapkit/utxo-signer").Transaction;
|
|
1085
|
+
utxos: {
|
|
1086
|
+
address: string;
|
|
1087
|
+
hash: string;
|
|
1088
|
+
index: number;
|
|
1089
|
+
txHex: string | undefined;
|
|
1090
|
+
value: number;
|
|
1091
|
+
witnessUtxo: {
|
|
1092
|
+
script: Buffer<ArrayBuffer>;
|
|
1093
|
+
value: number;
|
|
1094
|
+
};
|
|
1095
|
+
}[];
|
|
805
1096
|
}>;
|
|
1097
|
+
deriveAddressAtIndex: ({ index, change }: import("@swapkit/toolboxes/utxo/index").DeriveAddressParams) => {
|
|
1098
|
+
address: string;
|
|
1099
|
+
change: boolean;
|
|
1100
|
+
index: number;
|
|
1101
|
+
pubkey: string;
|
|
1102
|
+
} | undefined;
|
|
1103
|
+
derivePrivateKeyAtIndex: ({ index, change }: import("@swapkit/toolboxes/utxo/index").DeriveAddressParams) => Uint8Array<ArrayBufferLike> | undefined;
|
|
806
1104
|
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
807
1105
|
from: string;
|
|
808
1106
|
memo?: string;
|
|
809
1107
|
feeRate?: number;
|
|
810
1108
|
feeOptionKey?: FeeOption;
|
|
811
|
-
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
1109
|
+
recipients?: number | import("@swapkit/toolboxes/utxo/index").TargetOutput[];
|
|
812
1110
|
}) => Promise<AssetValue>;
|
|
813
1111
|
estimateTransactionFee: (params: {
|
|
814
1112
|
assetValue: AssetValue;
|
|
@@ -819,53 +1117,118 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
819
1117
|
feeRate?: number;
|
|
820
1118
|
fetchTxHex?: boolean;
|
|
821
1119
|
}) => Promise<AssetValue>;
|
|
822
|
-
getAddress: () => Promise<string | undefined>;
|
|
823
|
-
getAddressFromKeys: (keys:
|
|
1120
|
+
getAddress: () => string | Promise<string> | Promise<undefined>;
|
|
1121
|
+
getAddressFromKeys: (keys: {
|
|
1122
|
+
publicKey: Uint8Array;
|
|
1123
|
+
}) => string;
|
|
824
1124
|
getBalance: (address: string, scamFilter?: boolean) => Promise<AssetValue[]>;
|
|
1125
|
+
getExtendedPublicKey: () => string | undefined;
|
|
825
1126
|
getFeeRates: () => Promise<{
|
|
826
1127
|
average: number;
|
|
827
1128
|
fast: number;
|
|
828
1129
|
fastest: number;
|
|
829
1130
|
}>;
|
|
830
|
-
getInputsOutputsFee: ({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<import("@swapkit/toolboxes/utxo").UTXOBuildTxParams, "feeRate"> & {
|
|
1131
|
+
getInputsOutputsFee: ({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<import("@swapkit/toolboxes/utxo/index").UTXOBuildTxParams, "feeRate"> & {
|
|
831
1132
|
feeOptionKey?: FeeOption;
|
|
832
1133
|
feeRate?: number;
|
|
833
1134
|
}) => Promise<{
|
|
834
1135
|
fee: number;
|
|
835
|
-
inputs:
|
|
836
|
-
|
|
1136
|
+
inputs: {
|
|
1137
|
+
address: string;
|
|
1138
|
+
hash: string;
|
|
1139
|
+
index: number;
|
|
1140
|
+
txHex: string | undefined;
|
|
1141
|
+
value: number;
|
|
1142
|
+
witnessUtxo: {
|
|
1143
|
+
script: Buffer<ArrayBuffer>;
|
|
1144
|
+
value: number;
|
|
1145
|
+
};
|
|
1146
|
+
}[];
|
|
1147
|
+
outputs: import("@swapkit/toolboxes/utxo/index").TargetOutput[];
|
|
837
1148
|
} | {
|
|
838
1149
|
fee: number;
|
|
839
1150
|
inputs?: undefined;
|
|
840
1151
|
outputs?: undefined;
|
|
841
1152
|
}>;
|
|
1153
|
+
getNetworkForChain: () => import("@swapkit/utxo-signer").BTCNetwork;
|
|
842
1154
|
getPrivateKeyFromMnemonic: (params: {
|
|
843
1155
|
phrase: string;
|
|
844
1156
|
derivationPath: string;
|
|
845
1157
|
}) => string;
|
|
846
|
-
|
|
1158
|
+
isRBFEnabled: (txid: string) => Promise<import("node_modules/@swapkit/toolboxes/dist/types/utxo/toolbox/utxo").RBFStatusResult>;
|
|
1159
|
+
keys: {
|
|
1160
|
+
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
1161
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
1162
|
+
} | undefined;
|
|
1163
|
+
resolveDerivationIndex: ({ address, gapLimit }: import("@swapkit/toolboxes/utxo/index").ResolveDerivationParams) => {
|
|
1164
|
+
change: boolean;
|
|
1165
|
+
index: number;
|
|
1166
|
+
} | undefined;
|
|
1167
|
+
signAndBroadcastTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => Promise<string>;
|
|
1168
|
+
signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
|
|
1169
|
+
tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>;
|
|
1170
|
+
inputDerivations: import("@swapkit/toolboxes/utxo/index").InputDerivation[];
|
|
1171
|
+
}) => import("@swapkit/utxo-signer").Transaction;
|
|
1172
|
+
transfer: ({ memo, recipient, feeOptionKey, feeRate, assetValue, enableRBF, }: import("@swapkit/toolboxes/utxo/index").UTXOTransferParams & {
|
|
1173
|
+
enableRBF?: boolean;
|
|
1174
|
+
}) => Promise<string>;
|
|
1175
|
+
transferFromMultipleAddresses: ({ utxos, recipient, assetValue, memo, feeRate, feeOptionKey, changeAddress, }: {
|
|
1176
|
+
utxos: import("@swapkit/toolboxes").UTXOForMultiAddressTransfer[];
|
|
1177
|
+
recipient: string;
|
|
1178
|
+
assetValue: AssetValue;
|
|
1179
|
+
memo?: string;
|
|
1180
|
+
feeRate?: number;
|
|
1181
|
+
feeOptionKey?: FeeOption;
|
|
1182
|
+
changeAddress?: string;
|
|
1183
|
+
}) => Promise<string>;
|
|
847
1184
|
validateAddress: (address: string) => boolean;
|
|
848
1185
|
};
|
|
849
1186
|
DOGE: ChainWallet<Chain.Dogecoin> & {
|
|
850
|
-
accumulative: typeof import("@swapkit/toolboxes/utxo").accumulative;
|
|
1187
|
+
accumulative: typeof import("@swapkit/toolboxes/utxo/index").accumulative;
|
|
851
1188
|
broadcastTx: (txHash: string) => Promise<string>;
|
|
852
|
-
|
|
1189
|
+
bumpFee: ({ txid, newFeeRate, recipient, memo }: import("@swapkit/toolboxes/utxo/index").RBFTransactionParams) => Promise<{
|
|
1190
|
+
newFee: number;
|
|
1191
|
+
originalFee: number;
|
|
1192
|
+
txid: string;
|
|
1193
|
+
}>;
|
|
1194
|
+
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo/index").UTXOCalculateTxSizeParams) => number;
|
|
853
1195
|
createKeysForPath: (params: {
|
|
854
1196
|
wif?: string;
|
|
855
1197
|
phrase?: string;
|
|
856
1198
|
derivationPath?: string;
|
|
857
|
-
}) =>
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
1199
|
+
}) => {
|
|
1200
|
+
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
1201
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
1202
|
+
};
|
|
1203
|
+
createReplacementTransaction: ({ txid, newFeeRate, recipient, memo, }: import("@swapkit/toolboxes/utxo/index").RBFTransactionParams) => Promise<import("node_modules/@swapkit/toolboxes/dist/types/utxo/toolbox/utxo").ReplacementTransactionResult>;
|
|
1204
|
+
createTransaction: ({ assetValue, recipient, memo, feeRate, sender, fetchTxHex, enableRBF, }: import("@swapkit/toolboxes/utxo/index").UTXOBuildTxParams) => Promise<{
|
|
1205
|
+
inputs: import("@swapkit/toolboxes/utxo/index").UTXOType[];
|
|
1206
|
+
tx: import("@swapkit/utxo-signer").Transaction;
|
|
1207
|
+
utxos: {
|
|
1208
|
+
address: string;
|
|
1209
|
+
hash: string;
|
|
1210
|
+
index: number;
|
|
1211
|
+
txHex: string | undefined;
|
|
1212
|
+
value: number;
|
|
1213
|
+
witnessUtxo: {
|
|
1214
|
+
script: Buffer<ArrayBuffer>;
|
|
1215
|
+
value: number;
|
|
1216
|
+
};
|
|
1217
|
+
}[];
|
|
862
1218
|
}>;
|
|
1219
|
+
deriveAddressAtIndex: ({ index, change }: import("@swapkit/toolboxes/utxo/index").DeriveAddressParams) => {
|
|
1220
|
+
address: string;
|
|
1221
|
+
change: boolean;
|
|
1222
|
+
index: number;
|
|
1223
|
+
pubkey: string;
|
|
1224
|
+
} | undefined;
|
|
1225
|
+
derivePrivateKeyAtIndex: ({ index, change }: import("@swapkit/toolboxes/utxo/index").DeriveAddressParams) => Uint8Array<ArrayBufferLike> | undefined;
|
|
863
1226
|
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
864
1227
|
from: string;
|
|
865
1228
|
memo?: string;
|
|
866
1229
|
feeRate?: number;
|
|
867
1230
|
feeOptionKey?: FeeOption;
|
|
868
|
-
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
1231
|
+
recipients?: number | import("@swapkit/toolboxes/utxo/index").TargetOutput[];
|
|
869
1232
|
}) => Promise<AssetValue>;
|
|
870
1233
|
estimateTransactionFee: (params: {
|
|
871
1234
|
assetValue: AssetValue;
|
|
@@ -876,31 +1239,70 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
876
1239
|
feeRate?: number;
|
|
877
1240
|
fetchTxHex?: boolean;
|
|
878
1241
|
}) => Promise<AssetValue>;
|
|
879
|
-
getAddress: () => Promise<string | undefined>;
|
|
880
|
-
getAddressFromKeys: (keys:
|
|
1242
|
+
getAddress: () => string | Promise<string> | Promise<undefined>;
|
|
1243
|
+
getAddressFromKeys: (keys: {
|
|
1244
|
+
publicKey: Uint8Array;
|
|
1245
|
+
}) => string;
|
|
881
1246
|
getBalance: (address: string, scamFilter?: boolean) => Promise<AssetValue[]>;
|
|
1247
|
+
getExtendedPublicKey: () => string | undefined;
|
|
882
1248
|
getFeeRates: () => Promise<{
|
|
883
1249
|
average: number;
|
|
884
1250
|
fast: number;
|
|
885
1251
|
fastest: number;
|
|
886
1252
|
}>;
|
|
887
|
-
getInputsOutputsFee: ({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<import("@swapkit/toolboxes/utxo").UTXOBuildTxParams, "feeRate"> & {
|
|
1253
|
+
getInputsOutputsFee: ({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<import("@swapkit/toolboxes/utxo/index").UTXOBuildTxParams, "feeRate"> & {
|
|
888
1254
|
feeOptionKey?: FeeOption;
|
|
889
1255
|
feeRate?: number;
|
|
890
1256
|
}) => Promise<{
|
|
891
1257
|
fee: number;
|
|
892
|
-
inputs:
|
|
893
|
-
|
|
1258
|
+
inputs: {
|
|
1259
|
+
address: string;
|
|
1260
|
+
hash: string;
|
|
1261
|
+
index: number;
|
|
1262
|
+
txHex: string | undefined;
|
|
1263
|
+
value: number;
|
|
1264
|
+
witnessUtxo: {
|
|
1265
|
+
script: Buffer<ArrayBuffer>;
|
|
1266
|
+
value: number;
|
|
1267
|
+
};
|
|
1268
|
+
}[];
|
|
1269
|
+
outputs: import("@swapkit/toolboxes/utxo/index").TargetOutput[];
|
|
894
1270
|
} | {
|
|
895
1271
|
fee: number;
|
|
896
1272
|
inputs?: undefined;
|
|
897
1273
|
outputs?: undefined;
|
|
898
1274
|
}>;
|
|
1275
|
+
getNetworkForChain: () => import("@swapkit/utxo-signer").BTCNetwork;
|
|
899
1276
|
getPrivateKeyFromMnemonic: (params: {
|
|
900
1277
|
phrase: string;
|
|
901
1278
|
derivationPath: string;
|
|
902
1279
|
}) => string;
|
|
903
|
-
|
|
1280
|
+
isRBFEnabled: (txid: string) => Promise<import("node_modules/@swapkit/toolboxes/dist/types/utxo/toolbox/utxo").RBFStatusResult>;
|
|
1281
|
+
keys: {
|
|
1282
|
+
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
1283
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
1284
|
+
} | undefined;
|
|
1285
|
+
resolveDerivationIndex: ({ address, gapLimit }: import("@swapkit/toolboxes/utxo/index").ResolveDerivationParams) => {
|
|
1286
|
+
change: boolean;
|
|
1287
|
+
index: number;
|
|
1288
|
+
} | undefined;
|
|
1289
|
+
signAndBroadcastTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => Promise<string>;
|
|
1290
|
+
signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
|
|
1291
|
+
tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>;
|
|
1292
|
+
inputDerivations: import("@swapkit/toolboxes/utxo/index").InputDerivation[];
|
|
1293
|
+
}) => import("@swapkit/utxo-signer").Transaction;
|
|
1294
|
+
transfer: ({ memo, recipient, feeOptionKey, feeRate, assetValue, enableRBF, }: import("@swapkit/toolboxes/utxo/index").UTXOTransferParams & {
|
|
1295
|
+
enableRBF?: boolean;
|
|
1296
|
+
}) => Promise<string>;
|
|
1297
|
+
transferFromMultipleAddresses: ({ utxos, recipient, assetValue, memo, feeRate, feeOptionKey, changeAddress, }: {
|
|
1298
|
+
utxos: import("@swapkit/toolboxes").UTXOForMultiAddressTransfer[];
|
|
1299
|
+
recipient: string;
|
|
1300
|
+
assetValue: AssetValue;
|
|
1301
|
+
memo?: string;
|
|
1302
|
+
feeRate?: number;
|
|
1303
|
+
feeOptionKey?: FeeOption;
|
|
1304
|
+
changeAddress?: string;
|
|
1305
|
+
}) => Promise<string>;
|
|
904
1306
|
validateAddress: (address: string) => boolean;
|
|
905
1307
|
};
|
|
906
1308
|
ETH: ChainWallet<Chain.Ethereum> & {
|
|
@@ -932,9 +1334,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
932
1334
|
maxFeePerGas?: bigint;
|
|
933
1335
|
maxPriorityFeePerGas?: bigint;
|
|
934
1336
|
}; }>;
|
|
935
|
-
estimateTransactionFee: ({ feeOption,
|
|
1337
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
936
1338
|
feeOption: FeeOption;
|
|
937
|
-
chain: EVMChain;
|
|
938
1339
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
939
1340
|
getAddress: () => string | Promise<string> | undefined;
|
|
940
1341
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -943,9 +1344,15 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
943
1344
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
944
1345
|
feeOptionKey?: FeeOption;
|
|
945
1346
|
}) => Promise<string>;
|
|
1347
|
+
signAuthorization: ((params: {
|
|
1348
|
+
address: string;
|
|
1349
|
+
nonce?: number | bigint;
|
|
1350
|
+
chainId?: bigint;
|
|
1351
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
946
1352
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
1353
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
947
1354
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
948
|
-
validateAddress: (
|
|
1355
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
949
1356
|
};
|
|
950
1357
|
GNO: ChainWallet<Chain.Gnosis> & {
|
|
951
1358
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
@@ -972,9 +1379,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
972
1379
|
maxFeePerGas?: bigint;
|
|
973
1380
|
maxPriorityFeePerGas?: bigint;
|
|
974
1381
|
}; }>;
|
|
975
|
-
estimateTransactionFee: ({ feeOption,
|
|
1382
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
976
1383
|
feeOption: FeeOption;
|
|
977
|
-
chain: EVMChain;
|
|
978
1384
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
979
1385
|
getAddress: () => string | Promise<string> | undefined;
|
|
980
1386
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -983,9 +1389,15 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
983
1389
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
984
1390
|
feeOptionKey?: FeeOption;
|
|
985
1391
|
}) => Promise<string>;
|
|
1392
|
+
signAuthorization: ((params: {
|
|
1393
|
+
address: string;
|
|
1394
|
+
nonce?: number | bigint;
|
|
1395
|
+
chainId?: bigint;
|
|
1396
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
986
1397
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
1398
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
987
1399
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
988
|
-
validateAddress: (
|
|
1400
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
989
1401
|
};
|
|
990
1402
|
HARBOR: ChainWallet<Chain.Harbor> & {
|
|
991
1403
|
createPrivateKeyFromPhrase: (phrase: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
@@ -1009,10 +1421,9 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1009
1421
|
derivationPath: import("@swapkit/helpers").DerivationPathArray;
|
|
1010
1422
|
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
1011
1423
|
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
}) => Promise<string>;
|
|
1424
|
+
signAndBroadcastTransaction: (transaction: import("@swapkit/helpers").CosmosTransaction) => Promise<string>;
|
|
1425
|
+
signTransaction: (transaction: import("@swapkit/helpers").CosmosTransaction) => Promise<import("cosmjs-types/cosmos/tx/v1beta1/tx").TxRaw>;
|
|
1426
|
+
transfer: ({ recipient, assetValue, memo, feeRate, feeOptionKey, }: GenericTransferParams) => Promise<string>;
|
|
1016
1427
|
validateAddress: (address: string) => boolean;
|
|
1017
1428
|
verifySignature: ({ signature, message, address, }: {
|
|
1018
1429
|
signature: string;
|
|
@@ -1045,9 +1456,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1045
1456
|
maxFeePerGas?: bigint;
|
|
1046
1457
|
maxPriorityFeePerGas?: bigint;
|
|
1047
1458
|
}; }>;
|
|
1048
|
-
estimateTransactionFee: ({ feeOption,
|
|
1459
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
1049
1460
|
feeOption: FeeOption;
|
|
1050
|
-
chain: EVMChain;
|
|
1051
1461
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1052
1462
|
getAddress: () => string | Promise<string> | undefined;
|
|
1053
1463
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -1056,9 +1466,15 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1056
1466
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
1057
1467
|
feeOptionKey?: FeeOption;
|
|
1058
1468
|
}) => Promise<string>;
|
|
1469
|
+
signAuthorization: ((params: {
|
|
1470
|
+
address: string;
|
|
1471
|
+
nonce?: number | bigint;
|
|
1472
|
+
chainId?: bigint;
|
|
1473
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
1059
1474
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
1475
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
1060
1476
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
1061
|
-
validateAddress: (
|
|
1477
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
1062
1478
|
};
|
|
1063
1479
|
KUJI: ChainWallet<Chain.Kujira> & {
|
|
1064
1480
|
createPrivateKeyFromPhrase: (phrase: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
@@ -1082,10 +1498,9 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1082
1498
|
derivationPath: import("@swapkit/helpers").DerivationPathArray;
|
|
1083
1499
|
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
1084
1500
|
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
}) => Promise<string>;
|
|
1501
|
+
signAndBroadcastTransaction: (transaction: import("@swapkit/helpers").CosmosTransaction) => Promise<string>;
|
|
1502
|
+
signTransaction: (transaction: import("@swapkit/helpers").CosmosTransaction) => Promise<import("cosmjs-types/cosmos/tx/v1beta1/tx").TxRaw>;
|
|
1503
|
+
transfer: ({ recipient, assetValue, memo, feeRate, feeOptionKey, }: GenericTransferParams) => Promise<string>;
|
|
1089
1504
|
validateAddress: (address: string) => boolean;
|
|
1090
1505
|
verifySignature: ({ signature, message, address, }: {
|
|
1091
1506
|
signature: string;
|
|
@@ -1094,25 +1509,51 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1094
1509
|
}) => Promise<boolean>;
|
|
1095
1510
|
};
|
|
1096
1511
|
LTC: ChainWallet<Chain.Litecoin> & {
|
|
1097
|
-
accumulative: typeof import("@swapkit/toolboxes/utxo").accumulative;
|
|
1512
|
+
accumulative: typeof import("@swapkit/toolboxes/utxo/index").accumulative;
|
|
1098
1513
|
broadcastTx: (txHash: string) => Promise<string>;
|
|
1099
|
-
|
|
1514
|
+
bumpFee: ({ txid, newFeeRate, recipient, memo }: import("@swapkit/toolboxes/utxo/index").RBFTransactionParams) => Promise<{
|
|
1515
|
+
newFee: number;
|
|
1516
|
+
originalFee: number;
|
|
1517
|
+
txid: string;
|
|
1518
|
+
}>;
|
|
1519
|
+
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo/index").UTXOCalculateTxSizeParams) => number;
|
|
1100
1520
|
createKeysForPath: (params: {
|
|
1101
1521
|
wif?: string;
|
|
1102
1522
|
phrase?: string;
|
|
1103
1523
|
derivationPath?: string;
|
|
1104
|
-
}) =>
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1524
|
+
}) => {
|
|
1525
|
+
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
1526
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
1527
|
+
};
|
|
1528
|
+
createReplacementTransaction: ({ txid, newFeeRate, recipient, memo, }: import("@swapkit/toolboxes/utxo/index").RBFTransactionParams) => Promise<import("node_modules/@swapkit/toolboxes/dist/types/utxo/toolbox/utxo").ReplacementTransactionResult>;
|
|
1529
|
+
createTransaction: ({ assetValue, recipient, memo, feeRate, sender, fetchTxHex, enableRBF, }: import("@swapkit/toolboxes/utxo/index").UTXOBuildTxParams) => Promise<{
|
|
1530
|
+
inputs: import("@swapkit/toolboxes/utxo/index").UTXOType[];
|
|
1531
|
+
tx: import("@swapkit/utxo-signer").Transaction;
|
|
1532
|
+
utxos: {
|
|
1533
|
+
address: string;
|
|
1534
|
+
hash: string;
|
|
1535
|
+
index: number;
|
|
1536
|
+
txHex: string | undefined;
|
|
1537
|
+
value: number;
|
|
1538
|
+
witnessUtxo: {
|
|
1539
|
+
script: Buffer<ArrayBuffer>;
|
|
1540
|
+
value: number;
|
|
1541
|
+
};
|
|
1542
|
+
}[];
|
|
1109
1543
|
}>;
|
|
1544
|
+
deriveAddressAtIndex: ({ index, change }: import("@swapkit/toolboxes/utxo/index").DeriveAddressParams) => {
|
|
1545
|
+
address: string;
|
|
1546
|
+
change: boolean;
|
|
1547
|
+
index: number;
|
|
1548
|
+
pubkey: string;
|
|
1549
|
+
} | undefined;
|
|
1550
|
+
derivePrivateKeyAtIndex: ({ index, change }: import("@swapkit/toolboxes/utxo/index").DeriveAddressParams) => Uint8Array<ArrayBufferLike> | undefined;
|
|
1110
1551
|
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
1111
1552
|
from: string;
|
|
1112
1553
|
memo?: string;
|
|
1113
1554
|
feeRate?: number;
|
|
1114
1555
|
feeOptionKey?: FeeOption;
|
|
1115
|
-
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
1556
|
+
recipients?: number | import("@swapkit/toolboxes/utxo/index").TargetOutput[];
|
|
1116
1557
|
}) => Promise<AssetValue>;
|
|
1117
1558
|
estimateTransactionFee: (params: {
|
|
1118
1559
|
assetValue: AssetValue;
|
|
@@ -1123,182 +1564,73 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1123
1564
|
feeRate?: number;
|
|
1124
1565
|
fetchTxHex?: boolean;
|
|
1125
1566
|
}) => Promise<AssetValue>;
|
|
1126
|
-
getAddress: () => Promise<string | undefined>;
|
|
1127
|
-
getAddressFromKeys: (keys:
|
|
1567
|
+
getAddress: () => string | Promise<string> | Promise<undefined>;
|
|
1568
|
+
getAddressFromKeys: (keys: {
|
|
1569
|
+
publicKey: Uint8Array;
|
|
1570
|
+
}) => string;
|
|
1128
1571
|
getBalance: (address: string, scamFilter?: boolean) => Promise<AssetValue[]>;
|
|
1572
|
+
getExtendedPublicKey: () => string | undefined;
|
|
1129
1573
|
getFeeRates: () => Promise<{
|
|
1130
1574
|
average: number;
|
|
1131
1575
|
fast: number;
|
|
1132
1576
|
fastest: number;
|
|
1133
1577
|
}>;
|
|
1134
|
-
getInputsOutputsFee: ({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<import("@swapkit/toolboxes/utxo").UTXOBuildTxParams, "feeRate"> & {
|
|
1578
|
+
getInputsOutputsFee: ({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<import("@swapkit/toolboxes/utxo/index").UTXOBuildTxParams, "feeRate"> & {
|
|
1135
1579
|
feeOptionKey?: FeeOption;
|
|
1136
1580
|
feeRate?: number;
|
|
1137
1581
|
}) => Promise<{
|
|
1138
1582
|
fee: number;
|
|
1139
|
-
inputs:
|
|
1140
|
-
|
|
1583
|
+
inputs: {
|
|
1584
|
+
address: string;
|
|
1585
|
+
hash: string;
|
|
1586
|
+
index: number;
|
|
1587
|
+
txHex: string | undefined;
|
|
1588
|
+
value: number;
|
|
1589
|
+
witnessUtxo: {
|
|
1590
|
+
script: Buffer<ArrayBuffer>;
|
|
1591
|
+
value: number;
|
|
1592
|
+
};
|
|
1593
|
+
}[];
|
|
1594
|
+
outputs: import("@swapkit/toolboxes/utxo/index").TargetOutput[];
|
|
1141
1595
|
} | {
|
|
1142
1596
|
fee: number;
|
|
1143
1597
|
inputs?: undefined;
|
|
1144
1598
|
outputs?: undefined;
|
|
1145
1599
|
}>;
|
|
1600
|
+
getNetworkForChain: () => import("@swapkit/utxo-signer").BTCNetwork;
|
|
1146
1601
|
getPrivateKeyFromMnemonic: (params: {
|
|
1147
1602
|
phrase: string;
|
|
1148
1603
|
derivationPath: string;
|
|
1149
1604
|
}) => string;
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
}[];
|
|
1167
|
-
memo: string;
|
|
1168
|
-
signer: string;
|
|
1169
|
-
};
|
|
1170
|
-
} | {
|
|
1171
|
-
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
1172
|
-
value: {
|
|
1173
|
-
amount: {
|
|
1174
|
-
amount: string;
|
|
1175
|
-
denom: string;
|
|
1176
|
-
}[];
|
|
1177
|
-
from_address: string;
|
|
1178
|
-
to_address: string | undefined;
|
|
1179
|
-
};
|
|
1180
|
-
};
|
|
1181
|
-
buildEncodedTxBody: typeof import("@swapkit/toolboxes/cosmos").buildEncodedTxBody;
|
|
1182
|
-
convertToSignable: (msg: {
|
|
1183
|
-
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
1184
|
-
value: {
|
|
1185
|
-
amount: {
|
|
1186
|
-
amount: string;
|
|
1187
|
-
denom: string;
|
|
1188
|
-
}[];
|
|
1189
|
-
from_address: string;
|
|
1190
|
-
to_address: string | undefined;
|
|
1191
|
-
};
|
|
1192
|
-
} | {
|
|
1193
|
-
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
1194
|
-
value: {
|
|
1195
|
-
coins: {
|
|
1196
|
-
amount: string;
|
|
1197
|
-
asset: string;
|
|
1198
|
-
}[];
|
|
1199
|
-
memo: string;
|
|
1200
|
-
signer: string;
|
|
1201
|
-
};
|
|
1202
|
-
}, chain: import("@swapkit/types").TCLikeChain) => Promise<import("@cosmjs/proto-signing").EncodeObject>;
|
|
1203
|
-
createDefaultAminoTypes: () => Promise<import("@cosmjs/stargate").AminoTypes>;
|
|
1204
|
-
createDefaultRegistry: typeof import("@swapkit/toolboxes/cosmos").createDefaultRegistry;
|
|
1205
|
-
createMultisig: (pubKeys: string[], threshold: number, noSortPubKeys?: boolean) => Promise<import("@cosmjs/amino").MultisigThresholdPubkey>;
|
|
1206
|
-
createTransaction: (params: import("@swapkit/toolboxes/cosmos").ThorchainCreateTransactionParams) => Promise<{
|
|
1207
|
-
accountNumber: number;
|
|
1208
|
-
chainId: import("@swapkit/types").ChainId.Maya | import("@swapkit/types").ChainId.THORChain;
|
|
1209
|
-
fee: {
|
|
1210
|
-
amount: {
|
|
1211
|
-
amount: string;
|
|
1212
|
-
denom: string;
|
|
1213
|
-
}[];
|
|
1214
|
-
gas: string;
|
|
1215
|
-
};
|
|
1216
|
-
memo: string;
|
|
1217
|
-
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
1218
|
-
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
1219
|
-
value: {
|
|
1220
|
-
amount: {
|
|
1221
|
-
amount: string;
|
|
1222
|
-
denom: string;
|
|
1223
|
-
}[];
|
|
1224
|
-
from_address: string;
|
|
1225
|
-
to_address: string | undefined;
|
|
1226
|
-
};
|
|
1227
|
-
})[];
|
|
1228
|
-
sequence: number;
|
|
1229
|
-
}> | Promise<{
|
|
1230
|
-
accountNumber: number;
|
|
1231
|
-
chainId: import("@swapkit/types").ChainId.Maya | import("@swapkit/types").ChainId.THORChain;
|
|
1232
|
-
fee: {
|
|
1233
|
-
amount: {
|
|
1234
|
-
amount: string;
|
|
1235
|
-
denom: string;
|
|
1236
|
-
}[];
|
|
1237
|
-
gas: string;
|
|
1238
|
-
};
|
|
1239
|
-
memo: string;
|
|
1240
|
-
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
1241
|
-
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
1242
|
-
value: {
|
|
1243
|
-
coins: {
|
|
1244
|
-
amount: string;
|
|
1245
|
-
asset: string;
|
|
1246
|
-
}[];
|
|
1247
|
-
memo: string;
|
|
1248
|
-
signer: string;
|
|
1249
|
-
};
|
|
1250
|
-
})[];
|
|
1251
|
-
sequence: number;
|
|
1252
|
-
}>;
|
|
1253
|
-
deposit: ({ assetValue, memo, recipient, }: Omit<GenericTransferParams, "recipient"> & {
|
|
1254
|
-
recipient?: string;
|
|
1605
|
+
isRBFEnabled: (txid: string) => Promise<import("node_modules/@swapkit/toolboxes/dist/types/utxo/toolbox/utxo").RBFStatusResult>;
|
|
1606
|
+
keys: {
|
|
1607
|
+
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
1608
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
1609
|
+
} | undefined;
|
|
1610
|
+
resolveDerivationIndex: ({ address, gapLimit }: import("@swapkit/toolboxes/utxo/index").ResolveDerivationParams) => {
|
|
1611
|
+
change: boolean;
|
|
1612
|
+
index: number;
|
|
1613
|
+
} | undefined;
|
|
1614
|
+
signAndBroadcastTransaction: (tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>) => Promise<string>;
|
|
1615
|
+
signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
|
|
1616
|
+
tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>;
|
|
1617
|
+
inputDerivations: import("@swapkit/toolboxes/utxo/index").InputDerivation[];
|
|
1618
|
+
}) => import("@swapkit/utxo-signer").Transaction;
|
|
1619
|
+
transfer: ({ memo, recipient, feeOptionKey, feeRate, assetValue, enableRBF, }: import("@swapkit/toolboxes/utxo/index").UTXOTransferParams & {
|
|
1620
|
+
enableRBF?: boolean;
|
|
1255
1621
|
}) => Promise<string>;
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
secp256k1HdWalletFromMnemonic: (mnemonic: string, index?: number) => Promise<import("@cosmjs/amino").Secp256k1HdWallet>;
|
|
1265
|
-
signMultisigTx: ({ wallet, tx }: {
|
|
1266
|
-
wallet: import("@cosmjs/amino").Secp256k1HdWallet;
|
|
1267
|
-
tx: string | import("@swapkit/toolboxes/cosmos").MultisigTx;
|
|
1268
|
-
}) => Promise<{
|
|
1269
|
-
bodyBytes: Uint8Array<ArrayBufferLike>;
|
|
1270
|
-
signature: string;
|
|
1271
|
-
}>;
|
|
1272
|
-
signWithPrivateKey: ({ privateKey, message }: {
|
|
1273
|
-
privateKey: Uint8Array;
|
|
1274
|
-
message: string;
|
|
1275
|
-
}) => Promise<string>;
|
|
1276
|
-
transfer: ({ assetValue, memo, recipient, }: Omit<GenericTransferParams, "recipient"> & {
|
|
1277
|
-
recipient?: string;
|
|
1622
|
+
transferFromMultipleAddresses: ({ utxos, recipient, assetValue, memo, feeRate, feeOptionKey, changeAddress, }: {
|
|
1623
|
+
utxos: import("@swapkit/toolboxes").UTXOForMultiAddressTransfer[];
|
|
1624
|
+
recipient: string;
|
|
1625
|
+
assetValue: AssetValue;
|
|
1626
|
+
memo?: string;
|
|
1627
|
+
feeRate?: number;
|
|
1628
|
+
feeOptionKey?: FeeOption;
|
|
1629
|
+
changeAddress?: string;
|
|
1278
1630
|
}) => Promise<string>;
|
|
1279
|
-
createPrivateKeyFromPhrase: (phrase: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
1280
|
-
fetchFeeRateFromSwapKit: typeof import("@swapkit/toolboxes/cosmos").fetchFeeRateFromSwapKit;
|
|
1281
|
-
getAccount: (address: string) => Promise<import("@cosmjs/stargate").Account | null>;
|
|
1282
|
-
getAddress: () => Promise<string | undefined>;
|
|
1283
|
-
getBalance: (address: string, _potentialScamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
1284
|
-
getBalanceAsDenoms: (address: string) => Promise<{
|
|
1285
|
-
denom: string;
|
|
1286
|
-
amount: string;
|
|
1287
|
-
}[]>;
|
|
1288
|
-
getPubKey: () => Promise<string>;
|
|
1289
|
-
getSignerFromPhrase: ({ phrase, derivationPath }: {
|
|
1290
|
-
phrase: string;
|
|
1291
|
-
derivationPath: import("@swapkit/helpers").DerivationPathArray;
|
|
1292
|
-
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
1293
|
-
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
1294
|
-
signTransaction: ({ recipient, assetValue, memo, feeRate, feeOptionKey, }: GenericTransferParams) => Promise<string>;
|
|
1295
1631
|
validateAddress: (address: string) => boolean;
|
|
1296
|
-
verifySignature: ({ signature, message, address, }: {
|
|
1297
|
-
signature: string;
|
|
1298
|
-
message: string;
|
|
1299
|
-
address: string;
|
|
1300
|
-
}) => Promise<boolean>;
|
|
1301
1632
|
};
|
|
1633
|
+
MAYA: ChainWallet<Chain.Maya> & import("@swapkit/toolboxes/cosmos").ThorchainWallet;
|
|
1302
1634
|
MEGAETH: ChainWallet<Chain.MegaETH> & {
|
|
1303
1635
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
1304
1636
|
approvedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<bigint>;
|
|
@@ -1324,9 +1656,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1324
1656
|
maxFeePerGas?: bigint;
|
|
1325
1657
|
maxPriorityFeePerGas?: bigint;
|
|
1326
1658
|
}; }>;
|
|
1327
|
-
estimateTransactionFee: ({ feeOption,
|
|
1659
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
1328
1660
|
feeOption: FeeOption;
|
|
1329
|
-
chain: EVMChain;
|
|
1330
1661
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1331
1662
|
getAddress: () => string | Promise<string> | undefined;
|
|
1332
1663
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -1335,9 +1666,15 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1335
1666
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
1336
1667
|
feeOptionKey?: FeeOption;
|
|
1337
1668
|
}) => Promise<string>;
|
|
1669
|
+
signAuthorization: ((params: {
|
|
1670
|
+
address: string;
|
|
1671
|
+
nonce?: number | bigint;
|
|
1672
|
+
chainId?: bigint;
|
|
1673
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
1338
1674
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
1675
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
1339
1676
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
1340
|
-
validateAddress: (
|
|
1677
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
1341
1678
|
};
|
|
1342
1679
|
MONAD: ChainWallet<Chain.Monad> & {
|
|
1343
1680
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
@@ -1364,9 +1701,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1364
1701
|
maxFeePerGas?: bigint;
|
|
1365
1702
|
maxPriorityFeePerGas?: bigint;
|
|
1366
1703
|
}; }>;
|
|
1367
|
-
estimateTransactionFee: ({ feeOption,
|
|
1704
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
1368
1705
|
feeOption: FeeOption;
|
|
1369
|
-
chain: EVMChain;
|
|
1370
1706
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1371
1707
|
getAddress: () => string | Promise<string> | undefined;
|
|
1372
1708
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -1375,33 +1711,40 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1375
1711
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
1376
1712
|
feeOptionKey?: FeeOption;
|
|
1377
1713
|
}) => Promise<string>;
|
|
1714
|
+
signAuthorization: ((params: {
|
|
1715
|
+
address: string;
|
|
1716
|
+
nonce?: number | bigint;
|
|
1717
|
+
chainId?: bigint;
|
|
1718
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
1378
1719
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
1720
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
1379
1721
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
1380
|
-
validateAddress: (
|
|
1722
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
1381
1723
|
};
|
|
1382
1724
|
NEAR: ChainWallet<Chain.Near> & {
|
|
1383
1725
|
broadcastTransaction: (signedTransaction: import("@near-js/transactions").SignedTransaction) => Promise<any>;
|
|
1384
|
-
callFunction: (params: import("@swapkit/toolboxes/near").NearFunctionCallParams) => Promise<string>;
|
|
1385
|
-
createAction: (params: import("@swapkit/toolboxes/near").CreateActionParams) => Promise<import("@near-js/transactions").Action>;
|
|
1386
|
-
createContract: <T_1 extends import("@near-js/accounts").Contract = import("@near-js/accounts").Contract>(contractInterface: import("@swapkit/toolboxes/near").NearContractInterface) => Promise<T_1>;
|
|
1387
|
-
createContractFunctionCall: (
|
|
1726
|
+
callFunction: (params: import("@swapkit/toolboxes/near/index").NearFunctionCallParams) => Promise<string>;
|
|
1727
|
+
createAction: (params: import("@swapkit/toolboxes/near/index").CreateActionParams) => Promise<import("@near-js/transactions").Action>;
|
|
1728
|
+
createContract: <T_1 extends import("@near-js/accounts").Contract = import("@near-js/accounts").Contract>(contractInterface: import("@swapkit/toolboxes/near/index").NearContractInterface) => Promise<T_1>;
|
|
1729
|
+
createContractFunctionCall: ({ args, attachedDeposit, contractId, gas, methodName, sender: accountId, }: import("@swapkit/toolboxes/near/index").ContractFunctionCallParams) => Promise<import("@near-js/transactions").Transaction>;
|
|
1388
1730
|
createSubAccount: (subAccountId: string, publicKey: string, initialBalance: string) => Promise<string>;
|
|
1389
|
-
createTransaction: (
|
|
1390
|
-
estimateGas: (params: import("@swapkit/toolboxes/near").NearGasEstimateParams, account?: import("@near-js/accounts").Account) => Promise<AssetValue>;
|
|
1391
|
-
|
|
1392
|
-
|
|
1731
|
+
createTransaction: ({ recipient, assetValue, memo, attachedDeposit, sender, functionCall, }: import("@swapkit/toolboxes/near/index").NearCreateTransactionParams) => Promise<import("@near-js/transactions").Transaction>;
|
|
1732
|
+
estimateGas: (params: import("@swapkit/toolboxes/near/index").NearGasEstimateParams, account?: import("@near-js/accounts").Account) => Promise<AssetValue>;
|
|
1733
|
+
estimateGasLimit: (params: import("@swapkit/toolboxes/near/index").NearGasEstimateParams, account?: import("@near-js/accounts").Account) => Promise<AssetValue>;
|
|
1734
|
+
estimateTransactionFee: (params: import("@swapkit/toolboxes/near/index").NearTransferParams | import("@swapkit/toolboxes/near/index").NearGasEstimateParams) => Promise<AssetValue>;
|
|
1735
|
+
executeBatchTransaction: (batch: import("@swapkit/toolboxes/near/index").BatchTransaction) => Promise<string>;
|
|
1393
1736
|
getAddress: () => Promise<string>;
|
|
1394
1737
|
getBalance: (address: string, scamFilter?: boolean) => Promise<AssetValue[]>;
|
|
1395
1738
|
getGasPrice: () => Promise<string>;
|
|
1739
|
+
getNearProvider: () => Promise<import("@near-js/providers").JsonRpcProvider>;
|
|
1396
1740
|
getPublicKey: () => Promise<string>;
|
|
1397
|
-
getSignerFromPhrase:
|
|
1398
|
-
getSignerFromPrivateKey: typeof import("@swapkit/toolboxes/near").getNearSignerFromPrivateKey;
|
|
1399
|
-
provider: import("@near-js/providers").JsonRpcProvider;
|
|
1741
|
+
getSignerFromPhrase: typeof import("@swapkit/toolboxes/near/index").getNearSignerFromPhrase;
|
|
1742
|
+
getSignerFromPrivateKey: typeof import("@swapkit/toolboxes/near/index").getNearSignerFromPrivateKey;
|
|
1400
1743
|
serializeTransaction: (transaction: import("@near-js/transactions").Transaction) => string;
|
|
1401
|
-
|
|
1744
|
+
signAndBroadcastTransaction: (transaction: import("@near-js/transactions").Transaction) => Promise<any>;
|
|
1402
1745
|
signTransaction: (transaction: import("@near-js/transactions").Transaction) => Promise<import("@near-js/transactions").SignedTransaction>;
|
|
1403
|
-
transfer: (params: import("@swapkit/toolboxes/near").NearTransferParams) => Promise<any>;
|
|
1404
|
-
validateAddress: (
|
|
1746
|
+
transfer: (params: import("@swapkit/toolboxes/near/index").NearTransferParams) => Promise<any>;
|
|
1747
|
+
validateAddress: typeof import("@swapkit/toolboxes/near/index").validateNearAddress;
|
|
1405
1748
|
};
|
|
1406
1749
|
NOBLE: ChainWallet<Chain.Noble> & {
|
|
1407
1750
|
createPrivateKeyFromPhrase: (phrase: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
@@ -1425,10 +1768,9 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1425
1768
|
derivationPath: import("@swapkit/helpers").DerivationPathArray;
|
|
1426
1769
|
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
1427
1770
|
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
}) => Promise<string>;
|
|
1771
|
+
signAndBroadcastTransaction: (transaction: import("@swapkit/helpers").CosmosTransaction) => Promise<string>;
|
|
1772
|
+
signTransaction: (transaction: import("@swapkit/helpers").CosmosTransaction) => Promise<import("cosmjs-types/cosmos/tx/v1beta1/tx").TxRaw>;
|
|
1773
|
+
transfer: ({ recipient, assetValue, memo, feeRate, feeOptionKey, }: GenericTransferParams) => Promise<string>;
|
|
1432
1774
|
validateAddress: (address: string) => boolean;
|
|
1433
1775
|
verifySignature: ({ signature, message, address, }: {
|
|
1434
1776
|
signature: string;
|
|
@@ -1437,7 +1779,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1437
1779
|
}) => Promise<boolean>;
|
|
1438
1780
|
};
|
|
1439
1781
|
OP: ChainWallet<Chain.Optimism> & {
|
|
1440
|
-
estimateGasPrices: Promise<{
|
|
1782
|
+
estimateGasPrices: () => Promise<{
|
|
1441
1783
|
average: {
|
|
1442
1784
|
l1GasPrice?: bigint;
|
|
1443
1785
|
gasPrice?: bigint;
|
|
@@ -1459,7 +1801,7 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1459
1801
|
}>;
|
|
1460
1802
|
estimateL1Gas: (tx: import("ethers").TransactionRequest) => Promise<any>;
|
|
1461
1803
|
estimateL1GasCost: (tx: import("ethers").TransactionRequest) => Promise<any>;
|
|
1462
|
-
estimateL2GasCost: (tx: import("ethers").TransactionRequest) => Promise<
|
|
1804
|
+
estimateL2GasCost: (tx: import("ethers").TransactionRequest) => Promise<bigint>;
|
|
1463
1805
|
estimateTotalGasCost: (tx: import("ethers").TransactionRequest) => Promise<any>;
|
|
1464
1806
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
1465
1807
|
getL1GasPrice: () => Promise<bigint | undefined>;
|
|
@@ -1481,9 +1823,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1481
1823
|
txOverrides?: import("@swapkit/toolboxes/evm").EVMTxParams;
|
|
1482
1824
|
data?: string;
|
|
1483
1825
|
}) => Promise<bigint>;
|
|
1484
|
-
estimateTransactionFee: ({ feeOption,
|
|
1826
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
1485
1827
|
feeOption: FeeOption;
|
|
1486
|
-
chain: import("@swapkit/types").EVMChain;
|
|
1487
1828
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1488
1829
|
getAddress: () => string | Promise<string> | undefined;
|
|
1489
1830
|
getNetworkParams: () => import("@swapkit/helpers").NetworkParams | undefined;
|
|
@@ -1491,30 +1832,36 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1491
1832
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
1492
1833
|
feeOptionKey?: FeeOption;
|
|
1493
1834
|
}) => Promise<string>;
|
|
1835
|
+
signAuthorization: ((params: {
|
|
1836
|
+
address: string;
|
|
1837
|
+
nonce?: number | bigint;
|
|
1838
|
+
chainId?: bigint;
|
|
1839
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
1494
1840
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
1841
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
1495
1842
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
1496
|
-
validateAddress: (
|
|
1843
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
1497
1844
|
};
|
|
1498
1845
|
DOT: ChainWallet<Chain.Polkadot> & {
|
|
1499
|
-
api: import("@polkadot/api").ApiPromise;
|
|
1500
1846
|
broadcast: (tx: import("@polkadot/api/types").SubmittableExtrinsic<"promise">, callback?: import("@polkadot/types/types").Callback<import("@polkadot/types/types").ISubmittableResult>) => Promise<string | (() => void)>;
|
|
1501
1847
|
convertAddress: (address: string, newPrefix: number) => string;
|
|
1502
1848
|
createKeyring: (phrase: string) => Promise<import("@polkadot/keyring/types").KeyringPair>;
|
|
1503
|
-
createTransaction: (params: import("@swapkit/helpers").GenericCreateTransactionParams) => import("@polkadot/api/types").SubmittableExtrinsic<"promise", import("@polkadot/types/types").ISubmittableResult> | undefined
|
|
1849
|
+
createTransaction: (params: import("@swapkit/helpers").GenericCreateTransactionParams) => Promise<import("@polkadot/api/types").SubmittableExtrinsic<"promise", import("@polkadot/types/types").ISubmittableResult> | undefined>;
|
|
1504
1850
|
decodeAddress: (address: string, networkPrefix?: number) => Uint8Array<ArrayBufferLike>;
|
|
1505
1851
|
encodeAddress: (address: Uint8Array, encoding?: "ss58" | "hex", networkPrefix?: number) => string;
|
|
1506
|
-
estimateTransactionFee: (params: import("@swapkit/toolboxes/substrate").SubstrateTransferParams) => Promise<AssetValue
|
|
1852
|
+
estimateTransactionFee: (params: import("@swapkit/toolboxes/substrate/index").SubstrateTransferParams) => Promise<AssetValue>;
|
|
1507
1853
|
gasAsset: AssetValue;
|
|
1508
|
-
getAddress: (keyring?: import("@polkadot/types/types").IKeyringPair | import("@polkadot/types/types").Signer) => string | undefined
|
|
1509
|
-
|
|
1510
|
-
|
|
1854
|
+
getAddress: (keyring?: import("@polkadot/types/types").IKeyringPair | import("@polkadot/types/types").Signer) => Promise<string | undefined>;
|
|
1855
|
+
getApi: () => Promise<import("@polkadot/api").ApiPromise>;
|
|
1856
|
+
getBalance: (targetAddress?: string) => Promise<AssetValue[]>;
|
|
1857
|
+
network: import("@swapkit/toolboxes/substrate/index").SubstrateNetwork;
|
|
1511
1858
|
sign: (tx: import("@polkadot/api/types").SubmittableExtrinsic<"promise">) => Promise<import("@polkadot/api/types").SubmittableExtrinsic<"promise", import("@polkadot/types/types").ISubmittableResult>>;
|
|
1512
1859
|
signAndBroadcast: ({ tx, callback, address, }: {
|
|
1513
1860
|
tx: import("@polkadot/api/types").SubmittableExtrinsic<"promise">;
|
|
1514
1861
|
callback?: import("@polkadot/types/types").Callback<import("@polkadot/types/types").ISubmittableResult>;
|
|
1515
1862
|
address?: string;
|
|
1516
|
-
}) =>
|
|
1517
|
-
transfer: (params: import("@swapkit/toolboxes/substrate").SubstrateTransferParams) => Promise<string>;
|
|
1863
|
+
}) => Promise<string | (() => void)>;
|
|
1864
|
+
transfer: (params: import("@swapkit/toolboxes/substrate/index").SubstrateTransferParams) => Promise<string>;
|
|
1518
1865
|
validateAddress: (address: string) => boolean;
|
|
1519
1866
|
};
|
|
1520
1867
|
POL: ChainWallet<Chain.Polygon> & {
|
|
@@ -1542,9 +1889,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1542
1889
|
maxFeePerGas?: bigint;
|
|
1543
1890
|
maxPriorityFeePerGas?: bigint;
|
|
1544
1891
|
}; }>;
|
|
1545
|
-
estimateTransactionFee: ({ feeOption,
|
|
1892
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
1546
1893
|
feeOption: FeeOption;
|
|
1547
|
-
chain: EVMChain;
|
|
1548
1894
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1549
1895
|
getAddress: () => string | Promise<string> | undefined;
|
|
1550
1896
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -1553,16 +1899,22 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1553
1899
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
1554
1900
|
feeOptionKey?: FeeOption;
|
|
1555
1901
|
}) => Promise<string>;
|
|
1902
|
+
signAuthorization: ((params: {
|
|
1903
|
+
address: string;
|
|
1904
|
+
nonce?: number | bigint;
|
|
1905
|
+
chainId?: bigint;
|
|
1906
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
1556
1907
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
1908
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
1557
1909
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
1558
|
-
validateAddress: (
|
|
1910
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
1559
1911
|
};
|
|
1560
1912
|
XRD: ChainWallet<Chain.Radix> & {
|
|
1561
1913
|
getAddress: () => string;
|
|
1562
1914
|
getBalance: (address: string) => Promise<AssetValue[]>;
|
|
1563
1915
|
networkApi: import("@radixdlt/babylon-gateway-api-sdk").GatewayApiClient;
|
|
1564
1916
|
signAndBroadcast: (params: any) => Promise<string>;
|
|
1565
|
-
validateAddress: typeof import("@swapkit/toolboxes/radix").
|
|
1917
|
+
validateAddress: typeof import("@swapkit/toolboxes/radix/index").validateRadixAddress;
|
|
1566
1918
|
};
|
|
1567
1919
|
XRP: ChainWallet<Chain.Ripple> & {
|
|
1568
1920
|
broadcastTransaction: (signedTxHex: string) => Promise<string>;
|
|
@@ -1570,20 +1922,27 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1570
1922
|
tx_blob: string;
|
|
1571
1923
|
hash: string;
|
|
1572
1924
|
}>;
|
|
1573
|
-
createTransaction: ({ assetValue, recipient, memo, sender, }: {
|
|
1925
|
+
createTransaction: ({ assetValue, recipient, memo, sender, destinationTag, extendBySeconds, }: {
|
|
1574
1926
|
assetValue: AssetValue;
|
|
1575
1927
|
recipient: string;
|
|
1576
1928
|
sender?: string;
|
|
1577
1929
|
memo?: string;
|
|
1930
|
+
destinationTag?: number;
|
|
1931
|
+
extendBySeconds?: number;
|
|
1578
1932
|
}) => Promise<import("xrpl").Payment>;
|
|
1579
|
-
disconnect: () =>
|
|
1933
|
+
disconnect: () => void;
|
|
1580
1934
|
estimateTransactionFee: () => Promise<AssetValue>;
|
|
1581
1935
|
getAddress: () => string | Promise<string>;
|
|
1582
|
-
getBalance: (
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1936
|
+
getBalance: (checkAddress?: string) => Promise<AssetValue[]>;
|
|
1937
|
+
getTrustLines: (address?: string) => Promise<import("@swapkit/toolboxes/ripple/index").TrustLineInfo[]>;
|
|
1938
|
+
hasTrustLine: ({ address, currency, issuer, }: {
|
|
1939
|
+
address?: string;
|
|
1940
|
+
currency: string;
|
|
1941
|
+
issuer: string;
|
|
1942
|
+
}) => Promise<boolean>;
|
|
1943
|
+
setTrustLine: ({ currency, issuer, limit, sender }: import("@swapkit/toolboxes/ripple/index").TrustLineParams) => Promise<import("xrpl").Transaction>;
|
|
1944
|
+
setTrustLineAndBroadcast: (params: import("@swapkit/toolboxes/ripple/index").TrustLineParams) => Promise<string>;
|
|
1945
|
+
signAndBroadcastTransaction: (tx: import("xrpl").Transaction) => Promise<string>;
|
|
1587
1946
|
signTransaction: (tx: import("xrpl").Transaction) => {
|
|
1588
1947
|
tx_blob: string;
|
|
1589
1948
|
hash: string;
|
|
@@ -1592,12 +1951,12 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1592
1951
|
hash: string;
|
|
1593
1952
|
}>;
|
|
1594
1953
|
transfer: (params: GenericTransferParams) => Promise<string>;
|
|
1595
|
-
validateAddress: typeof import("@swapkit/toolboxes/ripple").
|
|
1954
|
+
validateAddress: typeof import("@swapkit/toolboxes/ripple/index").validateRippleAddress;
|
|
1596
1955
|
};
|
|
1597
1956
|
SOL: ChainWallet<Chain.Solana> & {
|
|
1598
1957
|
broadcastTransaction: (transaction: import("@solana/web3.js/lib").Transaction | import("@solana/web3.js/lib").VersionedTransaction) => Promise<string>;
|
|
1599
|
-
createKeysForPath: typeof import("@swapkit/toolboxes/solana").createKeysForPath;
|
|
1600
|
-
createTransaction: ({ recipient, assetValue, memo, isProgramDerivedAddress, sender }: import("@swapkit/toolboxes/solana").SolanaCreateTransactionParams) => Promise<import("@solana/web3.js/lib").Transaction>;
|
|
1958
|
+
createKeysForPath: typeof import("@swapkit/toolboxes/solana/index").createKeysForPath;
|
|
1959
|
+
createTransaction: ({ recipient, assetValue, memo, isProgramDerivedAddress, sender }: import("@swapkit/toolboxes/solana/index").SolanaCreateTransactionParams) => Promise<import("@solana/web3.js/lib").Transaction>;
|
|
1601
1960
|
createTransactionFromInstructions: ({ instructions, }: {
|
|
1602
1961
|
instructions: import("@solana/web3.js/lib").TransactionInstruction[];
|
|
1603
1962
|
isProgramDerivedAddress?: boolean;
|
|
@@ -1605,14 +1964,16 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1605
1964
|
estimateTransactionFee: ({ recipient, assetValue, memo, isProgramDerivedAddress, sender, }: Omit<import("@swapkit/helpers").GenericCreateTransactionParams, "feeRate"> & {
|
|
1606
1965
|
isProgramDerivedAddress?: boolean;
|
|
1607
1966
|
}) => Promise<AssetValue>;
|
|
1608
|
-
getAddress: () => string
|
|
1967
|
+
getAddress: () => Promise<string>;
|
|
1609
1968
|
getAddressFromPubKey: (publicKey: import("@solana/web3.js/lib").PublicKey) => string;
|
|
1610
|
-
|
|
1611
|
-
|
|
1969
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<AssetValue[]>;
|
|
1970
|
+
getBalanceFromRPC: (address: string) => Promise<AssetValue[]>;
|
|
1612
1971
|
getConnection: () => Promise<import("@solana/web3.js/lib").Connection>;
|
|
1613
|
-
getPubkeyFromAddress: (address: string) =>
|
|
1972
|
+
getPubkeyFromAddress: (address: string) => import("@solana/web3.js/lib").PublicKey;
|
|
1973
|
+
signAndBroadcastTransaction: (transaction: import("@solana/web3.js/lib").Transaction | import("@solana/web3.js/lib").VersionedTransaction) => Promise<string>;
|
|
1614
1974
|
signTransaction: (transaction: import("@solana/web3.js/lib").Transaction | import("@solana/web3.js/lib").VersionedTransaction) => Promise<import("@solana/web3.js/lib").Transaction | import("@solana/web3.js/lib").VersionedTransaction>;
|
|
1615
|
-
transfer: ({ recipient, assetValue, memo, isProgramDerivedAddress }: import("@swapkit/toolboxes/solana").SolanaTransferParams) => Promise<string>;
|
|
1975
|
+
transfer: ({ recipient, assetValue, memo, isProgramDerivedAddress }: import("@swapkit/toolboxes/solana/index").SolanaTransferParams) => Promise<string>;
|
|
1976
|
+
validateAddress: typeof import("@swapkit/toolboxes/solana/index").validateSolanaAddress;
|
|
1616
1977
|
};
|
|
1617
1978
|
SONIC: ChainWallet<Chain.Sonic> & {
|
|
1618
1979
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
@@ -1639,9 +2000,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1639
2000
|
maxFeePerGas?: bigint;
|
|
1640
2001
|
maxPriorityFeePerGas?: bigint;
|
|
1641
2002
|
}; }>;
|
|
1642
|
-
estimateTransactionFee: ({ feeOption,
|
|
2003
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
1643
2004
|
feeOption: FeeOption;
|
|
1644
|
-
chain: EVMChain;
|
|
1645
2005
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1646
2006
|
getAddress: () => string | Promise<string> | undefined;
|
|
1647
2007
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -1650,198 +2010,109 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1650
2010
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
1651
2011
|
feeOptionKey?: FeeOption;
|
|
1652
2012
|
}) => Promise<string>;
|
|
2013
|
+
signAuthorization: ((params: {
|
|
2014
|
+
address: string;
|
|
2015
|
+
nonce?: number | bigint;
|
|
2016
|
+
chainId?: bigint;
|
|
2017
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
1653
2018
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
2019
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
1654
2020
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
1655
|
-
validateAddress: (
|
|
2021
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
2022
|
+
};
|
|
2023
|
+
XLM: ChainWallet<Chain.Stellar> & {
|
|
2024
|
+
broadcastTransaction: (signedTransaction: {
|
|
2025
|
+
toXDR: () => string;
|
|
2026
|
+
}) => Promise<string>;
|
|
2027
|
+
createTransaction: ({ recipient, assetValue, memo, sender }: import("@swapkit/toolboxes/stellar/index").StellarCreateTransactionParams) => Promise<import("@stellar/stellar-sdk").Transaction<import("@stellar/stellar-sdk").Memo<import("@stellar/stellar-sdk").MemoType>, import("@stellar/stellar-sdk").Operation[]>>;
|
|
2028
|
+
estimateTransactionFee: () => Promise<AssetValue>;
|
|
2029
|
+
getAddress: () => Promise<string>;
|
|
2030
|
+
getBalance: (checkAddress?: string) => Promise<AssetValue[]>;
|
|
2031
|
+
signAndBroadcastTransaction: (transaction: {
|
|
2032
|
+
toXDR: () => string;
|
|
2033
|
+
}) => Promise<string>;
|
|
2034
|
+
signTransaction: (transaction: {
|
|
2035
|
+
toXDR: () => string;
|
|
2036
|
+
}) => Promise<import("@stellar/stellar-sdk").Transaction<import("@stellar/stellar-sdk").Memo<import("@stellar/stellar-sdk").MemoType>, import("@stellar/stellar-sdk").Operation[]> | import("@stellar/stellar-sdk").FeeBumpTransaction>;
|
|
2037
|
+
transfer: ({ recipient, assetValue, memo }: import("@swapkit/toolboxes/stellar/index").StellarTransferParams) => Promise<string>;
|
|
2038
|
+
validateAddress: typeof import("@swapkit/toolboxes/stellar/index").validateStellarAddress;
|
|
2039
|
+
};
|
|
2040
|
+
STRK: ChainWallet<Chain.Starknet> & {
|
|
2041
|
+
broadcastTransaction: (calls: import("starknet").Call[]) => Promise<string>;
|
|
2042
|
+
createKeysForPath: typeof import("@swapkit/toolboxes/starknet/index").starknetCreateKeysForPath;
|
|
2043
|
+
createTransaction: ({ recipient, assetValue }: import("@swapkit/toolboxes/starknet/index").StarknetCreateTransactionParams) => Promise<import("starknet").Call[]>;
|
|
2044
|
+
deployAccount: () => Promise<string>;
|
|
2045
|
+
estimateTransactionFee: ({ recipient, assetValue, sender, }: import("@swapkit/toolboxes/starknet/index").StarknetTransferParams & {
|
|
2046
|
+
sender?: string;
|
|
2047
|
+
}) => Promise<AssetValue>;
|
|
2048
|
+
getAddress: () => Promise<string>;
|
|
2049
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<AssetValue[]>;
|
|
2050
|
+
getProvider: () => Promise<import("starknet").Provider>;
|
|
2051
|
+
isAccountDeployed: (address?: string) => Promise<boolean>;
|
|
2052
|
+
signAndBroadcastTransaction: (calls: import("starknet").Call[]) => Promise<string>;
|
|
2053
|
+
signMessage: (typedData: import("starknet").TypedData) => Promise<string[]>;
|
|
2054
|
+
transfer: ({ recipient, assetValue, memo }: import("@swapkit/toolboxes/starknet/index").StarknetTransferParams) => Promise<string>;
|
|
2055
|
+
validateAddress: typeof import("@swapkit/toolboxes/starknet/index").validateStarknetAddress;
|
|
1656
2056
|
};
|
|
1657
2057
|
SUI: ChainWallet<Chain.Sui> & {
|
|
1658
|
-
|
|
2058
|
+
broadcastTransaction: (signedTransaction: {
|
|
2059
|
+
bytes: string;
|
|
2060
|
+
signature: string;
|
|
2061
|
+
}) => Promise<string>;
|
|
2062
|
+
createTransaction: ({ recipient, assetValue, gasBudget, sender }: import("@swapkit/toolboxes/sui/index").SuiCreateTransactionParams) => Promise<{
|
|
1659
2063
|
tx: import("@mysten/sui/transactions").Transaction;
|
|
1660
2064
|
txBytes: Uint8Array<ArrayBuffer>;
|
|
1661
2065
|
}>;
|
|
1662
|
-
estimateTransactionFee: (params?: import("@swapkit/toolboxes/sui").SuiCreateTransactionParams) => Promise<AssetValue>;
|
|
1663
|
-
getAddress: () => string
|
|
2066
|
+
estimateTransactionFee: (params?: import("@swapkit/toolboxes/sui/index").SuiCreateTransactionParams) => Promise<AssetValue>;
|
|
2067
|
+
getAddress: () => Promise<string>;
|
|
1664
2068
|
getBalance: (targetAddress?: string) => Promise<AssetValue[]>;
|
|
1665
|
-
|
|
2069
|
+
signAndBroadcastTransaction: (transaction: import("@mysten/sui/transactions").Transaction | Uint8Array<ArrayBuffer> | string) => Promise<string>;
|
|
2070
|
+
signTransaction: (params: Uint8Array<ArrayBuffer> | import("@swapkit/toolboxes/sui/index").SuiCreateTransactionParams | Awaited<ReturnType<({ recipient, assetValue, gasBudget, sender }: import("@swapkit/toolboxes/sui/index").SuiCreateTransactionParams) => Promise<{
|
|
1666
2071
|
tx: import("@mysten/sui/transactions").Transaction;
|
|
1667
2072
|
txBytes: Uint8Array<ArrayBuffer>;
|
|
1668
|
-
}>>>) => Promise<
|
|
1669
|
-
|
|
1670
|
-
validateAddress: (address: string) => boolean;
|
|
1671
|
-
};
|
|
1672
|
-
THOR: ChainWallet<Chain.THORChain> & {
|
|
1673
|
-
broadcastMultisigTx: (tx: string, signers: import("@swapkit/toolboxes/cosmos").MultiSigSigner[], membersPubKeys: string[], threshold: number, bodyBytes: Uint8Array) => Promise<string>;
|
|
1674
|
-
buildAminoMsg: ({ sender, recipient, assetValue, memo, }: {
|
|
1675
|
-
sender: string;
|
|
1676
|
-
recipient?: string;
|
|
1677
|
-
assetValue: import("@swapkit/helpers").AssetValue;
|
|
1678
|
-
memo?: string;
|
|
1679
|
-
}) => {
|
|
1680
|
-
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
1681
|
-
value: {
|
|
1682
|
-
coins: {
|
|
1683
|
-
amount: string;
|
|
1684
|
-
asset: string;
|
|
1685
|
-
}[];
|
|
1686
|
-
memo: string;
|
|
1687
|
-
signer: string;
|
|
1688
|
-
};
|
|
1689
|
-
} | {
|
|
1690
|
-
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
1691
|
-
value: {
|
|
1692
|
-
amount: {
|
|
1693
|
-
amount: string;
|
|
1694
|
-
denom: string;
|
|
1695
|
-
}[];
|
|
1696
|
-
from_address: string;
|
|
1697
|
-
to_address: string | undefined;
|
|
1698
|
-
};
|
|
1699
|
-
};
|
|
1700
|
-
buildEncodedTxBody: typeof import("@swapkit/toolboxes/cosmos").buildEncodedTxBody;
|
|
1701
|
-
convertToSignable: (msg: {
|
|
1702
|
-
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
1703
|
-
value: {
|
|
1704
|
-
amount: {
|
|
1705
|
-
amount: string;
|
|
1706
|
-
denom: string;
|
|
1707
|
-
}[];
|
|
1708
|
-
from_address: string;
|
|
1709
|
-
to_address: string | undefined;
|
|
1710
|
-
};
|
|
1711
|
-
} | {
|
|
1712
|
-
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
1713
|
-
value: {
|
|
1714
|
-
coins: {
|
|
1715
|
-
amount: string;
|
|
1716
|
-
asset: string;
|
|
1717
|
-
}[];
|
|
1718
|
-
memo: string;
|
|
1719
|
-
signer: string;
|
|
1720
|
-
};
|
|
1721
|
-
}, chain: import("@swapkit/types").TCLikeChain) => Promise<import("@cosmjs/proto-signing").EncodeObject>;
|
|
1722
|
-
createDefaultAminoTypes: () => Promise<import("@cosmjs/stargate").AminoTypes>;
|
|
1723
|
-
createDefaultRegistry: typeof import("@swapkit/toolboxes/cosmos").createDefaultRegistry;
|
|
1724
|
-
createMultisig: (pubKeys: string[], threshold: number, noSortPubKeys?: boolean) => Promise<import("@cosmjs/amino").MultisigThresholdPubkey>;
|
|
1725
|
-
createTransaction: (params: import("@swapkit/toolboxes/cosmos").ThorchainCreateTransactionParams) => Promise<{
|
|
1726
|
-
accountNumber: number;
|
|
1727
|
-
chainId: import("@swapkit/types").ChainId.Maya | import("@swapkit/types").ChainId.THORChain;
|
|
1728
|
-
fee: {
|
|
1729
|
-
amount: {
|
|
1730
|
-
amount: string;
|
|
1731
|
-
denom: string;
|
|
1732
|
-
}[];
|
|
1733
|
-
gas: string;
|
|
1734
|
-
};
|
|
1735
|
-
memo: string;
|
|
1736
|
-
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
1737
|
-
type: "thorchain/MsgSend" | "mayachain/MsgSend";
|
|
1738
|
-
value: {
|
|
1739
|
-
amount: {
|
|
1740
|
-
amount: string;
|
|
1741
|
-
denom: string;
|
|
1742
|
-
}[];
|
|
1743
|
-
from_address: string;
|
|
1744
|
-
to_address: string | undefined;
|
|
1745
|
-
};
|
|
1746
|
-
})[];
|
|
1747
|
-
sequence: number;
|
|
1748
|
-
}> | Promise<{
|
|
1749
|
-
accountNumber: number;
|
|
1750
|
-
chainId: import("@swapkit/types").ChainId.Maya | import("@swapkit/types").ChainId.THORChain;
|
|
1751
|
-
fee: {
|
|
1752
|
-
amount: {
|
|
1753
|
-
amount: string;
|
|
1754
|
-
denom: string;
|
|
1755
|
-
}[];
|
|
1756
|
-
gas: string;
|
|
1757
|
-
};
|
|
1758
|
-
memo: string;
|
|
1759
|
-
msgs: (import("@cosmjs/proto-signing").EncodeObject | {
|
|
1760
|
-
type: "thorchain/MsgDeposit" | "mayachain/MsgDeposit";
|
|
1761
|
-
value: {
|
|
1762
|
-
coins: {
|
|
1763
|
-
amount: string;
|
|
1764
|
-
asset: string;
|
|
1765
|
-
}[];
|
|
1766
|
-
memo: string;
|
|
1767
|
-
signer: string;
|
|
1768
|
-
};
|
|
1769
|
-
})[];
|
|
1770
|
-
sequence: number;
|
|
1771
|
-
}>;
|
|
1772
|
-
deposit: ({ assetValue, memo, recipient, }: Omit<GenericTransferParams, "recipient"> & {
|
|
1773
|
-
recipient?: string;
|
|
1774
|
-
}) => Promise<string>;
|
|
1775
|
-
getFees: () => Promise<{
|
|
1776
|
-
average: import("@swapkit/helpers").SwapKitNumber;
|
|
1777
|
-
fast: import("@swapkit/helpers").SwapKitNumber;
|
|
1778
|
-
fastest: import("@swapkit/helpers").SwapKitNumber;
|
|
1779
|
-
}>;
|
|
1780
|
-
importSignature: (signature: string) => Uint8Array<ArrayBufferLike>;
|
|
1781
|
-
parseAminoMessageForDirectSigning: typeof import("@swapkit/toolboxes/cosmos").parseAminoMessageForDirectSigning;
|
|
1782
|
-
pubkeyToAddress: (pubkey: import("@cosmjs/amino").Pubkey) => Promise<string>;
|
|
1783
|
-
secp256k1HdWalletFromMnemonic: (mnemonic: string, index?: number) => Promise<import("@cosmjs/amino").Secp256k1HdWallet>;
|
|
1784
|
-
signMultisigTx: ({ wallet, tx }: {
|
|
1785
|
-
wallet: import("@cosmjs/amino").Secp256k1HdWallet;
|
|
1786
|
-
tx: string | import("@swapkit/toolboxes/cosmos").MultisigTx;
|
|
1787
|
-
}) => Promise<{
|
|
1788
|
-
bodyBytes: Uint8Array<ArrayBufferLike>;
|
|
1789
|
-
signature: string;
|
|
1790
|
-
}>;
|
|
1791
|
-
signWithPrivateKey: ({ privateKey, message }: {
|
|
1792
|
-
privateKey: Uint8Array;
|
|
1793
|
-
message: string;
|
|
1794
|
-
}) => Promise<string>;
|
|
1795
|
-
transfer: ({ assetValue, memo, recipient, }: Omit<GenericTransferParams, "recipient"> & {
|
|
1796
|
-
recipient?: string;
|
|
1797
|
-
}) => Promise<string>;
|
|
1798
|
-
createPrivateKeyFromPhrase: (phrase: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
1799
|
-
fetchFeeRateFromSwapKit: typeof import("@swapkit/toolboxes/cosmos").fetchFeeRateFromSwapKit;
|
|
1800
|
-
getAccount: (address: string) => Promise<import("@cosmjs/stargate").Account | null>;
|
|
1801
|
-
getAddress: () => Promise<string | undefined>;
|
|
1802
|
-
getBalance: (address: string, _potentialScamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
1803
|
-
getBalanceAsDenoms: (address: string) => Promise<{
|
|
1804
|
-
denom: string;
|
|
1805
|
-
amount: string;
|
|
1806
|
-
}[]>;
|
|
1807
|
-
getPubKey: () => Promise<string>;
|
|
1808
|
-
getSignerFromPhrase: ({ phrase, derivationPath }: {
|
|
1809
|
-
phrase: string;
|
|
1810
|
-
derivationPath: import("@swapkit/helpers").DerivationPathArray;
|
|
1811
|
-
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
1812
|
-
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
1813
|
-
signTransaction: ({ recipient, assetValue, memo, feeRate, feeOptionKey, }: GenericTransferParams) => Promise<string>;
|
|
1814
|
-
validateAddress: (address: string) => boolean;
|
|
1815
|
-
verifySignature: ({ signature, message, address, }: {
|
|
2073
|
+
}>>>) => Promise<{
|
|
2074
|
+
bytes: string;
|
|
1816
2075
|
signature: string;
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
2076
|
+
} | import("@mysten/sui/cryptography").SignatureWithBytes>;
|
|
2077
|
+
transfer: ({ assetValue, gasBudget, recipient }: import("@swapkit/toolboxes/sui/index").SuiTransferParams) => Promise<string>;
|
|
2078
|
+
validateAddress: typeof import("@swapkit/toolboxes/sui/index").validateSuiAddress;
|
|
1820
2079
|
};
|
|
2080
|
+
THOR: ChainWallet<Chain.THORChain> & import("@swapkit/toolboxes/cosmos").ThorchainWallet;
|
|
1821
2081
|
TON: ChainWallet<Chain.Ton> & {
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
2082
|
+
broadcastTransaction: (transferCell: import("@ton/ton/dist").Cell) => Promise<string>;
|
|
2083
|
+
createTransaction: ({ sender, ...params }: GenericTransferParams & {
|
|
2084
|
+
sender?: string;
|
|
2085
|
+
}) => Promise<import("@swapkit/toolboxes/ton/index").TONTransactionMessage[]>;
|
|
2086
|
+
estimateTransactionFee: ({ sender, ...params }: GenericTransferParams & {
|
|
2087
|
+
sender?: string;
|
|
2088
|
+
}) => Promise<AssetValue>;
|
|
2089
|
+
getAddress: () => Promise<string>;
|
|
2090
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<AssetValue[]>;
|
|
2091
|
+
getJettonWalletAddress: ({ jettonMasterAddress, ownerAddress, }: {
|
|
2092
|
+
jettonMasterAddress: string;
|
|
2093
|
+
ownerAddress: string;
|
|
2094
|
+
}) => Promise<import("@ton/ton/dist").Address>;
|
|
2095
|
+
sign: (messages: import("@swapkit/toolboxes/ton/index").TONTransactionMessage[]) => Promise<import("@ton/ton/dist").Cell>;
|
|
2096
|
+
signAndBroadcastTransaction: (messages: import("@swapkit/toolboxes/ton/index").TONTransactionMessage[]) => Promise<string>;
|
|
2097
|
+
transfer: ({ assetValue, recipient, memo }: GenericTransferParams) => Promise<string>;
|
|
2098
|
+
validateAddress: typeof import("@swapkit/toolboxes/ton/index").validateTonAddress;
|
|
1829
2099
|
};
|
|
1830
2100
|
TRON: ChainWallet<Chain.Tron> & {
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
transfer: (params: import("@swapkit/toolboxes/tron").TronTransferParams) => Promise<string>;
|
|
1836
|
-
estimateTransactionFee: (params: import("@swapkit/toolboxes/tron").TronTransferParams & {
|
|
2101
|
+
approve: ({ assetAddress, spenderAddress, amount, from }: import("@swapkit/toolboxes/tron/index").TronApproveParams) => Promise<string>;
|
|
2102
|
+
broadcastTransaction: typeof import("node_modules/@swapkit/toolboxes/dist/types/tron/helpers/trongrid").broadcastTronTransaction;
|
|
2103
|
+
createTransaction: ({ recipient, assetValue, memo, sender, expiration }: import("@swapkit/toolboxes/tron/index").TronCreateTransactionParams) => Promise<import("@swapkit/toolboxes/tron/index").TronTransaction>;
|
|
2104
|
+
estimateTransactionFee: ({ assetValue, recipient, sender }: import("@swapkit/toolboxes/tron/index").TronTransferParams & {
|
|
1837
2105
|
sender?: string;
|
|
1838
2106
|
}) => Promise<AssetValue>;
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
isApproved: (
|
|
1844
|
-
|
|
2107
|
+
getAddress: () => Promise<string>;
|
|
2108
|
+
getApprovedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/tron/index").TronApprovedParams) => Promise<bigint>;
|
|
2109
|
+
getBalance: (address: string) => Promise<AssetValue[]>;
|
|
2110
|
+
getRpcUrl: () => Promise<string>;
|
|
2111
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount }: import("@swapkit/toolboxes/tron/index").TronIsApprovedParams) => Promise<boolean>;
|
|
2112
|
+
signAndBroadcastTransaction: (transaction: import("@swapkit/toolboxes/tron/index").TronTransaction) => Promise<string>;
|
|
2113
|
+
signTransaction: (transaction: import("@swapkit/toolboxes/tron/index").TronTransaction) => Promise<import("@swapkit/toolboxes/tron/index").TronSignedTransaction>;
|
|
2114
|
+
transfer: ({ recipient, assetValue, memo, expiration }: import("@swapkit/toolboxes/tron/index").TronTransferParams) => Promise<string>;
|
|
2115
|
+
validateAddress: typeof import("node_modules/@swapkit/toolboxes/dist/types/tron/helpers/utils").isValidTronAddress;
|
|
1845
2116
|
};
|
|
1846
2117
|
UNI: ChainWallet<Chain.Unichain> & {
|
|
1847
2118
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
@@ -1868,9 +2139,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1868
2139
|
maxFeePerGas?: bigint;
|
|
1869
2140
|
maxPriorityFeePerGas?: bigint;
|
|
1870
2141
|
}; }>;
|
|
1871
|
-
estimateTransactionFee: ({ feeOption,
|
|
2142
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
1872
2143
|
feeOption: FeeOption;
|
|
1873
|
-
chain: EVMChain;
|
|
1874
2144
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1875
2145
|
getAddress: () => string | Promise<string> | undefined;
|
|
1876
2146
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -1879,9 +2149,15 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1879
2149
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
1880
2150
|
feeOptionKey?: FeeOption;
|
|
1881
2151
|
}) => Promise<string>;
|
|
2152
|
+
signAuthorization: ((params: {
|
|
2153
|
+
address: string;
|
|
2154
|
+
nonce?: number | bigint;
|
|
2155
|
+
chainId?: bigint;
|
|
2156
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
1882
2157
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
2158
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
1883
2159
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
1884
|
-
validateAddress: (
|
|
2160
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
1885
2161
|
};
|
|
1886
2162
|
XLAYER: ChainWallet<Chain.XLayer> & {
|
|
1887
2163
|
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
@@ -1908,9 +2184,8 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1908
2184
|
maxFeePerGas?: bigint;
|
|
1909
2185
|
maxPriorityFeePerGas?: bigint;
|
|
1910
2186
|
}; }>;
|
|
1911
|
-
estimateTransactionFee: ({ feeOption,
|
|
2187
|
+
estimateTransactionFee: ({ feeOption, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
1912
2188
|
feeOption: FeeOption;
|
|
1913
|
-
chain: EVMChain;
|
|
1914
2189
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1915
2190
|
getAddress: () => string | Promise<string> | undefined;
|
|
1916
2191
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
@@ -1919,35 +2194,59 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1919
2194
|
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
1920
2195
|
feeOptionKey?: FeeOption;
|
|
1921
2196
|
}) => Promise<string>;
|
|
2197
|
+
signAuthorization: ((params: {
|
|
2198
|
+
address: string;
|
|
2199
|
+
nonce?: number | bigint;
|
|
2200
|
+
chainId?: bigint;
|
|
2201
|
+
}) => Promise<import("ethers").Authorization>) | undefined;
|
|
1922
2202
|
signMessage: ((message: string | Uint8Array) => Promise<string>) | undefined;
|
|
2203
|
+
signTypedData: (({ domain, types, value }: import("@swapkit/toolboxes/evm").SignTypedDataParams) => Promise<string>) | undefined;
|
|
1923
2204
|
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
1924
|
-
validateAddress: (
|
|
2205
|
+
validateAddress: typeof import("@swapkit/toolboxes/evm").validateEVMAddress;
|
|
1925
2206
|
};
|
|
1926
2207
|
ZEC: ChainWallet<Chain.Zcash> & {
|
|
1927
2208
|
createKeysForPath: ({ phrase, derivationPath, }: {
|
|
1928
2209
|
phrase: string;
|
|
1929
2210
|
derivationPath?: string;
|
|
1930
|
-
}) =>
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
2211
|
+
}) => {
|
|
2212
|
+
privateKey: Uint8Array<ArrayBufferLike>;
|
|
2213
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
2214
|
+
};
|
|
2215
|
+
createTransaction: (buildTxParams: import("@swapkit/toolboxes/utxo/index").UTXOBuildTxParams) => Promise<{
|
|
2216
|
+
inputs: import("@swapkit/toolboxes/utxo/index").UTXOType[];
|
|
2217
|
+
outputs: import("@swapkit/toolboxes/utxo/index").TargetOutput[];
|
|
2218
|
+
tx: import("@swapkit/utxo-signer").ZcashTransaction;
|
|
1935
2219
|
}>;
|
|
1936
2220
|
getPrivateKeyFromMnemonic: ({ phrase, derivationPath, }: {
|
|
1937
2221
|
phrase: string;
|
|
1938
2222
|
derivationPath: string;
|
|
1939
2223
|
}) => string;
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
2224
|
+
signAndBroadcastTransaction: (tx: import("@swapkit/utxo-signer").ZcashTransaction | import("@swapkit/utxo-signer").PCZT) => Promise<string>;
|
|
2225
|
+
signTransaction: (tx: import("@swapkit/utxo-signer").ZcashTransaction | import("@swapkit/utxo-signer").PCZT) => Promise<import("@swapkit/utxo-signer").ZcashTransaction>;
|
|
2226
|
+
transfer: ({ recipient, assetValue, feeOptionKey, ...rest }: import("@swapkit/toolboxes/utxo/index").UTXOTransferParams) => Promise<string>;
|
|
2227
|
+
validateAddress: typeof import("@swapkit/toolboxes/utxo/index").validateZcashAddress;
|
|
2228
|
+
accumulative: typeof import("@swapkit/toolboxes/utxo/index").accumulative;
|
|
1943
2229
|
broadcastTx: (txHash: string) => Promise<string>;
|
|
1944
|
-
|
|
2230
|
+
bumpFee: ({ txid, newFeeRate, recipient, memo }: import("@swapkit/toolboxes/utxo/index").RBFTransactionParams) => Promise<{
|
|
2231
|
+
newFee: number;
|
|
2232
|
+
originalFee: number;
|
|
2233
|
+
txid: string;
|
|
2234
|
+
}>;
|
|
2235
|
+
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo/index").UTXOCalculateTxSizeParams) => number;
|
|
2236
|
+
createReplacementTransaction: ({ txid, newFeeRate, recipient, memo, }: import("@swapkit/toolboxes/utxo/index").RBFTransactionParams) => Promise<import("node_modules/@swapkit/toolboxes/dist/types/utxo/toolbox/utxo").ReplacementTransactionResult>;
|
|
2237
|
+
deriveAddressAtIndex: ({ index, change }: import("@swapkit/toolboxes/utxo/index").DeriveAddressParams) => {
|
|
2238
|
+
address: string;
|
|
2239
|
+
change: boolean;
|
|
2240
|
+
index: number;
|
|
2241
|
+
pubkey: string;
|
|
2242
|
+
} | undefined;
|
|
2243
|
+
derivePrivateKeyAtIndex: ({ index, change }: import("@swapkit/toolboxes/utxo/index").DeriveAddressParams) => Uint8Array<ArrayBufferLike> | undefined;
|
|
1945
2244
|
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
1946
2245
|
from: string;
|
|
1947
2246
|
memo?: string;
|
|
1948
2247
|
feeRate?: number;
|
|
1949
2248
|
feeOptionKey?: FeeOption;
|
|
1950
|
-
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
2249
|
+
recipients?: number | import("@swapkit/toolboxes/utxo/index").TargetOutput[];
|
|
1951
2250
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1952
2251
|
estimateTransactionFee: (params: {
|
|
1953
2252
|
assetValue: import("@swapkit/helpers").AssetValue;
|
|
@@ -1958,26 +2257,62 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1958
2257
|
feeRate?: number;
|
|
1959
2258
|
fetchTxHex?: boolean;
|
|
1960
2259
|
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
1961
|
-
getAddress: () => Promise<string | undefined>;
|
|
1962
|
-
getAddressFromKeys: (keys:
|
|
2260
|
+
getAddress: () => string | Promise<string> | Promise<undefined>;
|
|
2261
|
+
getAddressFromKeys: (keys: {
|
|
2262
|
+
publicKey: Uint8Array;
|
|
2263
|
+
}) => string;
|
|
1963
2264
|
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
2265
|
+
getExtendedPublicKey: () => string | undefined;
|
|
1964
2266
|
getFeeRates: () => Promise<{
|
|
1965
2267
|
average: number;
|
|
1966
2268
|
fast: number;
|
|
1967
2269
|
fastest: number;
|
|
1968
2270
|
}>;
|
|
1969
|
-
getInputsOutputsFee: ({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<import("@swapkit/toolboxes/utxo").UTXOBuildTxParams, "feeRate"> & {
|
|
2271
|
+
getInputsOutputsFee: ({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<import("@swapkit/toolboxes/utxo/index").UTXOBuildTxParams, "feeRate"> & {
|
|
1970
2272
|
feeOptionKey?: FeeOption;
|
|
1971
2273
|
feeRate?: number;
|
|
1972
2274
|
}) => Promise<{
|
|
1973
2275
|
fee: number;
|
|
1974
|
-
inputs:
|
|
1975
|
-
|
|
2276
|
+
inputs: {
|
|
2277
|
+
address: string;
|
|
2278
|
+
hash: string;
|
|
2279
|
+
index: number;
|
|
2280
|
+
txHex: string | undefined;
|
|
2281
|
+
value: number;
|
|
2282
|
+
witnessUtxo: {
|
|
2283
|
+
script: Buffer<ArrayBuffer>;
|
|
2284
|
+
value: number;
|
|
2285
|
+
};
|
|
2286
|
+
}[];
|
|
2287
|
+
outputs: import("@swapkit/toolboxes/utxo/index").TargetOutput[];
|
|
1976
2288
|
} | {
|
|
1977
2289
|
fee: number;
|
|
1978
2290
|
inputs?: undefined;
|
|
1979
2291
|
outputs?: undefined;
|
|
1980
2292
|
}>;
|
|
2293
|
+
getNetworkForChain: () => import("@swapkit/utxo-signer").BTCNetwork;
|
|
2294
|
+
isRBFEnabled: (txid: string) => Promise<import("node_modules/@swapkit/toolboxes/dist/types/utxo/toolbox/utxo").RBFStatusResult>;
|
|
2295
|
+
keys: {
|
|
2296
|
+
privateKey: import("@swapkit/utxo-signer/utils").Bytes;
|
|
2297
|
+
publicKey: Uint8Array<ArrayBufferLike>;
|
|
2298
|
+
} | undefined;
|
|
2299
|
+
resolveDerivationIndex: ({ address, gapLimit }: import("@swapkit/toolboxes/utxo/index").ResolveDerivationParams) => {
|
|
2300
|
+
change: boolean;
|
|
2301
|
+
index: number;
|
|
2302
|
+
} | undefined;
|
|
2303
|
+
signTransactionWithMultipleKeys: ({ tx, inputDerivations, }: {
|
|
2304
|
+
tx: InstanceType<typeof import("@swapkit/utxo-signer").Transaction>;
|
|
2305
|
+
inputDerivations: import("@swapkit/toolboxes/utxo/index").InputDerivation[];
|
|
2306
|
+
}) => import("@swapkit/utxo-signer").Transaction;
|
|
2307
|
+
transferFromMultipleAddresses: ({ utxos, recipient, assetValue, memo, feeRate, feeOptionKey, changeAddress, }: {
|
|
2308
|
+
utxos: import("@swapkit/toolboxes").UTXOForMultiAddressTransfer[];
|
|
2309
|
+
recipient: string;
|
|
2310
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
2311
|
+
memo?: string;
|
|
2312
|
+
feeRate?: number;
|
|
2313
|
+
feeOptionKey?: FeeOption;
|
|
2314
|
+
changeAddress?: string;
|
|
2315
|
+
}) => Promise<string>;
|
|
1981
2316
|
};
|
|
1982
2317
|
};
|
|
1983
2318
|
getBalance: <T_1 extends Chain, R extends boolean>(chain: T_1, refresh?: R) => ConditionalAssetValueReturn<R>;
|
|
@@ -1988,8 +2323,19 @@ export declare function SwapKit<Plugins extends ReturnType<typeof createPlugin>,
|
|
|
1988
2323
|
chain: Chain;
|
|
1989
2324
|
message: string;
|
|
1990
2325
|
}) => Promise<string> | undefined;
|
|
2326
|
+
signTypedData: ({ chain, domain, primaryType, types, value, }: {
|
|
2327
|
+
chain: Chain;
|
|
2328
|
+
domain: Record<string, unknown>;
|
|
2329
|
+
primaryType?: string;
|
|
2330
|
+
types: Record<string, TypedDataField[]>;
|
|
2331
|
+
value: Record<string, unknown>;
|
|
2332
|
+
}) => Promise<string>;
|
|
1991
2333
|
swap: <T_1 extends keyof Plugins>({ route, pluginName, ...rest }: SwapParams<T_1, QuoteResponseRoute>) => any;
|
|
1992
2334
|
transfer: ({ assetValue, ...params }: GenericTransferParams | EVMTransferParams) => Promise<string>;
|
|
2335
|
+
validateAddress: ({ address, chain }: {
|
|
2336
|
+
address: string;
|
|
2337
|
+
chain: Chain;
|
|
2338
|
+
}) => Promise<boolean>;
|
|
1993
2339
|
verifyMessage: ({ address, chain, message, signature, }: {
|
|
1994
2340
|
chain: Chain;
|
|
1995
2341
|
signature: string;
|