@gfxlabs/oku-chains 1.12.24 → 1.12.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/browser.js +457 -0
  2. package/dist/index-mjs.js +453 -1
  3. package/dist/index.js +457 -0
  4. package/dist/types/definitions/arbitrum.d.ts +14 -0
  5. package/dist/types/definitions/avalanche.d.ts +10 -0
  6. package/dist/types/definitions/base.d.ts +14 -0
  7. package/dist/types/definitions/bob.d.ts +4 -0
  8. package/dist/types/definitions/boba.d.ts +4 -0
  9. package/dist/types/definitions/bsc.d.ts +13 -0
  10. package/dist/types/definitions/etherlink.d.ts +5 -0
  11. package/dist/types/definitions/filecoin.d.ts +3 -0
  12. package/dist/types/definitions/gensyn.d.ts +4 -0
  13. package/dist/types/definitions/gnosis.d.ts +7 -0
  14. package/dist/types/definitions/goat.d.ts +4 -0
  15. package/dist/types/definitions/hemi.d.ts +4 -0
  16. package/dist/types/definitions/hyperevem.d.ts +8 -0
  17. package/dist/types/definitions/linea.d.ts +11 -0
  18. package/dist/types/definitions/mainnet.d.ts +13 -0
  19. package/dist/types/definitions/mantle.d.ts +8 -0
  20. package/dist/types/definitions/monad.d.ts +11 -0
  21. package/dist/types/definitions/nibiru.d.ts +3 -0
  22. package/dist/types/definitions/optimism.d.ts +12 -0
  23. package/dist/types/definitions/plasma.d.ts +10 -0
  24. package/dist/types/definitions/polygon.d.ts +12 -0
  25. package/dist/types/definitions/redbelly.d.ts +3 -0
  26. package/dist/types/definitions/robinhood.d.ts +8 -0
  27. package/dist/types/definitions/rootstock.d.ts +5 -0
  28. package/dist/types/definitions/saga.d.ts +3 -0
  29. package/dist/types/definitions/sei.d.ts +6 -0
  30. package/dist/types/definitions/unichain.d.ts +11 -0
  31. package/dist/types/definitions/worldchain.d.ts +6 -0
  32. package/dist/types/definitions/xdc.d.ts +4 -0
  33. package/dist/types/definitions/zerog.d.ts +4 -0
  34. package/dist/types/index.d.ts +273 -11
  35. package/dist/types/spec/index.d.ts +16 -0
  36. package/dist/types/util/routers.d.ts +14 -0
  37. package/package.json +1 -1
@@ -4,8 +4,11 @@ export * from "./spec/index";
4
4
  export * from "./util/caip2";
5
5
  export { makeConfig } from "./util/index";
6
6
  export { buildNetworkIndex, type NetworkIndex, NetworkNotFoundError, } from "./util/lookup";
7
+ export type { MarketRouterChainInput, MarketRouterEntry, MarketRouterName, } from "./util/routers";
8
+ import type { Address } from "viem";
7
9
  import type { IChainInfo } from "./spec";
8
10
  import { ChainType } from "./spec";
11
+ import { type MarketRouterChainInput, type MarketRouterEntry, type MarketRouterName } from "./util/routers";
9
12
  export declare const MAINNET_CHAINS: readonly [Readonly<{
10
13
  name: "Arbitrum";
11
14
  liteChain: true;
@@ -42,6 +45,20 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
42
45
  cowswap: string;
43
46
  icecreamswap: true;
44
47
  };
48
+ marketRouters: {
49
+ binance: "0xB44446b0c8E56988c34f7Ff73Ae904982b5FdDA5"[];
50
+ enso: "0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf"[];
51
+ fabric: "0x3A7f029E3ad003AB5Aa78ccf101b1B543eaed6F9"[];
52
+ icecreamswap: "0x57f96440f1b1cAD53B40A8924BD540b1279A491c"[];
53
+ kyberswap: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"[];
54
+ native: "0x0FC85a171bD0b53BF0bBace74F04B66170Ae3eAb"[];
55
+ odos: "0xa669e7A0d4b3e4Fa48af2dE86BD4CD7126Be4e13"[];
56
+ okx: "0x7CF6b330b437E9fb432B1400DE17B03357Cf049A"[];
57
+ openocean: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64"[];
58
+ paraswap: "0x6A000F20005980200259B80c5102003040001068"[];
59
+ uniswap: ("0x5E325eDA8064b456f4781070C0738d849c824258" | "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45" | "0x8B844f885672f333Bc0042cB669255f93a4C1E6b")[];
60
+ zeroex: ("0x0000000000001fF3684f28c67538d4D072C22734" | "0xfeEA2A79D7d3d36753C8917AF744D71f13C9b02a")[];
61
+ };
45
62
  bridges: {
46
63
  chainlink: {
47
64
  atlasNetworkName: string;
@@ -264,6 +281,20 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
264
281
  icecreamswap: true;
265
282
  cowswap: string;
266
283
  };
284
+ marketRouters: {
285
+ binance: "0xB44446b0c8E56988c34f7Ff73Ae904982b5FdDA5"[];
286
+ enso: "0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf"[];
287
+ fabric: "0x7C137a37742437d2212B7bd873ed135b5C4c61da"[];
288
+ icecreamswap: "0xC87De04e2EC1F4282dFF2933A2D58199f688fC3d"[];
289
+ kyberswap: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"[];
290
+ native: "0xaEC634d949df14Be76dC317504C7b9a6a8A5f576"[];
291
+ odos: "0x19cEeAd7105607Cd444F5ad10dd51356436095a1"[];
292
+ okx: "0xC8F6b8Ba0DC0f175B568B99440B0867F69A29265"[];
293
+ openocean: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64"[];
294
+ paraswap: "0x6A000F20005980200259B80c5102003040001068"[];
295
+ uniswap: ("0x2626664c2603336E57B271c5C0b26F421741e481" | "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD" | "0xFdf682F51FE81Aa4898F0AE2163d8A55c127fbC7")[];
296
+ zeroex: ("0x0000000000001fF3684f28c67538d4D072C22734" | "0x7747F8D2a76BD6345Cc29622a946A929647F2359")[];
297
+ };
267
298
  bridges: {
268
299
  chainlink: {
269
300
  atlasNetworkName: string;
@@ -730,6 +761,10 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
730
761
  markets: {
731
762
  icecreamswap: true;
732
763
  };
764
+ marketRouters: {
765
+ icecreamswap: "0xC87De04e2EC1F4282dFF2933A2D58199f688fC3d"[];
766
+ uniswap: ("0x4BA622997559F9b5Ac68751D7Fc3dEecc23a0e88" | "0x759E8B0cb9d65291e258aE3e043258ae1dD0df16")[];
767
+ };
733
768
  bridges: {};
734
769
  oracles: {
735
770
  coingecko: {
@@ -1320,6 +1355,19 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
1320
1355
  icecreamswap: true;
1321
1356
  cowswap: string;
1322
1357
  };
1358
+ marketRouters: {
1359
+ binance: "0xB44446b0c8E56988c34f7Ff73Ae904982b5FdDA5"[];
1360
+ enso: "0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf"[];
1361
+ icecreamswap: "0x1a3304cBef66de00FbE1548CC4C6585aD22FbCFf"[];
1362
+ kyberswap: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"[];
1363
+ native: "0xF064b069Ed18Eb5c61159247C55C5af79B28a968"[];
1364
+ odos: "0x89b8AA89FDd0507a99d334CBe3C808fAFC7d850E"[];
1365
+ okx: "0x62cceF0b4545166f721cAa9fEe13c1d3767E27dc"[];
1366
+ openocean: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64"[];
1367
+ paraswap: "0x6A000F20005980200259B80c5102003040001068"[];
1368
+ uniswap: ("0x8B844f885672f333Bc0042cB669255f93a4C1E6b" | "0x4Dae2f939ACf50408e13d58534Ff8c2776d45265" | "0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2")[];
1369
+ zeroex: ("0x0000000000001fF3684f28c67538d4D072C22734" | "0xc2eff1F1cE35d395408A34Ad881dBCD978F40b89")[];
1370
+ };
1323
1371
  bridges: {
1324
1372
  chainlink: {
1325
1373
  atlasNetworkName: string;
@@ -1514,6 +1562,9 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
1514
1562
  coingecko: string;
1515
1563
  };
1516
1564
  markets: {};
1565
+ marketRouters: {
1566
+ uniswap: ("0x83702C6356A1028A900F83d446D189a31646a16b" | "0xcAb04058e60020d65D18D4B3DFF2cA1445D7099f")[];
1567
+ };
1517
1568
  bridges: {};
1518
1569
  oracles: {
1519
1570
  coingecko: {
@@ -1678,6 +1729,19 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
1678
1729
  zeroex: true;
1679
1730
  cowswap: string;
1680
1731
  };
1732
+ marketRouters: {
1733
+ binance: "0xB44446b0c8E56988c34f7Ff73Ae904982b5FdDA5"[];
1734
+ enso: "0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf"[];
1735
+ icecreamswap: "0xa929c559E5e6537359680F39CB4E3708E1a14dd1"[];
1736
+ kyberswap: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"[];
1737
+ native: "0x8a2ddc0461Fcf96F81a05529Bed540d4f1eb2a00"[];
1738
+ odos: "0x0D05a7D3448512B78fa8A9e46c4872C88C4a0D05"[];
1739
+ okx: "0x28b1Dc1a5E3699A428BC51d234DFab7C9CB2a183"[];
1740
+ openocean: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64"[];
1741
+ paraswap: "0x6A000F20005980200259B80c5102003040001068"[];
1742
+ uniswap: ("0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45" | "0x66a9893cC07D91D95644AEDD05D03f95e1dBA8Af" | "0xCb640A86855f1A828c27241bA364348de28abe66")[];
1743
+ zeroex: ("0x0000000000001fF3684f28c67538d4D072C22734" | "0x7f54F05635d15Cde17A49502fEdB9D1803A3Be8A")[];
1744
+ };
1681
1745
  bridges: {
1682
1746
  chainlink: {
1683
1747
  atlasNetworkName: string;
@@ -2059,6 +2123,18 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
2059
2123
  zeroex: true;
2060
2124
  icecreamswap: true;
2061
2125
  };
2126
+ marketRouters: {
2127
+ binance: "0xB44446b0c8E56988c34f7Ff73Ae904982b5FdDA5"[];
2128
+ enso: "0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf"[];
2129
+ icecreamswap: "0xa575f37e869e6887564F87c07e2885e08D542C4a"[];
2130
+ kyberswap: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"[];
2131
+ odos: "0xCa423977156BB05b13A2BA3b76Bc5419E2fE9680"[];
2132
+ okx: "0xDd5E9B947c99Aa60bab00ca4631Dce63b49983E7"[];
2133
+ openocean: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64"[];
2134
+ paraswap: "0x6A000F20005980200259B80c5102003040001068"[];
2135
+ uniswap: ("0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45" | "0x8B844f885672f333Bc0042cB669255f93a4C1E6b" | "0xCb1355ff08Ab38bBCE60111F1bb2B784bE25D7e8")[];
2136
+ zeroex: ("0x0000000000001fF3684f28c67538d4D072C22734" | "0x8CF38ec1BB723e6B948442Dc604b35a54D3Dc893")[];
2137
+ };
2062
2138
  bridges: {
2063
2139
  chainlink: {
2064
2140
  atlasNetworkName: string;
@@ -2556,6 +2632,18 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
2556
2632
  icecreamswap: true;
2557
2633
  cowswap: string;
2558
2634
  };
2635
+ marketRouters: {
2636
+ binance: "0xB44446b0c8E56988c34f7Ff73Ae904982b5FdDA5"[];
2637
+ enso: "0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf"[];
2638
+ icecreamswap: "0x99bA7d569EA69671B399A7cC488b687515F7EC23"[];
2639
+ kyberswap: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"[];
2640
+ odos: "0x4E3288c9ca110bCC82bf38F09A7b425c095d92Bf"[];
2641
+ okx: "0xF6E1B4b201e220FC3741bd7a75675ffEA25c02AD"[];
2642
+ openocean: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64"[];
2643
+ paraswap: "0x6A000F20005980200259B80c5102003040001068"[];
2644
+ uniswap: ("0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45" | "0x8B844f885672f333Bc0042cB669255f93a4C1E6b" | "0xec7BE89e9d109e7e3Fec59c222CF297125FEFda2")[];
2645
+ zeroex: ("0x0000000000001fF3684f28c67538d4D072C22734" | "0x7150ea07D00d8E5a46bcC809f1c9FDf5cb5f8E81")[];
2646
+ };
2559
2647
  bridges: {
2560
2648
  chainlink: {
2561
2649
  atlasNetworkName: string;
@@ -2748,6 +2836,11 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
2748
2836
  openocean: string;
2749
2837
  icecreamswap: true;
2750
2838
  };
2839
+ marketRouters: {
2840
+ icecreamswap: "0x63d3C7Ab37ca36A2A0A338076C163fF60c72527c"[];
2841
+ openocean: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64"[];
2842
+ uniswap: ("0x0B14ff67f0014046b4b99057Aec4509640b3947A" | "0x244f68e77357f86a8522323eBF80b5FC2F814d3E")[];
2843
+ };
2751
2844
  morpho: {};
2752
2845
  bridges: {
2753
2846
  chainlink: {
@@ -3956,6 +4049,17 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
3956
4049
  spender: string;
3957
4050
  };
3958
4051
  };
4052
+ marketRouters: {
4053
+ binance: "0xB44446b0c8E56988c34f7Ff73Ae904982b5FdDA5"[];
4054
+ enso: "0xA146d46823f3F594B785200102Be5385CAfCE9B5"[];
4055
+ icecreamswap: "0x2fF506ed9729580EF8Bf04429614beB1baE5F76D"[];
4056
+ kyberswap: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"[];
4057
+ odos: "0x2d8879046f1559E53eb052E949e9544bCB72f414"[];
4058
+ okx: "0x2E1Dee213BA8d7af0934C49a23187BabEACa8764"[];
4059
+ openocean: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64"[];
4060
+ uniswap: ("0x8B844f885672f333Bc0042cB669255f93a4C1E6b" | "0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a" | "0xD7c7D7F18dD5388D5217c9696C7e799fCd75c6bD")[];
4061
+ zeroex: ("0x0000000000001fF3684f28c67538d4D072C22734" | "0x1816eA2150e74Eb3068A4e3809E461Cc6977A7D7")[];
4062
+ };
3959
4063
  bridges: {
3960
4064
  chainlink: {
3961
4065
  atlasNetworkName: string;
@@ -4299,6 +4403,14 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
4299
4403
  zeroex: true;
4300
4404
  icecreamswap: true;
4301
4405
  };
4406
+ marketRouters: {
4407
+ icecreamswap: "0x3FFc2315A992b01dc4B3f79C8EEa1921091Ee24f"[];
4408
+ odos: "0xD9F4e85489aDCD0bAF0Cd63b4231c6af58c26745"[];
4409
+ okx: "0xcF76984119C7f6ae56fAfE680d39C08278b7eCF4"[];
4410
+ openocean: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64"[];
4411
+ uniswap: ("0x447B8E40B0CdA8e55F405C86bC635D02d0540aB8" | "0x738fD6d10bCc05c230388B4027CAd37f82fe2AF2")[];
4412
+ zeroex: ("0x0000000000005E88410CcDFaDe4a5EfaE4b49562" | "0xe3fBE7889A51d62AcD4E056d756F6eA04a3d8D2d")[];
4413
+ };
4302
4414
  bridges: {
4303
4415
  chainlink: {
4304
4416
  atlasNetworkName: string;
@@ -4463,6 +4575,12 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
4463
4575
  spender: string;
4464
4576
  };
4465
4577
  };
4578
+ marketRouters: {
4579
+ enso: "0x300b3D30aaBf46b05983284f0297D966E92bbeB2"[];
4580
+ icecreamswap: "0xC87De04e2EC1F4282dFF2933A2D58199f688fC3d"[];
4581
+ openocean: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64"[];
4582
+ uniswap: ("0xdD489C75be1039ec7d843A6aC2Fd658350B067Cf" | "0xa683c66045ad16abb1bCE5ad46A64d95f9A25785")[];
4583
+ };
4466
4584
  morpho: {
4467
4585
  morpho: "0xc9cDAc20FCeAAF616f7EB0bb6Cd2c69dcfa9094c";
4468
4586
  bundler3: "0xF9457356F18A3349Bb317Ac144c3Bcc62e5761aD";
@@ -4892,17 +5010,7 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
4892
5010
  type: "eip2930";
4893
5011
  gasPrice: bigint;
4894
5012
  maxFeePerBlobGas?: undefined | undefined;
4895
- maxFeePerGas
4896
- /**
4897
- * True if the chain is non-EVM (its CAIP-2 namespace is not `eip155`). Accepts
4898
- * an {@link IChainInfo} object, a CAIP-2 string, an internal name, or a
4899
- * numeric chain id.
4900
- */
4901
- ? /**
4902
- * True if the chain is non-EVM (its CAIP-2 namespace is not `eip155`). Accepts
4903
- * an {@link IChainInfo} object, a CAIP-2 string, an internal name, or a
4904
- * numeric chain id.
4905
- */: undefined | undefined;
5013
+ maxFeePerGas?: undefined | undefined;
4906
5014
  maxPriorityFeePerGas?: undefined | undefined;
4907
5015
  isSystemTx?: undefined | undefined;
4908
5016
  mint?: undefined | undefined;
@@ -5063,6 +5171,10 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
5063
5171
  markets: {
5064
5172
  icecreamswap: true;
5065
5173
  };
5174
+ marketRouters: {
5175
+ icecreamswap: "0xC87De04e2EC1F4282dFF2933A2D58199f688fC3d"[];
5176
+ uniswap: ("0x346239972d1fa486FC4a521031BC81bFB7D6e8a4" | "0x807F4E281B7A3B324825C64ca53c69F0b418dE40")[];
5177
+ };
5066
5178
  bridges: {
5067
5179
  chainlink: {
5068
5180
  atlasNetworkName: string;
@@ -5498,6 +5610,13 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
5498
5610
  spender: string;
5499
5611
  };
5500
5612
  };
5613
+ marketRouters: {
5614
+ enso: "0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf"[];
5615
+ icecreamswap: "0xC87De04e2EC1F4282dFF2933A2D58199f688fC3d"[];
5616
+ openocean: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64"[];
5617
+ paraswap: "0x6A000F20005980200259B80c5102003040001068"[];
5618
+ uniswap: ("0x75FC67473A91335B5b8F8821277262a13B38c9b3" | "0xc6D25285D5C5b62b7ca26D6092751A145D50e9Be")[];
5619
+ };
5501
5620
  bridges: {
5502
5621
  chainlink: {
5503
5622
  atlasNetworkName: string;
@@ -7406,6 +7525,10 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
7406
7525
  markets: {
7407
7526
  icecreamswap: true;
7408
7527
  };
7528
+ marketRouters: {
7529
+ icecreamswap: "0xC87De04e2EC1F4282dFF2933A2D58199f688fC3d"[];
7530
+ uniswap: ("0x533c7A53389e0538AB6aE1D7798D6C1213eAc28B" | "0x864DDc9B50B9A0dF676d826c9B9EDe9F8913a160")[];
7531
+ };
7409
7532
  bridges: {
7410
7533
  chainlink: {
7411
7534
  atlasNetworkName: string;
@@ -7710,6 +7833,9 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
7710
7833
  coingecko: string;
7711
7834
  };
7712
7835
  markets: {};
7836
+ marketRouters: {
7837
+ uniswap: ("0x346239972d1fa486FC4a521031BC81bFB7D6e8a4" | "0xa683c66045ad16abb1bCE5ad46A64d95f9A25785")[];
7838
+ };
7713
7839
  bridges: {};
7714
7840
  oracles: {};
7715
7841
  morpho: {};
@@ -7841,6 +7967,10 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
7841
7967
  coingecko: string;
7842
7968
  };
7843
7969
  markets: {};
7970
+ marketRouters: {
7971
+ icecreamswap: "0xC87De04e2EC1F4282dFF2933A2D58199f688fC3d"[];
7972
+ uniswap: ("0x738fD6d10bCc05c230388B4027CAd37f82fe2AF2" | "0xaa52bB8110fE38D0d2d2AF0B85C3A3eE622CA455")[];
7973
+ };
7844
7974
  bridges: {
7845
7975
  stargate: {
7846
7976
  endpointID: number;
@@ -7975,6 +8105,9 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
7975
8105
  coingecko: string;
7976
8106
  };
7977
8107
  markets: {};
8108
+ marketRouters: {
8109
+ uniswap: ("0x807F4E281B7A3B324825C64ca53c69F0b418dE40" | "0x1b35fbA9357fD9bda7ed0429C8BbAbe1e8CC88fc")[];
8110
+ };
7978
8111
  bridges: {};
7979
8112
  oracles: {};
7980
8113
  morpho: {};
@@ -8250,6 +8383,12 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
8250
8383
  markets: {
8251
8384
  zeroex: true;
8252
8385
  };
8386
+ marketRouters: {
8387
+ enso: "0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf"[];
8388
+ icecreamswap: "0xC87De04e2EC1F4282dFF2933A2D58199f688fC3d"[];
8389
+ uniswap: ("0x8B844f885672f333Bc0042cB669255f93a4C1E6b" | "0x091AD9e2e6e5eD44c1c66dB50e49A601F9f36cF6" | "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D")[];
8390
+ zeroex: ("0x0000000000001fF3684f28c67538d4D072C22734" | "0x1072a0A713A23a2Da9BAB99E9CD68187970E89a4")[];
8391
+ };
8253
8392
  bridges: {
8254
8393
  chainlink: {
8255
8394
  atlasNetworkName: string;
@@ -8685,6 +8824,10 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
8685
8824
  markets: {
8686
8825
  icecreamswap: true;
8687
8826
  };
8827
+ marketRouters: {
8828
+ icecreamswap: "0x0EE6f0900990b23A2a96a6F41EB56693c9076031"[];
8829
+ uniswap: ("0x738fD6d10bCc05c230388B4027CAd37f82fe2AF2" | "0xaa52bB8110fE38D0d2d2AF0B85C3A3eE622CA455")[];
8830
+ };
8688
8831
  bridges: {
8689
8832
  stargate: {
8690
8833
  endpointID: number;
@@ -9062,6 +9205,9 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
9062
9205
  externalId: {};
9063
9206
  blockAid: "";
9064
9207
  markets: {};
9208
+ marketRouters: {
9209
+ uniswap: ("0x533c7A53389e0538AB6aE1D7798D6C1213eAc28B" | "0xA7E6cB0A6B1BE8b779022A6aFcb097cF0d3Ff4A2")[];
9210
+ };
9065
9211
  bridges: {
9066
9212
  stargate: {
9067
9213
  endpointID: number;
@@ -9196,6 +9342,11 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
9196
9342
  kyberswap: string;
9197
9343
  threeroute: true;
9198
9344
  };
9345
+ marketRouters: {
9346
+ kyberswap: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"[];
9347
+ threeroute: "0x1B62C2CEf163E3120E512F71F6e6E99058c80F6E"[];
9348
+ uniswap: ("0x9db70E29712Cc8Af10c2B597BaDA6784544FF407" | "0xdD489C75be1039ec7d843A6aC2Fd658350B067Cf")[];
9349
+ };
9199
9350
  bridges: {
9200
9351
  stargate: {
9201
9352
  endpointID: number;
@@ -9358,6 +9509,17 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
9358
9509
  spender: string;
9359
9510
  };
9360
9511
  };
9512
+ marketRouters: {
9513
+ enso: "0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf"[];
9514
+ icecreamswap: "0x3FFc2315A992b01dc4B3f79C8EEa1921091Ee24f"[];
9515
+ kyberswap: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"[];
9516
+ odos: "0x6409722F3a1C4486A3b1FE566cBDd5e9D946A1f3"[];
9517
+ okx: "0x6733Eb2E75B1625F1Fe5f18aD2cB2BaBDA510d19"[];
9518
+ openocean: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64"[];
9519
+ paraswap: "0x6A000F20005980200259B80c5102003040001068"[];
9520
+ uniswap: ("0xFdf682F51FE81Aa4898F0AE2163d8A55c127fbC7" | "0x73855d06DE49d0fe4A9c42636Ba96c62da12FF9C" | "0xEf740bf23aCaE26f6492B10de645D6B98dC8Eaf3")[];
9521
+ zeroex: ("0x0000000000001fF3684f28c67538d4D072C22734" | "0x972655fACb8Df3CdF40395E4262f874f81674D46")[];
9522
+ };
9361
9523
  bridges: {
9362
9524
  layerzero: {
9363
9525
  eid: number;
@@ -9910,6 +10072,16 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
9910
10072
  kyberswap: string;
9911
10073
  openocean: string;
9912
10074
  };
10075
+ marketRouters: {
10076
+ binance: "0xB44446b0c8E56988c34f7Ff73Ae904982b5FdDA5"[];
10077
+ enso: "0xCfBAa9Cfce952Ca4F4069874fF1Df8c05e37a3c7"[];
10078
+ icecreamswap: "0xC87De04e2EC1F4282dFF2933A2D58199f688fC3d"[];
10079
+ kyberswap: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"[];
10080
+ okx: "0x19D345f95A80cc136d898f41b490E023cFF78658"[];
10081
+ openocean: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64"[];
10082
+ uniswap: ("0x807F4E281B7A3B324825C64ca53c69F0b418dE40" | "0x1b35fbA9357fD9bda7ed0429C8BbAbe1e8CC88fc")[];
10083
+ zeroex: ("0x0000000000001fF3684f28c67538d4D072C22734" | "0x7F2194E8d4D5B5F889b17aeCe891F89Da74F5384")[];
10084
+ };
9913
10085
  bridges: {
9914
10086
  chainlink: {
9915
10087
  atlasNetworkName: string;
@@ -10037,6 +10209,10 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
10037
10209
  coingecko: string;
10038
10210
  };
10039
10211
  markets: {};
10212
+ marketRouters: {
10213
+ icecreamswap: "0x9E6d21E759A7A288b80eef94E4737D313D31c13f"[];
10214
+ uniswap: ("0x807F4E281B7A3B324825C64ca53c69F0b418dE40" | "0x1b35fbA9357fD9bda7ed0429C8BbAbe1e8CC88fc")[];
10215
+ };
10040
10216
  bridges: {
10041
10217
  chainlink: {
10042
10218
  atlasNetworkName: string;
@@ -10177,6 +10353,16 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
10177
10353
  openocean: string;
10178
10354
  cowswap: string;
10179
10355
  };
10356
+ marketRouters: {
10357
+ enso: "0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf"[];
10358
+ icecreamswap: "0xa575f37e869e6887564F87c07e2885e08D542C4a"[];
10359
+ kyberswap: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"[];
10360
+ odos: "0x88de50B233052e4Fb783d4F6db78Cc34fEa3e9FC"[];
10361
+ okx: "0xa94Fcf9fc56a864f8DE51e6315aee5863AD63C91"[];
10362
+ openocean: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64"[];
10363
+ uniswap: ("0x8B844f885672f333Bc0042cB669255f93a4C1E6b" | "0x4Dae2f939ACf50408e13d58534Ff8c2776d45265" | "0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE")[];
10364
+ zeroex: ("0x0000000000001fF3684f28c67538d4D072C22734" | "0x6De411A14aEaafB3f23697A4472a4D4ed275Ac0f")[];
10365
+ };
10180
10366
  bridges: {
10181
10367
  chainlink: {
10182
10368
  atlasNetworkName: string;
@@ -10464,6 +10650,17 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
10464
10650
  markets: {
10465
10651
  openocean: string;
10466
10652
  };
10653
+ marketRouters: {
10654
+ binance: "0xB44446b0c8E56988c34f7Ff73Ae904982b5FdDA5"[];
10655
+ enso: "0xCfBAa9Cfce952Ca4F4069874fF1Df8c05e37a3c7"[];
10656
+ icecreamswap: "0xC87De04e2EC1F4282dFF2933A2D58199f688fC3d"[];
10657
+ kyberswap: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"[];
10658
+ native: "0x332e56e0b91eC3F08553eC7964E19CC041A38672"[];
10659
+ okx: "0x7A7AD9aa93cd0A2D0255326E5Fb145CEc14997FF"[];
10660
+ openocean: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64"[];
10661
+ uniswap: ("0xFdf682F51FE81Aa4898F0AE2163d8A55c127fbC7" | "0x75FC67473A91335B5b8F8821277262a13B38c9b3" | "0xfE31F71C1b106EAc32F1A19239c9a9A72ddfb900")[];
10662
+ zeroex: ("0x0000000000001fF3684f28c67538d4D072C22734" | "0xfb78Fcae443eB423b59B8C186518c5dF94416344")[];
10663
+ };
10467
10664
  bridges: {
10468
10665
  chainlink: {
10469
10666
  atlasNetworkName: string;
@@ -10618,6 +10815,14 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
10618
10815
  markets: {
10619
10816
  openocean: string;
10620
10817
  };
10818
+ marketRouters: {
10819
+ enso: "0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf"[];
10820
+ icecreamswap: "0x2fF506ed9729580EF8Bf04429614beB1baE5F76D"[];
10821
+ kyberswap: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"[];
10822
+ okx: "0x9Ac7b1FFEE0f58c0a3c89AA54Afb62efD25DC9fd"[];
10823
+ openocean: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64"[];
10824
+ zeroex: ("0x0000000000001fF3684f28c67538d4D072C22734" | "0xb32b027C59F540C22B4c76bF849BcF853B99F158")[];
10825
+ };
10621
10826
  bridges: {
10622
10827
  chainlink: {
10623
10828
  atlasNetworkName: string;
@@ -10737,6 +10942,10 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
10737
10942
  blockAid: "";
10738
10943
  externalId: {};
10739
10944
  markets: {};
10945
+ marketRouters: {
10946
+ icecreamswap: "0x9E6d21E759A7A288b80eef94E4737D313D31c13f"[];
10947
+ uniswap: ("0x807F4E281B7A3B324825C64ca53c69F0b418dE40" | "0x447B8E40B0CdA8e55F405C86bC635D02d0540aB8")[];
10948
+ };
10740
10949
  bridges: {};
10741
10950
  oracles: {};
10742
10951
  morpho: {
@@ -10985,6 +11194,14 @@ export declare const MAINNET_CHAINS: readonly [Readonly<{
10985
11194
  markets: {
10986
11195
  openocean: string;
10987
11196
  };
11197
+ marketRouters: {
11198
+ icecreamswap: "0x603206D6105217DD972E4Ab30676A220CA393346"[];
11199
+ kyberswap: "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5"[];
11200
+ native: "0xa5ec1f0aC784C3620fFDcdf2A7DbcEF9DA658ea4"[];
11201
+ okx: "0xE58b3089dF6667fBf99b75595a1671BaF6797D6d"[];
11202
+ uniswap: ("0x8876789976dEcBfCbBbe364623C63652db8C0904" | "0xCaf681a66D020601342297493863E78C959E5cb2")[];
11203
+ zeroex: ("0x0000000000001fF3684f28c67538d4D072C22734" | "0xe72688F7d25D7318B9A81F21EdDa640CA948c83B")[];
11204
+ };
10988
11205
  bridges: {};
10989
11206
  oracles: {};
10990
11207
  morpho: {};
@@ -11296,6 +11513,51 @@ export declare function networkByString(s: string): IChainInfo;
11296
11513
  * @throws {NetworkNotFoundError} if no matching chain is found
11297
11514
  */
11298
11515
  export declare function networkByCAIP2(caip2: string): IChainInfo;
11516
+ /**
11517
+ * Every market router configured for a chain, flattened to `(market, address)`
11518
+ * pairs. Accepts anything {@link networkByAny} accepts.
11519
+ *
11520
+ * @example
11521
+ * ```ts
11522
+ * marketRouterEntries(8453) // by chain ID
11523
+ * marketRouterEntries("base") // by internal name
11524
+ * marketRouterEntries("eip155:8453") // by CAIP-2
11525
+ * marketRouterEntries(someChain) // by chain object
11526
+ * ```
11527
+ *
11528
+ * @throws {NetworkNotFoundError} if no matching chain is found
11529
+ */
11530
+ export declare function marketRouterEntries(chain: MarketRouterChainInput): MarketRouterEntry[];
11531
+ /**
11532
+ * The routers configured for a single market on a chain, or an empty array
11533
+ * when that market has no deployment there.
11534
+ *
11535
+ * @throws {NetworkNotFoundError} if no matching chain is found
11536
+ */
11537
+ export declare function routersForMarket(chain: MarketRouterChainInput, market: MarketRouterName): ReadonlyArray<Address>;
11538
+ /**
11539
+ * The set of contract addresses the Oku Router may call on a chain, lowercased
11540
+ * and de-duplicated. Markets share deployments on some chains, so this is
11541
+ * smaller than {@link marketRouterEntries}.
11542
+ *
11543
+ * @throws {NetworkNotFoundError} if no matching chain is found
11544
+ */
11545
+ export declare function routerAllowlist(chain: MarketRouterChainInput): Set<string>;
11546
+ /**
11547
+ * Whether `address` is a market router the Oku Router may call on this chain.
11548
+ * Case-insensitive, so an unchecksummed `to` from an upstream quote can be
11549
+ * passed directly.
11550
+ *
11551
+ * @throws {NetworkNotFoundError} if no matching chain is found
11552
+ */
11553
+ export declare function isAllowedRouter(chain: MarketRouterChainInput, address: string): boolean;
11554
+ /**
11555
+ * Every market `address` is registered under on this chain. Empty when the
11556
+ * address is not allowlisted; more than one when markets share a deployment.
11557
+ *
11558
+ * @throws {NetworkNotFoundError} if no matching chain is found
11559
+ */
11560
+ export declare function marketsForRouter(chain: MarketRouterChainInput, address: string): MarketRouterName[];
11299
11561
  /**
11300
11562
  * Accepted input for the chain-family helpers ({@link chainType},
11301
11563
  * {@link isNetworkType}, etc.).
@@ -103,6 +103,21 @@ export interface Markets {
103
103
  cowswap?: string;
104
104
  icecreamswap?: boolean;
105
105
  }
106
+ export interface MarketRouters {
107
+ binance?: ReadonlyArray<Address>;
108
+ enso?: ReadonlyArray<Address>;
109
+ fabric?: ReadonlyArray<Address>;
110
+ icecreamswap?: ReadonlyArray<Address>;
111
+ kyberswap?: ReadonlyArray<Address>;
112
+ native?: ReadonlyArray<Address>;
113
+ odos?: ReadonlyArray<Address>;
114
+ okx?: ReadonlyArray<Address>;
115
+ openocean?: ReadonlyArray<Address>;
116
+ paraswap?: ReadonlyArray<Address>;
117
+ threeroute?: ReadonlyArray<Address>;
118
+ uniswap?: ReadonlyArray<Address>;
119
+ zeroex?: ReadonlyArray<Address>;
120
+ }
106
121
  export interface Bridges {
107
122
  deswap?: {
108
123
  chainId: number;
@@ -201,6 +216,7 @@ export interface IChainInfo<formatters extends ChainFormatters | undefined = Cha
201
216
  coingecko?: string;
202
217
  };
203
218
  markets: Markets;
219
+ marketRouters?: MarketRouters;
204
220
  bridges: Bridges;
205
221
  oracles: Oracles;
206
222
  initCodeHash: Hash;
@@ -0,0 +1,14 @@
1
+ import type { Address } from "viem";
2
+ import type { IChainInfo, MarketRouters } from "../spec";
3
+ import { type NetworkIndex } from "./lookup";
4
+ export type MarketRouterName = keyof MarketRouters;
5
+ export type MarketRouterChainInput = string | number | IChainInfo;
6
+ export interface MarketRouterEntry {
7
+ market: MarketRouterName;
8
+ address: Address;
9
+ }
10
+ export declare function marketRouterEntries(chain: MarketRouterChainInput, idx: NetworkIndex): MarketRouterEntry[];
11
+ export declare function routersForMarket(chain: MarketRouterChainInput, market: MarketRouterName, idx: NetworkIndex): ReadonlyArray<Address>;
12
+ export declare function routerAllowlist(chain: MarketRouterChainInput, idx: NetworkIndex): Set<string>;
13
+ export declare function isAllowedRouter(chain: MarketRouterChainInput, address: string, idx: NetworkIndex): boolean;
14
+ export declare function marketsForRouter(chain: MarketRouterChainInput, address: string, idx: NetworkIndex): MarketRouterName[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gfxlabs/oku-chains",
3
- "version": "1.12.24",
3
+ "version": "1.12.26",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index-mjs.js",