@coinmasters/types 4.0.2 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var v=Object.defineProperty;var G=(e,a,s)=>a in e?v(e,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[a]=s;var r=(e,a,s)=>(G(e,typeof a!="symbol"?a+"":a,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],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"}],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:[],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"},{inputs:[],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"},{inputs:[{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"},{inputs:[{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"}],U=[{inputs:[{internalType:"address",name:"rune",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldVault",type:"address"},{indexed:!0,internalType:"address",name:"newVault",type:"address"},{indexed:!1,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferAllowance",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"vault",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferOut",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"vault",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"finalAsset",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amountOutMin",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferOutAndCall",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldVault",type:"address"},{indexed:!0,internalType:"address",name:"newVault",type:"address"},{components:[{internalType:"address",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],indexed:!1,internalType:"struct THORChain_Router.Coin[]",name:"coins",type:"tuple[]"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"VaultTransfer",type:"event"},{inputs:[],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"}],name:"deposit",outputs:[],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"}],name:"depositWithExpiry",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{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:"struct THORChain_Router.Coin[]",name:"coins",type:"tuple[]"},{internalType:"string",name:"memo",type:"string"}],name:"returnVaultAssets",outputs:[],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"}],name:"transferAllowance",outputs:[],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"}],name:"transferOut",outputs:[],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"}],name:"transferOutAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{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"}],X=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldVault",type:"address"},{indexed:!0,internalType:"address",name:"newVault",type:"address"},{indexed:!1,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferAllowance",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"vault",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferOut",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"vault",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"finalAsset",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amountOutMin",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferOutAndCall",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldVault",type:"address"},{indexed:!0,internalType:"address",name:"newVault",type:"address"},{components:[{internalType:"address",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],indexed:!1,internalType:"struct AvaxRouter.Coin[]",name:"coins",type:"tuple[]"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],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"}],name:"deposit",outputs:[],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"}],name:"depositWithExpiry",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{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:"struct AvaxRouter.Coin[]",name:"coins",type:"tuple[]"},{internalType:"string",name:"memo",type:"string"}],name:"returnVaultAssets",outputs:[],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"}],name:"transferAllowance",outputs:[],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"}],name:"transferOut",outputs:[],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"}],name:"transferOutAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{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"}],F=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldVault",type:"address"},{indexed:!0,internalType:"address",name:"newVault",type:"address"},{indexed:!1,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferAllowance",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"vault",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferOut",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"vault",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"finalAsset",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amountOutMin",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferOutAndCall",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldVault",type:"address"},{indexed:!0,internalType:"address",name:"newVault",type:"address"},{components:[{internalType:"address",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],indexed:!1,internalType:"struct THORChain_Router.Coin[]",name:"coins",type:"tuple[]"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],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"}],name:"depositWithExpiry",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{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:"struct THORChain_Router.Coin[]",name:"coins",type:"tuple[]"},{internalType:"string",name:"memo",type:"string"}],name:"returnVaultAssets",outputs:[],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"}],name:"transferAllowance",outputs:[],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"}],name:"transferOut",outputs:[],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"}],name:"transferOutAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{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"}];var _=(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))(_||{});const K=["ERC20-ERC20","ARC20-ARC20","BEP20-BEP20"],k=["ERC20-TC","ERC20-ARC20","ERC20-BEP20","ARC20-TC","ARC20-ERC20","ARC20-BEP20","BEP20-TC","BEP20-ERC20","BEP20-ARC20"],W=["TC-TC","TC-ERC20","TC-ARC20","TC-BEP20"];var l=(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))(l||{}),N=(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))(N||{}),t=(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.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 Y={[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_0_100]:"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_PROFVIDER_NOT_SUPPORTED]:"Preferred provider not supported.",[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."},m=(e,a)=>{let s=Y[e];for(let i=0;i<a.length;i++)s=s.replace(`{${i}}`,a[i]);return a.length===0?s.replace("{0}",""):s};class A extends Error{constructor({status:s,revision:i,module:H,code:y,message:R,type:L,options:{shouldLog:D,shouldThrow:x,shouldTrace:M}={shouldLog:!0,shouldThrow:!0,shouldTrace:!0},displayMessageParams:T}){const E=R||m(y,T||[])||"";super(E);r(this,"status");r(this,"revision");r(this,"type");r(this,"module");r(this,"code");r(this,"message");r(this,"display");r(this,"stack");r(this,"options");r(this,"displayMessageParams");this.status=s,this.revision=i||"NO_REVISION",this.module=H,this.message=E,this.display=m(y,T||[]),this.code=y,this.type=L||l.UNHANDLED_ERROR,this.options={shouldLog:D||!0,shouldTrace:M||!0,shouldThrow:x||!1},this.displayMessageParams=T||[],this.options.shouldTrace&&Error.captureStackTrace(this)}static fromErrorInfo(s){return new A(s)}toErrorInfo(){return{...this,identifier:this.identifier}}get identifier(){return`${this.revision}-${this.type||"NO_TYPE"}-${this.module}-${this.code}`}get displayMessage(){return m(this.code,this.displayMessageParams||[])}handle(){const s=`[${this.identifier}]: ${this.message}`;if(this.options.shouldLog&&console.error(s,`
2
- `,this.stack||""),this.options.shouldThrow)throw Error(s,{cause:this.stack});return this.toErrorInfo()}}var n=(e=>(e.Arbitrum="ARB",e.Avalanche="AVAX",e.Base="BASE",e.Binance="BNB",e.BinanceSmartChain="BSC",e.Bitcoin="BTC",e.BitcoinCash="BCH",e.Cosmos="GAIA",e.Dash="DASH",e.Digibyte="DGB",e.Dogecoin="DOGE",e.EOS="EOS",e.Ethereum="ETH",e.Kujira="KUJI",e.Litecoin="LTC",e.Maya="MAYA",e.Optimism="OP",e.Osmosis="OSMO",e.Polygon="MATIC",e.Ripple="XRP",e.THORChain="THOR",e.Zcash="ZEC",e))(n||{});function Z(e){switch(e){case"ARB":return"ARB";case"AVAX":return"AVAX";case"BASE":return"BASE";case"BNB":return"BNB";case"BSC":return"BSC";case"BTC":return"BTC";case"BCH":return"BCH";case"GAIA":return"GAIA";case"DASH":return"DASH";case"DGB":return"DGB";case"DOGE":return"DOGE";case"EOS":return"EOS";case"ETH":return"ETH";case"KUJI":return"KUJI";case"LTC":return"LTC";case"MAYA":return"MAYA";case"OP":return"OP";case"OSMO":return"OSMO";case"MATIC":return"MATIC";case"XRP":return"XRP";case"THOR":return"THOR";case"ZEC":return"ZEC";default:return}}const c={ARB:"eip155:42161",AVAX:"eip155:43114",BSC:"eip155:56",BNB:"binance:bnb-beacon-chain",BCH:"bip122:000000000000000000651ef99cb9fcbe",BTC:"bip122:000000000019d6689c085ae165831e93",BASE:"eip155:8453",GAIA:"cosmos:cosmoshub-4",DASH:"bip122:dash-hash",DGB:"bip122:digibytes-hash",DOGE:"bip122:00000000001a91e3dace36e2be3bf030",KUJI:"cosmos:kaiyo-1",EOS:"eos:cf057bbfb72640471fd910bcb67639c2",ETH:"eip155:1",LTC:"bip122:12a765e31ffd4059bada1e25190f6e98",MAYA:"cosmos:maya-mainnet-v1",OP:"eip155:10",OSMO:"cosmos:osmosis-1",MATIC:"eip155:137",XRP:"ripple:unknown",THOR:"cosmos:thorchain-mainnet-v1",ZEC:"bip122:0000000000196a45"},C={};for(const e in n){const a=c[n[e]];C[a]=n[e]}var h=(e=>(e.ARB="0x0000000000000000000000000000000000000000",e.AVAX="0x0000000000000000000000000000000000000000",e.ETH="0x0000000000000000000000000000000000000000",e.BSC="0x0000000000000000000000000000000000000000",e.MATIC="0x0000000000000000000000000000000000001010",e.OP="0x4200000000000000000000000000000000000042",e))(h||{}),O=(e=>(e.ARB="m/44'/60'/0'/0",e.AVAX="m/44'/60'/0'/0",e.BASE="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.DASH="m/44'/5'/0'/0",e.DGB="m/44'/20'/0'/0",e.ETH="m/44'/60'/0'/0",e.EOS="m/44'/194'/0'/0",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.OSMO="m/44'/118'/0'/0",e.XRP="m/44'/144'/0'/0",e.THOR="m/44'/931'/0'/0",e.ZEC="m/44'/133'/0'/0",e))(O||{});const J={ARB:[44,60,0,0,0],AVAX:[44,60,0,0,0],BASE:[44,60,0,0,0],BCH:[44,145,0,0,0],BNB:[44,714,0,0,0],BSC:[44,60,0,0,0],BTC:[84,0,0,0,0],DASH:[44,5,0,0,0],DGB:[44,20,0,0,0],DOGE:[44,3,0,0,0],EOS:[44,194,0,0,0],ETH:[44,60,0,0,0],GAIA:[44,118,0,0,0],KUJI:[44,118,0,0,0],LTC:[84,2,0,0,0],MATIC:[44,60,0,0,0],MAYA:[44,931,0,0,0],OP:[44,60,0,0,0],OSMO:[44,118,0,0,0],XRP:[44,144,0,0,0],THOR:[44,931,0,0,0],ZEC:[44,133,0,0,0]};var f=(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.DGB=8]="DGB",e[e.DOGE=8]="DOGE",e[e.ETH=18]="ETH",e[e.EOS=6]="EOS",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.OSMO=6]="OSMO",e[e.XRP=6]="XRP",e[e.THOR=8]="THOR",e[e.ZEC=8]="ZEC",e))(f||{});const d=["ETH","AVAX","BSC","ARB","OP","MATIC"],j=["BTC","BCH","DASH","DGB","DOGE","LTC","ZEC"],$=["GAIA","THOR","BNB","OSMO"],q=["AVAX","BNB","BSC","BTC","BCH","GAIA","DOGE","ETH","LTC","THOR"];var o=(e=>(e.Arbitrum="42161",e.ArbitrumHex="0xa4b1",e.Avalanche="43114",e.AvalancheHex="0xa86a",e.Base="8453",e.Binance="Binance-Chain-Tigris",e.BinanceSmartChain="56",e.BinanceSmartChainHex="0x38",e.Bitcoin="bitcoin",e.BitcoinCash="bitcoincash",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.Osmosis="osmosis-1",e.Polygon="137",e.PolygonHex="0x89",e.THORChain="thorchain-mainnet-v1",e.THORChainStagenet="thorchain-stagenet-v2",e))(o||{}),S=(e=>(e.Arbitrum="https://arb1.arbitrum.io/rpc",e.Avalanche="https://node-router.thorswap.net/avalanche-c",e.Binance="https://base.llamarpc.com",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.Kujira="https://rpc-kujira.synergynodes.com/",e.Dash="https://dash.nownodes.io",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.Osmosis="https://rpc-osmosis.keplr.app",e.Polygon="https://polygon-rpc.com",e.THORChain="https://rpc.thorswap.net",e.THORChainStagenet="https://stagenet-rpc.ninerealms.com",e))(S||{}),B=(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))(B||{});const u=Object.values(n),z=Object.keys(n),I=u.reduce((e,a)=>{const s=z.find(i=>n[i]===a);return s&&(e[a]=s),e},{}),Q=u.reduce((e,a)=>(e[a]=o[I[a]],e),{}),ee=u.reduce((e,a)=>(e[a]=S[I[a]],e),{}),te=u.reduce((e,a)=>{const s=`${I[a]}Hex`;return e[a]=o[s],e},{}),ne={"0xa4b1":"ARB",42161:"ARB","0xa86a":"AVAX",43114:"AVAX","0x38":"BSC",56:"BSC","Binance-Chain-Tigris":"BNB",bitcoincash:"BCH",bitcoin:"BTC","cosmoshub-4":"GAIA",8453:"BASE",dash:"DASH",dogecoin:"DOGE","0x1":"ETH","kaiyo-1":"KUJI",1:"ETH",litecoin:"LTC","mayachain-stagenet-v1":"MAYA","mayachain-mainnet-v1":"MAYA","0xa":"OP",10:"OP","osmosis-1":"OSMO","0x89":"MATIC",137:"MATIC","thorchain-stagenet-v2":"THOR","thorchain-mainnet-v1":"THOR"},ae={ARB:"https://arbiscan.io",AVAX:"https://snowtrace.io",BSC:"https://bscscan.com",BNB:"https://explorer.binance.org",BCH:"https://www.blockchain.com/bch",BTC:"https://blockstream.info",BASE:"https://basescan.org",GAIA:"https://cosmos.bigdipper.live",DASH:"https://blockchair.com/dash",DGB:"https://chainz.cryptoid.info/dgb",DOGE:"https://blockchair.com/dogecoin",KUJI:"https://finder.kujira.network/kaiyo-1",EOS:"https://eosauthority.com/",ETH:"https://etherscan.io",LTC:"https://ltc.bitaps.com",MAYA:"https://www.mayascan.org",OP:"https://optimistic.etherscan.io",OSMO:"https://www.mintscan.io/osmosis",MATIC:"https://polygonscan.com",XRP:"https://xrpscan.com",THOR:"https://runescan.io",ZEC:"https://z.cash/ecosystem/zcash-explorer"};var g=(e=>(e[e.NoError=36864]="NoError",e))(g||{}),b=(e=>(e.BOND="BOND",e.DEPOSIT="+",e.LEAVE="LEAVE",e.THORNAME_REGISTER="~",e.UNBOND="UNBOND",e.WITHDRAW="-",e.OPEN_LOAN="$+",e.CLOSE_LOAN="$-",e))(b||{}),P=(e=>(e.Average="average",e.Fast="fast",e.Fastest="fastest",e))(P||{}),V=(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.BRAVE="BRAVE",e.WALLETCONNECT="WALLETCONNECT",e))(V||{});const p=[n.Arbitrum,n.Avalanche,n.Binance,n.BinanceSmartChain,n.Bitcoin,n.BitcoinCash,n.Cosmos,n.Dogecoin,n.Ethereum,n.Litecoin,n.Optimism,n.Polygon,n.THORChain],se={BRAVE:d,COINBASE_WEB:d,KEPLR:[n.Cosmos],KEYSTORE:p,LEDGER:p,TREZOR:[n.Bitcoin,n.BitcoinCash,n.Litecoin,n.Dogecoin,n.Ethereum],KEEPKEY:p,METAMASK:[n.Arbitrum,n.Avalanche,n.BinanceSmartChain,n.Bitcoin,n.BitcoinCash,n.Cosmos,n.Dogecoin,n.Ethereum,n.Litecoin,n.Optimism,n.Polygon,n.THORChain],TRUSTWALLET_WEB:d,XDEFI:p,WALLETCONNECT:[n.Ethereum,n.Binance,n.BinanceSmartChain,n.Avalanche,n.THORChain],OKX:[n.Ethereum,n.Avalanche,n.BinanceSmartChain,n.Bitcoin,n.Cosmos]};exports.AGG_SWAP=K;exports.ApiError=A;exports.ApiUrl=B;exports.BaseDecimal=f;exports.Chain=n;exports.ChainId=o;exports.ChainIdToChain=ne;exports.ChainToChainId=Q;exports.ChainToExplorerUrl=ae;exports.ChainToHexChainId=te;exports.ChainToNetworkId=c;exports.ChainToRPC=ee;exports.ContractAddress=h;exports.CosmosChainList=$;exports.DerivationPath=O;exports.ERROR_CODE=t;exports.ERROR_MODULE=N;exports.ERROR_TYPE=l;exports.EVMChainList=d;exports.ErrorCode=g;exports.FeeOption=P;exports.MemoType=b;exports.NetworkDerivationPath=J;exports.NetworkIdToChain=C;exports.QuoteMode=_;exports.RPCUrl=S;exports.SWAP_IN=k;exports.SWAP_OUT=W;exports.TCAvalancheDepositABI=X;exports.TCBscDepositABI=F;exports.TCEthereumVaultAbi=U;exports.TCSupportedChainList=q;exports.UTXOChainList=j;exports.WalletOption=V;exports.availableChainsByWallet=se;exports.erc20ABI=w;exports.getChainEnumValue=Z;
1
+ "use strict";var M=Object.defineProperty;var G=(e,a,s)=>a in e?M(e,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[a]=s;var r=(e,a,s)=>(G(e,typeof a!="symbol"?a+"":a,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],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"}],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:[],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"},{inputs:[],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"},{inputs:[{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"},{inputs:[{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"}],U=[{inputs:[{internalType:"address",name:"rune",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldVault",type:"address"},{indexed:!0,internalType:"address",name:"newVault",type:"address"},{indexed:!1,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferAllowance",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"vault",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferOut",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"vault",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"finalAsset",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amountOutMin",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferOutAndCall",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldVault",type:"address"},{indexed:!0,internalType:"address",name:"newVault",type:"address"},{components:[{internalType:"address",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],indexed:!1,internalType:"struct THORChain_Router.Coin[]",name:"coins",type:"tuple[]"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"VaultTransfer",type:"event"},{inputs:[],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"}],name:"deposit",outputs:[],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"}],name:"depositWithExpiry",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{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:"struct THORChain_Router.Coin[]",name:"coins",type:"tuple[]"},{internalType:"string",name:"memo",type:"string"}],name:"returnVaultAssets",outputs:[],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"}],name:"transferAllowance",outputs:[],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"}],name:"transferOut",outputs:[],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"}],name:"transferOutAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{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"}],F=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldVault",type:"address"},{indexed:!0,internalType:"address",name:"newVault",type:"address"},{indexed:!1,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferAllowance",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"vault",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferOut",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"vault",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"finalAsset",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amountOutMin",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferOutAndCall",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldVault",type:"address"},{indexed:!0,internalType:"address",name:"newVault",type:"address"},{components:[{internalType:"address",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],indexed:!1,internalType:"struct AvaxRouter.Coin[]",name:"coins",type:"tuple[]"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],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"}],name:"deposit",outputs:[],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"}],name:"depositWithExpiry",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{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:"struct AvaxRouter.Coin[]",name:"coins",type:"tuple[]"},{internalType:"string",name:"memo",type:"string"}],name:"returnVaultAssets",outputs:[],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"}],name:"transferAllowance",outputs:[],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"}],name:"transferOut",outputs:[],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"}],name:"transferOutAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{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"}],X=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldVault",type:"address"},{indexed:!0,internalType:"address",name:"newVault",type:"address"},{indexed:!1,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferAllowance",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"vault",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"address",name:"asset",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferOut",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"vault",type:"address"},{indexed:!1,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"address",name:"finalAsset",type:"address"},{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"amountOutMin",type:"uint256"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],name:"TransferOutAndCall",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldVault",type:"address"},{indexed:!0,internalType:"address",name:"newVault",type:"address"},{components:[{internalType:"address",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],indexed:!1,internalType:"struct THORChain_Router.Coin[]",name:"coins",type:"tuple[]"},{indexed:!1,internalType:"string",name:"memo",type:"string"}],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"}],name:"depositWithExpiry",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{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:"struct THORChain_Router.Coin[]",name:"coins",type:"tuple[]"},{internalType:"string",name:"memo",type:"string"}],name:"returnVaultAssets",outputs:[],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"}],name:"transferAllowance",outputs:[],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"}],name:"transferOut",outputs:[],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"}],name:"transferOutAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{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"}];var _=(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))(_||{});const K=["ERC20-ERC20","ARC20-ARC20","BEP20-BEP20"],k=["ERC20-TC","ERC20-ARC20","ERC20-BEP20","ARC20-TC","ARC20-ERC20","ARC20-BEP20","BEP20-TC","BEP20-ERC20","BEP20-ARC20"],W=["TC-TC","TC-ERC20","TC-ARC20","TC-BEP20"];var l=(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))(l||{}),c=(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))(c||{}),n=(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.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))(n||{});const Y={[n.INVALID_INPUT_PARAMETERS]:"Invalid input parameters: {0}.",[n.UNKNOWN_PROVIDERS]:"Unknown providers: {0}.",[n.CANNOT_FIND_INBOUND_ADDRESS]:"Cannot find inbound address.",[n.NO_INBOUND_ADDRESSES]:"No inbound addresses.",[n.CHAIN_HALTED_OR_UNSUPPORTED]:"Chain {0} halted or unsupported.",[n.MISSING_INPUT_PARAMETER]:"Missing input parameter: {0}.",[n.INVALID_TYPE_GENERIC]:"Invalid type",[n.INVALID_NUMBER_STRING]:"Invalid number string.",[n.INVALID_NUMBER]:"Invalid number.",[n.INVALID_BOOLEAN]:"Invalid boolean.",[n.INVALID_OBJECT]:"Invalid object.",[n.INVALID_ARRAY]:"Invalid array.",[n.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER]:"Sell amount must be a positive integer.",[n.SELL_BUY_ASSETS_ARE_THE_SAME]:"Sell and buy assets are the same.",[n.MISSING_SOURCE_ADDRESS_FOR_SYNTH]:"Source address is required for synth quote.",[n.AFF_ADDRESS_AND_BPS_OR_NEITHER]:"Must provide affiliateAddress and affiliateBasisPoints params, or neither.",[n.AFF_ADDRESS_TOO_LONG]:"affiliateAddress too long: 3 characters max.",[n.AFF_BPS_INTEGER_0_100]:"affiliateBasisPoints must be an integer between 0 and 100.",[n.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN]:"Source address {0} invalid for sell chain.",[n.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN]:"Destination address {0} invalid for buy chain.",[n.PREFERRED_PROFVIDER_NOT_SUPPORTED]:"Preferred provider not supported.",[n.DESTINATION_ADDRESS_SMART_CONTRACT]:"Destination address is a smart contract.",[n.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER]:"Buy amount must be a positive integer.",[n.INVALID_PROVIDER]:"Invalid provider {0}.",[n.MISSING_CROSS_CHAIN_PROVIDER]:"Missing cross-chain provider.",[n.MISSING_AVAX_PROVIDER]:"Missing AVAX provider.",[n.MISSING_BSC_PROVIDER]:"Missing BSC provider.",[n.MISSING_ETH_PROVIDER]:"Missing ETH provider.",[n.MISSING_ARB_PROVIDER]:"Missing ARB provider.",[n.INVALID_PROVIDER_FOR_SWAP_OUT]:"Invalid provider for swap out.",[n.INVALID_CHAIN]:"Invalid chain {0}.",[n.INVALID_ASSET]:"Invalid asset {0}.",[n.UNSUPPORTED_CHAIN]:"Unsupported chain {0}.",[n.UNSUPPORTED_ASSET]:"Unsupported asset {0}.",[n.UNSUPPORTED_ASSET_FOR_SWAPOUT]:"Unsupported asset {0} for swap out.",[n.THORNODE_QUOTE_GENERIC_ERROR]:"ThorNode quote generic error.",[n.INVALID_SOURCE_ADDRESS]:"Invalid source address {0}",[n.INVALID_DESTINATION_ADDRESS]:"Invalid destination address {0}",[n.NOT_ENOUGH_SYNTH_BALANCE]:"Source address doesn't have enough synth balance for this quote.",[n.SYNTH_MINTING_CAP_REACHED]:"Synth minting cap reached.",[n.INVALID_QUOTE_MODE]:"Invalid quote mode.",[n.NO_QUOTES]:"No quotes to service this request.",[n.SERVICE_UNAVAILABLE_GENERIC]:"Service unavailable.",[n.MISSING_GAS_DATA_GENERIC]:"Missing gas data.",[n.MISSING_TOKEN_INFO_GENERIC]:"Missing token info.",[n.CANT_FIND_TOKEN_LIST]:"Can't find tokenlist {0}.",[n.NO_PRICE]:"No price for asset {0}.",[n.PRICE_IS_STALE]:"Price is stale for asset {0}.",[n.ADDRESS_NOT_WHITELISTED]:"Address {0} not whitelisted for airdrop.",[n.ADDRESS_ALREADY_CLAIMED]:"Address {0} already claimed the airdrop."},T=(e,a)=>{let s=Y[e];for(let i=0;i<a.length;i++)s=s.replace(`{${i}}`,a[i]);return a.length===0?s.replace("{0}",""):s};class A extends Error{constructor({status:s,revision:i,module:H,code:u,message:R,type:D,options:{shouldLog:L,shouldThrow:x,shouldTrace:v}={shouldLog:!0,shouldThrow:!0,shouldTrace:!0},displayMessageParams:y}){const E=R||T(u,y||[])||"";super(E);r(this,"status");r(this,"revision");r(this,"type");r(this,"module");r(this,"code");r(this,"message");r(this,"display");r(this,"stack");r(this,"options");r(this,"displayMessageParams");this.status=s,this.revision=i||"NO_REVISION",this.module=H,this.message=E,this.display=T(u,y||[]),this.code=u,this.type=D||l.UNHANDLED_ERROR,this.options={shouldLog:L||!0,shouldTrace:v||!0,shouldThrow:x||!1},this.displayMessageParams=y||[],this.options.shouldTrace&&Error.captureStackTrace(this)}static fromErrorInfo(s){return new A(s)}toErrorInfo(){return{...this,identifier:this.identifier}}get identifier(){return`${this.revision}-${this.type||"NO_TYPE"}-${this.module}-${this.code}`}get displayMessage(){return T(this.code,this.displayMessageParams||[])}handle(){const s=`[${this.identifier}]: ${this.message}`;if(this.options.shouldLog&&console.error(s,`
2
+ `,this.stack||""),this.options.shouldThrow)throw Error(s,{cause:this.stack});return this.toErrorInfo()}}var t=(e=>(e.Arbitrum="ARB",e.Avalanche="AVAX",e.Base="BASE",e.Binance="BNB",e.BinanceSmartChain="BSC",e.Bitcoin="BTC",e.BitcoinCash="BCH",e.Cosmos="GAIA",e.Dash="DASH",e.Digibyte="DGB",e.Dogecoin="DOGE",e.EOS="EOS",e.Ethereum="ETH",e.Kujira="KUJI",e.Litecoin="LTC",e.Maya="MAYA",e.Optimism="OP",e.Osmosis="OSMO",e.Polygon="MATIC",e.Ripple="XRP",e.THORChain="THOR",e.Zcash="ZEC",e))(t||{});function Z(e){switch(e){case"ARB":return"ARB";case"AVAX":return"AVAX";case"BASE":return"BASE";case"BNB":return"BNB";case"BSC":return"BSC";case"BTC":return"BTC";case"BCH":return"BCH";case"GAIA":return"GAIA";case"DASH":return"DASH";case"DGB":return"DGB";case"DOGE":return"DOGE";case"EOS":return"EOS";case"ETH":return"ETH";case"KUJI":return"KUJI";case"LTC":return"LTC";case"MAYA":return"MAYA";case"OP":return"OP";case"OSMO":return"OSMO";case"MATIC":return"MATIC";case"XRP":return"XRP";case"THOR":return"THOR";case"ZEC":return"ZEC";default:return}}const N={ARB:"eip155:42161",AVAX:"eip155:43114",BSC:"eip155:56",BNB:"binance:bnb-beacon-chain",BCH:"bip122:000000000000000000651ef99cb9fcbe",BTC:"bip122:000000000019d6689c085ae165831e93",BASE:"eip155:8453",GAIA:"cosmos:cosmoshub-4",DASH:"bip122:000007d91d1254d60e2dd1ae58038307",DGB:"bip122:digibytes-hash",DOGE:"bip122:00000000001a91e3dace36e2be3bf030",KUJI:"cosmos:kaiyo-1",EOS:"eos:cf057bbfb72640471fd910bcb67639c2",ETH:"eip155:1",LTC:"bip122:12a765e31ffd4059bada1e25190f6e98",MAYA:"cosmos:maya-mainnet-v1",OP:"eip155:10",OSMO:"cosmos:osmosis-1",MATIC:"eip155:137",XRP:"ripple:4109C6F2045FC7EFF4CDE8F9905D19C2",THOR:"cosmos:thorchain-mainnet-v1",ZEC:"bip122:0000000000196a45"},C={};for(const e in t){const a=N[t[e]];C[a]=t[e]}var h=(e=>(e.ARB="0x0000000000000000000000000000000000000000",e.AVAX="0x0000000000000000000000000000000000000000",e.ETH="0x0000000000000000000000000000000000000000",e.BSC="0x0000000000000000000000000000000000000000",e.MATIC="0x0000000000000000000000000000000000001010",e.OP="0x4200000000000000000000000000000000000042",e))(h||{}),O=(e=>(e.ARB="m/44'/60'/0'/0/0",e.AVAX="m/44'/60'/0'/0/0",e.BASE="m/44'/60'/0'/0/0",e.BCH="m/44'/145'/0'/0/0",e.BNB="m/44'/714'/0'/0/0",e.BSC="m/44'/60'/0'/0/0",e.BTC="m/84'/0'/0'/0/0",e.DOGE="m/44'/3'/0'/0/0",e.DASH="m/44'/5'/0'/0/0",e.DGB="m/44'/20'/0'/0/0",e.ETH="m/44'/60'/0'/0/0",e.EOS="m/44'/194'/0'/0/0",e.GAIA="m/44'/118'/0'/0/0",e.KUJI="m/44'/118'/0'/0/0",e.LTC="m/84'/2'/0'/0/0",e.MATIC="m/44'/60'/0'/0/0",e.MAYA="m/44'/931'/0'/0/0",e.OP="m/44'/60'/0'/0/0",e.OSMO="m/44'/118'/0'/0/0",e.XRP="m/44'/144'/0'/0/0",e.THOR="m/44'/931'/0'/0/0",e.ZEC="m/44'/133'/0'/0/0",e))(O||{});const J={ARB:[44,60,0,0,0],AVAX:[44,60,0,0,0],BASE:[44,60,0,0,0],BCH:[44,145,0,0,0],BNB:[44,714,0,0,0],BSC:[44,60,0,0,0],BTC:[84,0,0,0,0],DASH:[44,5,0,0,0],DGB:[44,20,0,0,0],DOGE:[44,3,0,0,0],EOS:[44,194,0,0,0],ETH:[44,60,0,0,0],GAIA:[44,118,0,0,0],KUJI:[44,118,0,0,0],LTC:[84,2,0,0,0],MATIC:[44,60,0,0,0],MAYA:[44,931,0,0,0],OP:[44,60,0,0,0],OSMO:[44,118,0,0,0],XRP:[44,144,0,0,0],THOR:[44,931,0,0,0],ZEC:[44,133,0,0,0]};var f=(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.DGB=8]="DGB",e[e.DOGE=8]="DOGE",e[e.ETH=18]="ETH",e[e.EOS=6]="EOS",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.OSMO=6]="OSMO",e[e.XRP=6]="XRP",e[e.THOR=8]="THOR",e[e.ZEC=8]="ZEC",e))(f||{});const p=["ETH","AVAX","BSC","ARB","OP","MATIC"],j=["BTC","BCH","DASH","DGB","DOGE","LTC","ZEC"],$=["GAIA","THOR","BNB","OSMO"],q=["AVAX","BNB","BSC","BTC","BCH","GAIA","DOGE","ETH","LTC","THOR"];var d=(e=>(e.Arbitrum="42161",e.ArbitrumHex="0xa4b1",e.Avalanche="43114",e.AvalancheHex="0xa86a",e.Base="8453",e.Binance="Binance-Chain-Tigris",e.BinanceSmartChain="56",e.BinanceSmartChainHex="0x38",e.Bitcoin="bitcoin",e.BitcoinCash="bitcoincash",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.Osmosis="osmosis-1",e.Polygon="137",e.PolygonHex="0x89",e.THORChain="thorchain-mainnet-v1",e.THORChainStagenet="thorchain-stagenet-v2",e))(d||{}),S=(e=>(e.Arbitrum="https://arb1.arbitrum.io/rpc",e.Avalanche="https://node-router.thorswap.net/avalanche-c",e.Binance="https://base.llamarpc.com",e.BinanceSmartChain="https://bsc-dataseed.binance.org",e.Base="https://base.llamarpc.com",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.Kujira="https://rpc-kujira.synergynodes.com/",e.Dash="https://dash.nownodes.io",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.Osmosis="https://lcd-osmosis.keplr.app",e.Polygon="https://polygon-rpc.com",e.Ripple="https://xrplcluster.com",e.THORChain="https://rpc.thorswap.net",e.THORChainStagenet="https://stagenet-rpc.ninerealms.com",e))(S||{}),B=(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))(B||{});const o=Object.values(t),z=Object.keys(t),I=o.reduce((e,a)=>{const s=z.find(i=>t[i]===a);return s&&(e[a]=s),e},{}),Q=o.reduce((e,a)=>(e[a]=d[I[a]],e),{}),ee=o.reduce((e,a)=>(e[a]=S[I[a]],e),{}),te=o.reduce((e,a)=>{const s=`${I[a]}Hex`;return e[a]=d[s],e},{}),ne={"0xa4b1":"ARB",42161:"ARB","0xa86a":"AVAX",43114:"AVAX","0x38":"BSC",56:"BSC","Binance-Chain-Tigris":"BNB",bitcoincash:"BCH",bitcoin:"BTC","cosmoshub-4":"GAIA",8453:"BASE",dash:"DASH",dogecoin:"DOGE","0x1":"ETH","kaiyo-1":"KUJI",1:"ETH",litecoin:"LTC","mayachain-stagenet-v1":"MAYA","mayachain-mainnet-v1":"MAYA","0xa":"OP",10:"OP","osmosis-1":"OSMO","0x89":"MATIC",137:"MATIC","thorchain-stagenet-v2":"THOR","thorchain-mainnet-v1":"THOR"},ae={ARB:"https://arbiscan.io",AVAX:"https://snowtrace.io",BSC:"https://bscscan.com",BNB:"https://explorer.binance.org",BCH:"https://www.blockchain.com/bch",BTC:"https://blockstream.info",BASE:"https://basescan.org",GAIA:"https://cosmos.bigdipper.live",DASH:"https://blockchair.com/dash",DGB:"https://chainz.cryptoid.info/dgb",DOGE:"https://blockchair.com/dogecoin",KUJI:"https://finder.kujira.network/kaiyo-1",EOS:"https://eosauthority.com/",ETH:"https://etherscan.io",LTC:"https://ltc.bitaps.com",MAYA:"https://www.mayascan.org",OP:"https://optimistic.etherscan.io",OSMO:"https://www.mintscan.io/osmosis",MATIC:"https://polygonscan.com",XRP:"https://xrpscan.com",THOR:"https://runescan.io",ZEC:"https://z.cash/ecosystem/zcash-explorer"};var g=(e=>(e[e.NoError=36864]="NoError",e))(g||{}),b=(e=>(e.BOND="BOND",e.DEPOSIT="+",e.LEAVE="LEAVE",e.THORNAME_REGISTER="~",e.UNBOND="UNBOND",e.WITHDRAW="-",e.OPEN_LOAN="$+",e.CLOSE_LOAN="$-",e))(b||{}),P=(e=>(e.Average="average",e.Fast="fast",e.Fastest="fastest",e))(P||{}),V=(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.BRAVE="BRAVE",e.WALLETCONNECT="WALLETCONNECT",e))(V||{});const m=[t.Arbitrum,t.Avalanche,t.Binance,t.BinanceSmartChain,t.Bitcoin,t.BitcoinCash,t.Cosmos,t.Osmosis,t.Ripple,t.Dogecoin,t.Dash,t.Ethereum,t.Litecoin,t.Optimism,t.Polygon,t.THORChain],se={BRAVE:p,COINBASE_WEB:p,KEPLR:[t.Cosmos],KEYSTORE:[t.Arbitrum,t.Avalanche,t.Binance,t.BinanceSmartChain,t.Bitcoin,t.BitcoinCash,t.Cosmos,t.Dogecoin,t.Ethereum,t.Litecoin,t.Optimism,t.Polygon,t.THORChain],LEDGER:m,TREZOR:[t.Bitcoin,t.BitcoinCash,t.Litecoin,t.Dogecoin,t.Ethereum],KEEPKEY:m,METAMASK:[t.Arbitrum,t.Avalanche,t.BinanceSmartChain,t.Bitcoin,t.BitcoinCash,t.Cosmos,t.Dogecoin,t.Ethereum,t.Litecoin,t.Optimism,t.Polygon,t.THORChain],TRUSTWALLET_WEB:p,XDEFI:m,WALLETCONNECT:[t.Ethereum,t.Binance,t.BinanceSmartChain,t.Avalanche,t.THORChain],OKX:[t.Ethereum,t.Avalanche,t.BinanceSmartChain,t.Bitcoin,t.Cosmos]};exports.AGG_SWAP=K;exports.ApiError=A;exports.ApiUrl=B;exports.BaseDecimal=f;exports.Chain=t;exports.ChainId=d;exports.ChainIdToChain=ne;exports.ChainToChainId=Q;exports.ChainToExplorerUrl=ae;exports.ChainToHexChainId=te;exports.ChainToNetworkId=N;exports.ChainToRPC=ee;exports.ContractAddress=h;exports.CosmosChainList=$;exports.DerivationPath=O;exports.ERROR_CODE=n;exports.ERROR_MODULE=c;exports.ERROR_TYPE=l;exports.EVMChainList=p;exports.ErrorCode=g;exports.FeeOption=P;exports.MemoType=b;exports.NetworkDerivationPath=J;exports.NetworkIdToChain=C;exports.QuoteMode=_;exports.RPCUrl=S;exports.SWAP_IN=k;exports.SWAP_OUT=W;exports.TCAvalancheDepositABI=F;exports.TCBscDepositABI=X;exports.TCEthereumVaultAbi=U;exports.TCSupportedChainList=q;exports.UTXOChainList=j;exports.WalletOption=V;exports.availableChainsByWallet=se;exports.erc20ABI=w;exports.getChainEnumValue=Z;
package/dist/index.d.ts CHANGED
@@ -296,28 +296,28 @@ export declare type CosmosChain = Chain.Cosmos | Chain.Osmosis | Chain.THORChain
296
296
  export declare const CosmosChainList: CosmosChain[];
297
297
 
298
298
  export declare enum DerivationPath {
299
- ARB = "m/44'/60'/0'/0",
300
- AVAX = "m/44'/60'/0'/0",
301
- BASE = "m/44'/60'/0'/0",
302
- BCH = "m/44'/145'/0'/0",
303
- BNB = "m/44'/714'/0'/0",
304
- BSC = "m/44'/60'/0'/0",
305
- BTC = "m/84'/0'/0'/0",
306
- DOGE = "m/44'/3'/0'/0",
307
- DASH = "m/44'/5'/0'/0",
308
- DGB = "m/44'/20'/0'/0",
309
- ETH = "m/44'/60'/0'/0",
310
- EOS = "m/44'/194'/0'/0",
311
- GAIA = "m/44'/118'/0'/0",
312
- KUJI = "m/44'/118'/0'/0",
313
- LTC = "m/84'/2'/0'/0",
314
- MATIC = "m/44'/60'/0'/0",
315
- MAYA = "m/44'/931'/0'/0",
316
- OP = "m/44'/60'/0'/0",
317
- OSMO = "m/44'/118'/0'/0",
318
- XRP = "m/44'/144'/0'/0",
319
- THOR = "m/44'/931'/0'/0",
320
- ZEC = "m/44'/133'/0'/0"
299
+ ARB = "m/44'/60'/0'/0/0",
300
+ AVAX = "m/44'/60'/0'/0/0",
301
+ BASE = "m/44'/60'/0'/0/0",
302
+ BCH = "m/44'/145'/0'/0/0",
303
+ BNB = "m/44'/714'/0'/0/0",
304
+ BSC = "m/44'/60'/0'/0/0",
305
+ BTC = "m/84'/0'/0'/0/0",
306
+ DOGE = "m/44'/3'/0'/0/0",
307
+ DASH = "m/44'/5'/0'/0/0",
308
+ DGB = "m/44'/20'/0'/0/0",
309
+ ETH = "m/44'/60'/0'/0/0",
310
+ EOS = "m/44'/194'/0'/0/0",
311
+ GAIA = "m/44'/118'/0'/0/0",
312
+ KUJI = "m/44'/118'/0'/0/0",
313
+ LTC = "m/84'/2'/0'/0/0",
314
+ MATIC = "m/44'/60'/0'/0/0",
315
+ MAYA = "m/44'/931'/0'/0/0",
316
+ OP = "m/44'/60'/0'/0/0",
317
+ OSMO = "m/44'/118'/0'/0/0",
318
+ XRP = "m/44'/144'/0'/0/0",
319
+ THOR = "m/44'/931'/0'/0/0",
320
+ ZEC = "m/44'/133'/0'/0/0"
321
321
  }
322
322
 
323
323
  export declare type DerivationPathArray = [number, number, number, number, number];
@@ -566,6 +566,7 @@ export declare enum RPCUrl {
566
566
  Avalanche = "https://node-router.thorswap.net/avalanche-c",
567
567
  Binance = "https://base.llamarpc.com",
568
568
  BinanceSmartChain = "https://bsc-dataseed.binance.org",
569
+ Base = "https://base.llamarpc.com",
569
570
  Bitcoin = "https://node-router.thorswap.net/bitcoin",
570
571
  BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash",
571
572
  Cosmos = "https://node-router.thorswap.net/cosmos/rpc",
@@ -577,8 +578,9 @@ export declare enum RPCUrl {
577
578
  Maya = "https://tendermint.mayachain.info",
578
579
  MayaStagenet = "https://stagenet.tendermint.mayachain.info",
579
580
  Optimism = "https://mainnet.optimism.io",
580
- Osmosis = "https://rpc-osmosis.keplr.app",
581
+ Osmosis = "https://lcd-osmosis.keplr.app",
581
582
  Polygon = "https://polygon-rpc.com",
583
+ Ripple = "https://xrplcluster.com",
582
584
  THORChain = "https://rpc.thorswap.net",
583
585
  THORChainStagenet = "https://stagenet-rpc.ninerealms.com"
584
586
  }
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
- var C = Object.defineProperty;
2
- var B = (e, a, s) => a in e ? C(e, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[a] = s;
1
+ var f = Object.defineProperty;
2
+ var B = (e, a, s) => a in e ? f(e, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[a] = s;
3
3
  var r = (e, a, s) => (B(e, typeof a != "symbol" ? a + "" : a, s), s);
4
- const F = [
4
+ const X = [
5
5
  { inputs: [], stateMutability: "nonpayable", type: "constructor" },
6
6
  {
7
7
  anonymous: !1,
@@ -615,59 +615,59 @@ const W = [
615
615
  "TC-BEP20"
616
616
  /* TC_SUPPORTED_TO_BSC */
617
617
  ];
618
- var S = /* @__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))(S || {}), 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.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 || {});
618
+ var S = /* @__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))(S || {}), 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 || {}), n = /* @__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.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))(n || {});
619
619
  const V = {
620
- [t.INVALID_INPUT_PARAMETERS]: "Invalid input parameters: {0}.",
621
- [t.UNKNOWN_PROVIDERS]: "Unknown providers: {0}.",
622
- [t.CANNOT_FIND_INBOUND_ADDRESS]: "Cannot find inbound address.",
623
- [t.NO_INBOUND_ADDRESSES]: "No inbound addresses.",
624
- [t.CHAIN_HALTED_OR_UNSUPPORTED]: "Chain {0} halted or unsupported.",
625
- [t.MISSING_INPUT_PARAMETER]: "Missing input parameter: {0}.",
626
- [t.INVALID_TYPE_GENERIC]: "Invalid type",
627
- [t.INVALID_NUMBER_STRING]: "Invalid number string.",
628
- [t.INVALID_NUMBER]: "Invalid number.",
629
- [t.INVALID_BOOLEAN]: "Invalid boolean.",
630
- [t.INVALID_OBJECT]: "Invalid object.",
631
- [t.INVALID_ARRAY]: "Invalid array.",
632
- [t.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER]: "Sell amount must be a positive integer.",
633
- [t.SELL_BUY_ASSETS_ARE_THE_SAME]: "Sell and buy assets are the same.",
634
- [t.MISSING_SOURCE_ADDRESS_FOR_SYNTH]: "Source address is required for synth quote.",
635
- [t.AFF_ADDRESS_AND_BPS_OR_NEITHER]: "Must provide affiliateAddress and affiliateBasisPoints params, or neither.",
636
- [t.AFF_ADDRESS_TOO_LONG]: "affiliateAddress too long: 3 characters max.",
637
- [t.AFF_BPS_INTEGER_0_100]: "affiliateBasisPoints must be an integer between 0 and 100.",
638
- [t.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN]: "Source address {0} invalid for sell chain.",
639
- [t.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN]: "Destination address {0} invalid for buy chain.",
640
- [t.PREFERRED_PROFVIDER_NOT_SUPPORTED]: "Preferred provider not supported.",
641
- [t.DESTINATION_ADDRESS_SMART_CONTRACT]: "Destination address is a smart contract.",
642
- [t.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER]: "Buy amount must be a positive integer.",
643
- [t.INVALID_PROVIDER]: "Invalid provider {0}.",
644
- [t.MISSING_CROSS_CHAIN_PROVIDER]: "Missing cross-chain provider.",
645
- [t.MISSING_AVAX_PROVIDER]: "Missing AVAX provider.",
646
- [t.MISSING_BSC_PROVIDER]: "Missing BSC provider.",
647
- [t.MISSING_ETH_PROVIDER]: "Missing ETH provider.",
648
- [t.MISSING_ARB_PROVIDER]: "Missing ARB provider.",
649
- [t.INVALID_PROVIDER_FOR_SWAP_OUT]: "Invalid provider for swap out.",
650
- [t.INVALID_CHAIN]: "Invalid chain {0}.",
651
- [t.INVALID_ASSET]: "Invalid asset {0}.",
652
- [t.UNSUPPORTED_CHAIN]: "Unsupported chain {0}.",
653
- [t.UNSUPPORTED_ASSET]: "Unsupported asset {0}.",
654
- [t.UNSUPPORTED_ASSET_FOR_SWAPOUT]: "Unsupported asset {0} for swap out.",
655
- [t.THORNODE_QUOTE_GENERIC_ERROR]: "ThorNode quote generic error.",
656
- [t.INVALID_SOURCE_ADDRESS]: "Invalid source address {0}",
657
- [t.INVALID_DESTINATION_ADDRESS]: "Invalid destination address {0}",
658
- [t.NOT_ENOUGH_SYNTH_BALANCE]: "Source address doesn't have enough synth balance for this quote.",
659
- [t.SYNTH_MINTING_CAP_REACHED]: "Synth minting cap reached.",
660
- [t.INVALID_QUOTE_MODE]: "Invalid quote mode.",
661
- [t.NO_QUOTES]: "No quotes to service this request.",
662
- [t.SERVICE_UNAVAILABLE_GENERIC]: "Service unavailable.",
663
- [t.MISSING_GAS_DATA_GENERIC]: "Missing gas data.",
664
- [t.MISSING_TOKEN_INFO_GENERIC]: "Missing token info.",
665
- [t.CANT_FIND_TOKEN_LIST]: "Can't find tokenlist {0}.",
666
- [t.NO_PRICE]: "No price for asset {0}.",
667
- [t.PRICE_IS_STALE]: "Price is stale for asset {0}.",
668
- [t.ADDRESS_NOT_WHITELISTED]: "Address {0} not whitelisted for airdrop.",
669
- [t.ADDRESS_ALREADY_CLAIMED]: "Address {0} already claimed the airdrop."
670
- }, y = (e, a) => {
620
+ [n.INVALID_INPUT_PARAMETERS]: "Invalid input parameters: {0}.",
621
+ [n.UNKNOWN_PROVIDERS]: "Unknown providers: {0}.",
622
+ [n.CANNOT_FIND_INBOUND_ADDRESS]: "Cannot find inbound address.",
623
+ [n.NO_INBOUND_ADDRESSES]: "No inbound addresses.",
624
+ [n.CHAIN_HALTED_OR_UNSUPPORTED]: "Chain {0} halted or unsupported.",
625
+ [n.MISSING_INPUT_PARAMETER]: "Missing input parameter: {0}.",
626
+ [n.INVALID_TYPE_GENERIC]: "Invalid type",
627
+ [n.INVALID_NUMBER_STRING]: "Invalid number string.",
628
+ [n.INVALID_NUMBER]: "Invalid number.",
629
+ [n.INVALID_BOOLEAN]: "Invalid boolean.",
630
+ [n.INVALID_OBJECT]: "Invalid object.",
631
+ [n.INVALID_ARRAY]: "Invalid array.",
632
+ [n.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER]: "Sell amount must be a positive integer.",
633
+ [n.SELL_BUY_ASSETS_ARE_THE_SAME]: "Sell and buy assets are the same.",
634
+ [n.MISSING_SOURCE_ADDRESS_FOR_SYNTH]: "Source address is required for synth quote.",
635
+ [n.AFF_ADDRESS_AND_BPS_OR_NEITHER]: "Must provide affiliateAddress and affiliateBasisPoints params, or neither.",
636
+ [n.AFF_ADDRESS_TOO_LONG]: "affiliateAddress too long: 3 characters max.",
637
+ [n.AFF_BPS_INTEGER_0_100]: "affiliateBasisPoints must be an integer between 0 and 100.",
638
+ [n.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN]: "Source address {0} invalid for sell chain.",
639
+ [n.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN]: "Destination address {0} invalid for buy chain.",
640
+ [n.PREFERRED_PROFVIDER_NOT_SUPPORTED]: "Preferred provider not supported.",
641
+ [n.DESTINATION_ADDRESS_SMART_CONTRACT]: "Destination address is a smart contract.",
642
+ [n.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER]: "Buy amount must be a positive integer.",
643
+ [n.INVALID_PROVIDER]: "Invalid provider {0}.",
644
+ [n.MISSING_CROSS_CHAIN_PROVIDER]: "Missing cross-chain provider.",
645
+ [n.MISSING_AVAX_PROVIDER]: "Missing AVAX provider.",
646
+ [n.MISSING_BSC_PROVIDER]: "Missing BSC provider.",
647
+ [n.MISSING_ETH_PROVIDER]: "Missing ETH provider.",
648
+ [n.MISSING_ARB_PROVIDER]: "Missing ARB provider.",
649
+ [n.INVALID_PROVIDER_FOR_SWAP_OUT]: "Invalid provider for swap out.",
650
+ [n.INVALID_CHAIN]: "Invalid chain {0}.",
651
+ [n.INVALID_ASSET]: "Invalid asset {0}.",
652
+ [n.UNSUPPORTED_CHAIN]: "Unsupported chain {0}.",
653
+ [n.UNSUPPORTED_ASSET]: "Unsupported asset {0}.",
654
+ [n.UNSUPPORTED_ASSET_FOR_SWAPOUT]: "Unsupported asset {0} for swap out.",
655
+ [n.THORNODE_QUOTE_GENERIC_ERROR]: "ThorNode quote generic error.",
656
+ [n.INVALID_SOURCE_ADDRESS]: "Invalid source address {0}",
657
+ [n.INVALID_DESTINATION_ADDRESS]: "Invalid destination address {0}",
658
+ [n.NOT_ENOUGH_SYNTH_BALANCE]: "Source address doesn't have enough synth balance for this quote.",
659
+ [n.SYNTH_MINTING_CAP_REACHED]: "Synth minting cap reached.",
660
+ [n.INVALID_QUOTE_MODE]: "Invalid quote mode.",
661
+ [n.NO_QUOTES]: "No quotes to service this request.",
662
+ [n.SERVICE_UNAVAILABLE_GENERIC]: "Service unavailable.",
663
+ [n.MISSING_GAS_DATA_GENERIC]: "Missing gas data.",
664
+ [n.MISSING_TOKEN_INFO_GENERIC]: "Missing token info.",
665
+ [n.CANT_FIND_TOKEN_LIST]: "Can't find tokenlist {0}.",
666
+ [n.NO_PRICE]: "No price for asset {0}.",
667
+ [n.PRICE_IS_STALE]: "Price is stale for asset {0}.",
668
+ [n.ADDRESS_NOT_WHITELISTED]: "Address {0} not whitelisted for airdrop.",
669
+ [n.ADDRESS_ALREADY_CLAIMED]: "Address {0} already claimed the airdrop."
670
+ }, u = (e, a) => {
671
671
  let s = V[e];
672
672
  for (let i = 0; i < a.length; i++)
673
673
  s = s.replace(`{${i}}`, a[i]);
@@ -678,17 +678,17 @@ class I extends Error {
678
678
  status: s,
679
679
  revision: i,
680
680
  module: _,
681
- code: o,
681
+ code: d,
682
682
  message: N,
683
683
  type: c,
684
- options: { shouldLog: O, shouldThrow: f, shouldTrace: h } = {
684
+ options: { shouldLog: O, shouldThrow: C, shouldTrace: h } = {
685
685
  shouldLog: !0,
686
686
  shouldThrow: !0,
687
687
  shouldTrace: !0
688
688
  },
689
- displayMessageParams: u
689
+ displayMessageParams: o
690
690
  }) {
691
- const A = N || y(o, u || []) || "";
691
+ const A = N || u(d, o || []) || "";
692
692
  super(A);
693
693
  r(this, "status");
694
694
  r(this, "revision");
@@ -700,11 +700,11 @@ class I extends Error {
700
700
  r(this, "stack");
701
701
  r(this, "options");
702
702
  r(this, "displayMessageParams");
703
- this.status = s, this.revision = i || "NO_REVISION", this.module = _, this.message = A, this.display = y(o, u || []), this.code = o, this.type = c || S.UNHANDLED_ERROR, this.options = {
703
+ this.status = s, this.revision = i || "NO_REVISION", this.module = _, this.message = A, this.display = u(d, o || []), this.code = d, this.type = c || S.UNHANDLED_ERROR, this.options = {
704
704
  shouldLog: O || !0,
705
705
  shouldTrace: h || !0,
706
- shouldThrow: f || !1
707
- }, this.displayMessageParams = u || [], this.options.shouldTrace && Error.captureStackTrace(this);
706
+ shouldThrow: C || !1
707
+ }, this.displayMessageParams = o || [], this.options.shouldTrace && Error.captureStackTrace(this);
708
708
  }
709
709
  static fromErrorInfo(s) {
710
710
  return new I(s);
@@ -716,7 +716,7 @@ class I extends Error {
716
716
  return `${this.revision}-${this.type || "NO_TYPE"}-${this.module}-${this.code}`;
717
717
  }
718
718
  get displayMessage() {
719
- return y(this.code, this.displayMessageParams || []);
719
+ return u(this.code, this.displayMessageParams || []);
720
720
  }
721
721
  handle() {
722
722
  const s = `[${this.identifier}]: ${this.message}`;
@@ -726,7 +726,7 @@ class I extends Error {
726
726
  return this.toErrorInfo();
727
727
  }
728
728
  }
729
- var n = /* @__PURE__ */ ((e) => (e.Arbitrum = "ARB", e.Avalanche = "AVAX", e.Base = "BASE", e.Binance = "BNB", e.BinanceSmartChain = "BSC", e.Bitcoin = "BTC", e.BitcoinCash = "BCH", e.Cosmos = "GAIA", e.Dash = "DASH", e.Digibyte = "DGB", e.Dogecoin = "DOGE", e.EOS = "EOS", e.Ethereum = "ETH", e.Kujira = "KUJI", e.Litecoin = "LTC", e.Maya = "MAYA", e.Optimism = "OP", e.Osmosis = "OSMO", e.Polygon = "MATIC", e.Ripple = "XRP", e.THORChain = "THOR", e.Zcash = "ZEC", e))(n || {});
729
+ var t = /* @__PURE__ */ ((e) => (e.Arbitrum = "ARB", e.Avalanche = "AVAX", e.Base = "BASE", e.Binance = "BNB", e.BinanceSmartChain = "BSC", e.Bitcoin = "BTC", e.BitcoinCash = "BCH", e.Cosmos = "GAIA", e.Dash = "DASH", e.Digibyte = "DGB", e.Dogecoin = "DOGE", e.EOS = "EOS", e.Ethereum = "ETH", e.Kujira = "KUJI", e.Litecoin = "LTC", e.Maya = "MAYA", e.Optimism = "OP", e.Osmosis = "OSMO", e.Polygon = "MATIC", e.Ripple = "XRP", e.THORChain = "THOR", e.Zcash = "ZEC", e))(t || {});
730
730
  function j(e) {
731
731
  switch (e) {
732
732
  case "ARB":
@@ -786,7 +786,7 @@ const P = {
786
786
  BTC: "bip122:000000000019d6689c085ae165831e93",
787
787
  BASE: "eip155:8453",
788
788
  GAIA: "cosmos:cosmoshub-4",
789
- DASH: "bip122:dash-hash",
789
+ DASH: "bip122:000007d91d1254d60e2dd1ae58038307",
790
790
  DGB: "bip122:digibytes-hash",
791
791
  DOGE: "bip122:00000000001a91e3dace36e2be3bf030",
792
792
  KUJI: "cosmos:kaiyo-1",
@@ -797,15 +797,15 @@ const P = {
797
797
  OP: "eip155:10",
798
798
  OSMO: "cosmos:osmosis-1",
799
799
  MATIC: "eip155:137",
800
- XRP: "ripple:unknown",
800
+ XRP: "ripple:4109C6F2045FC7EFF4CDE8F9905D19C2",
801
801
  THOR: "cosmos:thorchain-mainnet-v1",
802
802
  ZEC: "bip122:0000000000196a45"
803
803
  }, H = {};
804
- for (const e in n) {
805
- const a = P[n[e]];
806
- H[a] = n[e];
804
+ for (const e in t) {
805
+ const a = P[t[e]];
806
+ H[a] = t[e];
807
807
  }
808
- var x = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(x || {}), R = /* @__PURE__ */ ((e) => (e.ARB = "m/44'/60'/0'/0", e.AVAX = "m/44'/60'/0'/0", e.BASE = "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.DASH = "m/44'/5'/0'/0", e.DGB = "m/44'/20'/0'/0", e.ETH = "m/44'/60'/0'/0", e.EOS = "m/44'/194'/0'/0", 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.OSMO = "m/44'/118'/0'/0", e.XRP = "m/44'/144'/0'/0", e.THOR = "m/44'/931'/0'/0", e.ZEC = "m/44'/133'/0'/0", e))(R || {});
808
+ var x = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(x || {}), R = /* @__PURE__ */ ((e) => (e.ARB = "m/44'/60'/0'/0/0", e.AVAX = "m/44'/60'/0'/0/0", e.BASE = "m/44'/60'/0'/0/0", e.BCH = "m/44'/145'/0'/0/0", e.BNB = "m/44'/714'/0'/0/0", e.BSC = "m/44'/60'/0'/0/0", e.BTC = "m/84'/0'/0'/0/0", e.DOGE = "m/44'/3'/0'/0/0", e.DASH = "m/44'/5'/0'/0/0", e.DGB = "m/44'/20'/0'/0/0", e.ETH = "m/44'/60'/0'/0/0", e.EOS = "m/44'/194'/0'/0/0", e.GAIA = "m/44'/118'/0'/0/0", e.KUJI = "m/44'/118'/0'/0/0", e.LTC = "m/84'/2'/0'/0/0", e.MATIC = "m/44'/60'/0'/0/0", e.MAYA = "m/44'/931'/0'/0/0", e.OP = "m/44'/60'/0'/0/0", e.OSMO = "m/44'/118'/0'/0/0", e.XRP = "m/44'/144'/0'/0/0", e.THOR = "m/44'/931'/0'/0/0", e.ZEC = "m/44'/133'/0'/0/0", e))(R || {});
809
809
  const $ = {
810
810
  ARB: [44, 60, 0, 0, 0],
811
811
  AVAX: [44, 60, 0, 0, 0],
@@ -830,8 +830,8 @@ const $ = {
830
830
  THOR: [44, 931, 0, 0, 0],
831
831
  ZEC: [44, 133, 0, 0, 0]
832
832
  };
833
- var L = /* @__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.DGB = 8] = "DGB", e[e.DOGE = 8] = "DOGE", e[e.ETH = 18] = "ETH", e[e.EOS = 6] = "EOS", 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.OSMO = 6] = "OSMO", e[e.XRP = 6] = "XRP", e[e.THOR = 8] = "THOR", e[e.ZEC = 8] = "ZEC", e))(L || {});
834
- const T = [
833
+ var D = /* @__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.DGB = 8] = "DGB", e[e.DOGE = 8] = "DOGE", e[e.ETH = 18] = "ETH", e[e.EOS = 6] = "EOS", 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.OSMO = 6] = "OSMO", e[e.XRP = 6] = "XRP", e[e.THOR = 8] = "THOR", e[e.ZEC = 8] = "ZEC", e))(D || {});
834
+ const y = [
835
835
  "ETH",
836
836
  "AVAX",
837
837
  "BSC",
@@ -868,20 +868,20 @@ const T = [
868
868
  "THOR"
869
869
  /* THORChain */
870
870
  ];
871
- var m = /* @__PURE__ */ ((e) => (e.Arbitrum = "42161", e.ArbitrumHex = "0xa4b1", e.Avalanche = "43114", e.AvalancheHex = "0xa86a", e.Base = "8453", e.Binance = "Binance-Chain-Tigris", e.BinanceSmartChain = "56", e.BinanceSmartChainHex = "0x38", e.Bitcoin = "bitcoin", e.BitcoinCash = "bitcoincash", 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.Osmosis = "osmosis-1", e.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainStagenet = "thorchain-stagenet-v2", e))(m || {}), E = /* @__PURE__ */ ((e) => (e.Arbitrum = "https://arb1.arbitrum.io/rpc", e.Avalanche = "https://node-router.thorswap.net/avalanche-c", e.Binance = "https://base.llamarpc.com", 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.Kujira = "https://rpc-kujira.synergynodes.com/", e.Dash = "https://dash.nownodes.io", 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.Osmosis = "https://rpc-osmosis.keplr.app", e.Polygon = "https://polygon-rpc.com", e.THORChain = "https://rpc.thorswap.net", e.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", e))(E || {}), D = /* @__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))(D || {});
872
- const d = Object.values(n), M = Object.keys(n), l = d.reduce(
871
+ var m = /* @__PURE__ */ ((e) => (e.Arbitrum = "42161", e.ArbitrumHex = "0xa4b1", e.Avalanche = "43114", e.AvalancheHex = "0xa86a", e.Base = "8453", e.Binance = "Binance-Chain-Tigris", e.BinanceSmartChain = "56", e.BinanceSmartChainHex = "0x38", e.Bitcoin = "bitcoin", e.BitcoinCash = "bitcoincash", 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.Osmosis = "osmosis-1", e.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainStagenet = "thorchain-stagenet-v2", e))(m || {}), E = /* @__PURE__ */ ((e) => (e.Arbitrum = "https://arb1.arbitrum.io/rpc", e.Avalanche = "https://node-router.thorswap.net/avalanche-c", e.Binance = "https://base.llamarpc.com", e.BinanceSmartChain = "https://bsc-dataseed.binance.org", e.Base = "https://base.llamarpc.com", 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.Kujira = "https://rpc-kujira.synergynodes.com/", e.Dash = "https://dash.nownodes.io", 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.Osmosis = "https://lcd-osmosis.keplr.app", e.Polygon = "https://polygon-rpc.com", e.Ripple = "https://xrplcluster.com", e.THORChain = "https://rpc.thorswap.net", e.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", e))(E || {}), L = /* @__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))(L || {});
872
+ const p = Object.values(t), v = Object.keys(t), l = p.reduce(
873
873
  (e, a) => {
874
- const s = M.find((i) => n[i] === a);
874
+ const s = v.find((i) => t[i] === a);
875
875
  return s && (e[a] = s), e;
876
876
  },
877
877
  {}
878
- ), ee = d.reduce(
878
+ ), ee = p.reduce(
879
879
  (e, a) => (e[a] = m[l[a]], e),
880
880
  {}
881
- ), te = d.reduce(
881
+ ), te = p.reduce(
882
882
  (e, a) => (e[a] = E[l[a]], e),
883
883
  {}
884
- ), ne = d.reduce(
884
+ ), ne = p.reduce(
885
885
  (e, a) => {
886
886
  const s = `${l[a]}Hex`;
887
887
  return e[a] = m[s], e;
@@ -939,72 +939,89 @@ const d = Object.values(n), M = Object.keys(n), l = d.reduce(
939
939
  THOR: "https://runescan.io",
940
940
  ZEC: "https://z.cash/ecosystem/zcash-explorer"
941
941
  };
942
- var v = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e))(v || {}), G = /* @__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))(G || {}), w = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(w || {}), U = /* @__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.BRAVE = "BRAVE", e.WALLETCONNECT = "WALLETCONNECT", e))(U || {});
943
- const p = [
944
- n.Arbitrum,
945
- n.Avalanche,
946
- n.Binance,
947
- n.BinanceSmartChain,
948
- n.Bitcoin,
949
- n.BitcoinCash,
950
- n.Cosmos,
951
- n.Dogecoin,
952
- n.Ethereum,
953
- n.Litecoin,
954
- n.Optimism,
955
- n.Polygon,
956
- n.THORChain
942
+ var M = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e))(M || {}), G = /* @__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))(G || {}), w = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(w || {}), U = /* @__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.BRAVE = "BRAVE", e.WALLETCONNECT = "WALLETCONNECT", e))(U || {});
943
+ const T = [
944
+ t.Arbitrum,
945
+ t.Avalanche,
946
+ t.Binance,
947
+ t.BinanceSmartChain,
948
+ t.Bitcoin,
949
+ t.BitcoinCash,
950
+ t.Cosmos,
951
+ t.Osmosis,
952
+ t.Ripple,
953
+ t.Dogecoin,
954
+ t.Dash,
955
+ t.Ethereum,
956
+ t.Litecoin,
957
+ t.Optimism,
958
+ t.Polygon,
959
+ t.THORChain
957
960
  ], re = {
958
- BRAVE: T,
959
- COINBASE_WEB: T,
960
- KEPLR: [n.Cosmos],
961
- KEYSTORE: p,
962
- LEDGER: p,
961
+ BRAVE: y,
962
+ COINBASE_WEB: y,
963
+ KEPLR: [t.Cosmos],
964
+ KEYSTORE: [
965
+ t.Arbitrum,
966
+ t.Avalanche,
967
+ t.Binance,
968
+ t.BinanceSmartChain,
969
+ t.Bitcoin,
970
+ t.BitcoinCash,
971
+ t.Cosmos,
972
+ t.Dogecoin,
973
+ t.Ethereum,
974
+ t.Litecoin,
975
+ t.Optimism,
976
+ t.Polygon,
977
+ t.THORChain
978
+ ],
979
+ LEDGER: T,
963
980
  TREZOR: [
964
- n.Bitcoin,
965
- n.BitcoinCash,
966
- n.Litecoin,
967
- n.Dogecoin,
968
- n.Ethereum
981
+ t.Bitcoin,
982
+ t.BitcoinCash,
983
+ t.Litecoin,
984
+ t.Dogecoin,
985
+ t.Ethereum
969
986
  ],
970
- KEEPKEY: p,
987
+ KEEPKEY: T,
971
988
  METAMASK: [
972
- n.Arbitrum,
973
- n.Avalanche,
974
- n.BinanceSmartChain,
975
- n.Bitcoin,
976
- n.BitcoinCash,
977
- n.Cosmos,
978
- n.Dogecoin,
979
- n.Ethereum,
980
- n.Litecoin,
981
- n.Optimism,
982
- n.Polygon,
983
- n.THORChain
989
+ t.Arbitrum,
990
+ t.Avalanche,
991
+ t.BinanceSmartChain,
992
+ t.Bitcoin,
993
+ t.BitcoinCash,
994
+ t.Cosmos,
995
+ t.Dogecoin,
996
+ t.Ethereum,
997
+ t.Litecoin,
998
+ t.Optimism,
999
+ t.Polygon,
1000
+ t.THORChain
984
1001
  ],
985
- TRUSTWALLET_WEB: T,
986
- XDEFI: p,
1002
+ TRUSTWALLET_WEB: y,
1003
+ XDEFI: T,
987
1004
  WALLETCONNECT: [
988
- n.Ethereum,
989
- n.Binance,
990
- n.BinanceSmartChain,
991
- n.Avalanche,
992
- n.THORChain
1005
+ t.Ethereum,
1006
+ t.Binance,
1007
+ t.BinanceSmartChain,
1008
+ t.Avalanche,
1009
+ t.THORChain
993
1010
  ],
994
1011
  OKX: [
995
- n.Ethereum,
996
- n.Avalanche,
997
- n.BinanceSmartChain,
998
- n.Bitcoin,
999
- n.Cosmos
1012
+ t.Ethereum,
1013
+ t.Avalanche,
1014
+ t.BinanceSmartChain,
1015
+ t.Bitcoin,
1016
+ t.Cosmos
1000
1017
  ]
1001
1018
  };
1002
1019
  export {
1003
1020
  W as AGG_SWAP,
1004
1021
  I as ApiError,
1005
- D as ApiUrl,
1006
- L as BaseDecimal,
1007
- n as Chain,
1022
+ L as ApiUrl,
1023
+ D as BaseDecimal,
1024
+ t as Chain,
1008
1025
  m as ChainId,
1009
1026
  ae as ChainIdToChain,
1010
1027
  ee as ChainToChainId,
@@ -1015,11 +1032,11 @@ export {
1015
1032
  x as ContractAddress,
1016
1033
  z as CosmosChainList,
1017
1034
  R as DerivationPath,
1018
- t as ERROR_CODE,
1035
+ n as ERROR_CODE,
1019
1036
  b as ERROR_MODULE,
1020
1037
  S as ERROR_TYPE,
1021
- T as EVMChainList,
1022
- v as ErrorCode,
1038
+ y as EVMChainList,
1039
+ M as ErrorCode,
1023
1040
  w as FeeOption,
1024
1041
  G as MemoType,
1025
1042
  $ as NetworkDerivationPath,
@@ -1035,6 +1052,6 @@ export {
1035
1052
  q as UTXOChainList,
1036
1053
  U as WalletOption,
1037
1054
  re as availableChainsByWallet,
1038
- F as erc20ABI,
1055
+ X as erc20ABI,
1039
1056
  j as getChainEnumValue
1040
1057
  };
package/package.json CHANGED
@@ -4,8 +4,8 @@
4
4
  "devDependencies": {
5
5
  "@types/node": "20.10.0",
6
6
  "ethers": "6.9.0",
7
- "vite": "4.5.0",
8
- "@internal/config": "2.0.1"
7
+ "vite": "4.4.9",
8
+ "@internal/config": "2.2.0"
9
9
  },
10
10
  "eslintConfig": {
11
11
  "extends": "../../../internal/eslint-config"
@@ -33,9 +33,10 @@
33
33
  "repository": "https://github.com/thorswap/SwapKit.git",
34
34
  "type": "module",
35
35
  "types": "./dist/index.d.ts",
36
- "version": "4.0.2",
36
+ "version": "4.2.0",
37
37
  "scripts": {
38
38
  "build": "vite build",
39
+ "build:watch": "nodemon --watch src --exec 'pnpm run build'",
39
40
  "clean": "rm -rf dist vite.config.ts.* .turbo node_modules",
40
41
  "lint": "eslint ./ --ext .ts,.tsx --fix; tsc --noEmit",
41
42
  "test": "echo 'No tests yet'"
package/src/network.ts CHANGED
@@ -83,7 +83,7 @@ export const ChainToNetworkId: Record<Chain, string> = {
83
83
  [Chain.Bitcoin]: 'bip122:000000000019d6689c085ae165831e93',
84
84
  [Chain.Base]: 'eip155:8453',
85
85
  [Chain.Cosmos]: 'cosmos:cosmoshub-4',
86
- [Chain.Dash]: 'bip122:dash-hash',
86
+ [Chain.Dash]: 'bip122:000007d91d1254d60e2dd1ae58038307',
87
87
  [Chain.Digibyte]: 'bip122:digibytes-hash',
88
88
  [Chain.Dogecoin]: 'bip122:00000000001a91e3dace36e2be3bf030',
89
89
  [Chain.Kujira]: 'cosmos:kaiyo-1',
@@ -94,7 +94,7 @@ export const ChainToNetworkId: Record<Chain, string> = {
94
94
  [Chain.Optimism]: 'eip155:10',
95
95
  [Chain.Osmosis]: 'cosmos:osmosis-1',
96
96
  [Chain.Polygon]: 'eip155:137',
97
- [Chain.Ripple]: 'ripple:unknown',
97
+ [Chain.Ripple]: 'ripple:4109C6F2045FC7EFF4CDE8F9905D19C2',
98
98
  [Chain.THORChain]: 'cosmos:thorchain-mainnet-v1',
99
99
  [Chain.Zcash]: 'bip122:0000000000196a45',
100
100
  };
@@ -119,28 +119,28 @@ export enum ContractAddress {
119
119
 
120
120
  //ref: https://github.com/satoshilabs/slips/blob/master/slip-0044.md
121
121
  export enum DerivationPath {
122
- ARB = "m/44'/60'/0'/0",
123
- AVAX = "m/44'/60'/0'/0",
124
- BASE = "m/44'/60'/0'/0",
125
- BCH = "m/44'/145'/0'/0",
126
- BNB = "m/44'/714'/0'/0",
127
- BSC = "m/44'/60'/0'/0",
128
- BTC = "m/84'/0'/0'/0",
129
- DOGE = "m/44'/3'/0'/0",
130
- DASH = "m/44'/5'/0'/0",
131
- DGB = "m/44'/20'/0'/0",
132
- ETH = "m/44'/60'/0'/0",
133
- EOS = "m/44'/194'/0'/0",
134
- GAIA = "m/44'/118'/0'/0",
135
- KUJI = "m/44'/118'/0'/0",
136
- LTC = "m/84'/2'/0'/0",
137
- MATIC = "m/44'/60'/0'/0",
138
- MAYA = "m/44'/931'/0'/0",
139
- OP = "m/44'/60'/0'/0",
140
- OSMO = "m/44'/118'/0'/0",
141
- XRP = "m/44'/144'/0'/0",
142
- THOR = "m/44'/931'/0'/0",
143
- ZEC = "m/44'/133'/0'/0",
122
+ ARB = "m/44'/60'/0'/0/0",
123
+ AVAX = "m/44'/60'/0'/0/0",
124
+ BASE = "m/44'/60'/0'/0/0",
125
+ BCH = "m/44'/145'/0'/0/0",
126
+ BNB = "m/44'/714'/0'/0/0",
127
+ BSC = "m/44'/60'/0'/0/0",
128
+ BTC = "m/84'/0'/0'/0/0",
129
+ DOGE = "m/44'/3'/0'/0/0",
130
+ DASH = "m/44'/5'/0'/0/0",
131
+ DGB = "m/44'/20'/0'/0/0",
132
+ ETH = "m/44'/60'/0'/0/0",
133
+ EOS = "m/44'/194'/0'/0/0",
134
+ GAIA = "m/44'/118'/0'/0/0",
135
+ KUJI = "m/44'/118'/0'/0/0",
136
+ LTC = "m/84'/2'/0'/0/0",
137
+ MATIC = "m/44'/60'/0'/0/0",
138
+ MAYA = "m/44'/931'/0'/0/0",
139
+ OP = "m/44'/60'/0'/0/0",
140
+ OSMO = "m/44'/118'/0'/0/0",
141
+ XRP = "m/44'/144'/0'/0/0",
142
+ THOR = "m/44'/931'/0'/0/0",
143
+ ZEC = "m/44'/133'/0'/0/0",
144
144
  }
145
145
 
146
146
  export type DerivationPathArray = [number, number, number, number, number];
@@ -288,6 +288,7 @@ export enum RPCUrl {
288
288
  Avalanche = 'https://node-router.thorswap.net/avalanche-c',
289
289
  Binance = 'https://base.llamarpc.com',
290
290
  BinanceSmartChain = 'https://bsc-dataseed.binance.org',
291
+ Base = 'https://base.llamarpc.com',
291
292
  Bitcoin = 'https://node-router.thorswap.net/bitcoin',
292
293
  BitcoinCash = 'https://node-router.thorswap.net/bitcoin-cash',
293
294
  Cosmos = 'https://node-router.thorswap.net/cosmos/rpc',
@@ -299,8 +300,9 @@ export enum RPCUrl {
299
300
  Maya = 'https://tendermint.mayachain.info',
300
301
  MayaStagenet = 'https://stagenet.tendermint.mayachain.info',
301
302
  Optimism = 'https://mainnet.optimism.io',
302
- Osmosis = 'https://rpc-osmosis.keplr.app',
303
+ Osmosis = 'https://lcd-osmosis.keplr.app',
303
304
  Polygon = 'https://polygon-rpc.com',
305
+ Ripple = 'https://xrplcluster.com',
304
306
  THORChain = 'https://rpc.thorswap.net',
305
307
  THORChainStagenet = 'https://stagenet-rpc.ninerealms.com',
306
308
  }
package/src/wallet.ts CHANGED
@@ -30,7 +30,10 @@ const AllChainsSupported = [
30
30
  Chain.Bitcoin,
31
31
  Chain.BitcoinCash,
32
32
  Chain.Cosmos,
33
+ Chain.Osmosis,
34
+ Chain.Ripple,
33
35
  Chain.Dogecoin,
36
+ Chain.Dash,
34
37
  Chain.Ethereum,
35
38
  Chain.Litecoin,
36
39
  Chain.Optimism,
@@ -42,7 +45,21 @@ export const availableChainsByWallet: any = {
42
45
  [WalletOption.BRAVE]: EVMChainList,
43
46
  [WalletOption.COINBASE_WEB]: EVMChainList,
44
47
  [WalletOption.KEPLR]: [Chain.Cosmos],
45
- [WalletOption.KEYSTORE]: AllChainsSupported,
48
+ [WalletOption.KEYSTORE]: [
49
+ Chain.Arbitrum,
50
+ Chain.Avalanche,
51
+ Chain.Binance,
52
+ Chain.BinanceSmartChain,
53
+ Chain.Bitcoin,
54
+ Chain.BitcoinCash,
55
+ Chain.Cosmos,
56
+ Chain.Dogecoin,
57
+ Chain.Ethereum,
58
+ Chain.Litecoin,
59
+ Chain.Optimism,
60
+ Chain.Polygon,
61
+ Chain.THORChain,
62
+ ],
46
63
  [WalletOption.LEDGER]: AllChainsSupported,
47
64
  [WalletOption.TREZOR]: [
48
65
  Chain.Bitcoin,