@coinmasters/types
Advanced tools
Comparing version 3.0.0 to 4.0.0
@@ -72,4 +72,6 @@ /// <reference types="node" /> | ||
DASH = 8, | ||
DGB = 8, | ||
DOGE = 8, | ||
ETH = 18, | ||
EOS = 6, | ||
GAIA = 6, | ||
@@ -81,3 +83,5 @@ KUJI = 6, | ||
OP = 18, | ||
THOR = 8 | ||
XRP = 6, | ||
THOR = 8, | ||
ZEC = 8 | ||
} | ||
@@ -88,2 +92,3 @@ | ||
Avalanche = "AVAX", | ||
Base = "BASE", | ||
Binance = "BNB", | ||
@@ -95,3 +100,5 @@ BinanceSmartChain = "BSC", | ||
Dash = "DASH", | ||
Digibyte = "DGB", | ||
Dogecoin = "DOGE", | ||
EOS = "EOS", | ||
Ethereum = "ETH", | ||
@@ -103,3 +110,5 @@ Kujira = "KUJI", | ||
Polygon = "MATIC", | ||
THORChain = "THOR" | ||
Ripple = "XRP", | ||
THORChain = "THOR", | ||
Zcash = "ZEC" | ||
} | ||
@@ -112,2 +121,3 @@ | ||
AvalancheHex = "0xa86a", | ||
Base = "8453", | ||
Binance = "Binance-Chain-Tigris", | ||
@@ -119,3 +129,3 @@ BinanceSmartChain = "56", | ||
Cosmos = "cosmoshub-4", | ||
dash = "dash", | ||
Dash = "dash", | ||
Dogecoin = "dogecoin", | ||
@@ -141,2 +151,3 @@ Kujira = "kaiyo-1", | ||
AVAX: ChainId; | ||
BASE: ChainId; | ||
BNB: ChainId; | ||
@@ -148,3 +159,5 @@ BSC: ChainId; | ||
DASH: ChainId; | ||
DGB: ChainId; | ||
DOGE: ChainId; | ||
EOS: ChainId; | ||
ETH: ChainId; | ||
@@ -156,3 +169,5 @@ KUJI: ChainId; | ||
MATIC: ChainId; | ||
XRP: ChainId; | ||
THOR: ChainId; | ||
ZEC: ChainId; | ||
}; | ||
@@ -165,2 +180,3 @@ | ||
AVAX: ChainId; | ||
BASE: ChainId; | ||
BNB: ChainId; | ||
@@ -172,3 +188,5 @@ BSC: ChainId; | ||
DASH: ChainId; | ||
DGB: ChainId; | ||
DOGE: ChainId; | ||
EOS: ChainId; | ||
ETH: ChainId; | ||
@@ -180,3 +198,5 @@ KUJI: ChainId; | ||
MATIC: ChainId; | ||
XRP: ChainId; | ||
THOR: ChainId; | ||
ZEC: ChainId; | ||
}; | ||
@@ -187,2 +207,3 @@ | ||
AVAX: RPCUrl; | ||
BASE: RPCUrl; | ||
BNB: RPCUrl; | ||
@@ -194,3 +215,5 @@ BSC: RPCUrl; | ||
DASH: RPCUrl; | ||
DGB: RPCUrl; | ||
DOGE: RPCUrl; | ||
EOS: RPCUrl; | ||
ETH: RPCUrl; | ||
@@ -202,3 +225,5 @@ KUJI: RPCUrl; | ||
MATIC: RPCUrl; | ||
XRP: RPCUrl; | ||
THOR: RPCUrl; | ||
ZEC: RPCUrl; | ||
}; | ||
@@ -266,2 +291,3 @@ | ||
AVAX = "m/44'/60'/0'/0", | ||
BASE = "m/44'/60'/0'/0", | ||
BCH = "m/44'/145'/0'/0", | ||
@@ -273,3 +299,5 @@ BNB = "m/44'/714'/0'/0", | ||
DASH = "m/44'/5'/0'/0", | ||
DGB = "m/44'/20'/0'/0", | ||
ETH = "m/44'/60'/0'/0", | ||
EOS = "m/44'/194'/0'/0", | ||
GAIA = "m/44'/118'/0'/0", | ||
@@ -281,3 +309,5 @@ KUJI = "m/44'/118'/0'/0", | ||
OP = "m/44'/60'/0'/0", | ||
THOR = "m/44'/931'/0'/0" | ||
XRP = "m/44'/144'/0'/0", | ||
THOR = "m/44'/931'/0'/0", | ||
ZEC = "m/44'/133'/0'/0" | ||
} | ||
@@ -446,3 +476,3 @@ | ||
export declare type EVMChain = Chain.Ethereum | Chain.Avalanche | Chain.BinanceSmartChain | Chain.Arbitrum | Chain.Optimism | Chain.Polygon; | ||
export declare type EVMChain = Chain.Ethereum | Chain.Avalanche | Chain.Base | Chain.BinanceSmartChain | Chain.Arbitrum | Chain.Optimism | Chain.Polygon; | ||
@@ -526,3 +556,3 @@ export declare const EVMChainList: EVMChain[]; | ||
Avalanche = "https://node-router.thorswap.net/avalanche-c", | ||
Binance = "", | ||
Binance = "https://base.llamarpc.com", | ||
BinanceSmartChain = "https://bsc-dataseed.binance.org", | ||
@@ -533,3 +563,3 @@ Bitcoin = "https://node-router.thorswap.net/bitcoin", | ||
Kujira = "https://rpc-kujira.synergynodes.com/", | ||
Dash = "todo", | ||
Dash = "https://dash.nownodes.io", | ||
Dogecoin = "https://node-router.thorswap.net/dogecoin", | ||
@@ -536,0 +566,0 @@ Ethereum = "https://node-router.thorswap.net/ethereum", |
@@ -594,4 +594,4 @@ var g = Object.defineProperty; | ||
]; | ||
var C = /* @__PURE__ */ ((e) => (e.TC_SUPPORTED_TO_TC_SUPPORTED = "TC-TC", e.TC_SUPPORTED_TO_ETH = "TC-ERC20", e.TC_SUPPORTED_TO_AVAX = "TC-ARC20", e.TC_SUPPORTED_TO_BSC = "TC-BEP20", e.ETH_TO_TC_SUPPORTED = "ERC20-TC", e.ETH_TO_ETH = "ERC20-ERC20", e.ETH_TO_AVAX = "ERC20-ARC20", e.ETH_TO_BSC = "ERC20-BEP20", e.AVAX_TO_TC_SUPPORTED = "ARC20-TC", e.AVAX_TO_ETH = "ARC20-ERC20", e.AVAX_TO_AVAX = "ARC20-ARC20", e.AVAX_TO_BSC = "ARC20-BEP20", e.BSC_TO_TC_SUPPORTED = "BEP20-TC", e.BSC_TO_ETH = "BEP20-ERC20", e.BSC_TO_AVAX = "BEP20-ARC20", e.BSC_TO_BSC = "BEP20-BEP20", e))(C || {}); | ||
const K = [ | ||
var O = /* @__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))(O || {}); | ||
const X = [ | ||
"ERC20-ERC20", | ||
@@ -601,3 +601,3 @@ "ARC20-ARC20", | ||
/* BSC_TO_BSC */ | ||
], X = [ | ||
], K = [ | ||
"ERC20-TC", | ||
@@ -620,4 +620,4 @@ "ERC20-ARC20", | ||
]; | ||
var m = /* @__PURE__ */ ((e) => (e.VALIDATION_ERROR = "VALIDATION_ERROR", e.REQUEST_PARAMETER_ERROR = "REQUEST_PARAMETER_ERROR", e.RESPONSE_PARSING_ERROR = "RESPONSE_PARSING_ERROR", e.UNSUPPORTED = "UNSUPPORTED", e.NOT_IMPLEMENTED = "NOT_IMPLEMENTED", e.INCOMPATIBLE_ASSETS_OPERATIONS = "INCOMPATIBLE_ASSETS_OPERATIONS", e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e.DOWN_FOR_MAINTENANCE = "DOWN_FOR_MAINTENANCE", e.MISSING_INBOUND_INFO = "MISSING_INBOUND_INFO", e.QUOTE_FETCHING_ERROR = "QUOTE_FETCHING_ERROR", e.AIRDROP_ERROR = "AIRDROP_ERROR", e.UNHANDLED_ERROR = "UNHANDLED_ERROR", e))(m || {}), V = /* @__PURE__ */ ((e) => (e.HEALTH_CONTROLLER = "1000", e.LIQUIDITY_CONTROLLER = "1001", e.PROVIDER_CONTROLLER = "1002", e.QUOTE_CONTROLLER = "1003", e.SWAP_CONTROLLER = "1004", e.UTIL_CONTROLLER = "1005", e.AIRDROP_CONTROLLER = "1006", e.PROVIDER = "2000", e.ASSET = "2001", e.TOKEN_LIST = "2002", e.QUOTE = "2100", e.QUOTE_TXN_DETAILS = "2101", e.THORCHAIN_PROVIDER = "3000", e.UNISWAPV2_ETH_PROVIDER = "3001", e.UNISWAPV3_ETH_PROVIDER = "3002", e.SUSHISWAP_ETH_PROVIDER = "3003", e.PANCAKESWAP_BSC_PROVIDER = "3004", e.PANCAKESWAP_ETH_PROVIDER = "3005", e.ONEINCH_ETH_PROVIDER = "3006", e.ONEINCH_BSC_PROVIDER = "3007", e.ONEINCH_AVAX_PROVIDER = "3008", e.ZEROX_ETH_PROVIDER = "3009", e.WOOFI_AVAX_PROVIDER = "3010", e.PANGOLIN_AVAX_PROVIDER = "3011", e.TRADERJOE_AVAX_PROVIDER = "3012", e.KYBER_ETH_PROVIDER = "3013", e.KYBER_AVAX_PROVIDER = "3014", e.WOOFI_BSC_PROVIDER = "3015", e.STARGATE_PROVIDER = "3016", e.PROVIDER_UTIL = "4000", e.TXN_DETAILS = "5000", e.AIRDROP_UTIL = "6000", e))(V || {}), t = /* @__PURE__ */ ((e) => (e.INVALID_INPUT_PARAMETERS = "1000", e.UNKNOWN_PROVIDERS = "1001", e.CANNOT_FIND_INBOUND_ADDRESS = "1002", e.NO_INBOUND_ADDRESSES = "1003", e.CHAIN_HALTED_OR_UNSUPPORTED = "1004", e.MISSING_INPUT_PARAMETER = "1005", e.INVALID_TYPE_GENERIC = "1100", e.INVALID_NUMBER_STRING = "1101", e.INVALID_NUMBER = "1102", e.INVALID_BOOLEAN = "1103", e.INVALID_OBJECT = "1104", e.INVALID_ARRAY = "1105", e.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2000", e.SELL_BUY_ASSETS_ARE_THE_SAME = "2001", e.MISSING_SOURCE_ADDRESS_FOR_SYNTH = "2002", e.AFF_ADDRESS_AND_BPS_OR_NEITHER = "2003", e.AFF_ADDRESS_TOO_LONG = "2004", e.AFF_BPS_INTEGER_0_100 = "2005", e.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN = "2006", e.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN = "2007", e.PREFERRED_PROFVIDER_NOT_SUPPORTED = "2008", e.DESTINATION_ADDRESS_SMART_CONTRACT = "2009", e.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2010", e.SOURCE_ADDRESS_SMART_CONTRACT = "2011", e.INVALID_PROVIDER = "2100", e.MISSING_CROSS_CHAIN_PROVIDER = "2101", e.MISSING_AVAX_PROVIDER = "2102", e.MISSING_BSC_PROVIDER = "2103", e.MISSING_ETH_PROVIDER = "2104", e.INVALID_PROVIDER_FOR_SWAP_OUT = "2105", e.MISSING_ARB_PROVIDER = "2106", e.INVALID_CHAIN = "2200", e.INVALID_ASSET = "2201", e.INVALID_ASSET_IDENTIFIER = "2202", e.UNSUPPORTED_CHAIN = "2204", e.UNSUPPORTED_ASSET = "2203", e.UNSUPPORTED_ASSET_FOR_SWAPOUT = "2205", e.INVALID_SOURCE_ADDRESS = "2300", e.INVALID_DESTINATION_ADDRESS = "2301", e.THORNODE_QUOTE_GENERIC_ERROR = "3000", e.NOT_ENOUGH_SYNTH_BALANCE = "3001", e.SYNTH_MINTING_CAP_REACHED = "3002", e.INVALID_QUOTE_MODE = "4000", e.NO_QUOTES = "4001", e.SERVICE_UNAVAILABLE_GENERIC = "5000", e.MISSING_GAS_DATA_GENERIC = "5100", e.MISSING_TOKEN_INFO_GENERIC = "5200", e.CANT_FIND_TOKEN_LIST = "5201", e.NO_PRICE = "5202", e.PRICE_IS_STALE = "5203", e.ADDRESS_NOT_WHITELISTED = "6000", e.ADDRESS_ALREADY_CLAIMED = "6001", e.TEMPORARY_ERROR = "9999", e))(t || {}); | ||
const O = { | ||
var m = /* @__PURE__ */ ((e) => (e.VALIDATION_ERROR = "VALIDATION_ERROR", e.REQUEST_PARAMETER_ERROR = "REQUEST_PARAMETER_ERROR", e.RESPONSE_PARSING_ERROR = "RESPONSE_PARSING_ERROR", e.UNSUPPORTED = "UNSUPPORTED", e.NOT_IMPLEMENTED = "NOT_IMPLEMENTED", e.INCOMPATIBLE_ASSETS_OPERATIONS = "INCOMPATIBLE_ASSETS_OPERATIONS", e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e.DOWN_FOR_MAINTENANCE = "DOWN_FOR_MAINTENANCE", e.MISSING_INBOUND_INFO = "MISSING_INBOUND_INFO", e.QUOTE_FETCHING_ERROR = "QUOTE_FETCHING_ERROR", e.AIRDROP_ERROR = "AIRDROP_ERROR", e.UNHANDLED_ERROR = "UNHANDLED_ERROR", e))(m || {}), C = /* @__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))(C || {}), t = /* @__PURE__ */ ((e) => (e.INVALID_INPUT_PARAMETERS = "1000", e.UNKNOWN_PROVIDERS = "1001", e.CANNOT_FIND_INBOUND_ADDRESS = "1002", e.NO_INBOUND_ADDRESSES = "1003", e.CHAIN_HALTED_OR_UNSUPPORTED = "1004", e.MISSING_INPUT_PARAMETER = "1005", e.INVALID_TYPE_GENERIC = "1100", e.INVALID_NUMBER_STRING = "1101", e.INVALID_NUMBER = "1102", e.INVALID_BOOLEAN = "1103", e.INVALID_OBJECT = "1104", e.INVALID_ARRAY = "1105", e.SELL_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2000", e.SELL_BUY_ASSETS_ARE_THE_SAME = "2001", e.MISSING_SOURCE_ADDRESS_FOR_SYNTH = "2002", e.AFF_ADDRESS_AND_BPS_OR_NEITHER = "2003", e.AFF_ADDRESS_TOO_LONG = "2004", e.AFF_BPS_INTEGER_0_100 = "2005", e.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN = "2006", e.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN = "2007", e.PREFERRED_PROFVIDER_NOT_SUPPORTED = "2008", e.DESTINATION_ADDRESS_SMART_CONTRACT = "2009", e.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER = "2010", e.SOURCE_ADDRESS_SMART_CONTRACT = "2011", e.INVALID_PROVIDER = "2100", e.MISSING_CROSS_CHAIN_PROVIDER = "2101", e.MISSING_AVAX_PROVIDER = "2102", e.MISSING_BSC_PROVIDER = "2103", e.MISSING_ETH_PROVIDER = "2104", e.INVALID_PROVIDER_FOR_SWAP_OUT = "2105", e.MISSING_ARB_PROVIDER = "2106", e.INVALID_CHAIN = "2200", e.INVALID_ASSET = "2201", e.INVALID_ASSET_IDENTIFIER = "2202", e.UNSUPPORTED_CHAIN = "2204", e.UNSUPPORTED_ASSET = "2203", e.UNSUPPORTED_ASSET_FOR_SWAPOUT = "2205", e.INVALID_SOURCE_ADDRESS = "2300", e.INVALID_DESTINATION_ADDRESS = "2301", e.THORNODE_QUOTE_GENERIC_ERROR = "3000", e.NOT_ENOUGH_SYNTH_BALANCE = "3001", e.SYNTH_MINTING_CAP_REACHED = "3002", e.INVALID_QUOTE_MODE = "4000", e.NO_QUOTES = "4001", e.SERVICE_UNAVAILABLE_GENERIC = "5000", e.MISSING_GAS_DATA_GENERIC = "5100", e.MISSING_TOKEN_INFO_GENERIC = "5200", e.CANT_FIND_TOKEN_LIST = "5201", e.NO_PRICE = "5202", e.PRICE_IS_STALE = "5203", e.ADDRESS_NOT_WHITELISTED = "6000", e.ADDRESS_ALREADY_CLAIMED = "6001", e.TEMPORARY_ERROR = "9999", e))(t || {}); | ||
const V = { | ||
[t.INVALID_INPUT_PARAMETERS]: "Invalid input parameters: {0}.", | ||
@@ -673,4 +673,4 @@ [t.UNKNOWN_PROVIDERS]: "Unknown providers: {0}.", | ||
[t.ADDRESS_ALREADY_CLAIMED]: "Address {0} already claimed the airdrop." | ||
}, o = (e, n) => { | ||
let a = O[e]; | ||
}, u = (e, n) => { | ||
let a = V[e]; | ||
for (let r = 0; r < n.length; r++) | ||
@@ -685,3 +685,3 @@ a = a.replace(`{${r}}`, n[r]); | ||
module: S, | ||
code: y, | ||
code: d, | ||
message: _, | ||
@@ -694,5 +694,5 @@ type: N, | ||
}, | ||
displayMessageParams: u | ||
displayMessageParams: y | ||
}) { | ||
const l = _ || o(y, u || []) || ""; | ||
const l = _ || u(d, y || []) || ""; | ||
super(l); | ||
@@ -709,7 +709,7 @@ s(this, "status"); | ||
s(this, "displayMessageParams"); | ||
this.status = a, this.revision = r || "NO_REVISION", this.module = S, this.message = l, this.display = o(y, u || []), this.code = y, this.type = N || m.UNHANDLED_ERROR, this.options = { | ||
this.status = a, this.revision = r || "NO_REVISION", this.module = S, this.message = l, this.display = u(d, y || []), this.code = d, this.type = N || m.UNHANDLED_ERROR, this.options = { | ||
shouldLog: E || !0, | ||
shouldTrace: f || !0, | ||
shouldThrow: c || !1 | ||
}, this.displayMessageParams = u || [], this.options.shouldTrace && Error.captureStackTrace(this); | ||
}, this.displayMessageParams = y || [], this.options.shouldTrace && Error.captureStackTrace(this); | ||
} | ||
@@ -726,3 +726,3 @@ static fromErrorInfo(a) { | ||
get displayMessage() { | ||
return o(this.code, this.displayMessageParams || []); | ||
return u(this.code, this.displayMessageParams || []); | ||
} | ||
@@ -737,6 +737,7 @@ handle() { | ||
} | ||
var i = /* @__PURE__ */ ((e) => (e.Arbitrum = "ARB", e.Avalanche = "AVAX", e.Binance = "BNB", e.BinanceSmartChain = "BSC", e.Bitcoin = "BTC", e.BitcoinCash = "BCH", e.Cosmos = "GAIA", e.Dash = "DASH", e.Dogecoin = "DOGE", e.Ethereum = "ETH", e.Kujira = "KUJI", e.Litecoin = "LTC", e.Maya = "MAYA", e.Optimism = "OP", e.Polygon = "MATIC", e.THORChain = "THOR", e))(i || {}), P = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(P || {}), B = /* @__PURE__ */ ((e) => (e.ARB = "m/44'/60'/0'/0", e.AVAX = "m/44'/60'/0'/0", e.BCH = "m/44'/145'/0'/0", e.BNB = "m/44'/714'/0'/0", e.BSC = "m/44'/60'/0'/0", e.BTC = "m/84'/0'/0'/0", e.DOGE = "m/44'/3'/0'/0", e.DASH = "m/44'/5'/0'/0", e.ETH = "m/44'/60'/0'/0", e.GAIA = "m/44'/118'/0'/0", e.KUJI = "m/44'/118'/0'/0", e.LTC = "m/84'/2'/0'/0", e.MATIC = "m/44'/60'/0'/0", e.MAYA = "m/44'/931'/0'/0", e.OP = "m/44'/60'/0'/0", e.THOR = "m/44'/931'/0'/0", e))(B || {}); | ||
var i = /* @__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.Polygon = "MATIC", e.Ripple = "XRP", e.THORChain = "THOR", e.Zcash = "ZEC", e))(i || {}), P = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(P || {}), B = /* @__PURE__ */ ((e) => (e.ARB = "m/44'/60'/0'/0", e.AVAX = "m/44'/60'/0'/0", e.BASE = "m/44'/60'/0'/0", e.BCH = "m/44'/145'/0'/0", e.BNB = "m/44'/714'/0'/0", e.BSC = "m/44'/60'/0'/0", e.BTC = "m/84'/0'/0'/0", e.DOGE = "m/44'/3'/0'/0", e.DASH = "m/44'/5'/0'/0", e.DGB = "m/44'/20'/0'/0", e.ETH = "m/44'/60'/0'/0", e.EOS = "m/44'/194'/0'/0", e.GAIA = "m/44'/118'/0'/0", e.KUJI = "m/44'/118'/0'/0", e.LTC = "m/84'/2'/0'/0", e.MATIC = "m/44'/60'/0'/0", e.MAYA = "m/44'/931'/0'/0", e.OP = "m/44'/60'/0'/0", e.XRP = "m/44'/144'/0'/0", e.THOR = "m/44'/931'/0'/0", e.ZEC = "m/44'/133'/0'/0", e))(B || {}); | ||
const Y = { | ||
ARB: [44, 60, 0, 0, 0], | ||
AVAX: [44, 60, 0, 0, 0], | ||
BASE: [44, 60, 0, 0, 0], | ||
BCH: [44, 145, 0, 0, 0], | ||
@@ -747,3 +748,5 @@ BNB: [44, 714, 0, 0, 0], | ||
DASH: [44, 5, 0, 0, 0], | ||
DGB: [44, 20, 0, 0, 0], | ||
DOGE: [44, 3, 0, 0, 0], | ||
EOS: [44, 194, 0, 0, 0], | ||
ETH: [44, 60, 0, 0, 0], | ||
@@ -756,5 +759,7 @@ GAIA: [44, 118, 0, 0, 0], | ||
OP: [44, 60, 0, 0, 0], | ||
THOR: [44, 931, 0, 0, 0] | ||
XRP: [44, 144, 0, 0, 0], | ||
THOR: [44, 931, 0, 0, 0], | ||
ZEC: [44, 133, 0, 0, 0] | ||
}; | ||
var b = /* @__PURE__ */ ((e) => (e[e.ARB = 18] = "ARB", e[e.AVAX = 18] = "AVAX", e[e.BCH = 8] = "BCH", e[e.BNB = 8] = "BNB", e[e.BSC = 18] = "BSC", e[e.BTC = 8] = "BTC", e[e.DASH = 8] = "DASH", e[e.DOGE = 8] = "DOGE", e[e.ETH = 18] = "ETH", e[e.GAIA = 6] = "GAIA", e[e.KUJI = 6] = "KUJI", e[e.LTC = 8] = "LTC", e[e.MATIC = 18] = "MATIC", e[e.MAYA = 10] = "MAYA", e[e.OP = 18] = "OP", e[e.THOR = 8] = "THOR", e))(b || {}); | ||
var b = /* @__PURE__ */ ((e) => (e[e.ARB = 18] = "ARB", e[e.AVAX = 18] = "AVAX", e[e.BCH = 8] = "BCH", e[e.BNB = 8] = "BNB", e[e.BSC = 18] = "BSC", e[e.BTC = 8] = "BTC", e[e.DASH = 8] = "DASH", e[e.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.XRP = 6] = "XRP", e[e.THOR = 8] = "THOR", e[e.ZEC = 8] = "ZEC", e))(b || {}); | ||
const W = [ | ||
@@ -768,10 +773,12 @@ "ETH", | ||
/* Polygon */ | ||
], j = [ | ||
], Z = [ | ||
"BTC", | ||
"BCH", | ||
"DASH", | ||
"DGB", | ||
"DOGE", | ||
"LTC" | ||
/* Litecoin */ | ||
], J = [ | ||
"LTC", | ||
"ZEC" | ||
/* Zcash */ | ||
], j = [ | ||
"GAIA", | ||
@@ -782,3 +789,3 @@ "THOR", | ||
]; | ||
var d = /* @__PURE__ */ ((e) => (e.Arbitrum = "42161", e.ArbitrumHex = "0xa4b1", e.Avalanche = "43114", e.AvalancheHex = "0xa86a", e.Binance = "Binance-Chain-Tigris", e.BinanceSmartChain = "56", e.BinanceSmartChainHex = "0x38", e.Bitcoin = "bitcoin", e.BitcoinCash = "bitcoincash", e.Cosmos = "cosmoshub-4", e.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.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainStagenet = "thorchain-stagenet-v2", e))(d || {}), I = /* @__PURE__ */ ((e) => (e.Arbitrum = "https://arb1.arbitrum.io/rpc", e.Avalanche = "https://node-router.thorswap.net/avalanche-c", e.Binance = "", e.BinanceSmartChain = "https://bsc-dataseed.binance.org", e.Bitcoin = "https://node-router.thorswap.net/bitcoin", e.BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash", e.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", e.Kujira = "https://rpc-kujira.synergynodes.com/", e.Dash = "todo", e.Dogecoin = "https://node-router.thorswap.net/dogecoin", e.Ethereum = "https://node-router.thorswap.net/ethereum", e.Litecoin = "https://node-router.thorswap.net/litecoin", e.Maya = "https://tendermint.mayachain.info", e.MayaStagenet = "https://stagenet.tendermint.mayachain.info", e.Optimism = "https://mainnet.optimism.io", e.Polygon = "https://polygon-rpc.com", e.THORChain = "https://rpc.thorswap.net", e.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", e))(I || {}), x = /* @__PURE__ */ ((e) => (e.Cosmos = "https://node-router.thorswap.net/cosmos/rest", e.Kujira = "https://lcd-kujira.synergynodes.com/", e.MayanodeMainnet = "https://mayanode.mayachain.info", e.MayanodeStagenet = "https://stagenet.mayanode.mayachain.info", e.ThornodeMainnet = "https://thornode.thorswap.net", e.ThornodeStagenet = "https://stagenet-thornode.ninerealms.com", e.ThorswapApi = "https://api.thorswap.finance", e.ThorswapStatic = "https://static.thorswap.net", e))(x || {}); | ||
var o = /* @__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.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainStagenet = "thorchain-stagenet-v2", e))(o || {}), I = /* @__PURE__ */ ((e) => (e.Arbitrum = "https://arb1.arbitrum.io/rpc", e.Avalanche = "https://node-router.thorswap.net/avalanche-c", e.Binance = "https://base.llamarpc.com", e.BinanceSmartChain = "https://bsc-dataseed.binance.org", e.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.Polygon = "https://polygon-rpc.com", e.THORChain = "https://rpc.thorswap.net", e.THORChainStagenet = "https://stagenet-rpc.ninerealms.com", e))(I || {}), x = /* @__PURE__ */ ((e) => (e.Cosmos = "https://node-router.thorswap.net/cosmos/rest", e.Kujira = "https://lcd-kujira.synergynodes.com/", e.MayanodeMainnet = "https://mayanode.mayachain.info", e.MayanodeStagenet = "https://stagenet.mayanode.mayachain.info", e.ThornodeMainnet = "https://thornode.thorswap.net", e.ThornodeStagenet = "https://stagenet-thornode.ninerealms.com", e.ThorswapApi = "https://api.thorswap.finance", e.ThorswapStatic = "https://static.thorswap.net", e))(x || {}); | ||
const p = Object.values(i), H = Object.keys(i), T = p.reduce( | ||
@@ -790,12 +797,12 @@ (e, n) => { | ||
{} | ||
), J = p.reduce( | ||
(e, n) => (e[n] = o[T[n]], e), | ||
{} | ||
), $ = p.reduce( | ||
(e, n) => (e[n] = d[T[n]], e), | ||
(e, n) => (e[n] = I[T[n]], e), | ||
{} | ||
), q = p.reduce( | ||
(e, n) => (e[n] = I[T[n]], e), | ||
{} | ||
), Z = p.reduce( | ||
(e, n) => { | ||
const a = `${T[n]}Hex`; | ||
return e[n] = d[a], e; | ||
return e[n] = o[a], e; | ||
}, | ||
@@ -814,3 +821,4 @@ {} | ||
"cosmoshub-4": "GAIA", | ||
[d.Dash]: "DASH", | ||
8453: "BASE", | ||
dash: "DASH", | ||
dogecoin: "DOGE", | ||
@@ -837,5 +845,9 @@ "0x1": "ETH", | ||
BTC: "https://blockstream.info", | ||
BASE: "https://basescan.org", | ||
GAIA: "https://cosmos.bigdipper.live", | ||
DASH: "https://blockchair.com/dash", | ||
DGB: "https://chainz.cryptoid.info/dgb", | ||
DOGE: "https://blockchair.com/dogecoin", | ||
KUJI: "https://finder.kujira.network/kaiyo-1", | ||
EOS: "https://eosauthority.com/", | ||
ETH: "https://etherscan.io", | ||
@@ -846,7 +858,9 @@ LTC: "https://ltc.bitaps.com", | ||
MATIC: "https://polygonscan.com", | ||
THOR: "https://viewblock.io/thorchain" | ||
XRP: "https://xrpscan.com", | ||
THOR: "https://viewblock.io/thorchain", | ||
ZEC: "https://z.cash/ecosystem/zcash-explorer" | ||
}; | ||
var D = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e))(D || {}), v = /* @__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))(v || {}), L = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(L || {}), R = /* @__PURE__ */ ((e) => (e.KEYSTORE = "KEYSTORE", e.KEEPKEY = "KEEPKEY", e.XDEFI = "XDEFI", e.METAMASK = "METAMASK", e.COINBASE_WEB = "COINBASE_WEB", e.TREZOR = "TREZOR", e.TRUSTWALLET_WEB = "TRUSTWALLET_WEB", e.LEDGER = "LEDGER", e.KEPLR = "KEPLR", e.OKX = "OKX", e.BRAVE = "BRAVE", e.WALLETCONNECT = "WALLETCONNECT", e))(R || {}); | ||
var L = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e))(L || {}), D = /* @__PURE__ */ ((e) => (e.BOND = "BOND", e.DEPOSIT = "+", e.LEAVE = "LEAVE", e.THORNAME_REGISTER = "~", e.UNBOND = "UNBOND", e.WITHDRAW = "-", e.OPEN_LOAN = "$+", e.CLOSE_LOAN = "$-", e))(D || {}), v = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(v || {}), R = /* @__PURE__ */ ((e) => (e.KEYSTORE = "KEYSTORE", e.KEEPKEY = "KEEPKEY", e.XDEFI = "XDEFI", e.METAMASK = "METAMASK", e.COINBASE_WEB = "COINBASE_WEB", e.TREZOR = "TREZOR", e.TRUSTWALLET_WEB = "TRUSTWALLET_WEB", e.LEDGER = "LEDGER", e.KEPLR = "KEPLR", e.OKX = "OKX", e.BRAVE = "BRAVE", e.WALLETCONNECT = "WALLETCONNECT", e))(R || {}); | ||
export { | ||
K as AGG_SWAP, | ||
X as AGG_SWAP, | ||
A as ApiError, | ||
@@ -856,22 +870,22 @@ x as ApiUrl, | ||
i as Chain, | ||
d as ChainId, | ||
o as ChainId, | ||
z as ChainIdToChain, | ||
$ as ChainToChainId, | ||
J as ChainToChainId, | ||
Q as ChainToExplorerUrl, | ||
Z as ChainToHexChainId, | ||
q as ChainToRPC, | ||
q as ChainToHexChainId, | ||
$ as ChainToRPC, | ||
P as ContractAddress, | ||
J as CosmosChainList, | ||
j as CosmosChainList, | ||
B as DerivationPath, | ||
t as ERROR_CODE, | ||
V as ERROR_MODULE, | ||
C as ERROR_MODULE, | ||
m as ERROR_TYPE, | ||
W as EVMChainList, | ||
D as ErrorCode, | ||
L as FeeOption, | ||
v as MemoType, | ||
L as ErrorCode, | ||
v as FeeOption, | ||
D as MemoType, | ||
Y as NetworkDerivationPath, | ||
C as QuoteMode, | ||
O as QuoteMode, | ||
I as RPCUrl, | ||
X as SWAP_IN, | ||
K as SWAP_IN, | ||
k as SWAP_OUT, | ||
@@ -881,5 +895,5 @@ U as TCAvalancheDepositABI, | ||
w as TCEthereumVaultAbi, | ||
j as UTXOChainList, | ||
Z as UTXOChainList, | ||
R as WalletOption, | ||
G as erc20ABI | ||
}; |
@@ -36,3 +36,3 @@ { | ||
"types": "./dist/index.d.ts", | ||
"version": "3.0.0", | ||
"version": "4.0.0", | ||
"scripts": { | ||
@@ -39,0 +39,0 @@ "build": "vite build", |
export enum Chain { | ||
Arbitrum = 'ARB', | ||
Avalanche = 'AVAX', | ||
Base = 'BASE', | ||
Binance = 'BNB', | ||
@@ -10,3 +11,5 @@ BinanceSmartChain = 'BSC', | ||
Dash = 'DASH', | ||
Digibyte = 'DGB', | ||
Dogecoin = 'DOGE', | ||
EOS = 'EOS', | ||
Ethereum = 'ETH', | ||
@@ -18,3 +21,5 @@ Kujira = 'KUJI', | ||
Polygon = 'MATIC', | ||
Ripple = 'XRP', | ||
THORChain = 'THOR', | ||
Zcash = 'ZEC', | ||
} | ||
@@ -36,2 +41,3 @@ type ChainNameType = keyof typeof Chain; | ||
AVAX = "m/44'/60'/0'/0", | ||
BASE = "m/44'/60'/0'/0", | ||
BCH = "m/44'/145'/0'/0", | ||
@@ -43,3 +49,5 @@ BNB = "m/44'/714'/0'/0", | ||
DASH = "m/44'/5'/0'/0", | ||
DGB = "m/44'/20'/0'/0", | ||
ETH = "m/44'/60'/0'/0", | ||
EOS = "m/44'/194'/0'/0", | ||
GAIA = "m/44'/118'/0'/0", | ||
@@ -51,3 +59,5 @@ KUJI = "m/44'/118'/0'/0", | ||
OP = "m/44'/60'/0'/0", | ||
XRP = "m/44'/144'/0'/0", | ||
THOR = "m/44'/931'/0'/0", | ||
ZEC = "m/44'/133'/0'/0", | ||
} | ||
@@ -60,2 +70,3 @@ | ||
AVAX: [44, 60, 0, 0, 0], | ||
BASE: [44, 60, 0, 0, 0], | ||
BCH: [44, 145, 0, 0, 0], | ||
@@ -66,3 +77,5 @@ BNB: [44, 714, 0, 0, 0], | ||
DASH: [44, 5, 0, 0, 0], | ||
DGB: [44, 20, 0, 0, 0], | ||
DOGE: [44, 3, 0, 0, 0], | ||
EOS: [44, 194, 0, 0, 0], | ||
ETH: [44, 60, 0, 0, 0], | ||
@@ -75,3 +88,5 @@ GAIA: [44, 118, 0, 0, 0], | ||
OP: [44, 60, 0, 0, 0], | ||
XRP: [44, 144, 0, 0, 0], | ||
THOR: [44, 931, 0, 0, 0], | ||
ZEC: [44, 133, 0, 0, 0], | ||
}; | ||
@@ -87,4 +102,6 @@ | ||
DASH = 8, | ||
DGB = 8, | ||
DOGE = 8, | ||
ETH = 18, | ||
EOS = 6, | ||
GAIA = 6, | ||
@@ -96,3 +113,5 @@ KUJI = 6, | ||
OP = 18, | ||
XRP = 6, | ||
THOR = 8, | ||
ZEC = 8, | ||
} | ||
@@ -103,2 +122,3 @@ | ||
| Chain.Avalanche | ||
| Chain.Base | ||
| Chain.BinanceSmartChain | ||
@@ -124,4 +144,6 @@ | Chain.Arbitrum | ||
Chain.Dash, | ||
Chain.Digibyte, | ||
Chain.Dogecoin, | ||
Chain.Litecoin, | ||
Chain.Zcash, | ||
]; | ||
@@ -143,2 +165,3 @@ | ||
AvalancheHex = '0xa86a', | ||
Base = '8453', | ||
Binance = 'Binance-Chain-Tigris', | ||
@@ -150,3 +173,3 @@ BinanceSmartChain = '56', | ||
Cosmos = 'cosmoshub-4', | ||
dash = 'dash', | ||
Dash = 'dash', | ||
Dogecoin = 'dogecoin', | ||
@@ -170,3 +193,3 @@ Kujira = 'kaiyo-1', | ||
Avalanche = 'https://node-router.thorswap.net/avalanche-c', | ||
Binance = '', | ||
Binance = 'https://base.llamarpc.com', | ||
BinanceSmartChain = 'https://bsc-dataseed.binance.org', | ||
@@ -177,3 +200,3 @@ Bitcoin = 'https://node-router.thorswap.net/bitcoin', | ||
Kujira = 'https://rpc-kujira.synergynodes.com/', | ||
Dash = 'todo', //@todo find public rpc | ||
Dash = 'https://dash.nownodes.io', | ||
Dogecoin = 'https://node-router.thorswap.net/dogecoin', | ||
@@ -252,2 +275,3 @@ Ethereum = 'https://node-router.thorswap.net/ethereum', | ||
[ChainId.Cosmos]: Chain.Cosmos, | ||
[ChainId.Base]: Chain.Base, | ||
[ChainId.Dash]: Chain.Dash, | ||
@@ -276,5 +300,9 @@ [ChainId.Dogecoin]: Chain.Dogecoin, | ||
[Chain.Bitcoin]: 'https://blockstream.info', | ||
[Chain.Base]: 'https://basescan.org', | ||
[Chain.Cosmos]: 'https://cosmos.bigdipper.live', | ||
[Chain.Dash]: 'https://blockchair.com/dash', | ||
[Chain.Digibyte]: 'https://chainz.cryptoid.info/dgb', | ||
[Chain.Dogecoin]: 'https://blockchair.com/dogecoin', | ||
[Chain.Kujira]: 'https://finder.kujira.network/kaiyo-1', | ||
[Chain.EOS]: 'https://eosauthority.com/', | ||
[Chain.Ethereum]: 'https://etherscan.io', | ||
@@ -285,3 +313,5 @@ [Chain.Litecoin]: 'https://ltc.bitaps.com', | ||
[Chain.Polygon]: 'https://polygonscan.com', | ||
[Chain.Ripple]: 'https://xrpscan.com', | ||
[Chain.THORChain]: 'https://viewblock.io/thorchain', | ||
[Chain.Zcash]: 'https://z.cash/ecosystem/zcash-explorer', | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
178827
3228