@m0-foundation/ntt-sdk-route 0.0.26 → 0.0.27
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 +5 -8
- package/dist/index.mjs +6 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8285,7 +8285,7 @@ var _SvmRouter = class _SvmRouter {
|
|
|
8285
8285
|
});
|
|
8286
8286
|
return extensionsWithPath.map((mint) => ({
|
|
8287
8287
|
chain: this.chain,
|
|
8288
|
-
address:
|
|
8288
|
+
address: sdkConnect.toNative(this.chain, mint)
|
|
8289
8289
|
}));
|
|
8290
8290
|
}
|
|
8291
8291
|
async getSupportedDestinationTokens(sourceToken, toChain) {
|
|
@@ -8297,7 +8297,7 @@ var _SvmRouter = class _SvmRouter {
|
|
|
8297
8297
|
if (!dests) return [];
|
|
8298
8298
|
return Array.from(dests).map((dest) => ({
|
|
8299
8299
|
chain: toChain,
|
|
8300
|
-
address:
|
|
8300
|
+
address: sdkConnect.toNative(toChain, dest)
|
|
8301
8301
|
}));
|
|
8302
8302
|
}
|
|
8303
8303
|
async getAddressLookupTableAccounts() {
|
|
@@ -8456,7 +8456,7 @@ var _EvmRouter = class _EvmRouter {
|
|
|
8456
8456
|
async getSupportedSourceTokens() {
|
|
8457
8457
|
return this.TOKENS.map((token) => ({
|
|
8458
8458
|
chain: this.chain,
|
|
8459
|
-
address:
|
|
8459
|
+
address: sdkConnect.toNative(this.chain, token)
|
|
8460
8460
|
}));
|
|
8461
8461
|
}
|
|
8462
8462
|
async getSupportedDestinationTokens(_sourceToken, toChain) {
|
|
@@ -8464,16 +8464,13 @@ var _EvmRouter = class _EvmRouter {
|
|
|
8464
8464
|
return [
|
|
8465
8465
|
{
|
|
8466
8466
|
chain: toChain,
|
|
8467
|
-
address:
|
|
8468
|
-
"mzeroXDoBpRVhnEXBra27qzAMdxgpWVY3DzQW7xMVJp",
|
|
8469
|
-
"base58"
|
|
8470
|
-
)
|
|
8467
|
+
address: sdkConnect.toNative(toChain, "mzeroXDoBpRVhnEXBra27qzAMdxgpWVY3DzQW7xMVJp")
|
|
8471
8468
|
}
|
|
8472
8469
|
];
|
|
8473
8470
|
}
|
|
8474
8471
|
return this.TOKENS.map((token) => ({
|
|
8475
8472
|
chain: toChain,
|
|
8476
|
-
address:
|
|
8473
|
+
address: sdkConnect.toNative(toChain, token)
|
|
8477
8474
|
}));
|
|
8478
8475
|
}
|
|
8479
8476
|
static async fromChainContext(ctx) {
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { routes, chainToPlatform, amount, finality, Wormhole, canonicalAddress, signSendWait, TransferState, isSourceInitiated, isSourceFinalized, isAttested, isRedeemed,
|
|
1
|
+
import { routes, chainToPlatform, amount, finality, Wormhole, canonicalAddress, signSendWait, TransferState, isSourceInitiated, isSourceFinalized, isAttested, isRedeemed, toNative, chainToChainId, sha256 } from '@wormhole-foundation/sdk-connect';
|
|
2
2
|
import { Ntt, register } from '@wormhole-foundation/sdk-definitions-ntt';
|
|
3
3
|
import { register as register$1 } from '@wormhole-foundation/sdk-evm-ntt';
|
|
4
4
|
import { register as register$2 } from '@wormhole-foundation/sdk-solana-ntt';
|
|
@@ -8278,7 +8278,7 @@ var _SvmRouter = class _SvmRouter {
|
|
|
8278
8278
|
});
|
|
8279
8279
|
return extensionsWithPath.map((mint) => ({
|
|
8280
8280
|
chain: this.chain,
|
|
8281
|
-
address:
|
|
8281
|
+
address: toNative(this.chain, mint)
|
|
8282
8282
|
}));
|
|
8283
8283
|
}
|
|
8284
8284
|
async getSupportedDestinationTokens(sourceToken, toChain) {
|
|
@@ -8290,7 +8290,7 @@ var _SvmRouter = class _SvmRouter {
|
|
|
8290
8290
|
if (!dests) return [];
|
|
8291
8291
|
return Array.from(dests).map((dest) => ({
|
|
8292
8292
|
chain: toChain,
|
|
8293
|
-
address:
|
|
8293
|
+
address: toNative(toChain, dest)
|
|
8294
8294
|
}));
|
|
8295
8295
|
}
|
|
8296
8296
|
async getAddressLookupTableAccounts() {
|
|
@@ -8449,7 +8449,7 @@ var _EvmRouter = class _EvmRouter {
|
|
|
8449
8449
|
async getSupportedSourceTokens() {
|
|
8450
8450
|
return this.TOKENS.map((token) => ({
|
|
8451
8451
|
chain: this.chain,
|
|
8452
|
-
address:
|
|
8452
|
+
address: toNative(this.chain, token)
|
|
8453
8453
|
}));
|
|
8454
8454
|
}
|
|
8455
8455
|
async getSupportedDestinationTokens(_sourceToken, toChain) {
|
|
@@ -8457,16 +8457,13 @@ var _EvmRouter = class _EvmRouter {
|
|
|
8457
8457
|
return [
|
|
8458
8458
|
{
|
|
8459
8459
|
chain: toChain,
|
|
8460
|
-
address:
|
|
8461
|
-
"mzeroXDoBpRVhnEXBra27qzAMdxgpWVY3DzQW7xMVJp",
|
|
8462
|
-
"base58"
|
|
8463
|
-
)
|
|
8460
|
+
address: toNative(toChain, "mzeroXDoBpRVhnEXBra27qzAMdxgpWVY3DzQW7xMVJp")
|
|
8464
8461
|
}
|
|
8465
8462
|
];
|
|
8466
8463
|
}
|
|
8467
8464
|
return this.TOKENS.map((token) => ({
|
|
8468
8465
|
chain: toChain,
|
|
8469
|
-
address:
|
|
8466
|
+
address: toNative(toChain, token)
|
|
8470
8467
|
}));
|
|
8471
8468
|
}
|
|
8472
8469
|
static async fromChainContext(ctx) {
|