@swapkit/helpers
Advanced tools
Comparing version 0.0.0-nightly-20240827223927 to 0.0.0-nightly-20240829182208
@@ -1,2 +0,2 @@ | ||
var l=((n)=>typeof require!=="undefined"?require:typeof Proxy!=="undefined"?new Proxy(n,{get:(h,t)=>(typeof require!=="undefined"?require:h)[t]}):n)(function(n){if(typeof require!=="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});export*from"@swapkit/contracts";var d;((k)=>{k.Arbitrum="https://arb1.arbitrum.io/rpc";k.Avalanche="https://node-router.thorswap.net/avalanche-c";k.Base="https://base.llamarpc.com";k.BinanceSmartChain="https://bsc-dataseed.binance.org";k.Bitcoin="https://node-router.thorswap.net/bitcoin";k.BitcoinCash="https://node-router.thorswap.net/bitcoin-cash";k.Chainflip="wss://mainnet-archive.chainflip.io";k.Cosmos="https://node-router.thorswap.net/cosmos/rpc";k.Dash="https://node-router.thorswap.net/dash";k.Dogecoin="https://node-router.thorswap.net/dogecoin";k.Ethereum="https://node-router.thorswap.net/ethereum";k.Kujira="https://rpc-kujira.synergynodes.com/";k.Litecoin="https://node-router.thorswap.net/litecoin";k.Maya="https://tendermint.mayachain.info";k.MayaStagenet="https://stagenet.tendermint.mayachain.info";k.Optimism="https://mainnet.optimism.io";k.Polkadot="wss://rpc.polkadot.io";k.Polygon="https://polygon-rpc.com";k.Radix="https://radix-mainnet.rpc.grove.city/v1/326002fc/core";k.THORChain="https://rpc.thorswap.net";k.THORChainStagenet="https://stagenet-rpc.ninerealms.com";k.Solana="https://mainnet.helius-rpc.com/?api-key=2cbe3ae6-cfc5-4141-a093-0055d0fa3d80"})(d||={});var U;((R)=>{R.Arbitrum="https://arbiscan.io";R.Avalanche="https://snowtrace.io";R.Base="https://basescan.org";R.BinanceSmartChain="https://bscscan.com";R.Bitcoin="https://blockchair.com/bitcoin";R.BitcoinCash="https://www.blockchair.com/bitcoin-cash";R.Chainflip="https://explorer.polkascan.io/polkadot";R.Cosmos="https://www.mintscan.io/cosmos";R.Dash="https://blockchair.com/dash";R.Dogecoin="https://blockchair.com/dogecoin";R.Ethereum="https://etherscan.io";R.Kujira="https://finder.kujira.network/kaiyo-1";R.Litecoin="https://blockchair.com/litecoin";R.Maya="https://www.mayascan.org";R.Optimism="https://optimistic.etherscan.io";R.Polkadot="https://polkadot.subscan.io";R.Polygon="https://polygonscan.com";R.Radix="https://dashboard.radixdlt.com";R.THORChain="https://runescan.io";R.Solana="https://solscan.io"})(U||={});var g;((R)=>{R.Arbitrum="ARB";R.Avalanche="AVAX";R.Base="BASE";R.BinanceSmartChain="BSC";R.Bitcoin="BTC";R.BitcoinCash="BCH";R.Cosmos="GAIA";R.Dash="DASH";R.Dogecoin="DOGE";R.Ethereum="ETH";R.Kujira="KUJI";R.Litecoin="LTC";R.Maya="MAYA";R.Optimism="OP";R.Polkadot="DOT";R.Chainflip="FLIP";R.Polygon="MATIC";R.Radix="XRD";R.THORChain="THOR";R.Solana="SOL"})(g||={});var Q;((A)=>{A.Arbitrum="42161";A.ArbitrumHex="0xa4b1";A.Avalanche="43114";A.AvalancheHex="0xa86a";A.Base="8453";A.BaseHex="0x2105";A.BinanceSmartChain="56";A.BinanceSmartChainHex="0x38";A.Bitcoin="bitcoin";A.BitcoinCash="bitcoincash";A.Chainflip="chainflip";A.Cosmos="cosmoshub-4";A.Dash="dash";A.Dogecoin="dogecoin";A.Kujira="kaiyo-1";A.Ethereum="1";A.EthereumHex="0x1";A.Litecoin="litecoin";A.Maya="mayachain-mainnet-v1";A.MayaStagenet="mayachain-stagenet-v1";A.Optimism="10";A.OptimismHex="0xa";A.Polkadot="polkadot";A.Polygon="137";A.PolygonHex="0x89";A.Radix="radix-mainnet";A.THORChain="thorchain-mainnet-v1";A.THORChainStagenet="thorchain-stagenet-v2";A.Solana="solana"})(Q||={});var Ch={["0xa4b1"]:"ARB",["42161"]:"ARB",["0xa86a"]:"AVAX",["43114"]:"AVAX",["0x2105"]:"BASE",["8453"]:"BASE",["0x38"]:"BSC",["56"]:"BSC",["bitcoincash"]:"BCH",["bitcoin"]:"BTC",["chainflip"]:"FLIP",["cosmoshub-4"]:"GAIA",["dash"]:"DASH",["dogecoin"]:"DOGE",["0x1"]:"ETH",["kaiyo-1"]:"KUJI",["1"]:"ETH",["litecoin"]:"LTC",["mayachain-stagenet-v1"]:"MAYA",["mayachain-mainnet-v1"]:"MAYA",["0xa"]:"OP",["10"]:"OP",["polkadot"]:"DOT",["0x89"]:"MATIC",["137"]:"MATIC",["radix-mainnet"]:"XRD",["thorchain-stagenet-v2"]:"THOR",["thorchain-mainnet-v1"]:"THOR",["solana"]:"SOL"},$n=Object.keys(g),z=Object.values(g),B={ARB:18,AVAX:18,BASE:18,BCH:8,BSC:18,BTC:8,DASH:8,DOGE:8,DOT:10,ETH:18,FLIP:18,GAIA:6,KUJI:6,LTC:8,MATIC:18,MAYA:8,OP:18,SOL:9,THOR:8,XRD:18},Nh=["DOT","FLIP"],W=["ARB","AVAX","BASE","BSC","ETH","OP","MATIC"],Ah=["BTC","BCH","DASH","DOGE","LTC"],Bh=["GAIA","THOR","MAYA","KUJI"],Th=["AVAX","BSC","BTC","BCH","GAIA","DOGE","ETH","LTC","THOR"],kh=["ARB","DASH","ETH","KUJI","MAYA","THOR"],M=z.reduce((n,h)=>{const t=$n.find((o)=>g[o]===h);if(t)n[h]=t;return n},{}),nn=z.reduce((n,h)=>{return n[h]=Q[M[h]],n},{}),i=z.reduce((n,h)=>{return n[h]=d[M[h]],n},{}),Oh=z.reduce((n,h)=>{const t=`${M[h]}Hex`;return n[h]=Q[t],n},{}),$h=z.reduce((n,h)=>{return n[h]=U[M[h]],n},{});var In;((I)=>{I.TC_SUPPORTED_TO_TC_SUPPORTED="TC-TC";I.TC_SUPPORTED_TO_ETH="TC-ERC20";I.TC_SUPPORTED_TO_AVAX="TC-ARC20";I.TC_SUPPORTED_TO_BSC="TC-BEP20";I.ETH_TO_TC_SUPPORTED="ERC20-TC";I.ETH_TO_ETH="ERC20-ERC20";I.ETH_TO_AVAX="ERC20-ARC20";I.ETH_TO_BSC="ERC20-BEP20";I.AVAX_TO_TC_SUPPORTED="ARC20-TC";I.AVAX_TO_ETH="ARC20-ERC20";I.AVAX_TO_AVAX="ARC20-ARC20";I.AVAX_TO_BSC="ARC20-BEP20";I.BSC_TO_TC_SUPPORTED="BEP20-TC";I.BSC_TO_ETH="BEP20-ERC20";I.BSC_TO_AVAX="BEP20-ARC20";I.BSC_TO_BSC="BEP20-BEP20"})(In||={});var Lh=["ERC20-ERC20","ARC20-ARC20","BEP20-BEP20"],_h=["ERC20-TC","ERC20-ARC20","ERC20-BEP20","ARC20-TC","ARC20-ERC20","ARC20-BEP20","BEP20-TC","BEP20-ERC20","BEP20-ARC20"],Gh=["TC-TC","TC-ERC20","TC-ARC20","TC-BEP20"];var Ln;((F)=>{F.ARB="0x0000000000000000000000000000000000000000";F.AVAX="0x0000000000000000000000000000000000000000";F.BASE="0x0000000000000000000000000000000000000000";F.ETH="0x0000000000000000000000000000000000000000";F.BSC="0x0000000000000000000000000000000000000000";F.MATIC="0x0000000000000000000000000000000000001010";F.OP="0x4200000000000000000000000000000000000042"})(Ln||={});var _n;((R)=>{R.ARB="m/44'/60'/0'/0";R.AVAX="m/44'/60'/0'/0";R.BASE="m/44'/60'/0'/0";R.BCH="m/44'/145'/0'/0";R.BSC="m/44'/60'/0'/0";R.BTC="m/84'/0'/0'/0";R.DASH="m/44'/5'/0'/0";R.DOGE="m/44'/3'/0'/0";R.DOT="////";R.ETH="m/44'/60'/0'/0";R.FLIP="////";R.GAIA="m/44'/118'/0'/0";R.KUJI="m/44'/118'/0'/0";R.LTC="m/84'/2'/0'/0";R.MATIC="m/44'/60'/0'/0";R.MAYA="m/44'/931'/0'/0";R.OP="m/44'/60'/0'/0";R.SOL="m/44'/501'/0'/0";R.THOR="m/44'/931'/0'/0";R.XRD="////"})(_n||={});var E={ARB:[44,60,0,0,0],AVAX:[44,60,0,0,0],BASE:[44,60,0,0,0],BCH:[44,145,0,0,0],BSC:[44,60,0,0,0],BTC:[84,0,0,0,0],DASH:[44,5,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],SOL:[44,501,0,0,0],THOR:[44,931,0,0,0],XRD:[0,0,0,0,0],DOT:[0,0,0,0,0],FLIP:[0,0,0,0,0]};var hn;((O)=>{O.BRAVE="BRAVE";O.COINBASE_MOBILE="COINBASE_MOBILE";O.COINBASE_WEB="COINBASE_WEB";O.EIP6963="EIP6963";O.EXODUS="EXODUS";O.KEEPKEY="KEEPKEY";O.KEPLR="KEPLR";O.KEYSTORE="KEYSTORE";O.LEDGER="LEDGER";O.LEDGER_LIVE="LEDGER_LIVE";O.METAMASK="METAMASK";O.OKX="OKX";O.OKX_MOBILE="OKX_MOBILE";O.PHANTOM="PHANTOM";O.POLKADOT_JS="POLKADOT_JS";O.RADIX_WALLET="RADIX_WALLET";O.TREZOR="TREZOR";O.TALISMAN="TALISMAN";O.TRUSTWALLET_WEB="TRUSTWALLET_WEB";O.WALLETCONNECT="WALLETCONNECT";O.XDEFI="XDEFI"})(hn||={});var Gn;((o)=>{o[o.NoError=36864]="NoError";o[o.LockedDevice=21781]="LockedDevice";o[o.TC_NotFound=65535]="TC_NotFound"})(Gn||={});var gn;((o)=>{o.Average="average";o.Fast="fast";o.Fastest="fastest"})(gn||={});var Pn;((t)=>{t.Approve="approve";t.CheckOnly="checkOnly"})(Pn||={});var tn;((N)=>{N.NAME_REGISTER="~";N.BOND="BOND";N.DEPOSIT="+";N.LEAVE="LEAVE";N.UNBOND="UNBOND";N.WITHDRAW="-";N.OPEN_LOAN="$+";N.CLOSE_LOAN="$-";N.RUNEPOOL_DEPOSIT="POOL+";N.RUNEPOOL_WITHDRAW="POOL-"})(tn||={});var un;((c)=>{c.unknownError="unknownError";c.test_error="test_error";c.providerDetailsError="providerDetailsError";c.blockHeaderNotFound="blockHeaderNotFound";c.blockHashNotFoundAtHeight="blockHashNotFoundAtHeight";c.blockHashNotFoundAtHash="blockHashNotFoundAtHash";c.txHashMissing="txHashMissing";c.assetValueMissingInfo="assetValueMissingInfo";c.invalidAsset="invalidAsset";c.blockIsRequired="blockIsRequired";c.currentBlockHeaderNotFound="currentBlockHeaderNotFound";c.failedToRetrieveBalance="failedToRetrieveBalance";c.failedToRetrieveBlock="failedToRetrieveBlock";c.failedToRetrieveFees="failedToRetrieveFees";c.notImplementedBCH="notImplementedBCH";c.notImplementedDoge="notImplementedDoge";c.noPoolsFound="noPoolsFound";c.noVaultsFound="noVaultsFound";c.noTxFound="noTxFound";c.noInputCoinFound="noInputCoinFound";c.noBlockDataFound="noBlockDataFound";c.multipleCosmosMessages="multipleCosmosMessages";c.heightOrHashNotProvided="heightOrHashNotProvided";c.unknownDenom="unknownDenom";c.invalidBlockHeight="invalidBlockHeight";c.timestampExtrinsicNoArgumentsForBlock="timestampExtrinsicNoArgumentsForBlock";c.timestampExtrinsicNoTimestampForBlock="timestampExtrinsicNoTimestampForBlock";c.noTimestampExtrinsicForHash="noTimestampExtrinsicForHash";c.timestampExtrinsicNoArgumentsForHash="timestampExtrinsicNoArgumentsForHash";c.txMemoUndefined="txMemoUndefined";c.txMemoIncorrect="txMemoIncorrect";c.txTypeNotFound="txTypeNotFound";c.txNoMessage="txNoMessage";c.txNotFound="txNotFound";c.txReceiptNotFound="txReceiptNotFound";c.txParsingError="txParsingError";c.blockNotFound="blockNotFound";c.balanceNotFound="balanceNotFound";c.configError="configError";c.noQuoteResponse="noQuoteResponse";c.noPoolAssetsFound="noPoolAssetsFound";c.noThorchainPools="noThorchainPools";c.noMayachainPools="noMayachainPools";c.invalidAffiliateFee="invalidAffiliateFee";c.invalidBuyAssetAddress="invalidBuyAssetAddress";c.invalidSellAssetAddress="invalidSellAssetAddress";c.invalidSourceAddress="invalidSourceAddress";c.invalidDestinationAddress="invalidDestinationAddress";c.sourceAddressIsSmartContract="sourceAddressIsSmartContract";c.destinationAddressIsSmartContract="destinationAddressIsSmartContract";c.invalidChainId="invalidChainId";c.unsupportedChainId="unsupportedChainId";c.unsupportedEVMChainId="unsupportedEVMChainId";c.noWhitelistTokens="noWhitelistTokens";c.failedFetchGasPrice="failedFetchGasPrice";c.failedToCreateDepositChannel="failedToCreateDepositChannel";c.noProviderDetailsFound="noProviderDetailsFound";c.noTokenListsFound="noTokenListsFound";c.tokenNotFound="tokenNotFound";c.tokenPriceNotFound="tokenPriceNotFound";c.swapAmountTooSmall="swapAmountTooSmall";c.legsArrayIsEmpty="legsArrayIsEmpty";c.failedToFetchQuoteForLeg="failedToFetchQuoteForLeg";c.noBlockHeaderFound="noBlockHeaderFound";c.failedToSimulateSwap="failedToSimulateSwap";c.addressScreeningFailed="addressScreeningFailed";c.noLiquidtyProvidersFound="noLiquidtyProvidersFound";c.noSaversFound="noSaversFound";c.noInboundAddressesFound="noInboundAddressesFound";c.noInboundAddressFoundForChain="noInboundAddressFoundForChain";c.noLastBlocksFound="noLastBlocksFound";c.noVersionFound="noVersionFound";c.noConstantsFound="noConstantsFound";c.noMimirsFound="noMimirsFound";c.noRoutesFound="noRoutesFound";c.quoteNotFound="quoteNotFound";c.ledgerSignFailed="ledgerSignFailed";c.ledgerFetchSwapFailed="ledgerFetchSwapFailed";c.failedToFetchTx="failedToFetchTx";c.failedBuildTransactionDetails="failedBuildTransactionDetails";c.noLegsForRoute="noLegsForRoute";c.noRouterAddressFound="noRouterAddressFound";c.noAggregatorAddressFound="noAggregatorAddressFound";c.noContractInstanceFound="noContractInstanceFound";c.noContractAddressFound="noContractAddressFound";c.invalidAffiliate="invalidAffiliate";c.providerNotfound="No provider found";c.noRecordFound="No Record found";c.slippageTooLow="Slippage too low";c.tradingHalted="tradingHalted";c.noWrappedGasAsset="noWrappedGasAsset";c.aggregatorAddressNotFound="aggregatorAddressNotFound";c.routerAddressNotFound="routerAddressNotFound";c.dummyAddressNotFound="dummyAddressNotFound";c.trackerError="trackerError";c.noOhlcvDataFound="noOhlcvDataFound";c.noTradingPairs="noTradingPairs";c.noLoanPositionFound="noLoanPositionFound";c.noLendingAvailability="noLendingAvailability";c.lendingRepayTooSmall="lendingRepayTooSmall";c.missingState="missingState";c.ledgerSwapNotFound="ledgerSwapNotFound";c.ledgerSwapNotReadyForTracking="ledgerSwapNotReadyForTracking";c.errorEstimatingGas="errorEstimatingGas";c.apiKeyInvalid="apiKeyInvalid";c.apiKeyFailedToUpdate="apiKeyFailedToUpdate";c.apiKeyExpired="apiKeyExpired";c.unauthorized="unauthorized";c.failedToCreateMemo="failedToCreateMemo";c.radixIncorrectInstructions="radixIncorrectInstructions";c.invalidAddressForChain="invalidAddressForChain"})(un||={});var Sn;((t)=>{t.highSlippage="highSlippage";t.highPriceImpact="highPriceImpact"})(Sn||={});var jn;((_)=>{_.CHAINFLIP="CHAINFLIP";_.MAYACHAIN="MAYACHAIN";_.MAYACHAIN_STREAMING="MAYACHAIN_STREAMING";_.ONEINCH="ONEINCH";_.PANCAKESWAP="PANCAKESWAP";_.PANGOLIN_V1="PANGOLIN_V1";_.SUSHISWAP_V2="SUSHISWAP_V2";_.THORCHAIN="THORCHAIN";_.THORCHAIN_STREAMING="THORCHAIN_STREAMING";_.TRADERJOE_V2="TRADERJOE_V2";_.UNISWAP_V2="UNISWAP_V2";_.UNISWAP_V3="UNISWAP_V3";_.CAVIAR_V1="CAVIAR_V1"})(jn||={});var Xn;((s)=>{s.LIQUIDITY="liquidity";s.NETWORK="network";s.INBOUND="inbound";s.OUTBOUND="outbound";s.AFFILIATE="affiliate";s.TAX="tax"})(Xn||={});import{red as Rn,yellow as zn}from"picocolors";var pn={core_estimated_max_spendable_chain_not_supported:10002,core_extend_error:10003,core_inbound_data_not_found:10004,core_approve_asset_address_or_from_not_found:10005,core_plugin_not_found:10006,core_plugin_swap_not_found:10007,core_approve_asset_target_invalid:10008,core_explorer_unsupported_chain:10009,core_verify_message_not_supported:10010,core_chain_halted:10099,core_wallet_connection_not_found:10100,core_wallet_xdefi_not_installed:10101,core_wallet_evmwallet_not_installed:10102,core_wallet_walletconnect_not_installed:10103,core_wallet_keystore_not_installed:10104,core_wallet_ledger_not_installed:10105,core_wallet_trezor_not_installed:10106,core_wallet_keplr_not_installed:10107,core_wallet_okx_not_installed:10108,core_wallet_keepkey_not_installed:10109,core_wallet_talisman_not_installed:10110,core_wallet_not_keypair_wallet:10111,core_wallet_sign_message_not_supported:10110,core_swap_invalid_params:10200,core_swap_route_not_complete:10201,core_swap_asset_not_recognized:10202,core_swap_contract_not_found:10203,core_swap_route_transaction_not_found:10204,core_swap_contract_not_supported:10205,core_swap_transaction_error:10206,core_swap_quote_mode_not_supported:10207,core_transaction_deposit_error:10301,core_transaction_create_liquidity_base_error:10302,core_transaction_create_liquidity_asset_error:10303,core_transaction_create_liquidity_invalid_params:10304,core_transaction_add_liquidity_invalid_params:10305,core_transaction_add_liquidity_base_address:10306,core_transaction_add_liquidity_base_error:10307,core_transaction_add_liquidity_asset_error:10308,core_transaction_withdraw_error:10309,core_transaction_deposit_to_pool_error:10310,core_transaction_deposit_insufficient_funds_error:10311,core_transaction_deposit_gas_error:10312,core_transaction_invalid_sender_address:10313,core_transaction_deposit_server_error:10314,core_transaction_user_rejected:10315,core_transaction_failed:10316,wallet_connection_rejected_by_user:20000,wallet_missing_api_key:20001,wallet_chain_not_supported:20002,wallet_missing_params:20003,wallet_provider_not_found:20004,wallet_failed_to_add_or_switch_network:20005,wallet_ledger_connection_error:20101,wallet_ledger_connection_claimed:20102,wallet_ledger_get_address_error:20103,wallet_ledger_device_not_found:20104,wallet_ledger_device_locked:20105,wallet_phantom_not_found:20201,wallet_xdefi_not_found:20301,wallet_xdefi_send_transaction_no_address:20302,wallet_xdefi_contract_address_not_provided:20303,wallet_xdefi_asset_not_defined:20304,wallet_walletconnect_project_id_not_specified:20401,wallet_walletconnect_connection_not_established:20402,wallet_walletconnect_namespace_not_supported:20403,wallet_trezor_failed_to_sign_transaction:20501,wallet_trezor_derivation_path_not_supported:20502,wallet_trezor_failed_to_get_address:20503,wallet_talisman_not_enabled:20601,wallet_talisman_not_found:20602,wallet_polkadot_not_found:20701,chainflip_channel_error:30001,chainflip_unknown_asset:30002,chainflip_broker_invalid_params:30100,chainflip_broker_recipient_error:30101,chainflip_broker_register:30102,chainflip_broker_tx_error:30103,chainflip_broker_withdraw:30104,chainflip_broker_fund_only_flip_supported:30105,chainflip_broker_fund_invalid_address:30106,thorchain_chain_halted:40001,thorchain_trading_halted:40002,thorchain_swapin_router_required:40100,thorchain_swapin_vault_required:40101,thorchain_swapin_memo_required:40102,thorchain_swapin_token_required:40103,api_v2_invalid_response:50001,api_v2_server_error:50002,toolbox_cosmos_signer_not_defined:90101,toolbox_cosmos_no_accounts_found:90102,toolbox_cosmos_verify_signature_no_pubkey:90103,toolbox_evm_no_abi_fragment:90201,toolbox_evm_no_signer:90202,toolbox_evm_no_signer_address:90203,toolbox_evm_no_from_address:90204,toolbox_evm_no_contract_address:90205,toolbox_evm_no_fee_data:90206,toolbox_evm_no_gas_price:90207,toolbox_evm_no_to_address:90208,toolbox_evm_invalid_gas_asset_address:90209,toolbox_evm_provider_not_eip1193_compatible:90210,toolbox_evm_error_estimating_gas_limit:90211,toolbox_evm_error_sending_transaction:90212,helpers_invalid_number_different_decimals:99000,helpers_invalid_number_of_years:99001,helpers_invalid_identifier:99002,helpers_invalid_asset_url:99003,helpers_invalid_asset_identifier:99004,helpers_invalid_memo_type:99005,helpers_failed_to_switch_network:99103,helpers_not_found_provider:99200,not_implemented:99999};class L extends Error{static ErrorCode=pn;constructor(n,h){const t=typeof n==="string",o=t?n:n.errorKey;if(h)console.error(h,{stack:h?.stack,message:h?.message});super(o,{cause:{code:L.ErrorCode[o],message:`${o}${t?"":`: ${JSON.stringify(n.info)}`}`}});Object.setPrototypeOf(this,L.prototype)}}function Vh(n){if(n<0)throw new L({errorKey:"helpers_invalid_number_of_years",info:{numberOfYears:n}});return 10+n}function bh(n){if(n<0)throw new L({errorKey:"helpers_invalid_number_of_years",info:{numberOfYears:n}});return Math.round((10+n*1.0512)*10000000000)/10000000000}function Kh(n,h){try{return n()}catch(t){if(h)throw new L(h,t);return console.error(t)}}function Dh(n){switch(n){case"THOR":return`${n}.RUNE`;case"GAIA":return`${n}.ATOM`;case"BSC":return`${n}`;default:return`${n}.${n}`}}function xn(n,h){if(!Jn&&n){if(on.has(h))return;on.add(h),console.warn(h)}}var Jn=["production","test"].includes("development"),on=new Set;function Hn(n=""){const h=n.toUpperCase(),[t]=h.split(".");if(cn.includes(t))return!0;const[o]=h.split("/");if(cn.includes(o))return!0;throw new L({errorKey:"helpers_invalid_identifier",info:{message:`Invalid identifier: ${n}. Expected format: <Chain>.<Ticker> or <Chain>.<Ticker>-<ContractAddress>`,identifier:n}})}function ih(n){if(n.length>30)return!1;const h=/^[a-zA-Z0-9+_-]+$/g;return!!n.match(h)}var cn=[...Object.values(g),"TERRA"];function J({value:n,bigIntDecimal:h=Z,decimal:t=Z}){if(t===0)return n.toString();const o=n<0n;let x=n.toString().substring(o?1:0);const H=t-(x.length-1);if(H>0)x="0".repeat(H)+x;const s=x.length-t;let F=x.slice(-t);if(Number.parseInt(F[h]||"0")>=5)F=`${F.substring(0,h-1)}${(Number.parseInt(F[h-1]||"0")+1).toString()}`;else F=F.substring(0,h);return`${o?"-":""}${x.slice(0,s)}.${F}`.replace(/\.?0*$/,"")}function V(n){const t=`${typeof n==="number"?wn.format(n):v(n)}`.replaceAll(",",".").split(".");return t.length>1?`${t.slice(0,-1).join("")}.${t.at(-1)}`:t[0]||"0"}function sn(n){const h=n.split(".")[1]?.length||0;return Math.max(h,Z)}function v(n){return typeof n==="object"?"getValue"in n?n.getValue("string"):n.value:n}var Z=8,X=(n)=>10n**BigInt(n),y=(n)=>Math.log10(Number.parseFloat(n.toString()));class j{decimalMultiplier=10n**8n;bigIntValue=0n;decimal;static fromBigInt(n,h){return new j({decimal:h,value:J({value:n,bigIntDecimal:h,decimal:h})})}static shiftDecimals({value:n,from:h,to:t}){return j.fromBigInt(n.getBaseValue("bigint")*X(t)/X(h),t)}constructor(n){const h=v(n),t=typeof n==="object";this.decimal=t?n.decimal:void 0,this.decimalMultiplier=t&&"decimalMultiplier"in n?n.decimalMultiplier:X(Math.max(sn(V(h)),this.decimal||0)),this.#x(h)}set(n){return new this.constructor({decimal:this.decimal,value:n,identifier:this.toString()})}add(...n){return this.#h("add",...n)}sub(...n){return this.#h("sub",...n)}mul(...n){return this.#h("mul",...n)}div(...n){return this.#h("div",...n)}gt(n){return this.#n("gt",n)}gte(n){return this.#n("gte",n)}lt(n){return this.#n("lt",n)}lte(n){return this.#n("lte",n)}eqValue(n){return this.#n("eqValue",n)}getValue(n){const h=this.formatBigIntToSafeValue(this.bigIntValue,this.decimal||y(this.decimalMultiplier));switch(n){case"number":return Number(h);case"string":return h;case"bigint":return this.bigIntValue*10n**BigInt(this.decimal||8n)/this.decimalMultiplier}}getBaseValue(n){const h=this.decimalMultiplier/X(this.decimal||B.THOR),t=this.bigIntValue/h;switch(n){case"number":return Number(t);case"string":return t.toString();case"bigint":return t}}getBigIntValue(n,h){if(!h&&typeof n==="object")return n.bigIntValue;const t=v(n),o=V(t);if(o==="0"||o==="undefined")return 0n;return this.#o(o,h)}toSignificant(n=6){const[h,t]=this.getValue("string").split("."),o=h||"",x=t||"";if((Number.parseInt(o)?o.length+x.length:x.length)<=n)return this.getValue("string");if(o.length>=n)return o.slice(0,n).padEnd(o.length,"0");if(Number.parseInt(o))return`${o}.${x.slice(0,n-o.length)}`.padEnd(n-o.length,"0");const s=Number.parseInt(x),F=`${s}`.slice(0,n);return`0.${F.padStart(x.length-`${s}`.length+F.length,"0")}`}toFixed(n=6){const[h,t]=this.getValue("string").split("."),o=h||"",x=t||"";if(Number.parseInt(o))return`${o}.${x.slice(0,n)}`.padEnd(n,"0");const H=Number.parseInt(x),s=`${H}`.slice(0,n);return`0.${s.padStart(x.length-`${H}`.length+s.length,"0")}`}toAbbreviation(n=2){const h=this.getValue("number"),t=["","K","M","B","T","Q","Qi","S"],o=Math.floor(Math.log10(Math.abs(h))/3),x=t[o];if(!x)return this.getValue("string");const H=10**(o*3);return`${(h/H).toFixed(n)}${x}`}toCurrency(n="$",{currencyPosition:h="start",decimal:t=2,decimalSeparator:o=".",thousandSeparator:x=","}={}){const H=this.getValue("number"),[s="",F=""]=H.toFixed(6).split("."),T=s.replace(/\B(?=(\d{3})+(?!\d))/g,x),C=s||F?s==="0"?`${Number.parseFloat(`0.${F}`)}`.replace(".",o):`${T}${Number.parseInt(F)?`${o}${F.slice(0,t)}`:""}`:"0.00";return`${h==="start"?n:""}${C}${h==="end"?n:""}`}formatBigIntToSafeValue(n,h){const t=h||this.decimal||Z,o=Math.max(t,y(this.decimalMultiplier)),x=n<0n,H=n.toString().substring(x?1:0),s=o-(H.length-1),F=s>0?"0".repeat(s)+H:H,T=F.length-o;let C=F.slice(-o);if(Number.parseInt(C[t]||"0")>=5)C=`${C.substring(0,t-1)}${(Number.parseInt(C[t-1]||"0")+1).toString()}`;else C=C.substring(0,t);return`${x?"-":""}${F.slice(0,T)}.${C}`.replace(/\.?0*$/,"")}#h(n,...h){const t=this.#t(this,...h),o=Math.max(t,y(this.decimalMultiplier)),x=X(o),H=h.reduce((F,T)=>{const C=this.getBigIntValue(T,o);switch(n){case"add":return F+C;case"sub":return F-C;case"mul":return F*C/x;case"div":{if(C===0n)throw new RangeError("Division by zero");return F*x/C}default:return F}},this.bigIntValue*x/this.decimalMultiplier),s=J({bigIntDecimal:o,decimal:o,value:H});return new this.constructor({decimalMultiplier:X(o),decimal:this.decimal,value:s,identifier:this.toString()})}#n(n,...h){const t=this.#t(this,...h),o=this.getBigIntValue(h[0]||"0",t),x=this.getBigIntValue(this,t);switch(n){case"gt":return x>o;case"gte":return x>=o;case"lt":return x<o;case"lte":return x<=o;case"eqValue":return x===o}}#x(n){const h=V(n)||"0";this.bigIntValue=this.#o(h)}#t(...n){const h=n.map((t)=>{return typeof t==="object"?t.decimal||y(t.decimalMultiplier):sn(V(t))}).filter(Boolean);return Math.max(...h,Z)}#o(n,h){const t=h?X(h):this.decimalMultiplier,o=y(t),[x="",H=""]=n.split(".");return BigInt(`${x}${H.padEnd(o,"0")}`)}}var wn=Intl.NumberFormat("fullwide",{useGrouping:!1,maximumFractionDigits:20});function xt(n){const h=$.from({chain:n});switch(n){case"BTC":case"LTC":case"BCH":case"DASH":return h.set(0.00010001);case"DOGE":return h.set(1.00000001);case"AVAX":case"ETH":case"ARB":case"BSC":return h.set(0.00000001);case"THOR":case"MAYA":return h.set(0);case"GAIA":case"KUJI":return h.set(0.000001);default:return h.set(0.00000001)}}async function yn(n,h=0){Hn(n);const t=b.get(n.toUpperCase()),o=t?.decimal||await Cn(m(n));if(!t)b.set(n.toUpperCase(),{identifier:n,decimal:o});return new $({decimal:o,value:K(h,o),identifier:n})}function Zn(n,h=0){const t=n.split(".")?.[0]?.toUpperCase(),o=t?["MAYA","THOR"].includes(t):!1,[x,H]=o?n.split(".").slice(1).join().split("/"):n.split("/");if(!(x&&H))throw new L({errorKey:"helpers_invalid_asset_identifier",info:{identifier:n}});return new $({decimal:8,value:K(h,8),identifier:`${t||"THOR"}.${x}/${H}`})}function K(n,h){return typeof n==="bigint"?J({value:n,bigIntDecimal:h,decimal:h}):n}function m(n){const h=n.slice(0,14).includes("/"),t=n.split(".")?.[0]?.toUpperCase()==="THOR",o=n.split(".")?.[0]?.toUpperCase()==="MAYA",[x,H=""]=t||o?n.split(".").slice(1).join().split("/"):n.split("/");if(h&&!(x&&H))throw new L({errorKey:"helpers_invalid_asset_identifier",info:{identifier:n}});const s=n.includes(".")&&!h?n:`${o?"MAYA":"THOR"}.${H}`,[F,...T]=s.split("."),C=h?H:T.join("."),N=C.split("-"),G=N.length===1?N[0]:N.slice(0,-1).join("-"),u=N.length===1?void 0:N[N.length-1];return{address:u?.toLowerCase(),chain:F,isGasAsset:r({chain:F,symbol:C}),isSynthetic:h,ticker:G,symbol:(h?`${x}/`:"")+(u?`${G}-${u?.toLowerCase()??""}`:C)}}var b=new Map;class $ extends j{address;chain;isGasAsset=!1;isSynthetic=!1;symbol;tax;ticker;type;chainId;constructor({value:n,decimal:h,tax:t,chain:o,symbol:x,identifier:H}){super(typeof n==="object"?n:{decimal:h,value:n});const s=m(H||`${o}.${x}`);this.type=An(s),this.tax=t,this.chain=s.chain,this.ticker=s.ticker,this.symbol=s.symbol,this.address=s.address,this.isSynthetic=s.isSynthetic,this.isGasAsset=s.isGasAsset,this.chainId=nn[s.chain]}toString({includeSynthProtocol:n}={}){return this.isSynthetic&&!n?this.symbol:`${this.chain}.${this.symbol}`}toUrl(){return this.isSynthetic?`${this.chain}.${this.symbol.replace("/",".")}`:this.toString()}eqAsset({chain:n,symbol:h}){return this.chain===n&&this.symbol===h}eq(n){return this.eqAsset(n)&&this.eqValue(n)}static fromUrl(n,h=0){const[t,o,x]=n.split(".");if(!(t&&o))throw new L({errorKey:"helpers_invalid_asset_url",info:{urlAsset:n}});const H=t==="THOR"&&x?`${t}.${o}/${x}`:n;return $.from({asset:H,value:h})}static from({value:n=0,fromBaseDecimal:h,asyncTokenLookup:t,...o}){const x=n instanceof j?n.getValue("string"):n,H="chain"in o,s=H?o.chain:o.asset,F=H||Fn.includes(s),{identifier:T,decimal:C}=F?Nn(s):{identifier:s,decimal:void 0},{chain:N,isSynthetic:G}=m(T),u=b.get(T.toUpperCase()),_=u?.decimal||C;xn(!(t||_),zn(`Couldn't find static decimal for ${Rn(T)} (Using default ${Rn(B[N])} decimal as fallback). | ||
var l=((n)=>typeof require!=="undefined"?require:typeof Proxy!=="undefined"?new Proxy(n,{get:(h,t)=>(typeof require!=="undefined"?require:h)[t]}):n)(function(n){if(typeof require!=="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});export*from"@swapkit/contracts";var d;((k)=>{k.Arbitrum="https://arb1.arbitrum.io/rpc";k.Avalanche="https://node-router.thorswap.net/avalanche-c";k.Base="https://base.llamarpc.com";k.BinanceSmartChain="https://bsc-dataseed.binance.org";k.Bitcoin="https://node-router.thorswap.net/bitcoin";k.BitcoinCash="https://node-router.thorswap.net/bitcoin-cash";k.Chainflip="wss://mainnet-archive.chainflip.io";k.Cosmos="https://node-router.thorswap.net/cosmos/rpc";k.Dash="https://node-router.thorswap.net/dash";k.Dogecoin="https://node-router.thorswap.net/dogecoin";k.Ethereum="https://node-router.thorswap.net/ethereum";k.Kujira="https://rpc-kujira.synergynodes.com/";k.Litecoin="https://node-router.thorswap.net/litecoin";k.Maya="https://tendermint.mayachain.info";k.MayaStagenet="https://stagenet.tendermint.mayachain.info";k.Optimism="https://mainnet.optimism.io";k.Polkadot="wss://rpc.polkadot.io";k.Polygon="https://polygon-rpc.com";k.Radix="https://radix-mainnet.rpc.grove.city/v1/326002fc/core";k.THORChain="https://rpc.thorswap.net";k.THORChainStagenet="https://stagenet-rpc.ninerealms.com";k.Solana="https://mainnet.helius-rpc.com/?api-key=2cbe3ae6-cfc5-4141-a093-0055d0fa3d80"})(d||={});var U;((R)=>{R.Arbitrum="https://arbiscan.io";R.Avalanche="https://snowtrace.io";R.Base="https://basescan.org";R.BinanceSmartChain="https://bscscan.com";R.Bitcoin="https://blockchair.com/bitcoin";R.BitcoinCash="https://www.blockchair.com/bitcoin-cash";R.Chainflip="https://explorer.polkascan.io/polkadot";R.Cosmos="https://www.mintscan.io/cosmos";R.Dash="https://blockchair.com/dash";R.Dogecoin="https://blockchair.com/dogecoin";R.Ethereum="https://etherscan.io";R.Kujira="https://finder.kujira.network/kaiyo-1";R.Litecoin="https://blockchair.com/litecoin";R.Maya="https://www.mayascan.org";R.Optimism="https://optimistic.etherscan.io";R.Polkadot="https://polkadot.subscan.io";R.Polygon="https://polygonscan.com";R.Radix="https://dashboard.radixdlt.com";R.THORChain="https://runescan.io";R.Solana="https://solscan.io"})(U||={});var g;((R)=>{R.Arbitrum="ARB";R.Avalanche="AVAX";R.Base="BASE";R.BinanceSmartChain="BSC";R.Bitcoin="BTC";R.BitcoinCash="BCH";R.Cosmos="GAIA";R.Dash="DASH";R.Dogecoin="DOGE";R.Ethereum="ETH";R.Kujira="KUJI";R.Litecoin="LTC";R.Maya="MAYA";R.Optimism="OP";R.Polkadot="DOT";R.Chainflip="FLIP";R.Polygon="MATIC";R.Radix="XRD";R.THORChain="THOR";R.Solana="SOL"})(g||={});var Q;((A)=>{A.Arbitrum="42161";A.ArbitrumHex="0xa4b1";A.Avalanche="43114";A.AvalancheHex="0xa86a";A.Base="8453";A.BaseHex="0x2105";A.BinanceSmartChain="56";A.BinanceSmartChainHex="0x38";A.Bitcoin="bitcoin";A.BitcoinCash="bitcoincash";A.Chainflip="chainflip";A.Cosmos="cosmoshub-4";A.Dash="dash";A.Dogecoin="dogecoin";A.Kujira="kaiyo-1";A.Ethereum="1";A.EthereumHex="0x1";A.Litecoin="litecoin";A.Maya="mayachain-mainnet-v1";A.MayaStagenet="mayachain-stagenet-v1";A.Optimism="10";A.OptimismHex="0xa";A.Polkadot="polkadot";A.Polygon="137";A.PolygonHex="0x89";A.Radix="radix-mainnet";A.THORChain="thorchain-mainnet-v1";A.THORChainStagenet="thorchain-stagenet-v2";A.Solana="solana"})(Q||={});var Ch={["0xa4b1"]:"ARB",["42161"]:"ARB",["0xa86a"]:"AVAX",["43114"]:"AVAX",["0x2105"]:"BASE",["8453"]:"BASE",["0x38"]:"BSC",["56"]:"BSC",["bitcoincash"]:"BCH",["bitcoin"]:"BTC",["chainflip"]:"FLIP",["cosmoshub-4"]:"GAIA",["dash"]:"DASH",["dogecoin"]:"DOGE",["0x1"]:"ETH",["kaiyo-1"]:"KUJI",["1"]:"ETH",["litecoin"]:"LTC",["mayachain-stagenet-v1"]:"MAYA",["mayachain-mainnet-v1"]:"MAYA",["0xa"]:"OP",["10"]:"OP",["polkadot"]:"DOT",["0x89"]:"MATIC",["137"]:"MATIC",["radix-mainnet"]:"XRD",["thorchain-stagenet-v2"]:"THOR",["thorchain-mainnet-v1"]:"THOR",["solana"]:"SOL"},$n=Object.keys(g),z=Object.values(g),B={ARB:18,AVAX:18,BASE:18,BCH:8,BSC:18,BTC:8,DASH:8,DOGE:8,DOT:10,ETH:18,FLIP:18,GAIA:6,KUJI:6,LTC:8,MATIC:18,MAYA:8,OP:18,SOL:9,THOR:8,XRD:18},Nh=["DOT","FLIP"],W=["ARB","AVAX","BASE","BSC","ETH","OP","MATIC"],Ah=["BTC","BCH","DASH","DOGE","LTC"],Bh=["GAIA","THOR","MAYA","KUJI"],Th=["AVAX","BSC","BTC","BCH","GAIA","DOGE","ETH","LTC","THOR"],kh=["ARB","DASH","ETH","KUJI","MAYA","THOR"],M=z.reduce((n,h)=>{const t=$n.find((o)=>g[o]===h);if(t)n[h]=t;return n},{}),nn=z.reduce((n,h)=>{return n[h]=Q[M[h]],n},{}),i=z.reduce((n,h)=>{return n[h]=d[M[h]],n},{}),Oh=z.reduce((n,h)=>{const t=`${M[h]}Hex`;return n[h]=Q[t],n},{}),$h=z.reduce((n,h)=>{return n[h]=U[M[h]],n},{});var In;((I)=>{I.TC_SUPPORTED_TO_TC_SUPPORTED="TC-TC";I.TC_SUPPORTED_TO_ETH="TC-ERC20";I.TC_SUPPORTED_TO_AVAX="TC-ARC20";I.TC_SUPPORTED_TO_BSC="TC-BEP20";I.ETH_TO_TC_SUPPORTED="ERC20-TC";I.ETH_TO_ETH="ERC20-ERC20";I.ETH_TO_AVAX="ERC20-ARC20";I.ETH_TO_BSC="ERC20-BEP20";I.AVAX_TO_TC_SUPPORTED="ARC20-TC";I.AVAX_TO_ETH="ARC20-ERC20";I.AVAX_TO_AVAX="ARC20-ARC20";I.AVAX_TO_BSC="ARC20-BEP20";I.BSC_TO_TC_SUPPORTED="BEP20-TC";I.BSC_TO_ETH="BEP20-ERC20";I.BSC_TO_AVAX="BEP20-ARC20";I.BSC_TO_BSC="BEP20-BEP20"})(In||={});var Lh=["ERC20-ERC20","ARC20-ARC20","BEP20-BEP20"],_h=["ERC20-TC","ERC20-ARC20","ERC20-BEP20","ARC20-TC","ARC20-ERC20","ARC20-BEP20","BEP20-TC","BEP20-ERC20","BEP20-ARC20"],Gh=["TC-TC","TC-ERC20","TC-ARC20","TC-BEP20"];var Ln;((F)=>{F.ARB="0x0000000000000000000000000000000000000000";F.AVAX="0x0000000000000000000000000000000000000000";F.BASE="0x0000000000000000000000000000000000000000";F.ETH="0x0000000000000000000000000000000000000000";F.BSC="0x0000000000000000000000000000000000000000";F.MATIC="0x0000000000000000000000000000000000001010";F.OP="0x4200000000000000000000000000000000000042"})(Ln||={});var _n;((R)=>{R.ARB="m/44'/60'/0'/0";R.AVAX="m/44'/60'/0'/0";R.BASE="m/44'/60'/0'/0";R.BCH="m/44'/145'/0'/0";R.BSC="m/44'/60'/0'/0";R.BTC="m/84'/0'/0'/0";R.DASH="m/44'/5'/0'/0";R.DOGE="m/44'/3'/0'/0";R.DOT="////";R.ETH="m/44'/60'/0'/0";R.FLIP="////";R.GAIA="m/44'/118'/0'/0";R.KUJI="m/44'/118'/0'/0";R.LTC="m/84'/2'/0'/0";R.MATIC="m/44'/60'/0'/0";R.MAYA="m/44'/931'/0'/0";R.OP="m/44'/60'/0'/0";R.SOL="m/44'/501'/0'/0";R.THOR="m/44'/931'/0'/0";R.XRD="////"})(_n||={});var E={ARB:[44,60,0,0,0],AVAX:[44,60,0,0,0],BASE:[44,60,0,0,0],BCH:[44,145,0,0,0],BSC:[44,60,0,0,0],BTC:[84,0,0,0,0],DASH:[44,5,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],SOL:[44,501,0,0,0],THOR:[44,931,0,0,0],XRD:[0,0,0,0,0],DOT:[0,0,0,0,0],FLIP:[0,0,0,0,0]};var hn;((O)=>{O.BRAVE="BRAVE";O.COINBASE_MOBILE="COINBASE_MOBILE";O.COINBASE_WEB="COINBASE_WEB";O.EIP6963="EIP6963";O.EXODUS="EXODUS";O.KEEPKEY="KEEPKEY";O.KEPLR="KEPLR";O.KEYSTORE="KEYSTORE";O.LEDGER="LEDGER";O.LEDGER_LIVE="LEDGER_LIVE";O.METAMASK="METAMASK";O.OKX="OKX";O.OKX_MOBILE="OKX_MOBILE";O.PHANTOM="PHANTOM";O.POLKADOT_JS="POLKADOT_JS";O.RADIX_WALLET="RADIX_WALLET";O.TREZOR="TREZOR";O.TALISMAN="TALISMAN";O.TRUSTWALLET_WEB="TRUSTWALLET_WEB";O.WALLETCONNECT="WALLETCONNECT";O.XDEFI="XDEFI"})(hn||={});var Gn;((o)=>{o[o.NoError=36864]="NoError";o[o.LockedDevice=21781]="LockedDevice";o[o.TC_NotFound=65535]="TC_NotFound"})(Gn||={});var gn;((o)=>{o.Average="average";o.Fast="fast";o.Fastest="fastest"})(gn||={});var Pn;((t)=>{t.Approve="approve";t.CheckOnly="checkOnly"})(Pn||={});var tn;((N)=>{N.NAME_REGISTER="~";N.BOND="BOND";N.DEPOSIT="+";N.LEAVE="LEAVE";N.UNBOND="UNBOND";N.WITHDRAW="-";N.OPEN_LOAN="$+";N.CLOSE_LOAN="$-";N.RUNEPOOL_DEPOSIT="POOL+";N.RUNEPOOL_WITHDRAW="POOL-"})(tn||={});var un;((c)=>{c.unknownError="unknownError";c.test_error="test_error";c.providerDetailsError="providerDetailsError";c.blockHeaderNotFound="blockHeaderNotFound";c.blockHashNotFoundAtHeight="blockHashNotFoundAtHeight";c.blockHashNotFoundAtHash="blockHashNotFoundAtHash";c.txHashMissing="txHashMissing";c.assetValueMissingInfo="assetValueMissingInfo";c.invalidAsset="invalidAsset";c.blockIsRequired="blockIsRequired";c.currentBlockHeaderNotFound="currentBlockHeaderNotFound";c.failedToRetrieveBalance="failedToRetrieveBalance";c.failedToRetrieveBlock="failedToRetrieveBlock";c.failedToRetrieveFees="failedToRetrieveFees";c.notImplementedBCH="notImplementedBCH";c.notImplementedDoge="notImplementedDoge";c.noPoolsFound="noPoolsFound";c.noVaultsFound="noVaultsFound";c.noTxFound="noTxFound";c.noInputCoinFound="noInputCoinFound";c.noBlockDataFound="noBlockDataFound";c.multipleCosmosMessages="multipleCosmosMessages";c.heightOrHashNotProvided="heightOrHashNotProvided";c.unknownDenom="unknownDenom";c.invalidBlockHeight="invalidBlockHeight";c.timestampExtrinsicNoArgumentsForBlock="timestampExtrinsicNoArgumentsForBlock";c.timestampExtrinsicNoTimestampForBlock="timestampExtrinsicNoTimestampForBlock";c.noTimestampExtrinsicForHash="noTimestampExtrinsicForHash";c.timestampExtrinsicNoArgumentsForHash="timestampExtrinsicNoArgumentsForHash";c.txMemoUndefined="txMemoUndefined";c.txMemoIncorrect="txMemoIncorrect";c.txTypeNotFound="txTypeNotFound";c.txNoMessage="txNoMessage";c.txNotFound="txNotFound";c.txReceiptNotFound="txReceiptNotFound";c.txParsingError="txParsingError";c.blockNotFound="blockNotFound";c.balanceNotFound="balanceNotFound";c.configError="configError";c.noQuoteResponse="noQuoteResponse";c.noPoolAssetsFound="noPoolAssetsFound";c.noThorchainPools="noThorchainPools";c.noMayachainPools="noMayachainPools";c.invalidAffiliateFee="invalidAffiliateFee";c.invalidBuyAssetAddress="invalidBuyAssetAddress";c.invalidSellAssetAddress="invalidSellAssetAddress";c.invalidSourceAddress="invalidSourceAddress";c.invalidDestinationAddress="invalidDestinationAddress";c.sourceAddressIsSmartContract="sourceAddressIsSmartContract";c.destinationAddressIsSmartContract="destinationAddressIsSmartContract";c.invalidChainId="invalidChainId";c.unsupportedChainId="unsupportedChainId";c.unsupportedEVMChainId="unsupportedEVMChainId";c.noWhitelistTokens="noWhitelistTokens";c.failedFetchGasPrice="failedFetchGasPrice";c.failedToCreateDepositChannel="failedToCreateDepositChannel";c.noProviderDetailsFound="noProviderDetailsFound";c.noTokenListsFound="noTokenListsFound";c.tokenNotFound="tokenNotFound";c.tokenPriceNotFound="tokenPriceNotFound";c.swapAmountTooSmall="swapAmountTooSmall";c.legsArrayIsEmpty="legsArrayIsEmpty";c.failedToFetchQuoteForLeg="failedToFetchQuoteForLeg";c.noBlockHeaderFound="noBlockHeaderFound";c.failedToSimulateSwap="failedToSimulateSwap";c.addressScreeningFailed="addressScreeningFailed";c.noLiquidtyProvidersFound="noLiquidtyProvidersFound";c.noSaversFound="noSaversFound";c.noInboundAddressesFound="noInboundAddressesFound";c.noInboundAddressFoundForChain="noInboundAddressFoundForChain";c.noLastBlocksFound="noLastBlocksFound";c.noVersionFound="noVersionFound";c.noConstantsFound="noConstantsFound";c.noMimirsFound="noMimirsFound";c.noRoutesFound="noRoutesFound";c.quoteNotFound="quoteNotFound";c.ledgerSignFailed="ledgerSignFailed";c.ledgerFetchSwapFailed="ledgerFetchSwapFailed";c.failedToFetchTx="failedToFetchTx";c.failedBuildTransactionDetails="failedBuildTransactionDetails";c.noLegsForRoute="noLegsForRoute";c.noRouterAddressFound="noRouterAddressFound";c.noAggregatorAddressFound="noAggregatorAddressFound";c.noContractInstanceFound="noContractInstanceFound";c.noContractAddressFound="noContractAddressFound";c.invalidAffiliate="invalidAffiliate";c.providerNotfound="No provider found";c.noRecordFound="No Record found";c.slippageTooLow="Slippage too low";c.tradingHalted="tradingHalted";c.noWrappedGasAsset="noWrappedGasAsset";c.aggregatorAddressNotFound="aggregatorAddressNotFound";c.routerAddressNotFound="routerAddressNotFound";c.dummyAddressNotFound="dummyAddressNotFound";c.trackerError="trackerError";c.noOhlcvDataFound="noOhlcvDataFound";c.noTradingPairs="noTradingPairs";c.noLoanPositionFound="noLoanPositionFound";c.noLendingAvailability="noLendingAvailability";c.lendingRepayTooSmall="lendingRepayTooSmall";c.missingState="missingState";c.ledgerSwapNotFound="ledgerSwapNotFound";c.ledgerSwapNotReadyForTracking="ledgerSwapNotReadyForTracking";c.errorEstimatingGas="errorEstimatingGas";c.apiKeyInvalid="apiKeyInvalid";c.apiKeyFailedToUpdate="apiKeyFailedToUpdate";c.apiKeyExpired="apiKeyExpired";c.unauthorized="unauthorized";c.failedToCreateMemo="failedToCreateMemo";c.radixIncorrectInstructions="radixIncorrectInstructions";c.invalidAddressForChain="invalidAddressForChain"})(un||={});var Sn;((t)=>{t.highSlippage="highSlippage";t.highPriceImpact="highPriceImpact"})(Sn||={});var jn;((_)=>{_.CHAINFLIP="CHAINFLIP";_.MAYACHAIN="MAYACHAIN";_.MAYACHAIN_STREAMING="MAYACHAIN_STREAMING";_.ONEINCH="ONEINCH";_.PANCAKESWAP="PANCAKESWAP";_.PANGOLIN_V1="PANGOLIN_V1";_.SUSHISWAP_V2="SUSHISWAP_V2";_.THORCHAIN="THORCHAIN";_.THORCHAIN_STREAMING="THORCHAIN_STREAMING";_.TRADERJOE_V2="TRADERJOE_V2";_.UNISWAP_V2="UNISWAP_V2";_.UNISWAP_V3="UNISWAP_V3";_.CAVIAR_V1="CAVIAR_V1"})(jn||={});var Xn;((s)=>{s.LIQUIDITY="liquidity";s.NETWORK="network";s.INBOUND="inbound";s.OUTBOUND="outbound";s.AFFILIATE="affiliate";s.TAX="tax"})(Xn||={});import{red as Rn,yellow as zn}from"picocolors";var pn={core_estimated_max_spendable_chain_not_supported:10002,core_extend_error:10003,core_inbound_data_not_found:10004,core_approve_asset_address_or_from_not_found:10005,core_plugin_not_found:10006,core_plugin_swap_not_found:10007,core_approve_asset_target_invalid:10008,core_explorer_unsupported_chain:10009,core_verify_message_not_supported:10010,core_chain_halted:10099,core_wallet_connection_not_found:10100,core_wallet_xdefi_not_installed:10101,core_wallet_evmwallet_not_installed:10102,core_wallet_walletconnect_not_installed:10103,core_wallet_keystore_not_installed:10104,core_wallet_ledger_not_installed:10105,core_wallet_trezor_not_installed:10106,core_wallet_keplr_not_installed:10107,core_wallet_okx_not_installed:10108,core_wallet_keepkey_not_installed:10109,core_wallet_talisman_not_installed:10110,core_wallet_not_keypair_wallet:10111,core_wallet_sign_message_not_supported:10110,core_swap_invalid_params:10200,core_swap_route_not_complete:10201,core_swap_asset_not_recognized:10202,core_swap_contract_not_found:10203,core_swap_route_transaction_not_found:10204,core_swap_contract_not_supported:10205,core_swap_transaction_error:10206,core_swap_quote_mode_not_supported:10207,core_transaction_deposit_error:10301,core_transaction_create_liquidity_base_error:10302,core_transaction_create_liquidity_asset_error:10303,core_transaction_create_liquidity_invalid_params:10304,core_transaction_add_liquidity_invalid_params:10305,core_transaction_add_liquidity_base_address:10306,core_transaction_add_liquidity_base_error:10307,core_transaction_add_liquidity_asset_error:10308,core_transaction_withdraw_error:10309,core_transaction_deposit_to_pool_error:10310,core_transaction_deposit_insufficient_funds_error:10311,core_transaction_deposit_gas_error:10312,core_transaction_invalid_sender_address:10313,core_transaction_deposit_server_error:10314,core_transaction_user_rejected:10315,core_transaction_failed:10316,wallet_connection_rejected_by_user:20000,wallet_missing_api_key:20001,wallet_chain_not_supported:20002,wallet_missing_params:20003,wallet_provider_not_found:20004,wallet_failed_to_add_or_switch_network:20005,wallet_ledger_connection_error:20101,wallet_ledger_connection_claimed:20102,wallet_ledger_get_address_error:20103,wallet_ledger_device_not_found:20104,wallet_ledger_device_locked:20105,wallet_phantom_not_found:20201,wallet_xdefi_not_found:20301,wallet_xdefi_send_transaction_no_address:20302,wallet_xdefi_contract_address_not_provided:20303,wallet_xdefi_asset_not_defined:20304,wallet_walletconnect_project_id_not_specified:20401,wallet_walletconnect_connection_not_established:20402,wallet_walletconnect_namespace_not_supported:20403,wallet_trezor_failed_to_sign_transaction:20501,wallet_trezor_derivation_path_not_supported:20502,wallet_trezor_failed_to_get_address:20503,wallet_talisman_not_enabled:20601,wallet_talisman_not_found:20602,wallet_polkadot_not_found:20701,wallet_radix_not_found:20801,wallet_radix_transaction_failed:20802,chainflip_channel_error:30001,chainflip_unknown_asset:30002,chainflip_broker_invalid_params:30100,chainflip_broker_recipient_error:30101,chainflip_broker_register:30102,chainflip_broker_tx_error:30103,chainflip_broker_withdraw:30104,chainflip_broker_fund_only_flip_supported:30105,chainflip_broker_fund_invalid_address:30106,thorchain_chain_halted:40001,thorchain_trading_halted:40002,thorchain_swapin_router_required:40100,thorchain_swapin_vault_required:40101,thorchain_swapin_memo_required:40102,thorchain_swapin_token_required:40103,api_v2_invalid_response:50001,api_v2_server_error:50002,toolbox_cosmos_signer_not_defined:90101,toolbox_cosmos_no_accounts_found:90102,toolbox_cosmos_verify_signature_no_pubkey:90103,toolbox_evm_no_abi_fragment:90201,toolbox_evm_no_signer:90202,toolbox_evm_no_signer_address:90203,toolbox_evm_no_from_address:90204,toolbox_evm_no_contract_address:90205,toolbox_evm_no_fee_data:90206,toolbox_evm_no_gas_price:90207,toolbox_evm_no_to_address:90208,toolbox_evm_invalid_gas_asset_address:90209,toolbox_evm_provider_not_eip1193_compatible:90210,toolbox_evm_error_estimating_gas_limit:90211,toolbox_evm_error_sending_transaction:90212,toolbox_radix_signer_not_defined:90301,helpers_invalid_number_different_decimals:99000,helpers_invalid_number_of_years:99001,helpers_invalid_identifier:99002,helpers_invalid_asset_url:99003,helpers_invalid_asset_identifier:99004,helpers_invalid_memo_type:99005,helpers_failed_to_switch_network:99103,helpers_not_found_provider:99200,not_implemented:99999};class L extends Error{static ErrorCode=pn;constructor(n,h){const t=typeof n==="string",o=t?n:n.errorKey;if(h)console.error(h,{stack:h?.stack,message:h?.message});super(o,{cause:{code:L.ErrorCode[o],message:`${o}${t?"":`: ${JSON.stringify(n.info)}`}`}});Object.setPrototypeOf(this,L.prototype)}}function Vh(n){if(n<0)throw new L({errorKey:"helpers_invalid_number_of_years",info:{numberOfYears:n}});return 10+n}function bh(n){if(n<0)throw new L({errorKey:"helpers_invalid_number_of_years",info:{numberOfYears:n}});return Math.round((10+n*1.0512)*10000000000)/10000000000}function Kh(n,h){try{return n()}catch(t){if(h)throw new L(h,t);return console.error(t)}}function Dh(n){switch(n){case"THOR":return`${n}.RUNE`;case"GAIA":return`${n}.ATOM`;case"BSC":return`${n}`;default:return`${n}.${n}`}}function xn(n,h){if(!Jn&&n){if(on.has(h))return;on.add(h),console.warn(h)}}var Jn=["production","test"].includes("development"),on=new Set;function Hn(n=""){const h=n.toUpperCase(),[t]=h.split(".");if(cn.includes(t))return!0;const[o]=h.split("/");if(cn.includes(o))return!0;throw new L({errorKey:"helpers_invalid_identifier",info:{message:`Invalid identifier: ${n}. Expected format: <Chain>.<Ticker> or <Chain>.<Ticker>-<ContractAddress>`,identifier:n}})}function ih(n){if(n.length>30)return!1;const h=/^[a-zA-Z0-9+_-]+$/g;return!!n.match(h)}var cn=[...Object.values(g),"TERRA"];function J({value:n,bigIntDecimal:h=Z,decimal:t=Z}){if(t===0)return n.toString();const o=n<0n;let x=n.toString().substring(o?1:0);const H=t-(x.length-1);if(H>0)x="0".repeat(H)+x;const s=x.length-t;let F=x.slice(-t);if(Number.parseInt(F[h]||"0")>=5)F=`${F.substring(0,h-1)}${(Number.parseInt(F[h-1]||"0")+1).toString()}`;else F=F.substring(0,h);return`${o?"-":""}${x.slice(0,s)}.${F}`.replace(/\.?0*$/,"")}function V(n){const t=`${typeof n==="number"?wn.format(n):v(n)}`.replaceAll(",",".").split(".");return t.length>1?`${t.slice(0,-1).join("")}.${t.at(-1)}`:t[0]||"0"}function sn(n){const h=n.split(".")[1]?.length||0;return Math.max(h,Z)}function v(n){return typeof n==="object"?"getValue"in n?n.getValue("string"):n.value:n}var Z=8,X=(n)=>10n**BigInt(n),y=(n)=>Math.log10(Number.parseFloat(n.toString()));class j{decimalMultiplier=10n**8n;bigIntValue=0n;decimal;static fromBigInt(n,h){return new j({decimal:h,value:J({value:n,bigIntDecimal:h,decimal:h})})}static shiftDecimals({value:n,from:h,to:t}){return j.fromBigInt(n.getBaseValue("bigint")*X(t)/X(h),t)}constructor(n){const h=v(n),t=typeof n==="object";this.decimal=t?n.decimal:void 0,this.decimalMultiplier=t&&"decimalMultiplier"in n?n.decimalMultiplier:X(Math.max(sn(V(h)),this.decimal||0)),this.#x(h)}set(n){return new this.constructor({decimal:this.decimal,value:n,identifier:this.toString()})}add(...n){return this.#h("add",...n)}sub(...n){return this.#h("sub",...n)}mul(...n){return this.#h("mul",...n)}div(...n){return this.#h("div",...n)}gt(n){return this.#n("gt",n)}gte(n){return this.#n("gte",n)}lt(n){return this.#n("lt",n)}lte(n){return this.#n("lte",n)}eqValue(n){return this.#n("eqValue",n)}getValue(n){const h=this.formatBigIntToSafeValue(this.bigIntValue,this.decimal||y(this.decimalMultiplier));switch(n){case"number":return Number(h);case"string":return h;case"bigint":return this.bigIntValue*10n**BigInt(this.decimal||8n)/this.decimalMultiplier}}getBaseValue(n){const h=this.decimalMultiplier/X(this.decimal||B.THOR),t=this.bigIntValue/h;switch(n){case"number":return Number(t);case"string":return t.toString();case"bigint":return t}}getBigIntValue(n,h){if(!h&&typeof n==="object")return n.bigIntValue;const t=v(n),o=V(t);if(o==="0"||o==="undefined")return 0n;return this.#o(o,h)}toSignificant(n=6){const[h,t]=this.getValue("string").split("."),o=h||"",x=t||"";if((Number.parseInt(o)?o.length+x.length:x.length)<=n)return this.getValue("string");if(o.length>=n)return o.slice(0,n).padEnd(o.length,"0");if(Number.parseInt(o))return`${o}.${x.slice(0,n-o.length)}`.padEnd(n-o.length,"0");const s=Number.parseInt(x),F=`${s}`.slice(0,n);return`0.${F.padStart(x.length-`${s}`.length+F.length,"0")}`}toFixed(n=6){const[h,t]=this.getValue("string").split("."),o=h||"",x=t||"";if(Number.parseInt(o))return`${o}.${x.slice(0,n)}`.padEnd(n,"0");const H=Number.parseInt(x),s=`${H}`.slice(0,n);return`0.${s.padStart(x.length-`${H}`.length+s.length,"0")}`}toAbbreviation(n=2){const h=this.getValue("number"),t=["","K","M","B","T","Q","Qi","S"],o=Math.floor(Math.log10(Math.abs(h))/3),x=t[o];if(!x)return this.getValue("string");const H=10**(o*3);return`${(h/H).toFixed(n)}${x}`}toCurrency(n="$",{currencyPosition:h="start",decimal:t=2,decimalSeparator:o=".",thousandSeparator:x=","}={}){const H=this.getValue("number"),[s="",F=""]=H.toFixed(6).split("."),T=s.replace(/\B(?=(\d{3})+(?!\d))/g,x),C=s||F?s==="0"?`${Number.parseFloat(`0.${F}`)}`.replace(".",o):`${T}${Number.parseInt(F)?`${o}${F.slice(0,t)}`:""}`:"0.00";return`${h==="start"?n:""}${C}${h==="end"?n:""}`}formatBigIntToSafeValue(n,h){const t=h||this.decimal||Z,o=Math.max(t,y(this.decimalMultiplier)),x=n<0n,H=n.toString().substring(x?1:0),s=o-(H.length-1),F=s>0?"0".repeat(s)+H:H,T=F.length-o;let C=F.slice(-o);if(Number.parseInt(C[t]||"0")>=5)C=`${C.substring(0,t-1)}${(Number.parseInt(C[t-1]||"0")+1).toString()}`;else C=C.substring(0,t);return`${x?"-":""}${F.slice(0,T)}.${C}`.replace(/\.?0*$/,"")}#h(n,...h){const t=this.#t(this,...h),o=Math.max(t,y(this.decimalMultiplier)),x=X(o),H=h.reduce((F,T)=>{const C=this.getBigIntValue(T,o);switch(n){case"add":return F+C;case"sub":return F-C;case"mul":return F*C/x;case"div":{if(C===0n)throw new RangeError("Division by zero");return F*x/C}default:return F}},this.bigIntValue*x/this.decimalMultiplier),s=J({bigIntDecimal:o,decimal:o,value:H});return new this.constructor({decimalMultiplier:X(o),decimal:this.decimal,value:s,identifier:this.toString()})}#n(n,...h){const t=this.#t(this,...h),o=this.getBigIntValue(h[0]||"0",t),x=this.getBigIntValue(this,t);switch(n){case"gt":return x>o;case"gte":return x>=o;case"lt":return x<o;case"lte":return x<=o;case"eqValue":return x===o}}#x(n){const h=V(n)||"0";this.bigIntValue=this.#o(h)}#t(...n){const h=n.map((t)=>{return typeof t==="object"?t.decimal||y(t.decimalMultiplier):sn(V(t))}).filter(Boolean);return Math.max(...h,Z)}#o(n,h){const t=h?X(h):this.decimalMultiplier,o=y(t),[x="",H=""]=n.split(".");return BigInt(`${x}${H.padEnd(o,"0")}`)}}var wn=Intl.NumberFormat("fullwide",{useGrouping:!1,maximumFractionDigits:20});function xt(n){const h=$.from({chain:n});switch(n){case"BTC":case"LTC":case"BCH":case"DASH":return h.set(0.00010001);case"DOGE":return h.set(1.00000001);case"AVAX":case"ETH":case"ARB":case"BSC":return h.set(0.00000001);case"THOR":case"MAYA":return h.set(0);case"GAIA":case"KUJI":return h.set(0.000001);default:return h.set(0.00000001)}}async function yn(n,h=0){Hn(n);const t=b.get(n.toUpperCase()),o=t?.decimal||await Cn(m(n));if(!t)b.set(n.toUpperCase(),{identifier:n,decimal:o});return new $({decimal:o,value:K(h,o),identifier:n})}function Zn(n,h=0){const t=n.split(".")?.[0]?.toUpperCase(),o=t?["MAYA","THOR"].includes(t):!1,[x,H]=o?n.split(".").slice(1).join().split("/"):n.split("/");if(!(x&&H))throw new L({errorKey:"helpers_invalid_asset_identifier",info:{identifier:n}});return new $({decimal:8,value:K(h,8),identifier:`${t||"THOR"}.${x}/${H}`})}function K(n,h){return typeof n==="bigint"?J({value:n,bigIntDecimal:h,decimal:h}):n}function m(n){const h=n.slice(0,14).includes("/"),t=n.split(".")?.[0]?.toUpperCase()==="THOR",o=n.split(".")?.[0]?.toUpperCase()==="MAYA",[x,H=""]=t||o?n.split(".").slice(1).join().split("/"):n.split("/");if(h&&!(x&&H))throw new L({errorKey:"helpers_invalid_asset_identifier",info:{identifier:n}});const s=n.includes(".")&&!h?n:`${o?"MAYA":"THOR"}.${H}`,[F,...T]=s.split("."),C=h?H:T.join("."),N=C.split("-"),G=N.length===1?N[0]:N.slice(0,-1).join("-"),u=N.length===1?void 0:N[N.length-1];return{address:u?.toLowerCase(),chain:F,isGasAsset:r({chain:F,symbol:C}),isSynthetic:h,ticker:G,symbol:(h?`${x}/`:"")+(u?`${G}-${u?.toLowerCase()??""}`:C)}}var b=new Map;class $ extends j{address;chain;isGasAsset=!1;isSynthetic=!1;symbol;tax;ticker;type;chainId;constructor({value:n,decimal:h,tax:t,chain:o,symbol:x,identifier:H}){super(typeof n==="object"?n:{decimal:h,value:n});const s=m(H||`${o}.${x}`);this.type=An(s),this.tax=t,this.chain=s.chain,this.ticker=s.ticker,this.symbol=s.symbol,this.address=s.address,this.isSynthetic=s.isSynthetic,this.isGasAsset=s.isGasAsset,this.chainId=nn[s.chain]}toString({includeSynthProtocol:n}={}){return this.isSynthetic&&!n?this.symbol:`${this.chain}.${this.symbol}`}toUrl(){return this.isSynthetic?`${this.chain}.${this.symbol.replace("/",".")}`:this.toString()}eqAsset({chain:n,symbol:h}){return this.chain===n&&this.symbol===h}eq(n){return this.eqAsset(n)&&this.eqValue(n)}static fromUrl(n,h=0){const[t,o,x]=n.split(".");if(!(t&&o))throw new L({errorKey:"helpers_invalid_asset_url",info:{urlAsset:n}});const H=t==="THOR"&&x?`${t}.${o}/${x}`:n;return $.from({asset:H,value:h})}static from({value:n=0,fromBaseDecimal:h,asyncTokenLookup:t,...o}){const x=n instanceof j?n.getValue("string"):n,H="chain"in o,s=H?o.chain:o.asset,F=H||Fn.includes(s),{identifier:T,decimal:C}=F?Nn(s):{identifier:s,decimal:void 0},{chain:N,isSynthetic:G}=m(T),u=b.get(T.toUpperCase()),_=u?.decimal||C;xn(!(t||_),zn(`Couldn't find static decimal for ${Rn(T)} (Using default ${Rn(B[N])} decimal as fallback). | ||
This can result in incorrect calculations and mess with amount sent on transactions. | ||
@@ -6,2 +6,2 @@ You can load static assets by installing @swapkit/tokens package and calling AssetValue.loadStaticAssets() | ||
//# debugId=1CDC163E494DC37764756E2164756E21 | ||
//# debugId=4FE9A8FC98F16CEC64756E2164756E21 |
@@ -6,12 +6,12 @@ { | ||
"@swapkit/contracts": "1.0.4", | ||
"@swapkit/tokens": "0.0.0-nightly-20240827223927", | ||
"@swapkit/tokens": "0.0.0-nightly-20240829182208", | ||
"picocolors": "1.0.1" | ||
}, | ||
"devDependencies": { | ||
"@swapkit/toolbox-cosmos": "0.0.0-nightly-20240827223927", | ||
"@swapkit/toolbox-evm": "0.0.0-nightly-20240827223927", | ||
"@swapkit/toolbox-solana": "0.0.0-nightly-20240827223927", | ||
"@swapkit/toolbox-radix": "0.0.0-nightly-20240827223927", | ||
"@swapkit/toolbox-substrate": "0.0.0-nightly-20240827223927", | ||
"@swapkit/toolbox-utxo": "0.0.0-nightly-20240827223927" | ||
"@swapkit/toolbox-cosmos": "0.0.0-nightly-20240829182208", | ||
"@swapkit/toolbox-evm": "0.0.0-nightly-20240829182208", | ||
"@swapkit/toolbox-solana": "0.0.0-nightly-20240829182208", | ||
"@swapkit/toolbox-radix": "0.0.0-nightly-20240829182208", | ||
"@swapkit/toolbox-substrate": "0.0.0-nightly-20240829182208", | ||
"@swapkit/toolbox-utxo": "0.0.0-nightly-20240829182208" | ||
}, | ||
@@ -41,3 +41,3 @@ "files": [ | ||
"types": "./src/index.ts", | ||
"version": "0.0.0-nightly-20240827223927" | ||
"version": "0.0.0-nightly-20240829182208" | ||
} |
@@ -89,2 +89,4 @@ const errorCodes = { | ||
wallet_polkadot_not_found: 20701, | ||
wallet_radix_not_found: 20801, | ||
wallet_radix_transaction_failed: 20802, | ||
/** | ||
@@ -134,2 +136,3 @@ * Chainflip | ||
toolbox_evm_error_sending_transaction: 90212, | ||
toolbox_radix_signer_not_defined: 90301, | ||
/** | ||
@@ -136,0 +139,0 @@ * Helpers |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
316873
4242
+ Added@swapkit/tokens@0.0.0-nightly-20240829182208(transitive)
- Removed@swapkit/tokens@0.0.0-nightly-20240827223927(transitive)