// Copyright (c) Mysten Labs, Inc. // SPDX-License-Identifier: Apache-2.0 import type { Coin, Pool, MarginPool, PythConfig } from '../types/index.js'; export type CoinMap = Record; export type PoolMap = Record; export type MarginPoolMap = Record; export interface DeepbookPackageIds { DEEPBOOK_PACKAGE_ID?: string; REGISTRY_ID?: string; DEEP_TREASURY_ID?: string; MARGIN_PACKAGE_ID?: string; MARGIN_V1?: string; MARGIN_REGISTRY_ID?: string; LIQUIDATION_PACKAGE_ID?: string; } export const testnetPackageIds = { // deepbook core v21, kept in step with MARGIN_PACKAGE_ID (see the mainnet ids below). DEEPBOOK_PACKAGE_ID: '0x4b1c2a827983d8fa73f6dc366cfab23636ae52e81e499d8724b71408fe6a00a4', REGISTRY_ID: '0x7c256edbda983a2cd6f946655f4bf3f00a41043993781f8674a7046e8c0e11d1', DEEP_TREASURY_ID: '0x69fffdae0075f8f71f4fa793549c11079266910e8905169845af1f5d00e09dcb', // deepbook_margin v17, linked to core v21 — the same source as mainnet margin v8 // (`MARGIN_VERSION = 8`, legacy-Pyth entrypoints retired). MARGIN_PACKAGE_ID: '0x0ad965f35189c7eca57d4718c8f5bf1b7f9f7eb4ced6d5b7aa6496a16d71e8d2', MARGIN_V1: '0xb8620c24c9ea1a4a41e79613d2b3d1d93648d1bb6f6b789a7c8f261c94110e4b', MARGIN_REGISTRY_ID: '0x48d7640dfae2c6e9ceeada197a7a1643984b5a24c55a0c6c023dac77e0339f75', // margin_liquidation v5, linked to core v21 and margin v17 — the same source as mainnet v6 // (legacy-Pyth liquidate_base / liquidate_quote retired; the builders call the _upgraded pair). LIQUIDATION_PACKAGE_ID: '0x4f4916fc38892fe335a8aab45e3f42700060eb2d20f854607489ad88a88393a9', } satisfies DeepbookPackageIds; export const mainnetPackageIds = { // deepbook core v9. Keep it in step with MARGIN_PACKAGE_ID: margin v8 links core v9, and a // transaction that calls core v8 directly next to margin v8 fails with `InvalidLinkage`. DEEPBOOK_PACKAGE_ID: '0xbca0cefe720330e7bb4f2283438b68de6a0e656688db4ac90d61e71fe6151fe8', REGISTRY_ID: '0xaf16199a2dff736e9f07a845f23c5da6df6f756eddb631aed9d24a93efc4549d', DEEP_TREASURY_ID: '0x032abf8948dda67a271bcc18e776dbbcfb0d58c8d288a700ff0d5521e57a1ffe', // deepbook_margin v8, linked to core v9. Its gate constant is `MARGIN_VERSION = 8`, which the // upgrade transaction enabled on the mainnet MarginRegistry. v8 retires the legacy-Pyth // entrypoints in the base modules (they abort `EDeprecatedUseUpgradedPyth`); every // oracle-taking builder here already targets the `_upgraded` modules. MARGIN_PACKAGE_ID: '0x40fa183b5602cd0f6c4d7b16c08766ad8d7d581608fbe3b2570fe72ab4f5625f', MARGIN_V1: '0x97d9473771b01f77b0940c589484184b49f6444627ec121314fae6a6d36fb86b', MARGIN_REGISTRY_ID: '0x0e40998b359a9ccbab22a98ed21bd4346abf19158bc7980c8291908086b3a742', // margin_liquidation v6, linked to core v9 and margin v8. Older versions link margin v7, so // their liquidations abort once margin version 7 is disabled on the MarginRegistry. v6 // retires the legacy-Pyth liquidate_base / liquidate_quote; the builders here call the // _upgraded pair. LIQUIDATION_PACKAGE_ID: '0xd61f264aaf707285a712347fccfb8e905e99d7dc72a6bd1053829ddebf420c2b', } satisfies DeepbookPackageIds; /** * Feed ids and price objects on Pyth's upgraded Core, the only deployment this SDK targets. * * The testnet `MarginRegistry` was migrated (2026-08-11) off Pyth's beta feed ids and onto * the ids upgraded testnet Core carries, which are the mainnet-style ids — the beta ids * have no upgraded price objects and the upgraded Hermes does not serve them. * * DBTC is testnet's wrapped BTC and takes Crypto.XBTC/USD — the same feed mainnet XBTC * uses. The upgraded deployment carries no distinct DBTC feed. Plain Crypto.BTC/USD is * NOT an accepted substitute for either: XBTC is a distinct asset with its own peg and * redemption risk, so pricing it off BTC would misstate collateral in exactly the stress * where the two diverge. */ export const testnetCoins: CoinMap = { DEEP: { address: `0x36dbef866a1d62bf7328989a10fb2f07d769f4ee587c0de4a0a256e57e0a58a8`, type: `0x36dbef866a1d62bf7328989a10fb2f07d769f4ee587c0de4a0a256e57e0a58a8::deep::DEEP`, scalar: 1000000, feed: '0x29bdd5248234e33bd93d3b81100b5fa32eaa5997843847e2c2cb16d7c6d9f7ff', currencyId: '0xbf1b77e244f649c736a44898585cc8ac939fbb0bbdf1d8d2a183978cc312e613', priceInfoObjectId: '0x27882b43c2cc62bbd8fb5f4ebc20be004b14454b2c98755033f5446d35474339', }, SUI: { address: `0x0000000000000000000000000000000000000000000000000000000000000002`, type: `0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI`, scalar: 1000000000, feed: '0x23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744', currencyId: '0xf256d3fb6a50eaa748d94335b34f2982fbc3b63ceec78cafaa29ebc9ebaf2bbc', priceInfoObjectId: '0x867877562b5d8ac262d93b02062e04b428a2f9bfbb2f05b8af52e04cd98bd241', }, DBUSDC: { address: `0xf7152c05930480cd740d7311b5b8b45c6f488e3a53a11c3f74a6fac36a52e0d7`, type: `0xf7152c05930480cd740d7311b5b8b45c6f488e3a53a11c3f74a6fac36a52e0d7::DBUSDC::DBUSDC`, scalar: 1000000, feed: '0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a', currencyId: '0x509db0f9283c9ee4fdc5b99028a439d3639f49e9709e3d7a6de14b3bfdb0c784', priceInfoObjectId: '0x17de8d80e8efedfd1053c46fb921e51824479ed32c6aded5f7279995bb84db05', }, DBTC: { address: `0x6502dae813dbe5e42643c119a6450a518481f03063febc7e20238e43b6ea9e86`, type: `0x6502dae813dbe5e42643c119a6450a518481f03063febc7e20238e43b6ea9e86::dbtc::DBTC`, scalar: 100000000, // Crypto.XBTC/USD — DBTC is testnet's wrapped BTC, so it takes the same feed mainnet // XBTC does. Never plain BTC/USD: that is a different asset, and standing it in // would misprice DBTC collateral whenever XBTC's peg moves. Object created on // upgraded testnet Core 2026-08-11. feed: '0xae8f269ed9c4bed616c99a98cf6dfe562bd3202e7f91821a471ff854713851b4', currencyId: '0x3ef2afa2126704bf721b9c8495d94288f6bd090fc454fe3e1613eb765a8a348f', priceInfoObjectId: '0x88387b85b9a53c4365219aee4d77e62213877f110eb859d8e03812a5bea0d1f7', }, DBUSDT: { address: `0xf7152c05930480cd740d7311b5b8b45c6f488e3a53a11c3f74a6fac36a52e0d7`, type: `0xf7152c05930480cd740d7311b5b8b45c6f488e3a53a11c3f74a6fac36a52e0d7::DBUSDT::DBUSDT`, scalar: 1000000, }, WAL: { address: `0x9ef7676a9f81937a52ae4b2af8d511a28a0b080477c0c2db40b0ab8882240d76`, type: `0x9ef7676a9f81937a52ae4b2af8d511a28a0b080477c0c2db40b0ab8882240d76::wal::WAL`, scalar: 1000000000, }, }; export const mainnetCoins: CoinMap = { DEEP: { address: `0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270`, type: `0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP`, scalar: 1000000, feed: '0x29bdd5248234e33bd93d3b81100b5fa32eaa5997843847e2c2cb16d7c6d9f7ff', currencyId: '0x3f2afb7c5f245870a8b8a3808e6dd7042446a0e7504e9d2795372da053858cd9', priceInfoObjectId: '0x562957f70afaf8a0870e2959abc3e3f327a8159f803d8c56cff27ac2df260477', }, SUI: { address: `0x0000000000000000000000000000000000000000000000000000000000000002`, type: `0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI`, scalar: 1000000000, feed: '0x23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744', currencyId: '0xf256d3fb6a50eaa748d94335b34f2982fbc3b63ceec78cafaa29ebc9ebaf2bbc', priceInfoObjectId: '0x89b2add829cb6fcd017153fff428bc9faec4d06d643ecfc435af5b55a9e987f0', }, USDC: { address: `0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7`, type: `0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC`, scalar: 1000000, feed: '0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a', currencyId: '0x75cfbbf8c962d542e99a1d15731e6069f60a00db895407785b15d14f606f2b4a', priceInfoObjectId: '0x6ddfc6f9921e55998cbc2e68f78eba897981d79ac17f66c5277bc38954a2a3f8', }, WAL: { address: `0x356a26eb9e012a68958082340d4c4116e7f55615cf27affcff209cf0ae544f59`, type: `0x356a26eb9e012a68958082340d4c4116e7f55615cf27affcff209cf0ae544f59::wal::WAL`, scalar: 1000000000, feed: '0xeba0732395fae9dec4bae12e52760b35fc1c5671e2da8b449c9af4efe5d54341', currencyId: '0xb6a0c0bacb1c87c3be4dff20c22ef1012125b5724b5b0ff424f852a2651b23fa', priceInfoObjectId: '0xdbea8600eeeb0399df58c28e73b8201ae880a954813131d33bfa6902ccdadd24', }, SUIUSDE: { address: `0x41d587e5336f1c86cad50d38a7136db99333bb9bda91cea4ba69115defeb1402`, type: `0x41d587e5336f1c86cad50d38a7136db99333bb9bda91cea4ba69115defeb1402::sui_usde::SUI_USDE`, scalar: 1000000, feed: '0x8cead549d0e770dea8fdf5e018a85d59585265cf8bff16ba83962fc7996dbb7f', currencyId: '0x44f0959110bd9e5e91af0483364c42075ac19f173b28f708989f419ef3560576', priceInfoObjectId: '0xa8023b552578bd5036be60d3132306882469d1871cb4bec3099c47dece08c4cd', }, XBTC: { address: `0x876a4b7bce8aeaef60464c11f4026903e9afacab79b9b142686158aa86560b50`, type: `0x876a4b7bce8aeaef60464c11f4026903e9afacab79b9b142686158aa86560b50::xbtc::XBTC`, scalar: 100000000, // Crypto.XBTC/USD, always. XBTC must never be priced off Crypto.BTC/USD // (`0xe62df6c8…`): it is a distinct asset carrying its own peg and redemption risk, // so a BTC substitute misstates collateral precisely when the two diverge. This // holds regardless of XBTC's wider confidence band — that is a bound to set on the // registry's `max_conf_bps`, not a reason to price a different asset. feed: '0xae8f269ed9c4bed616c99a98cf6dfe562bd3202e7f91821a471ff854713851b4', currencyId: '0x907bb173bffab7c57bbd3350a633aa32c8770937b496d7d88874087b59200bcc', // Created 2026-08-17 (tx `3SbNisBM…ePnSx`) — XBTC is absent from Pyth's Sui push-feed // list, so they never maintained an object for it here; ours is kept fresh by our own // price pusher, as on legacy Core. Creation is permissionless, so no admin action was // involved. Verified: registered in the upgraded price table and updatable. priceInfoObjectId: '0x4f7ff4518b4cf33b162d76e70632d8f0a6e04441a058a138959d7a2384cffe60', }, USDSUI: { address: `0x44f838219cf67b058f3b37907b655f226153c18e33dfcd0da559a844fea9b1c1`, type: `0x44f838219cf67b058f3b37907b655f226153c18e33dfcd0da559a844fea9b1c1::usdsui::USDSUI`, scalar: 1000000, // Valid Pyth data, but margin cannot price USDSUI: the mainnet MarginRegistry's // PythConfig configures six currencies and USDSUI is not among them (read on chain // 2026-08-11), so an oracle-taking call aborts in the registry's currency lookup // before the feed id is ever compared. Lending is unaffected — margin_pool supply // and withdraw take no oracle — and no USDSUI DeepBook pool is margin-registered. feed: '0xd510fcdb3a63f35d3bb118d5db3afc5815a3f13bc55d48abb893b63f0315902a', currencyId: '0x535e826a2acddab687c81cb6c6166553b479f61a9023800ec0020baba8d94731', priceInfoObjectId: '0x6896ccc8c08a84e47f0ab8affbd3fce2623a72c76f9092e59f8f6ece450119cd', }, WUSDC: { address: `0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf`, type: `0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN`, scalar: 1000000, }, WETH: { address: `0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5`, type: `0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5::coin::COIN`, scalar: 100000000, }, BETH: { address: `0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29`, type: `0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH`, scalar: 100000000, }, WBTC: { address: `0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881`, type: `0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881::coin::COIN`, scalar: 100000000, }, WUSDT: { address: `0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c`, type: `0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN`, scalar: 1000000, }, NS: { address: `0x5145494a5f5100e645e4b0aa950fa6b68f614e8c59e17bc5ded3495123a79178`, type: `0x5145494a5f5100e645e4b0aa950fa6b68f614e8c59e17bc5ded3495123a79178::ns::NS`, scalar: 1000000, }, TYPUS: { address: `0xf82dc05634970553615eef6112a1ac4fb7bf10272bf6cbe0f80ef44a6c489385`, type: `0xf82dc05634970553615eef6112a1ac4fb7bf10272bf6cbe0f80ef44a6c489385::typus::TYPUS`, scalar: 1000000000, }, AUSD: { address: `0x2053d08c1e2bd02791056171aab0fd12bd7cd7efad2ab8f6b9c8902f14df2ff2`, type: `0x2053d08c1e2bd02791056171aab0fd12bd7cd7efad2ab8f6b9c8902f14df2ff2::ausd::AUSD`, scalar: 1000000, }, DRF: { address: `0x294de7579d55c110a00a7c4946e09a1b5cbeca2592fbb83fd7bfacba3cfeaf0e`, type: `0x294de7579d55c110a00a7c4946e09a1b5cbeca2592fbb83fd7bfacba3cfeaf0e::drf::DRF`, scalar: 1000000, }, SEND: { address: `0xb45fcfcc2cc07ce0702cc2d229621e046c906ef14d9b25e8e4d25f6e8763fef7`, type: `0xb45fcfcc2cc07ce0702cc2d229621e046c906ef14d9b25e8e4d25f6e8763fef7::send::SEND`, scalar: 1000000, }, IKA: { address: `0x7262fb2f7a3a14c888c438a3cd9b912469a58cf60f367352c46584262e8299aa`, type: `0x7262fb2f7a3a14c888c438a3cd9b912469a58cf60f367352c46584262e8299aa::ika::IKA`, scalar: 1000000000, }, ALKIMI: { address: `0x1a8f4bc33f8ef7fbc851f156857aa65d397a6a6fd27a7ac2ca717b51f2fd9489`, type: `0x1a8f4bc33f8ef7fbc851f156857aa65d397a6a6fd27a7ac2ca717b51f2fd9489::alkimi::ALKIMI`, scalar: 1000000000, }, LZWBTC: { address: `0x0041f9f9344cac094454cd574e333c4fdb132d7bcc9379bcd4aab485b2a63942`, type: `0x0041f9f9344cac094454cd574e333c4fdb132d7bcc9379bcd4aab485b2a63942::wbtc::WBTC`, scalar: 100000000, }, USDT: { address: `0x375f70cf2ae4c00bf37117d0c85a2c71545e6ee05c4a5c7d282cd66a4504b068`, type: `0x375f70cf2ae4c00bf37117d0c85a2c71545e6ee05c4a5c7d282cd66a4504b068::usdt::USDT`, scalar: 1000000, }, // Hashi BTC (on-chain symbol hBTC). HBTC: { address: `0xd30fb3f8914efdbeb7b8e85fae1d65dc584b44a1281f66737b92bb9f03a59d06`, type: `0xd30fb3f8914efdbeb7b8e85fae1d65dc584b44a1281f66737b92bb9f03a59d06::btc::BTC`, scalar: 100000000, }, }; export const testnetPools: PoolMap = { DEEP_SUI: { address: `0x48c95963e9eac37a316b7ae04a0deb761bcdcc2b67912374d6036e7f0e9bae9f`, baseCoin: 'DEEP', quoteCoin: 'SUI', }, SUI_DBUSDC: { address: `0x1c19362ca52b8ffd7a33cee805a67d40f31e6ba303753fd3a4cfdfacea7163a5`, baseCoin: 'SUI', quoteCoin: 'DBUSDC', }, DEEP_DBUSDC: { address: `0xe86b991f8632217505fd859445f9803967ac84a9d4a1219065bf191fcb74b622`, baseCoin: 'DEEP', quoteCoin: 'DBUSDC', }, DBUSDT_DBUSDC: { address: `0x83970bb02e3636efdff8c141ab06af5e3c9a22e2f74d7f02a9c3430d0d10c1ca`, baseCoin: 'DBUSDT', quoteCoin: 'DBUSDC', }, WAL_DBUSDC: { address: `0xeb524b6aea0ec4b494878582e0b78924208339d360b62aec4a8ecd4031520dbb`, baseCoin: 'WAL', quoteCoin: 'DBUSDC', }, WAL_SUI: { address: `0x8c1c1b186c4fddab1ebd53e0895a36c1d1b3b9a77cd34e607bef49a38af0150a`, baseCoin: 'WAL', quoteCoin: 'SUI', }, DBTC_DBUSDC: { address: `0x0dce0aa771074eb83d1f4a29d48be8248d4d2190976a5241f66b43ec18fa34de`, baseCoin: 'DBTC', quoteCoin: 'DBUSDC', }, }; export const mainnetPools: PoolMap = { DEEP_SUI: { address: `0xb663828d6217467c8a1838a03793da896cbe745b150ebd57d82f814ca579fc22`, baseCoin: 'DEEP', quoteCoin: 'SUI', }, SUI_USDC: { address: `0xe05dafb5133bcffb8d59f4e12465dc0e9faeaa05e3e342a08fe135800e3e4407`, baseCoin: 'SUI', quoteCoin: 'USDC', }, DEEP_USDC: { address: `0xf948981b806057580f91622417534f491da5f61aeaf33d0ed8e69fd5691c95ce`, baseCoin: 'DEEP', quoteCoin: 'USDC', }, WUSDT_USDC: { address: `0x4e2ca3988246e1d50b9bf209abb9c1cbfec65bd95afdacc620a36c67bdb8452f`, baseCoin: 'WUSDT', quoteCoin: 'USDC', }, WUSDC_USDC: { address: `0xa0b9ebefb38c963fd115f52d71fa64501b79d1adcb5270563f92ce0442376545`, baseCoin: 'WUSDC', quoteCoin: 'USDC', }, BETH_USDC: { address: `0x1109352b9112717bd2a7c3eb9a416fff1ba6951760f5bdd5424cf5e4e5b3e65c`, baseCoin: 'BETH', quoteCoin: 'USDC', }, NS_USDC: { address: `0x0c0fdd4008740d81a8a7d4281322aee71a1b62c449eb5b142656753d89ebc060`, baseCoin: 'NS', quoteCoin: 'USDC', }, NS_SUI: { address: `0x27c4fdb3b846aa3ae4a65ef5127a309aa3c1f466671471a806d8912a18b253e8`, baseCoin: 'NS', quoteCoin: 'SUI', }, TYPUS_SUI: { address: `0xe8e56f377ab5a261449b92ac42c8ddaacd5671e9fec2179d7933dd1a91200eec`, baseCoin: 'TYPUS', quoteCoin: 'SUI', }, SUI_AUSD: { address: `0x183df694ebc852a5f90a959f0f563b82ac9691e42357e9a9fe961d71a1b809c8`, baseCoin: 'SUI', quoteCoin: 'AUSD', }, AUSD_USDC: { address: `0x5661fc7f88fbeb8cb881150a810758cf13700bb4e1f31274a244581b37c303c3`, baseCoin: 'AUSD', quoteCoin: 'USDC', }, DRF_SUI: { address: `0x126865a0197d6ab44bfd15fd052da6db92fd2eb831ff9663451bbfa1219e2af2`, baseCoin: 'DRF', quoteCoin: 'SUI', }, SEND_USDC: { address: `0x1fe7b99c28ded39774f37327b509d58e2be7fff94899c06d22b407496a6fa990`, baseCoin: 'SEND', quoteCoin: 'USDC', }, WAL_USDC: { address: `0x56a1c985c1f1123181d6b881714793689321ba24301b3585eec427436eb1c76d`, baseCoin: 'WAL', quoteCoin: 'USDC', }, WAL_SUI: { address: `0x81f5339934c83ea19dd6bcc75c52e83509629a5f71d3257428c2ce47cc94d08b`, baseCoin: 'WAL', quoteCoin: 'SUI', }, XBTC_USDC: { address: `0x20b9a3ec7a02d4f344aa1ebc5774b7b0ccafa9a5d76230662fdc0300bb215307`, baseCoin: 'XBTC', quoteCoin: 'USDC', }, IKA_USDC: { address: `0xfa732993af2b60d04d7049511f801e79426b2b6a5103e22769c0cead982b0f47`, baseCoin: 'IKA', quoteCoin: 'USDC', }, ALKIMI_SUI: { address: `0x84752993c6dc6fce70e25ddeb4daddb6592d6b9b0912a0a91c07cfff5a721d89`, baseCoin: 'ALKIMI', quoteCoin: 'SUI', }, LZWBTC_USDC: { address: `0xf5142aafa24866107df628bf92d0358c7da6acc46c2f10951690fd2b8570f117`, baseCoin: 'LZWBTC', quoteCoin: 'USDC', }, USDT_USDC: { address: '0xfc28a2fb22579c16d672a1152039cbf671e5f4b9f103feddff4ea06ef3c2bc25', baseCoin: 'USDT', quoteCoin: 'USDC', }, SUIUSDE_USDC: { address: '0x0fac1cebf35bde899cd9ecdd4371e0e33f44ba83b8a2902d69186646afa3a94b', baseCoin: 'SUIUSDE', quoteCoin: 'USDC', }, SUI_SUIUSDE: { address: '0x034f3a42e7348de2084406db7a725f9d9d132a56c68324713e6e623601fb4fd7', baseCoin: 'SUI', quoteCoin: 'SUIUSDE', }, SUI_USDSUI: { address: '0x826eeacb2799726334aa580396338891205a41cf9344655e526aae6ddd5dc03f', baseCoin: 'SUI', quoteCoin: 'USDSUI', }, USDSUI_USDC: { address: '0xa374264d43e6baa5aa8b35ff18ff24fdba7443b4bcb884cb4c2f568d32cdac36', baseCoin: 'USDSUI', quoteCoin: 'USDC', }, HBTC_USDC: { address: '0x61368ab907934d7840d2e639b7fc2ee74785ffe3d46427d70e1ab8545f320c9b', baseCoin: 'HBTC', quoteCoin: 'USDC', }, }; export const testnetMarginPools = { SUI: { address: '0xcdbbe6a72e639b647296788e2e4b1cac5cea4246028ba388ba1332ff9a382eea', type: '0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI', }, DBUSDC: { address: '0xf08568da93834e1ee04f09902ac7b1e78d3fdf113ab4d2106c7265e95318b14d', type: '0xf7152c05930480cd740d7311b5b8b45c6f488e3a53a11c3f74a6fac36a52e0d7::DBUSDC::DBUSDC', }, DEEP: { address: '0x610640613f21d9e688d6f8103d17df22315c32e0c80590ce64951a1991378b55', type: '0x36dbef866a1d62bf7328989a10fb2f07d769f4ee587c0de4a0a256e57e0a58a8::deep::DEEP', }, DBTC: { address: '0xf3440b4aafcc8b12fc4b242e9590c52873b8238a0d0e52fbf9dae61d2970796a', type: '0x6502dae813dbe5e42643c119a6450a518481f03063febc7e20238e43b6ea9e86::dbtc::DBTC', }, }; export const mainnetMarginPools = { SUI: { address: '0x53041c6f86c4782aabbfc1d4fe234a6d37160310c7ee740c915f0a01b7127344', type: '0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI', }, USDC: { address: '0xba473d9ae278f10af75c50a8fa341e9c6a1c087dc91a3f23e8048baf67d0754f', type: '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC', }, DEEP: { address: '0x1d723c5cd113296868b55208f2ab5a905184950dd59c48eb7345607d6b5e6af7', type: '0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP', }, WAL: { address: '0x38decd3dbb62bd4723144349bf57bc403b393aee86a51596846a824a1e0c2c01', type: '0x356a26eb9e012a68958082340d4c4116e7f55615cf27affcff209cf0ae544f59::wal::WAL', }, SUIUSDE: { address: '0xbb990ca04a7743e6c0a25a7fb16f60fc6f6d8bf213624ff03a63f1bb04c3a12f', type: '0x41d587e5336f1c86cad50d38a7136db99333bb9bda91cea4ba69115defeb1402::sui_usde::SUI_USDE', }, XBTC: { address: '0x14dfbf54400e0b97e892349310d392bef6d187c2b6709d9b246b8f41c9a13de4', type: '0x876a4b7bce8aeaef60464c11f4026903e9afacab79b9b142686158aa86560b50::xbtc::XBTC', }, USDSUI: { address: '0x78a0ddd02745d9b500fb7e9aae2ff8b665d974f00fd1f6060d59f4a8e891402c', type: '0x44f838219cf67b058f3b37907b655f226153c18e33dfcd0da559a844fea9b1c1::usdsui::USDSUI', }, }; export const testnetPythConfigs = { pythStateId: '0x3c48fe392912de6c18087a2b3f5fdbfbfdb4598e180947feff1f12f8e9ea073e', wormholeStateId: '0x750da8e6d16b6a363a39fe2eaa8295ac224a1e6fce4e47b58845e2e8746164f0', } satisfies PythConfig; export const mainnetPythConfigs = { pythStateId: '0x03719fae774ddab3cfcaa53bbc046f0cbe21410019b6280811bf3f9f4b05839d', wormholeStateId: '0xdbca52b9fb4f712e25f61f974586d93ac541bcf8389564f0323bb07215168b5c', } satisfies PythConfig; /** * Hermes serving Pyth's upgraded Core. Requires an `Authorization: Bearer ` header * and answers 401 without one. Note that from the Core cutover this also becomes true of * legacy Hermes, so an unauthenticated price push has no long-term path. */ export const PYTH_UPGRADED_HERMES = 'https://pyth.dourolabs.app/hermes'; /** * DeepBook-operated Hermes proxy: forwards to {@link PYTH_UPGRADED_HERMES} supplying * credentials server-side, so consumers without their own Pyth plan can still push price * updates. Used only when no `accessToken` is configured — bring your own token and the * SDK talks to Pyth directly, with no DeepBook infrastructure in the path. * * `undefined` until the proxy is deployed. It must stay `undefined` rather than a * placeholder URL: it is the default endpoint whenever a consumer supplies no credentials, * so a non-resolving value here surfaces as an opaque `Invalid URL`/DNS error from inside * axios instead of a configuration error naming the field to set. */ export const DEEPBOOK_HERMES_PROXY: string | undefined = undefined;