Socket
Socket
Sign inDemoInstall

@swapkit/helpers

Package Overview
Dependencies
Maintainers
0
Versions
203
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swapkit/helpers - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

4

dist/index.js

@@ -1,2 +0,2 @@

var e=((x)=>typeof require!=="undefined"?require:typeof Proxy!=="undefined"?new Proxy(x,{get:(F,n)=>(typeof require!=="undefined"?require:F)[n]}):x)(function(x){if(typeof require!=="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+x+'" is not supported')});export*from"@swapkit/contracts";var d;((O)=>{O.Arbitrum="https://arb1.arbitrum.io/rpc";O.Avalanche="https://node-router.thorswap.net/avalanche-c";O.BinanceSmartChain="https://bsc-dataseed.binance.org";O.Bitcoin="https://node-router.thorswap.net/bitcoin";O.BitcoinCash="https://node-router.thorswap.net/bitcoin-cash";O.Chainflip="wss://mainnet-archive.chainflip.io";O.Cosmos="https://node-router.thorswap.net/cosmos/rpc";O.Dash="https://node-router.thorswap.net/dash";O.Dogecoin="https://node-router.thorswap.net/dogecoin";O.Ethereum="https://node-router.thorswap.net/ethereum";O.Kujira="https://rpc-kujira.synergynodes.com/";O.Litecoin="https://node-router.thorswap.net/litecoin";O.Maya="https://tendermint.mayachain.info";O.MayaStagenet="https://stagenet.tendermint.mayachain.info";O.Optimism="https://mainnet.optimism.io";O.Polkadot="wss://rpc.polkadot.io";O.Polygon="https://polygon-rpc.com";O.Radix="https://radix-mainnet.rpc.grove.city/v1/326002fc/core";O.THORChain="https://rpc.thorswap.net";O.THORChainStagenet="https://stagenet-rpc.ninerealms.com";O.Solana="https://mainnet.helius-rpc.com/?api-key=2cbe3ae6-cfc5-4141-a093-0055d0fa3d80"})(d||={});var t;((k)=>{k.Arbitrum="https://arbiscan.io";k.Avalanche="https://snowtrace.io";k.BinanceSmartChain="https://bscscan.com";k.Bitcoin="https://blockchair.com/bitcoin";k.BitcoinCash="https://www.blockchair.com/bitcoin-cash";k.Chainflip="https://explorer.polkascan.io/polkadot";k.Cosmos="https://www.mintscan.io/cosmos";k.Dash="https://blockchair.com/dash";k.Dogecoin="https://blockchair.com/dogecoin";k.Ethereum="https://etherscan.io";k.Kujira="https://finder.kujira.network/kaiyo-1";k.Litecoin="https://blockchair.com/litecoin";k.Maya="https://www.mayascan.org";k.Optimism="https://optimistic.etherscan.io";k.Polkadot="https://polkadot.subscan.io";k.Polygon="https://polygonscan.com";k.Radix="https://dashboard.radixdlt.com";k.THORChain="https://runescan.io";k.Solana="https://solscan.io"})(t||={});var Y;((k)=>{k.Arbitrum="ARB";k.Avalanche="AVAX";k.BinanceSmartChain="BSC";k.Bitcoin="BTC";k.BitcoinCash="BCH";k.Cosmos="GAIA";k.Dash="DASH";k.Dogecoin="DOGE";k.Ethereum="ETH";k.Kujira="KUJI";k.Litecoin="LTC";k.Maya="MAYA";k.Optimism="OP";k.Polkadot="DOT";k.Chainflip="FLIP";k.Polygon="MATIC";k.Radix="XRD";k.THORChain="THOR";k.Solana="SOL"})(Y||={});var u;((P)=>{P.Arbitrum="42161";P.ArbitrumHex="0xa4b1";P.Avalanche="43114";P.AvalancheHex="0xa86a";P.BinanceSmartChain="56";P.BinanceSmartChainHex="0x38";P.Bitcoin="bitcoin";P.BitcoinCash="bitcoincash";P.Chainflip="chainflip";P.Cosmos="cosmoshub-4";P.Dash="dash";P.Dogecoin="dogecoin";P.Kujira="kaiyo-1";P.Ethereum="1";P.EthereumHex="0x1";P.Litecoin="litecoin";P.Maya="mayachain-mainnet-v1";P.MayaStagenet="mayachain-stagenet-v1";P.Optimism="10";P.OptimismHex="0xa";P.Polkadot="polkadot";P.Polygon="137";P.PolygonHex="0x89";P.Radix="radix-mainnet";P.THORChain="thorchain-mainnet-v1";P.THORChainStagenet="thorchain-stagenet-v2";P.Solana="solana"})(u||={});var kF={["0xa4b1"]:"ARB",["42161"]:"ARB",["0xa86a"]:"AVAX",["43114"]:"AVAX",["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"},$x=Object.keys(Y),C=Object.values(Y),z;((T)=>{T[T.ARB=18]="ARB";T[T.AVAX=18]="AVAX";T[T.BCH=8]="BCH";T[T.BSC=18]="BSC";T[T.BTC=8]="BTC";T[T.DASH=8]="DASH";T[T.DOGE=8]="DOGE";T[T.DOT=10]="DOT";T[T.ETH=18]="ETH";T[T.FLIP=18]="FLIP";T[T.GAIA=6]="GAIA";T[T.KUJI=6]="KUJI";T[T.LTC=8]="LTC";T[T.MATIC=18]="MATIC";T[T.MAYA=8]="MAYA";T[T.OP=18]="OP";T[T.SOL=9]="SOL";T[T.THOR=8]="THOR";T[T.XRD=18]="XRD";T[T.ZEC=8]="ZEC"})(z||={});var TF=["DOT","FLIP"],y=["ETH","AVAX","BSC","ARB","OP","MATIC"],_F=["BTC","BCH","DASH","DOGE","LTC"],GF=["GAIA","THOR","MAYA","KUJI"],LF=["AVAX","BSC","BTC","BCH","GAIA","DOGE","ETH","LTC","THOR"],PF=["ARB","DASH","ETH","KUJI","MAYA","THOR"],v=C.reduce((x,F)=>{const n=$x.find((H)=>Y[H]===F);if(n)x[F]=n;return x},{}),xx=C.reduce((x,F)=>{return x[F]=u[v[F]],x},{}),m=C.reduce((x,F)=>{return x[F]=d[v[F]],x},{}),AF=C.reduce((x,F)=>{const n=`${v[F]}Hex`;return x[F]=u[n],x},{}),OF=C.reduce((x,F)=>{return x[F]=t[v[F]],x},{});var Xx;((X)=>{X.TC_SUPPORTED_TO_TC_SUPPORTED="TC-TC";X.TC_SUPPORTED_TO_ETH="TC-ERC20";X.TC_SUPPORTED_TO_AVAX="TC-ARC20";X.TC_SUPPORTED_TO_BSC="TC-BEP20";X.ETH_TO_TC_SUPPORTED="ERC20-TC";X.ETH_TO_ETH="ERC20-ERC20";X.ETH_TO_AVAX="ERC20-ARC20";X.ETH_TO_BSC="ERC20-BEP20";X.AVAX_TO_TC_SUPPORTED="ARC20-TC";X.AVAX_TO_ETH="ARC20-ERC20";X.AVAX_TO_AVAX="ARC20-ARC20";X.AVAX_TO_BSC="ARC20-BEP20";X.BSC_TO_TC_SUPPORTED="BEP20-TC";X.BSC_TO_ETH="BEP20-ERC20";X.BSC_TO_AVAX="BEP20-ARC20";X.BSC_TO_BSC="BEP20-BEP20"})(Xx||={});var XF=["ERC20-ERC20","ARC20-ARC20","BEP20-BEP20"],jF=["ERC20-TC","ERC20-ARC20","ERC20-BEP20","ARC20-TC","ARC20-ERC20","ARC20-BEP20","BEP20-TC","BEP20-ERC20","BEP20-ARC20"],JF=["TC-TC","TC-ERC20","TC-ARC20","TC-BEP20"];var jx;((I)=>{I.ARB="0x0000000000000000000000000000000000000000";I.AVAX="0x0000000000000000000000000000000000000000";I.ETH="0x0000000000000000000000000000000000000000";I.BSC="0x0000000000000000000000000000000000000000";I.MATIC="0x0000000000000000000000000000000000001010";I.OP="0x4200000000000000000000000000000000000042"})(jx||={});var Jx;((k)=>{k.ARB="m/44'/60'/0'/0";k.AVAX="m/44'/60'/0'/0";k.BCH="m/44'/145'/0'/0";k.BSC="m/44'/60'/0'/0";k.BTC="m/84'/0'/0'/0";k.DASH="m/44'/5'/0'/0";k.DOGE="m/44'/3'/0'/0";k.DOT="////";k.ETH="m/44'/60'/0'/0";k.FLIP="////";k.GAIA="m/44'/118'/0'/0";k.KUJI="m/44'/118'/0'/0";k.LTC="m/84'/2'/0'/0";k.MATIC="m/44'/60'/0'/0";k.MAYA="m/44'/931'/0'/0";k.OP="m/44'/60'/0'/0";k.SOL="m/44'/501'/0'/0";k.THOR="m/44'/931'/0'/0";k.XRD="////"})(Jx||={});var s={ARB:[44,60,0,0,0],AVAX:[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 Fx;((T)=>{T.BRAVE="BRAVE";T.COINBASE_MOBILE="COINBASE_MOBILE";T.COINBASE_WEB="COINBASE_WEB";T.EIP6963="EIP6963";T.EXODUS="EXODUS";T.KEEPKEY="KEEPKEY";T.KEPLR="KEPLR";T.KEYSTORE="KEYSTORE";T.LEDGER="LEDGER";T.METAMASK="METAMASK";T.OKX="OKX";T.OKX_MOBILE="OKX_MOBILE";T.PHANTOM="PHANTOM";T.POLKADOT_JS="POLKADOT_JS";T.RADIX_WALLET="RADIX_WALLET";T.TREZOR="TREZOR";T.TALISMAN="TALISMAN";T.TRUSTWALLET_WEB="TRUSTWALLET_WEB";T.WALLETCONNECT="WALLETCONNECT";T.XDEFI="XDEFI"})(Fx||={});var zx;((H)=>{H[H.NoError=36864]="NoError";H[H.LockedDevice=21781]="LockedDevice";H[H.TC_NotFound=65535]="TC_NotFound"})(zx||={});var Zx;((H)=>{H.Average="average";H.Fast="fast";H.Fastest="fastest"})(Zx||={});var Yx;((n)=>{n.Approve="approve";n.CheckOnly="checkOnly"})(Yx||={});var nx;((L)=>{L.NAME_REGISTER="~";L.BOND="BOND";L.DEPOSIT="+";L.LEAVE="LEAVE";L.UNBOND="UNBOND";L.WITHDRAW="-";L.OPEN_LOAN="$+";L.CLOSE_LOAN="$-";L.RUNEPOOL_DEPOSIT="POOL+";L.RUNEPOOL_WITHDRAW="POOL-"})(nx||={});var wx;((h)=>{h.unknownError="unknownError";h.test_error="test_error";h.providerDetailsError="providerDetailsError";h.blockHeaderNotFound="blockHeaderNotFound";h.blockHashNotFoundAtHeight="blockHashNotFoundAtHeight";h.blockHashNotFoundAtHash="blockHashNotFoundAtHash";h.txHashMissing="txHashMissing";h.assetValueMissingInfo="assetValueMissingInfo";h.invalidAsset="invalidAsset";h.blockIsRequired="blockIsRequired";h.currentBlockHeaderNotFound="currentBlockHeaderNotFound";h.failedToRetrieveBalance="failedToRetrieveBalance";h.failedToRetrieveBlock="failedToRetrieveBlock";h.failedToRetrieveFees="failedToRetrieveFees";h.notImplementedBCH="notImplementedBCH";h.notImplementedDoge="notImplementedDoge";h.noPoolsFound="noPoolsFound";h.noVaultsFound="noVaultsFound";h.noTxFound="noTxFound";h.noInputCoinFound="noInputCoinFound";h.noBlockDataFound="noBlockDataFound";h.multipleCosmosMessages="multipleCosmosMessages";h.heightOrHashNotProvided="heightOrHashNotProvided";h.unknownDenom="unknownDenom";h.invalidBlockHeight="invalidBlockHeight";h.timestampExtrinsicNoArgumentsForBlock="timestampExtrinsicNoArgumentsForBlock";h.timestampExtrinsicNoTimestampForBlock="timestampExtrinsicNoTimestampForBlock";h.noTimestampExtrinsicForHash="noTimestampExtrinsicForHash";h.timestampExtrinsicNoArgumentsForHash="timestampExtrinsicNoArgumentsForHash";h.txMemoUndefined="txMemoUndefined";h.txMemoIncorrect="txMemoIncorrect";h.txTypeNotFound="txTypeNotFound";h.txNoMessage="txNoMessage";h.txNotFound="txNotFound";h.txReceiptNotFound="txReceiptNotFound";h.txParsingError="txParsingError";h.blockNotFound="blockNotFound";h.balanceNotFound="balanceNotFound";h.configError="configError";h.noQuoteResponse="noQuoteResponse";h.noPoolAssetsFound="noPoolAssetsFound";h.noThorchainPools="noThorchainPools";h.noMayachainPools="noMayachainPools";h.invalidAffiliateFee="invalidAffiliateFee";h.invalidBuyAssetAddress="invalidBuyAssetAddress";h.invalidSellAssetAddress="invalidSellAssetAddress";h.invalidSourceAddress="invalidSourceAddress";h.invalidDestinationAddress="invalidDestinationAddress";h.sourceAddressIsSmartContract="sourceAddressIsSmartContract";h.destinationAddressIsSmartContract="destinationAddressIsSmartContract";h.invalidChainId="invalidChainId";h.unsupportedChainId="unsupportedChainId";h.unsupportedEVMChainId="unsupportedEVMChainId";h.noWhitelistTokens="noWhitelistTokens";h.failedFetchGasPrice="failedFetchGasPrice";h.failedToCreateDepositChannel="failedToCreateDepositChannel";h.noProviderDetailsFound="noProviderDetailsFound";h.noTokenListsFound="noTokenListsFound";h.tokenNotFound="tokenNotFound";h.tokenPriceNotFound="tokenPriceNotFound";h.swapAmountTooSmall="swapAmountTooSmall";h.legsArrayIsEmpty="legsArrayIsEmpty";h.failedToFetchQuoteForLeg="failedToFetchQuoteForLeg";h.noBlockHeaderFound="noBlockHeaderFound";h.failedToSimulateSwap="failedToSimulateSwap";h.addressScreeningFailed="addressScreeningFailed";h.noLiquidtyProvidersFound="noLiquidtyProvidersFound";h.noSaversFound="noSaversFound";h.noInboundAddressesFound="noInboundAddressesFound";h.noInboundAddressFoundForChain="noInboundAddressFoundForChain";h.noLastBlocksFound="noLastBlocksFound";h.noVersionFound="noVersionFound";h.noConstantsFound="noConstantsFound";h.noMimirsFound="noMimirsFound";h.noRoutesFound="noRoutesFound";h.quoteNotFound="quoteNotFound";h.ledgerSignFailed="ledgerSignFailed";h.ledgerFetchSwapFailed="ledgerFetchSwapFailed";h.failedToFetchTx="failedToFetchTx";h.failedBuildTransactionDetails="failedBuildTransactionDetails";h.noLegsForRoute="noLegsForRoute";h.noRouterAddressFound="noRouterAddressFound";h.noAggregatorAddressFound="noAggregatorAddressFound";h.noContractInstanceFound="noContractInstanceFound";h.noContractAddressFound="noContractAddressFound";h.invalidAffiliate="invalidAffiliate";h.providerNotfound="No provider found";h.noRecordFound="No Record found";h.slippageTooLow="Slippage too low";h.tradingHalted="tradingHalted";h.noWrappedGasAsset="noWrappedGasAsset";h.aggregatorAddressNotFound="aggregatorAddressNotFound";h.routerAddressNotFound="routerAddressNotFound";h.dummyAddressNotFound="dummyAddressNotFound";h.trackerError="trackerError";h.noOhlcvDataFound="noOhlcvDataFound";h.noTradingPairs="noTradingPairs";h.noLoanPositionFound="noLoanPositionFound";h.noLendingAvailability="noLendingAvailability";h.lendingRepayTooSmall="lendingRepayTooSmall";h.missingState="missingState";h.ledgerSwapNotFound="ledgerSwapNotFound";h.ledgerSwapNotReadyForTracking="ledgerSwapNotReadyForTracking";h.errorEstimatingGas="errorEstimatingGas";h.apiKeyInvalid="apiKeyInvalid";h.apiKeyFailedToUpdate="apiKeyFailedToUpdate";h.apiKeyExpired="apiKeyExpired";h.unauthorized="unauthorized";h.failedToCreateMemo="failedToCreateMemo";h.radixIncorrectInstructions="radixIncorrectInstructions";h.invalidAddressForChain="invalidAddressForChain"})(wx||={});var Qx;((n)=>{n.highSlippage="highSlippage";n.highPriceImpact="highPriceImpact"})(Qx||={});var qx;((J)=>{J.CHAINFLIP="CHAINFLIP";J.MAYACHAIN="MAYACHAIN";J.MAYACHAIN_STREAMING="MAYACHAIN_STREAMING";J.ONEINCH="ONEINCH";J.PANCAKESWAP="PANCAKESWAP";J.PANGOLIN_V1="PANGOLIN_V1";J.SUSHISWAP_V2="SUSHISWAP_V2";J.THORCHAIN="THORCHAIN";J.THORCHAIN_STREAMING="THORCHAIN_STREAMING";J.TRADERJOE_V2="TRADERJOE_V2";J.UNISWAP_V2="UNISWAP_V2";J.UNISWAP_V3="UNISWAP_V3";J.CAVIAR_V1="CAVIAR_V1"})(qx||={});var Bx;((I)=>{I.LIQUIDITY="liquidity";I.NETWORK="network";I.INBOUND="inbound";I.OUTBOUND="outbound";I.AFFILIATE="affiliate";I.TAX="tax"})(Bx||={});import{red as kx,yellow as Mx}from"picocolors";var Wx={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 j extends Error{static ErrorCode=Wx;constructor(x,F){const n=typeof x==="string",H=n?x:x.errorKey;if(F)console.error(F,{stack:F?.stack,message:F?.message});super(H,{cause:{code:j.ErrorCode[H],message:`${H}${n?"":`: ${JSON.stringify(x.info)}`}`}});Object.setPrototypeOf(this,j.prototype)}}function yF(x){if(x<0)throw new j({errorKey:"helpers_invalid_number_of_years",info:{numberOfYears:x}});return 10+x}function vF(x){if(x<0)throw new j({errorKey:"helpers_invalid_number_of_years",info:{numberOfYears:x}});return Math.round((10+x*1.0512)*10000000000)/10000000000}function oF(x,F){try{return x()}catch(n){if(F)throw new j(F,n);return console.error(n)}}function EF(x){switch(x){case"THOR":return`${x}.RUNE`;case"GAIA":return`${x}.ATOM`;case"BSC":return`${x}`;default:return`${x}.${x}`}}function Nx(x,F){if(!Kx&&x){if(Hx.has(F))return;Hx.add(F),console.warn(F)}}var Kx=["production","test"].includes("development"),Hx=new Set;function Rx(x=""){const F=x.toUpperCase(),[n]=F.split(".");if(hx.includes(n))return!0;const[H]=F.split("/");if(hx.includes(H))return!0;throw new j({errorKey:"helpers_invalid_identifier",info:{message:`Invalid identifier: ${x}. Expected format: <Chain>.<Ticker> or <Chain>.<Ticker>-<ContractAddress>`,identifier:x}})}function dF(x){if(x.length>30)return!1;const F=/^[a-zA-Z0-9+_-]+$/g;return!!x.match(F)}var hx=[...Object.values(Y),"TERRA"];function V({value:x,bigIntDecimal:F=U,decimal:n=U}){if(n===0)return x.toString();const H=x<0n;let N=x.toString().substring(H?1:0);const R=n-(N.length-1);if(R>0)N="0".repeat(R)+N;const I=N.length-n;let _=N.slice(-n);if(Number.parseInt(_[F]||"0")>=5)_=`${_.substring(0,F-1)}${(Number.parseInt(_[F-1]||"0")+1).toString()}`;else _=_.substring(0,F);return`${H?"-":""}${N.slice(0,I)}.${_}`.replace(/\.?0*$/,"")}function o(x){const n=`${typeof x==="number"?Vx.format(x):i(x)}`.replaceAll(",",".").split(".");return n.length>1?`${n.slice(0,-1).join("")}.${n.at(-1)}`:n[0]||"0"}function Ix(x){const F=x.split(".")[1]?.length||0;return Math.max(F,U)}function i(x){return typeof x==="object"?"getValue"in x?x.getValue("string"):x.value:x}var U=8,W=(x)=>10n**BigInt(x),S=(x)=>Math.log10(Number.parseFloat(x.toString()));class B{decimalMultiplier=10n**8n;bigIntValue=0n;decimal;static fromBigInt(x,F){return new B({decimal:F,value:V({value:x,bigIntDecimal:F,decimal:F})})}static shiftDecimals({value:x,from:F,to:n}){return B.fromBigInt(x.getBaseValue("bigint")*W(n)/W(F),n)}constructor(x){const F=i(x),n=typeof x==="object";this.decimal=n?x.decimal:void 0,this.decimalMultiplier=n&&"decimalMultiplier"in x?x.decimalMultiplier:W(Math.max(Ix(o(F)),this.decimal||0)),this.#N(F)}set(x){return new this.constructor({decimal:this.decimal,value:x,identifier:this.toString()})}add(...x){return this.#F("add",...x)}sub(...x){return this.#F("sub",...x)}mul(...x){return this.#F("mul",...x)}div(...x){return this.#F("div",...x)}gt(x){return this.#x("gt",x)}gte(x){return this.#x("gte",x)}lt(x){return this.#x("lt",x)}lte(x){return this.#x("lte",x)}eqValue(x){return this.#x("eqValue",x)}getValue(x){const F=this.formatBigIntToSafeValue(this.bigIntValue,this.decimal||S(this.decimalMultiplier));switch(x){case"number":return Number(F);case"string":return F;case"bigint":return this.bigIntValue*10n**BigInt(this.decimal||8n)/this.decimalMultiplier}}getBaseValue(x){const F=this.decimalMultiplier/W(this.decimal||8),n=this.bigIntValue/F;switch(x){case"number":return Number(n);case"string":return n.toString();case"bigint":return n}}getBigIntValue(x,F){if(!F&&typeof x==="object")return x.bigIntValue;const n=i(x),H=o(n);if(H==="0"||H==="undefined")return 0n;return this.#H(H,F)}toSignificant(x=6){const[F,n]=this.getValue("string").split("."),H=F||"",N=n||"";if((Number.parseInt(H)?H.length+N.length:N.length)<=x)return this.getValue("string");if(H.length>=x)return H.slice(0,x).padEnd(H.length,"0");if(Number.parseInt(H))return`${H}.${N.slice(0,x-H.length)}`.padEnd(x-H.length,"0");const I=Number.parseInt(N),_=`${I}`.slice(0,x);return`0.${_.padStart(N.length-`${I}`.length+_.length,"0")}`}toFixed(x=6){const[F,n]=this.getValue("string").split("."),H=F||"",N=n||"";if(Number.parseInt(H))return`${H}.${N.slice(0,x)}`.padEnd(x,"0");const R=Number.parseInt(N),I=`${R}`.slice(0,x);return`0.${I.padStart(N.length-`${R}`.length+I.length,"0")}`}toAbbreviation(x=2){const F=this.getValue("number"),n=["","K","M","B","T","Q","Qi","S"],H=Math.floor(Math.log10(Math.abs(F))/3),N=n[H];if(!N)return this.getValue("string");const R=10**(H*3);return`${(F/R).toFixed(x)}${N}`}toCurrency(x="$",{currencyPosition:F="start",decimal:n=2,decimalSeparator:H=".",thousandSeparator:N=","}={}){const R=this.getValue("number"),[I="",_=""]=R.toFixed(6).split("."),A=I.replace(/\B(?=(\d{3})+(?!\d))/g,N),G=I||_?I==="0"?`${Number.parseFloat(`0.${_}`)}`.replace(".",H):`${A}${Number.parseInt(_)?`${H}${_.slice(0,n)}`:""}`:"0.00";return`${F==="start"?x:""}${G}${F==="end"?x:""}`}formatBigIntToSafeValue(x,F){const n=F||this.decimal||U,H=Math.max(n,S(this.decimalMultiplier)),N=x<0n,R=x.toString().substring(N?1:0),I=H-(R.length-1),_=I>0?"0".repeat(I)+R:R,A=_.length-H;let G=_.slice(-H);if(Number.parseInt(G[n]||"0")>=5)G=`${G.substring(0,n-1)}${(Number.parseInt(G[n-1]||"0")+1).toString()}`;else G=G.substring(0,n);return`${N?"-":""}${_.slice(0,A)}.${G}`.replace(/\.?0*$/,"")}#F(x,...F){const n=this.#n(this,...F),H=Math.max(n,S(this.decimalMultiplier)),N=W(H),R=F.reduce((_,A)=>{const G=this.getBigIntValue(A,H);switch(x){case"add":return _+G;case"sub":return _-G;case"mul":return _*G/N;case"div":{if(G===0n)throw new RangeError("Division by zero");return _*N/G}default:return _}},this.bigIntValue*N/this.decimalMultiplier),I=V({bigIntDecimal:H,decimal:H,value:R});return new this.constructor({decimalMultiplier:W(H),decimal:this.decimal,value:I,identifier:this.toString()})}#x(x,...F){const n=this.#n(this,...F),H=this.getBigIntValue(F[0]||"0",n),N=this.getBigIntValue(this,n);switch(x){case"gt":return N>H;case"gte":return N>=H;case"lt":return N<H;case"lte":return N<=H;case"eqValue":return N===H}}#N(x){const F=o(x)||"0";this.bigIntValue=this.#H(F)}#n(...x){const F=x.map((n)=>{return typeof n==="object"?n.decimal||S(n.decimalMultiplier):Ix(o(n))}).filter(Boolean);return Math.max(...F,U)}#H(x,F){const n=F?W(F):this.decimalMultiplier,H=S(n),[N="",R=""]=x.split(".");return BigInt(`${N}${R.padEnd(H,"0")}`)}}var Vx=Intl.NumberFormat("fullwide",{useGrouping:!1,maximumFractionDigits:20});function nn(x){const F=$.from({chain:x});switch(x){case"BTC":case"LTC":case"BCH":case"DASH":return F.set(0.00010001);case"DOGE":return F.set(1.00000001);case"AVAX":case"ETH":case"ARB":case"BSC":return F.set(0.00000001);case"THOR":case"MAYA":return F.set(0);case"GAIA":case"KUJI":return F.set(0.000001);default:return F.set(0.00000001)}}async function Cx(x,F=0){Rx(x);const n=E.get(x.toUpperCase()),H=n?.decimal||await _x(l(x));if(!n)E.set(x.toUpperCase(),{identifier:x,decimal:H});return new $({decimal:H,value:b(F,H),identifier:x})}function Sx(x,F=0){const n=x.split(".")?.[0]?.toUpperCase(),H=n?["MAYA","THOR"].includes(n):!1,[N,R]=H?x.split(".").slice(1).join().split("/"):x.split("/");if(!(N&&R&&H))throw new j({errorKey:"helpers_invalid_asset_identifier",info:{identifier:x}});return new $({decimal:8,value:b(F,8),identifier:`${n}.${N}/${R}`})}function b(x,F){return typeof x==="bigint"?V({value:x,bigIntDecimal:F,decimal:F}):x}function l(x){const F=x.slice(0,14).includes("/"),n=x.split(".")?.[0]?.toUpperCase()==="THOR",H=x.split(".")?.[0]?.toUpperCase()==="MAYA",[N,R=""]=n||H?x.split(".").slice(1).join().split("/"):x.split("/");if(F&&!(N&&R))throw new j({errorKey:"helpers_invalid_asset_identifier",info:{identifier:x}});const I=x.includes(".")&&!F?x:`${H?"MAYA":"THOR"}.${R}`,[_,...A]=I.split("."),G=F?R:A.join("."),L=G.split("-"),Z=L.length===1?L[0]:L.slice(0,-1).join("-"),Q=L.length===1?void 0:L[L.length-1];return{address:Q?.toLowerCase(),chain:_,isGasAsset:a({chain:_,symbol:G}),isSynthetic:F,ticker:Z,symbol:(F?`${N}/`:"")+(Q?`${Z}-${Q?.toLowerCase()??""}`:G)}}var E=new Map;class $ extends B{address;chain;isGasAsset=!1;isSynthetic=!1;symbol;tax;ticker;type;chainId;constructor({value:x,decimal:F,tax:n,chain:H,symbol:N,identifier:R}){super(typeof x==="object"?x:{decimal:F,value:x});const I=l(R||`${H}.${N}`);this.type=Lx(I),this.tax=n,this.chain=I.chain,this.ticker=I.ticker,this.symbol=I.symbol,this.address=I.address,this.isSynthetic=I.isSynthetic,this.isGasAsset=I.isGasAsset,this.chainId=xx[I.chain]}toString(){return this.isSynthetic?this.symbol:`${this.chain}.${this.symbol}`}toUrl(){return this.isSynthetic?`${this.chain}.${this.symbol.replace("/",".")}`:this.toString()}eqAsset({chain:x,symbol:F}){return this.chain===x&&this.symbol===F}eq(x){return this.eqAsset(x)&&this.eqValue(x)}static fromUrl(x,F=0){const[n,H,N]=x.split(".");if(!(n&&H))throw new j({errorKey:"helpers_invalid_asset_url",info:{urlAsset:x}});const R=n==="THOR"&&N?`${n}.${H}/${N}`:x;return $.from({asset:R,value:F})}static from({value:x=0,fromBaseDecimal:F,asyncTokenLookup:n,...H}){const N=x instanceof B?x.getValue("string"):x,R="chain"in H,I=R?H.chain:H.asset,_=R||Tx.includes(I),{identifier:A,decimal:G}=_?Gx(I):{identifier:I,decimal:void 0},{chain:L,isSynthetic:Z}=l(A),Q=E.get(A.toUpperCase()),J=Q?.decimal||G;Nx(!(n||J),Mx(`Couldn't find static decimal for ${kx(A)} (Using default ${kx(z[L])} decimal as fallback).
var e=((x)=>typeof require!=="undefined"?require:typeof Proxy!=="undefined"?new Proxy(x,{get:(F,n)=>(typeof require!=="undefined"?require:F)[n]}):x)(function(x){if(typeof require!=="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+x+'" is not supported')});export*from"@swapkit/contracts";var d;((O)=>{O.Arbitrum="https://arb1.arbitrum.io/rpc";O.Avalanche="https://node-router.thorswap.net/avalanche-c";O.BinanceSmartChain="https://bsc-dataseed.binance.org";O.Bitcoin="https://node-router.thorswap.net/bitcoin";O.BitcoinCash="https://node-router.thorswap.net/bitcoin-cash";O.Chainflip="wss://mainnet-archive.chainflip.io";O.Cosmos="https://node-router.thorswap.net/cosmos/rpc";O.Dash="https://node-router.thorswap.net/dash";O.Dogecoin="https://node-router.thorswap.net/dogecoin";O.Ethereum="https://node-router.thorswap.net/ethereum";O.Kujira="https://rpc-kujira.synergynodes.com/";O.Litecoin="https://node-router.thorswap.net/litecoin";O.Maya="https://tendermint.mayachain.info";O.MayaStagenet="https://stagenet.tendermint.mayachain.info";O.Optimism="https://mainnet.optimism.io";O.Polkadot="wss://rpc.polkadot.io";O.Polygon="https://polygon-rpc.com";O.Radix="https://radix-mainnet.rpc.grove.city/v1/326002fc/core";O.THORChain="https://rpc.thorswap.net";O.THORChainStagenet="https://stagenet-rpc.ninerealms.com";O.Solana="https://mainnet.helius-rpc.com/?api-key=2cbe3ae6-cfc5-4141-a093-0055d0fa3d80"})(d||={});var t;((k)=>{k.Arbitrum="https://arbiscan.io";k.Avalanche="https://snowtrace.io";k.BinanceSmartChain="https://bscscan.com";k.Bitcoin="https://blockchair.com/bitcoin";k.BitcoinCash="https://www.blockchair.com/bitcoin-cash";k.Chainflip="https://explorer.polkascan.io/polkadot";k.Cosmos="https://www.mintscan.io/cosmos";k.Dash="https://blockchair.com/dash";k.Dogecoin="https://blockchair.com/dogecoin";k.Ethereum="https://etherscan.io";k.Kujira="https://finder.kujira.network/kaiyo-1";k.Litecoin="https://blockchair.com/litecoin";k.Maya="https://www.mayascan.org";k.Optimism="https://optimistic.etherscan.io";k.Polkadot="https://polkadot.subscan.io";k.Polygon="https://polygonscan.com";k.Radix="https://dashboard.radixdlt.com";k.THORChain="https://runescan.io";k.Solana="https://solscan.io"})(t||={});var Y;((k)=>{k.Arbitrum="ARB";k.Avalanche="AVAX";k.BinanceSmartChain="BSC";k.Bitcoin="BTC";k.BitcoinCash="BCH";k.Cosmos="GAIA";k.Dash="DASH";k.Dogecoin="DOGE";k.Ethereum="ETH";k.Kujira="KUJI";k.Litecoin="LTC";k.Maya="MAYA";k.Optimism="OP";k.Polkadot="DOT";k.Chainflip="FLIP";k.Polygon="MATIC";k.Radix="XRD";k.THORChain="THOR";k.Solana="SOL"})(Y||={});var u;((P)=>{P.Arbitrum="42161";P.ArbitrumHex="0xa4b1";P.Avalanche="43114";P.AvalancheHex="0xa86a";P.BinanceSmartChain="56";P.BinanceSmartChainHex="0x38";P.Bitcoin="bitcoin";P.BitcoinCash="bitcoincash";P.Chainflip="chainflip";P.Cosmos="cosmoshub-4";P.Dash="dash";P.Dogecoin="dogecoin";P.Kujira="kaiyo-1";P.Ethereum="1";P.EthereumHex="0x1";P.Litecoin="litecoin";P.Maya="mayachain-mainnet-v1";P.MayaStagenet="mayachain-stagenet-v1";P.Optimism="10";P.OptimismHex="0xa";P.Polkadot="polkadot";P.Polygon="137";P.PolygonHex="0x89";P.Radix="radix-mainnet";P.THORChain="thorchain-mainnet-v1";P.THORChainStagenet="thorchain-stagenet-v2";P.Solana="solana"})(u||={});var kF={["0xa4b1"]:"ARB",["42161"]:"ARB",["0xa86a"]:"AVAX",["43114"]:"AVAX",["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"},$x=Object.keys(Y),C=Object.values(Y),z;((T)=>{T[T.ARB=18]="ARB";T[T.AVAX=18]="AVAX";T[T.BCH=8]="BCH";T[T.BSC=18]="BSC";T[T.BTC=8]="BTC";T[T.DASH=8]="DASH";T[T.DOGE=8]="DOGE";T[T.DOT=10]="DOT";T[T.ETH=18]="ETH";T[T.FLIP=18]="FLIP";T[T.GAIA=6]="GAIA";T[T.KUJI=6]="KUJI";T[T.LTC=8]="LTC";T[T.MATIC=18]="MATIC";T[T.MAYA=8]="MAYA";T[T.OP=18]="OP";T[T.SOL=9]="SOL";T[T.THOR=8]="THOR";T[T.XRD=18]="XRD";T[T.ZEC=8]="ZEC"})(z||={});var TF=["DOT","FLIP"],y=["ETH","AVAX","BSC","ARB","OP","MATIC"],_F=["BTC","BCH","DASH","DOGE","LTC"],GF=["GAIA","THOR","MAYA","KUJI"],LF=["AVAX","BSC","BTC","BCH","GAIA","DOGE","ETH","LTC","THOR"],PF=["ARB","DASH","ETH","KUJI","MAYA","THOR"],v=C.reduce((x,F)=>{const n=$x.find((H)=>Y[H]===F);if(n)x[F]=n;return x},{}),xx=C.reduce((x,F)=>{return x[F]=u[v[F]],x},{}),m=C.reduce((x,F)=>{return x[F]=d[v[F]],x},{}),AF=C.reduce((x,F)=>{const n=`${v[F]}Hex`;return x[F]=u[n],x},{}),OF=C.reduce((x,F)=>{return x[F]=t[v[F]],x},{});var Xx;((X)=>{X.TC_SUPPORTED_TO_TC_SUPPORTED="TC-TC";X.TC_SUPPORTED_TO_ETH="TC-ERC20";X.TC_SUPPORTED_TO_AVAX="TC-ARC20";X.TC_SUPPORTED_TO_BSC="TC-BEP20";X.ETH_TO_TC_SUPPORTED="ERC20-TC";X.ETH_TO_ETH="ERC20-ERC20";X.ETH_TO_AVAX="ERC20-ARC20";X.ETH_TO_BSC="ERC20-BEP20";X.AVAX_TO_TC_SUPPORTED="ARC20-TC";X.AVAX_TO_ETH="ARC20-ERC20";X.AVAX_TO_AVAX="ARC20-ARC20";X.AVAX_TO_BSC="ARC20-BEP20";X.BSC_TO_TC_SUPPORTED="BEP20-TC";X.BSC_TO_ETH="BEP20-ERC20";X.BSC_TO_AVAX="BEP20-ARC20";X.BSC_TO_BSC="BEP20-BEP20"})(Xx||={});var XF=["ERC20-ERC20","ARC20-ARC20","BEP20-BEP20"],jF=["ERC20-TC","ERC20-ARC20","ERC20-BEP20","ARC20-TC","ARC20-ERC20","ARC20-BEP20","BEP20-TC","BEP20-ERC20","BEP20-ARC20"],JF=["TC-TC","TC-ERC20","TC-ARC20","TC-BEP20"];var jx;((I)=>{I.ARB="0x0000000000000000000000000000000000000000";I.AVAX="0x0000000000000000000000000000000000000000";I.ETH="0x0000000000000000000000000000000000000000";I.BSC="0x0000000000000000000000000000000000000000";I.MATIC="0x0000000000000000000000000000000000001010";I.OP="0x4200000000000000000000000000000000000042"})(jx||={});var Jx;((k)=>{k.ARB="m/44'/60'/0'/0";k.AVAX="m/44'/60'/0'/0";k.BCH="m/44'/145'/0'/0";k.BSC="m/44'/60'/0'/0";k.BTC="m/84'/0'/0'/0";k.DASH="m/44'/5'/0'/0";k.DOGE="m/44'/3'/0'/0";k.DOT="////";k.ETH="m/44'/60'/0'/0";k.FLIP="////";k.GAIA="m/44'/118'/0'/0";k.KUJI="m/44'/118'/0'/0";k.LTC="m/84'/2'/0'/0";k.MATIC="m/44'/60'/0'/0";k.MAYA="m/44'/931'/0'/0";k.OP="m/44'/60'/0'/0";k.SOL="m/44'/501'/0'/0";k.THOR="m/44'/931'/0'/0";k.XRD="////"})(Jx||={});var s={ARB:[44,60,0,0,0],AVAX:[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 Fx;((T)=>{T.BRAVE="BRAVE";T.COINBASE_MOBILE="COINBASE_MOBILE";T.COINBASE_WEB="COINBASE_WEB";T.EIP6963="EIP6963";T.EXODUS="EXODUS";T.KEEPKEY="KEEPKEY";T.KEPLR="KEPLR";T.KEYSTORE="KEYSTORE";T.LEDGER="LEDGER";T.METAMASK="METAMASK";T.OKX="OKX";T.OKX_MOBILE="OKX_MOBILE";T.PHANTOM="PHANTOM";T.POLKADOT_JS="POLKADOT_JS";T.RADIX_WALLET="RADIX_WALLET";T.TREZOR="TREZOR";T.TALISMAN="TALISMAN";T.TRUSTWALLET_WEB="TRUSTWALLET_WEB";T.WALLETCONNECT="WALLETCONNECT";T.XDEFI="XDEFI"})(Fx||={});var zx;((H)=>{H[H.NoError=36864]="NoError";H[H.LockedDevice=21781]="LockedDevice";H[H.TC_NotFound=65535]="TC_NotFound"})(zx||={});var Zx;((H)=>{H.Average="average";H.Fast="fast";H.Fastest="fastest"})(Zx||={});var Yx;((n)=>{n.Approve="approve";n.CheckOnly="checkOnly"})(Yx||={});var nx;((L)=>{L.NAME_REGISTER="~";L.BOND="BOND";L.DEPOSIT="+";L.LEAVE="LEAVE";L.UNBOND="UNBOND";L.WITHDRAW="-";L.OPEN_LOAN="$+";L.CLOSE_LOAN="$-";L.RUNEPOOL_DEPOSIT="POOL+";L.RUNEPOOL_WITHDRAW="POOL-"})(nx||={});var wx;((h)=>{h.unknownError="unknownError";h.test_error="test_error";h.providerDetailsError="providerDetailsError";h.blockHeaderNotFound="blockHeaderNotFound";h.blockHashNotFoundAtHeight="blockHashNotFoundAtHeight";h.blockHashNotFoundAtHash="blockHashNotFoundAtHash";h.txHashMissing="txHashMissing";h.assetValueMissingInfo="assetValueMissingInfo";h.invalidAsset="invalidAsset";h.blockIsRequired="blockIsRequired";h.currentBlockHeaderNotFound="currentBlockHeaderNotFound";h.failedToRetrieveBalance="failedToRetrieveBalance";h.failedToRetrieveBlock="failedToRetrieveBlock";h.failedToRetrieveFees="failedToRetrieveFees";h.notImplementedBCH="notImplementedBCH";h.notImplementedDoge="notImplementedDoge";h.noPoolsFound="noPoolsFound";h.noVaultsFound="noVaultsFound";h.noTxFound="noTxFound";h.noInputCoinFound="noInputCoinFound";h.noBlockDataFound="noBlockDataFound";h.multipleCosmosMessages="multipleCosmosMessages";h.heightOrHashNotProvided="heightOrHashNotProvided";h.unknownDenom="unknownDenom";h.invalidBlockHeight="invalidBlockHeight";h.timestampExtrinsicNoArgumentsForBlock="timestampExtrinsicNoArgumentsForBlock";h.timestampExtrinsicNoTimestampForBlock="timestampExtrinsicNoTimestampForBlock";h.noTimestampExtrinsicForHash="noTimestampExtrinsicForHash";h.timestampExtrinsicNoArgumentsForHash="timestampExtrinsicNoArgumentsForHash";h.txMemoUndefined="txMemoUndefined";h.txMemoIncorrect="txMemoIncorrect";h.txTypeNotFound="txTypeNotFound";h.txNoMessage="txNoMessage";h.txNotFound="txNotFound";h.txReceiptNotFound="txReceiptNotFound";h.txParsingError="txParsingError";h.blockNotFound="blockNotFound";h.balanceNotFound="balanceNotFound";h.configError="configError";h.noQuoteResponse="noQuoteResponse";h.noPoolAssetsFound="noPoolAssetsFound";h.noThorchainPools="noThorchainPools";h.noMayachainPools="noMayachainPools";h.invalidAffiliateFee="invalidAffiliateFee";h.invalidBuyAssetAddress="invalidBuyAssetAddress";h.invalidSellAssetAddress="invalidSellAssetAddress";h.invalidSourceAddress="invalidSourceAddress";h.invalidDestinationAddress="invalidDestinationAddress";h.sourceAddressIsSmartContract="sourceAddressIsSmartContract";h.destinationAddressIsSmartContract="destinationAddressIsSmartContract";h.invalidChainId="invalidChainId";h.unsupportedChainId="unsupportedChainId";h.unsupportedEVMChainId="unsupportedEVMChainId";h.noWhitelistTokens="noWhitelistTokens";h.failedFetchGasPrice="failedFetchGasPrice";h.failedToCreateDepositChannel="failedToCreateDepositChannel";h.noProviderDetailsFound="noProviderDetailsFound";h.noTokenListsFound="noTokenListsFound";h.tokenNotFound="tokenNotFound";h.tokenPriceNotFound="tokenPriceNotFound";h.swapAmountTooSmall="swapAmountTooSmall";h.legsArrayIsEmpty="legsArrayIsEmpty";h.failedToFetchQuoteForLeg="failedToFetchQuoteForLeg";h.noBlockHeaderFound="noBlockHeaderFound";h.failedToSimulateSwap="failedToSimulateSwap";h.addressScreeningFailed="addressScreeningFailed";h.noLiquidtyProvidersFound="noLiquidtyProvidersFound";h.noSaversFound="noSaversFound";h.noInboundAddressesFound="noInboundAddressesFound";h.noInboundAddressFoundForChain="noInboundAddressFoundForChain";h.noLastBlocksFound="noLastBlocksFound";h.noVersionFound="noVersionFound";h.noConstantsFound="noConstantsFound";h.noMimirsFound="noMimirsFound";h.noRoutesFound="noRoutesFound";h.quoteNotFound="quoteNotFound";h.ledgerSignFailed="ledgerSignFailed";h.ledgerFetchSwapFailed="ledgerFetchSwapFailed";h.failedToFetchTx="failedToFetchTx";h.failedBuildTransactionDetails="failedBuildTransactionDetails";h.noLegsForRoute="noLegsForRoute";h.noRouterAddressFound="noRouterAddressFound";h.noAggregatorAddressFound="noAggregatorAddressFound";h.noContractInstanceFound="noContractInstanceFound";h.noContractAddressFound="noContractAddressFound";h.invalidAffiliate="invalidAffiliate";h.providerNotfound="No provider found";h.noRecordFound="No Record found";h.slippageTooLow="Slippage too low";h.tradingHalted="tradingHalted";h.noWrappedGasAsset="noWrappedGasAsset";h.aggregatorAddressNotFound="aggregatorAddressNotFound";h.routerAddressNotFound="routerAddressNotFound";h.dummyAddressNotFound="dummyAddressNotFound";h.trackerError="trackerError";h.noOhlcvDataFound="noOhlcvDataFound";h.noTradingPairs="noTradingPairs";h.noLoanPositionFound="noLoanPositionFound";h.noLendingAvailability="noLendingAvailability";h.lendingRepayTooSmall="lendingRepayTooSmall";h.missingState="missingState";h.ledgerSwapNotFound="ledgerSwapNotFound";h.ledgerSwapNotReadyForTracking="ledgerSwapNotReadyForTracking";h.errorEstimatingGas="errorEstimatingGas";h.apiKeyInvalid="apiKeyInvalid";h.apiKeyFailedToUpdate="apiKeyFailedToUpdate";h.apiKeyExpired="apiKeyExpired";h.unauthorized="unauthorized";h.failedToCreateMemo="failedToCreateMemo";h.radixIncorrectInstructions="radixIncorrectInstructions";h.invalidAddressForChain="invalidAddressForChain"})(wx||={});var Qx;((n)=>{n.highSlippage="highSlippage";n.highPriceImpact="highPriceImpact"})(Qx||={});var qx;((J)=>{J.CHAINFLIP="CHAINFLIP";J.MAYACHAIN="MAYACHAIN";J.MAYACHAIN_STREAMING="MAYACHAIN_STREAMING";J.ONEINCH="ONEINCH";J.PANCAKESWAP="PANCAKESWAP";J.PANGOLIN_V1="PANGOLIN_V1";J.SUSHISWAP_V2="SUSHISWAP_V2";J.THORCHAIN="THORCHAIN";J.THORCHAIN_STREAMING="THORCHAIN_STREAMING";J.TRADERJOE_V2="TRADERJOE_V2";J.UNISWAP_V2="UNISWAP_V2";J.UNISWAP_V3="UNISWAP_V3";J.CAVIAR_V1="CAVIAR_V1"})(qx||={});var Bx;((I)=>{I.LIQUIDITY="liquidity";I.NETWORK="network";I.INBOUND="inbound";I.OUTBOUND="outbound";I.AFFILIATE="affiliate";I.TAX="tax"})(Bx||={});import{red as kx,yellow as Mx}from"picocolors";var Wx={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 j extends Error{static ErrorCode=Wx;constructor(x,F){const n=typeof x==="string",H=n?x:x.errorKey;if(F)console.error(F,{stack:F?.stack,message:F?.message});super(H,{cause:{code:j.ErrorCode[H],message:`${H}${n?"":`: ${JSON.stringify(x.info)}`}`}});Object.setPrototypeOf(this,j.prototype)}}function yF(x){if(x<0)throw new j({errorKey:"helpers_invalid_number_of_years",info:{numberOfYears:x}});return 10+x}function vF(x){if(x<0)throw new j({errorKey:"helpers_invalid_number_of_years",info:{numberOfYears:x}});return Math.round((10+x*1.0512)*10000000000)/10000000000}function oF(x,F){try{return x()}catch(n){if(F)throw new j(F,n);return console.error(n)}}function EF(x){switch(x){case"THOR":return`${x}.RUNE`;case"GAIA":return`${x}.ATOM`;case"BSC":return`${x}`;default:return`${x}.${x}`}}function Nx(x,F){if(!Kx&&x){if(Hx.has(F))return;Hx.add(F),console.warn(F)}}var Kx=["production","test"].includes("development"),Hx=new Set;function Rx(x=""){const F=x.toUpperCase(),[n]=F.split(".");if(hx.includes(n))return!0;const[H]=F.split("/");if(hx.includes(H))return!0;throw new j({errorKey:"helpers_invalid_identifier",info:{message:`Invalid identifier: ${x}. Expected format: <Chain>.<Ticker> or <Chain>.<Ticker>-<ContractAddress>`,identifier:x}})}function dF(x){if(x.length>30)return!1;const F=/^[a-zA-Z0-9+_-]+$/g;return!!x.match(F)}var hx=[...Object.values(Y),"TERRA"];function V({value:x,bigIntDecimal:F=U,decimal:n=U}){if(n===0)return x.toString();const H=x<0n;let N=x.toString().substring(H?1:0);const R=n-(N.length-1);if(R>0)N="0".repeat(R)+N;const I=N.length-n;let _=N.slice(-n);if(Number.parseInt(_[F]||"0")>=5)_=`${_.substring(0,F-1)}${(Number.parseInt(_[F-1]||"0")+1).toString()}`;else _=_.substring(0,F);return`${H?"-":""}${N.slice(0,I)}.${_}`.replace(/\.?0*$/,"")}function o(x){const n=`${typeof x==="number"?Vx.format(x):i(x)}`.replaceAll(",",".").split(".");return n.length>1?`${n.slice(0,-1).join("")}.${n.at(-1)}`:n[0]||"0"}function Ix(x){const F=x.split(".")[1]?.length||0;return Math.max(F,U)}function i(x){return typeof x==="object"?"getValue"in x?x.getValue("string"):x.value:x}var U=8,W=(x)=>10n**BigInt(x),S=(x)=>Math.log10(Number.parseFloat(x.toString()));class B{decimalMultiplier=10n**8n;bigIntValue=0n;decimal;static fromBigInt(x,F){return new B({decimal:F,value:V({value:x,bigIntDecimal:F,decimal:F})})}static shiftDecimals({value:x,from:F,to:n}){return B.fromBigInt(x.getBaseValue("bigint")*W(n)/W(F),n)}constructor(x){const F=i(x),n=typeof x==="object";this.decimal=n?x.decimal:void 0,this.decimalMultiplier=n&&"decimalMultiplier"in x?x.decimalMultiplier:W(Math.max(Ix(o(F)),this.decimal||0)),this.#N(F)}set(x){return new this.constructor({decimal:this.decimal,value:x,identifier:this.toString()})}add(...x){return this.#F("add",...x)}sub(...x){return this.#F("sub",...x)}mul(...x){return this.#F("mul",...x)}div(...x){return this.#F("div",...x)}gt(x){return this.#x("gt",x)}gte(x){return this.#x("gte",x)}lt(x){return this.#x("lt",x)}lte(x){return this.#x("lte",x)}eqValue(x){return this.#x("eqValue",x)}getValue(x){const F=this.formatBigIntToSafeValue(this.bigIntValue,this.decimal||S(this.decimalMultiplier));switch(x){case"number":return Number(F);case"string":return F;case"bigint":return this.bigIntValue*10n**BigInt(this.decimal||8n)/this.decimalMultiplier}}getBaseValue(x){const F=this.decimalMultiplier/W(this.decimal||8),n=this.bigIntValue/F;switch(x){case"number":return Number(n);case"string":return n.toString();case"bigint":return n}}getBigIntValue(x,F){if(!F&&typeof x==="object")return x.bigIntValue;const n=i(x),H=o(n);if(H==="0"||H==="undefined")return 0n;return this.#H(H,F)}toSignificant(x=6){const[F,n]=this.getValue("string").split("."),H=F||"",N=n||"";if((Number.parseInt(H)?H.length+N.length:N.length)<=x)return this.getValue("string");if(H.length>=x)return H.slice(0,x).padEnd(H.length,"0");if(Number.parseInt(H))return`${H}.${N.slice(0,x-H.length)}`.padEnd(x-H.length,"0");const I=Number.parseInt(N),_=`${I}`.slice(0,x);return`0.${_.padStart(N.length-`${I}`.length+_.length,"0")}`}toFixed(x=6){const[F,n]=this.getValue("string").split("."),H=F||"",N=n||"";if(Number.parseInt(H))return`${H}.${N.slice(0,x)}`.padEnd(x,"0");const R=Number.parseInt(N),I=`${R}`.slice(0,x);return`0.${I.padStart(N.length-`${R}`.length+I.length,"0")}`}toAbbreviation(x=2){const F=this.getValue("number"),n=["","K","M","B","T","Q","Qi","S"],H=Math.floor(Math.log10(Math.abs(F))/3),N=n[H];if(!N)return this.getValue("string");const R=10**(H*3);return`${(F/R).toFixed(x)}${N}`}toCurrency(x="$",{currencyPosition:F="start",decimal:n=2,decimalSeparator:H=".",thousandSeparator:N=","}={}){const R=this.getValue("number"),[I="",_=""]=R.toFixed(6).split("."),A=I.replace(/\B(?=(\d{3})+(?!\d))/g,N),G=I||_?I==="0"?`${Number.parseFloat(`0.${_}`)}`.replace(".",H):`${A}${Number.parseInt(_)?`${H}${_.slice(0,n)}`:""}`:"0.00";return`${F==="start"?x:""}${G}${F==="end"?x:""}`}formatBigIntToSafeValue(x,F){const n=F||this.decimal||U,H=Math.max(n,S(this.decimalMultiplier)),N=x<0n,R=x.toString().substring(N?1:0),I=H-(R.length-1),_=I>0?"0".repeat(I)+R:R,A=_.length-H;let G=_.slice(-H);if(Number.parseInt(G[n]||"0")>=5)G=`${G.substring(0,n-1)}${(Number.parseInt(G[n-1]||"0")+1).toString()}`;else G=G.substring(0,n);return`${N?"-":""}${_.slice(0,A)}.${G}`.replace(/\.?0*$/,"")}#F(x,...F){const n=this.#n(this,...F),H=Math.max(n,S(this.decimalMultiplier)),N=W(H),R=F.reduce((_,A)=>{const G=this.getBigIntValue(A,H);switch(x){case"add":return _+G;case"sub":return _-G;case"mul":return _*G/N;case"div":{if(G===0n)throw new RangeError("Division by zero");return _*N/G}default:return _}},this.bigIntValue*N/this.decimalMultiplier),I=V({bigIntDecimal:H,decimal:H,value:R});return new this.constructor({decimalMultiplier:W(H),decimal:this.decimal,value:I,identifier:this.toString()})}#x(x,...F){const n=this.#n(this,...F),H=this.getBigIntValue(F[0]||"0",n),N=this.getBigIntValue(this,n);switch(x){case"gt":return N>H;case"gte":return N>=H;case"lt":return N<H;case"lte":return N<=H;case"eqValue":return N===H}}#N(x){const F=o(x)||"0";this.bigIntValue=this.#H(F)}#n(...x){const F=x.map((n)=>{return typeof n==="object"?n.decimal||S(n.decimalMultiplier):Ix(o(n))}).filter(Boolean);return Math.max(...F,U)}#H(x,F){const n=F?W(F):this.decimalMultiplier,H=S(n),[N="",R=""]=x.split(".");return BigInt(`${N}${R.padEnd(H,"0")}`)}}var Vx=Intl.NumberFormat("fullwide",{useGrouping:!1,maximumFractionDigits:20});function nn(x){const F=$.from({chain:x});switch(x){case"BTC":case"LTC":case"BCH":case"DASH":return F.set(0.00010001);case"DOGE":return F.set(1.00000001);case"AVAX":case"ETH":case"ARB":case"BSC":return F.set(0.00000001);case"THOR":case"MAYA":return F.set(0);case"GAIA":case"KUJI":return F.set(0.000001);default:return F.set(0.00000001)}}async function Cx(x,F=0){Rx(x);const n=E.get(x.toUpperCase()),H=n?.decimal||await _x(l(x));if(!n)E.set(x.toUpperCase(),{identifier:x,decimal:H});return new $({decimal:H,value:b(F,H),identifier:x})}function Sx(x,F=0){const n=x.split(".")?.[0]?.toUpperCase()||"THOR",H=n?["MAYA","THOR"].includes(n):!1,[N,R]=H?x.split(".").slice(1).join().split("/"):x.split("/");if(!(N&&R&&H))throw new j({errorKey:"helpers_invalid_asset_identifier",info:{identifier:x}});return new $({decimal:8,value:b(F,8),identifier:`${n}.${N}/${R}`})}function b(x,F){return typeof x==="bigint"?V({value:x,bigIntDecimal:F,decimal:F}):x}function l(x){const F=x.slice(0,14).includes("/"),n=x.split(".")?.[0]?.toUpperCase()==="THOR",H=x.split(".")?.[0]?.toUpperCase()==="MAYA",[N,R=""]=n||H?x.split(".").slice(1).join().split("/"):x.split("/");if(F&&!(N&&R))throw new j({errorKey:"helpers_invalid_asset_identifier",info:{identifier:x}});const I=x.includes(".")&&!F?x:`${H?"MAYA":"THOR"}.${R}`,[_,...A]=I.split("."),G=F?R:A.join("."),L=G.split("-"),Z=L.length===1?L[0]:L.slice(0,-1).join("-"),Q=L.length===1?void 0:L[L.length-1];return{address:Q?.toLowerCase(),chain:_,isGasAsset:a({chain:_,symbol:G}),isSynthetic:F,ticker:Z,symbol:(F?`${N}/`:"")+(Q?`${Z}-${Q?.toLowerCase()??""}`:G)}}var E=new Map;class $ extends B{address;chain;isGasAsset=!1;isSynthetic=!1;symbol;tax;ticker;type;chainId;constructor({value:x,decimal:F,tax:n,chain:H,symbol:N,identifier:R}){super(typeof x==="object"?x:{decimal:F,value:x});const I=l(R||`${H}.${N}`);this.type=Lx(I),this.tax=n,this.chain=I.chain,this.ticker=I.ticker,this.symbol=I.symbol,this.address=I.address,this.isSynthetic=I.isSynthetic,this.isGasAsset=I.isGasAsset,this.chainId=xx[I.chain]}toString(){return this.isSynthetic?this.symbol:`${this.chain}.${this.symbol}`}toUrl(){return this.isSynthetic?`${this.chain}.${this.symbol.replace("/",".")}`:this.toString()}eqAsset({chain:x,symbol:F}){return this.chain===x&&this.symbol===F}eq(x){return this.eqAsset(x)&&this.eqValue(x)}static fromUrl(x,F=0){const[n,H,N]=x.split(".");if(!(n&&H))throw new j({errorKey:"helpers_invalid_asset_url",info:{urlAsset:x}});const R=n==="THOR"&&N?`${n}.${H}/${N}`:x;return $.from({asset:R,value:F})}static from({value:x=0,fromBaseDecimal:F,asyncTokenLookup:n,...H}){const N=x instanceof B?x.getValue("string"):x,R="chain"in H,I=R?H.chain:H.asset,_=R||Tx.includes(I),{identifier:A,decimal:G}=_?Gx(I):{identifier:I,decimal:void 0},{chain:L,isSynthetic:Z}=l(A),Q=E.get(A.toUpperCase()),J=Q?.decimal||G;Nx(!(n||J),Mx(`Couldn't find static decimal for ${kx(A)} (Using default ${kx(z[L])} 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=37FFF642195568CA64756E2164756E21
//# debugId=FAEC43C26A5646F164756E2164756E21

@@ -10,8 +10,8 @@ {

"devDependencies": {
"@swapkit/toolbox-cosmos": "1.0.19",
"@swapkit/toolbox-evm": "1.2.0",
"@swapkit/toolbox-solana": "1.0.17",
"@swapkit/toolbox-radix": "1.0.17",
"@swapkit/toolbox-substrate": "1.1.12",
"@swapkit/toolbox-utxo": "1.1.0"
"@swapkit/toolbox-cosmos": "1.0.20",
"@swapkit/toolbox-evm": "1.2.1",
"@swapkit/toolbox-solana": "1.0.18",
"@swapkit/toolbox-radix": "1.0.18",
"@swapkit/toolbox-substrate": "1.1.13",
"@swapkit/toolbox-utxo": "1.1.1"
},

@@ -41,3 +41,3 @@ "files": [

"types": "./src/index.ts",
"version": "1.4.0"
"version": "1.4.1"
}

@@ -292,3 +292,3 @@ import { red, yellow } from "picocolors";

function createSyntheticAssetValue(identifier: string, value: NumberPrimitives = 0) {
const chain = identifier.split(".")?.[0]?.toUpperCase() as Chain | undefined;
const chain = (identifier.split(".")?.[0]?.toUpperCase() as Chain) || Chain.THORChain;
const isMayaOrThor = chain ? [Chain.Maya, Chain.THORChain].includes(chain) : false;

@@ -295,0 +295,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc