@forevermoney/sdk 0.5.6 → 0.5.7

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.7
4
+
5
+ - Add Umi SN78 on Base, Robinhood and Subtensor, with staked-only subnet 78 approvals and bridge plans.
6
+ - Extend live integration coverage to SN10 and SN78.
7
+
3
8
  ## 0.5.6 — 2026-09-22
4
9
 
5
10
  - Add Pareton (SN10) deployment metadata on Base, Robinhood and Subtensor.
package/README.md CHANGED
@@ -134,6 +134,17 @@ 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 Umi (SN78)
138
+
139
+ Use `asset: 'sn78'` with `evmChain: 'base'` or `'robinhood'`.
140
+ SN78 supports staked subnet 78 input and delivery only; liquid conversion is
141
+ rejected. The SDK supplies netuid 78 and rejects a conflicting netuid.
142
+
143
+ Canonical `contracts.wrappedSn78` addresses:
144
+
145
+ - Base and Robinhood: `0x6e2feEE56bc5F0Db2104Ab1dac2cf1Fb0334eb49`
146
+ - Subtensor (964): `0xF2a747b004fACa8EAB646948117499E25CB8641d`
147
+
137
148
  ## Bridge Pareton (SN10)
138
149
 
139
150
  Use `asset: 'sn10'` with `evmChain: 'base'` or `'robinhood'` in the
package/dist/index.cjs CHANGED
@@ -38,6 +38,7 @@ __export(index_exports, {
38
38
  ROBINHOOD_CCIP_SELECTOR: () => ROBINHOOD_CCIP_SELECTOR,
39
39
  ROBINHOOD_CHAIN_ID: () => ROBINHOOD_CHAIN_ID,
40
40
  SN10_NETUID: () => SN10_NETUID,
41
+ SN78_NETUID: () => SN78_NETUID,
41
42
  SN80_NETUID: () => SN80_NETUID,
42
43
  SUBTENSOR_CCIP_SELECTOR: () => SUBTENSOR_CCIP_SELECTOR,
43
44
  SUBTENSOR_CHAIN_ID: () => SUBTENSOR_CHAIN_ID,
@@ -95,9 +96,10 @@ var ROBINHOOD_CCIP_SELECTOR = 6180753054346818345n;
95
96
  var SUBTENSOR_CCIP_SELECTOR = 2135107236357186872n;
96
97
  var RAO_PER_TAO = 1000000000n;
97
98
  var EVM_WEI_PER_RAO = 1000000000n;
99
+ var SN78_NETUID = 78n;
98
100
  var SN10_NETUID = 10n;
99
101
  var SN80_NETUID = 80n;
100
- var FOREVERMONEY_DEPLOYMENT_VERSION = "1.5.0";
102
+ var FOREVERMONEY_DEPLOYMENT_VERSION = "1.6.0";
101
103
  var foreverMoneyDeployment = Object.freeze({
102
104
  version: FOREVERMONEY_DEPLOYMENT_VERSION,
103
105
  base: Object.freeze({
@@ -115,6 +117,9 @@ var foreverMoneyDeployment = Object.freeze({
115
117
  wrappedTao: (0, import_viem.getAddress)(
116
118
  "0xf3081494b87e8d5fb7960f066e931d1d0e6e3d67"
117
119
  ),
120
+ wrappedSn78: (0, import_viem.getAddress)(
121
+ "0x6e2feEE56bc5F0Db2104Ab1dac2cf1Fb0334eb49"
122
+ ),
118
123
  wrappedSn10: (0, import_viem.getAddress)(
119
124
  "0xDdDE5965D49e69b6362BD8743e139a45dBFEb7b3"
120
125
  ),
@@ -153,6 +158,9 @@ var foreverMoneyDeployment = Object.freeze({
153
158
  wrappedTao: (0, import_viem.getAddress)(
154
159
  "0xf3081494B87e8D5fb7960f066E931D1D0e6E3d67"
155
160
  ),
161
+ wrappedSn78: (0, import_viem.getAddress)(
162
+ "0x6e2feEE56bc5F0Db2104Ab1dac2cf1Fb0334eb49"
163
+ ),
156
164
  wrappedSn10: (0, import_viem.getAddress)(
157
165
  "0xDdDE5965D49e69b6362BD8743e139a45dBFEb7b3"
158
166
  ),
@@ -185,6 +193,9 @@ var foreverMoneyDeployment = Object.freeze({
185
193
  wrappedTao: (0, import_viem.getAddress)(
186
194
  "0xC5b6C1632d34901239396F5E1BDe54B342900256"
187
195
  ),
196
+ wrappedSn78: (0, import_viem.getAddress)(
197
+ "0xF2a747b004fACa8EAB646948117499E25CB8641d"
198
+ ),
188
199
  wrappedSn10: (0, import_viem.getAddress)(
189
200
  "0xcd0836D1ecE4AEDf5B39f2792e0790BBE79449b3"
190
201
  ),
@@ -823,14 +834,14 @@ function assertPartnerFeeAllowed(fee, maxBps) {
823
834
  }
824
835
  }
825
836
  function bridgeAsset(evmChain, asset = "tao") {
826
- if (asset !== "tao" && asset !== "sn80" && asset !== "sn10") {
837
+ if (asset !== "tao" && asset !== "sn80" && asset !== "sn10" && asset !== "sn78") {
827
838
  throw new ForeverMoneyError(
828
839
  "INVALID_TRANSACTION_PLAN",
829
- 'Asset must be "tao", "sn80", or "sn10".'
840
+ 'Asset must be "tao", "sn80", "sn10", or "sn78".'
830
841
  );
831
842
  }
832
843
  const evm = getForeverMoneyEvmDeployment(evmChain);
833
- const tokenKey = asset === "sn10" ? "wrappedSn10" : "wrappedSn80";
844
+ const tokenKey = asset === "sn78" ? "wrappedSn78" : asset === "sn10" ? "wrappedSn10" : "wrappedSn80";
834
845
  return asset !== "tao" ? {
835
846
  evmToken: evm.contracts[tokenKey],
836
847
  subtensorToken: foreverMoneyDeployment.subtensor.contracts[tokenKey],
@@ -844,16 +855,16 @@ function bridgeAsset(evmChain, asset = "tao") {
844
855
  };
845
856
  }
846
857
  function assertAssetMode(asset, mode) {
847
- if ((asset === "sn80" || asset === "sn10") && mode !== "staked") {
858
+ if ((asset === "sn80" || asset === "sn10" || asset === "sn78") && mode !== "staked") {
848
859
  throw new ForeverMoneyError(
849
860
  "INVALID_TRANSACTION_PLAN",
850
- `${asset.toUpperCase()} bridging requires staked subnet ${asset === "sn10" ? SN10_NETUID : SN80_NETUID} input or delivery; liquid TAO conversion is not supported.`
861
+ `${asset.toUpperCase()} bridging requires staked subnet ${asset === "sn78" ? SN78_NETUID : asset === "sn10" ? SN10_NETUID : SN80_NETUID} input or delivery; liquid TAO conversion is not supported.`
851
862
  );
852
863
  }
853
864
  }
854
865
  function sourceNetuid(input) {
855
866
  if (input.source !== "staked") return void 0;
856
- const assetNetuid = input.asset === "sn10" ? SN10_NETUID : input.asset === "sn80" ? SN80_NETUID : void 0;
867
+ const assetNetuid = input.asset === "sn78" ? SN78_NETUID : input.asset === "sn10" ? SN10_NETUID : input.asset === "sn80" ? SN80_NETUID : void 0;
857
868
  const netuid = input.netuid ?? assetNetuid;
858
869
  if (netuid === void 0) {
859
870
  throw new ForeverMoneyError(