@swapkit/types
Advanced tools
Comparing version 0.0.0-nightly-20240208140027 to 0.0.0-nightly-20240223171610
1255
dist/index.d.ts
/// <reference types="node" /> | ||
export declare type AddChainWalletParams = { | ||
chain: Chain; | ||
wallet: ChainWallet; | ||
walletMethods: any; | ||
export declare type AddChainWalletParams<T extends Chain> = { | ||
address: string; | ||
balance: any[]; | ||
walletType: WalletOption; | ||
chain: T; | ||
[key: string]: any; | ||
}; | ||
@@ -11,129 +13,98 @@ | ||
export declare class ApiError extends Error { | ||
readonly status: number; | ||
readonly revision: string; | ||
readonly type?: ERROR_TYPE; | ||
readonly module: ERROR_MODULE; | ||
readonly code: ERROR_CODE; | ||
readonly message: string; | ||
readonly display: string; | ||
readonly stack?: string; | ||
readonly options: ApiErrorOptions; | ||
readonly displayMessageParams?: string[]; | ||
constructor({ | ||
status, | ||
revision, | ||
module, | ||
code, | ||
message, | ||
type, | ||
options: { shouldLog, shouldThrow, shouldTrace }, | ||
displayMessageParams, | ||
}: ErrorInfo); | ||
static fromErrorInfo(errorInfo: ErrorInfo): ApiError; | ||
toErrorInfo(): ErrorInfo; | ||
get identifier(): string; | ||
get displayMessage(): string; | ||
handle(): ErrorInfo; | ||
} | ||
export declare type ApiErrorOptions = { | ||
shouldLog?: boolean; | ||
shouldTrace?: boolean; | ||
shouldThrow?: boolean; | ||
}; | ||
declare type ApisType = { | ||
[key in UTXOChain]?: string | any; | ||
[key in UTXOChain]?: string | any; | ||
} & { | ||
[key in EVMChain]?: string | any; | ||
[key in EVMChain]?: string | any; | ||
} & { | ||
[key in CosmosChain]?: string; | ||
[key in CosmosChain]?: string; | ||
}; | ||
export declare enum ApiUrl { | ||
Cosmos = 'https://node-router.thorswap.net/cosmos/rest', | ||
Kujira = 'https://lcd-kujira.synergynodes.com/', | ||
MayanodeMainnet = 'https://mayanode.mayachain.info', | ||
MayanodeStagenet = 'https://stagenet.mayanode.mayachain.info', | ||
ThornodeMainnet = 'https://thornode.thorswap.net', | ||
ThornodeStagenet = 'https://stagenet-thornode.ninerealms.com', | ||
ThorswapApi = 'https://api.thorswap.net', | ||
ThorswapStatic = 'https://static.thorswap.net', | ||
Cosmos = "https://node-router.thorswap.net/cosmos/rest", | ||
Kujira = "https://lcd-kujira.synergynodes.com/", | ||
MayanodeMainnet = "https://mayanode.mayachain.info", | ||
MayanodeStagenet = "https://stagenet.mayanode.mayachain.info", | ||
ThornodeMainnet = "https://thornode.thorswap.net", | ||
ThornodeStagenet = "https://stagenet-thornode.ninerealms.com", | ||
ThorswapApi = "https://api.thorswap.net", | ||
ThorswapStatic = "https://static.thorswap.net" | ||
} | ||
export declare type Asset = { | ||
chain: Chain; | ||
symbol: string; | ||
ticker: string; | ||
synth?: boolean; | ||
chain: Chain; | ||
symbol: string; | ||
ticker: string; | ||
synth?: boolean; | ||
}; | ||
export declare enum BaseDecimal { | ||
ARB = 18, | ||
AVAX = 18, | ||
BCH = 8, | ||
BNB = 8, | ||
BSC = 18, | ||
BTC = 8, | ||
DASH = 8, | ||
DOGE = 8, | ||
DOT = 10, | ||
ETH = 18, | ||
FLIP = 18, | ||
GAIA = 6, | ||
KUJI = 6, | ||
LTC = 8, | ||
MATIC = 18, | ||
MAYA = 10, | ||
OP = 18, | ||
THOR = 8, | ||
ARB = 18, | ||
AVAX = 18, | ||
BCH = 8, | ||
BNB = 8, | ||
BSC = 18, | ||
BTC = 8, | ||
DASH = 8, | ||
DOGE = 8, | ||
DOT = 10, | ||
ETH = 18, | ||
FLIP = 18, | ||
GAIA = 6, | ||
KUJI = 6, | ||
LTC = 8, | ||
MATIC = 18, | ||
MAYA = 10, | ||
OP = 18, | ||
THOR = 8, | ||
ZEC = 8 | ||
} | ||
export declare enum Chain { | ||
Arbitrum = 'ARB', | ||
Avalanche = 'AVAX', | ||
Binance = 'BNB', | ||
BinanceSmartChain = 'BSC', | ||
Bitcoin = 'BTC', | ||
BitcoinCash = 'BCH', | ||
Cosmos = 'GAIA', | ||
Dogecoin = 'DOGE', | ||
Ethereum = 'ETH', | ||
Kujira = 'KUJI', | ||
Litecoin = 'LTC', | ||
Maya = 'MAYA', | ||
Optimism = 'OP', | ||
Polkadot = 'DOT', | ||
Chainflip = 'FLIP', | ||
Polygon = 'MATIC', | ||
THORChain = 'THOR', | ||
Arbitrum = "ARB", | ||
Avalanche = "AVAX", | ||
Binance = "BNB", | ||
BinanceSmartChain = "BSC", | ||
Bitcoin = "BTC", | ||
BitcoinCash = "BCH", | ||
Cosmos = "GAIA", | ||
Dash = "DASH", | ||
Dogecoin = "DOGE", | ||
Ethereum = "ETH", | ||
Kujira = "KUJI", | ||
Litecoin = "LTC", | ||
Maya = "MAYA", | ||
Optimism = "OP", | ||
Polkadot = "DOT", | ||
Chainflip = "FLIP", | ||
Polygon = "MATIC", | ||
THORChain = "THOR" | ||
} | ||
export declare enum ChainId { | ||
Arbitrum = '42161', | ||
ArbitrumHex = '0xa4b1', | ||
Avalanche = '43114', | ||
AvalancheHex = '0xa86a', | ||
Binance = 'Binance-Chain-Tigris', | ||
BinanceSmartChain = '56', | ||
BinanceSmartChainHex = '0x38', | ||
Bitcoin = 'bitcoin', | ||
BitcoinCash = 'bitcoincash', | ||
Chainflip = 'chainflip', | ||
Cosmos = 'cosmoshub-4', | ||
Dogecoin = 'dogecoin', | ||
Kujira = 'kaiyo-1', | ||
Ethereum = '1', | ||
EthereumHex = '0x1', | ||
Litecoin = 'litecoin', | ||
Maya = 'mayachain-mainnet-v1', | ||
MayaStagenet = 'mayachain-stagenet-v1', | ||
Optimism = '10', | ||
OptimismHex = '0xa', | ||
Polkadot = 'polkadot', | ||
Polygon = '137', | ||
PolygonHex = '0x89', | ||
THORChain = 'thorchain-mainnet-v1', | ||
THORChainStagenet = 'thorchain-stagenet-v2', | ||
Arbitrum = "42161", | ||
ArbitrumHex = "0xa4b1", | ||
Avalanche = "43114", | ||
AvalancheHex = "0xa86a", | ||
Binance = "Binance-Chain-Tigris", | ||
BinanceSmartChain = "56", | ||
BinanceSmartChainHex = "0x38", | ||
Bitcoin = "bitcoin", | ||
BitcoinCash = "bitcoincash", | ||
Chainflip = "chainflip", | ||
Cosmos = "cosmoshub-4", | ||
Dash = "dash", | ||
Dogecoin = "dogecoin", | ||
Kujira = "kaiyo-1", | ||
Ethereum = "1", | ||
EthereumHex = "0x1", | ||
Litecoin = "litecoin", | ||
Maya = "mayachain-mainnet-v1", | ||
MayaStagenet = "mayachain-stagenet-v1", | ||
Optimism = "10", | ||
OptimismHex = "0xa", | ||
Polkadot = "polkadot", | ||
Polygon = "137", | ||
PolygonHex = "0x89", | ||
THORChain = "thorchain-mainnet-v1", | ||
THORChainStagenet = "thorchain-stagenet-v2" | ||
} | ||
@@ -144,19 +115,20 @@ | ||
export declare const ChainToChainId: { | ||
ARB: ChainId; | ||
AVAX: ChainId; | ||
BNB: ChainId; | ||
BSC: ChainId; | ||
BTC: ChainId; | ||
BCH: ChainId; | ||
GAIA: ChainId; | ||
DOGE: ChainId; | ||
ETH: ChainId; | ||
KUJI: ChainId; | ||
LTC: ChainId; | ||
MAYA: ChainId; | ||
OP: ChainId; | ||
DOT: ChainId; | ||
FLIP: ChainId; | ||
MATIC: ChainId; | ||
THOR: ChainId; | ||
ARB: ChainId; | ||
AVAX: ChainId; | ||
BNB: ChainId; | ||
BSC: ChainId; | ||
BTC: ChainId; | ||
BCH: ChainId; | ||
GAIA: ChainId; | ||
DASH: ChainId; | ||
DOGE: ChainId; | ||
ETH: ChainId; | ||
KUJI: ChainId; | ||
LTC: ChainId; | ||
MAYA: ChainId; | ||
OP: ChainId; | ||
DOT: ChainId; | ||
FLIP: ChainId; | ||
MATIC: ChainId; | ||
THOR: ChainId; | ||
}; | ||
@@ -167,150 +139,139 @@ | ||
export declare const ChainToHexChainId: { | ||
ARB: ChainId; | ||
AVAX: ChainId; | ||
BNB: ChainId; | ||
BSC: ChainId; | ||
BTC: ChainId; | ||
BCH: ChainId; | ||
GAIA: ChainId; | ||
DOGE: ChainId; | ||
ETH: ChainId; | ||
KUJI: ChainId; | ||
LTC: ChainId; | ||
MAYA: ChainId; | ||
OP: ChainId; | ||
DOT: ChainId; | ||
FLIP: ChainId; | ||
MATIC: ChainId; | ||
THOR: ChainId; | ||
ARB: ChainId; | ||
AVAX: ChainId; | ||
BNB: ChainId; | ||
BSC: ChainId; | ||
BTC: ChainId; | ||
BCH: ChainId; | ||
GAIA: ChainId; | ||
DASH: ChainId; | ||
DOGE: ChainId; | ||
ETH: ChainId; | ||
KUJI: ChainId; | ||
LTC: ChainId; | ||
MAYA: ChainId; | ||
OP: ChainId; | ||
DOT: ChainId; | ||
FLIP: ChainId; | ||
MATIC: ChainId; | ||
THOR: ChainId; | ||
}; | ||
export declare const ChainToRPC: { | ||
ARB: RPCUrl; | ||
AVAX: RPCUrl; | ||
BNB: RPCUrl; | ||
BSC: RPCUrl; | ||
BTC: RPCUrl; | ||
BCH: RPCUrl; | ||
GAIA: RPCUrl; | ||
DOGE: RPCUrl; | ||
ETH: RPCUrl; | ||
KUJI: RPCUrl; | ||
LTC: RPCUrl; | ||
MAYA: RPCUrl; | ||
OP: RPCUrl; | ||
DOT: RPCUrl; | ||
FLIP: RPCUrl; | ||
MATIC: RPCUrl; | ||
THOR: RPCUrl; | ||
ARB: RPCUrl; | ||
AVAX: RPCUrl; | ||
BNB: RPCUrl; | ||
BSC: RPCUrl; | ||
BTC: RPCUrl; | ||
BCH: RPCUrl; | ||
GAIA: RPCUrl; | ||
DASH: RPCUrl; | ||
DOGE: RPCUrl; | ||
ETH: RPCUrl; | ||
KUJI: RPCUrl; | ||
LTC: RPCUrl; | ||
MAYA: RPCUrl; | ||
OP: RPCUrl; | ||
DOT: RPCUrl; | ||
FLIP: RPCUrl; | ||
MATIC: RPCUrl; | ||
THOR: RPCUrl; | ||
}; | ||
declare type ChainWallet = { | ||
address: string; | ||
balance: any[]; | ||
walletType: WalletOption; | ||
}; | ||
export declare type ConnectConfig = { | ||
stagenet?: boolean; | ||
/** | ||
* @required | ||
*/ | ||
thorswapApiKey?: string; | ||
/** | ||
* @required for AVAX & BSC | ||
*/ | ||
covalentApiKey?: string; | ||
/** | ||
* @required for ETH | ||
*/ | ||
ethplorerApiKey?: string; | ||
/** | ||
* @required for BTC, BCH, LTC, DOGE | ||
*/ | ||
blockchairApiKey?: string; | ||
/** | ||
* @deprecated - use blockchairApiKey instead | ||
*/ | ||
utxoApiKey?: string; | ||
/** | ||
* @required for Walletconnect | ||
*/ | ||
walletConnectProjectId?: string; | ||
/** | ||
* @optional for Trezor config | ||
*/ | ||
trezorManifest?: { | ||
email: string; | ||
appUrl: string; | ||
}; | ||
/** | ||
* @optional for KeepKey config | ||
*/ | ||
keepkeyConfig?: { | ||
apiKey: string; | ||
pairingInfo: { | ||
name: string; | ||
imageUrl: string; | ||
basePath: string; | ||
url: string; | ||
stagenet?: boolean; | ||
/** | ||
* @required | ||
*/ | ||
thorswapApiKey?: string; | ||
/** | ||
* @required for AVAX & BSC | ||
*/ | ||
covalentApiKey?: string; | ||
/** | ||
* @required for ETH | ||
*/ | ||
ethplorerApiKey?: string; | ||
/** | ||
* @required for BTC, BCH, LTC, DOGE | ||
*/ | ||
blockchairApiKey?: string; | ||
/** | ||
* @deprecated - use blockchairApiKey instead | ||
*/ | ||
utxoApiKey?: string; | ||
/** | ||
* @required for Walletconnect | ||
*/ | ||
walletConnectProjectId?: string; | ||
/** | ||
* @optional for Trezor config | ||
*/ | ||
trezorManifest?: { | ||
email: string; | ||
appUrl: string; | ||
}; | ||
}; | ||
/** | ||
* @optional for KeepKey config | ||
*/ | ||
keepkeyConfig?: { | ||
apiKey: string; | ||
pairingInfo: { | ||
name: string; | ||
imageUrl: string; | ||
basePath: string; | ||
url: string; | ||
}; | ||
}; | ||
}; | ||
declare type ConnectMethodNames = | ||
| 'connectEVMWallet' | ||
| 'connectKeplr' | ||
| 'connectKeystore' | ||
| 'connectKeepkey' | ||
| 'connectLedger' | ||
| 'connectOkx' | ||
| 'connectTrezor' | ||
| 'connectWalletconnect' | ||
| 'connectXDEFI'; | ||
declare type ConnectMethodNames = "connectEVMWallet" | "connectKeplr" | "connectKeystore" | "connectKeepkey" | "connectLedger" | "connectOkx" | "connectTrezor" | "connectWalletconnect" | "connectXDEFI"; | ||
export declare type ConnectWalletParams = { | ||
addChain: (params: AddChainWalletParams) => void; | ||
config: ConnectConfig; | ||
rpcUrls: { | ||
[chain in Chain]?: string; | ||
}; | ||
apis: ApisType; | ||
addChain: <T extends Chain>(params: AddChainWalletParams<T>) => void; | ||
config: ConnectConfig; | ||
rpcUrls: { | ||
[chain in Chain]?: string; | ||
}; | ||
apis: ApisType; | ||
}; | ||
export declare enum ContractAddress { | ||
ARB = '0x0000000000000000000000000000000000000000', | ||
AVAX = '0x0000000000000000000000000000000000000000', | ||
ETH = '0x0000000000000000000000000000000000000000', | ||
BSC = '0x0000000000000000000000000000000000000000', | ||
MATIC = '0x0000000000000000000000000000000000001010', | ||
OP = '0x4200000000000000000000000000000000000042', | ||
ARB = "0x0000000000000000000000000000000000000000", | ||
AVAX = "0x0000000000000000000000000000000000000000", | ||
ETH = "0x0000000000000000000000000000000000000000", | ||
BSC = "0x0000000000000000000000000000000000000000", | ||
MATIC = "0x0000000000000000000000000000000000001010", | ||
OP = "0x4200000000000000000000000000000000000042" | ||
} | ||
export declare type CosmosChain = | ||
| Chain.Cosmos | ||
| Chain.THORChain | ||
| Chain.Binance | ||
| Chain.Maya | ||
| Chain.Kujira; | ||
export declare type CosmosChain = Chain.Cosmos | Chain.THORChain | Chain.Binance | Chain.Maya | Chain.Kujira; | ||
export declare const CosmosChainList: CosmosChain[]; | ||
/** | ||
* @deprecated | ||
* Use `CosmosChains` instead | ||
*/ | ||
export declare const CosmosChainList: readonly [Chain.Cosmos, Chain.THORChain, Chain.Binance]; | ||
export declare const CosmosChains: readonly [Chain.Cosmos, Chain.THORChain, Chain.Binance]; | ||
export declare enum DerivationPath { | ||
ARB = "m/44'/60'/0'/0", | ||
AVAX = "m/44'/60'/0'/0", | ||
BCH = "m/44'/145'/0'/0", | ||
BNB = "m/44'/714'/0'/0", | ||
BSC = "m/44'/60'/0'/0", | ||
BTC = "m/84'/0'/0'/0", | ||
DOGE = "m/44'/3'/0'/0", | ||
DOT = '////', | ||
ETH = "m/44'/60'/0'/0", | ||
FLIP = '////', | ||
GAIA = "m/44'/118'/0'/0", | ||
KUJI = "m/44'/118'/0'/0", | ||
LTC = "m/84'/2'/0'/0", | ||
MATIC = "m/44'/60'/0'/0", | ||
MAYA = "m/44'/931'/0'/0", | ||
OP = "m/44'/60'/0'/0", | ||
THOR = "m/44'/931'/0'/0", | ||
ARB = "m/44'/60'/0'/0", | ||
AVAX = "m/44'/60'/0'/0", | ||
BCH = "m/44'/145'/0'/0", | ||
BNB = "m/44'/714'/0'/0", | ||
BSC = "m/44'/60'/0'/0", | ||
BTC = "m/84'/0'/0'/0", | ||
DASH = "m/44'/5'/0'/0", | ||
DOGE = "m/44'/3'/0'/0", | ||
DOT = "////", | ||
ETH = "m/44'/60'/0'/0", | ||
FLIP = "////", | ||
GAIA = "m/44'/118'/0'/0", | ||
KUJI = "m/44'/118'/0'/0", | ||
LTC = "m/84'/2'/0'/0", | ||
MATIC = "m/44'/60'/0'/0", | ||
MAYA = "m/44'/931'/0'/0", | ||
OP = "m/44'/60'/0'/0", | ||
THOR = "m/44'/931'/0'/0" | ||
} | ||
@@ -320,14 +281,12 @@ | ||
export declare const erc20ABI: ( | ||
| { | ||
inputs: never[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
name?: undefined; | ||
outputs?: undefined; | ||
} | ||
| { | ||
anonymous: boolean; | ||
inputs: { | ||
export declare const erc20ABI: ({ | ||
inputs: never[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
name?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
anonymous: boolean; | ||
inputs: { | ||
indexed: boolean; | ||
@@ -337,213 +296,87 @@ internalType: string; | ||
type: string; | ||
}[]; | ||
name: string; | ||
type: string; | ||
stateMutability?: undefined; | ||
outputs?: undefined; | ||
} | ||
| { | ||
inputs: { | ||
}[]; | ||
name: string; | ||
type: string; | ||
stateMutability?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
inputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
name: string; | ||
outputs: { | ||
}[]; | ||
name: string; | ||
outputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
} | ||
)[]; | ||
}[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
})[]; | ||
export declare enum ERROR_CODE { | ||
INVALID_INPUT_PARAMETERS = '1000', | ||
UNKNOWN_PROVIDERS = '1001', | ||
CANNOT_FIND_INBOUND_ADDRESS = '1002', | ||
NO_INBOUND_ADDRESSES = '1003', | ||
CHAIN_HALTED_OR_UNSUPPORTED = '1004', | ||
MISSING_INPUT_PARAMETER = '1005', | ||
INVALID_TYPE_GENERIC = '1100', | ||
INVALID_NUMBER_STRING = '1101', | ||
INVALID_NUMBER = '1102', | ||
INVALID_BOOLEAN = '1103', | ||
INVALID_OBJECT = '1104', | ||
INVALID_ARRAY = '1105', | ||
SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER = '2000', | ||
SELL_BUY_ASSETS_ARE_THE_SAME = '2001', | ||
MISSING_SOURCE_ADDRESS_FOR_SYNTH = '2002', | ||
AFF_ADDRESS_AND_BPS_OR_NEITHER = '2003', | ||
AFF_ADDRESS_TOO_LONG = '2004', | ||
AFF_BPS_INTEGER_MAX_500 = '2005', | ||
SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN = '2006', | ||
DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN = '2007', | ||
PREFERRED_PROVIDER_NOT_SUPPORTED = '2008', | ||
DESTINATION_ADDRESS_SMART_CONTRACT = '2009', | ||
BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER = '2010', | ||
SOURCE_ADDRESS_SMART_CONTRACT = '2011', | ||
INVALID_PROVIDER = '2100', | ||
MISSING_CROSS_CHAIN_PROVIDER = '2101', | ||
MISSING_AVAX_PROVIDER = '2102', | ||
MISSING_BSC_PROVIDER = '2103', | ||
MISSING_ETH_PROVIDER = '2104', | ||
INVALID_PROVIDER_FOR_SWAP_OUT = '2105', | ||
MISSING_ARB_PROVIDER = '2106', | ||
INVALID_CHAIN = '2200', | ||
INVALID_ASSET = '2201', | ||
INVALID_ASSET_IDENTIFIER = '2202', | ||
UNSUPPORTED_CHAIN = '2204', | ||
UNSUPPORTED_ASSET = '2203', | ||
UNSUPPORTED_ASSET_FOR_SWAPOUT = '2205', | ||
INVALID_SOURCE_ADDRESS = '2300', | ||
INVALID_DESTINATION_ADDRESS = '2301', | ||
THORNODE_QUOTE_GENERIC_ERROR = '3000', | ||
NOT_ENOUGH_SYNTH_BALANCE = '3001', | ||
SYNTH_MINTING_CAP_REACHED = '3002', | ||
INVALID_QUOTE_MODE = '4000', | ||
NO_QUOTES = '4001', | ||
SERVICE_UNAVAILABLE_GENERIC = '5000', | ||
MISSING_GAS_DATA_GENERIC = '5100', | ||
MISSING_TOKEN_INFO_GENERIC = '5200', | ||
CANT_FIND_TOKEN_LIST = '5201', | ||
NO_PRICE = '5202', | ||
PRICE_IS_STALE = '5203', | ||
ADDRESS_NOT_WHITELISTED = '6000', | ||
ADDRESS_ALREADY_CLAIMED = '6001', | ||
TEMPORARY_ERROR = '9999', | ||
} | ||
export declare type EVMChain = Chain.Ethereum | Chain.Avalanche | Chain.BinanceSmartChain | Chain.Arbitrum | Chain.Optimism | Chain.Polygon; | ||
export declare enum ERROR_MODULE { | ||
HEALTH_CONTROLLER = '1000', | ||
LIQUIDITY_CONTROLLER = '1001', | ||
PROVIDER_CONTROLLER = '1002', | ||
QUOTE_CONTROLLER = '1003', | ||
SWAP_CONTROLLER = '1004', | ||
UTIL_CONTROLLER = '1005', | ||
AIRDROP_CONTROLLER = '1006', | ||
PROVIDER = '2000', | ||
ASSET = '2001', | ||
TOKEN_LIST = '2002', | ||
QUOTE = '2100', | ||
QUOTE_TXN_DETAILS = '2101', | ||
THORCHAIN_PROVIDER = '3000', | ||
UNISWAPV2_ETH_PROVIDER = '3001', | ||
UNISWAPV3_ETH_PROVIDER = '3002', | ||
SUSHISWAP_ETH_PROVIDER = '3003', | ||
PANCAKESWAP_BSC_PROVIDER = '3004', | ||
PANCAKESWAP_ETH_PROVIDER = '3005', | ||
ONEINCH_ETH_PROVIDER = '3006', | ||
ONEINCH_BSC_PROVIDER = '3007', | ||
ONEINCH_AVAX_PROVIDER = '3008', | ||
ZEROX_ETH_PROVIDER = '3009', | ||
WOOFI_AVAX_PROVIDER = '3010', | ||
PANGOLIN_AVAX_PROVIDER = '3011', | ||
TRADERJOE_AVAX_PROVIDER = '3012', | ||
KYBER_ETH_PROVIDER = '3013', | ||
KYBER_AVAX_PROVIDER = '3014', | ||
WOOFI_BSC_PROVIDER = '3015', | ||
STARGATE_PROVIDER = '3016', | ||
PROVIDER_UTIL = '4000', | ||
TXN_DETAILS = '5000', | ||
AIRDROP_UTIL = '6000', | ||
} | ||
/** | ||
* @deprecated | ||
* Use `EVMChains` instead | ||
*/ | ||
export declare const EVMChainList: readonly [Chain.Ethereum, Chain.Avalanche, Chain.BinanceSmartChain, Chain.Arbitrum, Chain.Optimism, Chain.Polygon]; | ||
export declare enum ERROR_TYPE { | ||
VALIDATION_ERROR = 'VALIDATION_ERROR', | ||
REQUEST_PARAMETER_ERROR = 'REQUEST_PARAMETER_ERROR', | ||
RESPONSE_PARSING_ERROR = 'RESPONSE_PARSING_ERROR', | ||
UNSUPPORTED = 'UNSUPPORTED', | ||
NOT_IMPLEMENTED = 'NOT_IMPLEMENTED', | ||
INCOMPATIBLE_ASSETS_OPERATIONS = 'INCOMPATIBLE_ASSETS_OPERATIONS', | ||
SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE', | ||
DOWN_FOR_MAINTENANCE = 'DOWN_FOR_MAINTENANCE', | ||
MISSING_INBOUND_INFO = 'MISSING_INBOUND_INFO', | ||
QUOTE_FETCHING_ERROR = 'QUOTE_FETCHING_ERROR', | ||
AIRDROP_ERROR = 'AIRDROP_ERROR', | ||
UNHANDLED_ERROR = 'UNHANDLED_ERROR', | ||
} | ||
export declare const EVMChains: readonly [Chain.Ethereum, Chain.Avalanche, Chain.BinanceSmartChain, Chain.Arbitrum, Chain.Optimism, Chain.Polygon]; | ||
export declare type ErrorInfo = { | ||
status: number; | ||
revision: string; | ||
type?: ERROR_TYPE; | ||
module: ERROR_MODULE; | ||
code: ERROR_CODE; | ||
message?: string | undefined; | ||
stack?: string; | ||
identifier?: string; | ||
options?: ApiErrorOptions; | ||
displayMessageParams?: string[]; | ||
}; | ||
export declare type EVMChain = | ||
| Chain.Ethereum | ||
| Chain.Avalanche | ||
| Chain.BinanceSmartChain | ||
| Chain.Arbitrum | ||
| Chain.Optimism | ||
| Chain.Polygon; | ||
export declare const EVMChainList: EVMChain[]; | ||
export declare type EVMTxBaseParams<T = bigint> = { | ||
to?: string; | ||
from?: string; | ||
nonce?: number; | ||
gasLimit?: T; | ||
data?: string; | ||
value?: T; | ||
chainId?: T; | ||
to?: string; | ||
from?: string; | ||
nonce?: number; | ||
gasLimit?: T; | ||
data?: string; | ||
value?: T; | ||
chainId?: T; | ||
}; | ||
export declare type EVMWalletOptions = | ||
| WalletOption.BRAVE | ||
| WalletOption.OKX_MOBILE | ||
| WalletOption.METAMASK | ||
| WalletOption.TRUSTWALLET_WEB | ||
| WalletOption.COINBASE_WEB; | ||
export declare type EVMWalletOptions = WalletOption.BRAVE | WalletOption.OKX_MOBILE | WalletOption.METAMASK | WalletOption.TRUSTWALLET_WEB | WalletOption.COINBASE_WEB; | ||
export declare type ExtendParams<WalletConnectMethodNames = ''> = { | ||
excludedChains?: Chain[]; | ||
config?: ConnectConfig; | ||
rpcUrls?: { | ||
[chain in Chain]?: string; | ||
}; | ||
apis?: ApisType; | ||
wallets: { | ||
connectMethodName: ConnectMethodNames | WalletConnectMethodNames; | ||
connect: (params: ConnectWalletParams) => (...params: any) => Promise<any>; | ||
}[]; | ||
export declare type ExtendParams<WalletConnectMethodNames = ""> = { | ||
excludedChains?: Chain[]; | ||
config?: ConnectConfig; | ||
rpcUrls?: { | ||
[chain in Chain]?: string; | ||
}; | ||
apis?: ApisType; | ||
wallets: { | ||
connectMethodName: ConnectMethodNames | WalletConnectMethodNames; | ||
connect: (params: ConnectWalletParams) => (...params: any) => Promise<any>; | ||
}[]; | ||
}; | ||
export declare enum FeeOption { | ||
Average = 'average', | ||
Fast = 'fast', | ||
Fastest = 'fastest', | ||
Average = "average", | ||
Fast = "fast", | ||
Fastest = "fastest" | ||
} | ||
export declare type GetAddressAndPubKeyResponse = { | ||
bech32_address: string; | ||
compressed_pk: any; | ||
error_message: string; | ||
return_code: number; | ||
bech32_address: string; | ||
compressed_pk: any; | ||
error_message: string; | ||
return_code: number; | ||
}; | ||
export declare enum LedgerErrorCode { | ||
NoError = 36864, | ||
LockedDevice = 21781, | ||
TC_NotFound = 65535, | ||
NoError = 36864, | ||
LockedDevice = 21781, | ||
TC_NotFound = 65535 | ||
} | ||
export declare enum MemoType { | ||
BOND = 'BOND', | ||
DEPOSIT = '+', | ||
LEAVE = 'LEAVE', | ||
THORNAME_REGISTER = '~', | ||
UNBOND = 'UNBOND', | ||
WITHDRAW = '-', | ||
OPEN_LOAN = '$+', | ||
CLOSE_LOAN = '$-', | ||
BOND = "BOND", | ||
DEPOSIT = "+", | ||
LEAVE = "LEAVE", | ||
THORNAME_REGISTER = "~", | ||
UNBOND = "UNBOND", | ||
WITHDRAW = "-", | ||
OPEN_LOAN = "$+", | ||
CLOSE_LOAN = "$-" | ||
} | ||
@@ -554,51 +387,56 @@ | ||
export declare enum QuoteMode { | ||
TC_SUPPORTED_TO_TC_SUPPORTED = 'TC-TC', | ||
TC_SUPPORTED_TO_ETH = 'TC-ERC20', | ||
TC_SUPPORTED_TO_AVAX = 'TC-ARC20', | ||
TC_SUPPORTED_TO_BSC = 'TC-BEP20', | ||
ETH_TO_TC_SUPPORTED = 'ERC20-TC', | ||
ETH_TO_ETH = 'ERC20-ERC20', | ||
ETH_TO_AVAX = 'ERC20-ARC20', | ||
ETH_TO_BSC = 'ERC20-BEP20', | ||
AVAX_TO_TC_SUPPORTED = 'ARC20-TC', | ||
AVAX_TO_ETH = 'ARC20-ERC20', | ||
AVAX_TO_AVAX = 'ARC20-ARC20', | ||
AVAX_TO_BSC = 'ARC20-BEP20', | ||
BSC_TO_TC_SUPPORTED = 'BEP20-TC', | ||
BSC_TO_ETH = 'BEP20-ERC20', | ||
BSC_TO_AVAX = 'BEP20-ARC20', | ||
BSC_TO_BSC = 'BEP20-BEP20', | ||
TC_SUPPORTED_TO_TC_SUPPORTED = "TC-TC", | ||
TC_SUPPORTED_TO_ETH = "TC-ERC20", | ||
TC_SUPPORTED_TO_AVAX = "TC-ARC20", | ||
TC_SUPPORTED_TO_BSC = "TC-BEP20", | ||
ETH_TO_TC_SUPPORTED = "ERC20-TC", | ||
ETH_TO_ETH = "ERC20-ERC20", | ||
ETH_TO_AVAX = "ERC20-ARC20", | ||
ETH_TO_BSC = "ERC20-BEP20", | ||
AVAX_TO_TC_SUPPORTED = "ARC20-TC", | ||
AVAX_TO_ETH = "ARC20-ERC20", | ||
AVAX_TO_AVAX = "ARC20-ARC20", | ||
AVAX_TO_BSC = "ARC20-BEP20", | ||
BSC_TO_TC_SUPPORTED = "BEP20-TC", | ||
BSC_TO_ETH = "BEP20-ERC20", | ||
BSC_TO_AVAX = "BEP20-ARC20", | ||
BSC_TO_BSC = "BEP20-BEP20" | ||
} | ||
export declare enum RPCUrl { | ||
Arbitrum = 'https://arb1.arbitrum.io/rpc', | ||
Avalanche = 'https://node-router.thorswap.net/avalanche-c', | ||
Binance = '', | ||
BinanceSmartChain = 'https://bsc-dataseed.binance.org', | ||
Bitcoin = 'https://node-router.thorswap.net/bitcoin', | ||
BitcoinCash = 'https://node-router.thorswap.net/bitcoin-cash', | ||
Chainflip = 'wss://mainnet-archive.chainflip.io', | ||
Cosmos = 'https://node-router.thorswap.net/cosmos/rpc', | ||
Kujira = 'https://rpc-kujira.synergynodes.com/', | ||
Dogecoin = 'https://node-router.thorswap.net/dogecoin', | ||
Ethereum = 'https://node-router.thorswap.net/ethereum', | ||
Litecoin = 'https://node-router.thorswap.net/litecoin', | ||
Maya = 'https://tendermint.mayachain.info', | ||
MayaStagenet = 'https://stagenet.tendermint.mayachain.info', | ||
Optimism = 'https://mainnet.optimism.io', | ||
Polkadot = 'wss://rpc.polkadot.io', | ||
Polygon = 'https://polygon-rpc.com', | ||
THORChain = 'https://rpc.thorswap.net', | ||
THORChainStagenet = 'https://stagenet-rpc.ninerealms.com', | ||
Arbitrum = "https://arb1.arbitrum.io/rpc", | ||
Avalanche = "https://node-router.thorswap.net/avalanche-c", | ||
Binance = "", | ||
BinanceSmartChain = "https://bsc-dataseed.binance.org", | ||
Bitcoin = "https://node-router.thorswap.net/bitcoin", | ||
BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash", | ||
Chainflip = "wss://mainnet-archive.chainflip.io", | ||
Cosmos = "https://node-router.thorswap.net/cosmos/rpc", | ||
Dash = "https://node-router.thorswap.net/dash", | ||
Dogecoin = "https://node-router.thorswap.net/dogecoin", | ||
Ethereum = "https://node-router.thorswap.net/ethereum", | ||
Kujira = "https://rpc-kujira.synergynodes.com/", | ||
Litecoin = "https://node-router.thorswap.net/litecoin", | ||
Maya = "https://tendermint.mayachain.info", | ||
MayaStagenet = "https://stagenet.tendermint.mayachain.info", | ||
Optimism = "https://mainnet.optimism.io", | ||
Polkadot = "wss://rpc.polkadot.io", | ||
Polygon = "https://polygon-rpc.com", | ||
THORChain = "https://rpc.thorswap.net", | ||
THORChainStagenet = "https://stagenet-rpc.ninerealms.com" | ||
} | ||
export declare type Signature = { | ||
pub_key: { | ||
type: string; | ||
value: string; | ||
}; | ||
sequence: string; | ||
signature: string; | ||
pub_key: { | ||
type: string; | ||
value: string; | ||
}; | ||
sequence: string; | ||
signature: string; | ||
}; | ||
export declare type SubstrateChain = Chain.Polkadot | Chain.Chainflip; | ||
export declare const SubstrateChainList: SubstrateChain[]; | ||
export declare const SWAP_IN: QuoteMode[]; | ||
@@ -608,277 +446,256 @@ | ||
export declare const TCAvalancheDepositABI: ( | ||
| { | ||
inputs: never[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
name?: undefined; | ||
outputs?: undefined; | ||
} | ||
| { | ||
anonymous: boolean; | ||
inputs: ( | ||
| { | ||
indexed: boolean; | ||
export declare const TCAvalancheDepositABI: ({ | ||
inputs: never[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
name?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
anonymous: boolean; | ||
inputs: ({ | ||
indexed: boolean; | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
components?: undefined; | ||
} | { | ||
components: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
components?: undefined; | ||
} | ||
| { | ||
components: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
indexed: boolean; | ||
}[]; | ||
indexed: boolean; | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
})[]; | ||
name: string; | ||
type: string; | ||
stateMutability?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
inputs: ({ | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
components?: undefined; | ||
} | { | ||
components: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
} | ||
)[]; | ||
name: string; | ||
type: string; | ||
stateMutability?: undefined; | ||
outputs?: undefined; | ||
} | ||
| { | ||
inputs: ( | ||
| { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
components?: undefined; | ||
} | ||
| { | ||
components: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
} | ||
)[]; | ||
name: string; | ||
outputs: never[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
} | ||
| { | ||
inputs: { | ||
}[]; | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
name: string; | ||
outputs: { | ||
})[]; | ||
name: string; | ||
outputs: never[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
} | { | ||
inputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
} | ||
)[]; | ||
}[]; | ||
name: string; | ||
outputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
})[]; | ||
export declare const TCBscDepositABI: ( | ||
| { | ||
inputs: never[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
name?: undefined; | ||
outputs?: undefined; | ||
} | ||
| { | ||
anonymous: boolean; | ||
inputs: ( | ||
| { | ||
indexed: boolean; | ||
export declare const TCBscDepositABI: ({ | ||
inputs: never[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
name?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
anonymous: boolean; | ||
inputs: ({ | ||
indexed: boolean; | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
components?: undefined; | ||
} | { | ||
components: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
components?: undefined; | ||
} | ||
| { | ||
components: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
indexed: boolean; | ||
}[]; | ||
indexed: boolean; | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
})[]; | ||
name: string; | ||
type: string; | ||
stateMutability?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
inputs: ({ | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
components?: undefined; | ||
} | { | ||
components: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
} | ||
)[]; | ||
name: string; | ||
type: string; | ||
stateMutability?: undefined; | ||
outputs?: undefined; | ||
} | ||
| { | ||
inputs: ( | ||
| { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
components?: undefined; | ||
} | ||
| { | ||
components: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
} | ||
)[]; | ||
name: string; | ||
outputs: never[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
} | ||
| { | ||
inputs: { | ||
}[]; | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
name: string; | ||
outputs: { | ||
})[]; | ||
name: string; | ||
outputs: never[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
} | { | ||
inputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
} | ||
)[]; | ||
}[]; | ||
name: string; | ||
outputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
})[]; | ||
export declare const TCEthereumVaultAbi: ( | ||
| { | ||
inputs: { | ||
export declare const TCEthereumVaultAbi: ({ | ||
inputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
name?: undefined; | ||
outputs?: undefined; | ||
} | ||
| { | ||
anonymous: boolean; | ||
inputs: ( | ||
| { | ||
indexed: boolean; | ||
}[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
name?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
anonymous: boolean; | ||
inputs: ({ | ||
indexed: boolean; | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
components?: undefined; | ||
} | { | ||
components: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
components?: undefined; | ||
} | ||
| { | ||
components: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
indexed: boolean; | ||
}[]; | ||
indexed: boolean; | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
})[]; | ||
name: string; | ||
type: string; | ||
stateMutability?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
inputs: ({ | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
components?: undefined; | ||
} | { | ||
components: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
} | ||
)[]; | ||
name: string; | ||
type: string; | ||
stateMutability?: undefined; | ||
outputs?: undefined; | ||
} | ||
| { | ||
inputs: ( | ||
| { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
components?: undefined; | ||
} | ||
| { | ||
components: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
} | ||
)[]; | ||
name: string; | ||
outputs: never[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
} | ||
| { | ||
inputs: { | ||
}[]; | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
name: string; | ||
outputs: { | ||
})[]; | ||
name: string; | ||
outputs: never[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
} | { | ||
inputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
} | ||
)[]; | ||
}[]; | ||
name: string; | ||
outputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
})[]; | ||
export declare const TCSupportedChainList: Chain[]; | ||
/** | ||
* @deprecated | ||
* Use `TCSupportedChains` instead | ||
*/ | ||
export declare const TCSupportedChainList: readonly [Chain.Avalanche, Chain.Binance, Chain.BinanceSmartChain, Chain.Bitcoin, Chain.BitcoinCash, Chain.Cosmos, Chain.Dogecoin, Chain.Ethereum, Chain.Litecoin, Chain.THORChain]; | ||
export declare type UTXOChain = Chain.Bitcoin | Chain.BitcoinCash | Chain.Dogecoin | Chain.Litecoin; | ||
export declare const TCSupportedChains: readonly [Chain.Avalanche, Chain.Binance, Chain.BinanceSmartChain, Chain.Bitcoin, Chain.BitcoinCash, Chain.Cosmos, Chain.Dogecoin, Chain.Ethereum, Chain.Litecoin, Chain.THORChain]; | ||
export declare const UTXOChainList: UTXOChain[]; | ||
export declare type UTXOChain = Chain.Bitcoin | Chain.BitcoinCash | Chain.Dash | Chain.Dogecoin | Chain.Litecoin; | ||
/** | ||
* @deprecated | ||
* Use `UTXOChains` instead | ||
*/ | ||
export declare const UTXOChainList: readonly [Chain.Bitcoin, Chain.BitcoinCash, Chain.Dash, Chain.Dogecoin, Chain.Litecoin]; | ||
export declare const UTXOChains: readonly [Chain.Bitcoin, Chain.BitcoinCash, Chain.Dash, Chain.Dogecoin, Chain.Litecoin]; | ||
export declare enum WalletOption { | ||
'KEYSTORE' = 'KEYSTORE', | ||
'KEEPKEY' = 'KEEPKEY', | ||
'XDEFI' = 'XDEFI', | ||
'METAMASK' = 'METAMASK', | ||
'COINBASE_WEB' = 'COINBASE_WEB', | ||
'TREZOR' = 'TREZOR', | ||
'TRUSTWALLET_WEB' = 'TRUSTWALLET_WEB', | ||
'LEDGER' = 'LEDGER', | ||
'KEPLR' = 'KEPLR', | ||
'OKX' = 'OKX', | ||
'OKX_MOBILE' = 'OKX_MOBILE', | ||
'BRAVE' = 'BRAVE', | ||
'WALLETCONNECT' = 'WALLETCONNECT', | ||
KEYSTORE = "KEYSTORE", | ||
KEEPKEY = "KEEPKEY", | ||
XDEFI = "XDEFI", | ||
METAMASK = "METAMASK", | ||
COINBASE_WEB = "COINBASE_WEB", | ||
TREZOR = "TREZOR", | ||
TRUSTWALLET_WEB = "TRUSTWALLET_WEB", | ||
LEDGER = "LEDGER", | ||
KEPLR = "KEPLR", | ||
OKX = "OKX", | ||
OKX_MOBILE = "OKX_MOBILE", | ||
BRAVE = "BRAVE", | ||
WALLETCONNECT = "WALLETCONNECT" | ||
} | ||
export declare type WalletTxParams = { | ||
feeOptionKey?: FeeOption; | ||
from?: string; | ||
memo?: string; | ||
recipient: string; | ||
feeOptionKey?: FeeOption; | ||
from?: string; | ||
memo?: string; | ||
recipient: string; | ||
}; | ||
export declare type Witness = { | ||
value: number; | ||
script: Buffer; | ||
value: number; | ||
script: Buffer; | ||
}; | ||
export {}; | ||
export { } |
@@ -1,5 +0,2 @@ | ||
var O = Object.defineProperty; | ||
var h = (e, a, n) => a in e ? O(e, a, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[a] = n; | ||
var s = (e, a, n) => (h(e, typeof a != "symbol" ? a + "" : a, n), n); | ||
const G = [ | ||
const O = [ | ||
{ inputs: [], stateMutability: "nonpayable", type: "constructor" }, | ||
@@ -102,3 +99,3 @@ { | ||
} | ||
], w = [ | ||
], h = [ | ||
{ | ||
@@ -278,3 +275,3 @@ inputs: [{ internalType: "address", name: "rune", type: "address" }], | ||
} | ||
], U = [ | ||
], B = [ | ||
{ inputs: [], stateMutability: "nonpayable", type: "constructor" }, | ||
@@ -443,3 +440,3 @@ { | ||
} | ||
], F = [ | ||
], R = [ | ||
{ inputs: [], stateMutability: "nonpayable", type: "constructor" }, | ||
@@ -597,4 +594,4 @@ { | ||
]; | ||
var C = /* @__PURE__ */ ((e) => (e.TC_SUPPORTED_TO_TC_SUPPORTED = "TC-TC", e.TC_SUPPORTED_TO_ETH = "TC-ERC20", e.TC_SUPPORTED_TO_AVAX = "TC-ARC20", e.TC_SUPPORTED_TO_BSC = "TC-BEP20", e.ETH_TO_TC_SUPPORTED = "ERC20-TC", e.ETH_TO_ETH = "ERC20-ERC20", e.ETH_TO_AVAX = "ERC20-ARC20", e.ETH_TO_BSC = "ERC20-BEP20", e.AVAX_TO_TC_SUPPORTED = "ARC20-TC", e.AVAX_TO_ETH = "ARC20-ERC20", e.AVAX_TO_AVAX = "ARC20-ARC20", e.AVAX_TO_BSC = "ARC20-BEP20", e.BSC_TO_TC_SUPPORTED = "BEP20-TC", e.BSC_TO_ETH = "BEP20-ERC20", e.BSC_TO_AVAX = "BEP20-ARC20", e.BSC_TO_BSC = "BEP20-BEP20", e))(C || {}); | ||
const X = [ | ||
var y = /* @__PURE__ */ ((e) => (e.TC_SUPPORTED_TO_TC_SUPPORTED = "TC-TC", e.TC_SUPPORTED_TO_ETH = "TC-ERC20", e.TC_SUPPORTED_TO_AVAX = "TC-ARC20", e.TC_SUPPORTED_TO_BSC = "TC-BEP20", e.ETH_TO_TC_SUPPORTED = "ERC20-TC", e.ETH_TO_ETH = "ERC20-ERC20", e.ETH_TO_AVAX = "ERC20-ARC20", e.ETH_TO_BSC = "ERC20-BEP20", e.AVAX_TO_TC_SUPPORTED = "ARC20-TC", e.AVAX_TO_ETH = "ARC20-ERC20", e.AVAX_TO_AVAX = "ARC20-ARC20", e.AVAX_TO_BSC = "ARC20-BEP20", e.BSC_TO_TC_SUPPORTED = "BEP20-TC", e.BSC_TO_ETH = "BEP20-ERC20", e.BSC_TO_AVAX = "BEP20-ARC20", e.BSC_TO_BSC = "BEP20-BEP20", e))(y || {}); | ||
const v = [ | ||
"ERC20-ERC20", | ||
@@ -604,3 +601,3 @@ "ARC20-ARC20", | ||
/* BSC_TO_BSC */ | ||
], k = [ | ||
], H = [ | ||
"ERC20-TC", | ||
@@ -616,3 +613,3 @@ "ERC20-ARC20", | ||
/* BSC_TO_AVAX */ | ||
], K = [ | ||
], S = [ | ||
"TC-TC", | ||
@@ -624,118 +621,4 @@ "TC-ERC20", | ||
]; | ||
var m = /* @__PURE__ */ ((e) => (e.VALIDATION_ERROR = "VALIDATION_ERROR", e.REQUEST_PARAMETER_ERROR = "REQUEST_PARAMETER_ERROR", e.RESPONSE_PARSING_ERROR = "RESPONSE_PARSING_ERROR", e.UNSUPPORTED = "UNSUPPORTED", e.NOT_IMPLEMENTED = "NOT_IMPLEMENTED", e.INCOMPATIBLE_ASSETS_OPERATIONS = "INCOMPATIBLE_ASSETS_OPERATIONS", e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e.DOWN_FOR_MAINTENANCE = "DOWN_FOR_MAINTENANCE", e.MISSING_INBOUND_INFO = "MISSING_INBOUND_INFO", e.QUOTE_FETCHING_ERROR = "QUOTE_FETCHING_ERROR", e.AIRDROP_ERROR = "AIRDROP_ERROR", e.UNHANDLED_ERROR = "UNHANDLED_ERROR", e))(m || {}), P = /* @__PURE__ */ ((e) => (e.HEALTH_CONTROLLER = "1000", e.LIQUIDITY_CONTROLLER = "1001", e.PROVIDER_CONTROLLER = "1002", e.QUOTE_CONTROLLER = "1003", e.SWAP_CONTROLLER = "1004", e.UTIL_CONTROLLER = "1005", e.AIRDROP_CONTROLLER = "1006", e.PROVIDER = "2000", e.ASSET = "2001", e.TOKEN_LIST = "2002", e.QUOTE = "2100", e.QUOTE_TXN_DETAILS = "2101", e.THORCHAIN_PROVIDER = "3000", e.UNISWAPV2_ETH_PROVIDER = "3001", e.UNISWAPV3_ETH_PROVIDER = "3002", e.SUSHISWAP_ETH_PROVIDER = "3003", e.PANCAKESWAP_BSC_PROVIDER = "3004", e.PANCAKESWAP_ETH_PROVIDER = "3005", e.ONEINCH_ETH_PROVIDER = "3006", e.ONEINCH_BSC_PROVIDER = "3007", e.ONEINCH_AVAX_PROVIDER = "3008", e.ZEROX_ETH_PROVIDER = "3009", e.WOOFI_AVAX_PROVIDER = "3010", e.PANGOLIN_AVAX_PROVIDER = "3011", e.TRADERJOE_AVAX_PROVIDER = "3012", e.KYBER_ETH_PROVIDER = "3013", e.KYBER_AVAX_PROVIDER = "3014", e.WOOFI_BSC_PROVIDER = "3015", e.STARGATE_PROVIDER = "3016", e.PROVIDER_UTIL = "4000", e.TXN_DETAILS = "5000", e.AIRDROP_UTIL = "6000", e))(P || {}), t = /* @__PURE__ */ ((e) => (e.INVALID_INPUT_PARAMETERS = "1000", e.UNKNOWN_PROVIDERS = "1001", e.CANNOT_FIND_INBOUND_ADDRESS = "1002", e.NO_INBOUND_ADDRESSES = "1003", e.CHAIN_HALTED_OR_UNSUPPORTED = "1004", e.MISSING_INPUT_PARAMETER = "1005", e.INVALID_TYPE_GENERIC = "1100", e.INVALID_NUMBER_STRING = "1101", e.INVALID_NUMBER = "1102", e.INVALID_BOOLEAN = "1103", e.INVALID_OBJECT = "1104", e.INVALID_ARRAY = "1105", e.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2000", e.SELL_BUY_ASSETS_ARE_THE_SAME = "2001", e.MISSING_SOURCE_ADDRESS_FOR_SYNTH = "2002", e.AFF_ADDRESS_AND_BPS_OR_NEITHER = "2003", e.AFF_ADDRESS_TOO_LONG = "2004", e.AFF_BPS_INTEGER_MAX_500 = "2005", e.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN = "2006", e.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN = "2007", e.PREFERRED_PROVIDER_NOT_SUPPORTED = "2008", e.DESTINATION_ADDRESS_SMART_CONTRACT = "2009", e.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2010", e.SOURCE_ADDRESS_SMART_CONTRACT = "2011", e.INVALID_PROVIDER = "2100", e.MISSING_CROSS_CHAIN_PROVIDER = "2101", e.MISSING_AVAX_PROVIDER = "2102", e.MISSING_BSC_PROVIDER = "2103", e.MISSING_ETH_PROVIDER = "2104", e.INVALID_PROVIDER_FOR_SWAP_OUT = "2105", e.MISSING_ARB_PROVIDER = "2106", e.INVALID_CHAIN = "2200", e.INVALID_ASSET = "2201", e.INVALID_ASSET_IDENTIFIER = "2202", e.UNSUPPORTED_CHAIN = "2204", e.UNSUPPORTED_ASSET = "2203", e.UNSUPPORTED_ASSET_FOR_SWAPOUT = "2205", e.INVALID_SOURCE_ADDRESS = "2300", e.INVALID_DESTINATION_ADDRESS = "2301", e.THORNODE_QUOTE_GENERIC_ERROR = "3000", e.NOT_ENOUGH_SYNTH_BALANCE = "3001", e.SYNTH_MINTING_CAP_REACHED = "3002", e.INVALID_QUOTE_MODE = "4000", e.NO_QUOTES = "4001", e.SERVICE_UNAVAILABLE_GENERIC = "5000", e.MISSING_GAS_DATA_GENERIC = "5100", e.MISSING_TOKEN_INFO_GENERIC = "5200", e.CANT_FIND_TOKEN_LIST = "5201", e.NO_PRICE = "5202", e.PRICE_IS_STALE = "5203", e.ADDRESS_NOT_WHITELISTED = "6000", e.ADDRESS_ALREADY_CLAIMED = "6001", e.TEMPORARY_ERROR = "9999", e))(t || {}); | ||
const g = { | ||
[t.INVALID_INPUT_PARAMETERS]: "Invalid input parameters: {0}.", | ||
[t.UNKNOWN_PROVIDERS]: "Unknown providers: {0}.", | ||
[t.CANNOT_FIND_INBOUND_ADDRESS]: "Cannot find inbound address.", | ||
[t.NO_INBOUND_ADDRESSES]: "No inbound addresses.", | ||
[t.CHAIN_HALTED_OR_UNSUPPORTED]: "Chain {0} halted or unsupported.", | ||
[t.MISSING_INPUT_PARAMETER]: "Missing input parameter: {0}.", | ||
[t.INVALID_TYPE_GENERIC]: "Invalid type", | ||
[t.INVALID_NUMBER_STRING]: "Invalid number string.", | ||
[t.INVALID_NUMBER]: "Invalid number.", | ||
[t.INVALID_BOOLEAN]: "Invalid boolean.", | ||
[t.INVALID_OBJECT]: "Invalid object.", | ||
[t.INVALID_ARRAY]: "Invalid array.", | ||
[t.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER]: "Sell amount must be a positive integer.", | ||
[t.SELL_BUY_ASSETS_ARE_THE_SAME]: "Sell and buy assets are the same.", | ||
[t.MISSING_SOURCE_ADDRESS_FOR_SYNTH]: "Source address is required for synth quote.", | ||
[t.AFF_ADDRESS_AND_BPS_OR_NEITHER]: "Must provide affiliateAddress and affiliateBasisPoints params, or neither.", | ||
[t.AFF_ADDRESS_TOO_LONG]: "affiliateAddress too long: 3 characters max.", | ||
[t.AFF_BPS_INTEGER_MAX_500]: "affiliateBasisPoints must be an integer between 0 and 100.", | ||
[t.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN]: "Source address {0} invalid for sell chain.", | ||
[t.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN]: "Destination address {0} invalid for buy chain.", | ||
[t.PREFERRED_PROVIDER_NOT_SUPPORTED]: "Preferred provider not supported.", | ||
[t.SOURCE_ADDRESS_SMART_CONTRACT]: "Source address is a smart contract.", | ||
[t.DESTINATION_ADDRESS_SMART_CONTRACT]: "Destination address is a smart contract.", | ||
[t.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER]: "Buy amount must be a positive integer.", | ||
[t.INVALID_PROVIDER]: "Invalid provider {0}.", | ||
[t.MISSING_CROSS_CHAIN_PROVIDER]: "Missing cross-chain provider.", | ||
[t.MISSING_AVAX_PROVIDER]: "Missing AVAX provider.", | ||
[t.MISSING_BSC_PROVIDER]: "Missing BSC provider.", | ||
[t.MISSING_ETH_PROVIDER]: "Missing ETH provider.", | ||
[t.MISSING_ARB_PROVIDER]: "Missing ARB provider.", | ||
[t.INVALID_PROVIDER_FOR_SWAP_OUT]: "Invalid provider for swap out.", | ||
[t.INVALID_CHAIN]: "Invalid chain {0}.", | ||
[t.INVALID_ASSET]: "Invalid asset {0}.", | ||
[t.UNSUPPORTED_CHAIN]: "Unsupported chain {0}.", | ||
[t.UNSUPPORTED_ASSET]: "Unsupported asset {0}.", | ||
[t.UNSUPPORTED_ASSET_FOR_SWAPOUT]: "Unsupported asset {0} for swap out.", | ||
[t.THORNODE_QUOTE_GENERIC_ERROR]: "ThorNode quote generic error.", | ||
[t.INVALID_SOURCE_ADDRESS]: "Invalid source address {0}", | ||
[t.INVALID_DESTINATION_ADDRESS]: "Invalid destination address {0}", | ||
[t.NOT_ENOUGH_SYNTH_BALANCE]: "Source address doesn't have enough synth balance for this quote.", | ||
[t.SYNTH_MINTING_CAP_REACHED]: "Synth minting cap reached.", | ||
[t.INVALID_QUOTE_MODE]: "Invalid quote mode.", | ||
[t.NO_QUOTES]: "No quotes to service this request.", | ||
[t.SERVICE_UNAVAILABLE_GENERIC]: "Service unavailable.", | ||
[t.MISSING_GAS_DATA_GENERIC]: "Missing gas data.", | ||
[t.MISSING_TOKEN_INFO_GENERIC]: "Missing token info.", | ||
[t.CANT_FIND_TOKEN_LIST]: "Can't find tokenlist {0}.", | ||
[t.NO_PRICE]: "No price for asset {0}.", | ||
[t.PRICE_IS_STALE]: "Price is stale for asset {0}.", | ||
[t.ADDRESS_NOT_WHITELISTED]: "Address {0} not whitelisted for airdrop.", | ||
[t.ADDRESS_ALREADY_CLAIMED]: "Address {0} already claimed the airdrop." | ||
}, u = (e, a) => { | ||
let n = g[e]; | ||
if (!n) | ||
return ""; | ||
for (let r = 0; r < a.length; r++) | ||
n = (n == null ? void 0 : n.replace(`{${r}}`, a[r])) ?? ""; | ||
return n; | ||
}; | ||
class A extends Error { | ||
constructor({ | ||
status: n, | ||
revision: r, | ||
module: S, | ||
code: d, | ||
message: _, | ||
type: N, | ||
options: { shouldLog: E, shouldThrow: c, shouldTrace: f } = { | ||
shouldLog: !0, | ||
shouldThrow: !0, | ||
shouldTrace: !0 | ||
}, | ||
displayMessageParams: y | ||
}) { | ||
const l = _ || u(d, y || []) || ""; | ||
super(l); | ||
s(this, "status"); | ||
s(this, "revision"); | ||
s(this, "type"); | ||
s(this, "module"); | ||
s(this, "code"); | ||
s(this, "message"); | ||
s(this, "display"); | ||
s(this, "stack"); | ||
s(this, "options"); | ||
s(this, "displayMessageParams"); | ||
this.status = n, this.revision = r || "NO_REVISION", this.module = S, this.message = l, this.display = u(d, y || []), this.code = d, this.type = N || m.UNHANDLED_ERROR, this.options = { | ||
shouldLog: E || !0, | ||
shouldTrace: f || !0, | ||
shouldThrow: c || !1 | ||
}, this.displayMessageParams = y || [], this.options.shouldTrace && Error.captureStackTrace(this); | ||
} | ||
static fromErrorInfo(n) { | ||
return new A(n); | ||
} | ||
toErrorInfo() { | ||
return { ...this, identifier: this.identifier }; | ||
} | ||
get identifier() { | ||
return `${this.revision}-${this.type || "NO_TYPE"}-${this.module}-${this.code}`; | ||
} | ||
get displayMessage() { | ||
return u(this.code, this.displayMessageParams || []); | ||
} | ||
handle() { | ||
const n = `[${this.identifier}]: ${this.message}`; | ||
if (this.options.shouldLog && console.error(n, ` | ||
`, this.stack || ""), this.options.shouldThrow) | ||
throw Error(n, { cause: this.stack }); | ||
return this.toErrorInfo(); | ||
} | ||
} | ||
var i = /* @__PURE__ */ ((e) => (e.Arbitrum = "ARB", e.Avalanche = "AVAX", e.Binance = "BNB", e.BinanceSmartChain = "BSC", e.Bitcoin = "BTC", e.BitcoinCash = "BCH", e.Cosmos = "GAIA", e.Dogecoin = "DOGE", e.Ethereum = "ETH", e.Kujira = "KUJI", e.Litecoin = "LTC", e.Maya = "MAYA", e.Optimism = "OP", e.Polkadot = "DOT", e.Chainflip = "FLIP", e.Polygon = "MATIC", e.THORChain = "THOR", e))(i || {}), V = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(V || {}), B = /* @__PURE__ */ ((e) => (e.ARB = "m/44'/60'/0'/0", e.AVAX = "m/44'/60'/0'/0", e.BCH = "m/44'/145'/0'/0", e.BNB = "m/44'/714'/0'/0", e.BSC = "m/44'/60'/0'/0", e.BTC = "m/84'/0'/0'/0", e.DOGE = "m/44'/3'/0'/0", e.DOT = "////", e.ETH = "m/44'/60'/0'/0", e.FLIP = "////", e.GAIA = "m/44'/118'/0'/0", e.KUJI = "m/44'/118'/0'/0", e.LTC = "m/84'/2'/0'/0", e.MATIC = "m/44'/60'/0'/0", e.MAYA = "m/44'/931'/0'/0", e.OP = "m/44'/60'/0'/0", e.THOR = "m/44'/931'/0'/0", e))(B || {}); | ||
const Y = { | ||
var a = /* @__PURE__ */ ((e) => (e.Arbitrum = "ARB", e.Avalanche = "AVAX", e.Binance = "BNB", e.BinanceSmartChain = "BSC", e.Bitcoin = "BTC", e.BitcoinCash = "BCH", e.Cosmos = "GAIA", e.Dash = "DASH", e.Dogecoin = "DOGE", e.Ethereum = "ETH", e.Kujira = "KUJI", e.Litecoin = "LTC", e.Maya = "MAYA", e.Optimism = "OP", e.Polkadot = "DOT", e.Chainflip = "FLIP", e.Polygon = "MATIC", e.THORChain = "THOR", e))(a || {}), u = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(u || {}), o = /* @__PURE__ */ ((e) => (e.ARB = "m/44'/60'/0'/0", e.AVAX = "m/44'/60'/0'/0", e.BCH = "m/44'/145'/0'/0", e.BNB = "m/44'/714'/0'/0", e.BSC = "m/44'/60'/0'/0", e.BTC = "m/84'/0'/0'/0", e.DASH = "m/44'/5'/0'/0", e.DOGE = "m/44'/3'/0'/0", e.DOT = "////", e.ETH = "m/44'/60'/0'/0", e.FLIP = "////", e.GAIA = "m/44'/118'/0'/0", e.KUJI = "m/44'/118'/0'/0", e.LTC = "m/84'/2'/0'/0", e.MATIC = "m/44'/60'/0'/0", e.MAYA = "m/44'/931'/0'/0", e.OP = "m/44'/60'/0'/0", e.THOR = "m/44'/931'/0'/0", e))(o || {}); | ||
const _ = { | ||
ARB: [44, 60, 0, 0, 0], | ||
@@ -747,2 +630,3 @@ AVAX: [44, 60, 0, 0, 0], | ||
BTC: [84, 0, 0, 0, 0], | ||
DASH: [44, 5, 0, 0, 0], | ||
DOGE: [44, 3, 0, 0, 0], | ||
@@ -761,4 +645,8 @@ ETH: [44, 60, 0, 0, 0], | ||
}; | ||
var b = /* @__PURE__ */ ((e) => (e[e.ARB = 18] = "ARB", e[e.AVAX = 18] = "AVAX", e[e.BCH = 8] = "BCH", e[e.BNB = 8] = "BNB", e[e.BSC = 18] = "BSC", e[e.BTC = 8] = "BTC", e[e.DASH = 8] = "DASH", e[e.DOGE = 8] = "DOGE", e[e.DOT = 10] = "DOT", e[e.ETH = 18] = "ETH", e[e.FLIP = 18] = "FLIP", e[e.GAIA = 6] = "GAIA", e[e.KUJI = 6] = "KUJI", e[e.LTC = 8] = "LTC", e[e.MATIC = 18] = "MATIC", e[e.MAYA = 10] = "MAYA", e[e.OP = 18] = "OP", e[e.THOR = 8] = "THOR", e))(b || {}); | ||
const W = [ | ||
var m = /* @__PURE__ */ ((e) => (e[e.ARB = 18] = "ARB", e[e.AVAX = 18] = "AVAX", e[e.BCH = 8] = "BCH", e[e.BNB = 8] = "BNB", e[e.BSC = 18] = "BSC", e[e.BTC = 8] = "BTC", e[e.DASH = 8] = "DASH", e[e.DOGE = 8] = "DOGE", e[e.DOT = 10] = "DOT", e[e.ETH = 18] = "ETH", e[e.FLIP = 18] = "FLIP", e[e.GAIA = 6] = "GAIA", e[e.KUJI = 6] = "KUJI", e[e.LTC = 8] = "LTC", e[e.MATIC = 18] = "MATIC", e[e.MAYA = 10] = "MAYA", e[e.OP = 18] = "OP", e[e.THOR = 8] = "THOR", e[e.ZEC = 8] = "ZEC", e))(m || {}); | ||
const w = [ | ||
"DOT", | ||
"FLIP" | ||
/* Chainflip */ | ||
], l = [ | ||
"ETH", | ||
@@ -771,9 +659,10 @@ "AVAX", | ||
/* Polygon */ | ||
], j = [ | ||
], M = l, T = [ | ||
"BTC", | ||
"BCH", | ||
"DASH", | ||
"DOGE", | ||
"LTC" | ||
/* Litecoin */ | ||
], J = [ | ||
], V = T, c = [ | ||
"GAIA", | ||
@@ -783,3 +672,3 @@ "THOR", | ||
/* Binance */ | ||
], $ = [ | ||
], L = c, A = [ | ||
"AVAX", | ||
@@ -796,23 +685,23 @@ "BNB", | ||
/* THORChain */ | ||
]; | ||
var o = /* @__PURE__ */ ((e) => (e.Arbitrum = "42161", e.ArbitrumHex = "0xa4b1", e.Avalanche = "43114", e.AvalancheHex = "0xa86a", e.Binance = "Binance-Chain-Tigris", e.BinanceSmartChain = "56", e.BinanceSmartChainHex = "0x38", e.Bitcoin = "bitcoin", e.BitcoinCash = "bitcoincash", e.Chainflip = "chainflip", e.Cosmos = "cosmoshub-4", e.Dogecoin = "dogecoin", e.Kujira = "kaiyo-1", e.Ethereum = "1", e.EthereumHex = "0x1", e.Litecoin = "litecoin", e.Maya = "mayachain-mainnet-v1", e.MayaStagenet = "mayachain-stagenet-v1", e.Optimism = "10", e.OptimismHex = "0xa", e.Polkadot = "polkadot", e.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainStagenet = "thorchain-stagenet-v2", e))(o || {}), I = /* @__PURE__ */ ((e) => (e.Arbitrum = "https://arb1.arbitrum.io/rpc", e.Avalanche = "https://node-router.thorswap.net/avalanche-c", e.Binance = "", e.BinanceSmartChain = "https://bsc-dataseed.binance.org", e.Bitcoin = "https://node-router.thorswap.net/bitcoin", e.BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash", e.Chainflip = "wss://mainnet-archive.chainflip.io", e.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", e.Kujira = "https://rpc-kujira.synergynodes.com/", e.Dogecoin = "https://node-router.thorswap.net/dogecoin", e.Ethereum = "https://node-router.thorswap.net/ethereum", e.Litecoin = "https://node-router.thorswap.net/litecoin", e.Maya = "https://tendermint.mayachain.info", e.MayaStagenet = "https://stagenet.tendermint.mayachain.info", e.Optimism = "https://mainnet.optimism.io", e.Polkadot = "wss://rpc.polkadot.io", e.Polygon = "https://polygon-rpc.com", e.THORChain = "https://rpc.thorswap.net", e.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", e))(I || {}), x = /* @__PURE__ */ ((e) => (e.Cosmos = "https://node-router.thorswap.net/cosmos/rest", e.Kujira = "https://lcd-kujira.synergynodes.com/", e.MayanodeMainnet = "https://mayanode.mayachain.info", e.MayanodeStagenet = "https://stagenet.mayanode.mayachain.info", e.ThornodeMainnet = "https://thornode.thorswap.net", e.ThornodeStagenet = "https://stagenet-thornode.ninerealms.com", e.ThorswapApi = "https://api.thorswap.net", e.ThorswapStatic = "https://static.thorswap.net", e))(x || {}); | ||
const p = Object.values(i), L = Object.keys(i), T = p.reduce( | ||
(e, a) => { | ||
const n = L.find((r) => i[r] === a); | ||
return n && (e[a] = n), e; | ||
], N = A; | ||
var i = /* @__PURE__ */ ((e) => (e.Arbitrum = "42161", e.ArbitrumHex = "0xa4b1", e.Avalanche = "43114", e.AvalancheHex = "0xa86a", e.Binance = "Binance-Chain-Tigris", e.BinanceSmartChain = "56", e.BinanceSmartChainHex = "0x38", e.Bitcoin = "bitcoin", e.BitcoinCash = "bitcoincash", e.Chainflip = "chainflip", e.Cosmos = "cosmoshub-4", e.Dash = "dash", e.Dogecoin = "dogecoin", e.Kujira = "kaiyo-1", e.Ethereum = "1", e.EthereumHex = "0x1", e.Litecoin = "litecoin", e.Maya = "mayachain-mainnet-v1", e.MayaStagenet = "mayachain-stagenet-v1", e.Optimism = "10", e.OptimismHex = "0xa", e.Polkadot = "polkadot", e.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainStagenet = "thorchain-stagenet-v2", e))(i || {}), p = /* @__PURE__ */ ((e) => (e.Arbitrum = "https://arb1.arbitrum.io/rpc", e.Avalanche = "https://node-router.thorswap.net/avalanche-c", e.Binance = "", e.BinanceSmartChain = "https://bsc-dataseed.binance.org", e.Bitcoin = "https://node-router.thorswap.net/bitcoin", e.BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash", e.Chainflip = "wss://mainnet-archive.chainflip.io", e.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", e.Dash = "https://node-router.thorswap.net/dash", e.Dogecoin = "https://node-router.thorswap.net/dogecoin", e.Ethereum = "https://node-router.thorswap.net/ethereum", e.Kujira = "https://rpc-kujira.synergynodes.com/", e.Litecoin = "https://node-router.thorswap.net/litecoin", e.Maya = "https://tendermint.mayachain.info", e.MayaStagenet = "https://stagenet.tendermint.mayachain.info", e.Optimism = "https://mainnet.optimism.io", e.Polkadot = "wss://rpc.polkadot.io", e.Polygon = "https://polygon-rpc.com", e.THORChain = "https://rpc.thorswap.net", e.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", e))(p || {}), f = /* @__PURE__ */ ((e) => (e.Cosmos = "https://node-router.thorswap.net/cosmos/rest", e.Kujira = "https://lcd-kujira.synergynodes.com/", e.MayanodeMainnet = "https://mayanode.mayachain.info", e.MayanodeStagenet = "https://stagenet.mayanode.mayachain.info", e.ThornodeMainnet = "https://thornode.thorswap.net", e.ThornodeStagenet = "https://stagenet-thornode.ninerealms.com", e.ThorswapApi = "https://api.thorswap.net", e.ThorswapStatic = "https://static.thorswap.net", e))(f || {}); | ||
const s = Object.values(a), E = Object.keys(a), r = s.reduce( | ||
(e, n) => { | ||
const t = E.find((d) => a[d] === n); | ||
return t && (e[n] = t), e; | ||
}, | ||
{} | ||
), q = p.reduce( | ||
(e, a) => (e[a] = o[T[a]], e), | ||
), k = s.reduce( | ||
(e, n) => (e[n] = i[r[n]], e), | ||
{} | ||
), Z = p.reduce( | ||
(e, a) => (e[a] = I[T[a]], e), | ||
), P = s.reduce( | ||
(e, n) => (e[n] = p[r[n]], e), | ||
{} | ||
), z = p.reduce( | ||
(e, a) => { | ||
const n = `${T[a]}Hex`; | ||
return e[a] = o[n], e; | ||
), X = s.reduce( | ||
(e, n) => { | ||
const t = `${r[n]}Hex`; | ||
return e[n] = i[t], e; | ||
}, | ||
{} | ||
), Q = { | ||
), I = { | ||
"0xa4b1": "ARB", | ||
@@ -829,2 +718,3 @@ 42161: "ARB", | ||
"cosmoshub-4": "GAIA", | ||
dash: "DASH", | ||
dogecoin: "DOGE", | ||
@@ -845,3 +735,3 @@ "0x1": "ETH", | ||
/* THORChain */ | ||
}, ee = { | ||
}, K = { | ||
ARB: "https://arbiscan.io", | ||
@@ -855,2 +745,3 @@ AVAX: "https://snowtrace.io", | ||
GAIA: "https://cosmos.bigdipper.live", | ||
DASH: "https://blockchair.com/dash", | ||
DOGE: "https://blockchair.com/dogecoin", | ||
@@ -866,38 +757,39 @@ KUJI: "https://finder.kujira.network/kaiyo-1", | ||
}; | ||
var H = /* @__PURE__ */ ((e) => (e.BOND = "BOND", e.DEPOSIT = "+", e.LEAVE = "LEAVE", e.THORNAME_REGISTER = "~", e.UNBOND = "UNBOND", e.WITHDRAW = "-", e.OPEN_LOAN = "$+", e.CLOSE_LOAN = "$-", e))(H || {}), v = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(v || {}), D = /* @__PURE__ */ ((e) => (e.KEYSTORE = "KEYSTORE", e.KEEPKEY = "KEEPKEY", e.XDEFI = "XDEFI", e.METAMASK = "METAMASK", e.COINBASE_WEB = "COINBASE_WEB", e.TREZOR = "TREZOR", e.TRUSTWALLET_WEB = "TRUSTWALLET_WEB", e.LEDGER = "LEDGER", e.KEPLR = "KEPLR", e.OKX = "OKX", e.OKX_MOBILE = "OKX_MOBILE", e.BRAVE = "BRAVE", e.WALLETCONNECT = "WALLETCONNECT", e))(D || {}), R = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e[e.LockedDevice = 21781] = "LockedDevice", e[e.TC_NotFound = 65535] = "TC_NotFound", e))(R || {}); | ||
var x = /* @__PURE__ */ ((e) => (e.BOND = "BOND", e.DEPOSIT = "+", e.LEAVE = "LEAVE", e.THORNAME_REGISTER = "~", e.UNBOND = "UNBOND", e.WITHDRAW = "-", e.OPEN_LOAN = "$+", e.CLOSE_LOAN = "$-", e))(x || {}), C = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(C || {}), b = /* @__PURE__ */ ((e) => (e.KEYSTORE = "KEYSTORE", e.KEEPKEY = "KEEPKEY", e.XDEFI = "XDEFI", e.METAMASK = "METAMASK", e.COINBASE_WEB = "COINBASE_WEB", e.TREZOR = "TREZOR", e.TRUSTWALLET_WEB = "TRUSTWALLET_WEB", e.LEDGER = "LEDGER", e.KEPLR = "KEPLR", e.OKX = "OKX", e.OKX_MOBILE = "OKX_MOBILE", e.BRAVE = "BRAVE", e.WALLETCONNECT = "WALLETCONNECT", e))(b || {}), g = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e[e.LockedDevice = 21781] = "LockedDevice", e[e.TC_NotFound = 65535] = "TC_NotFound", e))(g || {}); | ||
export { | ||
X as AGG_SWAP, | ||
A as ApiError, | ||
x as ApiUrl, | ||
b as BaseDecimal, | ||
i as Chain, | ||
o as ChainId, | ||
Q as ChainIdToChain, | ||
q as ChainToChainId, | ||
ee as ChainToExplorerUrl, | ||
z as ChainToHexChainId, | ||
Z as ChainToRPC, | ||
V as ContractAddress, | ||
J as CosmosChainList, | ||
B as DerivationPath, | ||
t as ERROR_CODE, | ||
P as ERROR_MODULE, | ||
m as ERROR_TYPE, | ||
W as EVMChainList, | ||
v as FeeOption, | ||
R as LedgerErrorCode, | ||
H as MemoType, | ||
Y as NetworkDerivationPath, | ||
C as QuoteMode, | ||
I as RPCUrl, | ||
k as SWAP_IN, | ||
K as SWAP_OUT, | ||
U as TCAvalancheDepositABI, | ||
F as TCBscDepositABI, | ||
w as TCEthereumVaultAbi, | ||
$ as TCSupportedChainList, | ||
j as UTXOChainList, | ||
D as WalletOption, | ||
G as erc20ABI | ||
v as AGG_SWAP, | ||
f as ApiUrl, | ||
m as BaseDecimal, | ||
a as Chain, | ||
i as ChainId, | ||
I as ChainIdToChain, | ||
k as ChainToChainId, | ||
K as ChainToExplorerUrl, | ||
X as ChainToHexChainId, | ||
P as ChainToRPC, | ||
u as ContractAddress, | ||
L as CosmosChainList, | ||
c as CosmosChains, | ||
o as DerivationPath, | ||
M as EVMChainList, | ||
l as EVMChains, | ||
C as FeeOption, | ||
g as LedgerErrorCode, | ||
x as MemoType, | ||
_ as NetworkDerivationPath, | ||
y as QuoteMode, | ||
p as RPCUrl, | ||
H as SWAP_IN, | ||
S as SWAP_OUT, | ||
w as SubstrateChainList, | ||
B as TCAvalancheDepositABI, | ||
R as TCBscDepositABI, | ||
h as TCEthereumVaultAbi, | ||
N as TCSupportedChainList, | ||
A as TCSupportedChains, | ||
V as UTXOChainList, | ||
T as UTXOChains, | ||
b as WalletOption, | ||
O as erc20ABI | ||
}; | ||
//# sourceMappingURL=index.es.js.map |
{ | ||
"author": "swapkit-oss-team", | ||
"author": "swapkit-oss", | ||
"description": "SwapKit Lib types", | ||
"devDependencies": { | ||
"@types/node": "20.11.5", | ||
"vite": "5.0.12", | ||
"@internal/config": "0.0.0-nightly-20240208140027" | ||
"vite": "5.1.3" | ||
}, | ||
"eslintConfig": { | ||
"extends": "../../../internal/eslint-config" | ||
}, | ||
"exports": { | ||
@@ -35,9 +30,9 @@ ".": { | ||
"types": "./dist/index.d.ts", | ||
"version": "0.0.0-nightly-20240208140027", | ||
"version": "0.0.0-nightly-20240223171610", | ||
"scripts": { | ||
"build": "vite build", | ||
"clean": "rm -rf dist vite.config.ts.* .turbo node_modules", | ||
"lint": "eslint ./ --ext .ts,.tsx --fix; tsc --noEmit", | ||
"clean": "rm -rf dist vite.config.ts.* node_modules", | ||
"lint": "biome check --apply ./src", | ||
"test": "echo 'No tests yet'" | ||
} | ||
} |
export const erc20ABI = [ | ||
{ inputs: [], stateMutability: 'nonpayable', type: 'constructor' }, | ||
{ inputs: [], stateMutability: "nonpayable", type: "constructor" }, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'owner', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'spender', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'value', type: 'uint256' }, | ||
{ indexed: true, internalType: "address", name: "owner", type: "address" }, | ||
{ indexed: true, internalType: "address", name: "spender", type: "address" }, | ||
{ indexed: false, internalType: "uint256", name: "value", type: "uint256" }, | ||
], | ||
name: 'Approval', | ||
type: 'event', | ||
name: "Approval", | ||
type: "event", | ||
}, | ||
@@ -16,85 +16,85 @@ { | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'from', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'to', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'value', type: 'uint256' }, | ||
{ indexed: true, internalType: "address", name: "from", type: "address" }, | ||
{ indexed: true, internalType: "address", name: "to", type: "address" }, | ||
{ indexed: false, internalType: "uint256", name: "value", type: "uint256" }, | ||
], | ||
name: 'Transfer', | ||
type: 'event', | ||
name: "Transfer", | ||
type: "event", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: '', type: 'address' }, | ||
{ internalType: 'address', name: '', type: 'address' }, | ||
{ internalType: "address", name: "", type: "address" }, | ||
{ internalType: "address", name: "", type: "address" }, | ||
], | ||
name: 'allowance', | ||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
name: "allowance", | ||
outputs: [{ internalType: "uint256", name: "", type: "uint256" }], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: 'spender', type: 'address' }, | ||
{ internalType: 'uint256', name: 'value', type: 'uint256' }, | ||
{ internalType: "address", name: "spender", type: "address" }, | ||
{ internalType: "uint256", name: "value", type: "uint256" }, | ||
], | ||
name: 'approve', | ||
outputs: [{ internalType: 'bool', name: 'success', type: 'bool' }], | ||
stateMutability: 'nonpayable', | ||
type: 'function', | ||
name: "approve", | ||
outputs: [{ internalType: "bool", name: "success", type: "bool" }], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [{ internalType: 'address', name: '', type: 'address' }], | ||
name: 'balanceOf', | ||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
inputs: [{ internalType: "address", name: "", type: "address" }], | ||
name: "balanceOf", | ||
outputs: [{ internalType: "uint256", name: "", type: "uint256" }], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [], | ||
name: 'decimals', | ||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
name: "decimals", | ||
outputs: [{ internalType: "uint256", name: "", type: "uint256" }], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [], | ||
name: 'name', | ||
outputs: [{ internalType: 'string', name: '', type: 'string' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
name: "name", | ||
outputs: [{ internalType: "string", name: "", type: "string" }], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [], | ||
name: 'symbol', | ||
outputs: [{ internalType: 'string', name: '', type: 'string' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
name: "symbol", | ||
outputs: [{ internalType: "string", name: "", type: "string" }], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [], | ||
name: 'totalSupply', | ||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
name: "totalSupply", | ||
outputs: [{ internalType: "uint256", name: "", type: "uint256" }], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: 'to', type: 'address' }, | ||
{ internalType: 'uint256', name: 'value', type: 'uint256' }, | ||
{ internalType: "address", name: "to", type: "address" }, | ||
{ internalType: "uint256", name: "value", type: "uint256" }, | ||
], | ||
name: 'transfer', | ||
outputs: [{ internalType: 'bool', name: 'success', type: 'bool' }], | ||
stateMutability: 'nonpayable', | ||
type: 'function', | ||
name: "transfer", | ||
outputs: [{ internalType: "bool", name: "success", type: "bool" }], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: 'from', type: 'address' }, | ||
{ internalType: 'address', name: 'to', type: 'address' }, | ||
{ internalType: 'uint256', name: 'value', type: 'uint256' }, | ||
{ internalType: "address", name: "from", type: "address" }, | ||
{ internalType: "address", name: "to", type: "address" }, | ||
{ internalType: "uint256", name: "value", type: "uint256" }, | ||
], | ||
name: 'transferFrom', | ||
outputs: [{ internalType: 'bool', name: 'success', type: 'bool' }], | ||
stateMutability: 'nonpayable', | ||
type: 'function', | ||
name: "transferFrom", | ||
outputs: [{ internalType: "bool", name: "success", type: "bool" }], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
]; |
export const TCEthereumVaultAbi = [ | ||
{ | ||
inputs: [{ internalType: 'address', name: 'rune', type: 'address' }], | ||
stateMutability: 'nonpayable', | ||
type: 'constructor', | ||
inputs: [{ internalType: "address", name: "rune", type: "address" }], | ||
stateMutability: "nonpayable", | ||
type: "constructor", | ||
}, | ||
@@ -10,9 +10,9 @@ { | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'to', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'asset', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
{ indexed: true, internalType: "address", name: "to", type: "address" }, | ||
{ indexed: true, internalType: "address", name: "asset", type: "address" }, | ||
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ indexed: false, internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'Deposit', | ||
type: 'event', | ||
name: "Deposit", | ||
type: "event", | ||
}, | ||
@@ -22,10 +22,10 @@ { | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'oldVault', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'newVault', type: 'address' }, | ||
{ indexed: false, internalType: 'address', name: 'asset', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
{ indexed: true, internalType: "address", name: "oldVault", type: "address" }, | ||
{ indexed: true, internalType: "address", name: "newVault", type: "address" }, | ||
{ indexed: false, internalType: "address", name: "asset", type: "address" }, | ||
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ indexed: false, internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'TransferAllowance', | ||
type: 'event', | ||
name: "TransferAllowance", | ||
type: "event", | ||
}, | ||
@@ -35,10 +35,10 @@ { | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'vault', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'to', type: 'address' }, | ||
{ indexed: false, internalType: 'address', name: 'asset', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
{ indexed: true, internalType: "address", name: "vault", type: "address" }, | ||
{ indexed: true, internalType: "address", name: "to", type: "address" }, | ||
{ indexed: false, internalType: "address", name: "asset", type: "address" }, | ||
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ indexed: false, internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'TransferOut', | ||
type: 'event', | ||
name: "TransferOut", | ||
type: "event", | ||
}, | ||
@@ -48,12 +48,12 @@ { | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'vault', type: 'address' }, | ||
{ indexed: false, internalType: 'address', name: 'target', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ indexed: false, internalType: 'address', name: 'finalAsset', type: 'address' }, | ||
{ indexed: false, internalType: 'address', name: 'to', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amountOutMin', type: 'uint256' }, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
{ indexed: true, internalType: "address", name: "vault", type: "address" }, | ||
{ indexed: false, internalType: "address", name: "target", type: "address" }, | ||
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ indexed: false, internalType: "address", name: "finalAsset", type: "address" }, | ||
{ indexed: false, internalType: "address", name: "to", type: "address" }, | ||
{ indexed: false, internalType: "uint256", name: "amountOutMin", type: "uint256" }, | ||
{ indexed: false, internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'TransferOutAndCall', | ||
type: 'event', | ||
name: "TransferOutAndCall", | ||
type: "event", | ||
}, | ||
@@ -63,118 +63,118 @@ { | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'oldVault', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'newVault', type: 'address' }, | ||
{ indexed: true, internalType: "address", name: "oldVault", type: "address" }, | ||
{ indexed: true, internalType: "address", name: "newVault", type: "address" }, | ||
{ | ||
components: [ | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
], | ||
indexed: false, | ||
internalType: 'struct THORChain_Router.Coin[]', | ||
name: 'coins', | ||
type: 'tuple[]', | ||
internalType: "struct THORChain_Router.Coin[]", | ||
name: "coins", | ||
type: "tuple[]", | ||
}, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
{ indexed: false, internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'VaultTransfer', | ||
type: 'event', | ||
name: "VaultTransfer", | ||
type: "event", | ||
}, | ||
{ | ||
inputs: [], | ||
name: 'RUNE', | ||
outputs: [{ internalType: 'address', name: '', type: 'address' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
name: "RUNE", | ||
outputs: [{ internalType: "address", name: "", type: "address" }], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address payable', name: 'vault', type: 'address' }, | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: "address payable", name: "vault", type: "address" }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'deposit', | ||
name: "deposit", | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
stateMutability: "payable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address payable', name: 'vault', type: 'address' }, | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: 'uint256', name: 'expiration', type: 'uint256' }, | ||
{ internalType: "address payable", name: "vault", type: "address" }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
{ internalType: "uint256", name: "expiration", type: "uint256" }, | ||
], | ||
name: 'depositWithExpiry', | ||
name: "depositWithExpiry", | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
stateMutability: "payable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: 'router', type: 'address' }, | ||
{ internalType: 'address payable', name: 'asgard', type: 'address' }, | ||
{ internalType: "address", name: "router", type: "address" }, | ||
{ internalType: "address payable", name: "asgard", type: "address" }, | ||
{ | ||
components: [ | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
], | ||
internalType: 'struct THORChain_Router.Coin[]', | ||
name: 'coins', | ||
type: 'tuple[]', | ||
internalType: "struct THORChain_Router.Coin[]", | ||
name: "coins", | ||
type: "tuple[]", | ||
}, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'returnVaultAssets', | ||
name: "returnVaultAssets", | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
stateMutability: "payable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: 'router', type: 'address' }, | ||
{ internalType: 'address', name: 'newVault', type: 'address' }, | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: "address", name: "router", type: "address" }, | ||
{ internalType: "address", name: "newVault", type: "address" }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'transferAllowance', | ||
name: "transferAllowance", | ||
outputs: [], | ||
stateMutability: 'nonpayable', | ||
type: 'function', | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address payable', name: 'to', type: 'address' }, | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: "address payable", name: "to", type: "address" }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'transferOut', | ||
name: "transferOut", | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
stateMutability: "payable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address payable', name: 'aggregator', type: 'address' }, | ||
{ internalType: 'address', name: 'finalToken', type: 'address' }, | ||
{ internalType: 'address', name: 'to', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amountOutMin', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: "address payable", name: "aggregator", type: "address" }, | ||
{ internalType: "address", name: "finalToken", type: "address" }, | ||
{ internalType: "address", name: "to", type: "address" }, | ||
{ internalType: "uint256", name: "amountOutMin", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'transferOutAndCall', | ||
name: "transferOutAndCall", | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
stateMutability: "payable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: 'vault', type: 'address' }, | ||
{ internalType: 'address', name: 'token', type: 'address' }, | ||
{ internalType: "address", name: "vault", type: "address" }, | ||
{ internalType: "address", name: "token", type: "address" }, | ||
], | ||
name: 'vaultAllowance', | ||
outputs: [{ internalType: 'uint256', name: 'amount', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
name: "vaultAllowance", | ||
outputs: [{ internalType: "uint256", name: "amount", type: "uint256" }], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
@@ -184,13 +184,13 @@ ]; | ||
export const TCAvalancheDepositABI = [ | ||
{ inputs: [], stateMutability: 'nonpayable', type: 'constructor' }, | ||
{ inputs: [], stateMutability: "nonpayable", type: "constructor" }, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'to', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'asset', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
{ indexed: true, internalType: "address", name: "to", type: "address" }, | ||
{ indexed: true, internalType: "address", name: "asset", type: "address" }, | ||
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ indexed: false, internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'Deposit', | ||
type: 'event', | ||
name: "Deposit", | ||
type: "event", | ||
}, | ||
@@ -200,10 +200,10 @@ { | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'oldVault', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'newVault', type: 'address' }, | ||
{ indexed: false, internalType: 'address', name: 'asset', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
{ indexed: true, internalType: "address", name: "oldVault", type: "address" }, | ||
{ indexed: true, internalType: "address", name: "newVault", type: "address" }, | ||
{ indexed: false, internalType: "address", name: "asset", type: "address" }, | ||
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ indexed: false, internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'TransferAllowance', | ||
type: 'event', | ||
name: "TransferAllowance", | ||
type: "event", | ||
}, | ||
@@ -213,10 +213,10 @@ { | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'vault', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'to', type: 'address' }, | ||
{ indexed: false, internalType: 'address', name: 'asset', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
{ indexed: true, internalType: "address", name: "vault", type: "address" }, | ||
{ indexed: true, internalType: "address", name: "to", type: "address" }, | ||
{ indexed: false, internalType: "address", name: "asset", type: "address" }, | ||
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ indexed: false, internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'TransferOut', | ||
type: 'event', | ||
name: "TransferOut", | ||
type: "event", | ||
}, | ||
@@ -226,12 +226,12 @@ { | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'vault', type: 'address' }, | ||
{ indexed: false, internalType: 'address', name: 'target', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ indexed: false, internalType: 'address', name: 'finalAsset', type: 'address' }, | ||
{ indexed: false, internalType: 'address', name: 'to', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amountOutMin', type: 'uint256' }, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
{ indexed: true, internalType: "address", name: "vault", type: "address" }, | ||
{ indexed: false, internalType: "address", name: "target", type: "address" }, | ||
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ indexed: false, internalType: "address", name: "finalAsset", type: "address" }, | ||
{ indexed: false, internalType: "address", name: "to", type: "address" }, | ||
{ indexed: false, internalType: "uint256", name: "amountOutMin", type: "uint256" }, | ||
{ indexed: false, internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'TransferOutAndCall', | ||
type: 'event', | ||
name: "TransferOutAndCall", | ||
type: "event", | ||
}, | ||
@@ -241,111 +241,111 @@ { | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'oldVault', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'newVault', type: 'address' }, | ||
{ indexed: true, internalType: "address", name: "oldVault", type: "address" }, | ||
{ indexed: true, internalType: "address", name: "newVault", type: "address" }, | ||
{ | ||
components: [ | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
], | ||
indexed: false, | ||
internalType: 'struct AvaxRouter.Coin[]', | ||
name: 'coins', | ||
type: 'tuple[]', | ||
internalType: "struct AvaxRouter.Coin[]", | ||
name: "coins", | ||
type: "tuple[]", | ||
}, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
{ indexed: false, internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'VaultTransfer', | ||
type: 'event', | ||
name: "VaultTransfer", | ||
type: "event", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address payable', name: 'vault', type: 'address' }, | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: "address payable", name: "vault", type: "address" }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'deposit', | ||
name: "deposit", | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
stateMutability: "payable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address payable', name: 'vault', type: 'address' }, | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: 'uint256', name: 'expiration', type: 'uint256' }, | ||
{ internalType: "address payable", name: "vault", type: "address" }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
{ internalType: "uint256", name: "expiration", type: "uint256" }, | ||
], | ||
name: 'depositWithExpiry', | ||
name: "depositWithExpiry", | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
stateMutability: "payable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: 'router', type: 'address' }, | ||
{ internalType: 'address payable', name: 'asgard', type: 'address' }, | ||
{ internalType: "address", name: "router", type: "address" }, | ||
{ internalType: "address payable", name: "asgard", type: "address" }, | ||
{ | ||
components: [ | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
], | ||
internalType: 'struct AvaxRouter.Coin[]', | ||
name: 'coins', | ||
type: 'tuple[]', | ||
internalType: "struct AvaxRouter.Coin[]", | ||
name: "coins", | ||
type: "tuple[]", | ||
}, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'returnVaultAssets', | ||
name: "returnVaultAssets", | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
stateMutability: "payable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: 'router', type: 'address' }, | ||
{ internalType: 'address', name: 'newVault', type: 'address' }, | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: "address", name: "router", type: "address" }, | ||
{ internalType: "address", name: "newVault", type: "address" }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'transferAllowance', | ||
name: "transferAllowance", | ||
outputs: [], | ||
stateMutability: 'nonpayable', | ||
type: 'function', | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address payable', name: 'to', type: 'address' }, | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: "address payable", name: "to", type: "address" }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'transferOut', | ||
name: "transferOut", | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
stateMutability: "payable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address payable', name: 'target', type: 'address' }, | ||
{ internalType: 'address', name: 'finalToken', type: 'address' }, | ||
{ internalType: 'address', name: 'to', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amountOutMin', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: "address payable", name: "target", type: "address" }, | ||
{ internalType: "address", name: "finalToken", type: "address" }, | ||
{ internalType: "address", name: "to", type: "address" }, | ||
{ internalType: "uint256", name: "amountOutMin", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'transferOutAndCall', | ||
name: "transferOutAndCall", | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
stateMutability: "payable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: 'vault', type: 'address' }, | ||
{ internalType: 'address', name: 'token', type: 'address' }, | ||
{ internalType: "address", name: "vault", type: "address" }, | ||
{ internalType: "address", name: "token", type: "address" }, | ||
], | ||
name: 'vaultAllowance', | ||
outputs: [{ internalType: 'uint256', name: 'amount', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
name: "vaultAllowance", | ||
outputs: [{ internalType: "uint256", name: "amount", type: "uint256" }], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
@@ -355,13 +355,13 @@ ]; | ||
export const TCBscDepositABI = [ | ||
{ inputs: [], stateMutability: 'nonpayable', type: 'constructor' }, | ||
{ inputs: [], stateMutability: "nonpayable", type: "constructor" }, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'to', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'asset', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
{ indexed: true, internalType: "address", name: "to", type: "address" }, | ||
{ indexed: true, internalType: "address", name: "asset", type: "address" }, | ||
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ indexed: false, internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'Deposit', | ||
type: 'event', | ||
name: "Deposit", | ||
type: "event", | ||
}, | ||
@@ -371,10 +371,10 @@ { | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'oldVault', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'newVault', type: 'address' }, | ||
{ indexed: false, internalType: 'address', name: 'asset', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
{ indexed: true, internalType: "address", name: "oldVault", type: "address" }, | ||
{ indexed: true, internalType: "address", name: "newVault", type: "address" }, | ||
{ indexed: false, internalType: "address", name: "asset", type: "address" }, | ||
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ indexed: false, internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'TransferAllowance', | ||
type: 'event', | ||
name: "TransferAllowance", | ||
type: "event", | ||
}, | ||
@@ -384,10 +384,10 @@ { | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'vault', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'to', type: 'address' }, | ||
{ indexed: false, internalType: 'address', name: 'asset', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
{ indexed: true, internalType: "address", name: "vault", type: "address" }, | ||
{ indexed: true, internalType: "address", name: "to", type: "address" }, | ||
{ indexed: false, internalType: "address", name: "asset", type: "address" }, | ||
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ indexed: false, internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'TransferOut', | ||
type: 'event', | ||
name: "TransferOut", | ||
type: "event", | ||
}, | ||
@@ -397,12 +397,12 @@ { | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'vault', type: 'address' }, | ||
{ indexed: false, internalType: 'address', name: 'target', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ indexed: false, internalType: 'address', name: 'finalAsset', type: 'address' }, | ||
{ indexed: false, internalType: 'address', name: 'to', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amountOutMin', type: 'uint256' }, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
{ indexed: true, internalType: "address", name: "vault", type: "address" }, | ||
{ indexed: false, internalType: "address", name: "target", type: "address" }, | ||
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ indexed: false, internalType: "address", name: "finalAsset", type: "address" }, | ||
{ indexed: false, internalType: "address", name: "to", type: "address" }, | ||
{ indexed: false, internalType: "uint256", name: "amountOutMin", type: "uint256" }, | ||
{ indexed: false, internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'TransferOutAndCall', | ||
type: 'event', | ||
name: "TransferOutAndCall", | ||
type: "event", | ||
}, | ||
@@ -412,100 +412,100 @@ { | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'oldVault', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'newVault', type: 'address' }, | ||
{ indexed: true, internalType: "address", name: "oldVault", type: "address" }, | ||
{ indexed: true, internalType: "address", name: "newVault", type: "address" }, | ||
{ | ||
components: [ | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
], | ||
indexed: false, | ||
internalType: 'struct THORChain_Router.Coin[]', | ||
name: 'coins', | ||
type: 'tuple[]', | ||
internalType: "struct THORChain_Router.Coin[]", | ||
name: "coins", | ||
type: "tuple[]", | ||
}, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
{ indexed: false, internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'VaultTransfer', | ||
type: 'event', | ||
name: "VaultTransfer", | ||
type: "event", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address payable', name: 'vault', type: 'address' }, | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: 'uint256', name: 'expiration', type: 'uint256' }, | ||
{ internalType: "address payable", name: "vault", type: "address" }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
{ internalType: "uint256", name: "expiration", type: "uint256" }, | ||
], | ||
name: 'depositWithExpiry', | ||
name: "depositWithExpiry", | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
stateMutability: "payable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: 'router', type: 'address' }, | ||
{ internalType: 'address payable', name: 'asgard', type: 'address' }, | ||
{ internalType: "address", name: "router", type: "address" }, | ||
{ internalType: "address payable", name: "asgard", type: "address" }, | ||
{ | ||
components: [ | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
], | ||
internalType: 'struct THORChain_Router.Coin[]', | ||
name: 'coins', | ||
type: 'tuple[]', | ||
internalType: "struct THORChain_Router.Coin[]", | ||
name: "coins", | ||
type: "tuple[]", | ||
}, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'returnVaultAssets', | ||
name: "returnVaultAssets", | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
stateMutability: "payable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: 'router', type: 'address' }, | ||
{ internalType: 'address', name: 'newVault', type: 'address' }, | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: "address", name: "router", type: "address" }, | ||
{ internalType: "address", name: "newVault", type: "address" }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'transferAllowance', | ||
name: "transferAllowance", | ||
outputs: [], | ||
stateMutability: 'nonpayable', | ||
type: 'function', | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address payable', name: 'to', type: 'address' }, | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: "address payable", name: "to", type: "address" }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'transferOut', | ||
name: "transferOut", | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
stateMutability: "payable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address payable', name: 'target', type: 'address' }, | ||
{ internalType: 'address', name: 'finalToken', type: 'address' }, | ||
{ internalType: 'address', name: 'to', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amountOutMin', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: "address payable", name: "target", type: "address" }, | ||
{ internalType: "address", name: "finalToken", type: "address" }, | ||
{ internalType: "address", name: "to", type: "address" }, | ||
{ internalType: "uint256", name: "amountOutMin", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
], | ||
name: 'transferOutAndCall', | ||
name: "transferOutAndCall", | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
stateMutability: "payable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: 'vault', type: 'address' }, | ||
{ internalType: 'address', name: 'token', type: 'address' }, | ||
{ internalType: "address", name: "vault", type: "address" }, | ||
{ internalType: "address", name: "token", type: "address" }, | ||
], | ||
name: 'vaultAllowance', | ||
outputs: [{ internalType: 'uint256', name: 'amount', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
name: "vaultAllowance", | ||
outputs: [{ internalType: "uint256", name: "amount", type: "uint256" }], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
]; |
@@ -22,10 +22,10 @@ export type GetAddressAndPubKeyResponse = { | ||
export enum MemoType { | ||
BOND = 'BOND', | ||
DEPOSIT = '+', | ||
LEAVE = 'LEAVE', | ||
THORNAME_REGISTER = '~', | ||
UNBOND = 'UNBOND', | ||
WITHDRAW = '-', | ||
OPEN_LOAN = '$+', | ||
CLOSE_LOAN = '$-', | ||
BOND = "BOND", | ||
DEPOSIT = "+", | ||
LEAVE = "LEAVE", | ||
THORNAME_REGISTER = "~", | ||
UNBOND = "UNBOND", | ||
WITHDRAW = "-", | ||
OPEN_LOAN = "$+", | ||
CLOSE_LOAN = "$-", | ||
} |
@@ -1,21 +0,15 @@ | ||
import type { Chain, CosmosChain, EVMChain, UTXOChain } from './network.ts'; | ||
import type { WalletOption } from './wallet.ts'; | ||
import type { Chain, CosmosChain, EVMChain, UTXOChain } from "./network.ts"; | ||
import type { WalletOption } from "./wallet.ts"; | ||
type ConnectMethodNames = | ||
| 'connectEVMWallet' | ||
| 'connectKeplr' | ||
| 'connectKeystore' | ||
| 'connectKeepkey' | ||
| 'connectLedger' | ||
| 'connectOkx' | ||
| 'connectTrezor' | ||
| 'connectWalletconnect' | ||
| 'connectXDEFI'; | ||
| "connectEVMWallet" | ||
| "connectKeplr" | ||
| "connectKeystore" | ||
| "connectKeepkey" | ||
| "connectLedger" | ||
| "connectOkx" | ||
| "connectTrezor" | ||
| "connectWalletconnect" | ||
| "connectXDEFI"; | ||
type ChainWallet = { | ||
address: string; | ||
balance: any[]; | ||
walletType: WalletOption; | ||
}; | ||
export type ConnectConfig = { | ||
@@ -68,13 +62,10 @@ stagenet?: boolean; | ||
export type AddChainWalletParams = { | ||
chain: Chain; | ||
wallet: ChainWallet; | ||
walletMethods: any; | ||
export type AddChainWalletParams<T extends Chain> = { | ||
address: string; | ||
balance: any[]; | ||
walletType: WalletOption; | ||
chain: T; | ||
[key: string]: any; | ||
}; | ||
export type Witness = { | ||
value: number; | ||
script: Buffer; | ||
}; | ||
type ApisType = { [key in UTXOChain]?: string | any } & { | ||
@@ -87,3 +78,3 @@ [key in EVMChain]?: string | any; | ||
export type ConnectWalletParams = { | ||
addChain: (params: AddChainWalletParams) => void; | ||
addChain: <T extends Chain>(params: AddChainWalletParams<T>) => void; | ||
config: ConnectConfig; | ||
@@ -94,3 +85,8 @@ rpcUrls: { [chain in Chain]?: string }; | ||
export type ExtendParams<WalletConnectMethodNames = ''> = { | ||
export type Witness = { | ||
value: number; | ||
script: Buffer; | ||
}; | ||
export type ExtendParams<WalletConnectMethodNames = ""> = { | ||
excludedChains?: Chain[]; | ||
@@ -107,18 +103,18 @@ config?: ConnectConfig; | ||
export enum QuoteMode { | ||
TC_SUPPORTED_TO_TC_SUPPORTED = 'TC-TC', | ||
TC_SUPPORTED_TO_ETH = 'TC-ERC20', | ||
TC_SUPPORTED_TO_AVAX = 'TC-ARC20', | ||
TC_SUPPORTED_TO_BSC = 'TC-BEP20', | ||
ETH_TO_TC_SUPPORTED = 'ERC20-TC', | ||
ETH_TO_ETH = 'ERC20-ERC20', | ||
ETH_TO_AVAX = 'ERC20-ARC20', | ||
ETH_TO_BSC = 'ERC20-BEP20', | ||
AVAX_TO_TC_SUPPORTED = 'ARC20-TC', | ||
AVAX_TO_ETH = 'ARC20-ERC20', | ||
AVAX_TO_AVAX = 'ARC20-ARC20', | ||
AVAX_TO_BSC = 'ARC20-BEP20', | ||
BSC_TO_TC_SUPPORTED = 'BEP20-TC', | ||
BSC_TO_ETH = 'BEP20-ERC20', | ||
BSC_TO_AVAX = 'BEP20-ARC20', | ||
BSC_TO_BSC = 'BEP20-BEP20', | ||
TC_SUPPORTED_TO_TC_SUPPORTED = "TC-TC", | ||
TC_SUPPORTED_TO_ETH = "TC-ERC20", | ||
TC_SUPPORTED_TO_AVAX = "TC-ARC20", | ||
TC_SUPPORTED_TO_BSC = "TC-BEP20", | ||
ETH_TO_TC_SUPPORTED = "ERC20-TC", | ||
ETH_TO_ETH = "ERC20-ERC20", | ||
ETH_TO_AVAX = "ERC20-ARC20", | ||
ETH_TO_BSC = "ERC20-BEP20", | ||
AVAX_TO_TC_SUPPORTED = "ARC20-TC", | ||
AVAX_TO_ETH = "ARC20-ERC20", | ||
AVAX_TO_AVAX = "ARC20-ARC20", | ||
AVAX_TO_BSC = "ARC20-BEP20", | ||
BSC_TO_TC_SUPPORTED = "BEP20-TC", | ||
BSC_TO_ETH = "BEP20-ERC20", | ||
BSC_TO_AVAX = "BEP20-ARC20", | ||
BSC_TO_BSC = "BEP20-BEP20", | ||
} | ||
@@ -125,0 +121,0 @@ |
@@ -1,8 +0,7 @@ | ||
export { erc20ABI } from './abis/erc20.ts'; | ||
export { TCAvalancheDepositABI, TCBscDepositABI, TCEthereumVaultAbi } from './abis/tcEthVault.ts'; | ||
export * from './commonTypes.ts'; | ||
export * from './errors/index.ts'; | ||
export * from './network.ts'; | ||
export * from './thorchain.ts'; | ||
export * from './transactions.ts'; | ||
export * from './wallet.ts'; | ||
export { erc20ABI } from "./abis/erc20.ts"; | ||
export { TCAvalancheDepositABI, TCBscDepositABI, TCEthereumVaultAbi } from "./abis/tcEthVault.ts"; | ||
export * from "./commonTypes.ts"; | ||
export * from "./network.ts"; | ||
export * from "./thorchain.ts"; | ||
export * from "./transactions.ts"; | ||
export * from "./wallet.ts"; |
export enum Chain { | ||
Arbitrum = 'ARB', | ||
Avalanche = 'AVAX', | ||
Binance = 'BNB', | ||
BinanceSmartChain = 'BSC', | ||
Bitcoin = 'BTC', | ||
BitcoinCash = 'BCH', | ||
Cosmos = 'GAIA', | ||
Dogecoin = 'DOGE', | ||
Ethereum = 'ETH', | ||
Kujira = 'KUJI', | ||
Litecoin = 'LTC', | ||
Maya = 'MAYA', | ||
Optimism = 'OP', | ||
Polkadot = 'DOT', | ||
Chainflip = 'FLIP', | ||
Polygon = 'MATIC', | ||
THORChain = 'THOR', | ||
Arbitrum = "ARB", | ||
Avalanche = "AVAX", | ||
Binance = "BNB", | ||
BinanceSmartChain = "BSC", | ||
Bitcoin = "BTC", | ||
BitcoinCash = "BCH", | ||
Cosmos = "GAIA", | ||
Dash = "DASH", | ||
Dogecoin = "DOGE", | ||
Ethereum = "ETH", | ||
Kujira = "KUJI", | ||
Litecoin = "LTC", | ||
Maya = "MAYA", | ||
Optimism = "OP", | ||
Polkadot = "DOT", | ||
Chainflip = "FLIP", | ||
Polygon = "MATIC", | ||
THORChain = "THOR", | ||
} | ||
@@ -23,8 +24,8 @@ type ChainNameType = keyof typeof Chain; | ||
export enum ContractAddress { | ||
ARB = '0x0000000000000000000000000000000000000000', | ||
AVAX = '0x0000000000000000000000000000000000000000', | ||
ETH = '0x0000000000000000000000000000000000000000', | ||
BSC = '0x0000000000000000000000000000000000000000', | ||
MATIC = '0x0000000000000000000000000000000000001010', | ||
OP = '0x4200000000000000000000000000000000000042', | ||
ARB = "0x0000000000000000000000000000000000000000", | ||
AVAX = "0x0000000000000000000000000000000000000000", | ||
ETH = "0x0000000000000000000000000000000000000000", | ||
BSC = "0x0000000000000000000000000000000000000000", | ||
MATIC = "0x0000000000000000000000000000000000001010", | ||
OP = "0x4200000000000000000000000000000000000042", | ||
} | ||
@@ -39,6 +40,7 @@ | ||
BTC = "m/84'/0'/0'/0", | ||
DASH = "m/44'/5'/0'/0", | ||
DOGE = "m/44'/3'/0'/0", | ||
DOT = '////', | ||
DOT = "////", | ||
ETH = "m/44'/60'/0'/0", | ||
FLIP = '////', | ||
FLIP = "////", | ||
GAIA = "m/44'/118'/0'/0", | ||
@@ -62,2 +64,3 @@ KUJI = "m/44'/118'/0'/0", | ||
BTC: [84, 0, 0, 0, 0], | ||
DASH: [44, 5, 0, 0, 0], | ||
DOGE: [44, 3, 0, 0, 0], | ||
@@ -96,4 +99,9 @@ ETH: [44, 60, 0, 0, 0], | ||
THOR = 8, | ||
ZEC = 8, | ||
} | ||
export type SubstrateChain = Chain.Polkadot | Chain.Chainflip; | ||
export const SubstrateChainList: SubstrateChain[] = [Chain.Polkadot, Chain.Chainflip]; | ||
export type EVMChain = | ||
@@ -107,3 +115,3 @@ | Chain.Ethereum | ||
export const EVMChainList: EVMChain[] = [ | ||
export const EVMChains = [ | ||
Chain.Ethereum, | ||
@@ -115,12 +123,28 @@ Chain.Avalanche, | ||
Chain.Polygon, | ||
]; | ||
] as const; | ||
/** | ||
* @deprecated | ||
* Use `EVMChains` instead | ||
*/ | ||
export const EVMChainList = EVMChains; | ||
export type UTXOChain = Chain.Bitcoin | Chain.BitcoinCash | Chain.Dogecoin | Chain.Litecoin; | ||
export type UTXOChain = | ||
| Chain.Bitcoin | ||
| Chain.BitcoinCash | ||
| Chain.Dash | ||
| Chain.Dogecoin | ||
| Chain.Litecoin; | ||
export const UTXOChainList: UTXOChain[] = [ | ||
export const UTXOChains = [ | ||
Chain.Bitcoin, | ||
Chain.BitcoinCash, | ||
Chain.Dash, | ||
Chain.Dogecoin, | ||
Chain.Litecoin, | ||
]; | ||
] as const; | ||
/** | ||
* @deprecated | ||
* Use `UTXOChains` instead | ||
*/ | ||
export const UTXOChainList = UTXOChains; | ||
@@ -134,5 +158,11 @@ export type CosmosChain = | ||
export const CosmosChainList: CosmosChain[] = [Chain.Cosmos, Chain.THORChain, Chain.Binance]; | ||
export const CosmosChains = [Chain.Cosmos, Chain.THORChain, Chain.Binance] as const; | ||
export const TCSupportedChainList = [ | ||
/** | ||
* @deprecated | ||
* Use `CosmosChains` instead | ||
*/ | ||
export const CosmosChainList = CosmosChains; | ||
export const TCSupportedChains = [ | ||
Chain.Avalanche, | ||
@@ -148,63 +178,71 @@ Chain.Binance, | ||
Chain.THORChain, | ||
]; | ||
] as const; | ||
/** | ||
* @deprecated | ||
* Use `TCSupportedChains` instead | ||
*/ | ||
export const TCSupportedChainList = TCSupportedChains; | ||
export enum ChainId { | ||
Arbitrum = '42161', | ||
ArbitrumHex = '0xa4b1', | ||
Avalanche = '43114', | ||
AvalancheHex = '0xa86a', | ||
Binance = 'Binance-Chain-Tigris', | ||
BinanceSmartChain = '56', | ||
BinanceSmartChainHex = '0x38', | ||
Bitcoin = 'bitcoin', | ||
BitcoinCash = 'bitcoincash', | ||
Chainflip = 'chainflip', | ||
Cosmos = 'cosmoshub-4', | ||
Dogecoin = 'dogecoin', | ||
Kujira = 'kaiyo-1', | ||
Ethereum = '1', | ||
EthereumHex = '0x1', | ||
Litecoin = 'litecoin', | ||
Maya = 'mayachain-mainnet-v1', | ||
MayaStagenet = 'mayachain-stagenet-v1', | ||
Optimism = '10', | ||
OptimismHex = '0xa', | ||
Polkadot = 'polkadot', | ||
Polygon = '137', | ||
PolygonHex = '0x89', | ||
THORChain = 'thorchain-mainnet-v1', | ||
THORChainStagenet = 'thorchain-stagenet-v2', | ||
Arbitrum = "42161", | ||
ArbitrumHex = "0xa4b1", | ||
Avalanche = "43114", | ||
AvalancheHex = "0xa86a", | ||
Binance = "Binance-Chain-Tigris", | ||
BinanceSmartChain = "56", | ||
BinanceSmartChainHex = "0x38", | ||
Bitcoin = "bitcoin", | ||
BitcoinCash = "bitcoincash", | ||
Chainflip = "chainflip", | ||
Cosmos = "cosmoshub-4", | ||
Dash = "dash", | ||
Dogecoin = "dogecoin", | ||
Kujira = "kaiyo-1", | ||
Ethereum = "1", | ||
EthereumHex = "0x1", | ||
Litecoin = "litecoin", | ||
Maya = "mayachain-mainnet-v1", | ||
MayaStagenet = "mayachain-stagenet-v1", | ||
Optimism = "10", | ||
OptimismHex = "0xa", | ||
Polkadot = "polkadot", | ||
Polygon = "137", | ||
PolygonHex = "0x89", | ||
THORChain = "thorchain-mainnet-v1", | ||
THORChainStagenet = "thorchain-stagenet-v2", | ||
} | ||
export enum RPCUrl { | ||
Arbitrum = 'https://arb1.arbitrum.io/rpc', | ||
Avalanche = 'https://node-router.thorswap.net/avalanche-c', | ||
Binance = '', | ||
BinanceSmartChain = 'https://bsc-dataseed.binance.org', | ||
Bitcoin = 'https://node-router.thorswap.net/bitcoin', | ||
BitcoinCash = 'https://node-router.thorswap.net/bitcoin-cash', | ||
Chainflip = 'wss://mainnet-archive.chainflip.io', | ||
Cosmos = 'https://node-router.thorswap.net/cosmos/rpc', | ||
Kujira = 'https://rpc-kujira.synergynodes.com/', | ||
Dogecoin = 'https://node-router.thorswap.net/dogecoin', | ||
Ethereum = 'https://node-router.thorswap.net/ethereum', | ||
Litecoin = 'https://node-router.thorswap.net/litecoin', | ||
Maya = 'https://tendermint.mayachain.info', | ||
MayaStagenet = 'https://stagenet.tendermint.mayachain.info', | ||
Optimism = 'https://mainnet.optimism.io', | ||
Polkadot = 'wss://rpc.polkadot.io', | ||
Polygon = 'https://polygon-rpc.com', | ||
THORChain = 'https://rpc.thorswap.net', | ||
THORChainStagenet = 'https://stagenet-rpc.ninerealms.com', | ||
Arbitrum = "https://arb1.arbitrum.io/rpc", | ||
Avalanche = "https://node-router.thorswap.net/avalanche-c", | ||
Binance = "", | ||
BinanceSmartChain = "https://bsc-dataseed.binance.org", | ||
Bitcoin = "https://node-router.thorswap.net/bitcoin", | ||
BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash", | ||
Chainflip = "wss://mainnet-archive.chainflip.io", | ||
Cosmos = "https://node-router.thorswap.net/cosmos/rpc", | ||
Dash = "https://node-router.thorswap.net/dash", | ||
Dogecoin = "https://node-router.thorswap.net/dogecoin", | ||
Ethereum = "https://node-router.thorswap.net/ethereum", | ||
Kujira = "https://rpc-kujira.synergynodes.com/", | ||
Litecoin = "https://node-router.thorswap.net/litecoin", | ||
Maya = "https://tendermint.mayachain.info", | ||
MayaStagenet = "https://stagenet.tendermint.mayachain.info", | ||
Optimism = "https://mainnet.optimism.io", | ||
Polkadot = "wss://rpc.polkadot.io", | ||
Polygon = "https://polygon-rpc.com", | ||
THORChain = "https://rpc.thorswap.net", | ||
THORChainStagenet = "https://stagenet-rpc.ninerealms.com", | ||
} | ||
export enum ApiUrl { | ||
Cosmos = 'https://node-router.thorswap.net/cosmos/rest', | ||
Kujira = 'https://lcd-kujira.synergynodes.com/', | ||
MayanodeMainnet = 'https://mayanode.mayachain.info', | ||
MayanodeStagenet = 'https://stagenet.mayanode.mayachain.info', | ||
ThornodeMainnet = 'https://thornode.thorswap.net', | ||
ThornodeStagenet = 'https://stagenet-thornode.ninerealms.com', | ||
ThorswapApi = 'https://api.thorswap.net', | ||
ThorswapStatic = 'https://static.thorswap.net', | ||
Cosmos = "https://node-router.thorswap.net/cosmos/rest", | ||
Kujira = "https://lcd-kujira.synergynodes.com/", | ||
MayanodeMainnet = "https://mayanode.mayachain.info", | ||
MayanodeStagenet = "https://stagenet.mayanode.mayachain.info", | ||
ThornodeMainnet = "https://thornode.thorswap.net", | ||
ThornodeStagenet = "https://stagenet-thornode.ninerealms.com", | ||
ThorswapApi = "https://api.thorswap.net", | ||
ThorswapStatic = "https://static.thorswap.net", | ||
} | ||
@@ -264,2 +302,3 @@ | ||
[ChainId.Cosmos]: Chain.Cosmos, | ||
[ChainId.Dash]: Chain.Dash, | ||
[ChainId.Dogecoin]: Chain.Dogecoin, | ||
@@ -282,19 +321,20 @@ [ChainId.EthereumHex]: Chain.Ethereum, | ||
export const ChainToExplorerUrl: Record<Chain, string> = { | ||
[Chain.Arbitrum]: 'https://arbiscan.io', | ||
[Chain.Avalanche]: 'https://snowtrace.io', | ||
[Chain.BinanceSmartChain]: 'https://bscscan.com', | ||
[Chain.Binance]: 'https://explorer.binance.org', | ||
[Chain.BitcoinCash]: 'https://www.blockchair.com/bitcoin-cash', | ||
[Chain.Bitcoin]: 'https://blockchair.com/bitcoin', | ||
[Chain.Chainflip]: 'https://explorer.polkascan.io/polkadot', | ||
[Chain.Cosmos]: 'https://cosmos.bigdipper.live', | ||
[Chain.Dogecoin]: 'https://blockchair.com/dogecoin', | ||
[Chain.Kujira]: 'https://finder.kujira.network/kaiyo-1', | ||
[Chain.Ethereum]: 'https://etherscan.io', | ||
[Chain.Litecoin]: 'https://blockchair.com/litecoin', | ||
[Chain.Maya]: 'https://www.mayascan.org', | ||
[Chain.Optimism]: 'https://optimistic.etherscan.io', | ||
[Chain.Polkadot]: 'https://explorer.polkascan.io/polkadot', | ||
[Chain.Polygon]: 'https://polygonscan.com', | ||
[Chain.THORChain]: 'https://runescan.io', | ||
[Chain.Arbitrum]: "https://arbiscan.io", | ||
[Chain.Avalanche]: "https://snowtrace.io", | ||
[Chain.BinanceSmartChain]: "https://bscscan.com", | ||
[Chain.Binance]: "https://explorer.binance.org", | ||
[Chain.BitcoinCash]: "https://www.blockchair.com/bitcoin-cash", | ||
[Chain.Bitcoin]: "https://blockchair.com/bitcoin", | ||
[Chain.Chainflip]: "https://explorer.polkascan.io/polkadot", | ||
[Chain.Cosmos]: "https://cosmos.bigdipper.live", | ||
[Chain.Dash]: "https://blockchair.com/dash", | ||
[Chain.Dogecoin]: "https://blockchair.com/dogecoin", | ||
[Chain.Kujira]: "https://finder.kujira.network/kaiyo-1", | ||
[Chain.Ethereum]: "https://etherscan.io", | ||
[Chain.Litecoin]: "https://blockchair.com/litecoin", | ||
[Chain.Maya]: "https://www.mayascan.org", | ||
[Chain.Optimism]: "https://optimistic.etherscan.io", | ||
[Chain.Polkadot]: "https://explorer.polkascan.io/polkadot", | ||
[Chain.Polygon]: "https://polygonscan.com", | ||
[Chain.THORChain]: "https://runescan.io", | ||
}; |
@@ -18,10 +18,10 @@ export type GetAddressAndPubKeyResponse = { | ||
export enum MemoType { | ||
BOND = 'BOND', | ||
DEPOSIT = '+', | ||
LEAVE = 'LEAVE', | ||
THORNAME_REGISTER = '~', | ||
UNBOND = 'UNBOND', | ||
WITHDRAW = '-', | ||
OPEN_LOAN = '$+', | ||
CLOSE_LOAN = '$-', | ||
BOND = "BOND", | ||
DEPOSIT = "+", | ||
LEAVE = "LEAVE", | ||
THORNAME_REGISTER = "~", | ||
UNBOND = "UNBOND", | ||
WITHDRAW = "-", | ||
OPEN_LOAN = "$+", | ||
CLOSE_LOAN = "$-", | ||
} |
export enum FeeOption { | ||
Average = 'average', | ||
Fast = 'fast', | ||
Fastest = 'fastest', | ||
Average = "average", | ||
Fast = "fast", | ||
Fastest = "fastest", | ||
} | ||
@@ -6,0 +6,0 @@ |
export enum WalletOption { | ||
'KEYSTORE' = 'KEYSTORE', | ||
'KEEPKEY' = 'KEEPKEY', | ||
'XDEFI' = 'XDEFI', | ||
'METAMASK' = 'METAMASK', | ||
'COINBASE_WEB' = 'COINBASE_WEB', | ||
'TREZOR' = 'TREZOR', | ||
'TRUSTWALLET_WEB' = 'TRUSTWALLET_WEB', | ||
'LEDGER' = 'LEDGER', | ||
'KEPLR' = 'KEPLR', | ||
'OKX' = 'OKX', | ||
'OKX_MOBILE' = 'OKX_MOBILE', | ||
'BRAVE' = 'BRAVE', | ||
'WALLETCONNECT' = 'WALLETCONNECT', | ||
KEYSTORE = "KEYSTORE", | ||
KEEPKEY = "KEEPKEY", | ||
XDEFI = "XDEFI", | ||
METAMASK = "METAMASK", | ||
COINBASE_WEB = "COINBASE_WEB", | ||
TREZOR = "TREZOR", | ||
TRUSTWALLET_WEB = "TRUSTWALLET_WEB", | ||
LEDGER = "LEDGER", | ||
KEPLR = "KEPLR", | ||
OKX = "OKX", | ||
OKX_MOBILE = "OKX_MOBILE", | ||
BRAVE = "BRAVE", | ||
WALLETCONNECT = "WALLETCONNECT", | ||
} | ||
@@ -16,0 +16,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1
236382
16
2659