@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.
@@ -1657,7 +1657,7 @@
1657
1657
  "network": "mainnet",
1658
1658
  "roles": {
1659
1659
  "destination": true,
1660
- "origin": false
1660
+ "origin": true
1661
1661
  },
1662
1662
  "settlementLayers": [],
1663
1663
  "stack": "vanilla",
@@ -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: Core L1 originates, venues receive", () => {
69
- // Deposits arrive from the Core L1 without naming a venue; a delivery
70
- // must name the account it credits. Declaring it here is what makes a
71
- // perp *deposit source* unrepresentable rather than merely unimplemented,
72
- // and all three ids share the `hypercore:` namespace — so a namespace
73
- // switch could not draw this line at any level of effort.
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`: deposits arrive from the Core L1 venue-agnostically,
17
- * but a delivery must name the account it credits, so `hypercore:spot` /
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`: deposits arrive from the Core L1 venue-agnostically,
50
- * but a delivery must name the account it credits, so `hypercore:spot` /
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
  */
@@ -1741,7 +1741,7 @@ const chains = {
1741
1741
  "network": "mainnet",
1742
1742
  "roles": {
1743
1743
  "destination": true,
1744
- "origin": false
1744
+ "origin": true
1745
1745
  },
1746
1746
  "settlementLayers": [],
1747
1747
  "stack": "vanilla",
@@ -1,2 +1,2 @@
1
- declare const PACKAGE_VERSION = "1.18.0";
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.18.0";
5
+ const PACKAGE_VERSION = "1.19.0";
6
6
  exports.PACKAGE_VERSION = PACKAGE_VERSION;
@@ -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
- * Deposits arrive here with no venue in them, which is what `deposits.chain` and
24
- * the QuickNode webhook already mean, so this stays a live registry entry with
25
- * `roles: { origin: true, destination: false }`.
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
@@ -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
- * Deposits arrive here with no venue in them, which is what `deposits.chain` and
54
- * the QuickNode webhook already mean, so this stays a live registry entry with
55
- * `roles: { origin: true, destination: false }`.
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhinestone/shared-configs",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "description": "Reusable configuration files for Rhinestone services",
5
5
  "author": {
6
6
  "name": "Rhinestone",