@forevermoney/sdk 0.5.5 → 0.5.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.6 — 2026-09-22
4
+
5
+ - Add Pareton (SN10) deployment metadata on Base, Robinhood and Subtensor.
6
+ - Support staked-only SN10 bridge plans and preparation in both directions
7
+ on both EVM spokes, enforcing netuid 10. Deployment version is 1.5.0.
8
+
3
9
  ## 0.5.5 — 2026-09-21
4
10
 
5
11
  - Discover destination off-ramps from the canonical CCIP router for the source
package/README.md CHANGED
@@ -134,6 +134,21 @@ The bridge does not deduct its fee from the destination amount. For both
134
134
  directions, the SDK encodes the bridge amount itself as the contract's minimum
135
135
  output; callers cannot weaken that invariant.
136
136
 
137
+ ## Bridge Pareton (SN10)
138
+
139
+ Use `asset: 'sn10'` with `evmChain: 'base'` or `'robinhood'` in the
140
+ bridge plan and preparation APIs. Finney input and delivery must be staked;
141
+ netuid defaults to 10 and any other netuid is rejected. Amounts use 18 decimals
142
+ and must be whole alpha RAO. Approval, quoting and tracking use the same APIs
143
+ as SN80 below.
144
+
145
+ Canonical `contracts.wrappedSn10` addresses:
146
+
147
+ - Base and Robinhood: `0xDdDE5965D49e69b6362BD8743e139a45dBFEb7b3`.
148
+ - Subtensor (964): `0xcd0836D1ecE4AEDf5B39f2792e0790BBE79449b3`.
149
+
150
+ The Subtensor ERC-20 remains named "Subnet 10"; the application displays Pareton.
151
+
137
152
  ## Bridge SN80 on Base and Robinhood
138
153
 
139
154
  Pass `asset: 'sn80'` to bridge Base or Robinhood SN80 to a Finney subnet-80
package/dist/index.cjs CHANGED
@@ -37,6 +37,7 @@ __export(index_exports, {
37
37
  RAO_PER_TAO: () => RAO_PER_TAO,
38
38
  ROBINHOOD_CCIP_SELECTOR: () => ROBINHOOD_CCIP_SELECTOR,
39
39
  ROBINHOOD_CHAIN_ID: () => ROBINHOOD_CHAIN_ID,
40
+ SN10_NETUID: () => SN10_NETUID,
40
41
  SN80_NETUID: () => SN80_NETUID,
41
42
  SUBTENSOR_CCIP_SELECTOR: () => SUBTENSOR_CCIP_SELECTOR,
42
43
  SUBTENSOR_CHAIN_ID: () => SUBTENSOR_CHAIN_ID,
@@ -94,8 +95,9 @@ var ROBINHOOD_CCIP_SELECTOR = 6180753054346818345n;
94
95
  var SUBTENSOR_CCIP_SELECTOR = 2135107236357186872n;
95
96
  var RAO_PER_TAO = 1000000000n;
96
97
  var EVM_WEI_PER_RAO = 1000000000n;
98
+ var SN10_NETUID = 10n;
97
99
  var SN80_NETUID = 80n;
98
- var FOREVERMONEY_DEPLOYMENT_VERSION = "1.4.0";
100
+ var FOREVERMONEY_DEPLOYMENT_VERSION = "1.5.0";
99
101
  var foreverMoneyDeployment = Object.freeze({
100
102
  version: FOREVERMONEY_DEPLOYMENT_VERSION,
101
103
  base: Object.freeze({
@@ -113,6 +115,9 @@ var foreverMoneyDeployment = Object.freeze({
113
115
  wrappedTao: (0, import_viem.getAddress)(
114
116
  "0xf3081494b87e8d5fb7960f066e931d1d0e6e3d67"
115
117
  ),
118
+ wrappedSn10: (0, import_viem.getAddress)(
119
+ "0xDdDE5965D49e69b6362BD8743e139a45dBFEb7b3"
120
+ ),
116
121
  wrappedSn80: (0, import_viem.getAddress)(
117
122
  "0x6f63d869011f95274498023b4abfc00b30c34378"
118
123
  ),
@@ -148,6 +153,9 @@ var foreverMoneyDeployment = Object.freeze({
148
153
  wrappedTao: (0, import_viem.getAddress)(
149
154
  "0xf3081494B87e8D5fb7960f066E931D1D0e6E3d67"
150
155
  ),
156
+ wrappedSn10: (0, import_viem.getAddress)(
157
+ "0xDdDE5965D49e69b6362BD8743e139a45dBFEb7b3"
158
+ ),
151
159
  wrappedSn80: (0, import_viem.getAddress)(
152
160
  "0x6f63d869011f95274498023b4abfc00b30c34378"
153
161
  ),
@@ -177,6 +185,9 @@ var foreverMoneyDeployment = Object.freeze({
177
185
  wrappedTao: (0, import_viem.getAddress)(
178
186
  "0xC5b6C1632d34901239396F5E1BDe54B342900256"
179
187
  ),
188
+ wrappedSn10: (0, import_viem.getAddress)(
189
+ "0xcd0836D1ecE4AEDf5B39f2792e0790BBE79449b3"
190
+ ),
180
191
  wrappedSn80: (0, import_viem.getAddress)(
181
192
  "0xfD628dE75EF96f0A5C59659159C6cA81E0DC2222"
182
193
  ),
@@ -812,18 +823,19 @@ function assertPartnerFeeAllowed(fee, maxBps) {
812
823
  }
813
824
  }
814
825
  function bridgeAsset(evmChain, asset = "tao") {
815
- if (asset !== "tao" && asset !== "sn80") {
826
+ if (asset !== "tao" && asset !== "sn80" && asset !== "sn10") {
816
827
  throw new ForeverMoneyError(
817
828
  "INVALID_TRANSACTION_PLAN",
818
- 'Asset must be "tao" or "sn80".'
829
+ 'Asset must be "tao", "sn80", or "sn10".'
819
830
  );
820
831
  }
821
832
  const evm = getForeverMoneyEvmDeployment(evmChain);
822
- return asset === "sn80" ? {
823
- evmToken: evm.contracts.wrappedSn80,
824
- subtensorToken: foreverMoneyDeployment.subtensor.contracts.wrappedSn80,
825
- label: "SN80",
826
- wrappedLabel: "SN80"
833
+ const tokenKey = asset === "sn10" ? "wrappedSn10" : "wrappedSn80";
834
+ return asset !== "tao" ? {
835
+ evmToken: evm.contracts[tokenKey],
836
+ subtensorToken: foreverMoneyDeployment.subtensor.contracts[tokenKey],
837
+ label: asset.toUpperCase(),
838
+ wrappedLabel: asset.toUpperCase()
827
839
  } : {
828
840
  evmToken: evm.contracts.wrappedTao,
829
841
  subtensorToken: foreverMoneyDeployment.subtensor.contracts.wrappedTao,
@@ -832,16 +844,17 @@ function bridgeAsset(evmChain, asset = "tao") {
832
844
  };
833
845
  }
834
846
  function assertAssetMode(asset, mode) {
835
- if (asset === "sn80" && mode !== "staked") {
847
+ if ((asset === "sn80" || asset === "sn10") && mode !== "staked") {
836
848
  throw new ForeverMoneyError(
837
849
  "INVALID_TRANSACTION_PLAN",
838
- "SN80 bridging requires staked subnet 80 input or delivery; liquid TAO conversion is not supported."
850
+ `${asset.toUpperCase()} bridging requires staked subnet ${asset === "sn10" ? SN10_NETUID : SN80_NETUID} input or delivery; liquid TAO conversion is not supported.`
839
851
  );
840
852
  }
841
853
  }
842
854
  function sourceNetuid(input) {
843
855
  if (input.source !== "staked") return void 0;
844
- const netuid = input.netuid ?? (input.asset === "sn80" ? SN80_NETUID : void 0);
856
+ const assetNetuid = input.asset === "sn10" ? SN10_NETUID : input.asset === "sn80" ? SN80_NETUID : void 0;
857
+ const netuid = input.netuid ?? assetNetuid;
845
858
  if (netuid === void 0) {
846
859
  throw new ForeverMoneyError(
847
860
  "INVALID_TRANSACTION_PLAN",
@@ -849,10 +862,10 @@ function sourceNetuid(input) {
849
862
  );
850
863
  }
851
864
  assertNonNegativeAmount(netuid, "netuid");
852
- if (input.asset === "sn80" && netuid !== SN80_NETUID) {
865
+ if (assetNetuid !== void 0 && netuid !== assetNetuid) {
853
866
  throw new ForeverMoneyError(
854
867
  "INVALID_TRANSACTION_PLAN",
855
- "SN80 staking approvals must use netuid 80."
868
+ `${input.asset.toUpperCase()} staking approvals must use netuid ${assetNetuid}.`
856
869
  );
857
870
  }
858
871
  return netuid;