UNPKG

@reservoir0x/reservoir-sdk

Version:

An SDK that can be used in any javascript/typescript context to easily interact with Reservoir liquidity APIs

1,854 lines (1,816 loc) 167 kB
var $lPQI4$viem = require("viem"); var $lPQI4$viemchains = require("viem/chains"); var $lPQI4$axios = require("axios"); function $parcel$exportWildcard(dest, source) { Object.keys(source).forEach(function(key) { if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) { return; } Object.defineProperty(dest, key, { enumerable: true, get: function get() { return source[key]; } }); }); return dest; } function $parcel$export(e, n, v, s) { Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); } function $parcel$interopDefault(a) { return a && a.__esModule ? a.default : a; } var $3ba04d43fdd1e5a5$exports = {}; $parcel$export($3ba04d43fdd1e5a5$exports, "ReservoirClient", () => $3ba04d43fdd1e5a5$export$d0c36b5db6a81704); $parcel$export($3ba04d43fdd1e5a5$exports, "getClient", () => $3ba04d43fdd1e5a5$export$6bb76d6eba7e258c); $parcel$export($3ba04d43fdd1e5a5$exports, "createClient", () => $3ba04d43fdd1e5a5$export$5d730b7aed1a3eb0); const $dc6d45909770cbab$export$536d3e0d2c7baf54 = { id: 1, name: "Ethereum", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://ethereum-rpc.publicnode.com", "https://mainnet.gateway.tenderly.co", "https://rpc.flashbots.net", "https://rpc.mevblocker.io", "https://eth.drpc.org" ] } }, blockExplorers: { default: { name: "Etherscan", url: "https://etherscan.io", apiUrl: "https://api.etherscan.io/api" } }, contracts: { ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" }, ensUniversalResolver: { address: "0xce01f8eee7E479C928F8919abD53E553a36CeF67", blockCreated: 19258213 }, multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 14353601 } } }; const $dc6d45909770cbab$export$b0cdd37f637fe2b = { id: 888888888, name: "Ancient8", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc.ancient8.gg" ], webSocket: [ "wss://rpc.ancient8.gg" ] }, public: { http: [ "https://rpc.ancient8.gg" ], webSocket: [ "wss://rpc.ancient8.gg" ] } }, blockExplorers: { etherscan: { name: "a8scan", url: "https://scan.ancient8.gg" }, default: { name: "a8scan", url: "https://scan.ancient8.gg" } } }; const $dc6d45909770cbab$export$56ccc64205b7faee = { id: 28122024, name: "Ancient8 Testnet", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpcv2-testnet.ancient8.gg" ], webSocket: [ "wss://rpcv2-testnet.ancient8.gg" ] }, public: { http: [ "https://rpcv2-testnet.ancient8.gg" ], webSocket: [ "wss://rpcv2-testnet.ancient8.gg" ] } }, blockExplorers: { etherscan: { name: "a8scan", url: "https://scanv2-testnet.ancient8.gg/" }, default: { name: "a8scan", url: "https://scanv2-testnet.ancient8.gg/" } } }; const $dc6d45909770cbab$export$de21e06f3c93a4e = { id: 68840142, name: "Frame Testnet", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc.testnet.frame.xyz/http" ], webSocket: [ "https://rpc.testnet.frame.xyz/http" ] }, public: { http: [ "https://rpc.testnet.frame.xyz/http" ], webSocket: [ "https://rpc.testnet.frame.xyz/http" ] } }, blockExplorers: { etherscan: { name: "Frame Explorer", url: "https://explorer.testnet.frame.xyz" }, default: { name: "Frame Explorer", url: "https://explorer.testnet.frame.xyz" } } }; const $dc6d45909770cbab$export$e5a8b7c06ee30d03 = { id: 168587773, name: "Blast Sepolia", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://sepolia.blast.io" ] }, public: { http: [ "https://sepolia.blast.io" ] } }, blockExplorers: { etherscan: { name: "BlastScan Sepolia", url: "https://testnet.blastscan.io" }, default: { name: "BlastScan Sepolia", url: "https://testnet.blastscan.io" } } }; const $dc6d45909770cbab$export$7e0f7b1042ead493 = { id: 70700, name: "Apex", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc.apex.proofofplay.com" ] }, public: { http: [ "https://rpc.apex.proofofplay.com" ] } }, blockExplorers: { etherscan: { name: "Apex", url: "https://explorer.apex.proofofplay.com" }, default: { name: "Apex", url: "https://explorer.apex.proofofplay.com" } } }; const $dc6d45909770cbab$export$f9c5174078e7ccb4 = { id: 70800, name: "Apex Testnet", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc-pop-testnet-barret-oxaolmcfss.t.conduit.xyz" ] }, public: { http: [ "https://rpc-pop-testnet-barret-oxaolmcfss.t.conduit.xyz" ] } }, blockExplorers: { etherscan: { name: "Apex Testnet", url: "https://explorerl2new-pop-testnet-barret-oxaolmcfss.t.conduit.xyz" }, default: { name: "Apex Testnet", url: "https://explorerl2new-pop-testnet-barret-oxaolmcfss.t.conduit.xyz" } } }; const $dc6d45909770cbab$export$bc31afc5674f301e = { id: 81457, name: "Blast", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc.blast.io" ] }, public: { http: [ "https://rpc.blast.io" ] } }, blockExplorers: { etherscan: { name: "Blastscan", url: "https://blastscan.io" }, default: { name: "Blastscan", url: "https://blastscan.io" } } }; const $dc6d45909770cbab$export$ae88ddf429832986 = { id: 3776, name: "Astar ZkEVM", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc.startale.com/astar-zkevm" ] }, public: { http: [ "https://rpc.startale.com/astar-zkevm" ] } }, blockExplorers: { etherscan: { name: "Astar zkEVM", url: "https://astar-zkevm.explorer.startale.com" }, default: { name: "Astar zkEVM", url: "https://astar-zkevm.explorer.startale.com" } } }; const $dc6d45909770cbab$export$af6bc543c5efb4ff = { id: 17069, name: "Garnet", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc.garnet.qry.live" ] }, public: { http: [ "https://rpc.garnet.qry.live" ] } }, blockExplorers: { etherscan: { name: "Garnet", url: "https://explorer.garnet.qry.live" }, default: { name: "Garnet", url: "https://explorer.garnet.qry.live" } } }; const $dc6d45909770cbab$export$644cee3bb986af5e = { id: 690, name: "Redstone", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc.redstonechain.com" ] }, public: { http: [ "https://rpc.redstonechain.com" ] } }, blockExplorers: { etherscan: { name: "Redstone", url: "https://explorer.redstone.xyz" }, default: { name: "Redstone", url: "https://explorer.redstone.xyz" } } }; const $dc6d45909770cbab$export$57d0fe3a30d519de = { id: 666666666, name: "Degen", nativeCurrency: { name: "DEGEN", symbol: "DEGEN", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc.degen.tips" ] }, public: { http: [ "https://rpc.degen.tips" ] } }, blockExplorers: { etherscan: { name: "Degen Chain Explorer", url: "https://explorer.degen.tips" }, default: { name: "Degen Chain Explorer", url: "https://explorer.degen.tips" } } }; const $dc6d45909770cbab$export$ae427ff435bf4868 = { id: 660279, name: "Xai", nativeCurrency: { name: "Xai", symbol: "XAI", decimals: 18 }, rpcUrls: { default: { http: [ "https://xai-chain.net/rpc" ] }, public: { http: [ "https://xai-chain.net/rpc" ] } }, blockExplorers: { etherscan: { name: "Xai", url: "https://explorer.xai-chain.net" }, default: { name: "Xai", url: "https://explorer.xai-chain.net" } } }; const $dc6d45909770cbab$export$751db6c81f9707e = { id: 713715, name: "Sei Testnet", nativeCurrency: { name: "Sei", symbol: "SEI", decimals: 18 }, rpcUrls: { default: { http: [ "https://evm-rpc-arctic-1.sei-apis.com" ] }, public: { http: [ "https://evm-rpc-arctic-1.sei-apis.com" ] } }, blockExplorers: { etherscan: { name: "Sei Testnet", url: "https://seistream.app" }, default: { name: "Sei Testnet", url: "https://seistream.app" } } }; const $dc6d45909770cbab$export$b3ff628a4eb6ce22 = { id: 7560, name: "Cyber", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://cyber.alt.technology" ] }, public: { http: [ "https://cyber.alt.technology" ] } }, blockExplorers: { etherscan: { name: "Cyber Explorer", url: "https://cyberscan.co" }, default: { name: "Cyber Explorer", url: "https://cyberscan.co" } } }; const $dc6d45909770cbab$export$e77c90af1834006f = { id: 200901, name: "Bitlayer", nativeCurrency: { name: "Bitcoin", symbol: "BTC", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc.bitlayer.org" ] }, public: { http: [ "https://rpc.bitlayer.org" ] } }, blockExplorers: { etherscan: { name: "Bitlayer Scan", url: "https://www.btrscan.com" }, default: { name: "Bitlayer Scan", url: "https://www.btrscan.com" } } }; const $dc6d45909770cbab$export$cb4e7b8c9e2a642f = { id: 1329, name: "Sei", nativeCurrency: { name: "Sei", symbol: "SEI", decimals: 18 }, rpcUrls: { default: { http: [ "https://evm-rpc.sei-apis.com" ] }, public: { http: [ "https://evm-rpc.sei-apis.com" ] } }, blockExplorers: { etherscan: { name: "Sei Scan", url: "https://seitrace.com" }, default: { name: "Sei Scan", url: "https://seitrace.com" } } }; const $dc6d45909770cbab$export$5fd5c71fbc66fa0d = { id: 1482601649, name: "Nebula", nativeCurrency: { name: "sFUEL", symbol: "sFUEL", decimals: 18 }, rpcUrls: { default: { http: [ "https://mainnet.skalenodes.com/v1/green-giddy-denebola" ] }, public: { http: [ "https://mainnet.skalenodes.com/v1/green-giddy-denebola" ] } }, blockExplorers: { etherscan: { name: "SKALE Explorer", url: "https://green-giddy-denebola.explorer.mainnet.skalenodes.com" }, default: { name: "SKALE Explorer", url: "https://green-giddy-denebola.explorer.mainnet.skalenodes.com" } } }; const $dc6d45909770cbab$export$d6fdd9622e78341e = { id: 1993, name: "B3 Testnet", nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://sepolia.b3.fun/http" ] }, public: { http: [ "https://sepolia.b3.fun/http" ] } }, blockExplorers: { etherscan: { name: "B3 Sepolia Explorer", url: "https://sepolia.explorer.b3.fun" }, default: { name: "B3 Sepolia Explorer", url: "https://sepolia.explorer.b3.fun" } } }; const $dc6d45909770cbab$export$615837ca9e3a75e8 = { id: 646, name: "Flow Previewnet", nativeCurrency: { name: "Flow", symbol: "FLOW", decimals: 18 }, rpcUrls: { default: { http: [ "https://previewnet.evm.nodes.onflow.org" ] }, public: { http: [ "https://previewnet.evm.nodes.onflow.org" ] } }, blockExplorers: { etherscan: { name: "Flow Previewnet Explorer", url: "https://eth.flowscan.io/" }, default: { name: "Flow Previewnet Explorer", url: "https://eth.flowscan.io/" } } }; const $dc6d45909770cbab$export$310741c5b9ff060 = { id: 70805, name: "Cloud", nativeCurrency: { name: "Eth", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc-pop-testnet-cloud-fmg1z6e0a9.t.conduit.xyz" ] }, public: { http: [ "https://rpc-pop-testnet-cloud-fmg1z6e0a9.t.conduit.xyz" ] } }, blockExplorers: { etherscan: { name: "Cloud Explorer", url: "https://explorer-pop-testnet-cloud-fmg1z6e0a9.t.conduit.xyz" }, default: { name: "Cloud Explorer", url: "https://explorer-pop-testnet-cloud-fmg1z6e0a9.t.conduit.xyz" } } }; const $dc6d45909770cbab$export$4a2fb00c9a574d11 = { id: 13746, name: "Game7 Testnet", nativeCurrency: { name: "TG7T", symbol: "TG7T", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc-game7-testnet-0ilneybprf.t.conduit.xyz" ] }, public: { http: [ "https://rpc-game7-testnet-0ilneybprf.t.conduit.xyz" ] } }, blockExplorers: { etherscan: { name: "Game7 Testnet Explorer", url: "https://explorer-game7-testnet-0ilneybprf.t.conduit.xyz" }, default: { name: "Game7 Testnet Explorer", url: "https://explorer-game7-testnet-0ilneybprf.t.conduit.xyz" } } }; const $dc6d45909770cbab$export$b7105ec7f3b95a70 = { id: 70701, name: "Boss", nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc.boss.proofofplay.com" ] }, public: { http: [ "https://rpc.boss.proofofplay.com" ] } }, blockExplorers: { etherscan: { name: "Boss Explorer", url: "https://explorer.boss.proofofplay.com" }, default: { name: "Boss Explorer", url: "https://explorer.boss.proofofplay.com" } } }; const $dc6d45909770cbab$export$e1e1b556b4081041 = { id: 984122, name: "Forma", nativeCurrency: { name: "TIA", symbol: "TIA", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc.forma.art" ] }, public: { http: [ "https://rpc.forma.art" ] } }, blockExplorers: { etherscan: { name: "Forma Explorer", url: "https://explorer.forma.art" }, default: { name: "Forma Explorer", url: "https://explorer.forma.art" } } }; const $dc6d45909770cbab$export$855aca503db93466 = { id: 984123, name: "Forma Sketchpad", nativeCurrency: { name: "TIA", symbol: "TIA", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc.sketchpad-1.forma.art" ] }, public: { http: [ "https://rpc.sketchpad-1.forma.art" ] } }, blockExplorers: { etherscan: { name: "Forma Sketchpad Explorer", url: "https://explorer.sketchpad-1.forma.art" }, default: { name: "Forma Sketchpad Explorer", url: "https://explorer.sketchpad-1.forma.art" } } }; const $dc6d45909770cbab$export$53c86fa97d611818 = { id: 8333, name: "B3", nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://mainnet-rpc.b3.fun/http" ] }, public: { http: [ "https://mainnet-rpc.b3.fun/http" ] } }, blockExplorers: { etherscan: { name: "B3 Explorer", url: "https://explorer.b3.fun" }, default: { name: "B3 Explorer", url: "https://explorer.b3.fun" } } }; const $dc6d45909770cbab$export$30dd3de87cee3388 = { id: 33139, name: "Apechain", nativeCurrency: { name: "ApeCoin", symbol: "APE", decimals: 18 }, rpcUrls: { default: { http: [ "https://apechain.calderachain.xyz/http" ] }, public: { http: [ "https://apechain.calderachain.xyz/http" ] } }, blockExplorers: { etherscan: { name: "Apechain Explorer", url: "https://apescan.io" }, default: { name: "Apechain Explorer", url: "https://apescan.io" } } }; const $dc6d45909770cbab$export$1cf9f625cc5d98a2 = { id: 33111, name: "Curtis", nativeCurrency: { name: "ApeCoin", symbol: "APE", decimals: 18 }, rpcUrls: { default: { http: [ "https://curtis.rpc.caldera.xyz/http" ] }, public: { http: [ "https://curtis.rpc.caldera.xyz/http" ] } }, blockExplorers: { etherscan: { name: "Curtis Explorer", url: "https://curtis.explorer.caldera.xyz" }, default: { name: "Curtis Explorer", url: "https://curtis.explorer.caldera.xyz" } } }; const $dc6d45909770cbab$export$98bada23690e67eb = { id: 360, name: "Shape", nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://mainnet.shape.network" ] }, public: { http: [ "https://mainnet.shape.network" ] } }, blockExplorers: { etherscan: { name: "Shape Explorer", url: "https://shapescan.xyz" }, default: { name: "Shape Explorer", url: "https://shapescan.xyz" } } }; const $dc6d45909770cbab$export$59bc8fcf4e4a7976 = { id: 11011, name: "Shape Sepolia", nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://sepolia.shape.network" ] }, public: { http: [ "https://sepolia.shape.network" ] } }, blockExplorers: { etherscan: { name: "Shape Sepolia Explorer", url: "https://explorer-sepolia.shape.network" }, default: { name: "Shape Sepolia Explorer", url: "https://explorer-sepolia.shape.network" } } }; const $dc6d45909770cbab$export$3c16616089db1866 = { id: 11124, name: "Abstract Testnet", nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://api.testnet.abs.xyz" ] }, public: { http: [ "https://api.testnet.abs.xyz" ] } }, blockExplorers: { etherscan: { name: "Abstract Testnet Explorer", url: "https://explorer.testnet.abs.xyz" }, default: { name: "Abstract Testnet Explorer", url: "https://explorer.testnet.abs.xyz" } } }; const $dc6d45909770cbab$export$4e9201c056a6dc54 = { id: 1946, name: "Minato", nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc.minato.soneium.org" ] }, public: { http: [ "https://rpc.minato.soneium.org" ] } }, blockExplorers: { etherscan: { name: "Minato Explorer", url: "https://soneium-minato.blockscout.com" }, default: { name: "Minato Explorer", url: "https://soneium-minato.blockscout.com" } } }; const $dc6d45909770cbab$export$cf7da39f4e77f369 = { id: 2911, name: "Hychain", nativeCurrency: { name: "Hychain", symbol: "TOPIA", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc.hychain.com/http" ] }, public: { http: [ "https://rpc.hychain.com/http" ] } }, blockExplorers: { etherscan: { name: "Hychain Explorer", url: "https://explorer.hychain.com" }, default: { name: "Hychain Explorer", url: "https://explorer.hychain.com" } } }; const $dc6d45909770cbab$export$972432873143e08e = { id: 29112, name: "Hychain Testnet", nativeCurrency: { name: "Hychain", symbol: "TOPIA", decimals: 18 }, rpcUrls: { default: { http: [ "https://testnet-rpc.hychain.com/http" ] }, public: { http: [ "https://testnet-rpc.hychain.com/http" ] } }, blockExplorers: { etherscan: { name: "Hychain Testnet Explorer", url: "https://testnet.explorer.hychain.com" }, default: { name: "Hychain Testnet Explorer", url: "https://testnet.explorer.hychain.com" } } }; const $dc6d45909770cbab$export$ccc7b0636abaffc3 = { id: 747, name: "Flow", nativeCurrency: { name: "Flow", symbol: "FLOW", decimals: 18 }, rpcUrls: { default: { http: [ "https://mainnet.evm.nodes.onflow.org" ] }, public: { http: [ "https://mainnet.evm.nodes.onflow.org" ] } }, blockExplorers: { etherscan: { name: "Flow Explorer", url: "https://evm.flowscan.io" }, default: { name: "Flow Explorer", url: "https://evm.flowscan.io" } } }; const $dc6d45909770cbab$export$7f9972325ebfd559 = { id: 543210, name: "Zero", nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://zero-network.calderachain.xyz" ] }, public: { http: [ "https://zero-network.calderachain.xyz" ] } }, blockExplorers: { etherscan: { name: "Zero Explorer", url: "https://explorer.zero.network" }, default: { name: "Zero Explorer", url: "https://explorer.zero.network" } } }; const $dc6d45909770cbab$export$dfc5b2ea7c450170 = { id: 43210, name: "Zero Testnet", nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://zerion-testnet-proofs.rpc.caldera.xyz/http" ] }, public: { http: [ "https://zerion-testnet-proofs.rpc.caldera.xyz/http" ] } }, blockExplorers: { etherscan: { name: "Zero Testnet Explorer", url: "https://zerion-testnet-proofs.explorer.caldera.xyz" }, default: { name: "Zero Testnet Explorer", url: "https://zerion-testnet-proofs.explorer.caldera.xyz" } } }; const $dc6d45909770cbab$export$817eb92a8194bab0 = { id: 2741, name: "Abstract", nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc.fsd.adfasd32442ds.com" ] }, public: { http: [ "https://rpc.fsd.adfasd32442ds.com" ] } }, blockExplorers: { etherscan: { name: "Abstract Explorer", url: "https://abscan.org" }, default: { name: "Abstract Explorer", url: "https://abscan.org" } } }; const $dc6d45909770cbab$export$6107704ef47e0959 = { id: 6900, name: "Anime Testnet", nativeCurrency: { name: "ANIME", symbol: "ANIME", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc-animechain-testnet-i8yja6a1a0.t.conduit.xyz" ] }, public: { http: [ "https://rpc-animechain-testnet-i8yja6a1a0.t.conduit.xyz" ] } }, blockExplorers: { etherscan: { name: "Anime Testnet Explorer", url: "https://testnet-explorer.anime.xyz" }, default: { name: "Anime Testnet Explorer", url: "https://testnet-explorer.anime.xyz" } } }; const $dc6d45909770cbab$export$87285b7528427969 = { id: 41454, name: "Monad Devnet", nativeCurrency: { name: "MON", symbol: "MON", decimals: 18 }, rpcUrls: { default: { http: [ "https://devnet1.monad.xyz/rpc/diJoIRvXonYUWPhZNBtJAv1ffPjrkYBXXewh4PZe" ] }, public: { http: [ "https://devnet1.monad.xyz/rpc/diJoIRvXonYUWPhZNBtJAv1ffPjrkYBXXewh4PZe" ] } }, blockExplorers: { etherscan: { name: "Monad Devnet Explorer", url: "https://brightstar-884.devnet1.monad.xyz" }, default: { name: "Monad Devnet Explorer", url: "https://brightstar-884.devnet1.monad.xyz" } } }; const $dc6d45909770cbab$export$8ffa85fec7b29c36 = { id: 2187, name: "game7", nativeCurrency: { name: "Game7", symbol: "G7", decimals: 18 }, rpcUrls: { default: { http: [ "https://mainnet-rpc.game7.io" ] }, public: { http: [ "https://mainnet-rpc.game7.io" ] } }, blockExplorers: { etherscan: { name: "G7 Network Explorer", url: "https://mainnet.game7.io" }, default: { name: "G7 Network Explorer", url: "https://mainnet.game7.io" } } }; const $dc6d45909770cbab$export$b87f6df61f0ffc9 = { id: 4654, name: "Creator Testnet", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://creator-testnet.rpc.caldera.xyz/http" ] }, public: { http: [ "https://creator-testnet.rpc.caldera.xyz/http" ] } }, blockExplorers: { etherscan: { name: "Creator Testnet Explorer", url: "https://creator-testnet.explorer.caldera.xyz" }, default: { name: "Creator Testnet Explorer", url: "https://creator-testnet.explorer.caldera.xyz" } } }; const $dc6d45909770cbab$export$199dc305aa5e13a3 = { id: 1868, name: "Soneium", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://yellow-flash-rpc.dwellir.com" ] }, public: { http: [ "https://yellow-flash-rpc.dwellir.com" ] } }, blockExplorers: { etherscan: { name: "Soneium Explorer", url: "https://vk9a3tgpne6qmub8.blockscout.com" }, default: { name: "Soneium Explorer", url: "https://vk9a3tgpne6qmub8.blockscout.com" } } }; const $dc6d45909770cbab$export$3437a8c890dec894 = { id: 1516, name: "Story Odyssey", nativeCurrency: { name: "IP", symbol: "IP", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc.odyssey.storyrpc.io" ] }, public: { http: [ "https://rpc.odyssey.storyrpc.io" ] } }, blockExplorers: { etherscan: { name: "Story Odyssey Explorer", url: "https://odyssey.storyscan.xyz" }, default: { name: "Story Odyssey Explorer", url: "https://odyssey.storyscan.xyz" } } }; const $dc6d45909770cbab$export$d6fda31877eccfa = { id: 10143, name: "Monad Testnet", nativeCurrency: { name: "Monad", symbol: "MON", decimals: 18 }, rpcUrls: { default: { http: [ "https://testnet-rpc.monad.xyz" ] }, public: { http: [ "https://testnet-rpc.monad.xyz" ] } }, blockExplorers: { etherscan: { name: "Monad Testnet Explorer", url: "https://testnet.monadexplorer.com" }, default: { name: "Monad Testnet Explorer", url: "https://testnet.monadexplorer.com" } } }; const $dc6d45909770cbab$export$4d551dc4315b2348 = { id: 57073, name: "Ink", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc-gel.inkonchain.com" ] }, public: { http: [ "https://rpc-gel.inkonchain.com" ] } }, blockExplorers: { etherscan: { name: "Ink Explorer", url: "https://explorer.inkonchain.com" }, default: { name: "Ink Explorer", url: "https://explorer.inkonchain.com" } } }; const $dc6d45909770cbab$export$44d5c0445a77b616 = { id: 80094, name: "Berachain", nativeCurrency: { name: "Bera", symbol: "BERA", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc.berachain.com" ] }, public: { http: [ "https://rpc.berachain.com" ] } }, blockExplorers: { etherscan: { name: "Berachain Explorer", url: "https://berascan.com" }, default: { name: "Berachain Explorer", url: "https://berascan.com" } } }; const $dc6d45909770cbab$export$8a528a920cc8c77d = { id: 69000, name: "Anime", nativeCurrency: { name: "Anime", symbol: "ANIME", decimals: 18 }, rpcUrls: { default: { http: [ "https://rpc-animechain-39xf6m45e3.t.conduit.xyz" ] }, public: { http: [ "https://rpc-animechain-39xf6m45e3.t.conduit.xyz" ] } } }; const $dc6d45909770cbab$export$14635688a51e4f9f = { ancient8: $dc6d45909770cbab$export$b0cdd37f637fe2b, ancient8Testnet: $dc6d45909770cbab$export$56ccc64205b7faee, frameTestnet: $dc6d45909770cbab$export$de21e06f3c93a4e, blastSepolia: $dc6d45909770cbab$export$e5a8b7c06ee30d03, apexPop: $dc6d45909770cbab$export$7e0f7b1042ead493, apexPopTestnet: $dc6d45909770cbab$export$f9c5174078e7ccb4, blast: $dc6d45909770cbab$export$bc31afc5674f301e, astarZkEVM: $dc6d45909770cbab$export$ae88ddf429832986, garnet: $dc6d45909770cbab$export$af6bc543c5efb4ff, redstone: $dc6d45909770cbab$export$644cee3bb986af5e, degen: $dc6d45909770cbab$export$57d0fe3a30d519de, xai: $dc6d45909770cbab$export$ae427ff435bf4868, seiTestnet: $dc6d45909770cbab$export$751db6c81f9707e, cyber: $dc6d45909770cbab$export$b3ff628a4eb6ce22, bitlayer: $dc6d45909770cbab$export$e77c90af1834006f, sei: $dc6d45909770cbab$export$cb4e7b8c9e2a642f, nebula: $dc6d45909770cbab$export$5fd5c71fbc66fa0d, b3Testnet: $dc6d45909770cbab$export$d6fdd9622e78341e, flowPreviewnet: $dc6d45909770cbab$export$615837ca9e3a75e8, cloud: $dc6d45909770cbab$export$310741c5b9ff060, game7Testnet: $dc6d45909770cbab$export$4a2fb00c9a574d11, boss: $dc6d45909770cbab$export$b7105ec7f3b95a70, forma: $dc6d45909770cbab$export$e1e1b556b4081041, formaSketchpad: $dc6d45909770cbab$export$855aca503db93466, b3: $dc6d45909770cbab$export$53c86fa97d611818, apechain: $dc6d45909770cbab$export$30dd3de87cee3388, curtis: $dc6d45909770cbab$export$1cf9f625cc5d98a2, shape: $dc6d45909770cbab$export$98bada23690e67eb, shapeSepolia: $dc6d45909770cbab$export$59bc8fcf4e4a7976, abstractTestnet: $dc6d45909770cbab$export$3c16616089db1866, minato: $dc6d45909770cbab$export$4e9201c056a6dc54, hychain: $dc6d45909770cbab$export$cf7da39f4e77f369, hychainTestnet: $dc6d45909770cbab$export$972432873143e08e, flow: $dc6d45909770cbab$export$ccc7b0636abaffc3, zero: $dc6d45909770cbab$export$7f9972325ebfd559, zeroTestnet: $dc6d45909770cbab$export$dfc5b2ea7c450170, abstract: $dc6d45909770cbab$export$817eb92a8194bab0, animeTestnet: $dc6d45909770cbab$export$6107704ef47e0959, monadDevnet: $dc6d45909770cbab$export$87285b7528427969, game7: $dc6d45909770cbab$export$8ffa85fec7b29c36, creatorTestnet: $dc6d45909770cbab$export$b87f6df61f0ffc9, soneium: $dc6d45909770cbab$export$199dc305aa5e13a3, storyOdyssey: $dc6d45909770cbab$export$3437a8c890dec894, monadTestnet: $dc6d45909770cbab$export$d6fda31877eccfa, ink: $dc6d45909770cbab$export$4d551dc4315b2348, berachain: $dc6d45909770cbab$export$44d5c0445a77b616, anime: $dc6d45909770cbab$export$8a528a920cc8c77d }; var $b747246cb5dd2c78$export$243e62d78d3b544d; (function(LogLevel) { LogLevel[LogLevel["Verbose"] = 4] = "Verbose"; LogLevel[LogLevel["Info"] = 3] = "Info"; LogLevel[LogLevel["Warn"] = 2] = "Warn"; LogLevel[LogLevel["Error"] = 1] = "Error"; LogLevel[LogLevel["None"] = 0] = "None"; })($b747246cb5dd2c78$export$243e62d78d3b544d || ($b747246cb5dd2c78$export$243e62d78d3b544d = {})); const $b747246cb5dd2c78$export$bef1f36f5486a6a3 = (params, level, currentLevel)=>{ if (currentLevel >= level) { const data = params.reduce((params, param, i)=>{ if ((i + 1) % 2) params.push("\n"); params.push(param); return params; }, []); switch(level){ case $b747246cb5dd2c78$export$243e62d78d3b544d.Info: console.info(...data); break; case $b747246cb5dd2c78$export$243e62d78d3b544d.Error: console.error(...data); break; case $b747246cb5dd2c78$export$243e62d78d3b544d.Warn: console.warn(...data); break; default: console.log(...data); break; } } }; function $87c17edcee2f1608$export$ae9c7a4ba934c882(wallet) { return wallet.getChainId !== undefined; } const $87c17edcee2f1608$export$578785c07cb9817 = (wallet)=>{ return { transport: (0, $lPQI4$viem.custom)(wallet.transport), address: async ()=>{ let address = wallet.account?.address; if (!address) [address] = await wallet.getAddresses(); return address; }, handleSignMessageStep: async (stepItem)=>{ const client = (0, $3ba04d43fdd1e5a5$export$6bb76d6eba7e258c)(); const signData = stepItem.data?.sign; let signature; if (signData) { if (signData.signatureKind === "eip191") { client.log([ "Execute Steps: Signing with eip191" ], (0, $b747246cb5dd2c78$export$243e62d78d3b544d).Verbose); if (signData.message.match(/0x[0-9a-fA-F]{64}/)) // If the message represents a hash, we need to convert it to raw bytes first signature = await wallet.signMessage({ account: wallet.account, message: { raw: signData.message } }); else signature = await wallet.signMessage({ account: wallet.account, message: signData.message }); } else if (signData.signatureKind === "eip712") { client.log([ "Execute Steps: Signing with eip712" ], (0, $b747246cb5dd2c78$export$243e62d78d3b544d).Verbose); signature = await wallet.signTypedData({ account: wallet.account, domain: signData.domain, types: signData.types, primaryType: signData.primaryType, message: signData.value }); } } return signature; }, handleSendTransactionStep: async (chainId, stepItem)=>{ let viemChain; const customChain = Object.values((0, $dc6d45909770cbab$export$14635688a51e4f9f)).find((chain)=>chain.id === (chainId || 1)); if (customChain) viemChain = customChain; else viemChain = Object.values($lPQI4$viemchains).find((chain)=>chain.id === (chainId || 1)) || $lPQI4$viemchains.mainnet; const stepData = stepItem.data; return await wallet.sendTransaction({ chain: viemChain, data: stepData.data, account: wallet.account ?? stepData.from, to: stepData.to, value: (0, $lPQI4$viem.hexToBigInt)(stepData.value || 0), ...stepData.maxFeePerGas && { maxFeePerGas: (0, $lPQI4$viem.hexToBigInt)(stepData.maxFeePerGas) }, ...stepData.maxPriorityFeePerGas && { maxPriorityFeePerGas: (0, $lPQI4$viem.hexToBigInt)(stepData.maxPriorityFeePerGas) }, ...stepData.gas && { gas: (0, $lPQI4$viem.hexToBigInt)(stepData.gas) } }); } }; }; const $af1a36115b20e29b$export$4432d0b5215ac33e = (0, ($parcel$interopDefault($lPQI4$axios))).create(); $af1a36115b20e29b$export$4432d0b5215ac33e.interceptors.response.use((_res)=>{ if (_res.headers["Deprecation"] === "true") console.warn(`Warning: API ${_res.config.url} is deprecated. Stability and performance may be affected.`); return _res; }, (error)=>{ const message = error.response?.data?.message || error.response?.data?.error || error?.message; const statusCode = error?.response?.data?.statusCode || error?.response?.status; const requestUrl = error?.config?.url || error?.request?.responseURL; return Promise.reject(new (0, $b3114c59012a233a$export$3e5b797e39668f84)(message, statusCode, error.response?.data, requestUrl)); }); var $134f7602d1733f79$exports = {}; $134f7602d1733f79$exports = JSON.parse('{"name":"@reservoir0x/reservoir-sdk","version":"2.5.7","description":"An SDK that can be used in any javascript/typescript context to easily interact with Reservoir liquidity APIs","author":"Reservoir Protocol","license":"MIT","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.js","types":"./dist/index.d.ts"}},"source":"./src/index.ts","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","files":["dist"],"scripts":{"clean":"rm -rf dist","test":"jest","syncApi":"node ./sync-api.mjs"},"repository":{"type":"git","url":"https://github.com/reservoirprotocol/reservoir-kit"},"sideEffects":false,"keywords":["nft","reservoir","reservoir-sdk","reservoirkit","protocol","sdk"],"dependencies":{"axios":"^1.6.7"},"publishConfig":{"access":"public"},"devDependencies":{"@types/jest":"^29.5.2","jest":"^29.5.0","openapi-typescript":"^5.4.1","ts-jest":"^29.1.0"},"peerDependencies":{"viem":"~2.22.8"}}'); function $b3114c59012a233a$export$b5fe3f66a567bec0(config = {}) { const client = (0, $3ba04d43fdd1e5a5$export$6bb76d6eba7e258c)(); const headers = { "Content-Type": "application/json", "x-rkc-version": (0, $134f7602d1733f79$exports.version) }; if (client?.apiKey) headers["x-api-key"] = client.apiKey; return (0, $af1a36115b20e29b$export$4432d0b5215ac33e).request({ headers: headers, ...config }); } function $b3114c59012a233a$export$552b5ebb30950f43(error) { return error && error.cause === "APIError"; } class $b3114c59012a233a$export$3e5b797e39668f84 extends Error { constructor(message = "Unknown Reason", statusCode, rawError, requestUrl, type = "APIError", options = {}){ super(message, { ...options, cause: "APIError" }); this.name = "APIError"; this.type = type; this.statusCode = statusCode; this.rawError = rawError; this.requestUrl = requestUrl; } } async function $8f16fb6674bc87a2$export$f014594cc879f602(request, dataParser, maximumAttempts = 15, attemptCount = 0) { if (attemptCount >= maximumAttempts) throw `Failed to get data after ${attemptCount} attempt(s), aborting`; async function getData() { let res = await (0, $af1a36115b20e29b$export$4432d0b5215ac33e).request(request); return res.data; } const json = await getData(); // Check if the data exists const dataExists = dataParser(json); if (dataExists) return json; // The response is still unchanged. Check again in five seconds await new Promise((resolve)=>setTimeout(resolve, 5000)); attemptCount++; await $8f16fb6674bc87a2$export$f014594cc879f602(request, dataParser, maximumAttempts, attemptCount); } async function $8f16fb6674bc87a2$export$d2c70568ef790b87(request, validate, maximumAttempts = 15, attemptCount = 0, pollingInterval = 5000) { if (attemptCount >= maximumAttempts) throw `Failed to get an ok response after ${attemptCount} attempt(s), aborting`; const res = await (0, $af1a36115b20e29b$export$4432d0b5215ac33e).request(request); if (!validate) validate = (res)=>res.status === 200; // Check that the response from an endpoint updated if (validate(res)) return true; else { // The response is still unchanged await new Promise((resolve)=>setTimeout(resolve, pollingInterval)); attemptCount++; await $8f16fb6674bc87a2$export$d2c70568ef790b87(request, validate, maximumAttempts, attemptCount, pollingInterval); } } /** * Set URL query params using a typed objects * * This will convert an object * * ```js * { * foo: 'bar', * age: 50, * } * ``` * * into a query string * * `?foo=bar&age=50` * * and append it to URL provided * * `https://api.example.com/tokens?foo=bar&age=50` * * @param url An URL instance * @param query An object containing all needed query params. */ function $0fd5f57dc6013621$export$dc1827290674c112(url, query) { Object.keys(query).map((key)=>{ let value = query[key]; if (value !== undefined) { if (Array.isArray(value)) value.forEach((item)=>{ url.searchParams.append(key, item); }); else url.searchParams.append(key, query[key]?.toString()); } return url; }); } const $09796638e4c51207$export$d4f1f65ba9b7c38c = (request, data)=>{ const isBuy = request.url?.includes("/execute/buy"); const isSell = request.url?.includes("/execute/sell"); const isBid = request.url?.includes("/execute/bid"); const isList = request.url?.includes("/execute/list"); const isCancel = request.url?.includes("/execute/cancel"); let name; const hasError = data?.error || data?.steps.some((step)=>step.error); if (isBuy) name = hasError ? "purchase_error" : "purchase_complete"; else if (isSell) name = hasError ? "accept_offer_error" : "accept_offer_complete"; else if (isBid) name = hasError ? "offer_error" : "offer_complete"; else if (isList) name = hasError ? "listing_error" : "listing_complete"; else if (isCancel) name = hasError ? "cancel_error" : "cancel_complete"; else name = "unknown"; return { name: name, data: data }; }; var $5c701e588de13f68$exports = {}; $parcel$export($5c701e588de13f68$exports, "TransactionTimeoutError", () => $5c701e588de13f68$export$64ace85f638f5149); $parcel$export($5c701e588de13f68$exports, "CrossChainTransactionError", () => $5c701e588de13f68$export$d584f051b2952941); class $5c701e588de13f68$export$64ace85f638f5149 extends Error { constructor(txHash, attemptCount, blockExplorerBaseUrl){ super(`Failed to receive a successful response for transaction with hash '${txHash}' after ${attemptCount} attempt(s).`); this.name = "TransactionTimeoutError"; this.txHash = txHash; this.blockExplorerBaseUrl = blockExplorerBaseUrl; } } class $5c701e588de13f68$