@swapkit/wallets 4.0.0-beta.53 → 4.0.0-beta.55
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/{chunk-e674mh4n.js → chunk-mcrgqfr9.js} +3 -3
- package/dist/{chunk-e674mh4n.js.map → chunk-mcrgqfr9.js.map} +1 -1
- package/dist/{chunk-mvbb9fwb.js → chunk-sbf0f2p4.js} +2 -2
- package/dist/{chunk-p2ca0j1v.js → chunk-yqaz2d25.js} +3 -3
- package/dist/{chunk-p2ca0j1v.js.map → chunk-yqaz2d25.js.map} +1 -1
- package/dist/src/bitget/index.cjs +2 -2
- package/dist/src/bitget/index.cjs.map +3 -3
- package/dist/src/bitget/index.js +2 -2
- package/dist/src/bitget/index.js.map +3 -3
- package/dist/src/coinbase/index.cjs +2 -2
- package/dist/src/coinbase/index.cjs.map +3 -3
- package/dist/src/coinbase/index.js +2 -2
- package/dist/src/coinbase/index.js.map +3 -3
- package/dist/src/cosmostation/index.cjs +2 -2
- package/dist/src/cosmostation/index.cjs.map +3 -3
- package/dist/src/cosmostation/index.js +2 -2
- package/dist/src/cosmostation/index.js.map +3 -3
- package/dist/src/ctrl/index.cjs +2 -2
- package/dist/src/ctrl/index.cjs.map +3 -3
- package/dist/src/ctrl/index.js +2 -2
- package/dist/src/ctrl/index.js.map +3 -3
- package/dist/src/evm-extensions/index.cjs +2 -2
- package/dist/src/evm-extensions/index.cjs.map +3 -3
- package/dist/src/evm-extensions/index.js +2 -2
- package/dist/src/evm-extensions/index.js.map +3 -3
- package/dist/src/exodus/index.cjs +2 -2
- package/dist/src/exodus/index.cjs.map +3 -3
- package/dist/src/exodus/index.js +2 -2
- package/dist/src/exodus/index.js.map +3 -3
- package/dist/src/index.cjs +2 -2
- package/dist/src/index.cjs.map +5 -3
- package/dist/src/index.js +2 -2
- package/dist/src/index.js.map +5 -3
- package/dist/src/keepkey-bex/index.cjs +2 -2
- package/dist/src/keepkey-bex/index.cjs.map +3 -3
- package/dist/src/keepkey-bex/index.js +2 -2
- package/dist/src/keepkey-bex/index.js.map +3 -3
- package/dist/src/keepkey.cjs +4 -0
- package/dist/src/keepkey.cjs.map +10 -0
- package/dist/src/keepkey.js +4 -0
- package/dist/src/keepkey.js.map +10 -0
- package/dist/src/keplr/index.cjs +2 -2
- package/dist/src/keplr/index.cjs.map +3 -3
- package/dist/src/keplr/index.js +2 -2
- package/dist/src/keplr/index.js.map +3 -3
- package/dist/src/keystore.cjs +4 -0
- package/dist/src/keystore.cjs.map +10 -0
- package/dist/src/keystore.js +4 -0
- package/dist/src/keystore.js.map +10 -0
- package/dist/src/ledger.cjs +4 -0
- package/dist/src/ledger.cjs.map +10 -0
- package/dist/src/ledger.js +4 -0
- package/dist/src/ledger.js.map +10 -0
- package/dist/src/okx/index.cjs +2 -2
- package/dist/src/okx/index.cjs.map +4 -4
- package/dist/src/okx/index.js +2 -2
- package/dist/src/okx/index.js.map +4 -4
- package/dist/src/onekey/index.cjs +2 -2
- package/dist/src/onekey/index.cjs.map +3 -3
- package/dist/src/onekey/index.js +2 -2
- package/dist/src/onekey/index.js.map +3 -3
- package/dist/src/phantom/index.cjs +2 -2
- package/dist/src/phantom/index.cjs.map +3 -3
- package/dist/src/phantom/index.js +2 -2
- package/dist/src/phantom/index.js.map +3 -3
- package/dist/src/polkadotjs/index.cjs +2 -2
- package/dist/src/polkadotjs/index.cjs.map +3 -3
- package/dist/src/polkadotjs/index.js +2 -2
- package/dist/src/polkadotjs/index.js.map +3 -3
- package/dist/src/radix/index.cjs +2 -2
- package/dist/src/radix/index.cjs.map +3 -3
- package/dist/src/radix/index.js +2 -2
- package/dist/src/radix/index.js.map +3 -3
- package/dist/src/talisman/index.cjs +2 -2
- package/dist/src/talisman/index.cjs.map +3 -3
- package/dist/src/talisman/index.js +2 -2
- package/dist/src/talisman/index.js.map +3 -3
- package/dist/src/trezor.cjs +4 -0
- package/dist/src/trezor.cjs.map +10 -0
- package/dist/src/trezor.js +4 -0
- package/dist/src/trezor.js.map +10 -0
- package/dist/src/vultisig/index.cjs +2 -2
- package/dist/src/vultisig/index.cjs.map +3 -3
- package/dist/src/vultisig/index.js +2 -2
- package/dist/src/vultisig/index.js.map +3 -3
- package/dist/src/walletconnect/index.cjs +2 -2
- package/dist/src/walletconnect/index.cjs.map +3 -3
- package/dist/src/walletconnect/index.js +2 -2
- package/dist/src/walletconnect/index.js.map +3 -3
- package/dist/src/xaman/index.cjs +2 -2
- package/dist/src/xaman/index.cjs.map +5 -5
- package/dist/src/xaman/index.js +2 -2
- package/dist/src/xaman/index.js.map +5 -5
- package/dist/types/bitget/helpers.d.ts +330 -0
- package/dist/types/bitget/helpers.d.ts.map +1 -0
- package/dist/types/bitget/index.d.ts +11 -0
- package/dist/types/bitget/index.d.ts.map +1 -0
- package/dist/types/coinbase/index.d.ts +11 -0
- package/dist/types/coinbase/index.d.ts.map +1 -0
- package/dist/types/coinbase/signer.d.ts +91 -0
- package/dist/types/coinbase/signer.d.ts.map +1 -0
- package/dist/types/cosmostation/index.d.ts +21 -0
- package/dist/types/cosmostation/index.d.ts.map +1 -0
- package/dist/types/ctrl/index.d.ts +11 -0
- package/dist/types/ctrl/index.d.ts.map +1 -0
- package/dist/types/ctrl/walletHelpers.d.ts +24 -0
- package/dist/types/ctrl/walletHelpers.d.ts.map +1 -0
- package/dist/types/evm-extensions/index.d.ts +101 -0
- package/dist/types/evm-extensions/index.d.ts.map +1 -0
- package/{src/evm-extensions/types.ts → dist/types/evm-extensions/types.d.ts} +11 -13
- package/dist/types/evm-extensions/types.d.ts.map +1 -0
- package/dist/types/exodus/index.d.ts +14 -0
- package/dist/types/exodus/index.d.ts.map +1 -0
- package/dist/types/helpers/near.d.ts +57 -0
- package/dist/types/helpers/near.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/keepkey-bex/index.d.ts +11 -0
- package/dist/types/keepkey-bex/index.d.ts.map +1 -0
- package/dist/types/keepkey-bex/walletHelpers.d.ts +45 -0
- package/dist/types/keepkey-bex/walletHelpers.d.ts.map +1 -0
- package/dist/types/keepkey.d.ts +2 -0
- package/dist/types/keepkey.d.ts.map +1 -0
- package/dist/types/keplr/chainRegistry.d.ts +4 -0
- package/dist/types/keplr/chainRegistry.d.ts.map +1 -0
- package/dist/types/keplr/index.d.ts +11 -0
- package/dist/types/keplr/index.d.ts.map +1 -0
- package/dist/types/keystore.d.ts +2 -0
- package/dist/types/keystore.d.ts.map +1 -0
- package/dist/types/ledger.d.ts +2 -0
- package/dist/types/ledger.d.ts.map +1 -0
- package/dist/types/okx/helpers.d.ts +227 -0
- package/dist/types/okx/helpers.d.ts.map +1 -0
- package/dist/types/okx/index.d.ts +11 -0
- package/dist/types/okx/index.d.ts.map +1 -0
- package/dist/types/okx/types.d.ts +104 -0
- package/dist/types/okx/types.d.ts.map +1 -0
- package/dist/types/onekey/evmSigner.d.ts +29 -0
- package/dist/types/onekey/evmSigner.d.ts.map +1 -0
- package/dist/types/onekey/index.d.ts +11 -0
- package/dist/types/onekey/index.d.ts.map +1 -0
- package/dist/types/phantom/index.d.ts +12 -0
- package/dist/types/phantom/index.d.ts.map +1 -0
- package/dist/types/polkadotjs/index.d.ts +11 -0
- package/dist/types/polkadotjs/index.d.ts.map +1 -0
- package/dist/types/radix/index.d.ts +11 -0
- package/dist/types/radix/index.d.ts.map +1 -0
- package/dist/types/talisman/index.d.ts +11 -0
- package/dist/types/talisman/index.d.ts.map +1 -0
- package/dist/types/trezor.d.ts +2 -0
- package/dist/types/trezor.d.ts.map +1 -0
- package/dist/types/types.d.ts +246 -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/vultisig/index.d.ts +11 -0
- package/dist/types/vultisig/index.d.ts.map +1 -0
- package/dist/types/vultisig/walletHelpers.d.ts +34 -0
- package/dist/types/vultisig/walletHelpers.d.ts.map +1 -0
- package/dist/types/walletconnect/constants.d.ts +85 -0
- package/dist/types/walletconnect/constants.d.ts.map +1 -0
- package/dist/types/walletconnect/evmSigner.d.ts +25 -0
- package/dist/types/walletconnect/evmSigner.d.ts.map +1 -0
- package/dist/types/walletconnect/helpers.d.ts +4 -0
- package/dist/types/walletconnect/helpers.d.ts.map +1 -0
- package/dist/types/walletconnect/index.d.ts +22 -0
- package/dist/types/walletconnect/index.d.ts.map +1 -0
- package/dist/types/walletconnect/namespaces.d.ts +7 -0
- package/dist/types/walletconnect/namespaces.d.ts.map +1 -0
- package/dist/types/walletconnect/types.d.ts +7 -0
- package/dist/types/walletconnect/types.d.ts.map +1 -0
- package/dist/types/xaman/helpers.d.ts +54 -0
- package/dist/types/xaman/helpers.d.ts.map +1 -0
- package/dist/types/xaman/index.d.ts +14 -0
- package/dist/types/xaman/index.d.ts.map +1 -0
- package/dist/types/xaman/types.d.ts +24 -0
- package/dist/types/xaman/types.d.ts.map +1 -0
- package/dist/types/xaman/walletMethods.d.ts +16 -0
- package/dist/types/xaman/walletMethods.d.ts.map +1 -0
- package/package.json +44 -68
- package/dist/chunk-2aa1w78q.js +0 -4
- package/dist/chunk-2aa1w78q.js.map +0 -10
- package/dist/chunk-31bmhjxx.js +0 -4
- package/dist/chunk-31bmhjxx.js.map +0 -10
- package/dist/chunk-3etn0w20.js +0 -4
- package/dist/chunk-3etn0w20.js.map +0 -10
- package/dist/chunk-bk58smyr.js +0 -4
- package/dist/chunk-bk58smyr.js.map +0 -10
- package/dist/chunk-etm8zfkk.js +0 -4
- package/dist/chunk-etm8zfkk.js.map +0 -10
- package/dist/chunk-h7myvxxm.js +0 -5
- package/dist/chunk-h7myvxxm.js.map +0 -10
- package/dist/chunk-htvthkj1.js +0 -5
- package/dist/chunk-htvthkj1.js.map +0 -10
- package/dist/chunk-nfas79hz.js +0 -4
- package/dist/chunk-nfas79hz.js.map +0 -10
- package/dist/src/keepkey/index.cjs +0 -4
- package/dist/src/keepkey/index.cjs.map +0 -15
- package/dist/src/keepkey/index.js +0 -4
- package/dist/src/keepkey/index.js.map +0 -15
- package/dist/src/keystore/index.cjs +0 -4
- package/dist/src/keystore/index.cjs.map +0 -11
- package/dist/src/keystore/index.js +0 -4
- package/dist/src/keystore/index.js.map +0 -11
- package/dist/src/ledger/index.cjs +0 -5
- package/dist/src/ledger/index.cjs.map +0 -25
- package/dist/src/ledger/index.js +0 -5
- package/dist/src/ledger/index.js.map +0 -25
- package/dist/src/trezor/index.cjs +0 -4
- package/dist/src/trezor/index.cjs.map +0 -10
- package/dist/src/trezor/index.js +0 -4
- package/dist/src/trezor/index.js.map +0 -10
- package/src/bitget/helpers.ts +0 -167
- package/src/bitget/index.ts +0 -34
- package/src/coinbase/index.ts +0 -52
- package/src/coinbase/signer.ts +0 -83
- package/src/cosmostation/index.ts +0 -142
- package/src/ctrl/index.ts +0 -248
- package/src/ctrl/walletHelpers.ts +0 -297
- package/src/evm-extensions/index.ts +0 -134
- package/src/exodus/index.ts +0 -179
- package/src/helpers/near-browser-provider.d.ts +0 -286
- package/src/helpers/near.ts +0 -206
- package/src/index.ts +0 -2
- package/src/keepkey/chains/cosmos.ts +0 -78
- package/src/keepkey/chains/evm.ts +0 -125
- package/src/keepkey/chains/mayachain.ts +0 -123
- package/src/keepkey/chains/ripple.ts +0 -118
- package/src/keepkey/chains/thorchain.ts +0 -118
- package/src/keepkey/chains/utxo.ts +0 -147
- package/src/keepkey/coins.ts +0 -71
- package/src/keepkey/index.ts +0 -153
- package/src/keepkey-bex/index.ts +0 -162
- package/src/keepkey-bex/walletHelpers.ts +0 -255
- package/src/keplr/chainRegistry.ts +0 -211
- package/src/keplr/index.ts +0 -55
- package/src/keystore/helpers.ts +0 -102
- package/src/keystore/index.ts +0 -73
- package/src/ledger/clients/cosmos.ts +0 -102
- package/src/ledger/clients/evm.ts +0 -183
- package/src/ledger/clients/near.ts +0 -86
- package/src/ledger/clients/thorchain/common.ts +0 -117
- package/src/ledger/clients/thorchain/helpers.ts +0 -149
- package/src/ledger/clients/thorchain/index.ts +0 -94
- package/src/ledger/clients/thorchain/lib.ts +0 -300
- package/src/ledger/clients/thorchain/utils.ts +0 -76
- package/src/ledger/clients/tron.ts +0 -92
- package/src/ledger/clients/utxo.ts +0 -148
- package/src/ledger/clients/xrp.ts +0 -66
- package/src/ledger/cosmosTypes.ts +0 -101
- package/src/ledger/helpers/getLedgerAddress.ts +0 -67
- package/src/ledger/helpers/getLedgerClient.ts +0 -124
- package/src/ledger/helpers/getLedgerTransport.ts +0 -80
- package/src/ledger/helpers/index.ts +0 -3
- package/src/ledger/index.ts +0 -311
- package/src/ledger/interfaces/CosmosLedgerInterface.ts +0 -65
- package/src/ledger/types.ts +0 -45
- package/src/okx/helpers.ts +0 -181
- package/src/okx/index.ts +0 -43
- package/src/okx/types.ts +0 -117
- package/src/onekey/evmSigner.ts +0 -133
- package/src/onekey/index.ts +0 -213
- package/src/phantom/index.ts +0 -126
- package/src/polkadotjs/index.ts +0 -67
- package/src/radix/index.ts +0 -202
- package/src/talisman/index.ts +0 -130
- package/src/trezor/evmSigner.ts +0 -197
- package/src/trezor/index.ts +0 -260
- package/src/types.ts +0 -280
- package/src/utils.ts +0 -60
- package/src/vultisig/index.ts +0 -199
- package/src/vultisig/walletHelpers.ts +0 -359
- package/src/walletconnect/constants.ts +0 -104
- package/src/walletconnect/evmSigner.ts +0 -147
- package/src/walletconnect/helpers.ts +0 -77
- package/src/walletconnect/index.ts +0 -460
- package/src/walletconnect/namespaces.ts +0 -87
- package/src/walletconnect/types.ts +0 -6
- package/src/xaman/README.md +0 -66
- package/src/xaman/helpers.ts +0 -59
- package/src/xaman/index.ts +0 -79
- package/src/xaman/types.ts +0 -26
- package/src/xaman/walletMethods.ts +0 -126
- /package/dist/{chunk-mvbb9fwb.js.map → chunk-sbf0f2p4.js.map} +0 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { Chain, ChainId, type EVMChain, type GenericTransferParams } from "@swapkit/helpers";
|
|
2
|
+
import type { NearToolbox } from "@swapkit/toolboxes/near";
|
|
3
|
+
import { Psbt } from "bitcoinjs-lib";
|
|
4
|
+
export declare function getWalletMethods(chain: Chain): Promise<{
|
|
5
|
+
transfer: ({ recipient, assetValue, memo, feeRate, feeOptionKey, }: GenericTransferParams) => Promise<string>;
|
|
6
|
+
getAddress: () => Promise<string | undefined>;
|
|
7
|
+
getAccount: (address: string) => Promise<import("@cosmjs/stargate").Account | null>;
|
|
8
|
+
getBalance: (address: string, _potentialScamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
9
|
+
getSignerFromPhrase: ({ phrase, derivationPath, }: {
|
|
10
|
+
phrase: string;
|
|
11
|
+
derivationPath: import("@swapkit/helpers").DerivationPathArray;
|
|
12
|
+
}) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1HdWallet>;
|
|
13
|
+
getSignerFromPrivateKey: (privateKey: Uint8Array) => Promise<import("@cosmjs/proto-signing").DirectSecp256k1Wallet>;
|
|
14
|
+
createPrivateKeyFromPhrase: (phrase: string) => Promise<Uint8Array<ArrayBufferLike>>;
|
|
15
|
+
validateAddress: (address: string) => boolean;
|
|
16
|
+
getPubKey: () => Promise<string>;
|
|
17
|
+
getFees: () => Promise<{
|
|
18
|
+
average: import("@swapkit/helpers").SwapKitNumber;
|
|
19
|
+
fast: import("@swapkit/helpers").SwapKitNumber;
|
|
20
|
+
fastest: import("@swapkit/helpers").SwapKitNumber;
|
|
21
|
+
}>;
|
|
22
|
+
fetchFeeRateFromSwapKit: typeof import("@swapkit/toolboxes/cosmos").fetchFeeRateFromSwapKit;
|
|
23
|
+
getBalanceAsDenoms: (address: string) => Promise<{
|
|
24
|
+
denom: string;
|
|
25
|
+
amount: string;
|
|
26
|
+
}[]>;
|
|
27
|
+
createTransaction: ({ sender, recipient, assetValue, memo, feeRate, sequence, accountNumber, }: import("@swapkit/toolboxes/cosmos").CosmosCreateTransactionParams) => Promise<{
|
|
28
|
+
accountNumber: number;
|
|
29
|
+
chainId: ChainId;
|
|
30
|
+
fee: {
|
|
31
|
+
amount: {
|
|
32
|
+
denom: string;
|
|
33
|
+
amount: string;
|
|
34
|
+
}[];
|
|
35
|
+
gas: string;
|
|
36
|
+
};
|
|
37
|
+
memo: string;
|
|
38
|
+
sequence: number;
|
|
39
|
+
msgs: {
|
|
40
|
+
typeUrl: string;
|
|
41
|
+
value: {
|
|
42
|
+
fromAddress: string;
|
|
43
|
+
toAddress: string;
|
|
44
|
+
amount: {
|
|
45
|
+
amount: string;
|
|
46
|
+
denom: string;
|
|
47
|
+
}[];
|
|
48
|
+
};
|
|
49
|
+
}[];
|
|
50
|
+
}>;
|
|
51
|
+
verifySignature: ({ signature, message, address, }: {
|
|
52
|
+
signature: string;
|
|
53
|
+
message: string;
|
|
54
|
+
address: string;
|
|
55
|
+
}) => Promise<boolean>;
|
|
56
|
+
} | {
|
|
57
|
+
address: string;
|
|
58
|
+
multicall: (callTuples: {
|
|
59
|
+
address: string;
|
|
60
|
+
data: string;
|
|
61
|
+
}[], multicallAddress?: string, funcName?: string, feeOptionKey?: import("@swapkit/helpers").FeeOption) => Promise<string>;
|
|
62
|
+
getNetworkParams: () => undefined;
|
|
63
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
64
|
+
getAddress: () => Promise<string> | undefined;
|
|
65
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
66
|
+
feeOption: import("@swapkit/helpers").FeeOption;
|
|
67
|
+
chain: EVMChain;
|
|
68
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
69
|
+
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
70
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
71
|
+
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
72
|
+
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
73
|
+
approvedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<bigint>;
|
|
74
|
+
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
75
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
76
|
+
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
77
|
+
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
78
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
79
|
+
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
80
|
+
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EVMTransferParams & {
|
|
81
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
82
|
+
funcName?: string;
|
|
83
|
+
funcParams?: unknown[];
|
|
84
|
+
txOverrides?: import("@swapkit/toolboxes/evm").EVMTxParams;
|
|
85
|
+
data?: string;
|
|
86
|
+
}) => Promise<bigint>;
|
|
87
|
+
estimateGasPrices: () => Promise<{ [key in import("@swapkit/helpers").FeeOption]: {
|
|
88
|
+
l1GasPrice?: bigint;
|
|
89
|
+
gasPrice?: bigint;
|
|
90
|
+
maxFeePerGas?: bigint;
|
|
91
|
+
maxPriorityFeePerGas?: bigint;
|
|
92
|
+
}; }>;
|
|
93
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount, }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<boolean>;
|
|
94
|
+
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
95
|
+
feeOptionKey?: import("@swapkit/helpers").FeeOption;
|
|
96
|
+
}) => Promise<string>;
|
|
97
|
+
signMessage: ((message: string | Uint8Array) => Promise<string>) | ((message: string | Uint8Array) => Promise<string>) | ((_message: string | Uint8Array) => Promise<string>) | undefined;
|
|
98
|
+
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
99
|
+
validateAddress: (address: string) => boolean;
|
|
100
|
+
} | {
|
|
101
|
+
address: string;
|
|
102
|
+
getNetworkParams: () => import("@swapkit/helpers").NetworkParams;
|
|
103
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
104
|
+
getAddress: () => Promise<string> | undefined;
|
|
105
|
+
estimateTransactionFee: ({ feeOption, chain, ...txObject }: import("@swapkit/toolboxes/evm").EIP1559TxParams & {
|
|
106
|
+
feeOption: import("@swapkit/helpers").FeeOption;
|
|
107
|
+
chain: EVMChain;
|
|
108
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
109
|
+
call: <T_1>({ callProvider, contractAddress, abi, funcName, funcParams, txOverrides, feeOption, }: import("@swapkit/toolboxes/evm").CallParams) => Promise<T_1>;
|
|
110
|
+
estimateCall: ({ contractAddress, abi, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EstimateCallParams) => Promise<bigint>;
|
|
111
|
+
EIP1193SendTransaction: ({ value, ...params }: import("@swapkit/toolboxes/evm").EVMTxParams | import("ethers").ContractTransaction) => Promise<string>;
|
|
112
|
+
approve: ({ assetAddress, spenderAddress, feeOptionKey, amount, gasLimitFallback, from: fromParam, nonce, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<string>;
|
|
113
|
+
approvedAmount: ({ assetAddress, spenderAddress, from }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<bigint>;
|
|
114
|
+
broadcastTransaction: ((signedTx: string) => Promise<import("ethers").TransactionResponse>) | ((signedTx: string) => Promise<import("ethers").TransactionResponse>);
|
|
115
|
+
createApprovalTx: ({ assetAddress, spenderAddress, amount, from: fromParam, }: import("@swapkit/toolboxes/evm").ApproveParams) => Promise<import("ethers").ContractTransaction>;
|
|
116
|
+
createContract: (address: string, abi: readonly (import("ethers").JsonFragment | import("ethers").Fragment)[]) => import("ethers").Contract;
|
|
117
|
+
createContractTxObject: ({ contractAddress, abi, funcName, funcParams, txOverrides }: import("@swapkit/toolboxes/evm").CallParams) => Promise<import("ethers").ContractTransaction>;
|
|
118
|
+
createTransferTx: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
119
|
+
createTransaction: ({ assetValue, memo, recipient, data, sender: fromOverride, maxFeePerGas, maxPriorityFeePerGas, gasPrice, ...tx }: import("@swapkit/toolboxes/evm").EVMCreateTransactionParams) => Promise<import("ethers").ContractTransaction>;
|
|
120
|
+
estimateGasLimit: ({ assetValue, recipient, memo, data, sender, funcName, funcParams, txOverrides, }: import("@swapkit/toolboxes/evm").EVMTransferParams & {
|
|
121
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
122
|
+
funcName?: string;
|
|
123
|
+
funcParams?: unknown[];
|
|
124
|
+
txOverrides?: import("@swapkit/toolboxes/evm").EVMTxParams;
|
|
125
|
+
data?: string;
|
|
126
|
+
}) => Promise<bigint>;
|
|
127
|
+
estimateGasPrices: () => Promise<{ [key in import("@swapkit/helpers").FeeOption]: {
|
|
128
|
+
l1GasPrice?: bigint;
|
|
129
|
+
gasPrice?: bigint;
|
|
130
|
+
maxFeePerGas?: bigint;
|
|
131
|
+
maxPriorityFeePerGas?: bigint;
|
|
132
|
+
}; }>;
|
|
133
|
+
isApproved: ({ assetAddress, spenderAddress, from, amount, }: import("@swapkit/toolboxes/evm").IsApprovedParams) => Promise<boolean>;
|
|
134
|
+
sendTransaction: ({ feeOptionKey, ...tx }: import("@swapkit/toolboxes/evm").EVMTxParams & {
|
|
135
|
+
feeOptionKey?: import("@swapkit/helpers").FeeOption;
|
|
136
|
+
}) => Promise<string>;
|
|
137
|
+
signMessage: ((message: string | Uint8Array) => Promise<string>) | ((message: string | Uint8Array) => Promise<string>) | ((_message: string | Uint8Array) => Promise<string>) | undefined;
|
|
138
|
+
transfer: ({ assetValue, memo, recipient, feeOptionKey, sender, ...tx }: import("@swapkit/toolboxes/evm").EVMTransferParams) => Promise<string>;
|
|
139
|
+
validateAddress: (address: string) => boolean;
|
|
140
|
+
} | {
|
|
141
|
+
address: string;
|
|
142
|
+
accumulative: ({ inputs, outputs, feeRate: initialFeeRate, chain, }: import("@swapkit/toolboxes/utxo").UTXOCalculateTxSizeParams & {
|
|
143
|
+
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
144
|
+
chain: import("@swapkit/helpers").UTXOChain;
|
|
145
|
+
}) => {
|
|
146
|
+
inputs: (import("@swapkit/toolboxes/utxo").UTXOType | import("@swapkit/toolboxes/utxo").UTXOInputWithScriptType)[];
|
|
147
|
+
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
148
|
+
fee: number;
|
|
149
|
+
} | {
|
|
150
|
+
fee: number;
|
|
151
|
+
inputs?: undefined;
|
|
152
|
+
outputs?: undefined;
|
|
153
|
+
};
|
|
154
|
+
calculateTxSize: ({ inputs, outputs, feeRate }: import("@swapkit/toolboxes/utxo").UTXOCalculateTxSizeParams) => number;
|
|
155
|
+
getAddressFromKeys: (keys: import("ecpair").ECPairInterface | import("@swapkit/toolboxes/utxo").BchECPair) => string;
|
|
156
|
+
getAddress: () => Promise<string | undefined>;
|
|
157
|
+
validateAddress: (address: string) => boolean;
|
|
158
|
+
broadcastTx: (txHash: string) => Promise<string>;
|
|
159
|
+
createTransaction: ({ assetValue, recipient, memo, feeRate, sender, fetchTxHex, }: import("@swapkit/toolboxes/utxo").UTXOBuildTxParams) => Promise<{
|
|
160
|
+
psbt: Psbt;
|
|
161
|
+
utxos: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
162
|
+
inputs: import("@swapkit/toolboxes/utxo").UTXOType[];
|
|
163
|
+
}>;
|
|
164
|
+
createKeysForPath: (params: {
|
|
165
|
+
wif?: string;
|
|
166
|
+
phrase?: string;
|
|
167
|
+
derivationPath?: string;
|
|
168
|
+
}) => import("ecpair").ECPairInterface;
|
|
169
|
+
getFeeRates: () => Promise<{
|
|
170
|
+
average: number;
|
|
171
|
+
fast: number;
|
|
172
|
+
fastest: number;
|
|
173
|
+
}>;
|
|
174
|
+
getInputsOutputsFee: ({ assetValue, feeOptionKey, feeRate, memo, sender, recipient, }: Omit<import("@swapkit/toolboxes/utxo").UTXOBuildTxParams, "feeRate"> & {
|
|
175
|
+
feeOptionKey?: import("@swapkit/helpers").FeeOption;
|
|
176
|
+
feeRate?: number;
|
|
177
|
+
}) => Promise<{
|
|
178
|
+
inputs: (import("@swapkit/toolboxes/utxo").UTXOType | import("@swapkit/toolboxes/utxo").UTXOInputWithScriptType)[];
|
|
179
|
+
outputs: import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
180
|
+
fee: number;
|
|
181
|
+
} | {
|
|
182
|
+
fee: number;
|
|
183
|
+
inputs?: undefined;
|
|
184
|
+
outputs?: undefined;
|
|
185
|
+
}>;
|
|
186
|
+
transfer: ({ memo, recipient, feeOptionKey, feeRate, assetValue, }: import("@swapkit/toolboxes/utxo").UTXOTransferParams) => Promise<string>;
|
|
187
|
+
getPrivateKeyFromMnemonic: (params: {
|
|
188
|
+
phrase: string;
|
|
189
|
+
derivationPath: string;
|
|
190
|
+
}) => string;
|
|
191
|
+
getBalance: (address: string, scamFilter?: boolean) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
192
|
+
estimateTransactionFee: (params: {
|
|
193
|
+
assetValue: import("@swapkit/helpers").AssetValue;
|
|
194
|
+
recipient: string;
|
|
195
|
+
sender: string;
|
|
196
|
+
memo?: string;
|
|
197
|
+
feeOptionKey?: import("@swapkit/helpers").FeeOption;
|
|
198
|
+
feeRate?: number;
|
|
199
|
+
fetchTxHex?: boolean;
|
|
200
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
201
|
+
estimateMaxSendableAmount: ({ from, memo, feeRate, feeOptionKey, recipients, }: {
|
|
202
|
+
from: string;
|
|
203
|
+
memo?: string;
|
|
204
|
+
feeRate?: number;
|
|
205
|
+
feeOptionKey?: import("@swapkit/helpers").FeeOption;
|
|
206
|
+
recipients?: number | import("@swapkit/toolboxes/utxo").TargetOutput[];
|
|
207
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
208
|
+
} | (NearToolbox & {
|
|
209
|
+
address: string;
|
|
210
|
+
}) | {
|
|
211
|
+
address: string;
|
|
212
|
+
tronWeb: import("tronweb").TronWeb;
|
|
213
|
+
getAddress: () => Promise<string>;
|
|
214
|
+
validateAddress: (address: string) => boolean;
|
|
215
|
+
getBalance: (address: string) => Promise<import("@swapkit/helpers").AssetValue[]>;
|
|
216
|
+
transfer: (params: import("@swapkit/toolboxes/tron").TronTransferParams) => Promise<string>;
|
|
217
|
+
estimateTransactionFee: (params: import("@swapkit/toolboxes/tron").TronTransferParams & {
|
|
218
|
+
sender?: string;
|
|
219
|
+
}) => Promise<import("@swapkit/helpers").AssetValue>;
|
|
220
|
+
createTransaction: (params: import("@swapkit/toolboxes/tron").TronCreateTransactionParams) => Promise<any>;
|
|
221
|
+
signTransaction: (transaction: any) => Promise<any>;
|
|
222
|
+
broadcastTransaction: (signedTransaction: any) => Promise<string>;
|
|
223
|
+
approve: (params: import("@swapkit/toolboxes/tron").ApproveParams) => Promise<string>;
|
|
224
|
+
isApproved: (params: import("@swapkit/toolboxes/tron").IsApprovedParams) => Promise<boolean>;
|
|
225
|
+
getApprovedAmount: (params: import("@swapkit/toolboxes/tron").ApprovedParams) => Promise<bigint>;
|
|
226
|
+
}>;
|
|
227
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/okx/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,OAAO,EACP,KAAK,QAAQ,EACb,KAAK,qBAAqB,EAK3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAkDrC,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,KAAK;;;;sDAnBb,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAhC4B,CAAC,kBAC1D,CAAC,sBAAsB,CAAC;;4CAKY,CAAC;;iDAG3C,GAAD;;;;;;sCAemB,GAAI;;;;;;;gIAkCX,GAAI;iIAUD,GACjB;;;gBAQsB,CAAA;kBAA4B,CAAC;mBAAgC,CAAC;YAE7D,CAAC;;;kBAKjB,CAAD;gBAA0B,CAAC;oBAA8B,CAAC;4BAGrD,CAAC;;;sCAKP,GAAG;oBACgC,CAAC;;;oEAWF,GAAI;;;;;4CAMW,CAAA;;iDAKpB,GAAI;;;;;;sCAUmB,GAAI;;;;;;;gIA2BxD,GAEL;iIAKmB,GAAI;;;gBAYgB,CAAC;kBAA4B,CAAC;mBAAgC,CAAC;YAAwC,CAAC;;;kBAA+I,CAAC;gBAA0B,CAAC;oBAA8B,CAAC;4BAAsC,CAAC;;;sCAAgL,GAAI;oBAAuD,CAAC;;;oEAAqU,GAAI;;;;;;;;;;;;;cA9Iv6B,CAAC;eAEC,CAAC;;;;;;;;;;;;;WAUN,CAAC;cAAwB,CAAC;sBAChC,CAAJ;;;;;;;;oBAyCqD,CAAC;eAC1C,CAAC;;;;;;;cAKE,CAAC;eAAwB,CAAC;;;;;;;4CA7BhC,CAAC;;;;;YAQN,CAAF;oBACU,CAAC;eAA6B,CAAA;kBAClC,CAAF;;;;YAKE,CAAV;eAA0B,CAAA;oBAElB,CAAP;kBAA+B,CAAC;;;aA4D2C,MAAM;;;;;;;;;cA1HhD,CAAC;;;;;;;;GA2JlC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Chain } from "@swapkit/helpers";
|
|
2
|
+
export declare const okxWallet: {
|
|
3
|
+
connectOkx: {
|
|
4
|
+
connectWallet: (connectParams: {
|
|
5
|
+
addChain: import("@swapkit/helpers").AddChainType;
|
|
6
|
+
}) => (chains: Chain[]) => Promise<boolean>;
|
|
7
|
+
supportedChains: (Chain.Arbitrum | Chain.Aurora | Chain.Avalanche | Chain.Base | Chain.Berachain | Chain.BinanceSmartChain | Chain.Bitcoin | Chain.Cosmos | Chain.Ethereum | Chain.Gnosis | Chain.Near | Chain.Optimism | Chain.Polygon | Chain.Tron)[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const OKX_SUPPORTED_CHAINS: (Chain.Arbitrum | Chain.Aurora | Chain.Avalanche | Chain.Base | Chain.Berachain | Chain.BinanceSmartChain | Chain.Bitcoin | Chain.Cosmos | Chain.Ethereum | Chain.Gnosis | Chain.Near | Chain.Optimism | Chain.Polygon | Chain.Tron)[];
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/okx/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAuC,MAAM,kBAAkB,CAAC;AAK9E,eAAO,MAAM,SAAS;;;;;;;CAmCpB,CAAC;AAEH,eAAO,MAAM,oBAAoB,wOAAsC,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { StdSignDoc } from "@cosmjs/amino";
|
|
2
|
+
export declare enum BroadcastMode {
|
|
3
|
+
/** Return after tx commit */
|
|
4
|
+
Block = "block",
|
|
5
|
+
/** Return after CheckTx */
|
|
6
|
+
Sync = "sync",
|
|
7
|
+
/** Return right away */
|
|
8
|
+
Async = "async"
|
|
9
|
+
}
|
|
10
|
+
export interface Coin {
|
|
11
|
+
readonly denom: string;
|
|
12
|
+
readonly amount: string;
|
|
13
|
+
}
|
|
14
|
+
export interface StdFee {
|
|
15
|
+
readonly amount: readonly Coin[];
|
|
16
|
+
readonly gas: string;
|
|
17
|
+
readonly payer?: string;
|
|
18
|
+
readonly granter?: string;
|
|
19
|
+
readonly feePayer?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface Msg {
|
|
22
|
+
readonly type: string;
|
|
23
|
+
readonly value: any;
|
|
24
|
+
}
|
|
25
|
+
export interface PubKey {
|
|
26
|
+
readonly type: string;
|
|
27
|
+
readonly value: string;
|
|
28
|
+
}
|
|
29
|
+
export interface StdSignature {
|
|
30
|
+
readonly pub_key: PubKey;
|
|
31
|
+
readonly signature: string;
|
|
32
|
+
}
|
|
33
|
+
export interface StdTx {
|
|
34
|
+
readonly msg: readonly Msg[];
|
|
35
|
+
readonly fee: StdFee;
|
|
36
|
+
readonly signatures: readonly StdSignature[];
|
|
37
|
+
readonly memo: string | undefined;
|
|
38
|
+
}
|
|
39
|
+
export interface AminoSignResponse {
|
|
40
|
+
readonly signed: StdSignDoc;
|
|
41
|
+
readonly signature: StdSignature;
|
|
42
|
+
}
|
|
43
|
+
export interface SignDoc {
|
|
44
|
+
/**
|
|
45
|
+
* body_bytes is protobuf serialization of a TxBody that matches the
|
|
46
|
+
* representation in TxRaw.
|
|
47
|
+
*/
|
|
48
|
+
bodyBytes: Uint8Array;
|
|
49
|
+
/**
|
|
50
|
+
* auth_info_bytes is a protobuf serialization of an AuthInfo that matches the
|
|
51
|
+
* representation in TxRaw.
|
|
52
|
+
*/
|
|
53
|
+
authInfoBytes: Uint8Array;
|
|
54
|
+
/**
|
|
55
|
+
* chain_id is the unique identifier of the chain this transaction targets.
|
|
56
|
+
* It prevents signed transactions from being used on another chain by an
|
|
57
|
+
* attacker
|
|
58
|
+
*/
|
|
59
|
+
chainId: string;
|
|
60
|
+
/** account_number is the account number of the account in state */
|
|
61
|
+
accountNumber: any;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* This is the same as Algo from @cosmjs/launchpad but those might diverge in the future.
|
|
65
|
+
*/
|
|
66
|
+
export type Algo = "secp256k1" | "ed25519" | "sr25519";
|
|
67
|
+
/**
|
|
68
|
+
* This is the same as AccountData from @cosmjs/launchpad but those might diverge in the future.
|
|
69
|
+
*/
|
|
70
|
+
export interface AccountData {
|
|
71
|
+
/** A printable address (typically bech32 encoded) */
|
|
72
|
+
readonly address: string;
|
|
73
|
+
readonly algo: Algo;
|
|
74
|
+
readonly pubkey: Uint8Array;
|
|
75
|
+
}
|
|
76
|
+
export interface DirectSignResponse {
|
|
77
|
+
/**
|
|
78
|
+
* The sign doc that was signed.
|
|
79
|
+
* This may be different from the input signDoc when the signer modifies it as part of the signing process.
|
|
80
|
+
*/
|
|
81
|
+
readonly signed: SignDoc;
|
|
82
|
+
readonly signature: StdSignature;
|
|
83
|
+
}
|
|
84
|
+
export interface OfflineDirectSigner {
|
|
85
|
+
readonly getAccounts: () => Promise<readonly AccountData[]>;
|
|
86
|
+
readonly signDirect: (signerAddress: string, signDoc: SignDoc) => Promise<DirectSignResponse>;
|
|
87
|
+
}
|
|
88
|
+
export interface OfflineAminoSigner {
|
|
89
|
+
/**
|
|
90
|
+
* Get AccountData array from wallet. Rejects if not enabled.
|
|
91
|
+
*/
|
|
92
|
+
readonly getAccounts: () => Promise<readonly AccountData[]>;
|
|
93
|
+
/**
|
|
94
|
+
* Request signature from whichever key corresponds to provided bech32-encoded address. Rejects if not enabled.
|
|
95
|
+
*
|
|
96
|
+
* The signer implementation may offer the user the ability to override parts of the signDoc. It must
|
|
97
|
+
* return the doc that was signed in the response.
|
|
98
|
+
*
|
|
99
|
+
* @param signerAddress The address of the account that should sign the transaction
|
|
100
|
+
* @param signDoc The content that should be signed
|
|
101
|
+
*/
|
|
102
|
+
readonly signAmino: (signerAddress: string, signDoc: StdSignDoc) => Promise<AminoSignResponse>;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/okx/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Chain, DerivationPathArray } from "@swapkit/helpers";
|
|
2
|
+
import type { JsonRpcProvider, Provider, Signer, TypedDataDomain, TypedDataField } from "ethers";
|
|
3
|
+
type OneKeyEVMSignerParams = {
|
|
4
|
+
chain: Chain;
|
|
5
|
+
derivationPath: DerivationPathArray;
|
|
6
|
+
provider: Provider | JsonRpcProvider;
|
|
7
|
+
};
|
|
8
|
+
export declare function getEVMSigner({ chain, derivationPath, provider }: OneKeyEVMSignerParams): Promise<{
|
|
9
|
+
address: string;
|
|
10
|
+
chain: Chain;
|
|
11
|
+
derivationPath: DerivationPathArray;
|
|
12
|
+
readonly provider: Provider | JsonRpcProvider;
|
|
13
|
+
connect(provider: null | Provider): Signer;
|
|
14
|
+
signTypedData(domain: TypedDataDomain, types: Record<string, TypedDataField[]>, value: Record<string, any>): Promise<string>;
|
|
15
|
+
getAddress: () => Promise<string>;
|
|
16
|
+
signMessage: (message: string) => Promise<string>;
|
|
17
|
+
signTransaction: (transaction: any) => Promise<string>;
|
|
18
|
+
getNonce(blockTag?: import("ethers").BlockTag): Promise<number>;
|
|
19
|
+
populateCall(tx: import("ethers").TransactionRequest): Promise<import("ethers").TransactionLike<string>>;
|
|
20
|
+
populateTransaction(tx: import("ethers").TransactionRequest): Promise<import("ethers").TransactionLike<string>>;
|
|
21
|
+
populateAuthorization(_auth: import("ethers").AuthorizationRequest): Promise<import("ethers").AuthorizationRequest>;
|
|
22
|
+
estimateGas(tx: import("ethers").TransactionRequest): Promise<bigint>;
|
|
23
|
+
call(tx: import("ethers").TransactionRequest): Promise<string>;
|
|
24
|
+
resolveName(name: string): Promise<null | string>;
|
|
25
|
+
sendTransaction(tx: import("ethers").TransactionRequest): Promise<import("ethers").TransactionResponse>;
|
|
26
|
+
authorize(authorization: import("ethers").AuthorizationRequest): Promise<import("ethers").Authorization>;
|
|
27
|
+
}>;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=evmSigner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evmSigner.d.ts","sourceRoot":"","sources":["../../../src/onekey/evmSigner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEnE,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAEjG,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,cAAc,EAAE,mBAAmB,CAAC;IACpC,QAAQ,EAAE,QAAQ,GAAG,eAAe,CAAC;CACtC,CAAC;AAEF,wBAAsB,YAAY,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,EAAE,qBAAqB;aAIhF,MAAM;WACR,KAAK;oBACI,mBAAmB;uBAChB,QAAQ,GAAG,eAAe;sBAW3B,IAAI,GAAG,QAAQ,GAAG,MAAM;0BAgBhC,eAAe,SAChB,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,SAChC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GACzB,OAAO,CAAC,MAAM,CAAC;;kBAoCG,SAAS,MAAM;sBAYX,aAAa,GAAG;;;;;;;;;;GAqC5C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Chain } from "@swapkit/helpers";
|
|
2
|
+
export declare const onekeyWallet: {
|
|
3
|
+
connectOnekeyWallet: {
|
|
4
|
+
connectWallet: (connectParams: {
|
|
5
|
+
addChain: import("@swapkit/helpers").AddChainType;
|
|
6
|
+
}) => (chains: Chain[]) => Promise<boolean>;
|
|
7
|
+
supportedChains: (Chain.Arbitrum | Chain.Aurora | Chain.Avalanche | Chain.Base | Chain.BinanceSmartChain | Chain.Bitcoin | Chain.Ethereum | Chain.Gnosis | Chain.Optimism | Chain.Polygon | Chain.Solana)[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const ONEKEY_WALLET_SUPPORTED_CHAINS: (Chain.Arbitrum | Chain.Aurora | Chain.Avalanche | Chain.Base | Chain.BinanceSmartChain | Chain.Bitcoin | Chain.Ethereum | Chain.Gnosis | Chain.Optimism | Chain.Polygon | Chain.Solana)[];
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/onekey/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAQN,MAAM,kBAAkB,CAAC;AAiK1B,eAAO,MAAM,YAAY;;;;;;;CAuCvB,CAAC;AAEH,eAAO,MAAM,8BAA8B,4LAAyC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Chain } from "@swapkit/helpers";
|
|
2
|
+
export declare const phantomWallet: {
|
|
3
|
+
connectPhantom: {
|
|
4
|
+
connectWallet: (connectParams: {
|
|
5
|
+
addChain: import("@swapkit/helpers").AddChainType;
|
|
6
|
+
}) => (chains: Chain[]) => Promise<boolean>;
|
|
7
|
+
supportedChains: (Chain.Bitcoin | Chain.Ethereum | Chain.Solana)[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const PHANTOM_SUPPORTED_CHAINS: (Chain.Bitcoin | Chain.Ethereum | Chain.Solana)[];
|
|
11
|
+
export type PhantomSupportedChain = (typeof PHANTOM_SUPPORTED_CHAINS)[number];
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/phantom/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EAKN,MAAM,kBAAkB,CAAC;AAG1B,eAAO,MAAM,aAAa;;;;;;;CAwBxB,CAAC;AAEH,eAAO,MAAM,wBAAwB,mDAA0C,CAAC;AAChF,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Chain } from "@swapkit/helpers";
|
|
2
|
+
export declare const polkadotWallet: {
|
|
3
|
+
connectPolkadotJs: {
|
|
4
|
+
connectWallet: (connectParams: {
|
|
5
|
+
addChain: import("@swapkit/helpers").AddChainType;
|
|
6
|
+
}) => (chains: Chain[]) => Promise<boolean>;
|
|
7
|
+
supportedChains: Chain.Polkadot[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const POLKADOT_SUPPORTED_CHAINS: Chain.Polkadot[];
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/polkadotjs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAqD,MAAM,kBAAkB,CAAC;AAG5F,eAAO,MAAM,cAAc;;;;;;;CAkBzB,CAAC;AAEH,eAAO,MAAM,yBAAyB,kBAA2C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Chain } from "@swapkit/helpers";
|
|
2
|
+
export declare const radixWallet: {
|
|
3
|
+
connectRadixWallet: {
|
|
4
|
+
connectWallet: (connectParams: {
|
|
5
|
+
addChain: import("@swapkit/helpers").AddChainType;
|
|
6
|
+
}) => (chains: Chain[]) => Promise<boolean>;
|
|
7
|
+
supportedChains: Chain.Radix[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const RADIX_SUPPORTED_CHAINS: Chain.Radix[];
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/radix/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,EAKN,MAAM,kBAAkB,CAAC;AAG1B,eAAO,MAAM,WAAW;;;;;;;CAuBtB,CAAC;AAEH,eAAO,MAAM,sBAAsB,eAAwC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Chain } from "@swapkit/helpers";
|
|
2
|
+
export declare const talismanWallet: {
|
|
3
|
+
connectTalisman: {
|
|
4
|
+
connectWallet: (connectParams: {
|
|
5
|
+
addChain: import("@swapkit/helpers").AddChainType;
|
|
6
|
+
}) => (chains: Chain[]) => Promise<boolean>;
|
|
7
|
+
supportedChains: (Chain.Arbitrum | Chain.Avalanche | Chain.Base | Chain.BinanceSmartChain | Chain.Ethereum | Chain.Optimism | Chain.Polkadot | Chain.Chainflip | Chain.Polygon)[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const TALISMAN_SUPPORTED_CHAINS: (Chain.Arbitrum | Chain.Avalanche | Chain.Base | Chain.BinanceSmartChain | Chain.Ethereum | Chain.Optimism | Chain.Polkadot | Chain.Chainflip | Chain.Polygon)[];
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/talisman/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAON,MAAM,kBAAkB,CAAC;AAI1B,eAAO,MAAM,cAAc;;;;;;;CA4BzB,CAAC;AAEH,eAAO,MAAM,yBAAyB,kKAA2C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trezor.d.ts","sourceRoot":"","sources":["../../src/trezor.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC"}
|