@thorswap-lib/types
Advanced tools
Comparing version 0.0.0-nightly-20231018181452 to 0.0.0-nightly-20231018181610
@@ -11,4 +11,2 @@ /// <reference types="node" /> | ||
export declare const AGG_SWAP: QuoteMode[]; | ||
export declare type AmountWithBaseDenom = AmountWithDenom<BigNumber>; | ||
@@ -75,3 +73,3 @@ | ||
ThornodeMainnet = 'https://thornode.thorswap.net', | ||
ThornodeStagenet = 'https://stagenet-thornode.ninerealms.com', | ||
ThornodeStagenet = 'https://stagenet.thornode.thorswap.net', | ||
ThorswapApi = 'https://api.thorswap.finance', | ||
@@ -399,4 +397,2 @@ ThorswapStatic = 'https://static.thorswap.net', | ||
UNSUPPORTED_ASSET_FOR_SWAPOUT = '2205', | ||
INVALID_SOURCE_ADDRESS = '2300', | ||
INVALID_DESTINATION_ADDRESS = '2301', | ||
THORNODE_QUOTE_GENERIC_ERROR = '3000', | ||
@@ -596,17 +592,10 @@ NOT_ENOUGH_SYNTH_BALANCE = '3001', | ||
TC_SUPPORTED_TO_TC_SUPPORTED = 'TC-TC', | ||
ETH_TO_TC_SUPPORTED = 'ERC20-TC', | ||
TC_SUPPORTED_TO_ETH = 'TC-ERC20', | ||
TC_SUPPORTED_TO_AVAX = 'TC-ARC20', | ||
TC_SUPPORTED_TO_BSC = 'TC-BEP20', | ||
ETH_TO_TC_SUPPORTED = 'ERC20-TC', | ||
ETH_TO_ETH = 'ERC20-ERC20', | ||
ETH_TO_AVAX = 'ERC20-ARC20', | ||
ETH_TO_BSC = 'ERC20-BEP20', | ||
AVAX_TO_AVAX = 'ARC20-ARC20', | ||
AVAX_TO_TC_SUPPORTED = 'ARC20-TC', | ||
TC_SUPPORTED_TO_AVAX = 'TC-ARC20', | ||
AVAX_TO_ETH = 'ARC20-ERC20', | ||
AVAX_TO_AVAX = 'ARC20-ARC20', | ||
AVAX_TO_BSC = 'ARC20-BEP20', | ||
BSC_TO_TC_SUPPORTED = 'BEP20-TC', | ||
BSC_TO_ETH = 'BEP20-ERC20', | ||
BSC_TO_AVAX = 'BEP20-ARC20', | ||
BSC_TO_BSC = 'BEP20-BEP20', | ||
ETH_TO_AVAX = 'ERC20-ARC20', | ||
} | ||
@@ -640,6 +629,2 @@ | ||
export declare const SWAP_IN: QuoteMode[]; | ||
export declare const SWAP_OUT: QuoteMode[]; | ||
export declare const TCAvalancheDepositABI: ( | ||
@@ -724,81 +709,2 @@ | { | ||
export declare const TCBscDepositABI: ( | ||
| { | ||
inputs: never[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
name?: undefined; | ||
outputs?: undefined; | ||
} | ||
| { | ||
anonymous: boolean; | ||
inputs: ( | ||
| { | ||
indexed: boolean; | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
components?: undefined; | ||
} | ||
| { | ||
components: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
indexed: boolean; | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
} | ||
)[]; | ||
name: string; | ||
type: string; | ||
stateMutability?: undefined; | ||
outputs?: undefined; | ||
} | ||
| { | ||
inputs: ( | ||
| { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
components?: undefined; | ||
} | ||
| { | ||
components: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
} | ||
)[]; | ||
name: string; | ||
outputs: never[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
} | ||
| { | ||
inputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
name: string; | ||
outputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
stateMutability: string; | ||
type: string; | ||
anonymous?: undefined; | ||
} | ||
)[]; | ||
export declare const TCEthereumVaultAbi: ( | ||
@@ -805,0 +711,0 @@ | { |
@@ -1,3 +0,3 @@ | ||
var C = Object.defineProperty; | ||
var O = (e, n, a) => n in e ? C(e, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[n] = a; | ||
var h = Object.defineProperty; | ||
var O = (e, n, a) => n in e ? h(e, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[n] = a; | ||
var s = (e, n, a) => (O(e, typeof n != "symbol" ? n + "" : n, a), a); | ||
@@ -277,3 +277,3 @@ const F = [ | ||
} | ||
], W = [ | ||
], K = [ | ||
{ inputs: [], stateMutability: "nonpayable", type: "constructor" }, | ||
@@ -442,181 +442,5 @@ { | ||
} | ||
], K = [ | ||
{ inputs: [], stateMutability: "nonpayable", type: "constructor" }, | ||
{ | ||
anonymous: !1, | ||
inputs: [ | ||
{ indexed: !0, internalType: "address", name: "to", type: "address" }, | ||
{ indexed: !0, internalType: "address", name: "asset", type: "address" }, | ||
{ indexed: !1, internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ indexed: !1, internalType: "string", name: "memo", type: "string" } | ||
], | ||
name: "Deposit", | ||
type: "event" | ||
}, | ||
{ | ||
anonymous: !1, | ||
inputs: [ | ||
{ indexed: !0, internalType: "address", name: "oldVault", type: "address" }, | ||
{ indexed: !0, internalType: "address", name: "newVault", type: "address" }, | ||
{ indexed: !1, internalType: "address", name: "asset", type: "address" }, | ||
{ indexed: !1, internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ indexed: !1, internalType: "string", name: "memo", type: "string" } | ||
], | ||
name: "TransferAllowance", | ||
type: "event" | ||
}, | ||
{ | ||
anonymous: !1, | ||
inputs: [ | ||
{ indexed: !0, internalType: "address", name: "vault", type: "address" }, | ||
{ indexed: !0, internalType: "address", name: "to", type: "address" }, | ||
{ indexed: !1, internalType: "address", name: "asset", type: "address" }, | ||
{ indexed: !1, internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ indexed: !1, internalType: "string", name: "memo", type: "string" } | ||
], | ||
name: "TransferOut", | ||
type: "event" | ||
}, | ||
{ | ||
anonymous: !1, | ||
inputs: [ | ||
{ indexed: !0, internalType: "address", name: "vault", type: "address" }, | ||
{ indexed: !1, internalType: "address", name: "target", type: "address" }, | ||
{ indexed: !1, internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ indexed: !1, internalType: "address", name: "finalAsset", type: "address" }, | ||
{ indexed: !1, internalType: "address", name: "to", type: "address" }, | ||
{ indexed: !1, internalType: "uint256", name: "amountOutMin", type: "uint256" }, | ||
{ indexed: !1, internalType: "string", name: "memo", type: "string" } | ||
], | ||
name: "TransferOutAndCall", | ||
type: "event" | ||
}, | ||
{ | ||
anonymous: !1, | ||
inputs: [ | ||
{ indexed: !0, internalType: "address", name: "oldVault", type: "address" }, | ||
{ indexed: !0, internalType: "address", name: "newVault", type: "address" }, | ||
{ | ||
components: [ | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" } | ||
], | ||
indexed: !1, | ||
internalType: "struct THORChain_Router.Coin[]", | ||
name: "coins", | ||
type: "tuple[]" | ||
}, | ||
{ indexed: !1, internalType: "string", name: "memo", type: "string" } | ||
], | ||
name: "VaultTransfer", | ||
type: "event" | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: "address payable", name: "vault", type: "address" }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" }, | ||
{ internalType: "uint256", name: "expiration", type: "uint256" } | ||
], | ||
name: "depositWithExpiry", | ||
outputs: [], | ||
stateMutability: "payable", | ||
type: "function" | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: "address", name: "router", type: "address" }, | ||
{ internalType: "address payable", name: "asgard", type: "address" }, | ||
{ | ||
components: [ | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" } | ||
], | ||
internalType: "struct THORChain_Router.Coin[]", | ||
name: "coins", | ||
type: "tuple[]" | ||
}, | ||
{ internalType: "string", name: "memo", type: "string" } | ||
], | ||
name: "returnVaultAssets", | ||
outputs: [], | ||
stateMutability: "payable", | ||
type: "function" | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: "address", name: "router", type: "address" }, | ||
{ internalType: "address", name: "newVault", type: "address" }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" } | ||
], | ||
name: "transferAllowance", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function" | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: "address payable", name: "to", type: "address" }, | ||
{ internalType: "address", name: "asset", type: "address" }, | ||
{ internalType: "uint256", name: "amount", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" } | ||
], | ||
name: "transferOut", | ||
outputs: [], | ||
stateMutability: "payable", | ||
type: "function" | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: "address payable", name: "target", type: "address" }, | ||
{ internalType: "address", name: "finalToken", type: "address" }, | ||
{ internalType: "address", name: "to", type: "address" }, | ||
{ internalType: "uint256", name: "amountOutMin", type: "uint256" }, | ||
{ internalType: "string", name: "memo", type: "string" } | ||
], | ||
name: "transferOutAndCall", | ||
outputs: [], | ||
stateMutability: "payable", | ||
type: "function" | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: "address", name: "vault", type: "address" }, | ||
{ internalType: "address", name: "token", type: "address" } | ||
], | ||
name: "vaultAllowance", | ||
outputs: [{ internalType: "uint256", name: "amount", type: "uint256" }], | ||
stateMutability: "view", | ||
type: "function" | ||
} | ||
]; | ||
var P = /* @__PURE__ */ ((e) => (e.THOR = "THOR", e.RUNE = "RUNE", e.ATOM = "ATOM", e.MUON = "MUON", e.USDC = "USDC", e))(P || {}), 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 Y = [ | ||
"ERC20-ERC20", | ||
"ARC20-ARC20", | ||
"BEP20-BEP20" | ||
/* BSC_TO_BSC */ | ||
], k = [ | ||
"ERC20-TC", | ||
"ERC20-ARC20", | ||
"ERC20-BEP20", | ||
"ARC20-TC", | ||
"ARC20-ERC20", | ||
"ARC20-BEP20", | ||
"BEP20-TC", | ||
"BEP20-ERC20", | ||
"BEP20-ARC20" | ||
/* BSC_TO_AVAX */ | ||
], $ = [ | ||
"TC-TC", | ||
"TC-ERC20", | ||
"TC-ARC20", | ||
"TC-BEP20" | ||
/* TC_SUPPORTED_TO_BSC */ | ||
]; | ||
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 B = { | ||
var V = /* @__PURE__ */ ((e) => (e.THOR = "THOR", e.RUNE = "RUNE", e.ATOM = "ATOM", e.MUON = "MUON", e.USDC = "USDC", e))(V || {}), P = /* @__PURE__ */ ((e) => (e.TC_SUPPORTED_TO_TC_SUPPORTED = "TC-TC", e.ETH_TO_TC_SUPPORTED = "ERC20-TC", e.TC_SUPPORTED_TO_ETH = "TC-ERC20", e.ETH_TO_ETH = "ERC20-ERC20", e.AVAX_TO_AVAX = "ARC20-ARC20", e.AVAX_TO_TC_SUPPORTED = "ARC20-TC", e.TC_SUPPORTED_TO_AVAX = "TC-ARC20", e.AVAX_TO_ETH = "ARC20-ERC20", e.ETH_TO_AVAX = "ERC20-ARC20", e))(P || {}), A = /* @__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))(A || {}), g = /* @__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))(g || {}), 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.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 H = { | ||
[t.INVALID_INPUT_PARAMETERS]: "Invalid input parameters: {0}.", | ||
@@ -658,4 +482,2 @@ [t.UNKNOWN_PROVIDERS]: "Unknown providers: {0}.", | ||
[t.THORNODE_QUOTE_GENERIC_ERROR]: "ThorNode quote generic error.", | ||
[t.INVALID_SOURCE_ADDRESS]: "Invalid source address {0}", | ||
[t.INVALID_DESTINATION_ADDRESS]: "Invalid destination address {0}", | ||
[t.NOT_ENOUGH_SYNTH_BALANCE]: "Source address doesn't have enough synth balance for this quote.", | ||
@@ -673,4 +495,4 @@ [t.SYNTH_MINTING_CAP_REACHED]: "Synth minting cap reached.", | ||
[t.ADDRESS_ALREADY_CLAIMED]: "Address {0} already claimed the airdrop." | ||
}, u = (e, n) => { | ||
let a = B[e]; | ||
}, T = (e, n) => { | ||
let a = H[e]; | ||
for (let r = 0; r < n.length; r++) | ||
@@ -680,9 +502,9 @@ a = a.replace(`{${r}}`, n[r]); | ||
}; | ||
class A extends Error { | ||
class m extends Error { | ||
constructor({ | ||
status: a, | ||
revision: r, | ||
module: _, | ||
module: N, | ||
code: d, | ||
message: N, | ||
message: _, | ||
type: S, | ||
@@ -694,5 +516,5 @@ options: { shouldLog: E, shouldThrow: c, shouldTrace: f } = { | ||
}, | ||
displayMessageParams: y | ||
displayMessageParams: o | ||
}) { | ||
const l = N || u(d, y || []) || ""; | ||
const l = _ || T(d, o || []) || ""; | ||
super(l); | ||
@@ -709,10 +531,10 @@ s(this, "status"); | ||
s(this, "displayMessageParams"); | ||
this.status = a, this.revision = r || "NO_REVISION", this.module = _, this.message = l, this.display = u(d, y || []), this.code = d, this.type = S || m.UNHANDLED_ERROR, this.options = { | ||
this.status = a, this.revision = r || "NO_REVISION", this.module = N, this.message = l, this.display = T(d, o || []), this.code = d, this.type = S || A.UNHANDLED_ERROR, this.options = { | ||
shouldLog: E || !0, | ||
shouldTrace: f || !0, | ||
shouldThrow: c || !1 | ||
}, this.displayMessageParams = y || [], this.options.shouldTrace && Error.captureStackTrace(this); | ||
}, this.displayMessageParams = o || [], this.options.shouldTrace && Error.captureStackTrace(this); | ||
} | ||
static fromErrorInfo(a) { | ||
return new A(a); | ||
return new m(a); | ||
} | ||
@@ -726,3 +548,3 @@ toErrorInfo() { | ||
get displayMessage() { | ||
return u(this.code, this.displayMessageParams || []); | ||
return T(this.code, this.displayMessageParams || []); | ||
} | ||
@@ -737,4 +559,4 @@ 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.Dogecoin = "DOGE", e.Ethereum = "ETH", e.Litecoin = "LTC", e.Optimism = "OP", e.Polygon = "MATIC", e.THORChain = "THOR", e))(i || {}), h = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(h || {}), x = /* @__PURE__ */ ((e) => (e[e.Ethereum = 60] = "Ethereum", e[e.Binance = 714] = "Binance", e[e.THORChain = 931] = "THORChain", e))(x || {}), H = /* @__PURE__ */ ((e) => (e.ARB = "m/44'/60'/0'/0", e.AVAX = "m/44'/60'/0'/0", e.BCH = "m/44'/145'/0'/0", e.BNB = "m/44'/714'/0'/0", e.BSC = "m/44'/60'/0'/0", e.BTC = "m/84'/0'/0'/0", e.DOGE = "m/44'/3'/0'/0", e.ETH = "m/44'/60'/0'/0", e.GAIA = "m/44'/118'/0'/0", e.LTC = "m/84'/2'/0'/0", e.MATIC = "m/44'/60'/0'/0", e.OP = "m/44'/60'/0'/0", e.THOR = "m/44'/931'/0'/0", e))(H || {}); | ||
const q = { | ||
var i = /* @__PURE__ */ ((e) => (e.Arbitrum = "ARB", e.Avalanche = "AVAX", e.Binance = "BNB", e.BinanceSmartChain = "BSC", e.Bitcoin = "BTC", e.BitcoinCash = "BCH", e.Cosmos = "GAIA", e.Dogecoin = "DOGE", e.Ethereum = "ETH", e.Litecoin = "LTC", e.Optimism = "OP", e.Polygon = "MATIC", e.THORChain = "THOR", e))(i || {}), B = /* @__PURE__ */ ((e) => (e.ARB = "0x0000000000000000000000000000000000000000", e.AVAX = "0x0000000000000000000000000000000000000000", e.ETH = "0x0000000000000000000000000000000000000000", e.BSC = "0x0000000000000000000000000000000000000000", e.MATIC = "0x0000000000000000000000000000000000001010", e.OP = "0x4200000000000000000000000000000000000042", e))(B || {}), C = /* @__PURE__ */ ((e) => (e[e.Ethereum = 60] = "Ethereum", e[e.Binance = 714] = "Binance", e[e.THORChain = 931] = "THORChain", e))(C || {}), b = /* @__PURE__ */ ((e) => (e.ARB = "m/44'/60'/0'/0", e.AVAX = "m/44'/60'/0'/0", e.BCH = "m/44'/145'/0'/0", e.BNB = "m/44'/714'/0'/0", e.BSC = "m/44'/60'/0'/0", e.BTC = "m/84'/0'/0'/0", e.DOGE = "m/44'/3'/0'/0", e.ETH = "m/44'/60'/0'/0", e.GAIA = "m/44'/118'/0'/0", e.LTC = "m/84'/2'/0'/0", e.MATIC = "m/44'/60'/0'/0", e.OP = "m/44'/60'/0'/0", e.THOR = "m/44'/931'/0'/0", e))(b || {}); | ||
const W = { | ||
ARB: [44, 60, 0, 0, 0], | ||
@@ -754,4 +576,4 @@ AVAX: [44, 60, 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.DOGE = 8] = "DOGE", e[e.ETH = 18] = "ETH", e[e.GAIA = 6] = "GAIA", e[e.LTC = 8] = "LTC", e[e.MATIC = 18] = "MATIC", e[e.OP = 18] = "OP", e[e.THOR = 8] = "THOR", e))(b || {}); | ||
const j = [ | ||
var L = /* @__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.DOGE = 8] = "DOGE", e[e.ETH = 18] = "ETH", e[e.GAIA = 6] = "GAIA", e[e.LTC = 8] = "LTC", e[e.MATIC = 18] = "MATIC", e[e.OP = 18] = "OP", e[e.THOR = 8] = "THOR", e))(L || {}); | ||
const Y = [ | ||
"ETH", | ||
@@ -764,3 +586,3 @@ "AVAX", | ||
/* Polygon */ | ||
], J = [ | ||
], k = [ | ||
"BTC", | ||
@@ -771,3 +593,3 @@ "BCH", | ||
/* Litecoin */ | ||
], Z = [ | ||
], $ = [ | ||
"GAIA", | ||
@@ -778,19 +600,19 @@ "THOR", | ||
]; | ||
var T = /* @__PURE__ */ ((e) => (e.Arbitrum = "42161", e.ArbitrumHex = "0xa4b1", e.Avalanche = "43114", e.AvalancheHex = "0xa86a", e.Binance = "Binance-Chain-Tigris", e.BinanceHex = "", e.BinanceSmartChain = "56", e.BinanceSmartChainHex = "0x38", e.Bitcoin = "bitcoin", e.BitcoinHex = "", e.BitcoinCash = "bitcoincash", e.BitcoinCashHex = "", e.Cosmos = "cosmoshub-4", e.CosmosHex = "", e.Dogecoin = "dogecoin", e.DogecoinHex = "", e.Ethereum = "1", e.EthereumHex = "0x1", e.Litecoin = "litecoin", e.LitecoinHex = "", e.Optimism = "10", e.OptimismHex = "0xa", e.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainHex = "", e.THORChainStagenet = "thorchain-stagenet-v2", e))(T || {}), I = /* @__PURE__ */ ((e) => (e.Arbitrum = "https://arb1.arbitrum.io/rpc", e.Avalanche = "https://node-router.thorswap.net/avalanche-c", e.Binance = "", e.BinanceSmartChain = "https://bsc-dataseed.binance.org", e.Bitcoin = "https://node-router.thorswap.net/bitcoin", e.BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash", e.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", e.Dogecoin = "https://node-router.thorswap.net/dogecoin", e.Ethereum = "https://node-router.thorswap.net/ethereum", e.Litecoin = "https://node-router.thorswap.net/litecoin", e.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 || {}), D = /* @__PURE__ */ ((e) => (e.Cosmos = "https://node-router.thorswap.net/cosmos/rest", 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))(D || {}); | ||
const p = Object.values(i), v = Object.keys(i), o = p.reduce( | ||
var u = /* @__PURE__ */ ((e) => (e.Arbitrum = "42161", e.ArbitrumHex = "0xa4b1", e.Avalanche = "43114", e.AvalancheHex = "0xa86a", e.Binance = "Binance-Chain-Tigris", e.BinanceHex = "", e.BinanceSmartChain = "56", e.BinanceSmartChainHex = "0x38", e.Bitcoin = "bitcoin", e.BitcoinHex = "", e.BitcoinCash = "bitcoincash", e.BitcoinCashHex = "", e.Cosmos = "cosmoshub-4", e.CosmosHex = "", e.Dogecoin = "dogecoin", e.DogecoinHex = "", e.Ethereum = "1", e.EthereumHex = "0x1", e.Litecoin = "litecoin", e.LitecoinHex = "", e.Optimism = "10", e.OptimismHex = "0xa", e.Polygon = "137", e.PolygonHex = "0x89", e.THORChain = "thorchain-mainnet-v1", e.THORChainHex = "", e.THORChainStagenet = "thorchain-stagenet-v2", e))(u || {}), I = /* @__PURE__ */ ((e) => (e.Arbitrum = "https://arb1.arbitrum.io/rpc", e.Avalanche = "https://node-router.thorswap.net/avalanche-c", e.Binance = "", e.BinanceSmartChain = "https://bsc-dataseed.binance.org", e.Bitcoin = "https://node-router.thorswap.net/bitcoin", e.BitcoinCash = "https://node-router.thorswap.net/bitcoin-cash", e.Cosmos = "https://node-router.thorswap.net/cosmos/rpc", e.Dogecoin = "https://node-router.thorswap.net/dogecoin", e.Ethereum = "https://node-router.thorswap.net/ethereum", e.Litecoin = "https://node-router.thorswap.net/litecoin", e.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.ThornodeMainnet = "https://thornode.thorswap.net", e.ThornodeStagenet = "https://stagenet.thornode.thorswap.net", e.ThorswapApi = "https://api.thorswap.finance", e.ThorswapStatic = "https://static.thorswap.net", e))(x || {}); | ||
const p = Object.values(i), D = Object.keys(i), y = p.reduce( | ||
(e, n) => { | ||
const a = v.find((r) => i[r] === n); | ||
const a = D.find((r) => i[r] === n); | ||
return a && (e[n] = a), e; | ||
}, | ||
{} | ||
), z = p.reduce( | ||
(e, n) => (e[n] = T[o[n]], e), | ||
), q = p.reduce( | ||
(e, n) => (e[n] = u[y[n]], e), | ||
{} | ||
), Q = p.reduce( | ||
(e, n) => (e[n] = I[o[n]], e), | ||
(e, n) => (e[n] = I[y[n]], e), | ||
{} | ||
), ee = p.reduce( | ||
(e, n) => (e[n] = T[`${o[n]}Hex`], e), | ||
), j = p.reduce( | ||
(e, n) => (e[n] = u[`${y[n]}Hex`], e), | ||
{} | ||
), te = { | ||
), J = { | ||
42161: "ARB", | ||
@@ -818,3 +640,3 @@ "0xa4b1": "ARB", | ||
/* Polygon */ | ||
}, ne = { | ||
}, Z = { | ||
ARB: "https://arbiscan.io", | ||
@@ -834,39 +656,35 @@ AVAX: "https://snowtrace.io", | ||
}; | ||
var R = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e))(R || {}), L = /* @__PURE__ */ ((e) => (e.BOND = "BOND", e.DEPOSIT = "+", e.LEAVE = "LEAVE", e.THORNAME_REGISTER = "~", e.UNBOND = "UNBOND", e.WITHDRAW = "-", e.OPEN_LOAN = "$+", e.CLOSE_LOAN = "$-", e))(L || {}); | ||
const ae = "image rally need wedding health address purse army antenna leopard sea gain"; | ||
var v = /* @__PURE__ */ ((e) => (e[e.NoError = 36864] = "NoError", e))(v || {}), R = /* @__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))(R || {}); | ||
const z = "image rally need wedding health address purse army antenna leopard sea gain"; | ||
var M = /* @__PURE__ */ ((e) => (e[e.NotInstalled = 0] = "NotInstalled", e[e.Detected = 1] = "Detected", e))(M || {}), G = /* @__PURE__ */ ((e) => (e.Average = "average", e.Fast = "fast", e.Fastest = "fastest", e))(G || {}), U = /* @__PURE__ */ ((e) => (e.KEYSTORE = "KEYSTORE", 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 || {}); | ||
export { | ||
Y as AGG_SWAP, | ||
A as ApiError, | ||
D as ApiUrl, | ||
P as AssetSymbol, | ||
b as BaseDecimal, | ||
m as ApiError, | ||
x as ApiUrl, | ||
V as AssetSymbol, | ||
L as BaseDecimal, | ||
i as Chain, | ||
T as ChainId, | ||
te as ChainIdToChain, | ||
z as ChainToChainId, | ||
ne as ChainToExplorerUrl, | ||
ee as ChainToHexChainId, | ||
u as ChainId, | ||
J as ChainIdToChain, | ||
q as ChainToChainId, | ||
Z as ChainToExplorerUrl, | ||
j as ChainToHexChainId, | ||
Q as ChainToRPC, | ||
h as ContractAddress, | ||
Z as CosmosChainList, | ||
H as DerivationPath, | ||
B as ContractAddress, | ||
$ as CosmosChainList, | ||
b as DerivationPath, | ||
t as ERROR_CODE, | ||
V as ERROR_MODULE, | ||
m as ERROR_TYPE, | ||
j as EVMChainList, | ||
R as ErrorCode, | ||
g as ERROR_MODULE, | ||
A as ERROR_TYPE, | ||
Y as EVMChainList, | ||
v as ErrorCode, | ||
G as FeeOption, | ||
ae as MOCK_PHRASE, | ||
L as MemoType, | ||
q as NetworkDerivationPath, | ||
x as NetworkId, | ||
g as QuoteMode, | ||
z as MOCK_PHRASE, | ||
R as MemoType, | ||
W as NetworkDerivationPath, | ||
C as NetworkId, | ||
P as QuoteMode, | ||
I as RPCUrl, | ||
k as SWAP_IN, | ||
$ as SWAP_OUT, | ||
W as TCAvalancheDepositABI, | ||
K as TCBscDepositABI, | ||
K as TCAvalancheDepositABI, | ||
X as TCEthereumVaultAbi, | ||
J as UTXOChainList, | ||
k as UTXOChainList, | ||
U as WalletOption, | ||
@@ -873,0 +691,0 @@ M as WalletStatus, |
@@ -8,3 +8,3 @@ { | ||
"vite": "4.4.9", | ||
"@internal/config": "0.0.0-nightly-20231018181452" | ||
"@internal/config": "0.0.0-nightly-20231018181610" | ||
}, | ||
@@ -37,3 +37,3 @@ "eslintConfig": { | ||
"types": "./dist/index.d.ts", | ||
"version": "0.0.0-nightly-20231018181452", | ||
"version": "0.0.0-nightly-20231018181610", | ||
"scripts": { | ||
@@ -40,0 +40,0 @@ "build": "vite build", |
@@ -343,155 +343,1 @@ export const TCEthereumVaultAbi = [ | ||
]; | ||
export const TCBscDepositABI = [ | ||
{ inputs: [], stateMutability: 'nonpayable', type: 'constructor' }, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'to', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'asset', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
], | ||
name: 'Deposit', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'oldVault', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'newVault', type: 'address' }, | ||
{ indexed: false, internalType: 'address', name: 'asset', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
], | ||
name: 'TransferAllowance', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'vault', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'to', type: 'address' }, | ||
{ indexed: false, internalType: 'address', name: 'asset', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
], | ||
name: 'TransferOut', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'vault', type: 'address' }, | ||
{ indexed: false, internalType: 'address', name: 'target', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ indexed: false, internalType: 'address', name: 'finalAsset', type: 'address' }, | ||
{ indexed: false, internalType: 'address', name: 'to', type: 'address' }, | ||
{ indexed: false, internalType: 'uint256', name: 'amountOutMin', type: 'uint256' }, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
], | ||
name: 'TransferOutAndCall', | ||
type: 'event', | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ indexed: true, internalType: 'address', name: 'oldVault', type: 'address' }, | ||
{ indexed: true, internalType: 'address', name: 'newVault', type: 'address' }, | ||
{ | ||
components: [ | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
], | ||
indexed: false, | ||
internalType: 'struct THORChain_Router.Coin[]', | ||
name: 'coins', | ||
type: 'tuple[]', | ||
}, | ||
{ indexed: false, internalType: 'string', name: 'memo', type: 'string' }, | ||
], | ||
name: 'VaultTransfer', | ||
type: 'event', | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address payable', name: 'vault', type: 'address' }, | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
{ internalType: 'uint256', name: 'expiration', type: 'uint256' }, | ||
], | ||
name: 'depositWithExpiry', | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: 'router', type: 'address' }, | ||
{ internalType: 'address payable', name: 'asgard', type: 'address' }, | ||
{ | ||
components: [ | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
], | ||
internalType: 'struct THORChain_Router.Coin[]', | ||
name: 'coins', | ||
type: 'tuple[]', | ||
}, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
], | ||
name: 'returnVaultAssets', | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: 'router', type: 'address' }, | ||
{ internalType: 'address', name: 'newVault', type: 'address' }, | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
], | ||
name: 'transferAllowance', | ||
outputs: [], | ||
stateMutability: 'nonpayable', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address payable', name: 'to', type: 'address' }, | ||
{ internalType: 'address', name: 'asset', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amount', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
], | ||
name: 'transferOut', | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address payable', name: 'target', type: 'address' }, | ||
{ internalType: 'address', name: 'finalToken', type: 'address' }, | ||
{ internalType: 'address', name: 'to', type: 'address' }, | ||
{ internalType: 'uint256', name: 'amountOutMin', type: 'uint256' }, | ||
{ internalType: 'string', name: 'memo', type: 'string' }, | ||
], | ||
name: 'transferOutAndCall', | ||
outputs: [], | ||
stateMutability: 'payable', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: 'vault', type: 'address' }, | ||
{ internalType: 'address', name: 'token', type: 'address' }, | ||
], | ||
name: 'vaultAllowance', | ||
outputs: [{ internalType: 'uint256', name: 'amount', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
}, | ||
]; |
@@ -97,36 +97,10 @@ import type { FixedNumber } from '@ethersproject/bignumber'; | ||
TC_SUPPORTED_TO_TC_SUPPORTED = 'TC-TC', | ||
ETH_TO_TC_SUPPORTED = 'ERC20-TC', | ||
TC_SUPPORTED_TO_ETH = 'TC-ERC20', | ||
TC_SUPPORTED_TO_AVAX = 'TC-ARC20', | ||
TC_SUPPORTED_TO_BSC = 'TC-BEP20', | ||
ETH_TO_TC_SUPPORTED = 'ERC20-TC', | ||
ETH_TO_ETH = 'ERC20-ERC20', | ||
ETH_TO_AVAX = 'ERC20-ARC20', | ||
ETH_TO_BSC = 'ERC20-BEP20', | ||
AVAX_TO_AVAX = 'ARC20-ARC20', | ||
AVAX_TO_TC_SUPPORTED = 'ARC20-TC', | ||
TC_SUPPORTED_TO_AVAX = 'TC-ARC20', | ||
AVAX_TO_ETH = 'ARC20-ERC20', | ||
AVAX_TO_AVAX = 'ARC20-ARC20', | ||
AVAX_TO_BSC = 'ARC20-BEP20', | ||
BSC_TO_TC_SUPPORTED = 'BEP20-TC', | ||
BSC_TO_ETH = 'BEP20-ERC20', | ||
BSC_TO_AVAX = 'BEP20-ARC20', | ||
BSC_TO_BSC = 'BEP20-BEP20', | ||
ETH_TO_AVAX = 'ERC20-ARC20', | ||
} | ||
export const AGG_SWAP = [QuoteMode.ETH_TO_ETH, QuoteMode.AVAX_TO_AVAX, QuoteMode.BSC_TO_BSC]; | ||
export const SWAP_IN = [ | ||
QuoteMode.ETH_TO_TC_SUPPORTED, | ||
QuoteMode.ETH_TO_AVAX, | ||
QuoteMode.ETH_TO_BSC, | ||
QuoteMode.AVAX_TO_TC_SUPPORTED, | ||
QuoteMode.AVAX_TO_ETH, | ||
QuoteMode.AVAX_TO_BSC, | ||
QuoteMode.BSC_TO_TC_SUPPORTED, | ||
QuoteMode.BSC_TO_ETH, | ||
QuoteMode.BSC_TO_AVAX, | ||
]; | ||
export const SWAP_OUT = [ | ||
QuoteMode.TC_SUPPORTED_TO_TC_SUPPORTED, | ||
QuoteMode.TC_SUPPORTED_TO_ETH, | ||
QuoteMode.TC_SUPPORTED_TO_AVAX, | ||
QuoteMode.TC_SUPPORTED_TO_BSC, | ||
]; |
@@ -42,4 +42,2 @@ import { ERROR_CODE } from './types.ts'; | ||
[ERROR_CODE.THORNODE_QUOTE_GENERIC_ERROR]: 'ThorNode quote generic error.', | ||
[ERROR_CODE.INVALID_SOURCE_ADDRESS]: 'Invalid source address {0}', | ||
[ERROR_CODE.INVALID_DESTINATION_ADDRESS]: 'Invalid destination address {0}', | ||
[ERROR_CODE.NOT_ENOUGH_SYNTH_BALANCE]: | ||
@@ -46,0 +44,0 @@ "Source address doesn't have enough synth balance for this quote.", |
@@ -101,5 +101,2 @@ export enum ERROR_TYPE { | ||
UNSUPPORTED_ASSET_FOR_SWAPOUT = '2205', | ||
// 23xx - Invalid addresses | ||
INVALID_SOURCE_ADDRESS = '2300', | ||
INVALID_DESTINATION_ADDRESS = '2301', | ||
// 30xx - Thorchain | ||
@@ -106,0 +103,0 @@ THORNODE_QUOTE_GENERIC_ERROR = '3000', |
export { erc20ABI } from './abis/erc20.ts'; | ||
export { TCAvalancheDepositABI, TCBscDepositABI, TCEthereumVaultAbi } from './abis/tcEthVault.ts'; | ||
export { TCAvalancheDepositABI, TCEthereumVaultAbi } from './abis/tcEthVault.ts'; | ||
export * from './amount.ts'; | ||
@@ -4,0 +4,0 @@ export * from './asset.ts'; |
@@ -163,3 +163,3 @@ export enum Chain { | ||
ThornodeMainnet = 'https://thornode.thorswap.net', | ||
ThornodeStagenet = 'https://stagenet-thornode.ninerealms.com', | ||
ThornodeStagenet = 'https://stagenet.thornode.thorswap.net', | ||
ThorswapApi = 'https://api.thorswap.finance', | ||
@@ -166,0 +166,0 @@ ThorswapStatic = 'https://static.thorswap.net', |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
144276
2898