@m0-foundation/ntt-sdk-route 0.0.6 → 0.0.9

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/index.js CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  var sdkConnect = require('@wormhole-foundation/sdk-connect');
4
4
  var sdkDefinitionsNtt = require('@wormhole-foundation/sdk-definitions-ntt');
5
+ require('@wormhole-foundation/sdk-solana-ntt');
5
6
  var sdkEvm = require('@wormhole-foundation/sdk-evm');
7
+ require('@wormhole-foundation/sdk-solana');
6
8
  var sdkRouteNtt = require('@wormhole-foundation/sdk-route-ntt');
7
9
  var ethers = require('ethers');
8
10
 
@@ -67,10 +69,8 @@ var _M0AutomaticRoute = class _M0AutomaticRoute extends sdkConnect.routes.Automa
67
69
  return [];
68
70
  }
69
71
  const { token: mToken, mLikeTokens } = this.getContracts(toChain);
70
- return [
71
- sdkConnect.Wormhole.tokenId(toChain.chain, mToken),
72
- ...mLikeTokens.map((x) => sdkConnect.Wormhole.tokenId(toChain.chain, x))
73
- ];
72
+ const toMToken = sdkConnect.Wormhole.tokenId(toChain.chain, mToken);
73
+ return sdkConnect.chainToPlatform(fromChain.chain) === "Solana" ? [toMToken] : [toMToken, ...mLikeTokens.map((x) => sdkConnect.Wormhole.tokenId(toChain.chain, x))];
74
74
  }
75
75
  static isProtocolSupported(chain) {
76
76
  return chain.supportsProtocol("Ntt");
package/dist/index.mjs CHANGED
@@ -1,6 +1,8 @@
1
- import { routes, Wormhole, isSameToken, amount, finality, chainToPlatform, canonicalAddress, signSendWait, TransferState, universalAddress, toChainId, toUniversal, isSourceInitiated, isSourceFinalized, isAttested, isRedeemed } from '@wormhole-foundation/sdk-connect';
1
+ import { routes, Wormhole, isSameToken, chainToPlatform, amount, finality, canonicalAddress, signSendWait, TransferState, universalAddress, toChainId, toUniversal, isSourceInitiated, isSourceFinalized, isAttested, isRedeemed } from '@wormhole-foundation/sdk-connect';
2
2
  import { Ntt } from '@wormhole-foundation/sdk-definitions-ntt';
3
+ import '@wormhole-foundation/sdk-solana-ntt';
3
4
  import { EvmAddress, EvmPlatform, addFrom, EvmUnsignedTransaction, addChainId } from '@wormhole-foundation/sdk-evm';
5
+ import '@wormhole-foundation/sdk-solana';
4
6
  import { NttRoute } from '@wormhole-foundation/sdk-route-ntt';
5
7
  import { Contract } from 'ethers';
6
8
 
@@ -65,10 +67,8 @@ var _M0AutomaticRoute = class _M0AutomaticRoute extends routes.AutomaticRoute {
65
67
  return [];
66
68
  }
67
69
  const { token: mToken, mLikeTokens } = this.getContracts(toChain);
68
- return [
69
- Wormhole.tokenId(toChain.chain, mToken),
70
- ...mLikeTokens.map((x) => Wormhole.tokenId(toChain.chain, x))
71
- ];
70
+ const toMToken = Wormhole.tokenId(toChain.chain, mToken);
71
+ return chainToPlatform(fromChain.chain) === "Solana" ? [toMToken] : [toMToken, ...mLikeTokens.map((x) => Wormhole.tokenId(toChain.chain, x))];
72
72
  }
73
73
  static isProtocolSupported(chain) {
74
74
  return chain.supportsProtocol("Ntt");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m0-foundation/ntt-sdk-route",
3
- "version": "0.0.6",
3
+ "version": "0.0.9",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",
@@ -35,6 +35,8 @@
35
35
  "@wormhole-foundation/sdk-definitions-ntt": "^0.7.1",
36
36
  "@wormhole-foundation/sdk-evm": "^1.7.0",
37
37
  "@wormhole-foundation/sdk-evm-ntt": "^0.7.1",
38
+ "@wormhole-foundation/sdk-solana": "^1.7.0",
39
+ "@wormhole-foundation/sdk-solana-ntt": "^0.7.1",
38
40
  "@wormhole-foundation/sdk-route-ntt": "^0.7.1",
39
41
  "ethers": "^6.5.1"
40
42
  },