@swapkit/toolboxes 4.0.0-beta.50 → 4.0.0-beta.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/cosmos/index.cjs +2 -2
- package/dist/src/cosmos/index.cjs.map +10 -6
- package/dist/src/cosmos/index.js +2 -2
- package/dist/src/cosmos/index.js.map +10 -6
- package/dist/src/evm/index.cjs +2 -2
- package/dist/src/evm/index.cjs.map +10 -8
- package/dist/src/evm/index.js +2 -2
- package/dist/src/evm/index.js.map +10 -8
- package/dist/src/index.cjs +4 -2
- package/dist/src/index.cjs.map +54 -4
- package/dist/src/index.js +4 -2
- package/dist/src/index.js.map +54 -4
- package/dist/src/near/index.cjs +2 -2
- package/dist/src/near/index.cjs.map +7 -5
- package/dist/src/near/index.js +2 -2
- package/dist/src/near/index.js.map +7 -5
- package/dist/src/radix/index.cjs +2 -2
- package/dist/src/radix/index.cjs.map +2 -2
- package/dist/src/radix/index.js +2 -2
- package/dist/src/radix/index.js.map +2 -2
- package/dist/src/ripple/index.cjs +2 -2
- package/dist/src/ripple/index.cjs.map +2 -2
- package/dist/src/ripple/index.js +2 -2
- package/dist/src/ripple/index.js.map +2 -2
- package/dist/src/solana/index.cjs +2 -2
- package/dist/src/solana/index.cjs.map +5 -4
- package/dist/src/solana/index.js +2 -2
- package/dist/src/solana/index.js.map +5 -4
- package/dist/src/substrate/index.cjs +2 -2
- package/dist/src/substrate/index.cjs.map +6 -5
- package/dist/src/substrate/index.js +2 -2
- package/dist/src/substrate/index.js.map +6 -5
- package/dist/src/tron/index.cjs +2 -2
- package/dist/src/tron/index.cjs.map +6 -5
- package/dist/src/tron/index.js +2 -2
- package/dist/src/tron/index.js.map +6 -5
- package/dist/src/utxo/index.cjs +4 -4
- package/dist/src/utxo/index.cjs.map +10 -7
- package/dist/src/utxo/index.js +4 -4
- package/dist/src/utxo/index.js.map +10 -7
- package/{src/cosmos/index.ts → dist/types/cosmos/index.d.ts} +1 -0
- package/dist/types/cosmos/index.d.ts.map +1 -0
- package/dist/types/cosmos/thorchainUtils/addressFormat.d.ts +5 -0
- package/dist/types/cosmos/thorchainUtils/addressFormat.d.ts.map +1 -0
- package/{src/cosmos/thorchainUtils/index.ts → dist/types/cosmos/thorchainUtils/index.d.ts} +1 -0
- package/dist/types/cosmos/thorchainUtils/index.d.ts.map +1 -0
- package/dist/types/cosmos/thorchainUtils/messages.d.ts +208 -0
- package/dist/types/cosmos/thorchainUtils/messages.d.ts.map +1 -0
- package/dist/types/cosmos/thorchainUtils/registry.d.ts +4 -0
- package/dist/types/cosmos/thorchainUtils/registry.d.ts.map +1 -0
- package/dist/types/cosmos/thorchainUtils/types/MsgCompiled.d.ts +2 -0
- package/dist/types/cosmos/thorchainUtils/types/MsgCompiled.d.ts.map +1 -0
- package/dist/types/cosmos/thorchainUtils/types/client-types.d.ts +66 -0
- package/dist/types/cosmos/thorchainUtils/types/client-types.d.ts.map +1 -0
- package/dist/types/cosmos/thorchainUtils/types/index.d.ts +2 -0
- package/dist/types/cosmos/thorchainUtils/types/index.d.ts.map +1 -0
- package/dist/types/cosmos/toolbox/cosmos.d.ts +93 -0
- package/dist/types/cosmos/toolbox/cosmos.d.ts.map +1 -0
- package/dist/types/cosmos/toolbox/index.d.ts +14 -0
- package/dist/types/cosmos/toolbox/index.d.ts.map +1 -0
- package/dist/types/cosmos/toolbox/thorchain.d.ts +158 -0
- package/dist/types/cosmos/toolbox/thorchain.d.ts.map +1 -0
- package/{src/cosmos/types.ts → dist/types/cosmos/types.d.ts} +24 -29
- package/dist/types/cosmos/types.d.ts.map +1 -0
- package/dist/types/cosmos/util.d.ts +68 -0
- package/dist/types/cosmos/util.d.ts.map +1 -0
- package/dist/types/evm/api.d.ts +8 -0
- package/dist/types/evm/api.d.ts.map +1 -0
- package/dist/types/evm/contracts/eth/multicall.d.ts +36 -0
- package/dist/types/evm/contracts/eth/multicall.d.ts.map +1 -0
- package/dist/types/evm/contracts/op/gasOracle.d.ts +40 -0
- package/dist/types/evm/contracts/op/gasOracle.d.ts.map +1 -0
- package/dist/types/evm/helpers.d.ts +20 -0
- package/dist/types/evm/helpers.d.ts.map +1 -0
- package/{src/evm/index.ts → dist/types/evm/index.d.ts} +1 -0
- package/dist/types/evm/index.d.ts.map +1 -0
- package/dist/types/evm/toolbox/baseEVMToolbox.d.ts +82 -0
- package/dist/types/evm/toolbox/baseEVMToolbox.d.ts.map +1 -0
- package/dist/types/evm/toolbox/evm.d.ts +367 -0
- package/dist/types/evm/toolbox/evm.d.ts.map +1 -0
- package/dist/types/evm/toolbox/index.d.ts +89 -0
- package/dist/types/evm/toolbox/index.d.ts.map +1 -0
- package/dist/types/evm/toolbox/op.d.ts +62 -0
- package/dist/types/evm/toolbox/op.d.ts.map +1 -0
- package/dist/types/evm/types.d.ts +98 -0
- package/dist/types/evm/types.d.ts.map +1 -0
- package/dist/types/index.d.ts +63 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/near/helpers/core.d.ts +15 -0
- package/dist/types/near/helpers/core.d.ts.map +1 -0
- package/dist/types/near/helpers/gasEstimation.d.ts +41 -0
- package/dist/types/near/helpers/gasEstimation.d.ts.map +1 -0
- package/dist/types/near/helpers/nep141.d.ts +72 -0
- package/dist/types/near/helpers/nep141.d.ts.map +1 -0
- package/dist/types/near/index.d.ts +10 -0
- package/dist/types/near/index.d.ts.map +1 -0
- package/dist/types/near/toolbox.d.ts +4 -0
- package/dist/types/near/toolbox.d.ts.map +1 -0
- package/dist/types/near/types/contract.d.ts +38 -0
- package/dist/types/near/types/contract.d.ts.map +1 -0
- package/dist/types/near/types/nep141.d.ts +56 -0
- package/dist/types/near/types/nep141.d.ts.map +1 -0
- package/dist/types/near/types/toolbox.d.ts +57 -0
- package/dist/types/near/types/toolbox.d.ts.map +1 -0
- package/dist/types/near/types.d.ts +44 -0
- package/dist/types/near/types.d.ts.map +1 -0
- package/dist/types/radix/index.d.ts +14 -0
- package/dist/types/radix/index.d.ts.map +1 -0
- package/dist/types/ripple/index.d.ts +43 -0
- package/dist/types/ripple/index.d.ts.map +1 -0
- package/dist/types/solana/index.d.ts +37 -0
- package/dist/types/solana/index.d.ts.map +1 -0
- package/dist/types/solana/toolbox.d.ts +41 -0
- package/dist/types/solana/toolbox.d.ts.map +1 -0
- package/dist/types/substrate/balance.d.ts +17 -0
- package/dist/types/substrate/balance.d.ts.map +1 -0
- package/{src/substrate/index.ts → dist/types/substrate/index.d.ts} +1 -0
- package/dist/types/substrate/index.d.ts.map +1 -0
- package/dist/types/substrate/substrate.d.ts +148 -0
- package/dist/types/substrate/substrate.d.ts.map +1 -0
- package/dist/types/substrate/types.d.ts +100 -0
- package/dist/types/substrate/types.d.ts.map +1 -0
- package/dist/types/tron/helpers/trc20.abi.d.ts +156 -0
- package/dist/types/tron/helpers/trc20.abi.d.ts.map +1 -0
- package/dist/types/tron/helpers/trongrid.d.ts +8 -0
- package/dist/types/tron/helpers/trongrid.d.ts.map +1 -0
- package/dist/types/tron/index.d.ts +6 -0
- package/dist/types/tron/index.d.ts.map +1 -0
- package/dist/types/tron/toolbox.d.ts +26 -0
- package/dist/types/tron/toolbox.d.ts.map +1 -0
- package/dist/types/tron/types.d.ts +101 -0
- package/dist/types/tron/types.d.ts.map +1 -0
- package/dist/types/types.d.ts +18 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types/utils.d.ts +4 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/dist/types/utxo/helpers/api.d.ts +133 -0
- package/dist/types/utxo/helpers/api.d.ts.map +1 -0
- package/dist/types/utxo/helpers/bchaddrjs.d.ts +10 -0
- package/dist/types/utxo/helpers/bchaddrjs.d.ts.map +1 -0
- package/dist/types/utxo/helpers/coinselect.d.ts +16 -0
- package/dist/types/utxo/helpers/coinselect.d.ts.map +1 -0
- package/{src/utxo/helpers/index.ts → dist/types/utxo/helpers/index.d.ts} +1 -0
- package/dist/types/utxo/helpers/index.d.ts.map +1 -0
- package/dist/types/utxo/helpers/txSize.d.ts +21 -0
- package/dist/types/utxo/helpers/txSize.d.ts.map +1 -0
- package/{src/utxo/index.ts → dist/types/utxo/index.d.ts} +1 -0
- package/dist/types/utxo/index.d.ts.map +1 -0
- package/dist/types/utxo/toolbox/bitcoinCash.d.ts +104 -0
- package/dist/types/utxo/toolbox/bitcoinCash.d.ts.map +1 -0
- package/dist/types/utxo/toolbox/index.d.ts +50 -0
- package/dist/types/utxo/toolbox/index.d.ts.map +1 -0
- package/dist/types/utxo/toolbox/utxo.d.ts +102 -0
- package/dist/types/utxo/toolbox/utxo.d.ts.map +1 -0
- package/dist/types/utxo/toolbox/zcash.d.ts +83 -0
- package/dist/types/utxo/toolbox/zcash.d.ts.map +1 -0
- package/dist/types/utxo/types.d.ts +46 -0
- package/dist/types/utxo/types.d.ts.map +1 -0
- package/package.json +15 -18
- package/dist/chunk-0h4xdrwz.js +0 -5
- package/dist/chunk-0h4xdrwz.js.map +0 -10
- package/dist/chunk-4yap1fvd.js +0 -4
- package/dist/chunk-4yap1fvd.js.map +0 -10
- package/dist/chunk-9bqegm61.js +0 -4
- package/dist/chunk-9bqegm61.js.map +0 -10
- package/dist/chunk-fazw0jvt.js +0 -4
- package/dist/chunk-fazw0jvt.js.map +0 -9
- package/dist/chunk-fjfxga2v.js +0 -4
- package/dist/chunk-fjfxga2v.js.map +0 -10
- package/dist/chunk-s47y8512.js +0 -5
- package/dist/chunk-s47y8512.js.map +0 -9
- package/dist/chunk-vtd17cje.js +0 -4
- package/dist/chunk-vtd17cje.js.map +0 -10
- package/dist/chunk-zcdeg6h9.js +0 -5
- package/dist/chunk-zcdeg6h9.js.map +0 -10
- package/src/cosmos/thorchainUtils/addressFormat.ts +0 -26
- package/src/cosmos/thorchainUtils/messages.ts +0 -262
- package/src/cosmos/thorchainUtils/registry.ts +0 -44
- package/src/cosmos/thorchainUtils/types/MsgCompiled.ts +0 -2800
- package/src/cosmos/thorchainUtils/types/client-types.ts +0 -73
- package/src/cosmos/thorchainUtils/types/index.ts +0 -1
- package/src/cosmos/toolbox/cosmos.ts +0 -375
- package/src/cosmos/toolbox/index.ts +0 -33
- package/src/cosmos/toolbox/thorchain.ts +0 -313
- package/src/cosmos/util.ts +0 -266
- package/src/evm/__tests__/address-validation.test.ts +0 -86
- package/src/evm/__tests__/ethereum.test.ts +0 -141
- package/src/evm/api.ts +0 -21
- package/src/evm/contracts/eth/multicall.ts +0 -165
- package/src/evm/contracts/op/gasOracle.ts +0 -151
- package/src/evm/helpers.ts +0 -194
- package/src/evm/toolbox/baseEVMToolbox.ts +0 -762
- package/src/evm/toolbox/evm.ts +0 -66
- package/src/evm/toolbox/index.ts +0 -52
- package/src/evm/toolbox/op.ts +0 -131
- package/src/evm/types.ts +0 -146
- package/src/index.ts +0 -263
- package/src/near/__tests__/core.test.ts +0 -80
- package/src/near/helpers/contractFactory.ts +0 -22
- package/src/near/helpers/core.ts +0 -91
- package/src/near/helpers/gasEstimation.ts +0 -110
- package/src/near/helpers/index.ts +0 -5
- package/src/near/helpers/nep141.ts +0 -110
- package/src/near/index.ts +0 -24
- package/src/near/toolbox.ts +0 -509
- package/src/near/types/contract.ts +0 -48
- package/src/near/types/nep141.ts +0 -66
- package/src/near/types.ts +0 -57
- package/src/radix/index.ts +0 -156
- package/src/ripple/index.ts +0 -192
- package/src/solana/index.ts +0 -55
- package/src/solana/toolbox.ts +0 -433
- package/src/substrate/balance.ts +0 -92
- package/src/substrate/substrate.ts +0 -320
- package/src/substrate/types.ts +0 -120
- package/src/tron/__tests__/toolbox.test.ts +0 -147
- package/src/tron/helpers/trc20.abi.ts +0 -107
- package/src/tron/helpers/trongrid.ts +0 -54
- package/src/tron/index.ts +0 -17
- package/src/tron/toolbox.ts +0 -650
- package/src/tron/types.ts +0 -120
- package/src/utils.ts +0 -27
- package/src/utxo/__tests__/zcash-integration.test.ts +0 -114
- package/src/utxo/helpers/api.ts +0 -560
- package/src/utxo/helpers/bchaddrjs.ts +0 -183
- package/src/utxo/helpers/coinselect.ts +0 -98
- package/src/utxo/helpers/txSize.ts +0 -104
- package/src/utxo/toolbox/bitcoinCash.ts +0 -320
- package/src/utxo/toolbox/index.ts +0 -90
- package/src/utxo/toolbox/utxo.ts +0 -525
- package/src/utxo/toolbox/zcash.ts +0 -208
- package/src/utxo/types.ts +0 -57
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { type Asset, type AssetValue, type ChainSigner, type EVMChain, FeeOption } from "@swapkit/helpers";
|
|
2
|
+
import { BrowserProvider, Contract, type ContractTransaction, type Fragment, type HDNodeWallet, type JsonFragment, type JsonRpcSigner, type Provider, type Signer } from "ethers";
|
|
3
|
+
import type { ApproveParams, CallParams, EIP1559TxParams, EVMCreateTransactionParams, EVMTransferParams, EVMTxParams, EstimateCallParams, IsApprovedParams } from "../types";
|
|
4
|
+
type ToolboxWrapParams<P = Provider | BrowserProvider, T = {}> = T & {
|
|
5
|
+
isEIP1559Compatible?: boolean;
|
|
6
|
+
provider: P;
|
|
7
|
+
signer?: Signer;
|
|
8
|
+
chain: EVMChain;
|
|
9
|
+
};
|
|
10
|
+
export declare const MAX_APPROVAL: bigint;
|
|
11
|
+
export declare function BaseEVMToolbox<P extends Provider | BrowserProvider, S extends (ChainSigner<EVMTransferParams, string> & Signer) | JsonRpcSigner | HDNodeWallet | undefined>({ chain, provider, signer, isEIP1559Compatible, }: {
|
|
12
|
+
signer: S;
|
|
13
|
+
provider: P;
|
|
14
|
+
isEIP1559Compatible?: boolean;
|
|
15
|
+
chain?: EVMChain;
|
|
16
|
+
}): {
|
|
17
|
+
getAddress: () => Promise<string> | undefined;
|
|
18
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: EIP1559TxParams & {
|
|
19
|
+
feeOption: FeeOption;
|
|
20
|
+
chain: EVMChain;
|
|
21
|
+
}) => Promise<AssetValue>;
|
|
22
|
+
call: <T>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: CallParams) => Promise<T>;
|
|
23
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: EstimateCallParams) => Promise<bigint>;
|
|
24
|
+
EIP1193SendTransaction: ({ value, ...params }: EVMTxParams | ContractTransaction) => Promise<string>;
|
|
25
|
+
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: ApproveParams) => Promise<string>;
|
|
26
|
+
approvedAmount: ({ assetAddress, spenderAddress, from }: IsApprovedParams) => Promise<bigint>;
|
|
27
|
+
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
28
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam, }: ApproveParams) => Promise<ContractTransaction>;
|
|
29
|
+
createContract: (address: string, abi: readonly (JsonFragment | Fragment)[]) => Contract;
|
|
30
|
+
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: CallParams) => Promise<ContractTransaction>;
|
|
31
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: EVMCreateTransactionParams) => Promise<ContractTransaction>;
|
|
32
|
+
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: EVMCreateTransactionParams) => Promise<ContractTransaction>;
|
|
33
|
+
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: EVMTransferParams & {
|
|
34
|
+
assetValue: AssetValue;
|
|
35
|
+
funcName?: string;
|
|
36
|
+
funcParams?: unknown[];
|
|
37
|
+
txOverrides?: EVMTxParams;
|
|
38
|
+
data?: string;
|
|
39
|
+
}) => Promise<bigint>;
|
|
40
|
+
estimateGasPrices: () => Promise<{ [key in FeeOption]: {
|
|
41
|
+
l1GasPrice?: bigint;
|
|
42
|
+
gasPrice?: bigint;
|
|
43
|
+
maxFeePerGas?: bigint;
|
|
44
|
+
maxPriorityFeePerGas?: bigint;
|
|
45
|
+
}; }>;
|
|
46
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount, }: IsApprovedParams) => Promise<boolean>;
|
|
47
|
+
sendTransaction: ({ feeOptionKey, ...tx }: EVMTxParams & {
|
|
48
|
+
feeOptionKey?: FeeOption;
|
|
49
|
+
}) => Promise<string>;
|
|
50
|
+
signMessage: ((message: string | Uint8Array) => Promise<string>) | ((message: string | Uint8Array) => Promise<string>) | ((_message: string | Uint8Array) => Promise<string>) | undefined;
|
|
51
|
+
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: EVMTransferParams) => Promise<string>;
|
|
52
|
+
validateAddress: (address: string) => boolean;
|
|
53
|
+
};
|
|
54
|
+
export declare function evmValidateAddress({ address }: {
|
|
55
|
+
address: string;
|
|
56
|
+
}): boolean;
|
|
57
|
+
export declare function isBrowserProvider(provider: any): provider is BrowserProvider;
|
|
58
|
+
export declare function createContract(address: string, abi: readonly (JsonFragment | Fragment)[], provider: Provider): Contract;
|
|
59
|
+
export declare function getCreateContract({ provider }: ToolboxWrapParams): (address: string, abi: readonly (JsonFragment | Fragment)[]) => Contract;
|
|
60
|
+
export declare function isStateChangingCall({ abi, funcName, }: {
|
|
61
|
+
abi: readonly JsonFragment[];
|
|
62
|
+
funcName: string;
|
|
63
|
+
}): any;
|
|
64
|
+
export declare function toChecksumAddress(address: string): string;
|
|
65
|
+
export declare function getEIP1193SendTransaction(provider: Provider | BrowserProvider): ({ value, ...params }: EVMTxParams | ContractTransaction) => Promise<string>;
|
|
66
|
+
export declare function getChecksumAddressFromAsset(asset: Asset, chain: EVMChain): string;
|
|
67
|
+
export declare function getTokenAddress({ chain, symbol, ticker }: Asset, baseAssetChain: EVMChain): string | null;
|
|
68
|
+
export declare function getCreateContractTxObject({ provider }: ToolboxWrapParams): ({ contractAddress, abi, funcName, funcParams, txOverrides }: CallParams) => Promise<ContractTransaction>;
|
|
69
|
+
export declare function getEstimateGasPrices({ chain, provider, isEIP1559Compatible, }: {
|
|
70
|
+
provider: Provider;
|
|
71
|
+
isEIP1559Compatible?: boolean;
|
|
72
|
+
chain: EVMChain;
|
|
73
|
+
}): () => Promise<{
|
|
74
|
+
[key in FeeOption]: {
|
|
75
|
+
l1GasPrice?: bigint;
|
|
76
|
+
gasPrice?: bigint;
|
|
77
|
+
maxFeePerGas?: bigint;
|
|
78
|
+
maxPriorityFeePerGas?: bigint;
|
|
79
|
+
};
|
|
80
|
+
}>;
|
|
81
|
+
export {};
|
|
82
|
+
//# sourceMappingURL=baseEVMToolbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseEVMToolbox.d.ts","sourceRoot":"","sources":["../../../../src/evm/toolbox/baseEVMToolbox.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import { type EVMChain, FeeOption } from "@swapkit/helpers";
|
|
2
|
+
import type { EVMToolboxParams } from "../types";
|
|
3
|
+
export declare function ETHToolbox({ provider, ...signer }: EVMToolboxParams): Promise<{
|
|
4
|
+
multicall: (callTuples: {
|
|
5
|
+
address: string;
|
|
6
|
+
data: string;
|
|
7
|
+
}[], multicallAddress?: string, funcName?: string, feeOptionKey?: FeeOption) => Promise<string>;
|
|
8
|
+
getNetworkParams: () => undefined;
|
|
9
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
10
|
+
getAddress: () => Promise<string> | undefined;
|
|
11
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("..").EIP1559TxParams & {
|
|
12
|
+
feeOption: FeeOption;
|
|
13
|
+
chain: EVMChain;
|
|
14
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
15
|
+
call: <T>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("..").CallParams) => Promise<T>;
|
|
16
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("..").EstimateCallParams) => Promise<bigint>;
|
|
17
|
+
EIP1193SendTransaction: ({ value, ...params }: import("..").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
18
|
+
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
19
|
+
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
20
|
+
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
21
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam, }: import("..").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
22
|
+
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
23
|
+
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("..").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
24
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
25
|
+
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
26
|
+
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("..").EVMTransferParams & {
|
|
27
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
28
|
+
funcName?: string;
|
|
29
|
+
funcParams?: unknown[];
|
|
30
|
+
txOverrides?: import("..").EVMTxParams;
|
|
31
|
+
data?: string;
|
|
32
|
+
}) => Promise<bigint>;
|
|
33
|
+
estimateGasPrices: () => Promise<{ [key in FeeOption]: {
|
|
34
|
+
l1GasPrice?: bigint;
|
|
35
|
+
gasPrice?: bigint;
|
|
36
|
+
maxFeePerGas?: bigint;
|
|
37
|
+
maxPriorityFeePerGas?: bigint;
|
|
38
|
+
}; }>;
|
|
39
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount, }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
40
|
+
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
41
|
+
feeOptionKey?: FeeOption;
|
|
42
|
+
}) => Promise<string>;
|
|
43
|
+
signMessage: ((message: string | Uint8Array) => Promise<string>) | ((message: string | Uint8Array) => Promise<string>) | ((_message: string | Uint8Array) => Promise<string>) | undefined;
|
|
44
|
+
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("..").EVMTransferParams) => Promise<string>;
|
|
45
|
+
validateAddress: (address: string) => boolean;
|
|
46
|
+
}>;
|
|
47
|
+
export declare const ARBToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
48
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
49
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
50
|
+
getAddress: () => Promise<string> | undefined;
|
|
51
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("..").EIP1559TxParams & {
|
|
52
|
+
feeOption: FeeOption;
|
|
53
|
+
chain: EVMChain;
|
|
54
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
55
|
+
call: <T>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("..").CallParams) => Promise<T>;
|
|
56
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("..").EstimateCallParams) => Promise<bigint>;
|
|
57
|
+
EIP1193SendTransaction: ({ value, ...params }: import("..").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
58
|
+
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
59
|
+
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
60
|
+
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
61
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam, }: import("..").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
62
|
+
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
63
|
+
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("..").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
64
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
65
|
+
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
66
|
+
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("..").EVMTransferParams & {
|
|
67
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
68
|
+
funcName?: string;
|
|
69
|
+
funcParams?: unknown[];
|
|
70
|
+
txOverrides?: import("..").EVMTxParams;
|
|
71
|
+
data?: string;
|
|
72
|
+
}) => Promise<bigint>;
|
|
73
|
+
estimateGasPrices: () => Promise<{ [key in FeeOption]: {
|
|
74
|
+
l1GasPrice?: bigint;
|
|
75
|
+
gasPrice?: bigint;
|
|
76
|
+
maxFeePerGas?: bigint;
|
|
77
|
+
maxPriorityFeePerGas?: bigint;
|
|
78
|
+
}; }>;
|
|
79
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount, }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
80
|
+
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
81
|
+
feeOptionKey?: FeeOption;
|
|
82
|
+
}) => Promise<string>;
|
|
83
|
+
signMessage: ((message: string | Uint8Array) => Promise<string>) | ((message: string | Uint8Array) => Promise<string>) | ((_message: string | Uint8Array) => Promise<string>) | undefined;
|
|
84
|
+
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("..").EVMTransferParams) => Promise<string>;
|
|
85
|
+
validateAddress: (address: string) => boolean;
|
|
86
|
+
}>;
|
|
87
|
+
export declare const AURORAToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
88
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
89
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
90
|
+
getAddress: () => Promise<string> | undefined;
|
|
91
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("..").EIP1559TxParams & {
|
|
92
|
+
feeOption: FeeOption;
|
|
93
|
+
chain: EVMChain;
|
|
94
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
95
|
+
call: <T>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("..").CallParams) => Promise<T>;
|
|
96
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("..").EstimateCallParams) => Promise<bigint>;
|
|
97
|
+
EIP1193SendTransaction: ({ value, ...params }: import("..").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
98
|
+
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
99
|
+
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
100
|
+
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
101
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam, }: import("..").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
102
|
+
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
103
|
+
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("..").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
104
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
105
|
+
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
106
|
+
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("..").EVMTransferParams & {
|
|
107
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
108
|
+
funcName?: string;
|
|
109
|
+
funcParams?: unknown[];
|
|
110
|
+
txOverrides?: import("..").EVMTxParams;
|
|
111
|
+
data?: string;
|
|
112
|
+
}) => Promise<bigint>;
|
|
113
|
+
estimateGasPrices: () => Promise<{ [key in FeeOption]: {
|
|
114
|
+
l1GasPrice?: bigint;
|
|
115
|
+
gasPrice?: bigint;
|
|
116
|
+
maxFeePerGas?: bigint;
|
|
117
|
+
maxPriorityFeePerGas?: bigint;
|
|
118
|
+
}; }>;
|
|
119
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount, }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
120
|
+
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
121
|
+
feeOptionKey?: FeeOption;
|
|
122
|
+
}) => Promise<string>;
|
|
123
|
+
signMessage: ((message: string | Uint8Array) => Promise<string>) | ((message: string | Uint8Array) => Promise<string>) | ((_message: string | Uint8Array) => Promise<string>) | undefined;
|
|
124
|
+
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("..").EVMTransferParams) => Promise<string>;
|
|
125
|
+
validateAddress: (address: string) => boolean;
|
|
126
|
+
}>;
|
|
127
|
+
export declare const AVAXToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
128
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
129
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
130
|
+
getAddress: () => Promise<string> | undefined;
|
|
131
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("..").EIP1559TxParams & {
|
|
132
|
+
feeOption: FeeOption;
|
|
133
|
+
chain: EVMChain;
|
|
134
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
135
|
+
call: <T>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("..").CallParams) => Promise<T>;
|
|
136
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("..").EstimateCallParams) => Promise<bigint>;
|
|
137
|
+
EIP1193SendTransaction: ({ value, ...params }: import("..").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
138
|
+
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
139
|
+
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
140
|
+
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
141
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam, }: import("..").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
142
|
+
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
143
|
+
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("..").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
144
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
145
|
+
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
146
|
+
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("..").EVMTransferParams & {
|
|
147
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
148
|
+
funcName?: string;
|
|
149
|
+
funcParams?: unknown[];
|
|
150
|
+
txOverrides?: import("..").EVMTxParams;
|
|
151
|
+
data?: string;
|
|
152
|
+
}) => Promise<bigint>;
|
|
153
|
+
estimateGasPrices: () => Promise<{ [key in FeeOption]: {
|
|
154
|
+
l1GasPrice?: bigint;
|
|
155
|
+
gasPrice?: bigint;
|
|
156
|
+
maxFeePerGas?: bigint;
|
|
157
|
+
maxPriorityFeePerGas?: bigint;
|
|
158
|
+
}; }>;
|
|
159
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount, }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
160
|
+
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
161
|
+
feeOptionKey?: FeeOption;
|
|
162
|
+
}) => Promise<string>;
|
|
163
|
+
signMessage: ((message: string | Uint8Array) => Promise<string>) | ((message: string | Uint8Array) => Promise<string>) | ((_message: string | Uint8Array) => Promise<string>) | undefined;
|
|
164
|
+
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("..").EVMTransferParams) => Promise<string>;
|
|
165
|
+
validateAddress: (address: string) => boolean;
|
|
166
|
+
}>;
|
|
167
|
+
export declare const BASEToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
168
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
169
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
170
|
+
getAddress: () => Promise<string> | undefined;
|
|
171
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("..").EIP1559TxParams & {
|
|
172
|
+
feeOption: FeeOption;
|
|
173
|
+
chain: EVMChain;
|
|
174
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
175
|
+
call: <T>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("..").CallParams) => Promise<T>;
|
|
176
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("..").EstimateCallParams) => Promise<bigint>;
|
|
177
|
+
EIP1193SendTransaction: ({ value, ...params }: import("..").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
178
|
+
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
179
|
+
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
180
|
+
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
181
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam, }: import("..").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
182
|
+
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
183
|
+
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("..").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
184
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
185
|
+
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
186
|
+
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("..").EVMTransferParams & {
|
|
187
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
188
|
+
funcName?: string;
|
|
189
|
+
funcParams?: unknown[];
|
|
190
|
+
txOverrides?: import("..").EVMTxParams;
|
|
191
|
+
data?: string;
|
|
192
|
+
}) => Promise<bigint>;
|
|
193
|
+
estimateGasPrices: () => Promise<{ [key in FeeOption]: {
|
|
194
|
+
l1GasPrice?: bigint;
|
|
195
|
+
gasPrice?: bigint;
|
|
196
|
+
maxFeePerGas?: bigint;
|
|
197
|
+
maxPriorityFeePerGas?: bigint;
|
|
198
|
+
}; }>;
|
|
199
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount, }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
200
|
+
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
201
|
+
feeOptionKey?: FeeOption;
|
|
202
|
+
}) => Promise<string>;
|
|
203
|
+
signMessage: ((message: string | Uint8Array) => Promise<string>) | ((message: string | Uint8Array) => Promise<string>) | ((_message: string | Uint8Array) => Promise<string>) | undefined;
|
|
204
|
+
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("..").EVMTransferParams) => Promise<string>;
|
|
205
|
+
validateAddress: (address: string) => boolean;
|
|
206
|
+
}>;
|
|
207
|
+
export declare const BERAToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
208
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
209
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
210
|
+
getAddress: () => Promise<string> | undefined;
|
|
211
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("..").EIP1559TxParams & {
|
|
212
|
+
feeOption: FeeOption;
|
|
213
|
+
chain: EVMChain;
|
|
214
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
215
|
+
call: <T>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("..").CallParams) => Promise<T>;
|
|
216
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("..").EstimateCallParams) => Promise<bigint>;
|
|
217
|
+
EIP1193SendTransaction: ({ value, ...params }: import("..").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
218
|
+
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
219
|
+
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
220
|
+
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
221
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam, }: import("..").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
222
|
+
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
223
|
+
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("..").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
224
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
225
|
+
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
226
|
+
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("..").EVMTransferParams & {
|
|
227
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
228
|
+
funcName?: string;
|
|
229
|
+
funcParams?: unknown[];
|
|
230
|
+
txOverrides?: import("..").EVMTxParams;
|
|
231
|
+
data?: string;
|
|
232
|
+
}) => Promise<bigint>;
|
|
233
|
+
estimateGasPrices: () => Promise<{ [key in FeeOption]: {
|
|
234
|
+
l1GasPrice?: bigint;
|
|
235
|
+
gasPrice?: bigint;
|
|
236
|
+
maxFeePerGas?: bigint;
|
|
237
|
+
maxPriorityFeePerGas?: bigint;
|
|
238
|
+
}; }>;
|
|
239
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount, }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
240
|
+
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
241
|
+
feeOptionKey?: FeeOption;
|
|
242
|
+
}) => Promise<string>;
|
|
243
|
+
signMessage: ((message: string | Uint8Array) => Promise<string>) | ((message: string | Uint8Array) => Promise<string>) | ((_message: string | Uint8Array) => Promise<string>) | undefined;
|
|
244
|
+
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("..").EVMTransferParams) => Promise<string>;
|
|
245
|
+
validateAddress: (address: string) => boolean;
|
|
246
|
+
}>;
|
|
247
|
+
export declare const BSCToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
248
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
249
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
250
|
+
getAddress: () => Promise<string> | undefined;
|
|
251
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("..").EIP1559TxParams & {
|
|
252
|
+
feeOption: FeeOption;
|
|
253
|
+
chain: EVMChain;
|
|
254
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
255
|
+
call: <T>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("..").CallParams) => Promise<T>;
|
|
256
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("..").EstimateCallParams) => Promise<bigint>;
|
|
257
|
+
EIP1193SendTransaction: ({ value, ...params }: import("..").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
258
|
+
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
259
|
+
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
260
|
+
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
261
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam, }: import("..").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
262
|
+
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
263
|
+
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("..").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
264
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
265
|
+
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
266
|
+
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("..").EVMTransferParams & {
|
|
267
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
268
|
+
funcName?: string;
|
|
269
|
+
funcParams?: unknown[];
|
|
270
|
+
txOverrides?: import("..").EVMTxParams;
|
|
271
|
+
data?: string;
|
|
272
|
+
}) => Promise<bigint>;
|
|
273
|
+
estimateGasPrices: () => Promise<{ [key in FeeOption]: {
|
|
274
|
+
l1GasPrice?: bigint;
|
|
275
|
+
gasPrice?: bigint;
|
|
276
|
+
maxFeePerGas?: bigint;
|
|
277
|
+
maxPriorityFeePerGas?: bigint;
|
|
278
|
+
}; }>;
|
|
279
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount, }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
280
|
+
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
281
|
+
feeOptionKey?: FeeOption;
|
|
282
|
+
}) => Promise<string>;
|
|
283
|
+
signMessage: ((message: string | Uint8Array) => Promise<string>) | ((message: string | Uint8Array) => Promise<string>) | ((_message: string | Uint8Array) => Promise<string>) | undefined;
|
|
284
|
+
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("..").EVMTransferParams) => Promise<string>;
|
|
285
|
+
validateAddress: (address: string) => boolean;
|
|
286
|
+
}>;
|
|
287
|
+
export declare const GNOToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
288
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
289
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
290
|
+
getAddress: () => Promise<string> | undefined;
|
|
291
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("..").EIP1559TxParams & {
|
|
292
|
+
feeOption: FeeOption;
|
|
293
|
+
chain: EVMChain;
|
|
294
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
295
|
+
call: <T>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("..").CallParams) => Promise<T>;
|
|
296
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("..").EstimateCallParams) => Promise<bigint>;
|
|
297
|
+
EIP1193SendTransaction: ({ value, ...params }: import("..").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
298
|
+
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
299
|
+
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
300
|
+
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
301
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam, }: import("..").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
302
|
+
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
303
|
+
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("..").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
304
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
305
|
+
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
306
|
+
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("..").EVMTransferParams & {
|
|
307
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
308
|
+
funcName?: string;
|
|
309
|
+
funcParams?: unknown[];
|
|
310
|
+
txOverrides?: import("..").EVMTxParams;
|
|
311
|
+
data?: string;
|
|
312
|
+
}) => Promise<bigint>;
|
|
313
|
+
estimateGasPrices: () => Promise<{ [key in FeeOption]: {
|
|
314
|
+
l1GasPrice?: bigint;
|
|
315
|
+
gasPrice?: bigint;
|
|
316
|
+
maxFeePerGas?: bigint;
|
|
317
|
+
maxPriorityFeePerGas?: bigint;
|
|
318
|
+
}; }>;
|
|
319
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount, }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
320
|
+
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
321
|
+
feeOptionKey?: FeeOption;
|
|
322
|
+
}) => Promise<string>;
|
|
323
|
+
signMessage: ((message: string | Uint8Array) => Promise<string>) | ((message: string | Uint8Array) => Promise<string>) | ((_message: string | Uint8Array) => Promise<string>) | undefined;
|
|
324
|
+
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("..").EVMTransferParams) => Promise<string>;
|
|
325
|
+
validateAddress: (address: string) => boolean;
|
|
326
|
+
}>;
|
|
327
|
+
export declare const MATICToolbox: ({ provider: providerParam, ...toolboxSignerParams }: EVMToolboxParams) => Promise<{
|
|
328
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
329
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
330
|
+
getAddress: () => Promise<string> | undefined;
|
|
331
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("..").EIP1559TxParams & {
|
|
332
|
+
feeOption: FeeOption;
|
|
333
|
+
chain: EVMChain;
|
|
334
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
335
|
+
call: <T>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("..").CallParams) => Promise<T>;
|
|
336
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("..").EstimateCallParams) => Promise<bigint>;
|
|
337
|
+
EIP1193SendTransaction: ({ value, ...params }: import("..").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
338
|
+
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
339
|
+
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
340
|
+
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
341
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam, }: import("..").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
342
|
+
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
343
|
+
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("..").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
344
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
345
|
+
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
346
|
+
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("..").EVMTransferParams & {
|
|
347
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
348
|
+
funcName?: string;
|
|
349
|
+
funcParams?: unknown[];
|
|
350
|
+
txOverrides?: import("..").EVMTxParams;
|
|
351
|
+
data?: string;
|
|
352
|
+
}) => Promise<bigint>;
|
|
353
|
+
estimateGasPrices: () => Promise<{ [key in FeeOption]: {
|
|
354
|
+
l1GasPrice?: bigint;
|
|
355
|
+
gasPrice?: bigint;
|
|
356
|
+
maxFeePerGas?: bigint;
|
|
357
|
+
maxPriorityFeePerGas?: bigint;
|
|
358
|
+
}; }>;
|
|
359
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount, }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
360
|
+
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
361
|
+
feeOptionKey?: FeeOption;
|
|
362
|
+
}) => Promise<string>;
|
|
363
|
+
signMessage: ((message: string | Uint8Array) => Promise<string>) | ((message: string | Uint8Array) => Promise<string>) | ((_message: string | Uint8Array) => Promise<string>) | undefined;
|
|
364
|
+
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("..").EVMTransferParams) => Promise<string>;
|
|
365
|
+
validateAddress: (address: string) => boolean;
|
|
366
|
+
}>;
|
|
367
|
+
//# sourceMappingURL=evm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evm.d.ts","sourceRoot":"","sources":["../../../../src/evm/toolbox/evm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,QAAQ,EAAE,SAAS,EAAY,MAAM,kBAAkB,CAAC;AAO7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGjD,wBAAsB,UAAU,CAAC,EAAE,QAAQ,EAAE,GAAG,MAAM,EAAE,EAAE,gBAAgB;4BAM1D;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,+DAGjC,SAAS;;;;;;;;;;;;;;;;;;;;;gBAgDgke,CAAC;kBAAwB,CAAC;mBAA4B,CAAC;YAAuB,CAAC;;;kBAAhjW,CAAC;gBAAsB,CAAC;oBAA0B,CAAC;4BAAkC,CAAC;;;;oBAAkuY,CAAC;;;;;GAnCl7gB;AAED,eAAO,MAAM,UAAU,wDAalB,gBAAgB;;;;;;;;;;;;;;;;;;;;;gBAoBske,CAAC;kBAAwB,CAAC;mBAA4B,CAAC;YAAuB,CAAC;;;kBAAhjW,CAAC;gBAAsB,CAAC;oBAA0B,CAAC;4BAAkC,CAAC;;;;oBAAkuY,CAAC;;;;;EAjCz3gB,CAAC;AAC3D,eAAO,MAAM,aAAa,wDAYrB,gBAAgB;;;;;;;;;;;;;;;;;;;;;gBAoBske,CAAC;kBAAwB,CAAC;mBAA4B,CAAC;YAAuB,CAAC;;;kBAAhjW,CAAC;gBAAsB,CAAC;oBAA0B,CAAC;4BAAkC,CAAC;;;;oBAAkuY,CAAC;;;;;EAhCx3gB,CAAC;AAC5D,eAAO,MAAM,WAAW,wDAWnB,gBAAgB;;;;;;;;;;;;;;;;;;;;;gBAoBske,CAAC;kBAAwB,CAAC;mBAA4B,CAAC;YAAuB,CAAC;;;kBAAhjW,CAAC;gBAAsB,CAAC;oBAA0B,CAAC;4BAAkC,CAAC;;;;oBAAkuY,CAAC;;;;;EA/Bv3gB,CAAC;AAC7D,eAAO,MAAM,WAAW,wDAUnB,gBAAgB;;;;;;;;;;;;;;;;;;;;;gBAoBske,CAAC;kBAAwB,CAAC;mBAA4B,CAAC;YAAuB,CAAC;;;kBAAhjW,CAAC;gBAAsB,CAAC;oBAA0B,CAAC;4BAAkC,CAAC;;;;oBAAkuY,CAAC;;;;;EA9B53gB,CAAC;AACxD,eAAO,MAAM,WAAW,wDASnB,gBAAgB;;;;;;;;;;;;;;;;;;;;;gBAoBske,CAAC;kBAAwB,CAAC;mBAA4B,CAAC;YAAuB,CAAC;;;kBAAhjW,CAAC;gBAAsB,CAAC;oBAA0B,CAAC;4BAAkC,CAAC;;;;oBAAkuY,CAAC;;;;;EA7Bv3gB,CAAC;AAC7D,eAAO,MAAM,UAAU,wDAQlB,gBAAgB;;;;;;;;;;;;;;;;;;;;;gBAoBske,CAAC;kBAAwB,CAAC;mBAA4B,CAAC;YAAuB,CAAC;;;kBAAhjW,CAAC;gBAAsB,CAAC;oBAA0B,CAAC;4BAAkC,CAAC;;;;oBAAkuY,CAAC;;;;;EA5Bh3gB,CAAC;AACpE,eAAO,MAAM,UAAU,wDAOlB,gBAAgB;;;;;;;;;;;;;;;;;;;;;gBAoBske,CAAC;kBAAwB,CAAC;mBAA4B,CAAC;YAAuB,CAAC;;;kBAAhjW,CAAC;gBAAsB,CAAC;oBAA0B,CAAC;4BAAkC,CAAC;;;;oBAAkuY,CAAC;;;;;EA3B33gB,CAAC;AACzD,eAAO,MAAM,YAAY,wDAMpB,gBAAgB;;;;;;;;;;;;;;;;;;;;;gBAoBske,CAAC;kBAAwB,CAAC;mBAA4B,CAAC;YAAuB,CAAC;;;kBAAhjW,CAAC;gBAAsB,CAAC;oBAA0B,CAAC;4BAAkC,CAAC;;;;oBAAkuY,CAAC;;;;;EA1Bx3gB,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { type EVMChain } from "@swapkit/helpers";
|
|
2
|
+
import type { EVMToolboxParams } from "../types";
|
|
3
|
+
export declare function getEvmToolbox<T extends EVMChain>(chain: T, params?: EVMToolboxParams): Promise<{
|
|
4
|
+
multicall: (callTuples: {
|
|
5
|
+
address: string;
|
|
6
|
+
data: string;
|
|
7
|
+
}[], multicallAddress?: string, funcName?: string, feeOptionKey?: import("@swapkit/helpers").FeeOption) => Promise<string>;
|
|
8
|
+
getNetworkParams: () => undefined;
|
|
9
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
10
|
+
getAddress: () => Promise<string> | undefined;
|
|
11
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("..").EIP1559TxParams & {
|
|
12
|
+
feeOption: import("@swapkit/helpers").FeeOption;
|
|
13
|
+
chain: EVMChain;
|
|
14
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
15
|
+
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("..").CallParams) => Promise<T_1>;
|
|
16
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("..").EstimateCallParams) => Promise<bigint>;
|
|
17
|
+
EIP1193SendTransaction: ({ value, ...params }: import("..").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
18
|
+
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
19
|
+
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
20
|
+
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
21
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam, }: import("..").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
22
|
+
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
23
|
+
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("..").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
24
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
25
|
+
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
26
|
+
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("..").EVMTransferParams & {
|
|
27
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
28
|
+
funcName?: string;
|
|
29
|
+
funcParams?: unknown[];
|
|
30
|
+
txOverrides?: import("..").EVMTxParams;
|
|
31
|
+
data?: string;
|
|
32
|
+
}) => Promise<bigint>;
|
|
33
|
+
estimateGasPrices: () => Promise<{ [key in import("@swapkit/helpers").FeeOption]: {
|
|
34
|
+
l1GasPrice?: bigint;
|
|
35
|
+
gasPrice?: bigint;
|
|
36
|
+
maxFeePerGas?: bigint;
|
|
37
|
+
maxPriorityFeePerGas?: bigint;
|
|
38
|
+
}; }>;
|
|
39
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount, }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
40
|
+
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
41
|
+
feeOptionKey?: import("@swapkit/helpers").FeeOption;
|
|
42
|
+
}) => Promise<string>;
|
|
43
|
+
signMessage: ((message: string | Uint8Array) => Promise<string>) | ((message: string | Uint8Array) => Promise<string>) | ((_message: string | Uint8Array) => Promise<string>) | undefined;
|
|
44
|
+
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("..").EVMTransferParams) => Promise<string>;
|
|
45
|
+
validateAddress: (address: string) => boolean;
|
|
46
|
+
} | {
|
|
47
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
48
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
49
|
+
getAddress: () => Promise<string> | undefined;
|
|
50
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("..").EIP1559TxParams & {
|
|
51
|
+
feeOption: import("@swapkit/helpers").FeeOption;
|
|
52
|
+
chain: EVMChain;
|
|
53
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
54
|
+
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("..").CallParams) => Promise<T_1>;
|
|
55
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("..").EstimateCallParams) => Promise<bigint>;
|
|
56
|
+
EIP1193SendTransaction: ({ value, ...params }: import("..").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
57
|
+
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("..").ApproveParams) => Promise<string>;
|
|
58
|
+
approvedAmount: ({ assetAddress, spenderAddress, from }: import("..").IsApprovedParams) => Promise<bigint>;
|
|
59
|
+
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
60
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam, }: import("..").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
61
|
+
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
62
|
+
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("..").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
63
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
64
|
+
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("..").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
65
|
+
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("..").EVMTransferParams & {
|
|
66
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
67
|
+
funcName?: string;
|
|
68
|
+
funcParams?: unknown[];
|
|
69
|
+
txOverrides?: import("..").EVMTxParams;
|
|
70
|
+
data?: string;
|
|
71
|
+
}) => Promise<bigint>;
|
|
72
|
+
estimateGasPrices: () => Promise<{ [key in import("@swapkit/helpers").FeeOption]: {
|
|
73
|
+
l1GasPrice?: bigint;
|
|
74
|
+
gasPrice?: bigint;
|
|
75
|
+
maxFeePerGas?: bigint;
|
|
76
|
+
maxPriorityFeePerGas?: bigint;
|
|
77
|
+
}; }>;
|
|
78
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount, }: import("..").IsApprovedParams) => Promise<boolean>;
|
|
79
|
+
sendTransaction: ({ feeOptionKey, ...tx }: import("..").EVMTxParams & {
|
|
80
|
+
feeOptionKey?: import("@swapkit/helpers").FeeOption;
|
|
81
|
+
}) => Promise<string>;
|
|
82
|
+
signMessage: ((message: string | Uint8Array) => Promise<string>) | ((message: string | Uint8Array) => Promise<string>) | ((_message: string | Uint8Array) => Promise<string>) | undefined;
|
|
83
|
+
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("..").EVMTransferParams) => Promise<string>;
|
|
84
|
+
validateAddress: (address: string) => boolean;
|
|
85
|
+
}>;
|
|
86
|
+
export * from "./baseEVMToolbox";
|
|
87
|
+
export * from "./evm";
|
|
88
|
+
export * from "./op";
|
|
89
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/evm/toolbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,QAAQ,EAAgB,MAAM,kBAAkB,CAAC;AAGtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAcjD,wBAAsB,aAAa,CAAC,CAAC,SAAS,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;gBAmCgjgB,CAAC;kBAAwB,CAAC;mBAA4B,CAAC;YAAuB,CAAC;;;kBAAhjW,CAAC;gBAAsB,CAAC;oBAA0B,CAAC;4BAAkC,CAAC;;;;oBAAkuY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;gBAAx1C,CAAC;kBAAwB,CAAC;mBAA4B,CAAC;YAAuB,CAAC;;;kBAAhjW,CAAC;gBAAsB,CAAC;oBAA0B,CAAC;4BAAkC,CAAC;;;;oBAAkuY,CAAC;;;;;GALl+iB;AAED,cAAc,kBAAkB,CAAC;AACjC,cAAc,OAAO,CAAC;AACtB,cAAc,MAAM,CAAC"}
|