Socket
Socket
Sign inDemoInstall

@thorswap-lib/types

Package Overview
Dependencies
Maintainers
3
Versions
192
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thorswap-lib/types - npm Package Compare versions

Comparing version 1.0.0-development.95 to 1.0.0-development.96

1245

dist/index.d.ts

@@ -1,9 +0,12 @@

import { BigNumber, BigNumberish, FixedNumber } from '@ethersproject/bignumber';
/// <reference types="node" />
export declare type AddChainWalletParams = ParamsWithChain<{
wallet: ChainWallet;
walletMethods: any;
}>;
import { BigNumber } from '@ethersproject/bignumber';
import { BigNumberish } from '@ethersproject/bignumber';
import { FixedNumber } from '@ethersproject/bignumber';
export declare type Address = string;
export declare type AddChainWalletParams = {
chain: Chain;
wallet: ChainWallet;
walletMethods: any;
};

@@ -14,159 +17,147 @@ export declare type AmountWithAssetDenom = AmountWithDenom<Denomination.Asset, FixedNumber>;

declare type AmountWithDenom<T, U = BigNumber | FixedNumber> = T extends Denomination
? {
type: T;
amount: () => U;
plus: (value: U | AmountWithDenom<T, U>, decimal?: number) => AmountWithDenom<T, U>;
minus: (value: U | AmountWithDenom<T, U>, decimal?: number) => AmountWithDenom<T, U>;
times: (value: U | AmountWithDenom<T, U>, decimal?: number) => AmountWithDenom<T, U>;
div: (value: U | AmountWithDenom<T, U>, decimal?: number) => AmountWithDenom<T, U>;
gt: (value: U | AmountWithDenom<T, U>) => boolean;
gte: (value: U | AmountWithDenom<T, U>) => boolean;
lt: (value: U | AmountWithDenom<T, U>) => boolean;
lte: (value: U | AmountWithDenom<T, U>) => boolean;
eq: (value: U | AmountWithDenom<T, U>) => boolean;
decimal: number;
}
: never;
declare type AmountWithDenom<T, U = BigNumber | FixedNumber> = T extends Denomination ? {
type: T;
amount: () => U;
plus: (value: U | AmountWithDenom<T, U>, decimal?: number) => AmountWithDenom<T, U>;
minus: (value: U | AmountWithDenom<T, U>, decimal?: number) => AmountWithDenom<T, U>;
times: (value: U | AmountWithDenom<T, U>, decimal?: number) => AmountWithDenom<T, U>;
div: (value: U | AmountWithDenom<T, U>, decimal?: number) => AmountWithDenom<T, U>;
gt: (value: U | AmountWithDenom<T, U>) => boolean;
gte: (value: U | AmountWithDenom<T, U>) => boolean;
lt: (value: U | AmountWithDenom<T, U>) => boolean;
lte: (value: U | AmountWithDenom<T, U>) => boolean;
eq: (value: U | AmountWithDenom<T, U>) => boolean;
decimal: number;
} : never;
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;
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;
shouldLog?: boolean;
shouldTrace?: boolean;
shouldThrow?: boolean;
};
declare type ApisType = {
[key in UTXOChains]?: string | any;
[key in UTXOChain]?: string | any;
} & {
[key in EVMChains]?: string | any;
[key in EVMChain]?: string | any;
} & {
[key in Chain.Cosmos]?: string;
[key in CosmosChain]?: string;
};
export declare enum ApiUrl {
Thorswap = 'https://api.thorswap.finance',
ThorswapApi = "https://api.thorswap.finance",
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 AssetSymbol {
THOR = 'THOR',
RUNE = 'RUNE',
'RUNE-67C' = 'RUNE-67C',
'RUNE-B1A' = 'RUNE-B1A',
ATOM = 'ATOM',
MUON = 'MUON',
USDC = 'USDC',
THOR = "THOR",
RUNE = "RUNE",
ATOM = "ATOM",
MUON = "MUON",
USDC = "USDC"
}
export declare type Balance = {
asset: Asset;
amount: AmountWithBaseDenom;
asset: Asset;
amount: AmountWithBaseDenom;
};
export declare enum BaseDecimal {
ARB = 18,
AVAX = 18,
BCH = 8,
BNB = 8,
BSC = 18,
BTC = 8,
DOGE = 8,
ETH = 18,
GAIA = 6,
LTC = 8,
MATIC = 18,
OP = 18,
THOR = 8,
ARB = 18,
AVAX = 18,
BCH = 8,
BNB = 8,
BSC = 18,
BTC = 8,
DOGE = 8,
ETH = 18,
GAIA = 6,
LTC = 8,
MATIC = 18,
OP = 18,
THOR = 8
}
export declare type BaseWalletMethods = {
getAddress: () => string;
getAddress: () => string;
};
export declare type CallParams = {
walletIndex?: number;
contractAddress: string;
abi: any;
funcName: string;
funcParams?: unknown[];
walletIndex?: number;
contractAddress: string;
abi: any;
funcName: string;
funcParams?: unknown[];
};
export declare enum Chain {
Arbitrum = 'ARB',
Avalanche = 'AVAX',
Binance = 'BNB',
BinanceSmartChain = 'BSC',
Bitcoin = 'BTC',
BitcoinCash = 'BCH',
Cosmos = 'GAIA',
Dogecoin = 'DOGE',
Ethereum = 'ETH',
Litecoin = 'LTC',
Optimism = 'OP',
Polygon = 'MATIC',
THORChain = 'THOR',
Arbitrum = "ARB",
Avalanche = "AVAX",
Binance = "BNB",
BinanceSmartChain = "BSC",
Bitcoin = "BTC",
BitcoinCash = "BCH",
Cosmos = "GAIA",
Dogecoin = "DOGE",
Ethereum = "ETH",
Litecoin = "LTC",
Optimism = "OP",
Polygon = "MATIC",
THORChain = "THOR"
}
export declare enum ChainId {
Arbitrum = '42161',
ArbitrumHex = '0xa4b1',
Avalanche = '43114',
AvalancheHex = '0xa86a',
Binance = 'Binance-Chain-Tigris',
BinanceHex = '',
BinanceSmartChain = '56',
BinanceSmartChainHex = '0x38',
Bitcoin = 'bitcoin',
BitcoinHex = '',
BitcoinCash = 'bitcoincash',
BitcoinCashHex = '',
Cosmos = 'cosmoshub-4',
CosmosHex = '',
Dogecoin = 'dogecoin',
DogecoinHex = '',
Ethereum = '1',
EthereumHex = '0x1',
Litecoin = 'litecoin',
LitecoinHex = '',
Optimism = '10',
OptimismHex = '0xa',
Polygon = '137',
PolygonHex = '0x89',
THORChain = 'thorchain-mainnet-v1',
THORChainHex = '',
THORChainStagenet = 'thorchain-stagenet-v2',
Arbitrum = "42161",
ArbitrumHex = "0xa4b1",
Avalanche = "43114",
AvalancheHex = "0xa86a",
Binance = "Binance-Chain-Tigris",
BinanceHex = "",
BinanceSmartChain = "56",
BinanceSmartChainHex = "0x38",
Bitcoin = "bitcoin",
BitcoinHex = "",
BitcoinCash = "bitcoincash",
BitcoinCashHex = "",
Cosmos = "cosmoshub-4",
CosmosHex = "",
Dogecoin = "dogecoin",
DogecoinHex = "",
Ethereum = "1",
EthereumHex = "0x1",
Litecoin = "litecoin",
LitecoinHex = "",
Optimism = "10",
OptimismHex = "0xa",
Polygon = "137",
PolygonHex = "0x89",
THORChain = "thorchain-mainnet-v1",
THORChainHex = "",
THORChainStagenet = "thorchain-stagenet-v2"
}

@@ -177,15 +168,15 @@

export declare const ChainToChainId: {
ARB: ChainId;
AVAX: ChainId;
BNB: ChainId;
BSC: ChainId;
BTC: ChainId;
BCH: ChainId;
GAIA: ChainId;
DOGE: ChainId;
ETH: ChainId;
LTC: ChainId;
OP: ChainId;
MATIC: ChainId;
THOR: ChainId;
ARB: ChainId;
AVAX: ChainId;
BNB: ChainId;
BSC: ChainId;
BTC: ChainId;
BCH: ChainId;
GAIA: ChainId;
DOGE: ChainId;
ETH: ChainId;
LTC: ChainId;
OP: ChainId;
MATIC: ChainId;
THOR: ChainId;
};

@@ -196,125 +187,120 @@

export declare const ChainToHexChainId: {
ARB: ChainId;
AVAX: ChainId;
BNB: ChainId;
BSC: ChainId;
BTC: ChainId;
BCH: ChainId;
GAIA: ChainId;
DOGE: ChainId;
ETH: ChainId;
LTC: ChainId;
OP: ChainId;
MATIC: ChainId;
THOR: ChainId;
ARB: ChainId;
AVAX: ChainId;
BNB: ChainId;
BSC: ChainId;
BTC: ChainId;
BCH: ChainId;
GAIA: ChainId;
DOGE: ChainId;
ETH: ChainId;
LTC: ChainId;
OP: 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;
LTC: RPCUrl;
OP: RPCUrl;
MATIC: RPCUrl;
THOR: RPCUrl;
ARB: RPCUrl;
AVAX: RPCUrl;
BNB: RPCUrl;
BSC: RPCUrl;
BTC: RPCUrl;
BCH: RPCUrl;
GAIA: RPCUrl;
DOGE: RPCUrl;
ETH: RPCUrl;
LTC: RPCUrl;
OP: RPCUrl;
MATIC: RPCUrl;
THOR: RPCUrl;
};
declare type ChainWallet = {
address: string;
balance: any[];
walletType: WalletOption;
address: string;
balance: any[];
walletType: WalletOption;
};
export declare type ConnectConfig = {
stagenet?: boolean;
/**
* @required for AVAX & BSC
*/
covalentApiKey?: string;
/**
* @required for ETH
*/
ethplorerApiKey?: string;
/**
* @required for BTC, LTC, DOGE & BCH
*/
utxoApiKey?: string;
/**
* @required for Walletconnect
*/
walletConnectProjectId?: string;
/**
* @optional for Trezor config
*/
trezorManifest?: {
email: string;
appUrl: string;
};
stagenet?: boolean;
/**
* @required for AVAX & BSC
*/
covalentApiKey?: string;
/**
* @required for ETH
*/
ethplorerApiKey?: string;
/**
* @required for BTC, LTC, DOGE & BCH
*/
utxoApiKey?: string;
/**
* @required for Walletconnect
*/
walletConnectProjectId?: string;
/**
* @optional for Trezor config
*/
trezorManifest?: {
email: string;
appUrl: string;
};
};
declare type ConnectMethodNames =
| 'connectXDEFI'
| 'connectKeplr'
| 'connectWalletconnect'
| 'connectKeystore'
| 'connectLedger'
| 'connectTrezor'
| 'connectEVMWallet';
declare type ConnectMethodNames = 'connectXDEFI' | 'connectKeplr' | 'connectWalletconnect' | 'connectKeystore' | 'connectLedger' | 'connectTrezor' | 'connectEVMWallet';
export declare type ConnectWalletParams = {
addChain: (params: AddChainWalletParams) => void;
config: ConnectConfig;
rpcUrls: {
[chain in Chain]?: string;
};
apis: ApisType;
addChain: (params: AddChainWalletParams) => 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',
USDC_SPL_MINT_ADDRESS = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
USDC_SPL_TESTNET_MINT_ADDRESS = '6TEqT62wq5mbKQPubX9eFeNJRYXRJd79Hk51pZk7nZrB',
ARB = "0x0000000000000000000000000000000000000000",
AVAX = "0x0000000000000000000000000000000000000000",
ETH = "0x0000000000000000000000000000000000000000",
BSC = "0x0000000000000000000000000000000000000000",
MATIC = "0x0000000000000000000000000000000000001010",
OP = "0x4200000000000000000000000000000000000042"
}
export declare type CosmosChain = Chain.Cosmos | Chain.THORChain | Chain.Binance;
export declare const CosmosChainList: CosmosChain[];
export declare enum Denomination {
/**
* values for asset amounts in base units (no decimal)
*/
Base = 'BASE',
/**
* values of asset amounts (w/ decimal)
*/
Asset = 'ASSET',
/**
* values for asset amounts in base units (no decimal)
*/
Base = "BASE",
/**
* values of asset amounts (w/ decimal)
*/
Asset = "ASSET"
}
export declare type DepositParams = TxParams & {
router?: string;
from?: string;
router?: string;
from?: string;
};
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",
ETH = "m/44'/60'/0'/0",
GAIA = "m/44'/118'/0'/0",
LTC = "m/84'/2'/0'/0",
MATIC = "m/44'/60'/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",
DOGE = "m/44'/3'/0'/0",
ETH = "m/44'/60'/0'/0",
GAIA = "m/44'/118'/0'/0",
LTC = "m/84'/2'/0'/0",
MATIC = "m/44'/60'/0'/0",
OP = "m/44'/60'/0'/0",
THOR = "m/44'/931'/0'/0"
}

@@ -325,19 +311,17 @@

export declare type EIP1559TxParams<T = BigNumberish> = EVMTxBaseParams<T> & {
type?: number;
maxFeePerGas?: T;
maxPriorityFeePerGas?: T;
type?: number;
maxFeePerGas?: T;
maxPriorityFeePerGas?: T;
};
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;

@@ -347,168 +331,156 @@ 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_0_100 = '2005',
SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN = '2006',
DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN = '2007',
PREFERRED_PROFVIDER_NOT_SUPPORTED = '2008',
DESTINATION_ADDRESS_SMART_CONTRACT = '2009',
BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER = '2010',
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',
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',
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_0_100 = "2005",
SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN = "2006",
DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN = "2007",
PREFERRED_PROFVIDER_NOT_SUPPORTED = "2008",
DESTINATION_ADDRESS_SMART_CONTRACT = "2009",
BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2010",
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",
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 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',
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"
}
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',
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 enum ErrorCode {
NoError = 36864,
NoError = 36864
}
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[];
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.BinanceSmartChain
| Chain.Avalanche
| Chain.Arbitrum
| Chain.Optimism
| Chain.Polygon;
export declare type EVMChain = Chain.Ethereum | Chain.Avalanche | Chain.BinanceSmartChain | Chain.Arbitrum | Chain.Optimism | Chain.Polygon;
declare type EVMChains =
| Chain.Ethereum
| Chain.BinanceSmartChain
| Chain.Avalanche
| Chain.Arbitrum;
export declare const EVMChainList: EVMChain[];
declare type EVMTxBaseParams<T = BigNumberish> = {
to?: string;
from?: string;
nonce?: number;
gasLimit?: T;
data?: string;
value?: T;
chainId?: number;
to?: string;
from?: string;
nonce?: number;
gasLimit?: T;
data?: string;
value?: T;
chainId?: number;
};

@@ -518,88 +490,75 @@

export declare type EVMWalletOptions =
| WalletOption.BRAVE
| WalletOption.METAMASK
| WalletOption.TRUSTWALLET_WEB
| WalletOption.COINBASE_WEB;
export declare type EVMWalletOptions = WalletOption.BRAVE | WalletOption.METAMASK | WalletOption.TRUSTWALLET_WEB | WalletOption.COINBASE_WEB;
export declare type ExtendParams = {
excludedChains?: Chain[];
config?: ConnectConfig;
rpcUrls?: {
[chain in Chain]?: string;
};
apis?: ApisType;
wallets: {
connectMethodName: ConnectMethodNames;
connect: (params: ConnectWalletParams) => (...params: any) => Promise<any>;
}[];
excludedChains?: Chain[];
config?: ConnectConfig;
rpcUrls?: {
[chain in Chain]?: string;
};
apis?: ApisType;
wallets: {
connectMethodName: ConnectMethodNames;
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 FeeRate = number;
export declare type FeeRates = Record<FeeOption, number>;
export declare type FeeRates = Record<FeeOption, FeeRate>;
export declare type Fees = Record<FeeOption, AmountWithBaseDenom> & {
type?: FeeType;
type?: 'base' | 'byte';
};
export declare enum FeeType {
FlatFee = 'base',
PerByte = 'byte',
}
export declare type FixedNumberish = string | number | FixedNumber;
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 type Keystore = {
crypto: {
cipher: string;
ciphertext: string;
cipherparams: {
iv: string;
crypto: {
cipher: string;
ciphertext: string;
cipherparams: {
iv: string;
};
kdf: string;
kdfparams: {
prf: string;
dklen: number;
salt: string;
c: number;
};
mac: string;
};
kdf: string;
kdfparams: {
prf: string;
dklen: number;
salt: string;
c: number;
};
mac: string;
};
id: string;
version: number;
meta: string;
id: string;
version: number;
meta: string;
};
export declare type LegacyEVMTxParams<T = BigNumberish> = EVMTxBaseParams<T> & {
gasPrice?: T;
gasPrice?: T;
};
export declare enum MemoType {
BOND = 'BOND',
DEPOSIT = '+',
LEAVE = 'LEAVE',
THORNAME_REGISTER = '~',
UNBOND = 'UNBOND',
UPGRADE = 'SWITCH',
WITHDRAW = '-',
OPEN_LOAN = '$+',
CLOSE_LOAN = '$-',
BOND = "BOND",
DEPOSIT = "+",
LEAVE = "LEAVE",
THORNAME_REGISTER = "~",
UNBOND = "UNBOND",
WITHDRAW = "-",
OPEN_LOAN = "$+",
CLOSE_LOAN = "$-"
}
export declare const MOCK_PHRASE =
'image rally need wedding health address purse army antenna leopard sea gain';
export declare const MOCK_PHRASE = "image rally need wedding health address purse army antenna leopard sea gain";

@@ -609,272 +568,246 @@ export declare const NetworkDerivationPath: Record<Chain, DerivationPathArray>;

export declare enum NetworkId {
Ethereum = 60,
Binance = 714,
THORChain = 931,
Ethereum = 60,
Binance = 714,
THORChain = 931
}
declare type ParamsWithChain<T> = T & {
chain: Chain;
};
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',
Cosmos = 'https://node-router.thorswap.net/cosmos/rpc',
Dogecoin = 'https://node-router.thorswap.net/dogecoin',
Ethereum = 'https://node-router.thorswap.net/ethereum',
Litecoin = 'https://node-router.thorswap.net/litecoin',
Optimism = 'https://mainnet.optimism.io',
Polygon = 'https://polygon-rpc.com',
THORChain = 'https://rpc.thorswap.net',
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",
Cosmos = "https://node-router.thorswap.net/cosmos/rpc",
Dogecoin = "https://node-router.thorswap.net/dogecoin",
Ethereum = "https://node-router.thorswap.net/ethereum",
Litecoin = "https://node-router.thorswap.net/litecoin",
Optimism = "https://mainnet.optimism.io",
Polygon = "https://polygon-rpc.com",
THORChain = "https://rpc.thorswap.net"
}
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 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 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 type Tx = {
asset: Asset;
from: TxFrom[];
to: TxTo[];
date: Date;
type: TxType;
hash: string;
asset: Asset;
from: TxFrom[];
to: TxTo[];
date: Date;
type: TxType;
hash: string;
};
declare type TxFrom = {
from: string;
amount: AmountWithBaseDenom;
asset?: Asset;
from: string;
amount: AmountWithBaseDenom;
asset?: Asset;
};
export declare type TxHash = string;
export declare type TxParams = {
asset?: Asset;
amount: AmountWithBaseDenom;
recipient: Address;
memo?: string;
feeOptionKey?: FeeOption;
asset?: Asset;
amount: AmountWithBaseDenom;
recipient: string;
memo?: string;
feeOptionKey?: FeeOption;
};
declare type TxTo = {
to: string;
amount: AmountWithBaseDenom;
asset?: Asset;
to: string;
amount: AmountWithBaseDenom;
asset?: Asset;
};
declare enum TxType {
Transfer = 'transfer',
Unknown = 'unknown',
Transfer = "transfer",
Unknown = "unknown"
}
export declare type UTXO = {
hash: string;
index: number;
value: number;
txHex?: string;
witnessUtxo?: Witness;
hash: string;
index: number;
value: number;
txHex?: string;
witnessUtxo?: Witness;
};
declare type UTXOChains = Chain.Bitcoin | Chain.Litecoin | Chain.Dogecoin | Chain.BitcoinCash;
export declare type UTXOChain = Chain.Bitcoin | Chain.BitcoinCash | Chain.Dogecoin | Chain.Litecoin;
export declare const UTXOChainList: Chain[];
export declare enum WalletOption {
'KEYSTORE' = 'KEYSTORE',
'XDEFI' = 'XDEFI',
'METAMASK' = 'METAMASK',
'COINBASE_WEB' = 'COINBASE_WEB',
'TREZOR' = 'TREZOR',
'TRUSTWALLET_WEB' = 'TRUSTWALLET_WEB',
'LEDGER' = 'LEDGER',
'KEPLR' = 'KEPLR',
'OKX' = 'OKX',
'BRAVE' = 'BRAVE',
'WALLETCONNECT' = 'WALLETCONNECT',
'KEYSTORE' = "KEYSTORE",
'XDEFI' = "XDEFI",
'METAMASK' = "METAMASK",
'COINBASE_WEB' = "COINBASE_WEB",
'TREZOR' = "TREZOR",
'TRUSTWALLET_WEB' = "TRUSTWALLET_WEB",
'LEDGER' = "LEDGER",
'KEPLR' = "KEPLR",
'OKX' = "OKX",
'BRAVE' = "BRAVE",
'WALLETCONNECT' = "WALLETCONNECT"
}
export declare enum WalletStatus {
NotInstalled = 0,
Detected = 1,
NotInstalled = 0,
Detected = 1
}
export declare type WalletTxParams = TxParams & {
from?: string;
from?: string;
};
export declare type Witness = {
value: number;
script: Buffer;
value: number;
script: Buffer;
};
export {};
export { }

@@ -1,5 +0,5 @@

var V = Object.defineProperty;
var h = (e, n, a) => n in e ? V(e, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[n] = a;
var s = (e, n, a) => (h(e, typeof n != "symbol" ? n + "" : n, a), a);
const X = [
var h = Object.defineProperty;
var V = (e, n, a) => n in e ? h(e, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[n] = a;
var s = (e, n, a) => (V(e, typeof n != "symbol" ? n + "" : n, a), a);
const F = [
{ inputs: [], stateMutability: "nonpayable", type: "constructor" },

@@ -102,3 +102,3 @@ {

}
], K = [
], X = [
{

@@ -278,3 +278,3 @@ inputs: [{ internalType: "address", name: "rune", type: "address" }],

}
], W = [
], K = [
{ inputs: [], stateMutability: "nonpayable", type: "constructor" },

@@ -444,4 +444,4 @@ {

];
var g = /* @__PURE__ */ ((e) => (e.Base = "BASE", e.Asset = "ASSET", e))(g || {}), P = /* @__PURE__ */ ((e) => (e.THOR = "THOR", e.RUNE = "RUNE", e["RUNE-67C"] = "RUNE-67C", e["RUNE-B1A"] = "RUNE-B1A", e.ATOM = "ATOM", e.MUON = "MUON", e.USDC = "USDC", e))(P || {}), 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 || {}), O = /* @__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))(O || {}), 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_0_100 = "2005", e.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN = "2006", e.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN = "2007", e.PREFERRED_PROFVIDER_NOT_SUPPORTED = "2008", e.DESTINATION_ADDRESS_SMART_CONTRACT = "2009", e.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2010", 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.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 B = {
var O = /* @__PURE__ */ ((e) => (e.Base = "BASE", e.Asset = "ASSET", e))(O || {}), g = /* @__PURE__ */ ((e) => (e.THOR = "THOR", e.RUNE = "RUNE", e.ATOM = "ATOM", e.MUON = "MUON", e.USDC = "USDC", e))(g || {}), A = /* @__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))(A || {}), B = /* @__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))(B || {}), 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_0_100 = "2005", e.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN = "2006", e.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN = "2007", e.PREFERRED_PROFVIDER_NOT_SUPPORTED = "2008", e.DESTINATION_ADDRESS_SMART_CONTRACT = "2009", e.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2010", 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.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 H = {
[t.INVALID_INPUT_PARAMETERS]: "Invalid input parameters: {0}.",

@@ -495,4 +495,4 @@ [t.UNKNOWN_PROVIDERS]: "Unknown providers: {0}.",

[t.ADDRESS_ALREADY_CLAIMED]: "Address {0} already claimed the airdrop."
}, o = (e, n) => {
let a = B[e];
}, u = (e, n) => {
let a = H[e];
for (let r = 0; r < n.length; r++)

@@ -502,3 +502,3 @@ a = a.replace(`{${r}}`, n[r]);

};
class A extends Error {
class m extends Error {
constructor({

@@ -516,5 +516,5 @@ status: a,

},
displayMessageParams: u
displayMessageParams: o
}) {
const l = S || o(d, u || []) || "";
const l = S || u(d, o || []) || "";
super(l);

@@ -531,10 +531,10 @@ s(this, "status");

s(this, "displayMessageParams");
this.status = a, this.revision = r || "NO_REVISION", this.module = N, this.message = l, this.display = o(d, u || []), this.code = d, this.type = _ || m.UNHANDLED_ERROR, this.options = {
this.status = a, this.revision = r || "NO_REVISION", this.module = N, this.message = l, this.display = u(d, o || []), this.code = d, this.type = _ || A.UNHANDLED_ERROR, this.options = {
shouldLog: E || !0,
shouldTrace: f || !0,
shouldThrow: c || !1
}, this.displayMessageParams = u || [], this.options.shouldTrace && Error.captureStackTrace(this);
}, this.displayMessageParams = o || [], this.options.shouldTrace && Error.captureStackTrace(this);
}
static fromErrorInfo(a) {
return new A(a);
return new m(a);
}

@@ -548,3 +548,3 @@ toErrorInfo() {

get displayMessage() {
return o(this.code, this.displayMessageParams || []);
return u(this.code, this.displayMessageParams || []);
}

@@ -559,4 +559,4 @@ handle() {

}
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.Litecoin = "LTC", e.Optimism = "OP", e.Polygon = "MATIC", e.THORChain = "THOR", e))(i || {}), H = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e.USDC_SPL_MINT_ADDRESS = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", e.USDC_SPL_TESTNET_MINT_ADDRESS = "6TEqT62wq5mbKQPubX9eFeNJRYXRJd79Hk51pZk7nZrB", e))(H || {}), b = /* @__PURE__ */ ((e) => (e[e.Ethereum = 60] = "Ethereum", e[e.Binance = 714] = "Binance", e[e.THORChain = 931] = "THORChain", e))(b || {}), L = /* @__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.ETH = "m/44'/60'/0'/0", e.GAIA = "m/44'/118'/0'/0", e.LTC = "m/84'/2'/0'/0", e.MATIC = "m/44'/60'/0'/0", e.OP = "m/44'/60'/0'/0", e.THOR = "m/44'/931'/0'/0", e))(L || {});
const Y = {
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.Litecoin = "LTC", e.Optimism = "OP", e.Polygon = "MATIC", e.THORChain = "THOR", e))(i || {}), P = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(P || {}), b = /* @__PURE__ */ ((e) => (e[e.Ethereum = 60] = "Ethereum", e[e.Binance = 714] = "Binance", e[e.THORChain = 931] = "THORChain", e))(b || {}), L = /* @__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.ETH = "m/44'/60'/0'/0", e.GAIA = "m/44'/118'/0'/0", e.LTC = "m/84'/2'/0'/0", e.MATIC = "m/44'/60'/0'/0", e.OP = "m/44'/60'/0'/0", e.THOR = "m/44'/931'/0'/0", e))(L || {});
const W = {
ARB: [44, 60, 0, 0, 0],

@@ -576,7 +576,28 @@ AVAX: [44, 60, 0, 0, 0],

};
var x = /* @__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.DOGE = 8] = "DOGE", e[e.ETH = 18] = "ETH", e[e.GAIA = 6] = "GAIA", e[e.LTC = 8] = "LTC", e[e.MATIC = 18] = "MATIC", e[e.OP = 18] = "OP", e[e.THOR = 8] = "THOR", e))(x || {}), T = /* @__PURE__ */ ((e) => (e.Arbitrum = "42161", e.ArbitrumHex = "0xa4b1", e.Avalanche = "43114", e.AvalancheHex = "0xa86a", e.Binance = "Binance-Chain-Tigris", e.BinanceHex = "", e.BinanceSmartChain = "56", e.BinanceSmartChainHex = "0x38", e.Bitcoin = "bitcoin", e.BitcoinHex = "", e.BitcoinCash = "bitcoincash", e.BitcoinCashHex = "", e.Cosmos = "cosmoshub-4", e.CosmosHex = "", e.Dogecoin = "dogecoin", e.DogecoinHex = "", e.Ethereum = "1", e.EthereumHex = "0x1", e.Litecoin = "litecoin", e.LitecoinHex = "", e.Optimism = "10", e.OptimismHex = "0xa", e.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainHex = "", e.THORChainStagenet = "thorchain-stagenet-v2", e))(T || {}), 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.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", 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.Optimism = "https://mainnet.optimism.io", e.Polygon = "https://polygon-rpc.com", e.THORChain = "https://rpc.thorswap.net", e))(I || {}), v = /* @__PURE__ */ ((e) => (e.Thorswap = "https://api.thorswap.finance", e))(v || {});
const D = Object.keys(i), p = Object.values(i), y = p.reduce((e, n) => {
var x = /* @__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.DOGE = 8] = "DOGE", e[e.ETH = 18] = "ETH", e[e.GAIA = 6] = "GAIA", e[e.LTC = 8] = "LTC", e[e.MATIC = 18] = "MATIC", e[e.OP = 18] = "OP", e[e.THOR = 8] = "THOR", e))(x || {});
const Y = [
"ETH",
"AVAX",
"BSC",
"ARB",
"OP",
"MATIC"
/* Polygon */
], Q = [
"BTC",
"BCH",
"DOGE",
"LTC"
/* Litecoin */
], k = [
"GAIA",
"THOR",
"BNB"
/* Binance */
];
var T = /* @__PURE__ */ ((e) => (e.Arbitrum = "42161", e.ArbitrumHex = "0xa4b1", e.Avalanche = "43114", e.AvalancheHex = "0xa86a", e.Binance = "Binance-Chain-Tigris", e.BinanceHex = "", e.BinanceSmartChain = "56", e.BinanceSmartChainHex = "0x38", e.Bitcoin = "bitcoin", e.BitcoinHex = "", e.BitcoinCash = "bitcoincash", e.BitcoinCashHex = "", e.Cosmos = "cosmoshub-4", e.CosmosHex = "", e.Dogecoin = "dogecoin", e.DogecoinHex = "", e.Ethereum = "1", e.EthereumHex = "0x1", e.Litecoin = "litecoin", e.LitecoinHex = "", e.Optimism = "10", e.OptimismHex = "0xa", e.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainHex = "", e.THORChainStagenet = "thorchain-stagenet-v2", e))(T || {}), 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.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", 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.Optimism = "https://mainnet.optimism.io", e.Polygon = "https://polygon-rpc.com", e.THORChain = "https://rpc.thorswap.net", e))(I || {}), v = /* @__PURE__ */ ((e) => (e.ThorswapApi = "https://api.thorswap.finance", e.ThorswapStatic = "https://static.thorswap.net", e))(v || {});
const p = Object.values(i), D = Object.keys(i), y = p.reduce((e, n) => {
const a = D.find((r) => i[r] === n);
return a && (e[n] = a), e;
}, {}), k = p.reduce((e, n) => (e[n] = T[y[n]], e), {}), Q = p.reduce((e, n) => (e[n] = I[y[n]], e), {}), q = p.reduce((e, n) => (e[n] = T[`${y[n]}Hex`], e), {}), $ = {
}, {}), $ = p.reduce((e, n) => (e[n] = T[y[n]], e), {}), q = p.reduce((e, n) => (e[n] = I[y[n]], e), {}), j = p.reduce((e, n) => (e[n] = T[`${y[n]}Hex`], e), {}), J = {
42161: "ARB",

@@ -619,37 +640,39 @@ "0xa4b1": "ARB",

};
var M = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e))(M || {}), C = /* @__PURE__ */ ((e) => (e.BOND = "BOND", e.DEPOSIT = "+", e.LEAVE = "LEAVE", e.THORNAME_REGISTER = "~", e.UNBOND = "UNBOND", e.UPGRADE = "SWITCH", e.WITHDRAW = "-", e.OPEN_LOAN = "$+", e.CLOSE_LOAN = "$-", e))(C || {});
const J = "image rally need wedding health address purse army antenna leopard sea gain";
var G = /* @__PURE__ */ ((e) => (e[e.NotInstalled = 0] = "NotInstalled", e[e.Detected = 1] = "Detected", e))(G || {}), R = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(R || {}), U = /* @__PURE__ */ ((e) => (e.FlatFee = "base", e.PerByte = "byte", e))(U || {}), w = /* @__PURE__ */ ((e) => (e.KEYSTORE = "KEYSTORE", 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.BRAVE = "BRAVE", e.WALLETCONNECT = "WALLETCONNECT", e))(w || {});
var M = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e))(M || {}), C = /* @__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))(C || {});
const z = "image rally need wedding health address purse army antenna leopard sea gain";
var G = /* @__PURE__ */ ((e) => (e[e.NotInstalled = 0] = "NotInstalled", e[e.Detected = 1] = "Detected", e))(G || {}), R = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(R || {}), U = /* @__PURE__ */ ((e) => (e.KEYSTORE = "KEYSTORE", 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.BRAVE = "BRAVE", e.WALLETCONNECT = "WALLETCONNECT", e))(U || {});
export {
A as ApiError,
m as ApiError,
v as ApiUrl,
P as AssetSymbol,
g as AssetSymbol,
x as BaseDecimal,
i as Chain,
T as ChainId,
$ as ChainIdToChain,
k as ChainToChainId,
J as ChainIdToChain,
$ as ChainToChainId,
Z as ChainToExplorerUrl,
q as ChainToHexChainId,
Q as ChainToRPC,
H as ContractAddress,
g as Denomination,
j as ChainToHexChainId,
q as ChainToRPC,
P as ContractAddress,
k as CosmosChainList,
O as Denomination,
L as DerivationPath,
t as ERROR_CODE,
O as ERROR_MODULE,
m as ERROR_TYPE,
B as ERROR_MODULE,
A as ERROR_TYPE,
Y as EVMChainList,
M as ErrorCode,
R as FeeOption,
U as FeeType,
J as MOCK_PHRASE,
z as MOCK_PHRASE,
C as MemoType,
Y as NetworkDerivationPath,
W as NetworkDerivationPath,
b as NetworkId,
I as RPCUrl,
W as TCAvalancheDepositABI,
K as TCEthereumVaultAbi,
w as WalletOption,
K as TCAvalancheDepositABI,
X as TCEthereumVaultAbi,
Q as UTXOChainList,
U as WalletOption,
G as WalletStatus,
X as erc20ABI
F as erc20ABI
};
//# sourceMappingURL=index.es.js.map

@@ -36,3 +36,3 @@ {

"types": "./dist/index.d.ts",
"version": "1.0.0-development.95",
"version": "1.0.0-development.96",
"scripts": {

@@ -39,0 +39,0 @@ "build": "echo 'Build types 🛠'; vite build && echo 'Build succeeded types ✅'",

@@ -6,4 +6,2 @@ import { Chain } from './network.js';

RUNE = 'RUNE',
'RUNE-67C' = 'RUNE-67C',
'RUNE-B1A' = 'RUNE-B1A',
ATOM = 'ATOM',

@@ -10,0 +8,0 @@ MUON = 'MUON',

import { FixedNumber } from '@ethersproject/bignumber';
import { Chain } from './network.js';
import { Chain, CosmosChain, EVMChain, UTXOChain } from './network.js';
import { WalletOption } from './wallet.js';
type UTXOChains = Chain.Bitcoin | Chain.Litecoin | Chain.Dogecoin | Chain.BitcoinCash;
type EVMChains = Chain.Ethereum | Chain.BinanceSmartChain | Chain.Avalanche | Chain.Arbitrum;
type ConnectMethodNames =

@@ -18,2 +15,8 @@ | 'connectXDEFI'

type ChainWallet = {
address: string;
balance: any[];
walletType: WalletOption;
};
export type ConnectConfig = {

@@ -46,18 +49,8 @@ stagenet?: boolean;

type ChainWallet = {
address: string;
balance: any[];
walletType: WalletOption;
};
type ParamsWithChain<T> = T & { chain: Chain };
export type AddChainWalletParams = ParamsWithChain<{
export type AddChainWalletParams = {
chain: Chain;
wallet: ChainWallet;
walletMethods: any;
}>;
};
export type TxHash = string;
export type Address = string;
export type UTXO = {

@@ -79,6 +72,6 @@ hash: string;

// TODO: Add types for api interface
type ApisType = { [key in UTXOChains]?: string | any } & {
[key in EVMChains]?: string | any;
type ApisType = { [key in UTXOChain]?: string | any } & {
[key in EVMChain]?: string | any;
} & {
[key in Chain.Cosmos]?: string;
[key in CosmosChain]?: string;
};

@@ -85,0 +78,0 @@

@@ -16,2 +16,3 @@ export enum Chain {

}
type ChainNameType = keyof typeof Chain;

@@ -25,4 +26,2 @@ export enum ContractAddress {

OP = '0x4200000000000000000000000000000000000042',
USDC_SPL_MINT_ADDRESS = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
USDC_SPL_TESTNET_MINT_ADDRESS = '6TEqT62wq5mbKQPubX9eFeNJRYXRJd79Hk51pZk7nZrB',
}

@@ -88,4 +87,4 @@

| Chain.Ethereum
| Chain.Avalanche
| Chain.BinanceSmartChain
| Chain.Avalanche
| Chain.Arbitrum

@@ -95,2 +94,24 @@ | Chain.Optimism

export const EVMChainList: EVMChain[] = [
Chain.Ethereum,
Chain.Avalanche,
Chain.BinanceSmartChain,
Chain.Arbitrum,
Chain.Optimism,
Chain.Polygon,
];
export type UTXOChain = Chain.Bitcoin | Chain.BitcoinCash | Chain.Dogecoin | Chain.Litecoin;
export const UTXOChainList: Chain[] = [
Chain.Bitcoin,
Chain.BitcoinCash,
Chain.Dogecoin,
Chain.Litecoin,
];
export type CosmosChain = Chain.Cosmos | Chain.THORChain | Chain.Binance;
export const CosmosChainList: CosmosChain[] = [Chain.Cosmos, Chain.THORChain, Chain.Binance];
export enum ChainId {

@@ -143,9 +164,8 @@ Arbitrum = '42161',

export enum ApiUrl {
Thorswap = 'https://api.thorswap.finance',
ThorswapApi = 'https://api.thorswap.finance',
ThorswapStatic = 'https://static.thorswap.net',
}
type ChainNameType = keyof typeof Chain;
const chains = Object.values(Chain) as Chain[];
const chainNames = Object.keys(Chain) as ChainNameType[];
const chains = Object.values(Chain) as Chain[];

@@ -152,0 +172,0 @@ const ChainToChainName = chains.reduce((acc, chain) => {

@@ -27,3 +27,2 @@ export type GetAddressAndPubKeyResponse = {

UNBOND = 'UNBOND',
UPGRADE = 'SWITCH',
WITHDRAW = '-',

@@ -30,0 +29,0 @@ OPEN_LOAN = '$+',

@@ -5,3 +5,2 @@ import { BigNumberish } from '@ethersproject/bignumber';

import { Asset } from './asset.js';
import { Address } from './commonTypes.js';
import { FeeOption } from './wallet.js';

@@ -42,3 +41,3 @@

amount: AmountWithBaseDenom;
recipient: Address;
recipient: string;
memo?: string; // optional memo to pass

@@ -45,0 +44,0 @@ feeOptionKey?: FeeOption;

@@ -18,7 +18,2 @@ import { AmountWithBaseDenom } from './amount.js';

export enum FeeType {
FlatFee = 'base',
PerByte = 'byte',
}
export type Balance = {

@@ -30,6 +25,7 @@ asset: Asset;

export type Fees = Record<FeeOption, AmountWithBaseDenom> & {
type?: FeeType;
type?: 'base' | 'byte';
};
export type FeeRate = number;
export type FeeRates = Record<FeeOption, FeeRate>;
export type FeeRates = Record<FeeOption, number>;
export enum WalletOption {

@@ -36,0 +32,0 @@ 'KEYSTORE' = 'KEYSTORE',

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc