@coinmasters/types 4.2.7 → 4.3.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 X=Object.defineProperty;var K=(e,a,s)=>a in e?X(e,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[a]=s;var r=(e,a,s)=>(K(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"}],k=[{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"}],Y=[{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"}],Z=[{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.GAIA_TO_OSMO="OSMOSIS-IBC",e.CHANGELLY="CHANGELLY",e))(_||{});const c=["OSMOSIS-IBC"],N=["CHANGELLY"],C=["ERC20-ERC20","ARC20-ARC20","BEP20-BEP20"],O=["ERC20-TC","ERC20-ARC20","ERC20-BEP20","ARC20-TC","ARC20-ERC20","ARC20-BEP20","BEP20-TC","BEP20-ERC20","BEP20-ARC20"],h=["TC-TC","TC-ERC20","TC-ARC20","TC-BEP20"];function J(e){return C.includes(e)?"AGG_SWAP":O.includes(e)?"SWAP_IN":h.includes(e)?"SWAP_OUT":c.includes(e)?"OSMOSIS_SWAP":N.includes(e)?"CENTRALIZED_SWAPPER":null}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||{}),f=(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))(f||{}),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 j={[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=j[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:v,code:u,message:M,type:G,options:{shouldLog:w,shouldThrow:U,shouldTrace:F}={shouldLog:!0,shouldThrow:!0,shouldTrace:!0},displayMessageParams:y}){const E=M||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=v,this.message=E,this.display=T(u,y||[]),this.code=u,this.type=G||l.UNHANDLED_ERROR,this.options={shouldLog:w||!0,shouldTrace:F||!0,shouldThrow:U||!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 $(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 B={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"},P={};for(const e in t){const a=B[t[e]];P[a]=t[e]}var g=(e=>(e.ARB="0x0000000000000000000000000000000000000000",e.AVAX="0x0000000000000000000000000000000000000000",e.ETH="0x0000000000000000000000000000000000000000",e.BSC="0x0000000000000000000000000000000000000000",e.MATIC="0x0000000000000000000000000000000000001010",e.OP="0x4200000000000000000000000000000000000042",e))(g||{}),b=(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))(b||{});const q={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 V=(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))(V||{});const p=["ETH","AVAX","BSC","ARB","OP","MATIC"],z=["BTC","BCH","DASH","DGB","DOGE","LTC","ZEC"],Q=["GAIA","THOR","BNB","OSMO"],ee=["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||{}),H=(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))(H||{});const o=Object.values(t),te=Object.keys(t),I=o.reduce((e,a)=>{const s=te.find(i=>t[i]===a);return s&&(e[a]=s),e},{}),ne=o.reduce((e,a)=>(e[a]=d[I[a]],e),{}),ae=o.reduce((e,a)=>(e[a]=S[I[a]],e),{}),se=o.reduce((e,a)=>{const s=`${I[a]}Hex`;return e[a]=d[s],e},{}),re={"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"},ie={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 R=(e=>(e[e.NoError=36864]="NoError",e))(R||{}),L=(e=>(e.BOND="BOND",e.DEPOSIT="+",e.LEAVE="LEAVE",e.THORNAME_REGISTER="~",e.UNBOND="UNBOND",e.WITHDRAW="-",e.OPEN_LOAN="$+",e.CLOSE_LOAN="$-",e))(L||{}),D=(e=>(e.Average="average",e.Fast="fast",e.Fastest="fastest",e))(D||{}),x=(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))(x||{});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],pe={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=C;exports.ApiError=A;exports.ApiUrl=H;exports.BaseDecimal=V;exports.CENTRALIZED_SWAPPER=N;exports.Chain=t;exports.ChainId=d;exports.ChainIdToChain=re;exports.ChainToChainId=ne;exports.ChainToExplorerUrl=ie;exports.ChainToHexChainId=se;exports.ChainToNetworkId=B;exports.ChainToRPC=ae;exports.ContractAddress=g;exports.CosmosChainList=Q;exports.DerivationPath=b;exports.ERROR_CODE=n;exports.ERROR_MODULE=f;exports.ERROR_TYPE=l;exports.EVMChainList=p;exports.ErrorCode=R;exports.FeeOption=D;exports.MemoType=L;exports.NetworkDerivationPath=q;exports.NetworkIdToChain=P;exports.OSMOSIS_SWAP=c;exports.QuoteMode=_;exports.RPCUrl=S;exports.SWAP_IN=O;exports.SWAP_OUT=h;exports.TCAvalancheDepositABI=Y;exports.TCBscDepositABI=Z;exports.TCEthereumVaultAbi=k;exports.TCSupportedChainList=ee;exports.UTXOChainList=z;exports.WalletOption=x;exports.availableChainsByWallet=pe;exports.classifySwap=J;exports.erc20ABI=W;exports.getChainEnumValue=$;
1
+ "use strict";var F=Object.defineProperty;var W=(e,a,s)=>a in e?F(e,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[a]=s;var i=(e,a,s)=>(W(e,typeof a!="symbol"?a+"":a,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=[{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"}],Y=[{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"}],k=[{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"}],Z=[{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.GAIA_TO_OSMO="OSMOSIS-IBC",e.MAYA_SUPPORTED_TO_MAYA_SUPPORTED="MAYA_SUPPORTED_TO_MAYA_SUPPORTED",e.CHANGELLY="CHANGELLY",e))(_||{});const c=["OSMOSIS-IBC"],N=["CHANGELLY"],O=["ERC20-ERC20","ARC20-ARC20","BEP20-BEP20"],C=["ERC20-TC","ERC20-ARC20","ERC20-BEP20","ARC20-TC","ARC20-ERC20","ARC20-BEP20","BEP20-TC","BEP20-ERC20","BEP20-ARC20"],h=["TC-TC","TC-ERC20","TC-ARC20","TC-BEP20"],J=["MAYA_SUPPORTED_TO_MAYA_SUPPORTED"];function j(e){return O.includes(e)?"AGG_SWAP":C.includes(e)?"SWAP_IN":h.includes(e)?"SWAP_OUT":c.includes(e)?"OSMOSIS_SWAP":N.includes(e)?"CENTRALIZED_SWAPPER":null}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||{}),f=(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))(f||{}),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 $={[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."},y=(e,a)=>{let s=$[e];for(let r=0;r<a.length;r++)s=s.replace(`{${r}}`,a[r]);return a.length===0?s.replace("{0}",""):s};class A extends Error{constructor({status:s,revision:r,module:M,code:u,message:v,type:G,options:{shouldLog:U,shouldThrow:w,shouldTrace:X}={shouldLog:!0,shouldThrow:!0,shouldTrace:!0},displayMessageParams:T}){const I=v||y(u,T||[])||"";super(I);i(this,"status");i(this,"revision");i(this,"type");i(this,"module");i(this,"code");i(this,"message");i(this,"display");i(this,"stack");i(this,"options");i(this,"displayMessageParams");this.status=s,this.revision=r||"NO_REVISION",this.module=M,this.message=I,this.display=y(u,T||[]),this.code=u,this.type=G||l.UNHANDLED_ERROR,this.options={shouldLog:U||!0,shouldTrace:X||!0,shouldThrow:w||!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 y(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 q(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 B={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"},P={};for(const e in t){const a=B[t[e]];P[a]=t[e]}var g=(e=>(e.ARB="0x0000000000000000000000000000000000000000",e.AVAX="0x0000000000000000000000000000000000000000",e.ETH="0x0000000000000000000000000000000000000000",e.BSC="0x0000000000000000000000000000000000000000",e.MATIC="0x0000000000000000000000000000000000001010",e.OP="0x4200000000000000000000000000000000000042",e))(g||{}),b=(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))(b||{});const z={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 V=(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))(V||{});const p=["ETH","AVAX","BSC","ARB","OP","MATIC"],Q=["BTC","BCH","DASH","DGB","DOGE","LTC","ZEC"],ee=["GAIA","THOR","BNB","OSMO"],te=["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://daemon.ethereum.shapeshift.com",e.Litecoin="https://node-router.thorswap.net/litecoin",e.Maya="https://tendermint.mayachain.info",e.MayaStagenet="https://stagenet.tendermint.mayachain.info",e.Optimism="https://mainnet.optimism.io",e.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||{}),R=(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))(R||{});const o=Object.values(t),ne=Object.keys(t),E=o.reduce((e,a)=>{const s=ne.find(r=>t[r]===a);return s&&(e[a]=s),e},{}),ae=o.reduce((e,a)=>(e[a]=d[E[a]],e),{}),se=o.reduce((e,a)=>(e[a]=S[E[a]],e),{}),ie=o.reduce((e,a)=>{const s=`${E[a]}Hex`;return e[a]=d[s],e},{}),re={"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"},pe={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 H=(e=>(e[e.NoError=36864]="NoError",e))(H||{}),D=(e=>(e.BOND="BOND",e.DEPOSIT="+",e.LEAVE="LEAVE",e.THORNAME_REGISTER="~",e.UNBOND="UNBOND",e.WITHDRAW="-",e.OPEN_LOAN="$+",e.CLOSE_LOAN="$-",e))(D||{}),L=(e=>(e.Average="average",e.Fast="fast",e.Fastest="fastest",e))(L||{}),x=(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))(x||{});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],de={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=O;exports.ApiError=A;exports.ApiUrl=R;exports.BaseDecimal=V;exports.CENTRALIZED_SWAPPER=N;exports.Chain=t;exports.ChainId=d;exports.ChainIdToChain=re;exports.ChainToChainId=ae;exports.ChainToExplorerUrl=pe;exports.ChainToHexChainId=ie;exports.ChainToNetworkId=B;exports.ChainToRPC=se;exports.ContractAddress=g;exports.CosmosChainList=ee;exports.DerivationPath=b;exports.ERROR_CODE=n;exports.ERROR_MODULE=f;exports.ERROR_TYPE=l;exports.EVMChainList=p;exports.ErrorCode=H;exports.FeeOption=L;exports.MemoType=D;exports.NetworkDerivationPath=z;exports.NetworkIdToChain=P;exports.OSMOSIS_SWAP=c;exports.QuoteMode=_;exports.RPCUrl=S;exports.SWAP_IN=C;exports.SWAP_OUT=h;exports.TCAvalancheDepositABI=k;exports.TCBscDepositABI=Z;exports.TCEthereumVaultAbi=Y;exports.TCSupportedChainList=te;exports.UTXOChainList=Q;exports.UXTO_SWAP=J;exports.WalletOption=x;exports.availableChainsByWallet=de;exports.classifySwap=j;exports.erc20ABI=K;exports.getChainEnumValue=q;
package/dist/index.d.ts CHANGED
@@ -566,6 +566,7 @@ export declare enum QuoteMode {
566
566
  BSC_TO_AVAX = "BEP20-ARC20",
567
567
  BSC_TO_BSC = "BEP20-BEP20",
568
568
  GAIA_TO_OSMO = "OSMOSIS-IBC",
569
+ MAYA_SUPPORTED_TO_MAYA_SUPPORTED = "MAYA_SUPPORTED_TO_MAYA_SUPPORTED",
569
570
  CHANGELLY = "CHANGELLY"
570
571
  }
571
572
 
@@ -581,7 +582,7 @@ export declare enum RPCUrl {
581
582
  Kujira = "https://rpc-kujira.synergynodes.com/",
582
583
  Dash = "https://dash.nownodes.io",
583
584
  Dogecoin = "https://node-router.thorswap.net/dogecoin",
584
- Ethereum = "https://node-router.thorswap.net/ethereum",
585
+ Ethereum = "https://daemon.ethereum.shapeshift.com",
585
586
  Litecoin = "https://node-router.thorswap.net/litecoin",
586
587
  Maya = "https://tendermint.mayachain.info",
587
588
  MayaStagenet = "https://stagenet.tendermint.mayachain.info",
@@ -820,6 +821,8 @@ export declare type UTXOChain = Chain.Bitcoin | Chain.BitcoinCash | Chain.Dogeco
820
821
 
821
822
  export declare const UTXOChainList: UTXOChain[];
822
823
 
824
+ export declare const UXTO_SWAP: QuoteMode[];
825
+
823
826
  export declare enum WalletOption {
824
827
  'KEYSTORE' = "KEYSTORE",
825
828
  'KEEPKEY' = "KEEPKEY",
package/dist/index.es.js CHANGED
@@ -591,11 +591,11 @@ const Z = [
591
591
  type: "function"
592
592
  }
593
593
  ];
594
- var g = /* @__PURE__ */ ((e) => (e.TC_SUPPORTED_TO_TC_SUPPORTED = "TC-TC", e.TC_SUPPORTED_TO_ETH = "TC-ERC20", e.TC_SUPPORTED_TO_AVAX = "TC-ARC20", e.TC_SUPPORTED_TO_BSC = "TC-BEP20", e.ETH_TO_TC_SUPPORTED = "ERC20-TC", e.ETH_TO_ETH = "ERC20-ERC20", e.ETH_TO_AVAX = "ERC20-ARC20", e.ETH_TO_BSC = "ERC20-BEP20", e.AVAX_TO_TC_SUPPORTED = "ARC20-TC", e.AVAX_TO_ETH = "ARC20-ERC20", e.AVAX_TO_AVAX = "ARC20-ARC20", e.AVAX_TO_BSC = "ARC20-BEP20", e.BSC_TO_TC_SUPPORTED = "BEP20-TC", e.BSC_TO_ETH = "BEP20-ERC20", e.BSC_TO_AVAX = "BEP20-ARC20", e.BSC_TO_BSC = "BEP20-BEP20", e.GAIA_TO_OSMO = "OSMOSIS-IBC", e.CHANGELLY = "CHANGELLY", e))(g || {});
595
- const b = [
594
+ var P = /* @__PURE__ */ ((e) => (e.TC_SUPPORTED_TO_TC_SUPPORTED = "TC-TC", e.TC_SUPPORTED_TO_ETH = "TC-ERC20", e.TC_SUPPORTED_TO_AVAX = "TC-ARC20", e.TC_SUPPORTED_TO_BSC = "TC-BEP20", e.ETH_TO_TC_SUPPORTED = "ERC20-TC", e.ETH_TO_ETH = "ERC20-ERC20", e.ETH_TO_AVAX = "ERC20-ARC20", e.ETH_TO_BSC = "ERC20-BEP20", e.AVAX_TO_TC_SUPPORTED = "ARC20-TC", e.AVAX_TO_ETH = "ARC20-ERC20", e.AVAX_TO_AVAX = "ARC20-ARC20", e.AVAX_TO_BSC = "ARC20-BEP20", e.BSC_TO_TC_SUPPORTED = "BEP20-TC", e.BSC_TO_ETH = "BEP20-ERC20", e.BSC_TO_AVAX = "BEP20-ARC20", e.BSC_TO_BSC = "BEP20-BEP20", e.GAIA_TO_OSMO = "OSMOSIS-IBC", e.MAYA_SUPPORTED_TO_MAYA_SUPPORTED = "MAYA_SUPPORTED_TO_MAYA_SUPPORTED", e.CHANGELLY = "CHANGELLY", e))(P || {});
595
+ const g = [
596
596
  "OSMOSIS-IBC"
597
597
  /* GAIA_TO_OSMO */
598
- ], P = [
598
+ ], b = [
599
599
  "CHANGELLY"
600
600
  /* CHANGELLY */
601
601
  ], V = [
@@ -614,18 +614,21 @@ const b = [
614
614
  "BEP20-ERC20",
615
615
  "BEP20-ARC20"
616
616
  /* BSC_TO_AVAX */
617
- ], L = [
617
+ ], R = [
618
618
  "TC-TC",
619
619
  "TC-ERC20",
620
620
  "TC-ARC20",
621
621
  "TC-BEP20"
622
622
  /* TC_SUPPORTED_TO_BSC */
623
+ ], q = [
624
+ "MAYA_SUPPORTED_TO_MAYA_SUPPORTED"
625
+ /* MAYA_SUPPORTED_TO_MAYA_SUPPORTED */
623
626
  ];
624
- function q(e) {
625
- return V.includes(e) ? "AGG_SWAP" : H.includes(e) ? "SWAP_IN" : L.includes(e) ? "SWAP_OUT" : b.includes(e) ? "OSMOSIS_SWAP" : P.includes(e) ? "CENTRALIZED_SWAPPER" : null;
627
+ function z(e) {
628
+ return V.includes(e) ? "AGG_SWAP" : H.includes(e) ? "SWAP_IN" : R.includes(e) ? "SWAP_OUT" : g.includes(e) ? "OSMOSIS_SWAP" : b.includes(e) ? "CENTRALIZED_SWAPPER" : null;
626
629
  }
627
- 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 || {}), R = /* @__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))(R || {}), 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 || {});
628
- const D = {
630
+ 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 || {}), D = /* @__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))(D || {}), 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 || {});
631
+ const L = {
629
632
  [n.INVALID_INPUT_PARAMETERS]: "Invalid input parameters: {0}.",
630
633
  [n.UNKNOWN_PROVIDERS]: "Unknown providers: {0}.",
631
634
  [n.CANNOT_FIND_INBOUND_ADDRESS]: "Cannot find inbound address.",
@@ -677,12 +680,12 @@ const D = {
677
680
  [n.ADDRESS_NOT_WHITELISTED]: "Address {0} not whitelisted for airdrop.",
678
681
  [n.ADDRESS_ALREADY_CLAIMED]: "Address {0} already claimed the airdrop."
679
682
  }, u = (e, a) => {
680
- let s = D[e];
683
+ let s = L[e];
681
684
  for (let i = 0; i < a.length; i++)
682
685
  s = s.replace(`{${i}}`, a[i]);
683
686
  return a.length === 0 ? s.replace("{0}", "") : s;
684
687
  };
685
- class I extends Error {
688
+ class E extends Error {
686
689
  constructor({
687
690
  status: s,
688
691
  revision: i,
@@ -716,7 +719,7 @@ class I extends Error {
716
719
  }, this.displayMessageParams = o || [], this.options.shouldTrace && Error.captureStackTrace(this);
717
720
  }
718
721
  static fromErrorInfo(s) {
719
- return new I(s);
722
+ return new E(s);
720
723
  }
721
724
  toErrorInfo() {
722
725
  return { ...this, identifier: this.identifier };
@@ -736,7 +739,7 @@ class I extends Error {
736
739
  }
737
740
  }
738
741
  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 || {});
739
- function z(e) {
742
+ function Q(e) {
740
743
  switch (e) {
741
744
  case "ARB":
742
745
  return "ARB";
@@ -809,13 +812,13 @@ const x = {
809
812
  XRP: "ripple:4109C6F2045FC7EFF4CDE8F9905D19C2",
810
813
  THOR: "cosmos:thorchain-mainnet-v1",
811
814
  ZEC: "bip122:0000000000196a45"
812
- }, v = {};
815
+ }, M = {};
813
816
  for (const e in t) {
814
817
  const a = x[t[e]];
815
- v[a] = t[e];
818
+ M[a] = t[e];
816
819
  }
817
- var M = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(M || {}), G = /* @__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))(G || {});
818
- const Q = {
820
+ var v = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(v || {}), G = /* @__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))(G || {});
821
+ const ee = {
819
822
  ARB: [44, 60, 0, 0, 0],
820
823
  AVAX: [44, 60, 0, 0, 0],
821
824
  BASE: [44, 60, 0, 0, 0],
@@ -839,7 +842,7 @@ const Q = {
839
842
  THOR: [44, 931, 0, 0, 0],
840
843
  ZEC: [44, 133, 0, 0, 0]
841
844
  };
842
- var w = /* @__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))(w || {});
845
+ var U = /* @__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))(U || {});
843
846
  const y = [
844
847
  "ETH",
845
848
  "AVAX",
@@ -849,7 +852,7 @@ const y = [
849
852
  "OP",
850
853
  "MATIC"
851
854
  /* Polygon */
852
- ], ee = [
855
+ ], te = [
853
856
  "BTC",
854
857
  "BCH",
855
858
  "DASH",
@@ -858,13 +861,13 @@ const y = [
858
861
  "LTC",
859
862
  "ZEC"
860
863
  /* Zcash */
861
- ], te = [
864
+ ], ne = [
862
865
  "GAIA",
863
866
  "THOR",
864
867
  "BNB",
865
868
  "OSMO"
866
869
  /* Osmosis */
867
- ], ne = [
870
+ ], ae = [
868
871
  "AVAX",
869
872
  "BNB",
870
873
  "BSC",
@@ -877,26 +880,26 @@ const y = [
877
880
  "THOR"
878
881
  /* THORChain */
879
882
  ];
880
- 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 || {}), U = /* @__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))(U || {});
883
+ 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 || {}), I = /* @__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://daemon.ethereum.shapeshift.com", e.Litecoin = "https://node-router.thorswap.net/litecoin", e.Maya = "https://tendermint.mayachain.info", e.MayaStagenet = "https://stagenet.tendermint.mayachain.info", e.Optimism = "https://mainnet.optimism.io", e.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))(I || {}), w = /* @__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))(w || {});
881
884
  const p = Object.values(t), F = Object.keys(t), l = p.reduce(
882
885
  (e, a) => {
883
886
  const s = F.find((i) => t[i] === a);
884
887
  return s && (e[a] = s), e;
885
888
  },
886
889
  {}
887
- ), ae = p.reduce(
888
- (e, a) => (e[a] = m[l[a]], e),
889
- {}
890
890
  ), se = p.reduce(
891
- (e, a) => (e[a] = E[l[a]], e),
891
+ (e, a) => (e[a] = m[l[a]], e),
892
892
  {}
893
893
  ), re = p.reduce(
894
+ (e, a) => (e[a] = I[l[a]], e),
895
+ {}
896
+ ), ie = p.reduce(
894
897
  (e, a) => {
895
898
  const s = `${l[a]}Hex`;
896
899
  return e[a] = m[s], e;
897
900
  },
898
901
  {}
899
- ), ie = {
902
+ ), pe = {
900
903
  "0xa4b1": "ARB",
901
904
  42161: "ARB",
902
905
  "0xa86a": "AVAX",
@@ -924,7 +927,7 @@ const p = Object.values(t), F = Object.keys(t), l = p.reduce(
924
927
  "thorchain-stagenet-v2": "THOR",
925
928
  "thorchain-mainnet-v1": "THOR"
926
929
  /* THORChain */
927
- }, pe = {
930
+ }, de = {
928
931
  ARB: "https://arbiscan.io",
929
932
  AVAX: "https://snowtrace.io",
930
933
  BSC: "https://bscscan.com",
@@ -948,7 +951,7 @@ const p = Object.values(t), F = Object.keys(t), l = p.reduce(
948
951
  THOR: "https://runescan.io",
949
952
  ZEC: "https://z.cash/ecosystem/zcash-explorer"
950
953
  };
951
- var X = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e))(X || {}), K = /* @__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))(K || {}), W = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(W || {}), Y = /* @__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))(Y || {});
954
+ var X = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e))(X || {}), K = /* @__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))(K || {}), Y = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(Y || {}), W = /* @__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))(W || {});
952
955
  const T = [
953
956
  t.Arbitrum,
954
957
  t.Avalanche,
@@ -966,7 +969,7 @@ const T = [
966
969
  t.Optimism,
967
970
  t.Polygon,
968
971
  t.THORChain
969
- ], de = {
972
+ ], oe = {
970
973
  BRAVE: y,
971
974
  COINBASE_WEB: y,
972
975
  KEPLR: [t.Cosmos],
@@ -1027,43 +1030,44 @@ const T = [
1027
1030
  };
1028
1031
  export {
1029
1032
  V as AGG_SWAP,
1030
- I as ApiError,
1031
- U as ApiUrl,
1032
- w as BaseDecimal,
1033
- P as CENTRALIZED_SWAPPER,
1033
+ E as ApiError,
1034
+ w as ApiUrl,
1035
+ U as BaseDecimal,
1036
+ b as CENTRALIZED_SWAPPER,
1034
1037
  t as Chain,
1035
1038
  m as ChainId,
1036
- ie as ChainIdToChain,
1037
- ae as ChainToChainId,
1038
- pe as ChainToExplorerUrl,
1039
- re as ChainToHexChainId,
1039
+ pe as ChainIdToChain,
1040
+ se as ChainToChainId,
1041
+ de as ChainToExplorerUrl,
1042
+ ie as ChainToHexChainId,
1040
1043
  x as ChainToNetworkId,
1041
- se as ChainToRPC,
1042
- M as ContractAddress,
1043
- te as CosmosChainList,
1044
+ re as ChainToRPC,
1045
+ v as ContractAddress,
1046
+ ne as CosmosChainList,
1044
1047
  G as DerivationPath,
1045
1048
  n as ERROR_CODE,
1046
- R as ERROR_MODULE,
1049
+ D as ERROR_MODULE,
1047
1050
  S as ERROR_TYPE,
1048
1051
  y as EVMChainList,
1049
1052
  X as ErrorCode,
1050
- W as FeeOption,
1053
+ Y as FeeOption,
1051
1054
  K as MemoType,
1052
- Q as NetworkDerivationPath,
1053
- v as NetworkIdToChain,
1054
- b as OSMOSIS_SWAP,
1055
- g as QuoteMode,
1056
- E as RPCUrl,
1055
+ ee as NetworkDerivationPath,
1056
+ M as NetworkIdToChain,
1057
+ g as OSMOSIS_SWAP,
1058
+ P as QuoteMode,
1059
+ I as RPCUrl,
1057
1060
  H as SWAP_IN,
1058
- L as SWAP_OUT,
1061
+ R as SWAP_OUT,
1059
1062
  j as TCAvalancheDepositABI,
1060
1063
  $ as TCBscDepositABI,
1061
1064
  J as TCEthereumVaultAbi,
1062
- ne as TCSupportedChainList,
1063
- ee as UTXOChainList,
1064
- Y as WalletOption,
1065
- de as availableChainsByWallet,
1066
- q as classifySwap,
1065
+ ae as TCSupportedChainList,
1066
+ te as UTXOChainList,
1067
+ q as UXTO_SWAP,
1068
+ W as WalletOption,
1069
+ oe as availableChainsByWallet,
1070
+ z as classifySwap,
1067
1071
  Z as erc20ABI,
1068
- z as getChainEnumValue
1072
+ Q as getChainEnumValue
1069
1073
  };
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "@types/node": "20.10.0",
6
6
  "ethers": "6.9.0",
7
7
  "vite": "4.4.9",
8
- "@internal/config": "2.2.7"
8
+ "@internal/config": "2.3.0"
9
9
  },
10
10
  "eslintConfig": {
11
11
  "extends": "../../../internal/eslint-config"
@@ -33,7 +33,7 @@
33
33
  "repository": "https://github.com/thorswap/SwapKit.git",
34
34
  "type": "module",
35
35
  "types": "./dist/index.d.ts",
36
- "version": "4.2.7",
36
+ "version": "4.3.0",
37
37
  "scripts": {
38
38
  "build": "vite build",
39
39
  "build:watch": "nodemon --watch src --exec 'pnpm run build'",
@@ -119,6 +119,7 @@ export enum QuoteMode {
119
119
  BSC_TO_AVAX = 'BEP20-ARC20',
120
120
  BSC_TO_BSC = 'BEP20-BEP20',
121
121
  GAIA_TO_OSMO = 'OSMOSIS-IBC',
122
+ MAYA_SUPPORTED_TO_MAYA_SUPPORTED = 'MAYA_SUPPORTED_TO_MAYA_SUPPORTED',
122
123
  CHANGELLY = 'CHANGELLY',
123
124
  }
124
125
 
@@ -154,6 +155,10 @@ export const SWAP_OUT = [
154
155
  QuoteMode.TC_SUPPORTED_TO_BSC,
155
156
  ];
156
157
 
158
+ export const UXTO_SWAP = [
159
+ QuoteMode.MAYA_SUPPORTED_TO_MAYA_SUPPORTED,
160
+ ];
161
+
157
162
  export function classifySwap(quoteMode:QuoteMode) {
158
163
  if (AGG_SWAP.includes(quoteMode)) {
159
164
  return 'AGG_SWAP';
package/src/network.ts CHANGED
@@ -295,7 +295,7 @@ export enum RPCUrl {
295
295
  Kujira = 'https://rpc-kujira.synergynodes.com/',
296
296
  Dash = 'https://dash.nownodes.io',
297
297
  Dogecoin = 'https://node-router.thorswap.net/dogecoin',
298
- Ethereum = 'https://node-router.thorswap.net/ethereum',
298
+ Ethereum = 'https://daemon.ethereum.shapeshift.com',
299
299
  Litecoin = 'https://node-router.thorswap.net/litecoin',
300
300
  Maya = 'https://tendermint.mayachain.info',
301
301
  MayaStagenet = 'https://stagenet.tendermint.mayachain.info',