Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@coinmasters/types

Package Overview
Dependencies
Maintainers
2
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coinmasters/types - npm Package Compare versions

Comparing version 4.2.0 to 4.2.1

10

dist/index.d.ts

@@ -90,2 +90,4 @@ /// <reference types="node" />

export declare const CENTRALIZED_SWAPPER: QuoteMode[];
export declare enum Chain {

@@ -232,2 +234,4 @@ Arbitrum = "ARB",

export declare function classifySwap(quoteMode: QuoteMode): "AGG_SWAP" | "SWAP_IN" | "SWAP_OUT" | "OSMOSIS_SWAP" | "CENTRALIZED_SWAPPER" | null;
export declare type ConnectConfig = {

@@ -547,2 +551,4 @@ stagenet?: boolean;

export declare const OSMOSIS_SWAP: QuoteMode[];
export declare enum QuoteMode {

@@ -564,3 +570,5 @@ TC_SUPPORTED_TO_TC_SUPPORTED = "TC-TC",

BSC_TO_AVAX = "BEP20-ARC20",
BSC_TO_BSC = "BEP20-BEP20"
BSC_TO_BSC = "BEP20-BEP20",
GAIA_TO_OSMO = "OSMOSIS-IBC",
CHANGELLY = "CHANGELLY"
}

@@ -567,0 +575,0 @@

150

dist/index.es.js

@@ -1,5 +0,5 @@

var f = Object.defineProperty;
var B = (e, a, s) => a in e ? f(e, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[a] = s;
var h = Object.defineProperty;
var B = (e, a, s) => a in e ? h(e, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[a] = s;
var r = (e, a, s) => (B(e, typeof a != "symbol" ? a + "" : a, s), s);
const X = [
const Z = [
{ inputs: [], stateMutability: "nonpayable", type: "constructor" },

@@ -102,3 +102,3 @@ {

}
], K = [
], J = [
{

@@ -278,3 +278,3 @@ inputs: [{ internalType: "address", name: "rune", type: "address" }],

}
], k = [
], j = [
{ inputs: [], stateMutability: "nonpayable", type: "constructor" },

@@ -443,3 +443,3 @@ {

}
], Y = [
], $ = [
{ inputs: [], stateMutability: "nonpayable", type: "constructor" },

@@ -597,4 +597,10 @@ {

];
var g = /* @__PURE__ */ ((e) => (e.TC_SUPPORTED_TO_TC_SUPPORTED = "TC-TC", e.TC_SUPPORTED_TO_ETH = "TC-ERC20", e.TC_SUPPORTED_TO_AVAX = "TC-ARC20", e.TC_SUPPORTED_TO_BSC = "TC-BEP20", e.ETH_TO_TC_SUPPORTED = "ERC20-TC", e.ETH_TO_ETH = "ERC20-ERC20", e.ETH_TO_AVAX = "ERC20-ARC20", e.ETH_TO_BSC = "ERC20-BEP20", e.AVAX_TO_TC_SUPPORTED = "ARC20-TC", e.AVAX_TO_ETH = "ARC20-ERC20", e.AVAX_TO_AVAX = "ARC20-ARC20", e.AVAX_TO_BSC = "ARC20-BEP20", e.BSC_TO_TC_SUPPORTED = "BEP20-TC", e.BSC_TO_ETH = "BEP20-ERC20", e.BSC_TO_AVAX = "BEP20-ARC20", e.BSC_TO_BSC = "BEP20-BEP20", e))(g || {});
const W = [
var g = /* @__PURE__ */ ((e) => (e.TC_SUPPORTED_TO_TC_SUPPORTED = "TC-TC", e.TC_SUPPORTED_TO_ETH = "TC-ERC20", e.TC_SUPPORTED_TO_AVAX = "TC-ARC20", e.TC_SUPPORTED_TO_BSC = "TC-BEP20", e.ETH_TO_TC_SUPPORTED = "ERC20-TC", e.ETH_TO_ETH = "ERC20-ERC20", e.ETH_TO_AVAX = "ERC20-ARC20", e.ETH_TO_BSC = "ERC20-BEP20", e.AVAX_TO_TC_SUPPORTED = "ARC20-TC", e.AVAX_TO_ETH = "ARC20-ERC20", e.AVAX_TO_AVAX = "ARC20-ARC20", e.AVAX_TO_BSC = "ARC20-BEP20", e.BSC_TO_TC_SUPPORTED = "BEP20-TC", e.BSC_TO_ETH = "BEP20-ERC20", e.BSC_TO_AVAX = "BEP20-ARC20", e.BSC_TO_BSC = "BEP20-BEP20", e.GAIA_TO_OSMO = "OSMOSIS-IBC", e.CHANGELLY = "CHANGELLY", e))(g || {});
const b = [
"OSMOSIS-IBC"
/* GAIA_TO_OSMO */
], P = [
"CHANGELLY"
/* CHANGELLY */
], V = [
"ERC20-ERC20",

@@ -604,3 +610,3 @@ "ARC20-ARC20",

/* BSC_TO_BSC */
], Z = [
], H = [
"ERC20-TC",

@@ -616,3 +622,3 @@ "ERC20-ARC20",

/* BSC_TO_AVAX */
], J = [
], L = [
"TC-TC",

@@ -624,4 +630,7 @@ "TC-ERC20",

];
var S = /* @__PURE__ */ ((e) => (e.VALIDATION_ERROR = "VALIDATION_ERROR", e.REQUEST_PARAMETER_ERROR = "REQUEST_PARAMETER_ERROR", e.RESPONSE_PARSING_ERROR = "RESPONSE_PARSING_ERROR", e.UNSUPPORTED = "UNSUPPORTED", e.NOT_IMPLEMENTED = "NOT_IMPLEMENTED", e.INCOMPATIBLE_ASSETS_OPERATIONS = "INCOMPATIBLE_ASSETS_OPERATIONS", e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e.DOWN_FOR_MAINTENANCE = "DOWN_FOR_MAINTENANCE", e.MISSING_INBOUND_INFO = "MISSING_INBOUND_INFO", e.QUOTE_FETCHING_ERROR = "QUOTE_FETCHING_ERROR", e.AIRDROP_ERROR = "AIRDROP_ERROR", e.UNHANDLED_ERROR = "UNHANDLED_ERROR", e))(S || {}), b = /* @__PURE__ */ ((e) => (e.HEALTH_CONTROLLER = "1000", e.LIQUIDITY_CONTROLLER = "1001", e.PROVIDER_CONTROLLER = "1002", e.QUOTE_CONTROLLER = "1003", e.SWAP_CONTROLLER = "1004", e.UTIL_CONTROLLER = "1005", e.AIRDROP_CONTROLLER = "1006", e.PROVIDER = "2000", e.ASSET = "2001", e.TOKEN_LIST = "2002", e.QUOTE = "2100", e.QUOTE_TXN_DETAILS = "2101", e.THORCHAIN_PROVIDER = "3000", e.UNISWAPV2_ETH_PROVIDER = "3001", e.UNISWAPV3_ETH_PROVIDER = "3002", e.SUSHISWAP_ETH_PROVIDER = "3003", e.PANCAKESWAP_BSC_PROVIDER = "3004", e.PANCAKESWAP_ETH_PROVIDER = "3005", e.ONEINCH_ETH_PROVIDER = "3006", e.ONEINCH_BSC_PROVIDER = "3007", e.ONEINCH_AVAX_PROVIDER = "3008", e.ZEROX_ETH_PROVIDER = "3009", e.WOOFI_AVAX_PROVIDER = "3010", e.PANGOLIN_AVAX_PROVIDER = "3011", e.TRADERJOE_AVAX_PROVIDER = "3012", e.KYBER_ETH_PROVIDER = "3013", e.KYBER_AVAX_PROVIDER = "3014", e.WOOFI_BSC_PROVIDER = "3015", e.STARGATE_PROVIDER = "3016", e.PROVIDER_UTIL = "4000", e.TXN_DETAILS = "5000", e.AIRDROP_UTIL = "6000", e))(b || {}), n = /* @__PURE__ */ ((e) => (e.INVALID_INPUT_PARAMETERS = "1000", e.UNKNOWN_PROVIDERS = "1001", e.CANNOT_FIND_INBOUND_ADDRESS = "1002", e.NO_INBOUND_ADDRESSES = "1003", e.CHAIN_HALTED_OR_UNSUPPORTED = "1004", e.MISSING_INPUT_PARAMETER = "1005", e.INVALID_TYPE_GENERIC = "1100", e.INVALID_NUMBER_STRING = "1101", e.INVALID_NUMBER = "1102", e.INVALID_BOOLEAN = "1103", e.INVALID_OBJECT = "1104", e.INVALID_ARRAY = "1105", e.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2000", e.SELL_BUY_ASSETS_ARE_THE_SAME = "2001", e.MISSING_SOURCE_ADDRESS_FOR_SYNTH = "2002", e.AFF_ADDRESS_AND_BPS_OR_NEITHER = "2003", e.AFF_ADDRESS_TOO_LONG = "2004", e.AFF_BPS_INTEGER_0_100 = "2005", e.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN = "2006", e.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN = "2007", e.PREFERRED_PROFVIDER_NOT_SUPPORTED = "2008", e.DESTINATION_ADDRESS_SMART_CONTRACT = "2009", e.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2010", e.SOURCE_ADDRESS_SMART_CONTRACT = "2011", e.INVALID_PROVIDER = "2100", e.MISSING_CROSS_CHAIN_PROVIDER = "2101", e.MISSING_AVAX_PROVIDER = "2102", e.MISSING_BSC_PROVIDER = "2103", e.MISSING_ETH_PROVIDER = "2104", e.INVALID_PROVIDER_FOR_SWAP_OUT = "2105", e.MISSING_ARB_PROVIDER = "2106", e.INVALID_CHAIN = "2200", e.INVALID_ASSET = "2201", e.INVALID_ASSET_IDENTIFIER = "2202", e.UNSUPPORTED_CHAIN = "2204", e.UNSUPPORTED_ASSET = "2203", e.UNSUPPORTED_ASSET_FOR_SWAPOUT = "2205", e.INVALID_SOURCE_ADDRESS = "2300", e.INVALID_DESTINATION_ADDRESS = "2301", e.THORNODE_QUOTE_GENERIC_ERROR = "3000", e.NOT_ENOUGH_SYNTH_BALANCE = "3001", e.SYNTH_MINTING_CAP_REACHED = "3002", e.INVALID_QUOTE_MODE = "4000", e.NO_QUOTES = "4001", e.SERVICE_UNAVAILABLE_GENERIC = "5000", e.MISSING_GAS_DATA_GENERIC = "5100", e.MISSING_TOKEN_INFO_GENERIC = "5200", e.CANT_FIND_TOKEN_LIST = "5201", e.NO_PRICE = "5202", e.PRICE_IS_STALE = "5203", e.ADDRESS_NOT_WHITELISTED = "6000", e.ADDRESS_ALREADY_CLAIMED = "6001", e.TEMPORARY_ERROR = "9999", e))(n || {});
const V = {
function q(e) {
return V.includes(e) ? "AGG_SWAP" : H.includes(e) ? "SWAP_IN" : L.includes(e) ? "SWAP_OUT" : b.includes(e) ? "OSMOSIS_SWAP" : P.includes(e) ? "CENTRALIZED_SWAPPER" : null;
}
var S = /* @__PURE__ */ ((e) => (e.VALIDATION_ERROR = "VALIDATION_ERROR", e.REQUEST_PARAMETER_ERROR = "REQUEST_PARAMETER_ERROR", e.RESPONSE_PARSING_ERROR = "RESPONSE_PARSING_ERROR", e.UNSUPPORTED = "UNSUPPORTED", e.NOT_IMPLEMENTED = "NOT_IMPLEMENTED", e.INCOMPATIBLE_ASSETS_OPERATIONS = "INCOMPATIBLE_ASSETS_OPERATIONS", e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e.DOWN_FOR_MAINTENANCE = "DOWN_FOR_MAINTENANCE", e.MISSING_INBOUND_INFO = "MISSING_INBOUND_INFO", e.QUOTE_FETCHING_ERROR = "QUOTE_FETCHING_ERROR", e.AIRDROP_ERROR = "AIRDROP_ERROR", e.UNHANDLED_ERROR = "UNHANDLED_ERROR", e))(S || {}), R = /* @__PURE__ */ ((e) => (e.HEALTH_CONTROLLER = "1000", e.LIQUIDITY_CONTROLLER = "1001", e.PROVIDER_CONTROLLER = "1002", e.QUOTE_CONTROLLER = "1003", e.SWAP_CONTROLLER = "1004", e.UTIL_CONTROLLER = "1005", e.AIRDROP_CONTROLLER = "1006", e.PROVIDER = "2000", e.ASSET = "2001", e.TOKEN_LIST = "2002", e.QUOTE = "2100", e.QUOTE_TXN_DETAILS = "2101", e.THORCHAIN_PROVIDER = "3000", e.UNISWAPV2_ETH_PROVIDER = "3001", e.UNISWAPV3_ETH_PROVIDER = "3002", e.SUSHISWAP_ETH_PROVIDER = "3003", e.PANCAKESWAP_BSC_PROVIDER = "3004", e.PANCAKESWAP_ETH_PROVIDER = "3005", e.ONEINCH_ETH_PROVIDER = "3006", e.ONEINCH_BSC_PROVIDER = "3007", e.ONEINCH_AVAX_PROVIDER = "3008", e.ZEROX_ETH_PROVIDER = "3009", e.WOOFI_AVAX_PROVIDER = "3010", e.PANGOLIN_AVAX_PROVIDER = "3011", e.TRADERJOE_AVAX_PROVIDER = "3012", e.KYBER_ETH_PROVIDER = "3013", e.KYBER_AVAX_PROVIDER = "3014", e.WOOFI_BSC_PROVIDER = "3015", e.STARGATE_PROVIDER = "3016", e.PROVIDER_UTIL = "4000", e.TXN_DETAILS = "5000", e.AIRDROP_UTIL = "6000", e))(R || {}), n = /* @__PURE__ */ ((e) => (e.INVALID_INPUT_PARAMETERS = "1000", e.UNKNOWN_PROVIDERS = "1001", e.CANNOT_FIND_INBOUND_ADDRESS = "1002", e.NO_INBOUND_ADDRESSES = "1003", e.CHAIN_HALTED_OR_UNSUPPORTED = "1004", e.MISSING_INPUT_PARAMETER = "1005", e.INVALID_TYPE_GENERIC = "1100", e.INVALID_NUMBER_STRING = "1101", e.INVALID_NUMBER = "1102", e.INVALID_BOOLEAN = "1103", e.INVALID_OBJECT = "1104", e.INVALID_ARRAY = "1105", e.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2000", e.SELL_BUY_ASSETS_ARE_THE_SAME = "2001", e.MISSING_SOURCE_ADDRESS_FOR_SYNTH = "2002", e.AFF_ADDRESS_AND_BPS_OR_NEITHER = "2003", e.AFF_ADDRESS_TOO_LONG = "2004", e.AFF_BPS_INTEGER_0_100 = "2005", e.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN = "2006", e.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN = "2007", e.PREFERRED_PROFVIDER_NOT_SUPPORTED = "2008", e.DESTINATION_ADDRESS_SMART_CONTRACT = "2009", e.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2010", e.SOURCE_ADDRESS_SMART_CONTRACT = "2011", e.INVALID_PROVIDER = "2100", e.MISSING_CROSS_CHAIN_PROVIDER = "2101", e.MISSING_AVAX_PROVIDER = "2102", e.MISSING_BSC_PROVIDER = "2103", e.MISSING_ETH_PROVIDER = "2104", e.INVALID_PROVIDER_FOR_SWAP_OUT = "2105", e.MISSING_ARB_PROVIDER = "2106", e.INVALID_CHAIN = "2200", e.INVALID_ASSET = "2201", e.INVALID_ASSET_IDENTIFIER = "2202", e.UNSUPPORTED_CHAIN = "2204", e.UNSUPPORTED_ASSET = "2203", e.UNSUPPORTED_ASSET_FOR_SWAPOUT = "2205", e.INVALID_SOURCE_ADDRESS = "2300", e.INVALID_DESTINATION_ADDRESS = "2301", e.THORNODE_QUOTE_GENERIC_ERROR = "3000", e.NOT_ENOUGH_SYNTH_BALANCE = "3001", e.SYNTH_MINTING_CAP_REACHED = "3002", e.INVALID_QUOTE_MODE = "4000", e.NO_QUOTES = "4001", e.SERVICE_UNAVAILABLE_GENERIC = "5000", e.MISSING_GAS_DATA_GENERIC = "5100", e.MISSING_TOKEN_INFO_GENERIC = "5200", e.CANT_FIND_TOKEN_LIST = "5201", e.NO_PRICE = "5202", e.PRICE_IS_STALE = "5203", e.ADDRESS_NOT_WHITELISTED = "6000", e.ADDRESS_ALREADY_CLAIMED = "6001", e.TEMPORARY_ERROR = "9999", e))(n || {});
const D = {
[n.INVALID_INPUT_PARAMETERS]: "Invalid input parameters: {0}.",

@@ -678,3 +687,3 @@ [n.UNKNOWN_PROVIDERS]: "Unknown providers: {0}.",

}, u = (e, a) => {
let s = V[e];
let s = D[e];
for (let i = 0; i < a.length; i++)

@@ -690,5 +699,5 @@ s = s.replace(`{${i}}`, a[i]);

code: d,
message: N,
type: c,
options: { shouldLog: O, shouldThrow: C, shouldTrace: h } = {
message: c,
type: N,
options: { shouldLog: O, shouldThrow: C, shouldTrace: f } = {
shouldLog: !0,

@@ -700,3 +709,3 @@ shouldThrow: !0,

}) {
const A = N || u(d, o || []) || "";
const A = c || u(d, o || []) || "";
super(A);

@@ -713,5 +722,5 @@ r(this, "status");

r(this, "displayMessageParams");
this.status = s, this.revision = i || "NO_REVISION", this.module = _, this.message = A, this.display = u(d, o || []), this.code = d, this.type = c || S.UNHANDLED_ERROR, this.options = {
this.status = s, this.revision = i || "NO_REVISION", this.module = _, this.message = A, this.display = u(d, o || []), this.code = d, this.type = N || S.UNHANDLED_ERROR, this.options = {
shouldLog: O || !0,
shouldTrace: h || !0,
shouldTrace: f || !0,
shouldThrow: C || !1

@@ -741,3 +750,3 @@ }, this.displayMessageParams = o || [], this.options.shouldTrace && Error.captureStackTrace(this);

var t = /* @__PURE__ */ ((e) => (e.Arbitrum = "ARB", e.Avalanche = "AVAX", e.Base = "BASE", e.Binance = "BNB", e.BinanceSmartChain = "BSC", e.Bitcoin = "BTC", e.BitcoinCash = "BCH", e.Cosmos = "GAIA", e.Dash = "DASH", e.Digibyte = "DGB", e.Dogecoin = "DOGE", e.EOS = "EOS", e.Ethereum = "ETH", e.Kujira = "KUJI", e.Litecoin = "LTC", e.Maya = "MAYA", e.Optimism = "OP", e.Osmosis = "OSMO", e.Polygon = "MATIC", e.Ripple = "XRP", e.THORChain = "THOR", e.Zcash = "ZEC", e))(t || {});
function j(e) {
function z(e) {
switch (e) {

@@ -792,3 +801,3 @@ case "ARB":

}
const P = {
const x = {
ARB: "eip155:42161",

@@ -816,9 +825,9 @@ AVAX: "eip155:43114",

ZEC: "bip122:0000000000196a45"
}, H = {};
}, v = {};
for (const e in t) {
const a = P[t[e]];
H[a] = t[e];
const a = x[t[e]];
v[a] = t[e];
}
var x = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(x || {}), R = /* @__PURE__ */ ((e) => (e.ARB = "m/44'/60'/0'/0/0", e.AVAX = "m/44'/60'/0'/0/0", e.BASE = "m/44'/60'/0'/0/0", e.BCH = "m/44'/145'/0'/0/0", e.BNB = "m/44'/714'/0'/0/0", e.BSC = "m/44'/60'/0'/0/0", e.BTC = "m/84'/0'/0'/0/0", e.DOGE = "m/44'/3'/0'/0/0", e.DASH = "m/44'/5'/0'/0/0", e.DGB = "m/44'/20'/0'/0/0", e.ETH = "m/44'/60'/0'/0/0", e.EOS = "m/44'/194'/0'/0/0", e.GAIA = "m/44'/118'/0'/0/0", e.KUJI = "m/44'/118'/0'/0/0", e.LTC = "m/84'/2'/0'/0/0", e.MATIC = "m/44'/60'/0'/0/0", e.MAYA = "m/44'/931'/0'/0/0", e.OP = "m/44'/60'/0'/0/0", e.OSMO = "m/44'/118'/0'/0/0", e.XRP = "m/44'/144'/0'/0/0", e.THOR = "m/44'/931'/0'/0/0", e.ZEC = "m/44'/133'/0'/0/0", e))(R || {});
const $ = {
var M = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(M || {}), G = /* @__PURE__ */ ((e) => (e.ARB = "m/44'/60'/0'/0/0", e.AVAX = "m/44'/60'/0'/0/0", e.BASE = "m/44'/60'/0'/0/0", e.BCH = "m/44'/145'/0'/0/0", e.BNB = "m/44'/714'/0'/0/0", e.BSC = "m/44'/60'/0'/0/0", e.BTC = "m/84'/0'/0'/0/0", e.DOGE = "m/44'/3'/0'/0/0", e.DASH = "m/44'/5'/0'/0/0", e.DGB = "m/44'/20'/0'/0/0", e.ETH = "m/44'/60'/0'/0/0", e.EOS = "m/44'/194'/0'/0/0", e.GAIA = "m/44'/118'/0'/0/0", e.KUJI = "m/44'/118'/0'/0/0", e.LTC = "m/84'/2'/0'/0/0", e.MATIC = "m/44'/60'/0'/0/0", e.MAYA = "m/44'/931'/0'/0/0", e.OP = "m/44'/60'/0'/0/0", e.OSMO = "m/44'/118'/0'/0/0", e.XRP = "m/44'/144'/0'/0/0", e.THOR = "m/44'/931'/0'/0/0", e.ZEC = "m/44'/133'/0'/0/0", e))(G || {});
const Q = {
ARB: [44, 60, 0, 0, 0],

@@ -847,3 +856,3 @@ AVAX: [44, 60, 0, 0, 0],

};
var D = /* @__PURE__ */ ((e) => (e[e.ARB = 18] = "ARB", e[e.AVAX = 18] = "AVAX", e[e.BCH = 8] = "BCH", e[e.BNB = 8] = "BNB", e[e.BSC = 18] = "BSC", e[e.BTC = 8] = "BTC", e[e.DASH = 8] = "DASH", e[e.DGB = 8] = "DGB", e[e.DOGE = 8] = "DOGE", e[e.ETH = 18] = "ETH", e[e.EOS = 6] = "EOS", e[e.GAIA = 6] = "GAIA", e[e.KUJI = 6] = "KUJI", e[e.LTC = 8] = "LTC", e[e.MATIC = 18] = "MATIC", e[e.MAYA = 10] = "MAYA", e[e.OP = 18] = "OP", e[e.OSMO = 6] = "OSMO", e[e.XRP = 6] = "XRP", e[e.THOR = 8] = "THOR", e[e.ZEC = 8] = "ZEC", e))(D || {});
var w = /* @__PURE__ */ ((e) => (e[e.ARB = 18] = "ARB", e[e.AVAX = 18] = "AVAX", e[e.BCH = 8] = "BCH", e[e.BNB = 8] = "BNB", e[e.BSC = 18] = "BSC", e[e.BTC = 8] = "BTC", e[e.DASH = 8] = "DASH", e[e.DGB = 8] = "DGB", e[e.DOGE = 8] = "DOGE", e[e.ETH = 18] = "ETH", e[e.EOS = 6] = "EOS", e[e.GAIA = 6] = "GAIA", e[e.KUJI = 6] = "KUJI", e[e.LTC = 8] = "LTC", e[e.MATIC = 18] = "MATIC", e[e.MAYA = 10] = "MAYA", e[e.OP = 18] = "OP", e[e.OSMO = 6] = "OSMO", e[e.XRP = 6] = "XRP", e[e.THOR = 8] = "THOR", e[e.ZEC = 8] = "ZEC", e))(w || {});
const y = [

@@ -858,3 +867,3 @@ "ETH",

/* Polygon */
], q = [
], ee = [
"BTC",

@@ -868,3 +877,3 @@ "BCH",

/* Zcash */
], z = [
], te = [
"GAIA",

@@ -875,3 +884,3 @@ "THOR",

/* Osmosis */
], Q = [
], ne = [
"AVAX",

@@ -889,16 +898,16 @@ "BNB",

];
var m = /* @__PURE__ */ ((e) => (e.Arbitrum = "42161", e.ArbitrumHex = "0xa4b1", e.Avalanche = "43114", e.AvalancheHex = "0xa86a", e.Base = "8453", e.Binance = "Binance-Chain-Tigris", e.BinanceSmartChain = "56", e.BinanceSmartChainHex = "0x38", e.Bitcoin = "bitcoin", e.BitcoinCash = "bitcoincash", e.Cosmos = "cosmoshub-4", e.Dash = "dash", e.Dogecoin = "dogecoin", e.Kujira = "kaiyo-1", e.Ethereum = "1", e.EthereumHex = "0x1", e.Litecoin = "litecoin", e.Maya = "mayachain-mainnet-v1", e.MayaStagenet = "mayachain-stagenet-v1", e.Optimism = "10", e.OptimismHex = "0xa", e.Osmosis = "osmosis-1", e.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainStagenet = "thorchain-stagenet-v2", e))(m || {}), E = /* @__PURE__ */ ((e) => (e.Arbitrum = "https://arb1.arbitrum.io/rpc", e.Avalanche = "https://node-router.thorswap.net/avalanche-c", e.Binance = "https://base.llamarpc.com", e.BinanceSmartChain = "https://bsc-dataseed.binance.org", e.Base = "https://base.llamarpc.com", e.Bitcoin = "https://node-router.thorswap.net/bitcoin", e.BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash", e.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", e.Kujira = "https://rpc-kujira.synergynodes.com/", e.Dash = "https://dash.nownodes.io", e.Dogecoin = "https://node-router.thorswap.net/dogecoin", e.Ethereum = "https://node-router.thorswap.net/ethereum", e.Litecoin = "https://node-router.thorswap.net/litecoin", e.Maya = "https://tendermint.mayachain.info", e.MayaStagenet = "https://stagenet.tendermint.mayachain.info", e.Optimism = "https://mainnet.optimism.io", e.Osmosis = "https://lcd-osmosis.keplr.app", e.Polygon = "https://polygon-rpc.com", e.Ripple = "https://xrplcluster.com", e.THORChain = "https://rpc.thorswap.net", e.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", e))(E || {}), L = /* @__PURE__ */ ((e) => (e.Cosmos = "https://node-router.thorswap.net/cosmos/rest", e.Kujira = "https://lcd-kujira.synergynodes.com/", e.MayanodeMainnet = "https://mayanode.mayachain.info", e.MayanodeStagenet = "https://stagenet.mayanode.mayachain.info", e.ThornodeMainnet = "https://thornode.thorswap.net", e.ThornodeStagenet = "https://stagenet-thornode.ninerealms.com", e.ThorswapApi = "https://api.thorswap.net", e.ThorswapStatic = "https://static.thorswap.net", e))(L || {});
const p = Object.values(t), v = Object.keys(t), l = p.reduce(
var m = /* @__PURE__ */ ((e) => (e.Arbitrum = "42161", e.ArbitrumHex = "0xa4b1", e.Avalanche = "43114", e.AvalancheHex = "0xa86a", e.Base = "8453", e.Binance = "Binance-Chain-Tigris", e.BinanceSmartChain = "56", e.BinanceSmartChainHex = "0x38", e.Bitcoin = "bitcoin", e.BitcoinCash = "bitcoincash", e.Cosmos = "cosmoshub-4", e.Dash = "dash", e.Dogecoin = "dogecoin", e.Kujira = "kaiyo-1", e.Ethereum = "1", e.EthereumHex = "0x1", e.Litecoin = "litecoin", e.Maya = "mayachain-mainnet-v1", e.MayaStagenet = "mayachain-stagenet-v1", e.Optimism = "10", e.OptimismHex = "0xa", e.Osmosis = "osmosis-1", e.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainStagenet = "thorchain-stagenet-v2", e))(m || {}), E = /* @__PURE__ */ ((e) => (e.Arbitrum = "https://arb1.arbitrum.io/rpc", e.Avalanche = "https://node-router.thorswap.net/avalanche-c", e.Binance = "https://base.llamarpc.com", e.BinanceSmartChain = "https://bsc-dataseed.binance.org", e.Base = "https://base.llamarpc.com", e.Bitcoin = "https://node-router.thorswap.net/bitcoin", e.BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash", e.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", e.Kujira = "https://rpc-kujira.synergynodes.com/", e.Dash = "https://dash.nownodes.io", e.Dogecoin = "https://node-router.thorswap.net/dogecoin", e.Ethereum = "https://node-router.thorswap.net/ethereum", e.Litecoin = "https://node-router.thorswap.net/litecoin", e.Maya = "https://tendermint.mayachain.info", e.MayaStagenet = "https://stagenet.tendermint.mayachain.info", e.Optimism = "https://mainnet.optimism.io", e.Osmosis = "https://lcd-osmosis.keplr.app", e.Polygon = "https://polygon-rpc.com", e.Ripple = "https://xrplcluster.com", e.THORChain = "https://rpc.thorswap.net", e.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", e))(E || {}), U = /* @__PURE__ */ ((e) => (e.Cosmos = "https://node-router.thorswap.net/cosmos/rest", e.Kujira = "https://lcd-kujira.synergynodes.com/", e.MayanodeMainnet = "https://mayanode.mayachain.info", e.MayanodeStagenet = "https://stagenet.mayanode.mayachain.info", e.ThornodeMainnet = "https://thornode.thorswap.net", e.ThornodeStagenet = "https://stagenet-thornode.ninerealms.com", e.ThorswapApi = "https://api.thorswap.net", e.ThorswapStatic = "https://static.thorswap.net", e))(U || {});
const p = Object.values(t), F = Object.keys(t), l = p.reduce(
(e, a) => {
const s = v.find((i) => t[i] === a);
const s = F.find((i) => t[i] === a);
return s && (e[a] = s), e;
},
{}
), ee = p.reduce(
), ae = p.reduce(
(e, a) => (e[a] = m[l[a]], e),
{}
), te = p.reduce(
), se = p.reduce(
(e, a) => (e[a] = E[l[a]], e),
{}
), ne = p.reduce(
), re = p.reduce(
(e, a) => {

@@ -909,3 +918,3 @@ const s = `${l[a]}Hex`;

{}
), ae = {
), ie = {
"0xa4b1": "ARB",

@@ -938,3 +947,3 @@ 42161: "ARB",

/* THORChain */
}, se = {
}, pe = {
ARB: "https://arbiscan.io",

@@ -963,3 +972,3 @@ AVAX: "https://snowtrace.io",

};
var M = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e))(M || {}), G = /* @__PURE__ */ ((e) => (e.BOND = "BOND", e.DEPOSIT = "+", e.LEAVE = "LEAVE", e.THORNAME_REGISTER = "~", e.UNBOND = "UNBOND", e.WITHDRAW = "-", e.OPEN_LOAN = "$+", e.CLOSE_LOAN = "$-", e))(G || {}), w = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(w || {}), U = /* @__PURE__ */ ((e) => (e.KEYSTORE = "KEYSTORE", e.KEEPKEY = "KEEPKEY", e.XDEFI = "XDEFI", e.METAMASK = "METAMASK", e.COINBASE_WEB = "COINBASE_WEB", e.TREZOR = "TREZOR", e.TRUSTWALLET_WEB = "TRUSTWALLET_WEB", e.LEDGER = "LEDGER", e.KEPLR = "KEPLR", e.OKX = "OKX", e.BRAVE = "BRAVE", e.WALLETCONNECT = "WALLETCONNECT", e))(U || {});
var X = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e))(X || {}), K = /* @__PURE__ */ ((e) => (e.BOND = "BOND", e.DEPOSIT = "+", e.LEAVE = "LEAVE", e.THORNAME_REGISTER = "~", e.UNBOND = "UNBOND", e.WITHDRAW = "-", e.OPEN_LOAN = "$+", e.CLOSE_LOAN = "$-", e))(K || {}), W = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(W || {}), Y = /* @__PURE__ */ ((e) => (e.KEYSTORE = "KEYSTORE", e.KEEPKEY = "KEEPKEY", e.XDEFI = "XDEFI", e.METAMASK = "METAMASK", e.COINBASE_WEB = "COINBASE_WEB", e.TREZOR = "TREZOR", e.TRUSTWALLET_WEB = "TRUSTWALLET_WEB", e.LEDGER = "LEDGER", e.KEPLR = "KEPLR", e.OKX = "OKX", e.BRAVE = "BRAVE", e.WALLETCONNECT = "WALLETCONNECT", e))(Y || {});
const T = [

@@ -982,3 +991,3 @@ t.Arbitrum,

t.THORChain
], re = {
], de = {
BRAVE: y,

@@ -1043,39 +1052,42 @@ COINBASE_WEB: y,

export {
W as AGG_SWAP,
V as AGG_SWAP,
I as ApiError,
L as ApiUrl,
D as BaseDecimal,
U as ApiUrl,
w as BaseDecimal,
P as CENTRALIZED_SWAPPER,
t as Chain,
m as ChainId,
ae as ChainIdToChain,
ee as ChainToChainId,
se as ChainToExplorerUrl,
ne as ChainToHexChainId,
P as ChainToNetworkId,
te as ChainToRPC,
x as ContractAddress,
z as CosmosChainList,
R as DerivationPath,
ie as ChainIdToChain,
ae as ChainToChainId,
pe as ChainToExplorerUrl,
re as ChainToHexChainId,
x as ChainToNetworkId,
se as ChainToRPC,
M as ContractAddress,
te as CosmosChainList,
G as DerivationPath,
n as ERROR_CODE,
b as ERROR_MODULE,
R as ERROR_MODULE,
S as ERROR_TYPE,
y as EVMChainList,
M as ErrorCode,
w as FeeOption,
G as MemoType,
$ as NetworkDerivationPath,
H as NetworkIdToChain,
X as ErrorCode,
W as FeeOption,
K as MemoType,
Q as NetworkDerivationPath,
v as NetworkIdToChain,
b as OSMOSIS_SWAP,
g as QuoteMode,
E as RPCUrl,
Z as SWAP_IN,
J as SWAP_OUT,
k as TCAvalancheDepositABI,
Y as TCBscDepositABI,
K as TCEthereumVaultAbi,
Q as TCSupportedChainList,
q as UTXOChainList,
U as WalletOption,
re as availableChainsByWallet,
X as erc20ABI,
j as getChainEnumValue
H as SWAP_IN,
L as SWAP_OUT,
j as TCAvalancheDepositABI,
$ as TCBscDepositABI,
J as TCEthereumVaultAbi,
ne as TCSupportedChainList,
ee as UTXOChainList,
Y as WalletOption,
de as availableChainsByWallet,
q as classifySwap,
Z as erc20ABI,
z as getChainEnumValue
};

@@ -8,3 +8,3 @@ {

"vite": "4.4.9",
"@internal/config": "2.2.0"
"@internal/config": "2.2.1"
},

@@ -37,3 +37,3 @@ "eslintConfig": {

"types": "./dist/index.d.ts",
"version": "4.2.0",
"version": "4.2.1",
"scripts": {

@@ -40,0 +40,0 @@ "build": "vite build",

@@ -121,2 +121,4 @@ import type { FixedNumber } from 'ethers';

BSC_TO_BSC = 'BEP20-BEP20',
GAIA_TO_OSMO = 'OSMOSIS-IBC',
CHANGELLY = 'CHANGELLY',
}

@@ -131,2 +133,6 @@

export const OSMOSIS_SWAP = [QuoteMode.GAIA_TO_OSMO];
export const CENTRALIZED_SWAPPER = [QuoteMode.CHANGELLY]
export const AGG_SWAP = [QuoteMode.ETH_TO_ETH, QuoteMode.AVAX_TO_AVAX, QuoteMode.BSC_TO_BSC];

@@ -152,1 +158,20 @@

];
export function classifySwap(quoteMode:QuoteMode) {
if (AGG_SWAP.includes(quoteMode)) {
return 'AGG_SWAP';
}
if (SWAP_IN.includes(quoteMode)) {
return 'SWAP_IN';
}
if (SWAP_OUT.includes(quoteMode)) {
return 'SWAP_OUT';
}
if (OSMOSIS_SWAP.includes(quoteMode)) {
return 'OSMOSIS_SWAP';
}
if (CENTRALIZED_SWAPPER.includes(quoteMode)) {
return 'CENTRALIZED_SWAPPER';
}
return null;
}

Sorry, the diff of this file is not supported yet

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