@coinmasters/types 1.0.0 → 2.1.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 D=Object.defineProperty;var L=(e,n,a)=>n in e?D(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a;var s=(e,n,a)=>(L(e,typeof n!="symbol"?n+"":n,a),a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=[{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"}],M=[{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"}],G=[{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"}],U=[{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 S=(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))(S||{});const w=["ERC20-ERC20","ARC20-ARC20","BEP20-BEP20"],F=["ERC20-TC","ERC20-ARC20","ERC20-BEP20","ARC20-TC","ARC20-ERC20","ARC20-BEP20","BEP20-TC","BEP20-ERC20","BEP20-ARC20"],X=["TC-TC","TC-ERC20","TC-ARC20","TC-BEP20"];var o=(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))(o||{}),_=(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))(_||{}),t=(e=>(e.INVALID_INPUT_PARAMETERS="1000",e.UNKNOWN_PROVIDERS="1001",e.CANNOT_FIND_INBOUND_ADDRESS="1002",e.NO_INBOUND_ADDRESSES="1003",e.CHAIN_HALTED_OR_UNSUPPORTED="1004",e.MISSING_INPUT_PARAMETER="1005",e.INVALID_TYPE_GENERIC="1100",e.INVALID_NUMBER_STRING="1101",e.INVALID_NUMBER="1102",e.INVALID_BOOLEAN="1103",e.INVALID_OBJECT="1104",e.INVALID_ARRAY="1105",e.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER="2000",e.SELL_BUY_ASSETS_ARE_THE_SAME="2001",e.MISSING_SOURCE_ADDRESS_FOR_SYNTH="2002",e.AFF_ADDRESS_AND_BPS_OR_NEITHER="2003",e.AFF_ADDRESS_TOO_LONG="2004",e.AFF_BPS_INTEGER_0_100="2005",e.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN="2006",e.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN="2007",e.PREFERRED_PROFVIDER_NOT_SUPPORTED="2008",e.DESTINATION_ADDRESS_SMART_CONTRACT="2009",e.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER="2010",e.SOURCE_ADDRESS_SMART_CONTRACT="2011",e.INVALID_PROVIDER="2100",e.MISSING_CROSS_CHAIN_PROVIDER="2101",e.MISSING_AVAX_PROVIDER="2102",e.MISSING_BSC_PROVIDER="2103",e.MISSING_ETH_PROVIDER="2104",e.INVALID_PROVIDER_FOR_SWAP_OUT="2105",e.MISSING_ARB_PROVIDER="2106",e.INVALID_CHAIN="2200",e.INVALID_ASSET="2201",e.INVALID_ASSET_IDENTIFIER="2202",e.UNSUPPORTED_CHAIN="2204",e.UNSUPPORTED_ASSET="2203",e.UNSUPPORTED_ASSET_FOR_SWAPOUT="2205",e.INVALID_SOURCE_ADDRESS="2300",e.INVALID_DESTINATION_ADDRESS="2301",e.THORNODE_QUOTE_GENERIC_ERROR="3000",e.NOT_ENOUGH_SYNTH_BALANCE="3001",e.SYNTH_MINTING_CAP_REACHED="3002",e.INVALID_QUOTE_MODE="4000",e.NO_QUOTES="4001",e.SERVICE_UNAVAILABLE_GENERIC="5000",e.MISSING_GAS_DATA_GENERIC="5100",e.MISSING_TOKEN_INFO_GENERIC="5200",e.CANT_FIND_TOKEN_LIST="5201",e.NO_PRICE="5202",e.PRICE_IS_STALE="5203",e.ADDRESS_NOT_WHITELISTED="6000",e.ADDRESS_ALREADY_CLAIMED="6001",e.TEMPORARY_ERROR="9999",e))(t||{});const W={[t.INVALID_INPUT_PARAMETERS]:"Invalid input parameters: {0}.",[t.UNKNOWN_PROVIDERS]:"Unknown providers: {0}.",[t.CANNOT_FIND_INBOUND_ADDRESS]:"Cannot find inbound address.",[t.NO_INBOUND_ADDRESSES]:"No inbound addresses.",[t.CHAIN_HALTED_OR_UNSUPPORTED]:"Chain {0} halted or unsupported.",[t.MISSING_INPUT_PARAMETER]:"Missing input parameter: {0}.",[t.INVALID_TYPE_GENERIC]:"Invalid type",[t.INVALID_NUMBER_STRING]:"Invalid number string.",[t.INVALID_NUMBER]:"Invalid number.",[t.INVALID_BOOLEAN]:"Invalid boolean.",[t.INVALID_OBJECT]:"Invalid object.",[t.INVALID_ARRAY]:"Invalid array.",[t.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER]:"Sell amount must be a positive integer.",[t.SELL_BUY_ASSETS_ARE_THE_SAME]:"Sell and buy assets are the same.",[t.MISSING_SOURCE_ADDRESS_FOR_SYNTH]:"Source address is required for synth quote.",[t.AFF_ADDRESS_AND_BPS_OR_NEITHER]:"Must provide affiliateAddress and affiliateBasisPoints params, or neither.",[t.AFF_ADDRESS_TOO_LONG]:"affiliateAddress too long: 3 characters max.",[t.AFF_BPS_INTEGER_0_100]:"affiliateBasisPoints must be an integer between 0 and 100.",[t.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN]:"Source address {0} invalid for sell chain.",[t.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN]:"Destination address {0} invalid for buy chain.",[t.PREFERRED_PROFVIDER_NOT_SUPPORTED]:"Preferred provider not supported.",[t.DESTINATION_ADDRESS_SMART_CONTRACT]:"Destination address is a smart contract.",[t.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER]:"Buy amount must be a positive integer.",[t.INVALID_PROVIDER]:"Invalid provider {0}.",[t.MISSING_CROSS_CHAIN_PROVIDER]:"Missing cross-chain provider.",[t.MISSING_AVAX_PROVIDER]:"Missing AVAX provider.",[t.MISSING_BSC_PROVIDER]:"Missing BSC provider.",[t.MISSING_ETH_PROVIDER]:"Missing ETH provider.",[t.MISSING_ARB_PROVIDER]:"Missing ARB provider.",[t.INVALID_PROVIDER_FOR_SWAP_OUT]:"Invalid provider for swap out.",[t.INVALID_CHAIN]:"Invalid chain {0}.",[t.INVALID_ASSET]:"Invalid asset {0}.",[t.UNSUPPORTED_CHAIN]:"Unsupported chain {0}.",[t.UNSUPPORTED_ASSET]:"Unsupported asset {0}.",[t.UNSUPPORTED_ASSET_FOR_SWAPOUT]:"Unsupported asset {0} for swap out.",[t.THORNODE_QUOTE_GENERIC_ERROR]:"ThorNode quote generic error.",[t.INVALID_SOURCE_ADDRESS]:"Invalid source address {0}",[t.INVALID_DESTINATION_ADDRESS]:"Invalid destination address {0}",[t.NOT_ENOUGH_SYNTH_BALANCE]:"Source address doesn't have enough synth balance for this quote.",[t.SYNTH_MINTING_CAP_REACHED]:"Synth minting cap reached.",[t.INVALID_QUOTE_MODE]:"Invalid quote mode.",[t.NO_QUOTES]:"No quotes to service this request.",[t.SERVICE_UNAVAILABLE_GENERIC]:"Service unavailable.",[t.MISSING_GAS_DATA_GENERIC]:"Missing gas data.",[t.MISSING_TOKEN_INFO_GENERIC]:"Missing token info.",[t.CANT_FIND_TOKEN_LIST]:"Can't find tokenlist {0}.",[t.NO_PRICE]:"No price for asset {0}.",[t.PRICE_IS_STALE]:"Price is stale for asset {0}.",[t.ADDRESS_NOT_WHITELISTED]:"Address {0} not whitelisted for airdrop.",[t.ADDRESS_ALREADY_CLAIMED]:"Address {0} already claimed the airdrop."},T=(e,n)=>{let a=W[e];for(let r=0;r<n.length;r++)a=a.replace(`{${r}}`,n[r]);return n.length===0?a.replace("{0}",""):a};class l extends Error{constructor({status:a,revision:r,module:V,code:y,message:B,type:b,options:{shouldLog:x,shouldThrow:v,shouldTrace:H}={shouldLog:!0,shouldThrow:!0,shouldTrace:!0},displayMessageParams:u}){const I=B||T(y,u||[])||"";super(I);s(this,"status");s(this,"revision");s(this,"type");s(this,"module");s(this,"code");s(this,"message");s(this,"display");s(this,"stack");s(this,"options");s(this,"displayMessageParams");this.status=a,this.revision=r||"NO_REVISION",this.module=V,this.message=I,this.display=T(y,u||[]),this.code=y,this.type=b||o.UNHANDLED_ERROR,this.options={shouldLog:x||!0,shouldTrace:H||!0,shouldThrow:v||!1},this.displayMessageParams=u||[],this.options.shouldTrace&&Error.captureStackTrace(this)}static fromErrorInfo(a){return new l(a)}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 a=`[${this.identifier}]: ${this.message}`;if(this.options.shouldLog&&console.error(a,`
2
- `,this.stack||""),this.options.shouldThrow)throw Error(a,{cause:this.stack});return this.toErrorInfo()}}var i=(e=>(e.Arbitrum="ARB",e.Avalanche="AVAX",e.Binance="BNB",e.BinanceSmartChain="BSC",e.Bitcoin="BTC",e.BitcoinCash="BCH",e.Cosmos="GAIA",e.Dogecoin="DOGE",e.Ethereum="ETH",e.Litecoin="LTC",e.Maya="MAYA",e.Optimism="OP",e.Polygon="MATIC",e.THORChain="THOR",e))(i||{}),N=(e=>(e.ARB="0x0000000000000000000000000000000000000000",e.AVAX="0x0000000000000000000000000000000000000000",e.ETH="0x0000000000000000000000000000000000000000",e.BSC="0x0000000000000000000000000000000000000000",e.MATIC="0x0000000000000000000000000000000000001010",e.OP="0x4200000000000000000000000000000000000042",e))(N||{}),E=(e=>(e[e.Ethereum=60]="Ethereum",e[e.Binance=714]="Binance",e[e.THORChain=931]="THORChain",e))(E||{}),c=(e=>(e.ARB="m/44'/60'/0'/0",e.AVAX="m/44'/60'/0'/0",e.BCH="m/44'/145'/0'/0",e.BNB="m/44'/714'/0'/0",e.BSC="m/44'/60'/0'/0",e.BTC="m/84'/0'/0'/0",e.DOGE="m/44'/3'/0'/0",e.ETH="m/44'/60'/0'/0",e.GAIA="m/44'/118'/0'/0",e.LTC="m/84'/2'/0'/0",e.MATIC="m/44'/60'/0'/0",e.MAYA="m/44'/931'/0'/0",e.OP="m/44'/60'/0'/0",e.THOR="m/44'/931'/0'/0",e))(c||{});const Y={ARB:[44,60,0,0,0],AVAX:[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],DOGE:[44,3,0,0,0],ETH:[44,60,0,0,0],GAIA:[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],THOR:[44,931,0,0,0]};var f=(e=>(e[e.ARB=18]="ARB",e[e.AVAX=18]="AVAX",e[e.BCH=8]="BCH",e[e.BNB=8]="BNB",e[e.BSC=18]="BSC",e[e.BTC=8]="BTC",e[e.DASH=8]="DASH",e[e.DOGE=8]="DOGE",e[e.ETH=18]="ETH",e[e.GAIA=6]="GAIA",e[e.KUJI=6]="KUJI",e[e.LTC=8]="LTC",e[e.MATIC=18]="MATIC",e[e.MAYA=10]="MAYA",e[e.OP=18]="OP",e[e.THOR=8]="THOR",e))(f||{});const K=["ETH","AVAX","BSC","ARB","OP","MATIC"],k=["BTC","BCH","DOGE","LTC"],$=["GAIA","THOR","BNB"];var p=(e=>(e.Arbitrum="42161",e.ArbitrumHex="0xa4b1",e.Avalanche="43114",e.AvalancheHex="0xa86a",e.Binance="Binance-Chain-Tigris",e.BinanceSmartChain="56",e.BinanceSmartChainHex="0x38",e.Bitcoin="bitcoin",e.BitcoinCash="bitcoincash",e.Cosmos="cosmoshub-4",e.Dogecoin="dogecoin",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.Polygon="137",e.PolygonHex="0x89",e.THORChain="thorchain-mainnet-v1",e.THORChainStagenet="thorchain-stagenet-v2",e))(p||{}),m=(e=>(e.Arbitrum="https://arb1.arbitrum.io/rpc",e.Avalanche="https://node-router.thorswap.net/avalanche-c",e.Binance="",e.BinanceSmartChain="https://bsc-dataseed.binance.org",e.Bitcoin="https://node-router.thorswap.net/bitcoin",e.BitcoinCash="https://node-router.thorswap.net/bitcoin-cash",e.Cosmos="https://node-router.thorswap.net/cosmos/rpc",e.Dogecoin="https://node-router.thorswap.net/dogecoin",e.Ethereum="https://node-router.thorswap.net/ethereum",e.Litecoin="https://node-router.thorswap.net/litecoin",e.Maya="https://tendermint.mayachain.info",e.MayaStagenet="https://stagenet.tendermint.mayachain.info",e.Optimism="https://mainnet.optimism.io",e.Polygon="https://polygon-rpc.com",e.THORChain="https://rpc.thorswap.net",e.THORChainStagenet="https://stagenet-rpc.ninerealms.com",e))(m||{}),C=(e=>(e.Cosmos="https://node-router.thorswap.net/cosmos/rest",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.finance",e.ThorswapStatic="https://static.thorswap.net",e))(C||{});const d=Object.values(i),q=Object.keys(i),A=d.reduce((e,n)=>{const a=q.find(r=>i[r]===n);return a&&(e[n]=a),e},{}),J=d.reduce((e,n)=>(e[n]=p[A[n]],e),{}),j=d.reduce((e,n)=>(e[n]=m[A[n]],e),{}),Z=d.reduce((e,n)=>{const a=`${A[n]}Hex`;return e[n]=p[a],e},{}),z={"0xa4b1":"ARB",42161:"ARB","0xa86a":"AVAX",43114:"AVAX","0x38":"BSC",56:"BSC","Binance-Chain-Tigris":"BNB",bitcoincash:"BCH",bitcoin:"BTC","cosmoshub-4":"GAIA",dogecoin:"DOGE","0x1":"ETH",1:"ETH",litecoin:"LTC","mayachain-stagenet-v1":"MAYA","mayachain-mainnet-v1":"MAYA","0xa":"OP",10:"OP","0x89":"MATIC",137:"MATIC","thorchain-stagenet-v2":"THOR","thorchain-mainnet-v1":"THOR"},Q={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",GAIA:"https://cosmos.bigdipper.live",DOGE:"https://blockchair.com/dogecoin",ETH:"https://etherscan.io",LTC:"https://ltc.bitaps.com",MAYA:"https://www.mayascan.org",OP:"https://optimistic.etherscan.io",MATIC:"https://polygonscan.com",THOR:"https://viewblock.io/thorchain"};var h=(e=>(e[e.NoError=36864]="NoError",e))(h||{}),O=(e=>(e.BOND="BOND",e.DEPOSIT="+",e.LEAVE="LEAVE",e.THORNAME_REGISTER="~",e.UNBOND="UNBOND",e.WITHDRAW="-",e.OPEN_LOAN="$+",e.CLOSE_LOAN="$-",e))(O||{}),P=(e=>(e.Average="average",e.Fast="fast",e.Fastest="fastest",e))(P||{}),g=(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))(g||{});exports.AGG_SWAP=w;exports.ApiError=l;exports.ApiUrl=C;exports.BaseDecimal=f;exports.Chain=i;exports.ChainId=p;exports.ChainIdToChain=z;exports.ChainToChainId=J;exports.ChainToExplorerUrl=Q;exports.ChainToHexChainId=Z;exports.ChainToRPC=j;exports.ContractAddress=N;exports.CosmosChainList=$;exports.DerivationPath=c;exports.ERROR_CODE=t;exports.ERROR_MODULE=_;exports.ERROR_TYPE=o;exports.EVMChainList=K;exports.ErrorCode=h;exports.FeeOption=P;exports.MemoType=O;exports.NetworkDerivationPath=Y;exports.NetworkId=E;exports.QuoteMode=S;exports.RPCUrl=m;exports.SWAP_IN=F;exports.SWAP_OUT=X;exports.TCAvalancheDepositABI=G;exports.TCBscDepositABI=U;exports.TCEthereumVaultAbi=M;exports.UTXOChainList=k;exports.WalletOption=g;exports.erc20ABI=R;
1
+ "use strict";var H=Object.defineProperty;var L=(e,n,a)=>n in e?H(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a;var s=(e,n,a)=>(L(e,typeof n!="symbol"?n+"":n,a),a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=[{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"}],R=[{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"}],M=[{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"}],G=[{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 S=(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))(S||{});const U=["ERC20-ERC20","ARC20-ARC20","BEP20-BEP20"],w=["ERC20-TC","ERC20-ARC20","ERC20-BEP20","ARC20-TC","ARC20-ERC20","ARC20-BEP20","BEP20-TC","BEP20-ERC20","BEP20-ARC20"],F=["TC-TC","TC-ERC20","TC-ARC20","TC-BEP20"];var T=(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))(T||{}),_=(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))(_||{}),t=(e=>(e.INVALID_INPUT_PARAMETERS="1000",e.UNKNOWN_PROVIDERS="1001",e.CANNOT_FIND_INBOUND_ADDRESS="1002",e.NO_INBOUND_ADDRESSES="1003",e.CHAIN_HALTED_OR_UNSUPPORTED="1004",e.MISSING_INPUT_PARAMETER="1005",e.INVALID_TYPE_GENERIC="1100",e.INVALID_NUMBER_STRING="1101",e.INVALID_NUMBER="1102",e.INVALID_BOOLEAN="1103",e.INVALID_OBJECT="1104",e.INVALID_ARRAY="1105",e.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER="2000",e.SELL_BUY_ASSETS_ARE_THE_SAME="2001",e.MISSING_SOURCE_ADDRESS_FOR_SYNTH="2002",e.AFF_ADDRESS_AND_BPS_OR_NEITHER="2003",e.AFF_ADDRESS_TOO_LONG="2004",e.AFF_BPS_INTEGER_0_100="2005",e.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN="2006",e.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN="2007",e.PREFERRED_PROFVIDER_NOT_SUPPORTED="2008",e.DESTINATION_ADDRESS_SMART_CONTRACT="2009",e.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER="2010",e.SOURCE_ADDRESS_SMART_CONTRACT="2011",e.INVALID_PROVIDER="2100",e.MISSING_CROSS_CHAIN_PROVIDER="2101",e.MISSING_AVAX_PROVIDER="2102",e.MISSING_BSC_PROVIDER="2103",e.MISSING_ETH_PROVIDER="2104",e.INVALID_PROVIDER_FOR_SWAP_OUT="2105",e.MISSING_ARB_PROVIDER="2106",e.INVALID_CHAIN="2200",e.INVALID_ASSET="2201",e.INVALID_ASSET_IDENTIFIER="2202",e.UNSUPPORTED_CHAIN="2204",e.UNSUPPORTED_ASSET="2203",e.UNSUPPORTED_ASSET_FOR_SWAPOUT="2205",e.INVALID_SOURCE_ADDRESS="2300",e.INVALID_DESTINATION_ADDRESS="2301",e.THORNODE_QUOTE_GENERIC_ERROR="3000",e.NOT_ENOUGH_SYNTH_BALANCE="3001",e.SYNTH_MINTING_CAP_REACHED="3002",e.INVALID_QUOTE_MODE="4000",e.NO_QUOTES="4001",e.SERVICE_UNAVAILABLE_GENERIC="5000",e.MISSING_GAS_DATA_GENERIC="5100",e.MISSING_TOKEN_INFO_GENERIC="5200",e.CANT_FIND_TOKEN_LIST="5201",e.NO_PRICE="5202",e.PRICE_IS_STALE="5203",e.ADDRESS_NOT_WHITELISTED="6000",e.ADDRESS_ALREADY_CLAIMED="6001",e.TEMPORARY_ERROR="9999",e))(t||{});const X={[t.INVALID_INPUT_PARAMETERS]:"Invalid input parameters: {0}.",[t.UNKNOWN_PROVIDERS]:"Unknown providers: {0}.",[t.CANNOT_FIND_INBOUND_ADDRESS]:"Cannot find inbound address.",[t.NO_INBOUND_ADDRESSES]:"No inbound addresses.",[t.CHAIN_HALTED_OR_UNSUPPORTED]:"Chain {0} halted or unsupported.",[t.MISSING_INPUT_PARAMETER]:"Missing input parameter: {0}.",[t.INVALID_TYPE_GENERIC]:"Invalid type",[t.INVALID_NUMBER_STRING]:"Invalid number string.",[t.INVALID_NUMBER]:"Invalid number.",[t.INVALID_BOOLEAN]:"Invalid boolean.",[t.INVALID_OBJECT]:"Invalid object.",[t.INVALID_ARRAY]:"Invalid array.",[t.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER]:"Sell amount must be a positive integer.",[t.SELL_BUY_ASSETS_ARE_THE_SAME]:"Sell and buy assets are the same.",[t.MISSING_SOURCE_ADDRESS_FOR_SYNTH]:"Source address is required for synth quote.",[t.AFF_ADDRESS_AND_BPS_OR_NEITHER]:"Must provide affiliateAddress and affiliateBasisPoints params, or neither.",[t.AFF_ADDRESS_TOO_LONG]:"affiliateAddress too long: 3 characters max.",[t.AFF_BPS_INTEGER_0_100]:"affiliateBasisPoints must be an integer between 0 and 100.",[t.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN]:"Source address {0} invalid for sell chain.",[t.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN]:"Destination address {0} invalid for buy chain.",[t.PREFERRED_PROFVIDER_NOT_SUPPORTED]:"Preferred provider not supported.",[t.DESTINATION_ADDRESS_SMART_CONTRACT]:"Destination address is a smart contract.",[t.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER]:"Buy amount must be a positive integer.",[t.INVALID_PROVIDER]:"Invalid provider {0}.",[t.MISSING_CROSS_CHAIN_PROVIDER]:"Missing cross-chain provider.",[t.MISSING_AVAX_PROVIDER]:"Missing AVAX provider.",[t.MISSING_BSC_PROVIDER]:"Missing BSC provider.",[t.MISSING_ETH_PROVIDER]:"Missing ETH provider.",[t.MISSING_ARB_PROVIDER]:"Missing ARB provider.",[t.INVALID_PROVIDER_FOR_SWAP_OUT]:"Invalid provider for swap out.",[t.INVALID_CHAIN]:"Invalid chain {0}.",[t.INVALID_ASSET]:"Invalid asset {0}.",[t.UNSUPPORTED_CHAIN]:"Unsupported chain {0}.",[t.UNSUPPORTED_ASSET]:"Unsupported asset {0}.",[t.UNSUPPORTED_ASSET_FOR_SWAPOUT]:"Unsupported asset {0} for swap out.",[t.THORNODE_QUOTE_GENERIC_ERROR]:"ThorNode quote generic error.",[t.INVALID_SOURCE_ADDRESS]:"Invalid source address {0}",[t.INVALID_DESTINATION_ADDRESS]:"Invalid destination address {0}",[t.NOT_ENOUGH_SYNTH_BALANCE]:"Source address doesn't have enough synth balance for this quote.",[t.SYNTH_MINTING_CAP_REACHED]:"Synth minting cap reached.",[t.INVALID_QUOTE_MODE]:"Invalid quote mode.",[t.NO_QUOTES]:"No quotes to service this request.",[t.SERVICE_UNAVAILABLE_GENERIC]:"Service unavailable.",[t.MISSING_GAS_DATA_GENERIC]:"Missing gas data.",[t.MISSING_TOKEN_INFO_GENERIC]:"Missing token info.",[t.CANT_FIND_TOKEN_LIST]:"Can't find tokenlist {0}.",[t.NO_PRICE]:"No price for asset {0}.",[t.PRICE_IS_STALE]:"Price is stale for asset {0}.",[t.ADDRESS_NOT_WHITELISTED]:"Address {0} not whitelisted for airdrop.",[t.ADDRESS_ALREADY_CLAIMED]:"Address {0} already claimed the airdrop."},o=(e,n)=>{let a=X[e];for(let r=0;r<n.length;r++)a=a.replace(`{${r}}`,n[r]);return n.length===0?a.replace("{0}",""):a};class l extends Error{constructor({status:a,revision:r,module:P,code:y,message:V,type:B,options:{shouldLog:b,shouldThrow:x,shouldTrace:v}={shouldLog:!0,shouldThrow:!0,shouldTrace:!0},displayMessageParams:u}){const I=V||o(y,u||[])||"";super(I);s(this,"status");s(this,"revision");s(this,"type");s(this,"module");s(this,"code");s(this,"message");s(this,"display");s(this,"stack");s(this,"options");s(this,"displayMessageParams");this.status=a,this.revision=r||"NO_REVISION",this.module=P,this.message=I,this.display=o(y,u||[]),this.code=y,this.type=B||T.UNHANDLED_ERROR,this.options={shouldLog:b||!0,shouldTrace:v||!0,shouldThrow:x||!1},this.displayMessageParams=u||[],this.options.shouldTrace&&Error.captureStackTrace(this)}static fromErrorInfo(a){return new l(a)}toErrorInfo(){return{...this,identifier:this.identifier}}get identifier(){return`${this.revision}-${this.type||"NO_TYPE"}-${this.module}-${this.code}`}get displayMessage(){return o(this.code,this.displayMessageParams||[])}handle(){const a=`[${this.identifier}]: ${this.message}`;if(this.options.shouldLog&&console.error(a,`
2
+ `,this.stack||""),this.options.shouldThrow)throw Error(a,{cause:this.stack});return this.toErrorInfo()}}var i=(e=>(e.Arbitrum="ARB",e.Avalanche="AVAX",e.Binance="BNB",e.BinanceSmartChain="BSC",e.Bitcoin="BTC",e.BitcoinCash="BCH",e.Cosmos="GAIA",e.Dogecoin="DOGE",e.Ethereum="ETH",e.Kujira="KUJI",e.Litecoin="LTC",e.Maya="MAYA",e.Optimism="OP",e.Polygon="MATIC",e.THORChain="THOR",e))(i||{}),N=(e=>(e.ARB="0x0000000000000000000000000000000000000000",e.AVAX="0x0000000000000000000000000000000000000000",e.ETH="0x0000000000000000000000000000000000000000",e.BSC="0x0000000000000000000000000000000000000000",e.MATIC="0x0000000000000000000000000000000000001010",e.OP="0x4200000000000000000000000000000000000042",e))(N||{}),E=(e=>(e.ARB="m/44'/60'/0'/0",e.AVAX="m/44'/60'/0'/0",e.BCH="m/44'/145'/0'/0",e.BNB="m/44'/714'/0'/0",e.BSC="m/44'/60'/0'/0",e.BTC="m/84'/0'/0'/0",e.DOGE="m/44'/3'/0'/0",e.ETH="m/44'/60'/0'/0",e.GAIA="m/44'/118'/0'/0",e.KUJI="m/44'/118'/0'/0",e.LTC="m/84'/2'/0'/0",e.MATIC="m/44'/60'/0'/0",e.MAYA="m/44'/931'/0'/0",e.OP="m/44'/60'/0'/0",e.THOR="m/44'/931'/0'/0",e))(E||{});const K={ARB:[44,60,0,0,0],AVAX:[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],DOGE:[44,3,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],THOR:[44,931,0,0,0]};var c=(e=>(e[e.ARB=18]="ARB",e[e.AVAX=18]="AVAX",e[e.BCH=8]="BCH",e[e.BNB=8]="BNB",e[e.BSC=18]="BSC",e[e.BTC=8]="BTC",e[e.DASH=8]="DASH",e[e.DOGE=8]="DOGE",e[e.ETH=18]="ETH",e[e.GAIA=6]="GAIA",e[e.KUJI=6]="KUJI",e[e.LTC=8]="LTC",e[e.MATIC=18]="MATIC",e[e.MAYA=10]="MAYA",e[e.OP=18]="OP",e[e.THOR=8]="THOR",e))(c||{});const k=["ETH","AVAX","BSC","ARB","OP","MATIC"],W=["BTC","BCH","DOGE","LTC"],Y=["GAIA","THOR","BNB"];var d=(e=>(e.Arbitrum="42161",e.ArbitrumHex="0xa4b1",e.Avalanche="43114",e.AvalancheHex="0xa86a",e.Binance="Binance-Chain-Tigris",e.BinanceSmartChain="56",e.BinanceSmartChainHex="0x38",e.Bitcoin="bitcoin",e.BitcoinCash="bitcoincash",e.Cosmos="cosmoshub-4",e.Dogecoin="dogecoin",e.Kujira="kaiyo-1",e.Ethereum="1",e.EthereumHex="0x1",e.Litecoin="litecoin",e.Maya="mayachain-mainnet-v1",e.MayaStagenet="mayachain-stagenet-v1",e.Optimism="10",e.OptimismHex="0xa",e.Polygon="137",e.PolygonHex="0x89",e.THORChain="thorchain-mainnet-v1",e.THORChainStagenet="thorchain-stagenet-v2",e))(d||{}),m=(e=>(e.Arbitrum="https://arb1.arbitrum.io/rpc",e.Avalanche="https://node-router.thorswap.net/avalanche-c",e.Binance="",e.BinanceSmartChain="https://bsc-dataseed.binance.org",e.Bitcoin="https://node-router.thorswap.net/bitcoin",e.BitcoinCash="https://node-router.thorswap.net/bitcoin-cash",e.Cosmos="https://node-router.thorswap.net/cosmos/rpc",e.Kujira="https://rpc-kujira.synergynodes.com/",e.Dogecoin="https://node-router.thorswap.net/dogecoin",e.Ethereum="https://node-router.thorswap.net/ethereum",e.Litecoin="https://node-router.thorswap.net/litecoin",e.Maya="https://tendermint.mayachain.info",e.MayaStagenet="https://stagenet.tendermint.mayachain.info",e.Optimism="https://mainnet.optimism.io",e.Polygon="https://polygon-rpc.com",e.THORChain="https://rpc.thorswap.net",e.THORChainStagenet="https://stagenet-rpc.ninerealms.com",e))(m||{}),f=(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.finance",e.ThorswapStatic="https://static.thorswap.net",e))(f||{});const p=Object.values(i),j=Object.keys(i),A=p.reduce((e,n)=>{const a=j.find(r=>i[r]===n);return a&&(e[n]=a),e},{}),J=p.reduce((e,n)=>(e[n]=d[A[n]],e),{}),$=p.reduce((e,n)=>(e[n]=m[A[n]],e),{}),q=p.reduce((e,n)=>{const a=`${A[n]}Hex`;return e[n]=d[a],e},{}),Z={"0xa4b1":"ARB",42161:"ARB","0xa86a":"AVAX",43114:"AVAX","0x38":"BSC",56:"BSC","Binance-Chain-Tigris":"BNB",bitcoincash:"BCH",bitcoin:"BTC","cosmoshub-4":"GAIA",dogecoin:"DOGE","0x1":"ETH","kaiyo-1":"KUJI",1:"ETH",litecoin:"LTC","mayachain-stagenet-v1":"MAYA","mayachain-mainnet-v1":"MAYA","0xa":"OP",10:"OP","0x89":"MATIC",137:"MATIC","thorchain-stagenet-v2":"THOR","thorchain-mainnet-v1":"THOR"},z={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",GAIA:"https://cosmos.bigdipper.live",DOGE:"https://blockchair.com/dogecoin",KUJI:"https://finder.kujira.network/kaiyo-1",ETH:"https://etherscan.io",LTC:"https://ltc.bitaps.com",MAYA:"https://www.mayascan.org",OP:"https://optimistic.etherscan.io",MATIC:"https://polygonscan.com",THOR:"https://viewblock.io/thorchain"};var C=(e=>(e[e.NoError=36864]="NoError",e))(C||{}),h=(e=>(e.BOND="BOND",e.DEPOSIT="+",e.LEAVE="LEAVE",e.THORNAME_REGISTER="~",e.UNBOND="UNBOND",e.WITHDRAW="-",e.OPEN_LOAN="$+",e.CLOSE_LOAN="$-",e))(h||{}),g=(e=>(e.Average="average",e.Fast="fast",e.Fastest="fastest",e))(g||{}),O=(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))(O||{});exports.AGG_SWAP=U;exports.ApiError=l;exports.ApiUrl=f;exports.BaseDecimal=c;exports.Chain=i;exports.ChainId=d;exports.ChainIdToChain=Z;exports.ChainToChainId=J;exports.ChainToExplorerUrl=z;exports.ChainToHexChainId=q;exports.ChainToRPC=$;exports.ContractAddress=N;exports.CosmosChainList=Y;exports.DerivationPath=E;exports.ERROR_CODE=t;exports.ERROR_MODULE=_;exports.ERROR_TYPE=T;exports.EVMChainList=k;exports.ErrorCode=C;exports.FeeOption=g;exports.MemoType=h;exports.NetworkDerivationPath=K;exports.QuoteMode=S;exports.RPCUrl=m;exports.SWAP_IN=w;exports.SWAP_OUT=F;exports.TCAvalancheDepositABI=M;exports.TCBscDepositABI=G;exports.TCEthereumVaultAbi=R;exports.UTXOChainList=W;exports.WalletOption=O;exports.erc20ABI=D;
package/dist/index.d.ts CHANGED
@@ -45,6 +45,7 @@ declare type ApisType = {
45
45
 
46
46
  export declare enum ApiUrl {
47
47
  Cosmos = "https://node-router.thorswap.net/cosmos/rest",
48
+ Kujira = "https://lcd-kujira.synergynodes.com/",
48
49
  MayanodeMainnet = "https://mayanode.mayachain.info",
49
50
  MayanodeStagenet = "https://stagenet.mayanode.mayachain.info",
50
51
  ThornodeMainnet = "https://thornode.thorswap.net",
@@ -89,6 +90,7 @@ export declare enum Chain {
89
90
  Cosmos = "GAIA",
90
91
  Dogecoin = "DOGE",
91
92
  Ethereum = "ETH",
93
+ Kujira = "KUJI",
92
94
  Litecoin = "LTC",
93
95
  Maya = "MAYA",
94
96
  Optimism = "OP",
@@ -108,6 +110,7 @@ export declare enum ChainId {
108
110
  BitcoinCash = "bitcoincash",
109
111
  Cosmos = "cosmoshub-4",
110
112
  Dogecoin = "dogecoin",
113
+ Kujira = "kaiyo-1",
111
114
  Ethereum = "1",
112
115
  EthereumHex = "0x1",
113
116
  Litecoin = "litecoin",
@@ -133,6 +136,7 @@ export declare const ChainToChainId: {
133
136
  GAIA: ChainId;
134
137
  DOGE: ChainId;
135
138
  ETH: ChainId;
139
+ KUJI: ChainId;
136
140
  LTC: ChainId;
137
141
  MAYA: ChainId;
138
142
  OP: ChainId;
@@ -152,6 +156,7 @@ export declare const ChainToHexChainId: {
152
156
  GAIA: ChainId;
153
157
  DOGE: ChainId;
154
158
  ETH: ChainId;
159
+ KUJI: ChainId;
155
160
  LTC: ChainId;
156
161
  MAYA: ChainId;
157
162
  OP: ChainId;
@@ -169,6 +174,7 @@ export declare const ChainToRPC: {
169
174
  GAIA: RPCUrl;
170
175
  DOGE: RPCUrl;
171
176
  ETH: RPCUrl;
177
+ KUJI: RPCUrl;
172
178
  LTC: RPCUrl;
173
179
  MAYA: RPCUrl;
174
180
  OP: RPCUrl;
@@ -209,7 +215,7 @@ export declare type ConnectConfig = {
209
215
  };
210
216
  };
211
217
 
212
- declare type ConnectMethodNames = 'connectEVMWallet' | 'connectKeplr' | 'connectKeystore' | 'connectKeepkey' | 'connectLedger' | 'connectOkx' | 'connectTrezor' | 'connectWalletconnect' | 'connectXDEFI';
218
+ declare type ConnectMethodNames = 'connectEVMWallet' | 'connectKeplr' | 'connectKeystore' | 'connectKeepkey' | 'connectMetaMask' | 'connectLedger' | 'connectOkx' | 'connectTrezor' | 'connectWalletconnect' | 'connectXDEFI';
213
219
 
214
220
  export declare type ConnectWalletParams = {
215
221
  addChain: (params: AddChainWalletParams) => void;
@@ -229,7 +235,7 @@ export declare enum ContractAddress {
229
235
  OP = "0x4200000000000000000000000000000000000042"
230
236
  }
231
237
 
232
- export declare type CosmosChain = Chain.Cosmos | Chain.THORChain | Chain.Binance;
238
+ export declare type CosmosChain = Chain.Cosmos | Chain.THORChain | Chain.Binance | Chain.Maya | Chain.Kujira;
233
239
 
234
240
  export declare const CosmosChainList: CosmosChain[];
235
241
 
@@ -243,6 +249,7 @@ export declare enum DerivationPath {
243
249
  DOGE = "m/44'/3'/0'/0",
244
250
  ETH = "m/44'/60'/0'/0",
245
251
  GAIA = "m/44'/118'/0'/0",
252
+ KUJI = "m/44'/118'/0'/0",
246
253
  LTC = "m/84'/2'/0'/0",
247
254
  MATIC = "m/44'/60'/0'/0",
248
255
  MAYA = "m/44'/931'/0'/0",
@@ -468,12 +475,6 @@ export declare enum MemoType {
468
475
 
469
476
  export declare const NetworkDerivationPath: Record<Chain, DerivationPathArray>;
470
477
 
471
- export declare enum NetworkId {
472
- Ethereum = 60,
473
- Binance = 714,
474
- THORChain = 931
475
- }
476
-
477
478
  export declare enum QuoteMode {
478
479
  TC_SUPPORTED_TO_TC_SUPPORTED = "TC-TC",
479
480
  TC_SUPPORTED_TO_ETH = "TC-ERC20",
@@ -501,6 +502,7 @@ export declare enum RPCUrl {
501
502
  Bitcoin = "https://node-router.thorswap.net/bitcoin",
502
503
  BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash",
503
504
  Cosmos = "https://node-router.thorswap.net/cosmos/rpc",
505
+ Kujira = "https://rpc-kujira.synergynodes.com/",
504
506
  Dogecoin = "https://node-router.thorswap.net/dogecoin",
505
507
  Ethereum = "https://node-router.thorswap.net/ethereum",
506
508
  Litecoin = "https://node-router.thorswap.net/litecoin",
package/dist/index.es.js CHANGED
@@ -1,7 +1,7 @@
1
- var h = Object.defineProperty;
2
- var C = (e, n, a) => n in e ? h(e, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[n] = a;
3
- var s = (e, n, a) => (C(e, typeof n != "symbol" ? n + "" : n, a), a);
4
- const U = [
1
+ var g = Object.defineProperty;
2
+ var h = (e, n, a) => n in e ? g(e, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[n] = a;
3
+ var s = (e, n, a) => (h(e, typeof n != "symbol" ? n + "" : n, a), a);
4
+ const G = [
5
5
  { inputs: [], stateMutability: "nonpayable", type: "constructor" },
6
6
  {
7
7
  anonymous: !1,
@@ -99,7 +99,7 @@ const U = [
99
99
  stateMutability: "nonpayable",
100
100
  type: "function"
101
101
  }
102
- ], w = [
102
+ ], U = [
103
103
  {
104
104
  inputs: [{ internalType: "address", name: "rune", type: "address" }],
105
105
  stateMutability: "nonpayable",
@@ -274,7 +274,7 @@ const U = [
274
274
  stateMutability: "view",
275
275
  type: "function"
276
276
  }
277
- ], F = [
277
+ ], w = [
278
278
  { inputs: [], stateMutability: "nonpayable", type: "constructor" },
279
279
  {
280
280
  anonymous: !1,
@@ -438,7 +438,7 @@ const U = [
438
438
  stateMutability: "view",
439
439
  type: "function"
440
440
  }
441
- ], X = [
441
+ ], F = [
442
442
  { inputs: [], stateMutability: "nonpayable", type: "constructor" },
443
443
  {
444
444
  anonymous: !1,
@@ -591,13 +591,13 @@ const U = [
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))(g || {});
594
+ var C = /* @__PURE__ */ ((e) => (e.TC_SUPPORTED_TO_TC_SUPPORTED = "TC-TC", e.TC_SUPPORTED_TO_ETH = "TC-ERC20", e.TC_SUPPORTED_TO_AVAX = "TC-ARC20", e.TC_SUPPORTED_TO_BSC = "TC-BEP20", e.ETH_TO_TC_SUPPORTED = "ERC20-TC", e.ETH_TO_ETH = "ERC20-ERC20", e.ETH_TO_AVAX = "ERC20-ARC20", e.ETH_TO_BSC = "ERC20-BEP20", e.AVAX_TO_TC_SUPPORTED = "ARC20-TC", e.AVAX_TO_ETH = "ARC20-ERC20", e.AVAX_TO_AVAX = "ARC20-ARC20", e.AVAX_TO_BSC = "ARC20-BEP20", e.BSC_TO_TC_SUPPORTED = "BEP20-TC", e.BSC_TO_ETH = "BEP20-ERC20", e.BSC_TO_AVAX = "BEP20-ARC20", e.BSC_TO_BSC = "BEP20-BEP20", e))(C || {});
595
595
  const K = [
596
596
  "ERC20-ERC20",
597
597
  "ARC20-ARC20",
598
598
  "BEP20-BEP20"
599
599
  /* BSC_TO_BSC */
600
- ], Y = [
600
+ ], X = [
601
601
  "ERC20-TC",
602
602
  "ERC20-ARC20",
603
603
  "ERC20-BEP20",
@@ -608,15 +608,15 @@ const K = [
608
608
  "BEP20-ERC20",
609
609
  "BEP20-ARC20"
610
610
  /* BSC_TO_AVAX */
611
- ], W = [
611
+ ], k = [
612
612
  "TC-TC",
613
613
  "TC-ERC20",
614
614
  "TC-ARC20",
615
615
  "TC-BEP20"
616
616
  /* TC_SUPPORTED_TO_BSC */
617
617
  ];
618
- var m = /* @__PURE__ */ ((e) => (e.VALIDATION_ERROR = "VALIDATION_ERROR", e.REQUEST_PARAMETER_ERROR = "REQUEST_PARAMETER_ERROR", e.RESPONSE_PARSING_ERROR = "RESPONSE_PARSING_ERROR", e.UNSUPPORTED = "UNSUPPORTED", e.NOT_IMPLEMENTED = "NOT_IMPLEMENTED", e.INCOMPATIBLE_ASSETS_OPERATIONS = "INCOMPATIBLE_ASSETS_OPERATIONS", e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e.DOWN_FOR_MAINTENANCE = "DOWN_FOR_MAINTENANCE", e.MISSING_INBOUND_INFO = "MISSING_INBOUND_INFO", e.QUOTE_FETCHING_ERROR = "QUOTE_FETCHING_ERROR", e.AIRDROP_ERROR = "AIRDROP_ERROR", e.UNHANDLED_ERROR = "UNHANDLED_ERROR", e))(m || {}), O = /* @__PURE__ */ ((e) => (e.HEALTH_CONTROLLER = "1000", e.LIQUIDITY_CONTROLLER = "1001", e.PROVIDER_CONTROLLER = "1002", e.QUOTE_CONTROLLER = "1003", e.SWAP_CONTROLLER = "1004", e.UTIL_CONTROLLER = "1005", e.AIRDROP_CONTROLLER = "1006", e.PROVIDER = "2000", e.ASSET = "2001", e.TOKEN_LIST = "2002", e.QUOTE = "2100", e.QUOTE_TXN_DETAILS = "2101", e.THORCHAIN_PROVIDER = "3000", e.UNISWAPV2_ETH_PROVIDER = "3001", e.UNISWAPV3_ETH_PROVIDER = "3002", e.SUSHISWAP_ETH_PROVIDER = "3003", e.PANCAKESWAP_BSC_PROVIDER = "3004", e.PANCAKESWAP_ETH_PROVIDER = "3005", e.ONEINCH_ETH_PROVIDER = "3006", e.ONEINCH_BSC_PROVIDER = "3007", e.ONEINCH_AVAX_PROVIDER = "3008", e.ZEROX_ETH_PROVIDER = "3009", e.WOOFI_AVAX_PROVIDER = "3010", e.PANGOLIN_AVAX_PROVIDER = "3011", e.TRADERJOE_AVAX_PROVIDER = "3012", e.KYBER_ETH_PROVIDER = "3013", e.KYBER_AVAX_PROVIDER = "3014", e.WOOFI_BSC_PROVIDER = "3015", e.STARGATE_PROVIDER = "3016", e.PROVIDER_UTIL = "4000", e.TXN_DETAILS = "5000", e.AIRDROP_UTIL = "6000", e))(O || {}), t = /* @__PURE__ */ ((e) => (e.INVALID_INPUT_PARAMETERS = "1000", e.UNKNOWN_PROVIDERS = "1001", e.CANNOT_FIND_INBOUND_ADDRESS = "1002", e.NO_INBOUND_ADDRESSES = "1003", e.CHAIN_HALTED_OR_UNSUPPORTED = "1004", e.MISSING_INPUT_PARAMETER = "1005", e.INVALID_TYPE_GENERIC = "1100", e.INVALID_NUMBER_STRING = "1101", e.INVALID_NUMBER = "1102", e.INVALID_BOOLEAN = "1103", e.INVALID_OBJECT = "1104", e.INVALID_ARRAY = "1105", e.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2000", e.SELL_BUY_ASSETS_ARE_THE_SAME = "2001", e.MISSING_SOURCE_ADDRESS_FOR_SYNTH = "2002", e.AFF_ADDRESS_AND_BPS_OR_NEITHER = "2003", e.AFF_ADDRESS_TOO_LONG = "2004", e.AFF_BPS_INTEGER_0_100 = "2005", e.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN = "2006", e.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN = "2007", e.PREFERRED_PROFVIDER_NOT_SUPPORTED = "2008", e.DESTINATION_ADDRESS_SMART_CONTRACT = "2009", e.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2010", e.SOURCE_ADDRESS_SMART_CONTRACT = "2011", e.INVALID_PROVIDER = "2100", e.MISSING_CROSS_CHAIN_PROVIDER = "2101", e.MISSING_AVAX_PROVIDER = "2102", e.MISSING_BSC_PROVIDER = "2103", e.MISSING_ETH_PROVIDER = "2104", e.INVALID_PROVIDER_FOR_SWAP_OUT = "2105", e.MISSING_ARB_PROVIDER = "2106", e.INVALID_CHAIN = "2200", e.INVALID_ASSET = "2201", e.INVALID_ASSET_IDENTIFIER = "2202", e.UNSUPPORTED_CHAIN = "2204", e.UNSUPPORTED_ASSET = "2203", e.UNSUPPORTED_ASSET_FOR_SWAPOUT = "2205", e.INVALID_SOURCE_ADDRESS = "2300", e.INVALID_DESTINATION_ADDRESS = "2301", e.THORNODE_QUOTE_GENERIC_ERROR = "3000", e.NOT_ENOUGH_SYNTH_BALANCE = "3001", e.SYNTH_MINTING_CAP_REACHED = "3002", e.INVALID_QUOTE_MODE = "4000", e.NO_QUOTES = "4001", e.SERVICE_UNAVAILABLE_GENERIC = "5000", e.MISSING_GAS_DATA_GENERIC = "5100", e.MISSING_TOKEN_INFO_GENERIC = "5200", e.CANT_FIND_TOKEN_LIST = "5201", e.NO_PRICE = "5202", e.PRICE_IS_STALE = "5203", e.ADDRESS_NOT_WHITELISTED = "6000", e.ADDRESS_ALREADY_CLAIMED = "6001", e.TEMPORARY_ERROR = "9999", e))(t || {});
619
- const P = {
618
+ var m = /* @__PURE__ */ ((e) => (e.VALIDATION_ERROR = "VALIDATION_ERROR", e.REQUEST_PARAMETER_ERROR = "REQUEST_PARAMETER_ERROR", e.RESPONSE_PARSING_ERROR = "RESPONSE_PARSING_ERROR", e.UNSUPPORTED = "UNSUPPORTED", e.NOT_IMPLEMENTED = "NOT_IMPLEMENTED", e.INCOMPATIBLE_ASSETS_OPERATIONS = "INCOMPATIBLE_ASSETS_OPERATIONS", e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e.DOWN_FOR_MAINTENANCE = "DOWN_FOR_MAINTENANCE", e.MISSING_INBOUND_INFO = "MISSING_INBOUND_INFO", e.QUOTE_FETCHING_ERROR = "QUOTE_FETCHING_ERROR", e.AIRDROP_ERROR = "AIRDROP_ERROR", e.UNHANDLED_ERROR = "UNHANDLED_ERROR", e))(m || {}), V = /* @__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))(V || {}), t = /* @__PURE__ */ ((e) => (e.INVALID_INPUT_PARAMETERS = "1000", e.UNKNOWN_PROVIDERS = "1001", e.CANNOT_FIND_INBOUND_ADDRESS = "1002", e.NO_INBOUND_ADDRESSES = "1003", e.CHAIN_HALTED_OR_UNSUPPORTED = "1004", e.MISSING_INPUT_PARAMETER = "1005", e.INVALID_TYPE_GENERIC = "1100", e.INVALID_NUMBER_STRING = "1101", e.INVALID_NUMBER = "1102", e.INVALID_BOOLEAN = "1103", e.INVALID_OBJECT = "1104", e.INVALID_ARRAY = "1105", e.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2000", e.SELL_BUY_ASSETS_ARE_THE_SAME = "2001", e.MISSING_SOURCE_ADDRESS_FOR_SYNTH = "2002", e.AFF_ADDRESS_AND_BPS_OR_NEITHER = "2003", e.AFF_ADDRESS_TOO_LONG = "2004", e.AFF_BPS_INTEGER_0_100 = "2005", e.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN = "2006", e.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN = "2007", e.PREFERRED_PROFVIDER_NOT_SUPPORTED = "2008", e.DESTINATION_ADDRESS_SMART_CONTRACT = "2009", e.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2010", e.SOURCE_ADDRESS_SMART_CONTRACT = "2011", e.INVALID_PROVIDER = "2100", e.MISSING_CROSS_CHAIN_PROVIDER = "2101", e.MISSING_AVAX_PROVIDER = "2102", e.MISSING_BSC_PROVIDER = "2103", e.MISSING_ETH_PROVIDER = "2104", e.INVALID_PROVIDER_FOR_SWAP_OUT = "2105", e.MISSING_ARB_PROVIDER = "2106", e.INVALID_CHAIN = "2200", e.INVALID_ASSET = "2201", e.INVALID_ASSET_IDENTIFIER = "2202", e.UNSUPPORTED_CHAIN = "2204", e.UNSUPPORTED_ASSET = "2203", e.UNSUPPORTED_ASSET_FOR_SWAPOUT = "2205", e.INVALID_SOURCE_ADDRESS = "2300", e.INVALID_DESTINATION_ADDRESS = "2301", e.THORNODE_QUOTE_GENERIC_ERROR = "3000", e.NOT_ENOUGH_SYNTH_BALANCE = "3001", e.SYNTH_MINTING_CAP_REACHED = "3002", e.INVALID_QUOTE_MODE = "4000", e.NO_QUOTES = "4001", e.SERVICE_UNAVAILABLE_GENERIC = "5000", e.MISSING_GAS_DATA_GENERIC = "5100", e.MISSING_TOKEN_INFO_GENERIC = "5200", e.CANT_FIND_TOKEN_LIST = "5201", e.NO_PRICE = "5202", e.PRICE_IS_STALE = "5203", e.ADDRESS_NOT_WHITELISTED = "6000", e.ADDRESS_ALREADY_CLAIMED = "6001", e.TEMPORARY_ERROR = "9999", e))(t || {});
619
+ const O = {
620
620
  [t.INVALID_INPUT_PARAMETERS]: "Invalid input parameters: {0}.",
621
621
  [t.UNKNOWN_PROVIDERS]: "Unknown providers: {0}.",
622
622
  [t.CANNOT_FIND_INBOUND_ADDRESS]: "Cannot find inbound address.",
@@ -668,7 +668,7 @@ const P = {
668
668
  [t.ADDRESS_NOT_WHITELISTED]: "Address {0} not whitelisted for airdrop.",
669
669
  [t.ADDRESS_ALREADY_CLAIMED]: "Address {0} already claimed the airdrop."
670
670
  }, u = (e, n) => {
671
- let a = P[e];
671
+ let a = O[e];
672
672
  for (let r = 0; r < n.length; r++)
673
673
  a = a.replace(`{${r}}`, n[r]);
674
674
  return n.length === 0 ? a.replace("{0}", "") : a;
@@ -726,8 +726,8 @@ class A extends Error {
726
726
  return this.toErrorInfo();
727
727
  }
728
728
  }
729
- var i = /* @__PURE__ */ ((e) => (e.Arbitrum = "ARB", e.Avalanche = "AVAX", e.Binance = "BNB", e.BinanceSmartChain = "BSC", e.Bitcoin = "BTC", e.BitcoinCash = "BCH", e.Cosmos = "GAIA", e.Dogecoin = "DOGE", e.Ethereum = "ETH", e.Litecoin = "LTC", e.Maya = "MAYA", e.Optimism = "OP", e.Polygon = "MATIC", e.THORChain = "THOR", e))(i || {}), V = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(V || {}), B = /* @__PURE__ */ ((e) => (e[e.Ethereum = 60] = "Ethereum", e[e.Binance = 714] = "Binance", e[e.THORChain = 931] = "THORChain", e))(B || {}), b = /* @__PURE__ */ ((e) => (e.ARB = "m/44'/60'/0'/0", e.AVAX = "m/44'/60'/0'/0", e.BCH = "m/44'/145'/0'/0", e.BNB = "m/44'/714'/0'/0", e.BSC = "m/44'/60'/0'/0", e.BTC = "m/84'/0'/0'/0", e.DOGE = "m/44'/3'/0'/0", e.ETH = "m/44'/60'/0'/0", e.GAIA = "m/44'/118'/0'/0", e.LTC = "m/84'/2'/0'/0", e.MATIC = "m/44'/60'/0'/0", e.MAYA = "m/44'/931'/0'/0", e.OP = "m/44'/60'/0'/0", e.THOR = "m/44'/931'/0'/0", e))(b || {});
730
- const k = {
729
+ var i = /* @__PURE__ */ ((e) => (e.Arbitrum = "ARB", e.Avalanche = "AVAX", e.Binance = "BNB", e.BinanceSmartChain = "BSC", e.Bitcoin = "BTC", e.BitcoinCash = "BCH", e.Cosmos = "GAIA", e.Dogecoin = "DOGE", e.Ethereum = "ETH", e.Kujira = "KUJI", e.Litecoin = "LTC", e.Maya = "MAYA", e.Optimism = "OP", e.Polygon = "MATIC", e.THORChain = "THOR", e))(i || {}), P = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(P || {}), B = /* @__PURE__ */ ((e) => (e.ARB = "m/44'/60'/0'/0", e.AVAX = "m/44'/60'/0'/0", e.BCH = "m/44'/145'/0'/0", e.BNB = "m/44'/714'/0'/0", e.BSC = "m/44'/60'/0'/0", e.BTC = "m/84'/0'/0'/0", e.DOGE = "m/44'/3'/0'/0", e.ETH = "m/44'/60'/0'/0", e.GAIA = "m/44'/118'/0'/0", e.KUJI = "m/44'/118'/0'/0", e.LTC = "m/84'/2'/0'/0", e.MATIC = "m/44'/60'/0'/0", e.MAYA = "m/44'/931'/0'/0", e.OP = "m/44'/60'/0'/0", e.THOR = "m/44'/931'/0'/0", e))(B || {});
730
+ const Y = {
731
731
  ARB: [44, 60, 0, 0, 0],
732
732
  AVAX: [44, 60, 0, 0, 0],
733
733
  BCH: [44, 145, 0, 0, 0],
@@ -737,14 +737,15 @@ const k = {
737
737
  DOGE: [44, 3, 0, 0, 0],
738
738
  ETH: [44, 60, 0, 0, 0],
739
739
  GAIA: [44, 118, 0, 0, 0],
740
+ KUJI: [44, 118, 0, 0, 0],
740
741
  LTC: [84, 2, 0, 0, 0],
741
742
  MATIC: [44, 60, 0, 0, 0],
742
743
  MAYA: [44, 931, 0, 0, 0],
743
744
  OP: [44, 60, 0, 0, 0],
744
745
  THOR: [44, 931, 0, 0, 0]
745
746
  };
746
- var x = /* @__PURE__ */ ((e) => (e[e.ARB = 18] = "ARB", e[e.AVAX = 18] = "AVAX", e[e.BCH = 8] = "BCH", e[e.BNB = 8] = "BNB", e[e.BSC = 18] = "BSC", e[e.BTC = 8] = "BTC", e[e.DASH = 8] = "DASH", e[e.DOGE = 8] = "DOGE", e[e.ETH = 18] = "ETH", e[e.GAIA = 6] = "GAIA", e[e.KUJI = 6] = "KUJI", e[e.LTC = 8] = "LTC", e[e.MATIC = 18] = "MATIC", e[e.MAYA = 10] = "MAYA", e[e.OP = 18] = "OP", e[e.THOR = 8] = "THOR", e))(x || {});
747
- const $ = [
747
+ var b = /* @__PURE__ */ ((e) => (e[e.ARB = 18] = "ARB", e[e.AVAX = 18] = "AVAX", e[e.BCH = 8] = "BCH", e[e.BNB = 8] = "BNB", e[e.BSC = 18] = "BSC", e[e.BTC = 8] = "BTC", e[e.DASH = 8] = "DASH", e[e.DOGE = 8] = "DOGE", e[e.ETH = 18] = "ETH", e[e.GAIA = 6] = "GAIA", e[e.KUJI = 6] = "KUJI", e[e.LTC = 8] = "LTC", e[e.MATIC = 18] = "MATIC", e[e.MAYA = 10] = "MAYA", e[e.OP = 18] = "OP", e[e.THOR = 8] = "THOR", e))(b || {});
748
+ const W = [
748
749
  "ETH",
749
750
  "AVAX",
750
751
  "BSC",
@@ -752,7 +753,7 @@ const $ = [
752
753
  "OP",
753
754
  "MATIC"
754
755
  /* Polygon */
755
- ], q = [
756
+ ], j = [
756
757
  "BTC",
757
758
  "BCH",
758
759
  "DOGE",
@@ -764,26 +765,26 @@ const $ = [
764
765
  "BNB"
765
766
  /* Binance */
766
767
  ];
767
- var T = /* @__PURE__ */ ((e) => (e.Arbitrum = "42161", e.ArbitrumHex = "0xa4b1", e.Avalanche = "43114", e.AvalancheHex = "0xa86a", e.Binance = "Binance-Chain-Tigris", e.BinanceSmartChain = "56", e.BinanceSmartChainHex = "0x38", e.Bitcoin = "bitcoin", e.BitcoinCash = "bitcoincash", e.Cosmos = "cosmoshub-4", e.Dogecoin = "dogecoin", 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.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainStagenet = "thorchain-stagenet-v2", e))(T || {}), I = /* @__PURE__ */ ((e) => (e.Arbitrum = "https://arb1.arbitrum.io/rpc", e.Avalanche = "https://node-router.thorswap.net/avalanche-c", e.Binance = "", e.BinanceSmartChain = "https://bsc-dataseed.binance.org", e.Bitcoin = "https://node-router.thorswap.net/bitcoin", e.BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash", e.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", e.Dogecoin = "https://node-router.thorswap.net/dogecoin", e.Ethereum = "https://node-router.thorswap.net/ethereum", e.Litecoin = "https://node-router.thorswap.net/litecoin", e.Maya = "https://tendermint.mayachain.info", e.MayaStagenet = "https://stagenet.tendermint.mayachain.info", e.Optimism = "https://mainnet.optimism.io", e.Polygon = "https://polygon-rpc.com", e.THORChain = "https://rpc.thorswap.net", e.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", e))(I || {}), H = /* @__PURE__ */ ((e) => (e.Cosmos = "https://node-router.thorswap.net/cosmos/rest", 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.finance", e.ThorswapStatic = "https://static.thorswap.net", e))(H || {});
768
- const p = Object.values(i), v = Object.keys(i), o = p.reduce(
768
+ var T = /* @__PURE__ */ ((e) => (e.Arbitrum = "42161", e.ArbitrumHex = "0xa4b1", e.Avalanche = "43114", e.AvalancheHex = "0xa86a", e.Binance = "Binance-Chain-Tigris", e.BinanceSmartChain = "56", e.BinanceSmartChainHex = "0x38", e.Bitcoin = "bitcoin", e.BitcoinCash = "bitcoincash", e.Cosmos = "cosmoshub-4", e.Dogecoin = "dogecoin", e.Kujira = "kaiyo-1", e.Ethereum = "1", e.EthereumHex = "0x1", e.Litecoin = "litecoin", e.Maya = "mayachain-mainnet-v1", e.MayaStagenet = "mayachain-stagenet-v1", e.Optimism = "10", e.OptimismHex = "0xa", e.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainStagenet = "thorchain-stagenet-v2", e))(T || {}), I = /* @__PURE__ */ ((e) => (e.Arbitrum = "https://arb1.arbitrum.io/rpc", e.Avalanche = "https://node-router.thorswap.net/avalanche-c", e.Binance = "", e.BinanceSmartChain = "https://bsc-dataseed.binance.org", e.Bitcoin = "https://node-router.thorswap.net/bitcoin", e.BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash", e.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", e.Kujira = "https://rpc-kujira.synergynodes.com/", e.Dogecoin = "https://node-router.thorswap.net/dogecoin", e.Ethereum = "https://node-router.thorswap.net/ethereum", e.Litecoin = "https://node-router.thorswap.net/litecoin", e.Maya = "https://tendermint.mayachain.info", e.MayaStagenet = "https://stagenet.tendermint.mayachain.info", e.Optimism = "https://mainnet.optimism.io", e.Polygon = "https://polygon-rpc.com", e.THORChain = "https://rpc.thorswap.net", e.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", e))(I || {}), x = /* @__PURE__ */ ((e) => (e.Cosmos = "https://node-router.thorswap.net/cosmos/rest", e.Kujira = "https://lcd-kujira.synergynodes.com/", e.MayanodeMainnet = "https://mayanode.mayachain.info", e.MayanodeStagenet = "https://stagenet.mayanode.mayachain.info", e.ThornodeMainnet = "https://thornode.thorswap.net", e.ThornodeStagenet = "https://stagenet-thornode.ninerealms.com", e.ThorswapApi = "https://api.thorswap.finance", e.ThorswapStatic = "https://static.thorswap.net", e))(x || {});
769
+ const p = Object.values(i), H = Object.keys(i), o = p.reduce(
769
770
  (e, n) => {
770
- const a = v.find((r) => i[r] === n);
771
+ const a = H.find((r) => i[r] === n);
771
772
  return a && (e[n] = a), e;
772
773
  },
773
774
  {}
774
- ), j = p.reduce(
775
+ ), $ = p.reduce(
775
776
  (e, n) => (e[n] = T[o[n]], e),
776
777
  {}
777
- ), Z = p.reduce(
778
+ ), q = p.reduce(
778
779
  (e, n) => (e[n] = I[o[n]], e),
779
780
  {}
780
- ), z = p.reduce(
781
+ ), Z = p.reduce(
781
782
  (e, n) => {
782
783
  const a = `${o[n]}Hex`;
783
784
  return e[n] = T[a], e;
784
785
  },
785
786
  {}
786
- ), Q = {
787
+ ), z = {
787
788
  "0xa4b1": "ARB",
788
789
  42161: "ARB",
789
790
  "0xa86a": "AVAX",
@@ -796,6 +797,7 @@ const p = Object.values(i), v = Object.keys(i), o = p.reduce(
796
797
  "cosmoshub-4": "GAIA",
797
798
  dogecoin: "DOGE",
798
799
  "0x1": "ETH",
800
+ "kaiyo-1": "KUJI",
799
801
  1: "ETH",
800
802
  litecoin: "LTC",
801
803
  "mayachain-stagenet-v1": "MAYA",
@@ -807,7 +809,7 @@ const p = Object.values(i), v = Object.keys(i), o = p.reduce(
807
809
  "thorchain-stagenet-v2": "THOR",
808
810
  "thorchain-mainnet-v1": "THOR"
809
811
  /* THORChain */
810
- }, ee = {
812
+ }, Q = {
811
813
  ARB: "https://arbiscan.io",
812
814
  AVAX: "https://snowtrace.io",
813
815
  BSC: "https://bscscan.com",
@@ -816,6 +818,7 @@ const p = Object.values(i), v = Object.keys(i), o = p.reduce(
816
818
  BTC: "https://blockstream.info",
817
819
  GAIA: "https://cosmos.bigdipper.live",
818
820
  DOGE: "https://blockchair.com/dogecoin",
821
+ KUJI: "https://finder.kujira.network/kaiyo-1",
819
822
  ETH: "https://etherscan.io",
820
823
  LTC: "https://ltc.bitaps.com",
821
824
  MAYA: "https://www.mayascan.org",
@@ -823,39 +826,38 @@ const p = Object.values(i), v = Object.keys(i), o = p.reduce(
823
826
  MATIC: "https://polygonscan.com",
824
827
  THOR: "https://viewblock.io/thorchain"
825
828
  };
826
- var L = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e))(L || {}), D = /* @__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))(D || {}), R = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(R || {}), M = /* @__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))(M || {});
829
+ var v = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e))(v || {}), L = /* @__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))(L || {}), D = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(D || {}), R = /* @__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))(R || {});
827
830
  export {
828
831
  K as AGG_SWAP,
829
832
  A as ApiError,
830
- H as ApiUrl,
831
- x as BaseDecimal,
833
+ x as ApiUrl,
834
+ b as BaseDecimal,
832
835
  i as Chain,
833
836
  T as ChainId,
834
- Q as ChainIdToChain,
835
- j as ChainToChainId,
836
- ee as ChainToExplorerUrl,
837
- z as ChainToHexChainId,
838
- Z as ChainToRPC,
839
- V as ContractAddress,
837
+ z as ChainIdToChain,
838
+ $ as ChainToChainId,
839
+ Q as ChainToExplorerUrl,
840
+ Z as ChainToHexChainId,
841
+ q as ChainToRPC,
842
+ P as ContractAddress,
840
843
  J as CosmosChainList,
841
- b as DerivationPath,
844
+ B as DerivationPath,
842
845
  t as ERROR_CODE,
843
- O as ERROR_MODULE,
846
+ V as ERROR_MODULE,
844
847
  m as ERROR_TYPE,
845
- $ as EVMChainList,
846
- L as ErrorCode,
847
- R as FeeOption,
848
- D as MemoType,
849
- k as NetworkDerivationPath,
850
- B as NetworkId,
851
- g as QuoteMode,
848
+ W as EVMChainList,
849
+ v as ErrorCode,
850
+ D as FeeOption,
851
+ L as MemoType,
852
+ Y as NetworkDerivationPath,
853
+ C as QuoteMode,
852
854
  I as RPCUrl,
853
- Y as SWAP_IN,
854
- W as SWAP_OUT,
855
- F as TCAvalancheDepositABI,
856
- X as TCBscDepositABI,
857
- w as TCEthereumVaultAbi,
858
- q as UTXOChainList,
859
- M as WalletOption,
860
- U as erc20ABI
855
+ X as SWAP_IN,
856
+ k as SWAP_OUT,
857
+ w as TCAvalancheDepositABI,
858
+ F as TCBscDepositABI,
859
+ U as TCEthereumVaultAbi,
860
+ j as UTXOChainList,
861
+ R as WalletOption,
862
+ G as erc20ABI
861
863
  };
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "@types/node": "20.5.9",
6
6
  "ethers": "6.7.1",
7
7
  "vite": "4.4.9",
8
- "@internal/config": "0.0.0"
8
+ "@internal/config": "1.1.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": "1.0.0",
36
+ "version": "2.1.0",
37
37
  "scripts": {
38
38
  "build": "vite build",
39
39
  "clean": "rm -rf dist vite.config.ts.* .turbo node_modules",
@@ -8,6 +8,7 @@ type ConnectMethodNames =
8
8
  | 'connectKeplr'
9
9
  | 'connectKeystore'
10
10
  | 'connectKeepkey'
11
+ | 'connectMetaMask'
11
12
  | 'connectLedger'
12
13
  | 'connectOkx'
13
14
  | 'connectTrezor'
package/src/network.ts CHANGED
@@ -8,6 +8,7 @@ export enum Chain {
8
8
  Cosmos = 'GAIA',
9
9
  Dogecoin = 'DOGE',
10
10
  Ethereum = 'ETH',
11
+ Kujira = 'KUJI',
11
12
  Litecoin = 'LTC',
12
13
  Maya = 'MAYA',
13
14
  Optimism = 'OP',
@@ -25,12 +26,6 @@ export enum ContractAddress {
25
26
  OP = '0x4200000000000000000000000000000000000042',
26
27
  }
27
28
 
28
- export enum NetworkId {
29
- Ethereum = 60,
30
- Binance = 714,
31
- THORChain = 931,
32
- }
33
-
34
29
  export enum DerivationPath {
35
30
  ARB = "m/44'/60'/0'/0",
36
31
  AVAX = "m/44'/60'/0'/0",
@@ -41,6 +36,7 @@ export enum DerivationPath {
41
36
  DOGE = "m/44'/3'/0'/0",
42
37
  ETH = "m/44'/60'/0'/0",
43
38
  GAIA = "m/44'/118'/0'/0",
39
+ KUJI = "m/44'/118'/0'/0",
44
40
  LTC = "m/84'/2'/0'/0",
45
41
  MATIC = "m/44'/60'/0'/0",
46
42
  MAYA = "m/44'/931'/0'/0",
@@ -60,6 +56,7 @@ export const NetworkDerivationPath: Record<Chain, DerivationPathArray> = {
60
56
  DOGE: [44, 3, 0, 0, 0],
61
57
  ETH: [44, 60, 0, 0, 0],
62
58
  GAIA: [44, 118, 0, 0, 0],
59
+ KUJI: [44, 118, 0, 0, 0],
63
60
  LTC: [84, 2, 0, 0, 0],
64
61
  MATIC: [44, 60, 0, 0, 0],
65
62
  MAYA: [44, 931, 0, 0, 0],
@@ -112,7 +109,12 @@ export const UTXOChainList: Chain[] = [
112
109
  Chain.Litecoin,
113
110
  ];
114
111
 
115
- export type CosmosChain = Chain.Cosmos | Chain.THORChain | Chain.Binance;
112
+ export type CosmosChain =
113
+ | Chain.Cosmos
114
+ | Chain.THORChain
115
+ | Chain.Binance
116
+ | Chain.Maya
117
+ | Chain.Kujira;
116
118
 
117
119
  export const CosmosChainList: CosmosChain[] = [Chain.Cosmos, Chain.THORChain, Chain.Binance];
118
120
 
@@ -128,6 +130,7 @@ export enum ChainId {
128
130
  BitcoinCash = 'bitcoincash',
129
131
  Cosmos = 'cosmoshub-4',
130
132
  Dogecoin = 'dogecoin',
133
+ Kujira = 'kaiyo-1',
131
134
  Ethereum = '1',
132
135
  EthereumHex = '0x1',
133
136
  Litecoin = 'litecoin',
@@ -149,6 +152,7 @@ export enum RPCUrl {
149
152
  Bitcoin = 'https://node-router.thorswap.net/bitcoin',
150
153
  BitcoinCash = 'https://node-router.thorswap.net/bitcoin-cash',
151
154
  Cosmos = 'https://node-router.thorswap.net/cosmos/rpc',
155
+ Kujira = 'https://rpc-kujira.synergynodes.com/',
152
156
  Dogecoin = 'https://node-router.thorswap.net/dogecoin',
153
157
  Ethereum = 'https://node-router.thorswap.net/ethereum',
154
158
  Litecoin = 'https://node-router.thorswap.net/litecoin',
@@ -162,6 +166,7 @@ export enum RPCUrl {
162
166
 
163
167
  export enum ApiUrl {
164
168
  Cosmos = 'https://node-router.thorswap.net/cosmos/rest',
169
+ Kujira = 'https://lcd-kujira.synergynodes.com/',
165
170
  MayanodeMainnet = 'https://mayanode.mayachain.info',
166
171
  MayanodeStagenet = 'https://stagenet.mayanode.mayachain.info',
167
172
  ThornodeMainnet = 'https://thornode.thorswap.net',
@@ -223,6 +228,7 @@ export const ChainIdToChain: Record<ChainId, Chain> = {
223
228
  [ChainId.Cosmos]: Chain.Cosmos,
224
229
  [ChainId.Dogecoin]: Chain.Dogecoin,
225
230
  [ChainId.EthereumHex]: Chain.Ethereum,
231
+ [ChainId.Kujira]: Chain.Kujira,
226
232
  [ChainId.Ethereum]: Chain.Ethereum,
227
233
  [ChainId.Litecoin]: Chain.Litecoin,
228
234
  [ChainId.MayaStagenet]: Chain.Maya,
@@ -244,6 +250,7 @@ export const ChainToExplorerUrl: Record<Chain, string> = {
244
250
  [Chain.Bitcoin]: 'https://blockstream.info',
245
251
  [Chain.Cosmos]: 'https://cosmos.bigdipper.live',
246
252
  [Chain.Dogecoin]: 'https://blockchair.com/dogecoin',
253
+ [Chain.Kujira]: 'https://finder.kujira.network/kaiyo-1',
247
254
  [Chain.Ethereum]: 'https://etherscan.io',
248
255
  [Chain.Litecoin]: 'https://ltc.bitaps.com',
249
256
  [Chain.Maya]: 'https://www.mayascan.org',