@rhinestone/shared-configs 1.18.0 → 1.19.0
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 +1 -1
- package/dist/src/__tests__/chainVirtualization.test.js +20 -10
- package/dist/src/chainVirtualization.d.ts +2 -2
- package/dist/src/chainVirtualization.js +2 -2
- package/dist/src/chains.js +1 -1
- package/dist/src/generated/packageVersion.d.ts +1 -1
- package/dist/src/generated/packageVersion.js +1 -1
- package/dist/src/hypercore.d.ts +4 -3
- package/dist/src/hypercore.js +4 -3
- package/package.json +1 -1
package/dist/configs/chains.json
CHANGED
|
@@ -65,18 +65,28 @@ const TRON_CAIP2 = "tron:mainnet";
|
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
(0, bun_test_1.describe)("chain roles", () => {
|
|
68
|
-
(0, bun_test_1.it)("splits HyperCore by direction:
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
//
|
|
72
|
-
//
|
|
73
|
-
//
|
|
68
|
+
(0, bun_test_1.it)("splits HyperCore by direction: spot both ways, perp delivery-only", () => {
|
|
69
|
+
// Declaring it here is what makes a perp *deposit source* unrepresentable
|
|
70
|
+
// rather than merely unimplemented, and all three ids share the
|
|
71
|
+
// `hypercore:` namespace — so a namespace switch could not draw this line
|
|
72
|
+
// at any level of effort.
|
|
73
|
+
//
|
|
74
|
+
// Spot originates because a HyperCore deposit already IS a spot credit:
|
|
75
|
+
// ingestion admits only an absent `destinationDex` or an explicit
|
|
76
|
+
// `"spot"`. Perp stays delivery-only — a managed account cannot sign
|
|
77
|
+
// perp→spot, so a perp deposit would strand.
|
|
78
|
+
(0, bun_test_1.expect)((0, index_1.canBeOrigin)(index_1.HYPERCORE_SPOT_CHAIN_ID)).toBe(true);
|
|
79
|
+
(0, bun_test_1.expect)((0, index_1.canBeDestination)(index_1.HYPERCORE_SPOT_CHAIN_ID)).toBe(true);
|
|
80
|
+
(0, bun_test_1.expect)((0, index_1.canBeOrigin)(index_1.HYPERCORE_PERP_CHAIN_ID)).toBe(false);
|
|
81
|
+
(0, bun_test_1.expect)((0, index_1.canBeDestination)(index_1.HYPERCORE_PERP_CHAIN_ID)).toBe(true);
|
|
82
|
+
});
|
|
83
|
+
(0, bun_test_1.it)("keeps the retiring hypercore:mainnet readable as an origin", () => {
|
|
84
|
+
// Stored `deposits.chain` rows and account rules still carry the spelling
|
|
85
|
+
// (RHI-5606). Until they are all migrated and the entry dropped, a
|
|
86
|
+
// consumer resolving one must still get an origin, or those deposits are
|
|
87
|
+
// rejected as unmapped rather than degrading quietly.
|
|
74
88
|
(0, bun_test_1.expect)((0, index_1.canBeOrigin)(1337)).toBe(true);
|
|
75
89
|
(0, bun_test_1.expect)((0, index_1.canBeDestination)(1337)).toBe(false);
|
|
76
|
-
for (const venue of [index_1.HYPERCORE_SPOT_CHAIN_ID, index_1.HYPERCORE_PERP_CHAIN_ID]) {
|
|
77
|
-
(0, bun_test_1.expect)((0, index_1.canBeOrigin)(venue)).toBe(false);
|
|
78
|
-
(0, bun_test_1.expect)((0, index_1.canBeDestination)(venue)).toBe(true);
|
|
79
|
-
}
|
|
80
90
|
});
|
|
81
91
|
(0, bun_test_1.it)("defaults both directions for chains that declare no roles", () => {
|
|
82
92
|
// Absent `roles` must mean both, so adding the field is a no-op for every
|
|
@@ -13,8 +13,8 @@ export declare function canBeOrigin(chainId: number): boolean;
|
|
|
13
13
|
* Whether funds can be DELIVERED to this chain — i.e. it is a valid intent
|
|
14
14
|
* destination.
|
|
15
15
|
*
|
|
16
|
-
* False for `hypercore:mainnet
|
|
17
|
-
*
|
|
16
|
+
* False for the retiring `hypercore:mainnet`, which names the Core L1 without
|
|
17
|
+
* naming the account a delivery would credit, so `hypercore:spot` /
|
|
18
18
|
* `hypercore:perp` are the only HyperCore destinations. Answering that from data
|
|
19
19
|
* is what lets a consumer refuse the ambiguous id without knowing its number.
|
|
20
20
|
*/
|
|
@@ -46,8 +46,8 @@ function canBeOrigin(chainId) {
|
|
|
46
46
|
* Whether funds can be DELIVERED to this chain — i.e. it is a valid intent
|
|
47
47
|
* destination.
|
|
48
48
|
*
|
|
49
|
-
* False for `hypercore:mainnet
|
|
50
|
-
*
|
|
49
|
+
* False for the retiring `hypercore:mainnet`, which names the Core L1 without
|
|
50
|
+
* naming the account a delivery would credit, so `hypercore:spot` /
|
|
51
51
|
* `hypercore:perp` are the only HyperCore destinations. Answering that from data
|
|
52
52
|
* is what lets a consumer refuse the ambiguous id without knowing its number.
|
|
53
53
|
*/
|
package/dist/src/chains.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const PACKAGE_VERSION = "1.
|
|
1
|
+
declare const PACKAGE_VERSION = "1.19.0";
|
|
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 = "1.
|
|
5
|
+
const PACKAGE_VERSION = "1.19.0";
|
|
6
6
|
exports.PACKAGE_VERSION = PACKAGE_VERSION;
|
package/dist/src/hypercore.d.ts
CHANGED
|
@@ -20,9 +20,10 @@ export declare const HYPERCORE_PERP_CHAIN_ID = MainnetNetwork.HYPERCORE_PERP;
|
|
|
20
20
|
/**
|
|
21
21
|
* The Core L1 itself (`hypercore:mainnet`) — HyperCore as a deposit SOURCE.
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* `
|
|
23
|
+
* BEING RETIRED (RHI-5606). `HYPERCORE_SPOT_CHAIN_ID` now carries both
|
|
24
|
+
* directions and is the spelling to write; this one stays a live registry entry
|
|
25
|
+
* only while stored `deposits.chain` rows and account rules still name it, so
|
|
26
|
+
* that resolving one still yields an origin. Read it, never write it.
|
|
26
27
|
*
|
|
27
28
|
* It is deliberately NOT aliased to either venue for delivery: it defaulted to
|
|
28
29
|
* perp, so pointing it at spot would silently move funds and pointing it at perp
|
package/dist/src/hypercore.js
CHANGED
|
@@ -50,9 +50,10 @@ exports.HYPERCORE_PERP_CHAIN_ID = networks_1.MainnetNetwork.HYPERCORE_PERP;
|
|
|
50
50
|
/**
|
|
51
51
|
* The Core L1 itself (`hypercore:mainnet`) — HyperCore as a deposit SOURCE.
|
|
52
52
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* `
|
|
53
|
+
* BEING RETIRED (RHI-5606). `HYPERCORE_SPOT_CHAIN_ID` now carries both
|
|
54
|
+
* directions and is the spelling to write; this one stays a live registry entry
|
|
55
|
+
* only while stored `deposits.chain` rows and account rules still name it, so
|
|
56
|
+
* that resolving one still yields an origin. Read it, never write it.
|
|
56
57
|
*
|
|
57
58
|
* It is deliberately NOT aliased to either venue for delivery: it defaulted to
|
|
58
59
|
* perp, so pointing it at spot would silently move funds and pointing it at perp
|