@forevermoney/sdk 0.5.7 → 0.5.8

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,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.8
4
+
5
+ - Restrict SN78 to Base; expose a null Robinhood token and reject unsupported bridge plans in both directions. Base and Subtensor SN78 addresses and other assets remain unchanged.
6
+ - Deployment metadata version 1.6.1.
7
+
3
8
  ## 0.5.7
4
9
 
5
10
  - Add Umi SN78 on Base, Robinhood and Subtensor, with staked-only subnet 78 approvals and bridge plans.
package/README.md CHANGED
@@ -136,7 +136,7 @@ output; callers cannot weaken that invariant.
136
136
 
137
137
  ## Bridge Umi (SN78)
138
138
 
139
- Use `asset: 'sn78'` with `evmChain: 'base'` or `'robinhood'`.
139
+ Use `asset: 'sn78'` with `evmChain: 'base'`. SN78 is Base-only; Robinhood routes are rejected.
140
140
  SN78 supports staked subnet 78 input and delivery only; liquid conversion is
141
141
  rejected. The SDK supplies netuid 78 and rejects a conflicting netuid.
142
142
 
package/dist/index.cjs CHANGED
@@ -99,7 +99,7 @@ var EVM_WEI_PER_RAO = 1000000000n;
99
99
  var SN78_NETUID = 78n;
100
100
  var SN10_NETUID = 10n;
101
101
  var SN80_NETUID = 80n;
102
- var FOREVERMONEY_DEPLOYMENT_VERSION = "1.6.0";
102
+ var FOREVERMONEY_DEPLOYMENT_VERSION = "1.6.1";
103
103
  var foreverMoneyDeployment = Object.freeze({
104
104
  version: FOREVERMONEY_DEPLOYMENT_VERSION,
105
105
  base: Object.freeze({
@@ -158,9 +158,8 @@ var foreverMoneyDeployment = Object.freeze({
158
158
  wrappedTao: (0, import_viem.getAddress)(
159
159
  "0xf3081494B87e8D5fb7960f066E931D1D0e6E3d67"
160
160
  ),
161
- wrappedSn78: (0, import_viem.getAddress)(
162
- "0x6e2feEE56bc5F0Db2104Ab1dac2cf1Fb0334eb49"
163
- ),
161
+ // SN78 is released on Base only.
162
+ wrappedSn78: null,
164
163
  wrappedSn10: (0, import_viem.getAddress)(
165
164
  "0xDdDE5965D49e69b6362BD8743e139a45dBFEb7b3"
166
165
  ),
@@ -842,8 +841,15 @@ function bridgeAsset(evmChain, asset = "tao") {
842
841
  }
843
842
  const evm = getForeverMoneyEvmDeployment(evmChain);
844
843
  const tokenKey = asset === "sn78" ? "wrappedSn78" : asset === "sn10" ? "wrappedSn10" : "wrappedSn80";
844
+ const evmToken = asset === "tao" ? evm.contracts.wrappedTao : evm.contracts[tokenKey];
845
+ if (!evmToken) {
846
+ throw new ForeverMoneyError(
847
+ "INVALID_TRANSACTION_PLAN",
848
+ `${asset.toUpperCase()} bridging is not supported on ${evmChain}.`
849
+ );
850
+ }
845
851
  return asset !== "tao" ? {
846
- evmToken: evm.contracts[tokenKey],
852
+ evmToken,
847
853
  subtensorToken: foreverMoneyDeployment.subtensor.contracts[tokenKey],
848
854
  label: asset.toUpperCase(),
849
855
  wrappedLabel: asset.toUpperCase()