@rhinestone/shared-configs 1.19.0 → 2.0.1
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.
- package/dist/configs/chains.json +125 -40
- package/dist/configs/mainnets.json +0 -3
- package/dist/scripts/__tests__/validation.test.js +17 -3
- package/dist/scripts/generate.js +8 -1
- package/dist/scripts/validation.js +22 -0
- package/dist/src/__tests__/chainVirtualization.test.js +21 -12
- package/dist/src/chainVirtualization.d.ts +6 -5
- package/dist/src/chainVirtualization.js +32 -9
- package/dist/src/chains.d.ts +8 -1
- package/dist/src/chains.js +125 -41
- package/dist/src/generated/networks.d.ts +0 -1
- package/dist/src/generated/networks.js +0 -1
- package/dist/src/generated/packageVersion.d.ts +1 -1
- package/dist/src/generated/packageVersion.js +1 -1
- package/dist/src/hypercore.d.ts +9 -8
- package/dist/src/hypercore.js +13 -11
- package/dist/src/types.d.ts +49 -1
- package/package.json +1 -1
package/dist/configs/chains.json
CHANGED
|
@@ -14,7 +14,12 @@
|
|
|
14
14
|
"symbol": "ETH"
|
|
15
15
|
},
|
|
16
16
|
"network": "mainnet",
|
|
17
|
+
"providerIds": {
|
|
18
|
+
"alchemy": "ETH_MAINNET",
|
|
19
|
+
"zerion": "ethereum"
|
|
20
|
+
},
|
|
17
21
|
"publicRpcUrl": "https://eth.merkle.io",
|
|
22
|
+
"sessionCapable": true,
|
|
18
23
|
"settlementConfig": {
|
|
19
24
|
"cctp": {
|
|
20
25
|
"domain": 0
|
|
@@ -127,7 +132,12 @@
|
|
|
127
132
|
"symbol": "ETH"
|
|
128
133
|
},
|
|
129
134
|
"network": "mainnet",
|
|
135
|
+
"providerIds": {
|
|
136
|
+
"alchemy": "OPT_MAINNET",
|
|
137
|
+
"zerion": "optimism"
|
|
138
|
+
},
|
|
130
139
|
"publicRpcUrl": "https://mainnet.optimism.io",
|
|
140
|
+
"sessionCapable": true,
|
|
131
141
|
"settlementConfig": {
|
|
132
142
|
"cctp": {
|
|
133
143
|
"domain": 2
|
|
@@ -255,7 +265,12 @@
|
|
|
255
265
|
"symbol": "BNB"
|
|
256
266
|
},
|
|
257
267
|
"network": "mainnet",
|
|
268
|
+
"providerIds": {
|
|
269
|
+
"alchemy": "BNB_MAINNET",
|
|
270
|
+
"zerion": "binance-smart-chain"
|
|
271
|
+
},
|
|
258
272
|
"publicRpcUrl": "https://56.rpc.thirdweb.com",
|
|
273
|
+
"sessionCapable": true,
|
|
259
274
|
"settlementConfig": {
|
|
260
275
|
"cctp": {
|
|
261
276
|
"domain": 17
|
|
@@ -348,7 +363,12 @@
|
|
|
348
363
|
"symbol": "XDAI"
|
|
349
364
|
},
|
|
350
365
|
"network": "mainnet",
|
|
366
|
+
"providerIds": {
|
|
367
|
+
"alchemy": "GNOSIS_MAINNET",
|
|
368
|
+
"zerion": "xdai"
|
|
369
|
+
},
|
|
351
370
|
"publicRpcUrl": "https://rpc.gnosischain.com",
|
|
371
|
+
"sessionCapable": true,
|
|
352
372
|
"settlementConfig": {
|
|
353
373
|
"near": {
|
|
354
374
|
"prefix": "gnosis"
|
|
@@ -403,7 +423,12 @@
|
|
|
403
423
|
"symbol": "ETH"
|
|
404
424
|
},
|
|
405
425
|
"network": "mainnet",
|
|
426
|
+
"providerIds": {
|
|
427
|
+
"alchemy": "UNICHAIN_MAINNET",
|
|
428
|
+
"zerion": "unichain"
|
|
429
|
+
},
|
|
406
430
|
"publicRpcUrl": "https://mainnet.unichain.org",
|
|
431
|
+
"sessionCapable": true,
|
|
407
432
|
"settlementConfig": {
|
|
408
433
|
"cctp": {
|
|
409
434
|
"domain": 10
|
|
@@ -504,7 +529,12 @@
|
|
|
504
529
|
"symbol": "POL"
|
|
505
530
|
},
|
|
506
531
|
"network": "mainnet",
|
|
532
|
+
"providerIds": {
|
|
533
|
+
"alchemy": "MATIC_MAINNET",
|
|
534
|
+
"zerion": "polygon"
|
|
535
|
+
},
|
|
507
536
|
"publicRpcUrl": "https://polygon.drpc.org",
|
|
537
|
+
"sessionCapable": true,
|
|
508
538
|
"settlementConfig": {
|
|
509
539
|
"cctp": {
|
|
510
540
|
"domain": 7
|
|
@@ -607,7 +637,12 @@
|
|
|
607
637
|
"symbol": "MON"
|
|
608
638
|
},
|
|
609
639
|
"network": "mainnet",
|
|
640
|
+
"providerIds": {
|
|
641
|
+
"alchemy": "MONAD_MAINNET",
|
|
642
|
+
"zerion": "monad"
|
|
643
|
+
},
|
|
610
644
|
"publicRpcUrl": "https://rpc.monad.xyz",
|
|
645
|
+
"sessionCapable": true,
|
|
611
646
|
"settlementConfig": {
|
|
612
647
|
"cctp": {
|
|
613
648
|
"domain": 15
|
|
@@ -689,7 +724,12 @@
|
|
|
689
724
|
"symbol": "S"
|
|
690
725
|
},
|
|
691
726
|
"network": "mainnet",
|
|
727
|
+
"providerIds": {
|
|
728
|
+
"alchemy": "SONIC_MAINNET",
|
|
729
|
+
"zerion": "sonic"
|
|
730
|
+
},
|
|
692
731
|
"publicRpcUrl": "https://rpc.soniclabs.com",
|
|
732
|
+
"sessionCapable": true,
|
|
693
733
|
"settlementConfig": {
|
|
694
734
|
"cctp": {
|
|
695
735
|
"domain": 13
|
|
@@ -742,7 +782,12 @@
|
|
|
742
782
|
"symbol": "HYPE"
|
|
743
783
|
},
|
|
744
784
|
"network": "mainnet",
|
|
785
|
+
"providerIds": {
|
|
786
|
+
"alchemy": "HYPERLIQUID_MAINNET",
|
|
787
|
+
"zerion": "hyperevm"
|
|
788
|
+
},
|
|
745
789
|
"publicRpcUrl": "https://rpc.hyperliquid.xyz/evm",
|
|
790
|
+
"sessionCapable": true,
|
|
746
791
|
"settlementConfig": {
|
|
747
792
|
"cctp": {
|
|
748
793
|
"domain": 19
|
|
@@ -798,46 +843,6 @@
|
|
|
798
843
|
"symbol": "WHYPE"
|
|
799
844
|
}
|
|
800
845
|
},
|
|
801
|
-
"1337": {
|
|
802
|
-
"caip2": "hypercore:mainnet",
|
|
803
|
-
"explorer": {
|
|
804
|
-
"addressPath": "/explorer/address/",
|
|
805
|
-
"txPath": "/explorer/tx/",
|
|
806
|
-
"url": "https://app.hyperliquid.xyz"
|
|
807
|
-
},
|
|
808
|
-
"iconSlug": "hyperevm",
|
|
809
|
-
"name": "HyperCore",
|
|
810
|
-
"nativeToken": {
|
|
811
|
-
"address": "0x0000000000000000000000000000000000000000",
|
|
812
|
-
"decimals": 18,
|
|
813
|
-
"symbol": "HYPE"
|
|
814
|
-
},
|
|
815
|
-
"network": "mainnet",
|
|
816
|
-
"roles": {
|
|
817
|
-
"destination": false,
|
|
818
|
-
"origin": true
|
|
819
|
-
},
|
|
820
|
-
"settlementLayers": [],
|
|
821
|
-
"stack": "vanilla",
|
|
822
|
-
"swapQuoters": [],
|
|
823
|
-
"tokens": [
|
|
824
|
-
{
|
|
825
|
-
"address": "0xb88339CB7199b77E23DB6E890353E22632Ba630f",
|
|
826
|
-
"approvalSlot": null,
|
|
827
|
-
"balanceSlot": null,
|
|
828
|
-
"decimals": 6,
|
|
829
|
-
"pegGroup": "USD",
|
|
830
|
-
"symbol": "USDC"
|
|
831
|
-
}
|
|
832
|
-
],
|
|
833
|
-
"virtual": true,
|
|
834
|
-
"vmType": "evm",
|
|
835
|
-
"wrappedNativeToken": {
|
|
836
|
-
"address": "0x0000000000000000000000000000000000000000",
|
|
837
|
-
"decimals": 18,
|
|
838
|
-
"symbol": "HYPE"
|
|
839
|
-
}
|
|
840
|
-
},
|
|
841
846
|
"1868": {
|
|
842
847
|
"caip2": "eip155:1868",
|
|
843
848
|
"explorer": {
|
|
@@ -853,7 +858,12 @@
|
|
|
853
858
|
"symbol": "ETH"
|
|
854
859
|
},
|
|
855
860
|
"network": "mainnet",
|
|
861
|
+
"providerIds": {
|
|
862
|
+
"alchemy": "SONEIUM_MAINNET",
|
|
863
|
+
"zerion": "soneium"
|
|
864
|
+
},
|
|
856
865
|
"publicRpcUrl": "https://rpc.soneium.org",
|
|
866
|
+
"sessionCapable": true,
|
|
857
867
|
"settlementLayers": [
|
|
858
868
|
"ACROSS",
|
|
859
869
|
"RELAY"
|
|
@@ -929,7 +939,12 @@
|
|
|
929
939
|
"symbol": "ETH"
|
|
930
940
|
},
|
|
931
941
|
"network": "mainnet",
|
|
942
|
+
"providerIds": {
|
|
943
|
+
"alchemy": "ROBINHOOD_MAINNET",
|
|
944
|
+
"zerion": "robinhood"
|
|
945
|
+
},
|
|
932
946
|
"publicRpcUrl": "https://rpc.mainnet.chain.robinhood.com",
|
|
947
|
+
"sessionCapable": true,
|
|
933
948
|
"settlementLayers": [
|
|
934
949
|
"ACROSS",
|
|
935
950
|
"RELAY"
|
|
@@ -994,7 +1009,12 @@
|
|
|
994
1009
|
"symbol": "ETH"
|
|
995
1010
|
},
|
|
996
1011
|
"network": "mainnet",
|
|
1012
|
+
"providerIds": {
|
|
1013
|
+
"alchemy": "BASE_MAINNET",
|
|
1014
|
+
"zerion": "base"
|
|
1015
|
+
},
|
|
997
1016
|
"publicRpcUrl": "https://mainnet.base.org",
|
|
1017
|
+
"sessionCapable": true,
|
|
998
1018
|
"settlementConfig": {
|
|
999
1019
|
"cctp": {
|
|
1000
1020
|
"domain": 6
|
|
@@ -1086,7 +1106,12 @@
|
|
|
1086
1106
|
"symbol": "XPL"
|
|
1087
1107
|
},
|
|
1088
1108
|
"network": "mainnet",
|
|
1109
|
+
"providerIds": {
|
|
1110
|
+
"alchemy": "PLASMA_MAINNET",
|
|
1111
|
+
"zerion": "plasma"
|
|
1112
|
+
},
|
|
1089
1113
|
"publicRpcUrl": "https://rpc.plasma.to",
|
|
1114
|
+
"sessionCapable": true,
|
|
1090
1115
|
"settlementConfig": {
|
|
1091
1116
|
"oft": {
|
|
1092
1117
|
"adapter": "0x02ca37966753bDdDf11216B73B16C1dE756A7CF9",
|
|
@@ -1149,7 +1174,12 @@
|
|
|
1149
1174
|
"symbol": "XPL"
|
|
1150
1175
|
},
|
|
1151
1176
|
"network": "testnet",
|
|
1177
|
+
"providerIds": {
|
|
1178
|
+
"alchemy": null,
|
|
1179
|
+
"zerion": null
|
|
1180
|
+
},
|
|
1152
1181
|
"publicRpcUrl": "https://testnet-rpc.plasma.to",
|
|
1182
|
+
"sessionCapable": false,
|
|
1153
1183
|
"settlementLayers": [
|
|
1154
1184
|
"ECO"
|
|
1155
1185
|
],
|
|
@@ -1202,7 +1232,12 @@
|
|
|
1202
1232
|
"symbol": "ETH"
|
|
1203
1233
|
},
|
|
1204
1234
|
"network": "mainnet",
|
|
1235
|
+
"providerIds": {
|
|
1236
|
+
"alchemy": "ARB_MAINNET",
|
|
1237
|
+
"zerion": "arbitrum"
|
|
1238
|
+
},
|
|
1205
1239
|
"publicRpcUrl": "https://arb1.arbitrum.io/rpc",
|
|
1240
|
+
"sessionCapable": true,
|
|
1206
1241
|
"settlementConfig": {
|
|
1207
1242
|
"cctp": {
|
|
1208
1243
|
"domain": 3
|
|
@@ -1316,7 +1351,12 @@
|
|
|
1316
1351
|
"symbol": "AVAX"
|
|
1317
1352
|
},
|
|
1318
1353
|
"network": "mainnet",
|
|
1354
|
+
"providerIds": {
|
|
1355
|
+
"alchemy": "AVAX_MAINNET",
|
|
1356
|
+
"zerion": "avalanche"
|
|
1357
|
+
},
|
|
1319
1358
|
"publicRpcUrl": "https://api.avax.network/ext/bc/C/rpc",
|
|
1359
|
+
"sessionCapable": true,
|
|
1320
1360
|
"settlementConfig": {
|
|
1321
1361
|
"cctp": {
|
|
1322
1362
|
"domain": 1
|
|
@@ -1421,7 +1461,12 @@
|
|
|
1421
1461
|
"symbol": "ETH"
|
|
1422
1462
|
},
|
|
1423
1463
|
"network": "testnet",
|
|
1464
|
+
"providerIds": {
|
|
1465
|
+
"alchemy": "BASE_SEPOLIA",
|
|
1466
|
+
"zerion": null
|
|
1467
|
+
},
|
|
1424
1468
|
"publicRpcUrl": "https://sepolia.base.org",
|
|
1469
|
+
"sessionCapable": false,
|
|
1425
1470
|
"settlementConfig": {
|
|
1426
1471
|
"cctp": {
|
|
1427
1472
|
"domain": 6
|
|
@@ -1509,7 +1554,12 @@
|
|
|
1509
1554
|
"symbol": "ETH"
|
|
1510
1555
|
},
|
|
1511
1556
|
"network": "testnet",
|
|
1557
|
+
"providerIds": {
|
|
1558
|
+
"alchemy": "ARB_SEPOLIA",
|
|
1559
|
+
"zerion": null
|
|
1560
|
+
},
|
|
1512
1561
|
"publicRpcUrl": "https://sepolia-rollup.arbitrum.io/rpc",
|
|
1562
|
+
"sessionCapable": false,
|
|
1513
1563
|
"settlementConfig": {
|
|
1514
1564
|
"cctp": {
|
|
1515
1565
|
"domain": 3
|
|
@@ -1583,7 +1633,12 @@
|
|
|
1583
1633
|
"symbol": "ETH"
|
|
1584
1634
|
},
|
|
1585
1635
|
"network": "mainnet",
|
|
1636
|
+
"providerIds": {
|
|
1637
|
+
"alchemy": null,
|
|
1638
|
+
"zerion": "katana"
|
|
1639
|
+
},
|
|
1586
1640
|
"publicRpcUrl": "https://rpc.katana.network",
|
|
1641
|
+
"sessionCapable": true,
|
|
1587
1642
|
"settlementConfig": {
|
|
1588
1643
|
"rhino": {
|
|
1589
1644
|
"bridgeContract": "0x04317f0e4795b1e1bab333234153fa10aaac79e9",
|
|
@@ -1655,10 +1710,15 @@
|
|
|
1655
1710
|
"symbol": "HYPE"
|
|
1656
1711
|
},
|
|
1657
1712
|
"network": "mainnet",
|
|
1713
|
+
"providerIds": {
|
|
1714
|
+
"alchemy": null,
|
|
1715
|
+
"zerion": null
|
|
1716
|
+
},
|
|
1658
1717
|
"roles": {
|
|
1659
1718
|
"destination": true,
|
|
1660
1719
|
"origin": true
|
|
1661
1720
|
},
|
|
1721
|
+
"sessionCapable": false,
|
|
1662
1722
|
"settlementLayers": [],
|
|
1663
1723
|
"stack": "vanilla",
|
|
1664
1724
|
"swapQuoters": [],
|
|
@@ -1695,10 +1755,15 @@
|
|
|
1695
1755
|
"symbol": "HYPE"
|
|
1696
1756
|
},
|
|
1697
1757
|
"network": "mainnet",
|
|
1758
|
+
"providerIds": {
|
|
1759
|
+
"alchemy": null,
|
|
1760
|
+
"zerion": null
|
|
1761
|
+
},
|
|
1698
1762
|
"roles": {
|
|
1699
1763
|
"destination": true,
|
|
1700
1764
|
"origin": false
|
|
1701
1765
|
},
|
|
1766
|
+
"sessionCapable": false,
|
|
1702
1767
|
"settlementLayers": [],
|
|
1703
1768
|
"stack": "vanilla",
|
|
1704
1769
|
"swapQuoters": [],
|
|
@@ -1735,7 +1800,12 @@
|
|
|
1735
1800
|
"symbol": "ETH"
|
|
1736
1801
|
},
|
|
1737
1802
|
"network": "testnet",
|
|
1803
|
+
"providerIds": {
|
|
1804
|
+
"alchemy": "ETH_SEPOLIA",
|
|
1805
|
+
"zerion": null
|
|
1806
|
+
},
|
|
1738
1807
|
"publicRpcUrl": "https://11155111.rpc.thirdweb.com",
|
|
1808
|
+
"sessionCapable": false,
|
|
1739
1809
|
"settlementConfig": {
|
|
1740
1810
|
"cctp": {
|
|
1741
1811
|
"domain": 0
|
|
@@ -1819,7 +1889,12 @@
|
|
|
1819
1889
|
"symbol": "ETH"
|
|
1820
1890
|
},
|
|
1821
1891
|
"network": "testnet",
|
|
1892
|
+
"providerIds": {
|
|
1893
|
+
"alchemy": "OPT_SEPOLIA",
|
|
1894
|
+
"zerion": null
|
|
1895
|
+
},
|
|
1822
1896
|
"publicRpcUrl": "https://sepolia.optimism.io",
|
|
1897
|
+
"sessionCapable": false,
|
|
1823
1898
|
"settlementConfig": {
|
|
1824
1899
|
"cctp": {
|
|
1825
1900
|
"domain": 2
|
|
@@ -1893,6 +1968,11 @@
|
|
|
1893
1968
|
"symbol": "TRX"
|
|
1894
1969
|
},
|
|
1895
1970
|
"network": "mainnet",
|
|
1971
|
+
"providerIds": {
|
|
1972
|
+
"alchemy": null,
|
|
1973
|
+
"zerion": null
|
|
1974
|
+
},
|
|
1975
|
+
"sessionCapable": false,
|
|
1896
1976
|
"settlementConfig": {
|
|
1897
1977
|
"near": {
|
|
1898
1978
|
"prefix": "tron"
|
|
@@ -1961,6 +2041,11 @@
|
|
|
1961
2041
|
"symbol": "SOL"
|
|
1962
2042
|
},
|
|
1963
2043
|
"network": "mainnet",
|
|
2044
|
+
"providerIds": {
|
|
2045
|
+
"alchemy": null,
|
|
2046
|
+
"zerion": null
|
|
2047
|
+
},
|
|
2048
|
+
"sessionCapable": false,
|
|
1964
2049
|
"settlementConfig": {
|
|
1965
2050
|
"cctp": {
|
|
1966
2051
|
"domain": 5
|
|
@@ -26,6 +26,8 @@ function validChain(overrides = {}) {
|
|
|
26
26
|
tokens: [{ ...nativeToken, balanceSlot: null, approvalSlot: null }],
|
|
27
27
|
settlementLayers: ["ACROSS", "ECO", "RELAY"],
|
|
28
28
|
swapQuoters: ["0x"],
|
|
29
|
+
providerIds: { alchemy: "ETH_MAINNET", zerion: "ethereum" },
|
|
30
|
+
sessionCapable: true,
|
|
29
31
|
...overrides,
|
|
30
32
|
};
|
|
31
33
|
}
|
|
@@ -83,12 +85,25 @@ function errorsFor(chain) {
|
|
|
83
85
|
["an iconSlug carrying its extension", { iconSlug: "base.svg" }],
|
|
84
86
|
["an iconSlug carrying a directory", { iconSlug: "chains/base" }],
|
|
85
87
|
["an iconSlug that is not a string", { iconSlug: 42 }],
|
|
88
|
+
// A missing vendor id and a null one mean opposite things — an artifact
|
|
89
|
+
// older than the field, versus a vendor that was checked and does not serve
|
|
90
|
+
// the chain. Only the second is an answer a consumer can act on.
|
|
91
|
+
["missing providerIds", { providerIds: undefined }],
|
|
92
|
+
["providerIds missing a vendor", { providerIds: { alchemy: "ETH_MAINNET" } }],
|
|
93
|
+
["an empty vendor id", { providerIds: { alchemy: "", zerion: "ethereum" } }],
|
|
94
|
+
["a missing sessionCapable", { sessionCapable: undefined }],
|
|
86
95
|
])("rejects %s", (_label, overrides) => {
|
|
87
96
|
(0, bun_test_1.expect)(errorsFor(validChain(overrides)).length).toBeGreaterThan(0);
|
|
88
97
|
});
|
|
89
98
|
(0, bun_test_1.it)("accepts a null explorer, the answer for a chain that has none", () => {
|
|
90
99
|
(0, bun_test_1.expect)(errorsFor(validChain({ explorer: null }))).toEqual([]);
|
|
91
100
|
});
|
|
101
|
+
// Katana is exactly this: Alchemy serves it over RPC but Address Activity
|
|
102
|
+
// does not carry it, so ingestion is Zerion's alone.
|
|
103
|
+
(0, bun_test_1.it)("accepts a null vendor id, the answer for a vendor that does not serve the chain", () => {
|
|
104
|
+
(0, bun_test_1.expect)(errorsFor(validChain({ providerIds: { alchemy: null, zerion: "katana" } }))).toEqual([]);
|
|
105
|
+
(0, bun_test_1.expect)(errorsFor(validChain({ providerIds: { alchemy: null, zerion: null } }))).toEqual([]);
|
|
106
|
+
});
|
|
92
107
|
(0, bun_test_1.it)("names the offending value so the build failure is actionable", () => {
|
|
93
108
|
const [error] = errorsFor(validChain({ settlementLayers: ["TELEPORT"] }));
|
|
94
109
|
(0, bun_test_1.expect)(error.message).toContain("TELEPORT");
|
|
@@ -632,15 +647,14 @@ function errorsFor(chain) {
|
|
|
632
647
|
(0, bun_test_1.expect)(withoutIcon).toEqual([]);
|
|
633
648
|
});
|
|
634
649
|
// Two reuse rules that would otherwise look like copy-paste errors in the
|
|
635
|
-
// jsonnet. A testnet is visually the same chain as its mainnet, and
|
|
636
|
-
// HyperCore
|
|
650
|
+
// jsonnet. A testnet is visually the same chain as its mainnet, and both
|
|
651
|
+
// HyperCore venues are Hyperliquid — the same branding as HyperEVM.
|
|
637
652
|
bun_test_1.it.each([
|
|
638
653
|
["11155111", "1"],
|
|
639
654
|
["11155420", "10"],
|
|
640
655
|
["84532", "8453"],
|
|
641
656
|
["421614", "42161"],
|
|
642
657
|
["9746", "9745"],
|
|
643
|
-
["1337", "999"],
|
|
644
658
|
["1337001", "999"],
|
|
645
659
|
["1337002", "999"],
|
|
646
660
|
])("reuses chain %s's glyph from chain %s", (child, parent) => {
|
package/dist/scripts/generate.js
CHANGED
|
@@ -89,7 +89,7 @@ function renderChains(chainRegistry, mainnets, testnets) {
|
|
|
89
89
|
}
|
|
90
90
|
return [
|
|
91
91
|
"// Auto-generated by scripts/generate.ts. Do not edit manually.",
|
|
92
|
-
'import type { ChainNetwork, ChainStack, PegGroup, ProviderName, SettlementConfig, SettlementLayer, SupportedChain, SwapQuoter, SwapQuoterConfig, VmType } from "./types";',
|
|
92
|
+
'import type { ChainNetwork, ChainStack, PegGroup, ProviderIds, ProviderName, SettlementConfig, SettlementLayer, SupportedChain, SwapQuoter, SwapQuoterConfig, VmType } from "./types";',
|
|
93
93
|
"",
|
|
94
94
|
"interface Token {",
|
|
95
95
|
" /** EVM: 0x-prefixed hex. SVM: base58 SPL mint. TVM: base58 (T-prefixed). */",
|
|
@@ -159,6 +159,13 @@ function renderChains(chainRegistry, mainnets, testnets) {
|
|
|
159
159
|
" * name, CCTP domain, NEAR prefix, OFT adapter). Third-party addresses —",
|
|
160
160
|
" * never the contracts block, which is read as Rhinestone-deployed. */",
|
|
161
161
|
" settlementConfig?: SettlementConfig;",
|
|
162
|
+
" /** What the deposit-ingestion vendors call this chain. `null` means the",
|
|
163
|
+
" * vendor was checked and does not serve it; both null means the chain",
|
|
164
|
+
" * cannot take deposits. */",
|
|
165
|
+
" providerIds: ProviderIds;",
|
|
166
|
+
" /** Whether we open smart sessions here — a declared policy, not a",
|
|
167
|
+
" * statement about what is deployed. */",
|
|
168
|
+
" sessionCapable: boolean;",
|
|
162
169
|
" providers: ProviderName[];",
|
|
163
170
|
" swapQuoters: SwapQuoter[];",
|
|
164
171
|
" swapQuoterConfig?: Partial<Record<SwapQuoter, SwapQuoterConfig>>;",
|
|
@@ -241,6 +241,28 @@ function structuralProblems(chain) {
|
|
|
241
241
|
if (!isAbsentOr(chain.virtual, (v) => typeof v === 'boolean')) {
|
|
242
242
|
problems.push('virtual is not a boolean');
|
|
243
243
|
}
|
|
244
|
+
// Required, and each vendor's key required within it: `null` says the vendor
|
|
245
|
+
// was checked and does not serve this chain, which is the answer a consumer
|
|
246
|
+
// acts on when it decides the chain cannot take deposits. An absent key is a
|
|
247
|
+
// different claim — an artifact older than the field — and letting the two
|
|
248
|
+
// look alike is exactly the silent gap this field exists to close.
|
|
249
|
+
if (!isObject(chain.providerIds)) {
|
|
250
|
+
problems.push('providerIds is missing (use null per vendor for a chain it does not serve)');
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
for (const vendor of ['alchemy', 'zerion']) {
|
|
254
|
+
const id = chain.providerIds[vendor];
|
|
255
|
+
if (!(vendor in chain.providerIds)) {
|
|
256
|
+
problems.push(`providerIds.${vendor} is missing (use null if the vendor does not serve this chain)`);
|
|
257
|
+
}
|
|
258
|
+
else if (id !== null && !isNonEmptyString(id)) {
|
|
259
|
+
problems.push(`providerIds.${vendor} ${JSON.stringify(id)} is not a non-empty string or null`);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
if (typeof chain.sessionCapable !== 'boolean') {
|
|
264
|
+
problems.push('sessionCapable is not a boolean');
|
|
265
|
+
}
|
|
244
266
|
for (const field of ['nativeToken', 'wrappedNativeToken']) {
|
|
245
267
|
const token = chain[field];
|
|
246
268
|
if (!isObject(token)) {
|
|
@@ -31,11 +31,11 @@ const TRON_CAIP2 = "tron:mainnet";
|
|
|
31
31
|
(0, bun_test_1.expect)((0, index_1.chainIdFromCaip2)(HYPERCORE_SPOT_CAIP2)).toBe(index_1.HYPERCORE_SPOT_CHAIN_ID);
|
|
32
32
|
(0, bun_test_1.expect)((0, index_1.chainIdFromCaip2)(HYPERCORE_PERP_CAIP2)).toBe(index_1.HYPERCORE_PERP_CHAIN_ID);
|
|
33
33
|
});
|
|
34
|
-
(0, bun_test_1.it)("resolves the origin id
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
(0, bun_test_1.expect)((0, index_1.chainIdFromCaip2)("hypercore:mainnet")).
|
|
34
|
+
(0, bun_test_1.it)("no longer resolves the retired origin id", () => {
|
|
35
|
+
// RHI-5606 dropped the entry; `hypercore:spot` carries both directions.
|
|
36
|
+
// Resolving to nothing is what makes a stale caller fail loudly here
|
|
37
|
+
// rather than acquiring a chain with no roles, no tokens and no venue.
|
|
38
|
+
(0, bun_test_1.expect)((0, index_1.chainIdFromCaip2)("hypercore:mainnet")).toBeUndefined();
|
|
39
39
|
});
|
|
40
40
|
(0, bun_test_1.it)("resolves registry non-EVM caip2 strings", () => {
|
|
41
41
|
(0, bun_test_1.expect)((0, index_1.chainIdFromCaip2)(SOLANA_CAIP2)).toBe(index_1.MainnetNetwork.SOLANA);
|
|
@@ -80,13 +80,22 @@ const TRON_CAIP2 = "tron:mainnet";
|
|
|
80
80
|
(0, bun_test_1.expect)((0, index_1.canBeOrigin)(index_1.HYPERCORE_PERP_CHAIN_ID)).toBe(false);
|
|
81
81
|
(0, bun_test_1.expect)((0, index_1.canBeDestination)(index_1.HYPERCORE_PERP_CHAIN_ID)).toBe(true);
|
|
82
82
|
});
|
|
83
|
-
(0, bun_test_1.it)("
|
|
84
|
-
//
|
|
85
|
-
//
|
|
86
|
-
//
|
|
87
|
-
//
|
|
88
|
-
|
|
89
|
-
(0, bun_test_1.expect)((
|
|
83
|
+
(0, bun_test_1.it)("refuses the retired origin id in both directions, entry or not", () => {
|
|
84
|
+
// The regression this guards: absent `roles` default to BOTH, so removing
|
|
85
|
+
// 1337's entry would have flipped `canBeDestination` from an explicit
|
|
86
|
+
// `false` to the unknown-id `true` — re-admitting the id that names the
|
|
87
|
+
// Core L1 without naming an account and defaulted to unrecoverable perp
|
|
88
|
+
// margin (RHI-5510). The refusal is not allowed to depend on the entry.
|
|
89
|
+
(0, bun_test_1.expect)(index_1.chainRegistry[String(index_1.HYPERCORE_ORIGIN_CHAIN_ID)]).toBeUndefined();
|
|
90
|
+
(0, bun_test_1.expect)((0, index_1.canBeDestination)(index_1.HYPERCORE_ORIGIN_CHAIN_ID)).toBe(false);
|
|
91
|
+
(0, bun_test_1.expect)((0, index_1.canBeOrigin)(index_1.HYPERCORE_ORIGIN_CHAIN_ID)).toBe(false);
|
|
92
|
+
});
|
|
93
|
+
(0, bun_test_1.it)("still defaults a genuinely unknown id to both", () => {
|
|
94
|
+
// The retired-id list must not become a general "unknown means no".
|
|
95
|
+
// Callers reject ids they do not recognise by their own means; these
|
|
96
|
+
// helpers answer about capability, not existence.
|
|
97
|
+
(0, bun_test_1.expect)((0, index_1.canBeOrigin)(999999999)).toBe(true);
|
|
98
|
+
(0, bun_test_1.expect)((0, index_1.canBeDestination)(999999999)).toBe(true);
|
|
90
99
|
});
|
|
91
100
|
(0, bun_test_1.it)("defaults both directions for chains that declare no roles", () => {
|
|
92
101
|
// Absent `roles` must mean both, so adding the field is a no-op for every
|
|
@@ -6,17 +6,18 @@ export declare function getVmType(chainId: number): VmType;
|
|
|
6
6
|
*
|
|
7
7
|
* Absent `roles` means both directions, so every ordinary chain answers true
|
|
8
8
|
* without declaring anything. A consumer may narrow this further; it may not
|
|
9
|
-
* widen it.
|
|
9
|
+
* widen it. Retired ids are the exception and answer false — see
|
|
10
|
+
* `RETIRED_CHAIN_IDS`.
|
|
10
11
|
*/
|
|
11
12
|
export declare function canBeOrigin(chainId: number): boolean;
|
|
12
13
|
/**
|
|
13
14
|
* Whether funds can be DELIVERED to this chain — i.e. it is a valid intent
|
|
14
15
|
* destination.
|
|
15
16
|
*
|
|
16
|
-
* False for
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* False for `hypercore:mainnet`, which names the Core L1 without naming the
|
|
18
|
+
* account a delivery would credit, so `hypercore:spot` / `hypercore:perp` are
|
|
19
|
+
* the only HyperCore destinations. That answer used to come from the entry's
|
|
20
|
+
* `roles`; the entry is gone and the answer is unchanged.
|
|
20
21
|
*/
|
|
21
22
|
export declare function canBeDestination(chainId: number): boolean;
|
|
22
23
|
/** True when the chain id's vmType is not `'evm'` (Solana, Tron today). */
|
|
@@ -20,14 +20,32 @@ exports.chainIdFromCaip2 = chainIdFromCaip2;
|
|
|
20
20
|
* source of truth). Consumers should NOT keep their own copy of "which
|
|
21
21
|
* chainIds are non-EVM" — read from here.
|
|
22
22
|
*
|
|
23
|
-
* HyperCore (
|
|
24
|
-
* (`vmType === 'evm'`, so `isNonEvmChainId(
|
|
25
|
-
* `hypercore
|
|
26
|
-
* and
|
|
23
|
+
* HyperCore's venues (1337001, 1337002) are `virtual` registry entries: they're
|
|
24
|
+
* EVM-shaped (`vmType === 'evm'`, so `isNonEvmChainId(1337001) === false`) and
|
|
25
|
+
* carry `hypercore:` caip2s, but have no RPC / contracts / gas token of their
|
|
26
|
+
* own and settle on HyperEVM (999). HyperCore-specific behavior lives behind
|
|
27
27
|
* `isHyperCoreChainId` / `resolveSettlementChainId` in `./hypercore.ts`.
|
|
28
28
|
*/
|
|
29
29
|
const chains_json_1 = __importDefault(require("../configs/chains.json"));
|
|
30
|
+
const hypercore_1 = require("./hypercore");
|
|
30
31
|
const chainRegistry = chains_json_1.default;
|
|
32
|
+
/**
|
|
33
|
+
* Ids that are refused in BOTH directions without being registry entries.
|
|
34
|
+
*
|
|
35
|
+
* Absence normally means "unknown chain", which both helpers answer `true` for —
|
|
36
|
+
* the registry is not the id allowlist, and callers reject unknown ids by their
|
|
37
|
+
* own means. A RETIRED id is not unknown: 1337 was `hypercore:mainnet`, whose
|
|
38
|
+
* whole point was `destination: false`, because it names the Core L1 without
|
|
39
|
+
* naming the account a delivery would credit and defaulted to perp margin
|
|
40
|
+
* (RHI-5510) — funds that cannot be recovered. Dropping the entry would have
|
|
41
|
+
* flipped that `false` to the unknown-id `true` and re-opened it.
|
|
42
|
+
*
|
|
43
|
+
* So the refusal outlives the entry. Registry-resident ids still answer from
|
|
44
|
+
* their own `roles`; this list only covers ids deliberately taken out.
|
|
45
|
+
*/
|
|
46
|
+
const RETIRED_CHAIN_IDS = new Set([
|
|
47
|
+
hypercore_1.HYPERCORE_ORIGIN_CHAIN_ID,
|
|
48
|
+
]);
|
|
31
49
|
/** VM kind for a chain id; defaults to `'evm'` for unknown ids. */
|
|
32
50
|
function getVmType(chainId) {
|
|
33
51
|
return chainRegistry[String(chainId)]?.vmType ?? "evm";
|
|
@@ -37,21 +55,26 @@ function getVmType(chainId) {
|
|
|
37
55
|
*
|
|
38
56
|
* Absent `roles` means both directions, so every ordinary chain answers true
|
|
39
57
|
* without declaring anything. A consumer may narrow this further; it may not
|
|
40
|
-
* widen it.
|
|
58
|
+
* widen it. Retired ids are the exception and answer false — see
|
|
59
|
+
* `RETIRED_CHAIN_IDS`.
|
|
41
60
|
*/
|
|
42
61
|
function canBeOrigin(chainId) {
|
|
62
|
+
if (RETIRED_CHAIN_IDS.has(chainId))
|
|
63
|
+
return false;
|
|
43
64
|
return chainRegistry[String(chainId)]?.roles?.origin ?? true;
|
|
44
65
|
}
|
|
45
66
|
/**
|
|
46
67
|
* Whether funds can be DELIVERED to this chain — i.e. it is a valid intent
|
|
47
68
|
* destination.
|
|
48
69
|
*
|
|
49
|
-
* False for
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
70
|
+
* False for `hypercore:mainnet`, which names the Core L1 without naming the
|
|
71
|
+
* account a delivery would credit, so `hypercore:spot` / `hypercore:perp` are
|
|
72
|
+
* the only HyperCore destinations. That answer used to come from the entry's
|
|
73
|
+
* `roles`; the entry is gone and the answer is unchanged.
|
|
53
74
|
*/
|
|
54
75
|
function canBeDestination(chainId) {
|
|
76
|
+
if (RETIRED_CHAIN_IDS.has(chainId))
|
|
77
|
+
return false;
|
|
55
78
|
return chainRegistry[String(chainId)]?.roles?.destination ?? true;
|
|
56
79
|
}
|
|
57
80
|
/** True when the chain id's vmType is not `'evm'` (Solana, Tron today). */
|
package/dist/src/chains.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChainNetwork, ChainStack, PegGroup, ProviderName, SettlementConfig, SettlementLayer, SupportedChain, SwapQuoter, SwapQuoterConfig, VmType } from "./types";
|
|
1
|
+
import type { ChainNetwork, ChainStack, PegGroup, ProviderIds, ProviderName, SettlementConfig, SettlementLayer, SupportedChain, SwapQuoter, SwapQuoterConfig, VmType } from "./types";
|
|
2
2
|
interface Token {
|
|
3
3
|
/** EVM: 0x-prefixed hex. SVM: base58 SPL mint. TVM: base58 (T-prefixed). */
|
|
4
4
|
address: string;
|
|
@@ -67,6 +67,13 @@ interface Chain {
|
|
|
67
67
|
* name, CCTP domain, NEAR prefix, OFT adapter). Third-party addresses —
|
|
68
68
|
* never the contracts block, which is read as Rhinestone-deployed. */
|
|
69
69
|
settlementConfig?: SettlementConfig;
|
|
70
|
+
/** What the deposit-ingestion vendors call this chain. `null` means the
|
|
71
|
+
* vendor was checked and does not serve it; both null means the chain
|
|
72
|
+
* cannot take deposits. */
|
|
73
|
+
providerIds: ProviderIds;
|
|
74
|
+
/** Whether we open smart sessions here — a declared policy, not a
|
|
75
|
+
* statement about what is deployed. */
|
|
76
|
+
sessionCapable: boolean;
|
|
70
77
|
providers: ProviderName[];
|
|
71
78
|
swapQuoters: SwapQuoter[];
|
|
72
79
|
swapQuoterConfig?: Partial<Record<SwapQuoter, SwapQuoterConfig>>;
|
package/dist/src/chains.js
CHANGED
|
@@ -17,7 +17,12 @@ const chains = {
|
|
|
17
17
|
"symbol": "ETH"
|
|
18
18
|
},
|
|
19
19
|
"network": "mainnet",
|
|
20
|
+
"providerIds": {
|
|
21
|
+
"alchemy": "ETH_MAINNET",
|
|
22
|
+
"zerion": "ethereum"
|
|
23
|
+
},
|
|
20
24
|
"publicRpcUrl": "https://eth.merkle.io",
|
|
25
|
+
"sessionCapable": true,
|
|
21
26
|
"settlementConfig": {
|
|
22
27
|
"cctp": {
|
|
23
28
|
"domain": 0
|
|
@@ -134,7 +139,12 @@ const chains = {
|
|
|
134
139
|
"symbol": "ETH"
|
|
135
140
|
},
|
|
136
141
|
"network": "mainnet",
|
|
142
|
+
"providerIds": {
|
|
143
|
+
"alchemy": "OPT_MAINNET",
|
|
144
|
+
"zerion": "optimism"
|
|
145
|
+
},
|
|
137
146
|
"publicRpcUrl": "https://mainnet.optimism.io",
|
|
147
|
+
"sessionCapable": true,
|
|
138
148
|
"settlementConfig": {
|
|
139
149
|
"cctp": {
|
|
140
150
|
"domain": 2
|
|
@@ -266,7 +276,12 @@ const chains = {
|
|
|
266
276
|
"symbol": "BNB"
|
|
267
277
|
},
|
|
268
278
|
"network": "mainnet",
|
|
279
|
+
"providerIds": {
|
|
280
|
+
"alchemy": "BNB_MAINNET",
|
|
281
|
+
"zerion": "binance-smart-chain"
|
|
282
|
+
},
|
|
269
283
|
"publicRpcUrl": "https://56.rpc.thirdweb.com",
|
|
284
|
+
"sessionCapable": true,
|
|
270
285
|
"settlementConfig": {
|
|
271
286
|
"cctp": {
|
|
272
287
|
"domain": 17
|
|
@@ -363,7 +378,12 @@ const chains = {
|
|
|
363
378
|
"symbol": "XDAI"
|
|
364
379
|
},
|
|
365
380
|
"network": "mainnet",
|
|
381
|
+
"providerIds": {
|
|
382
|
+
"alchemy": "GNOSIS_MAINNET",
|
|
383
|
+
"zerion": "xdai"
|
|
384
|
+
},
|
|
366
385
|
"publicRpcUrl": "https://rpc.gnosischain.com",
|
|
386
|
+
"sessionCapable": true,
|
|
367
387
|
"settlementConfig": {
|
|
368
388
|
"near": {
|
|
369
389
|
"prefix": "gnosis"
|
|
@@ -423,7 +443,12 @@ const chains = {
|
|
|
423
443
|
"symbol": "ETH"
|
|
424
444
|
},
|
|
425
445
|
"network": "mainnet",
|
|
446
|
+
"providerIds": {
|
|
447
|
+
"alchemy": "UNICHAIN_MAINNET",
|
|
448
|
+
"zerion": "unichain"
|
|
449
|
+
},
|
|
426
450
|
"publicRpcUrl": "https://mainnet.unichain.org",
|
|
451
|
+
"sessionCapable": true,
|
|
427
452
|
"settlementConfig": {
|
|
428
453
|
"cctp": {
|
|
429
454
|
"domain": 10
|
|
@@ -528,7 +553,12 @@ const chains = {
|
|
|
528
553
|
"symbol": "POL"
|
|
529
554
|
},
|
|
530
555
|
"network": "mainnet",
|
|
556
|
+
"providerIds": {
|
|
557
|
+
"alchemy": "MATIC_MAINNET",
|
|
558
|
+
"zerion": "polygon"
|
|
559
|
+
},
|
|
531
560
|
"publicRpcUrl": "https://polygon.drpc.org",
|
|
561
|
+
"sessionCapable": true,
|
|
532
562
|
"settlementConfig": {
|
|
533
563
|
"cctp": {
|
|
534
564
|
"domain": 7
|
|
@@ -635,7 +665,12 @@ const chains = {
|
|
|
635
665
|
"symbol": "MON"
|
|
636
666
|
},
|
|
637
667
|
"network": "mainnet",
|
|
668
|
+
"providerIds": {
|
|
669
|
+
"alchemy": "MONAD_MAINNET",
|
|
670
|
+
"zerion": "monad"
|
|
671
|
+
},
|
|
638
672
|
"publicRpcUrl": "https://rpc.monad.xyz",
|
|
673
|
+
"sessionCapable": true,
|
|
639
674
|
"settlementConfig": {
|
|
640
675
|
"cctp": {
|
|
641
676
|
"domain": 15
|
|
@@ -721,7 +756,12 @@ const chains = {
|
|
|
721
756
|
"symbol": "S"
|
|
722
757
|
},
|
|
723
758
|
"network": "mainnet",
|
|
759
|
+
"providerIds": {
|
|
760
|
+
"alchemy": "SONIC_MAINNET",
|
|
761
|
+
"zerion": "sonic"
|
|
762
|
+
},
|
|
724
763
|
"publicRpcUrl": "https://rpc.soniclabs.com",
|
|
764
|
+
"sessionCapable": true,
|
|
725
765
|
"settlementConfig": {
|
|
726
766
|
"cctp": {
|
|
727
767
|
"domain": 13
|
|
@@ -778,7 +818,12 @@ const chains = {
|
|
|
778
818
|
"symbol": "HYPE"
|
|
779
819
|
},
|
|
780
820
|
"network": "mainnet",
|
|
821
|
+
"providerIds": {
|
|
822
|
+
"alchemy": "HYPERLIQUID_MAINNET",
|
|
823
|
+
"zerion": "hyperevm"
|
|
824
|
+
},
|
|
781
825
|
"publicRpcUrl": "https://rpc.hyperliquid.xyz/evm",
|
|
826
|
+
"sessionCapable": true,
|
|
782
827
|
"settlementConfig": {
|
|
783
828
|
"cctp": {
|
|
784
829
|
"domain": 19
|
|
@@ -839,47 +884,6 @@ const chains = {
|
|
|
839
884
|
"DRPC"
|
|
840
885
|
]
|
|
841
886
|
},
|
|
842
|
-
"1337": {
|
|
843
|
-
"caip2": "hypercore:mainnet",
|
|
844
|
-
"explorer": {
|
|
845
|
-
"addressPath": "/explorer/address/",
|
|
846
|
-
"txPath": "/explorer/tx/",
|
|
847
|
-
"url": "https://app.hyperliquid.xyz"
|
|
848
|
-
},
|
|
849
|
-
"iconSlug": "hyperevm",
|
|
850
|
-
"name": "HyperCore",
|
|
851
|
-
"nativeToken": {
|
|
852
|
-
"address": "0x0000000000000000000000000000000000000000",
|
|
853
|
-
"decimals": 18,
|
|
854
|
-
"symbol": "HYPE"
|
|
855
|
-
},
|
|
856
|
-
"network": "mainnet",
|
|
857
|
-
"roles": {
|
|
858
|
-
"destination": false,
|
|
859
|
-
"origin": true
|
|
860
|
-
},
|
|
861
|
-
"settlementLayers": [],
|
|
862
|
-
"stack": "vanilla",
|
|
863
|
-
"swapQuoters": [],
|
|
864
|
-
"tokens": [
|
|
865
|
-
{
|
|
866
|
-
"address": "0xb88339CB7199b77E23DB6E890353E22632Ba630f",
|
|
867
|
-
"approvalSlot": null,
|
|
868
|
-
"balanceSlot": null,
|
|
869
|
-
"decimals": 6,
|
|
870
|
-
"pegGroup": "USD",
|
|
871
|
-
"symbol": "USDC"
|
|
872
|
-
}
|
|
873
|
-
],
|
|
874
|
-
"virtual": true,
|
|
875
|
-
"vmType": "evm",
|
|
876
|
-
"wrappedNativeToken": {
|
|
877
|
-
"address": "0x0000000000000000000000000000000000000000",
|
|
878
|
-
"decimals": 18,
|
|
879
|
-
"symbol": "HYPE"
|
|
880
|
-
},
|
|
881
|
-
"providers": []
|
|
882
|
-
},
|
|
883
887
|
"1868": {
|
|
884
888
|
"caip2": "eip155:1868",
|
|
885
889
|
"explorer": {
|
|
@@ -895,7 +899,12 @@ const chains = {
|
|
|
895
899
|
"symbol": "ETH"
|
|
896
900
|
},
|
|
897
901
|
"network": "mainnet",
|
|
902
|
+
"providerIds": {
|
|
903
|
+
"alchemy": "SONEIUM_MAINNET",
|
|
904
|
+
"zerion": "soneium"
|
|
905
|
+
},
|
|
898
906
|
"publicRpcUrl": "https://rpc.soneium.org",
|
|
907
|
+
"sessionCapable": true,
|
|
899
908
|
"settlementLayers": [
|
|
900
909
|
"ACROSS",
|
|
901
910
|
"RELAY"
|
|
@@ -975,7 +984,12 @@ const chains = {
|
|
|
975
984
|
"symbol": "ETH"
|
|
976
985
|
},
|
|
977
986
|
"network": "mainnet",
|
|
987
|
+
"providerIds": {
|
|
988
|
+
"alchemy": "ROBINHOOD_MAINNET",
|
|
989
|
+
"zerion": "robinhood"
|
|
990
|
+
},
|
|
978
991
|
"publicRpcUrl": "https://rpc.mainnet.chain.robinhood.com",
|
|
992
|
+
"sessionCapable": true,
|
|
979
993
|
"settlementLayers": [
|
|
980
994
|
"ACROSS",
|
|
981
995
|
"RELAY"
|
|
@@ -1044,7 +1058,12 @@ const chains = {
|
|
|
1044
1058
|
"symbol": "ETH"
|
|
1045
1059
|
},
|
|
1046
1060
|
"network": "mainnet",
|
|
1061
|
+
"providerIds": {
|
|
1062
|
+
"alchemy": "BASE_MAINNET",
|
|
1063
|
+
"zerion": "base"
|
|
1064
|
+
},
|
|
1047
1065
|
"publicRpcUrl": "https://mainnet.base.org",
|
|
1066
|
+
"sessionCapable": true,
|
|
1048
1067
|
"settlementConfig": {
|
|
1049
1068
|
"cctp": {
|
|
1050
1069
|
"domain": 6
|
|
@@ -1140,7 +1159,12 @@ const chains = {
|
|
|
1140
1159
|
"symbol": "XPL"
|
|
1141
1160
|
},
|
|
1142
1161
|
"network": "mainnet",
|
|
1162
|
+
"providerIds": {
|
|
1163
|
+
"alchemy": "PLASMA_MAINNET",
|
|
1164
|
+
"zerion": "plasma"
|
|
1165
|
+
},
|
|
1143
1166
|
"publicRpcUrl": "https://rpc.plasma.to",
|
|
1167
|
+
"sessionCapable": true,
|
|
1144
1168
|
"settlementConfig": {
|
|
1145
1169
|
"oft": {
|
|
1146
1170
|
"adapter": "0x02ca37966753bDdDf11216B73B16C1dE756A7CF9",
|
|
@@ -1208,7 +1232,12 @@ const chains = {
|
|
|
1208
1232
|
"symbol": "XPL"
|
|
1209
1233
|
},
|
|
1210
1234
|
"network": "testnet",
|
|
1235
|
+
"providerIds": {
|
|
1236
|
+
"alchemy": null,
|
|
1237
|
+
"zerion": null
|
|
1238
|
+
},
|
|
1211
1239
|
"publicRpcUrl": "https://testnet-rpc.plasma.to",
|
|
1240
|
+
"sessionCapable": false,
|
|
1212
1241
|
"settlementLayers": [
|
|
1213
1242
|
"ECO"
|
|
1214
1243
|
],
|
|
@@ -1266,7 +1295,12 @@ const chains = {
|
|
|
1266
1295
|
"symbol": "ETH"
|
|
1267
1296
|
},
|
|
1268
1297
|
"network": "mainnet",
|
|
1298
|
+
"providerIds": {
|
|
1299
|
+
"alchemy": "ARB_MAINNET",
|
|
1300
|
+
"zerion": "arbitrum"
|
|
1301
|
+
},
|
|
1269
1302
|
"publicRpcUrl": "https://arb1.arbitrum.io/rpc",
|
|
1303
|
+
"sessionCapable": true,
|
|
1270
1304
|
"settlementConfig": {
|
|
1271
1305
|
"cctp": {
|
|
1272
1306
|
"domain": 3
|
|
@@ -1384,7 +1418,12 @@ const chains = {
|
|
|
1384
1418
|
"symbol": "AVAX"
|
|
1385
1419
|
},
|
|
1386
1420
|
"network": "mainnet",
|
|
1421
|
+
"providerIds": {
|
|
1422
|
+
"alchemy": "AVAX_MAINNET",
|
|
1423
|
+
"zerion": "avalanche"
|
|
1424
|
+
},
|
|
1387
1425
|
"publicRpcUrl": "https://api.avax.network/ext/bc/C/rpc",
|
|
1426
|
+
"sessionCapable": true,
|
|
1388
1427
|
"settlementConfig": {
|
|
1389
1428
|
"cctp": {
|
|
1390
1429
|
"domain": 1
|
|
@@ -1493,7 +1532,12 @@ const chains = {
|
|
|
1493
1532
|
"symbol": "ETH"
|
|
1494
1533
|
},
|
|
1495
1534
|
"network": "testnet",
|
|
1535
|
+
"providerIds": {
|
|
1536
|
+
"alchemy": "BASE_SEPOLIA",
|
|
1537
|
+
"zerion": null
|
|
1538
|
+
},
|
|
1496
1539
|
"publicRpcUrl": "https://sepolia.base.org",
|
|
1540
|
+
"sessionCapable": false,
|
|
1497
1541
|
"settlementConfig": {
|
|
1498
1542
|
"cctp": {
|
|
1499
1543
|
"domain": 6
|
|
@@ -1585,7 +1629,12 @@ const chains = {
|
|
|
1585
1629
|
"symbol": "ETH"
|
|
1586
1630
|
},
|
|
1587
1631
|
"network": "testnet",
|
|
1632
|
+
"providerIds": {
|
|
1633
|
+
"alchemy": "ARB_SEPOLIA",
|
|
1634
|
+
"zerion": null
|
|
1635
|
+
},
|
|
1588
1636
|
"publicRpcUrl": "https://sepolia-rollup.arbitrum.io/rpc",
|
|
1637
|
+
"sessionCapable": false,
|
|
1589
1638
|
"settlementConfig": {
|
|
1590
1639
|
"cctp": {
|
|
1591
1640
|
"domain": 3
|
|
@@ -1663,7 +1712,12 @@ const chains = {
|
|
|
1663
1712
|
"symbol": "ETH"
|
|
1664
1713
|
},
|
|
1665
1714
|
"network": "mainnet",
|
|
1715
|
+
"providerIds": {
|
|
1716
|
+
"alchemy": null,
|
|
1717
|
+
"zerion": "katana"
|
|
1718
|
+
},
|
|
1666
1719
|
"publicRpcUrl": "https://rpc.katana.network",
|
|
1720
|
+
"sessionCapable": true,
|
|
1667
1721
|
"settlementConfig": {
|
|
1668
1722
|
"rhino": {
|
|
1669
1723
|
"bridgeContract": "0x04317f0e4795b1e1bab333234153fa10aaac79e9",
|
|
@@ -1739,10 +1793,15 @@ const chains = {
|
|
|
1739
1793
|
"symbol": "HYPE"
|
|
1740
1794
|
},
|
|
1741
1795
|
"network": "mainnet",
|
|
1796
|
+
"providerIds": {
|
|
1797
|
+
"alchemy": null,
|
|
1798
|
+
"zerion": null
|
|
1799
|
+
},
|
|
1742
1800
|
"roles": {
|
|
1743
1801
|
"destination": true,
|
|
1744
1802
|
"origin": true
|
|
1745
1803
|
},
|
|
1804
|
+
"sessionCapable": false,
|
|
1746
1805
|
"settlementLayers": [],
|
|
1747
1806
|
"stack": "vanilla",
|
|
1748
1807
|
"swapQuoters": [],
|
|
@@ -1780,10 +1839,15 @@ const chains = {
|
|
|
1780
1839
|
"symbol": "HYPE"
|
|
1781
1840
|
},
|
|
1782
1841
|
"network": "mainnet",
|
|
1842
|
+
"providerIds": {
|
|
1843
|
+
"alchemy": null,
|
|
1844
|
+
"zerion": null
|
|
1845
|
+
},
|
|
1783
1846
|
"roles": {
|
|
1784
1847
|
"destination": true,
|
|
1785
1848
|
"origin": false
|
|
1786
1849
|
},
|
|
1850
|
+
"sessionCapable": false,
|
|
1787
1851
|
"settlementLayers": [],
|
|
1788
1852
|
"stack": "vanilla",
|
|
1789
1853
|
"swapQuoters": [],
|
|
@@ -1821,7 +1885,12 @@ const chains = {
|
|
|
1821
1885
|
"symbol": "ETH"
|
|
1822
1886
|
},
|
|
1823
1887
|
"network": "testnet",
|
|
1888
|
+
"providerIds": {
|
|
1889
|
+
"alchemy": "ETH_SEPOLIA",
|
|
1890
|
+
"zerion": null
|
|
1891
|
+
},
|
|
1824
1892
|
"publicRpcUrl": "https://11155111.rpc.thirdweb.com",
|
|
1893
|
+
"sessionCapable": false,
|
|
1825
1894
|
"settlementConfig": {
|
|
1826
1895
|
"cctp": {
|
|
1827
1896
|
"domain": 0
|
|
@@ -1909,7 +1978,12 @@ const chains = {
|
|
|
1909
1978
|
"symbol": "ETH"
|
|
1910
1979
|
},
|
|
1911
1980
|
"network": "testnet",
|
|
1981
|
+
"providerIds": {
|
|
1982
|
+
"alchemy": "OPT_SEPOLIA",
|
|
1983
|
+
"zerion": null
|
|
1984
|
+
},
|
|
1912
1985
|
"publicRpcUrl": "https://sepolia.optimism.io",
|
|
1986
|
+
"sessionCapable": false,
|
|
1913
1987
|
"settlementConfig": {
|
|
1914
1988
|
"cctp": {
|
|
1915
1989
|
"domain": 2
|
|
@@ -1987,6 +2061,11 @@ const chains = {
|
|
|
1987
2061
|
"symbol": "TRX"
|
|
1988
2062
|
},
|
|
1989
2063
|
"network": "mainnet",
|
|
2064
|
+
"providerIds": {
|
|
2065
|
+
"alchemy": null,
|
|
2066
|
+
"zerion": null
|
|
2067
|
+
},
|
|
2068
|
+
"sessionCapable": false,
|
|
1990
2069
|
"settlementConfig": {
|
|
1991
2070
|
"near": {
|
|
1992
2071
|
"prefix": "tron"
|
|
@@ -2056,6 +2135,11 @@ const chains = {
|
|
|
2056
2135
|
"symbol": "SOL"
|
|
2057
2136
|
},
|
|
2058
2137
|
"network": "mainnet",
|
|
2138
|
+
"providerIds": {
|
|
2139
|
+
"alchemy": null,
|
|
2140
|
+
"zerion": null
|
|
2141
|
+
},
|
|
2142
|
+
"sessionCapable": false,
|
|
2059
2143
|
"settlementConfig": {
|
|
2060
2144
|
"cctp": {
|
|
2061
2145
|
"domain": 5
|
|
@@ -22,7 +22,6 @@ var MainnetNetwork;
|
|
|
22
22
|
MainnetNetwork[MainnetNetwork["GNOSIS"] = chains_1.gnosis.id] = "GNOSIS";
|
|
23
23
|
MainnetNetwork[MainnetNetwork["BSC"] = chains_1.bsc.id] = "BSC";
|
|
24
24
|
MainnetNetwork[MainnetNetwork["HYPEREVM"] = chains_1.hyperEvm.id] = "HYPEREVM";
|
|
25
|
-
MainnetNetwork[MainnetNetwork["HYPERCORE"] = 1337] = "HYPERCORE";
|
|
26
25
|
MainnetNetwork[MainnetNetwork["HYPERCORE_SPOT"] = 1337001] = "HYPERCORE_SPOT";
|
|
27
26
|
MainnetNetwork[MainnetNetwork["HYPERCORE_PERP"] = 1337002] = "HYPERCORE_PERP";
|
|
28
27
|
MainnetNetwork[MainnetNetwork["MONAD"] = chains_1.monad.id] = "MONAD";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const PACKAGE_VERSION = "
|
|
1
|
+
declare const PACKAGE_VERSION = "2.0.1";
|
|
2
2
|
export { PACKAGE_VERSION };
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PACKAGE_VERSION = void 0;
|
|
4
4
|
// Auto-generated by scripts/generate.ts. Do not edit manually.
|
|
5
|
-
const PACKAGE_VERSION = "
|
|
5
|
+
const PACKAGE_VERSION = "2.0.1";
|
|
6
6
|
exports.PACKAGE_VERSION = PACKAGE_VERSION;
|
package/dist/src/hypercore.d.ts
CHANGED
|
@@ -18,16 +18,17 @@ import { MainnetNetwork } from "./generated/networks";
|
|
|
18
18
|
export declare const HYPERCORE_SPOT_CHAIN_ID = MainnetNetwork.HYPERCORE_SPOT;
|
|
19
19
|
export declare const HYPERCORE_PERP_CHAIN_ID = MainnetNetwork.HYPERCORE_PERP;
|
|
20
20
|
/**
|
|
21
|
-
* The Core L1
|
|
21
|
+
* The retired Core L1 id (`hypercore:mainnet`). NOT a registry entry — RHI-5606
|
|
22
|
+
* removed it, and `HYPERCORE_SPOT_CHAIN_ID` now carries both directions.
|
|
22
23
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* Kept as a literal so callers still sending it can be REJECTED with a message
|
|
25
|
+
* naming the venue to use instead. Without it the id falls through to a generic
|
|
26
|
+
* unknown-chain error, which tells someone integrating against the old spelling
|
|
27
|
+
* nothing about what replaced it.
|
|
27
28
|
*
|
|
28
|
-
* It is deliberately
|
|
29
|
-
*
|
|
30
|
-
*
|
|
29
|
+
* It is deliberately not aliased to either venue: it defaulted to perp, so
|
|
30
|
+
* pointing it at spot would silently move funds and pointing it at perp would
|
|
31
|
+
* silently keep the bug.
|
|
31
32
|
*/
|
|
32
33
|
export declare const HYPERCORE_ORIGIN_CHAIN_ID = 1337;
|
|
33
34
|
/**
|
package/dist/src/hypercore.js
CHANGED
|
@@ -25,9 +25,10 @@ const networks_1 = require("./generated/networks");
|
|
|
25
25
|
// hyperliquid-dev/hyper-evm-lib.
|
|
26
26
|
//
|
|
27
27
|
// HyperEVM (999) and its native USDC live in the chain registry
|
|
28
|
-
// (`MainnetNetwork.HYPEREVM` + `chainRegistry[999].tokens`). HyperCore
|
|
29
|
-
//
|
|
30
|
-
//
|
|
28
|
+
// (`MainnetNetwork.HYPEREVM` + `chainRegistry[999].tokens`). HyperCore is a pair
|
|
29
|
+
// of `virtual` registry entries, one per delivery venue
|
|
30
|
+
// (`MainnetNetwork.HYPERCORE_SPOT` / `_PERP`): EVM-addressed but with no
|
|
31
|
+
// RPC/providers/contracts/gas token of their own. The HyperCore-specific
|
|
31
32
|
// bridging behavior below stays here rather than in the generated registry.
|
|
32
33
|
// ---------------------------------------------------------------------------
|
|
33
34
|
/**
|
|
@@ -48,16 +49,17 @@ const networks_1 = require("./generated/networks");
|
|
|
48
49
|
exports.HYPERCORE_SPOT_CHAIN_ID = networks_1.MainnetNetwork.HYPERCORE_SPOT;
|
|
49
50
|
exports.HYPERCORE_PERP_CHAIN_ID = networks_1.MainnetNetwork.HYPERCORE_PERP;
|
|
50
51
|
/**
|
|
51
|
-
* The Core L1
|
|
52
|
+
* The retired Core L1 id (`hypercore:mainnet`). NOT a registry entry — RHI-5606
|
|
53
|
+
* removed it, and `HYPERCORE_SPOT_CHAIN_ID` now carries both directions.
|
|
52
54
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
55
|
+
* Kept as a literal so callers still sending it can be REJECTED with a message
|
|
56
|
+
* naming the venue to use instead. Without it the id falls through to a generic
|
|
57
|
+
* unknown-chain error, which tells someone integrating against the old spelling
|
|
58
|
+
* nothing about what replaced it.
|
|
57
59
|
*
|
|
58
|
-
* It is deliberately
|
|
59
|
-
*
|
|
60
|
-
*
|
|
60
|
+
* It is deliberately not aliased to either venue: it defaulted to perp, so
|
|
61
|
+
* pointing it at spot would silently move funds and pointing it at perp would
|
|
62
|
+
* silently keep the bug.
|
|
61
63
|
*/
|
|
62
64
|
exports.HYPERCORE_ORIGIN_CHAIN_ID = 1337;
|
|
63
65
|
/**
|
package/dist/src/types.d.ts
CHANGED
|
@@ -268,6 +268,44 @@ interface ChainEntry {
|
|
|
268
268
|
* say so). This is the outer bound: what the chain itself permits.
|
|
269
269
|
*/
|
|
270
270
|
roles?: ChainRoles;
|
|
271
|
+
/**
|
|
272
|
+
* What the deposit-ingestion vendors call this chain.
|
|
273
|
+
*
|
|
274
|
+
* These are the last identifiers that made adding a chain a code change: a
|
|
275
|
+
* chain missing from deposit-processor's Alchemy map is never considered for
|
|
276
|
+
* webhook creation, one missing from its Zerion map is never ingested, and a
|
|
277
|
+
* chain in neither publishes `deposit: false` and turns into a refund-only
|
|
278
|
+
* chain. Neither id is derivable from anything else here.
|
|
279
|
+
*
|
|
280
|
+
* On `ChainEntry` rather than under a consumer's namespace because an
|
|
281
|
+
* Alchemy network name is a fact about the chain, not about deposit-processor:
|
|
282
|
+
* the next service to adopt a vendor reads the same key instead of another
|
|
283
|
+
* service's.
|
|
284
|
+
*
|
|
285
|
+
* `null` is an answer, and a different one from absence: the vendor was
|
|
286
|
+
* checked and does not serve this chain. Both null means the chain cannot take
|
|
287
|
+
* deposits at all. Absence, by contrast, would mean an artifact published
|
|
288
|
+
* before this field existed — which is why it is required here, on the same
|
|
289
|
+
* reasoning as `network` and `stack`: the read-client refuses any artifact
|
|
290
|
+
* older than the registry bundled with the package reading it, so a package
|
|
291
|
+
* whose bundled registry carries this can only accept remote artifacts that
|
|
292
|
+
* carry it too.
|
|
293
|
+
*/
|
|
294
|
+
providerIds: ProviderIds;
|
|
295
|
+
/**
|
|
296
|
+
* Whether we open smart sessions on this chain.
|
|
297
|
+
*
|
|
298
|
+
* A declared policy, not a derived one. The underlying constraint is where the
|
|
299
|
+
* SmartSession modules are deployed — which `bootstrap_full` does everywhere,
|
|
300
|
+
* making deployment necessary but not sufficient, since we still decline to
|
|
301
|
+
* open sessions on testnets. `@rhinestone/sdk` gates nothing here: its chain
|
|
302
|
+
* catalog resolves any chain by id, so this is the only statement of the
|
|
303
|
+
* answer.
|
|
304
|
+
*
|
|
305
|
+
* A consumer rejects `setup-account` for a chain that is `false`. Required for
|
|
306
|
+
* the same reason as `providerIds`.
|
|
307
|
+
*/
|
|
308
|
+
sessionCapable: boolean;
|
|
271
309
|
nativeToken: NativeTokenEntry;
|
|
272
310
|
wrappedNativeToken: NativeTokenEntry;
|
|
273
311
|
tokens: TokenEntry[];
|
|
@@ -276,6 +314,16 @@ interface ChainEntry {
|
|
|
276
314
|
swapQuoters: SwapQuoter[];
|
|
277
315
|
swapQuoterConfig?: Partial<Record<SwapQuoter, SwapQuoterConfig>>;
|
|
278
316
|
}
|
|
317
|
+
/**
|
|
318
|
+
* Vendor-keyed, so a chain states each vendor's own name for it once. `null`
|
|
319
|
+
* means checked and unsupported — see `ChainEntry.providerIds`.
|
|
320
|
+
*/
|
|
321
|
+
interface ProviderIds {
|
|
322
|
+
/** Alchemy Notify network name, e.g. `BASE_MAINNET`. */
|
|
323
|
+
alchemy: string | null;
|
|
324
|
+
/** Zerion chain slug, e.g. `binance-smart-chain`. */
|
|
325
|
+
zerion: string | null;
|
|
326
|
+
}
|
|
279
327
|
type ContractAddresses = Record<string, Record<string, Address>>;
|
|
280
328
|
interface ChainRegistry {
|
|
281
329
|
[chainId: string]: ChainEntry;
|
|
@@ -320,4 +368,4 @@ interface ErpcConfig {
|
|
|
320
368
|
providerIdPrefix: Record<string, string>;
|
|
321
369
|
}
|
|
322
370
|
export { OPStackChains, MainnetNetwork, TestnetNetwork, mainnetChains, testnetChains, chains, PEG_GROUPS };
|
|
323
|
-
export type { CctpChainConfig, ChainItem, ChainEntry, ChainExplorer, ChainNetwork, ChainRegistry, ChainRoles, ChainStack, ChainList, ContractAddresses, NearChainConfig, OftChainConfig, ProviderRegistry, ProviderName, RhinoChainConfig, SettlementConfig, SettlementLayer, SupportedTestnet, SupportedMainnet, SupportedOPStackMainnet, SupportedOPStackTestnet, SupportedChain, SwapQuoter, SwapQuoterConfig, PegGroup, VmType, ErpcFailsafe, ErpcChainOverride, ErpcConfig, };
|
|
371
|
+
export type { CctpChainConfig, ChainItem, ChainEntry, ChainExplorer, ChainNetwork, ChainRegistry, ChainRoles, ChainStack, ChainList, ContractAddresses, NearChainConfig, OftChainConfig, ProviderIds, ProviderRegistry, ProviderName, RhinoChainConfig, SettlementConfig, SettlementLayer, SupportedTestnet, SupportedMainnet, SupportedOPStackMainnet, SupportedOPStackTestnet, SupportedChain, SwapQuoter, SwapQuoterConfig, PegGroup, VmType, ErpcFailsafe, ErpcChainOverride, ErpcConfig, };
|