@reservoir0x/reservoir-sdk
Version:
An SDK that can be used in any javascript/typescript context to easily interact with Reservoir liquidity APIs
1,845 lines (1,808 loc) • 168 kB
JavaScript
import {custom as $9C8uf$custom, hexToBigInt as $9C8uf$hexToBigInt, formatUnits as $9C8uf$formatUnits, createPublicClient as $9C8uf$createPublicClient, fallback as $9C8uf$fallback, http as $9C8uf$http, encodeFunctionData as $9C8uf$encodeFunctionData, zeroAddress as $9C8uf$zeroAddress} from "viem";
import * as $9C8uf$viemchains from "viem/chains";
import $9C8uf$axios from "axios";
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
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;
}
var $6496f8ee40d0c4eb$exports = {};
$parcel$export($6496f8ee40d0c4eb$exports, "ReservoirClient", () => $6496f8ee40d0c4eb$export$d0c36b5db6a81704);
$parcel$export($6496f8ee40d0c4eb$exports, "getClient", () => $6496f8ee40d0c4eb$export$6bb76d6eba7e258c);
$parcel$export($6496f8ee40d0c4eb$exports, "createClient", () => $6496f8ee40d0c4eb$export$5d730b7aed1a3eb0);
const $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$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 $7b9ac119066d97f7$export$14635688a51e4f9f = {
ancient8: $7b9ac119066d97f7$export$b0cdd37f637fe2b,
ancient8Testnet: $7b9ac119066d97f7$export$56ccc64205b7faee,
frameTestnet: $7b9ac119066d97f7$export$de21e06f3c93a4e,
blastSepolia: $7b9ac119066d97f7$export$e5a8b7c06ee30d03,
apexPop: $7b9ac119066d97f7$export$7e0f7b1042ead493,
apexPopTestnet: $7b9ac119066d97f7$export$f9c5174078e7ccb4,
blast: $7b9ac119066d97f7$export$bc31afc5674f301e,
astarZkEVM: $7b9ac119066d97f7$export$ae88ddf429832986,
garnet: $7b9ac119066d97f7$export$af6bc543c5efb4ff,
redstone: $7b9ac119066d97f7$export$644cee3bb986af5e,
degen: $7b9ac119066d97f7$export$57d0fe3a30d519de,
xai: $7b9ac119066d97f7$export$ae427ff435bf4868,
seiTestnet: $7b9ac119066d97f7$export$751db6c81f9707e,
cyber: $7b9ac119066d97f7$export$b3ff628a4eb6ce22,
bitlayer: $7b9ac119066d97f7$export$e77c90af1834006f,
sei: $7b9ac119066d97f7$export$cb4e7b8c9e2a642f,
nebula: $7b9ac119066d97f7$export$5fd5c71fbc66fa0d,
b3Testnet: $7b9ac119066d97f7$export$d6fdd9622e78341e,
flowPreviewnet: $7b9ac119066d97f7$export$615837ca9e3a75e8,
cloud: $7b9ac119066d97f7$export$310741c5b9ff060,
game7Testnet: $7b9ac119066d97f7$export$4a2fb00c9a574d11,
boss: $7b9ac119066d97f7$export$b7105ec7f3b95a70,
forma: $7b9ac119066d97f7$export$e1e1b556b4081041,
formaSketchpad: $7b9ac119066d97f7$export$855aca503db93466,
b3: $7b9ac119066d97f7$export$53c86fa97d611818,
apechain: $7b9ac119066d97f7$export$30dd3de87cee3388,
curtis: $7b9ac119066d97f7$export$1cf9f625cc5d98a2,
shape: $7b9ac119066d97f7$export$98bada23690e67eb,
shapeSepolia: $7b9ac119066d97f7$export$59bc8fcf4e4a7976,
abstractTestnet: $7b9ac119066d97f7$export$3c16616089db1866,
minato: $7b9ac119066d97f7$export$4e9201c056a6dc54,
hychain: $7b9ac119066d97f7$export$cf7da39f4e77f369,
hychainTestnet: $7b9ac119066d97f7$export$972432873143e08e,
flow: $7b9ac119066d97f7$export$ccc7b0636abaffc3,
zero: $7b9ac119066d97f7$export$7f9972325ebfd559,
zeroTestnet: $7b9ac119066d97f7$export$dfc5b2ea7c450170,
abstract: $7b9ac119066d97f7$export$817eb92a8194bab0,
animeTestnet: $7b9ac119066d97f7$export$6107704ef47e0959,
monadDevnet: $7b9ac119066d97f7$export$87285b7528427969,
game7: $7b9ac119066d97f7$export$8ffa85fec7b29c36,
creatorTestnet: $7b9ac119066d97f7$export$b87f6df61f0ffc9,
soneium: $7b9ac119066d97f7$export$199dc305aa5e13a3,
storyOdyssey: $7b9ac119066d97f7$export$3437a8c890dec894,
monadTestnet: $7b9ac119066d97f7$export$d6fda31877eccfa,
ink: $7b9ac119066d97f7$export$4d551dc4315b2348,
berachain: $7b9ac119066d97f7$export$44d5c0445a77b616,
anime: $7b9ac119066d97f7$export$8a528a920cc8c77d
};
var $e1b436840b45b1d8$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";
})($e1b436840b45b1d8$export$243e62d78d3b544d || ($e1b436840b45b1d8$export$243e62d78d3b544d = {}));
const $e1b436840b45b1d8$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 $e1b436840b45b1d8$export$243e62d78d3b544d.Info:
console.info(...data);
break;
case $e1b436840b45b1d8$export$243e62d78d3b544d.Error:
console.error(...data);
break;
case $e1b436840b45b1d8$export$243e62d78d3b544d.Warn:
console.warn(...data);
break;
default:
console.log(...data);
break;
}
}
};
function $77b7289b34af83f9$export$ae9c7a4ba934c882(wallet) {
return wallet.getChainId !== undefined;
}
const $77b7289b34af83f9$export$578785c07cb9817 = (wallet)=>{
return {
transport: (0, $9C8uf$custom)(wallet.transport),
address: async ()=>{
let address = wallet.account?.address;
if (!address) [address] = await wallet.getAddresses();
return address;
},
handleSignMessageStep: async (stepItem)=>{
const client = (0, $6496f8ee40d0c4eb$export$6bb76d6eba7e258c)();
const signData = stepItem.data?.sign;
let signature;
if (signData) {
if (signData.signatureKind === "eip191") {
client.log([
"Execute Steps: Signing with eip191"
], (0, $e1b436840b45b1d8$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, $e1b436840b45b1d8$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, $7b9ac119066d97f7$export$14635688a51e4f9f)).find((chain)=>chain.id === (chainId || 1));
if (customChain) viemChain = customChain;
else viemChain = Object.values($9C8uf$viemchains).find((chain)=>chain.id === (chainId || 1)) || $9C8uf$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, $9C8uf$hexToBigInt)(stepData.value || 0),
...stepData.maxFeePerGas && {
maxFeePerGas: (0, $9C8uf$hexToBigInt)(stepData.maxFeePerGas)
},
...stepData.maxPriorityFeePerGas && {
maxPriorityFeePerGas: (0, $9C8uf$hexToBigInt)(stepData.maxPriorityFeePerGas)
},
...stepData.gas && {
gas: (0, $9C8uf$hexToBigInt)(stepData.gas)
}
});
}
};
};
const $fdcbfa195c0a28a6$export$4432d0b5215ac33e = (0, $9C8uf$axios).create();
$fdcbfa195c0a28a6$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, $ce40c15ff138f6b7$export$3e5b797e39668f84)(message, statusCode, error.response?.data, requestUrl));
});
var $d3dd819ecb91ce83$exports = {};
$d3dd819ecb91ce83$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 $ce40c15ff138f6b7$export$b5fe3f66a567bec0(config = {}) {
const client = (0, $6496f8ee40d0c4eb$export$6bb76d6eba7e258c)();
const headers = {
"Content-Type": "application/json",
"x-rkc-version": (0, $d3dd819ecb91ce83$exports.version)
};
if (client?.apiKey) headers["x-api-key"] = client.apiKey;
return (0, $fdcbfa195c0a28a6$export$4432d0b5215ac33e).request({
headers: headers,
...config
});
}
function $ce40c15ff138f6b7$export$552b5ebb30950f43(error) {
return error && error.cause === "APIError";
}
class $ce40c15ff138f6b7$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 $8b98f6fc3beebe05$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, $fdcbfa195c0a28a6$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 $8b98f6fc3beebe05$export$f014594cc879f602(request, dataParser, maximumAttempts, attemptCount);
}
async function $8b98f6fc3beebe05$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, $fdcbfa195c0a28a6$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 $8b98f6fc3beebe05$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 $3d06f0c5a9f29ddf$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 $ef857ae7a2458456$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 $ffcb6190c7ed0430$exports = {};
$parcel$export($ffcb6190c7ed0430$exports, "TransactionTimeoutError", () => $ffcb6190c7ed0430$export$64ace85f638f5149);
$parcel$export($ffcb6190c7ed0430$exports, "CrossChainTransactionError", () => $ffcb6190c7ed0430$export$d584f051b2952941);
class $ffcb6190c7ed0430$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 = "TransactionTimeout