Skip to content

Commit 9dba01e

Browse files
committed
Update sdk version, fix route changes
1 parent af6aa46 commit 9dba01e

File tree

9 files changed

+253
-251
lines changed

9 files changed

+253
-251
lines changed

package-lock.json

+233-233
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"sync": "tsx sdk/syncVersion.ts && npm install && npm run build"
2121
},
2222
"devDependencies": {
23-
"@wormhole-foundation/sdk": "0.6.5",
23+
"@wormhole-foundation/sdk": "0.7.0-beta.0",
2424
"@solana/spl-token": "0.3.9",
2525
"@solana/web3.js": "1.91.7",
2626
"@types/jest": "^29.5.12",

sdk/definitions/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
},
5151
"dependencies": {
5252
"@noble/hashes": "^1.3.1",
53-
"@wormhole-foundation/sdk-base": "0.6.5",
54-
"@wormhole-foundation/sdk-definitions": "0.6.5"
53+
"@wormhole-foundation/sdk-base": "0.7.0-beta.0",
54+
"@wormhole-foundation/sdk-definitions": "0.7.0-beta.0"
5555
},
5656
"type": "module"
5757
}

sdk/evm/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@
4545
"test": "jest --config ./jest.config.ts"
4646
},
4747
"dependencies": {
48-
"@wormhole-foundation/sdk-connect": "0.6.5",
48+
"@wormhole-foundation/sdk-connect": "0.7.0-beta.0",
4949
"@wormhole-foundation/sdk-definitions-ntt": "0.0.1-beta.5",
50-
"@wormhole-foundation/sdk-evm": "0.6.5",
51-
"@wormhole-foundation/sdk-evm-core": "0.6.5",
50+
"@wormhole-foundation/sdk-evm": "0.7.0-beta.0",
51+
"@wormhole-foundation/sdk-evm-core": "0.7.0-beta.0",
5252
"ethers": "^6.5.1"
5353
},
5454
"devDependencies": {

sdk/examples/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"tsx": "^4.7.2"
4444
},
4545
"dependencies": {
46-
"@wormhole-foundation/sdk": "0.6.5",
46+
"@wormhole-foundation/sdk": "0.7.0-beta.0",
4747
"@wormhole-foundation/sdk-definitions-ntt": "0.0.1-beta.5",
4848
"@wormhole-foundation/sdk-evm-ntt": "0.0.1-beta.5",
4949
"@wormhole-foundation/sdk-solana-ntt": "0.0.1-beta.5",

sdk/route/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@wormhole-foundation/sdk-definitions-ntt": "0.0.1-beta.5",
5050
"@wormhole-foundation/sdk-solana-ntt": "0.0.1-beta.5",
5151
"@wormhole-foundation/sdk-evm-ntt": "0.0.1-beta.5",
52-
"@wormhole-foundation/sdk-connect": "0.6.5"
52+
"@wormhole-foundation/sdk-connect": "0.7.0-beta.0"
5353
},
5454
"peerDependencies": {
5555
"@wormhole-foundation/sdk-connect": "^0.6"

sdk/route/src/automatic.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
AttestedTransferReceipt,
33
Chain,
4+
ChainAddress,
45
ChainContext,
56
CompletedTransferReceipt,
67
Network,
@@ -100,7 +101,7 @@ export class NttAutomaticRoute<N extends Network>
100101
ntt: nttContracts,
101102
});
102103

103-
return ntt.isRelayingAvailable(this.request.to.chain);
104+
return ntt.isRelayingAvailable(this.request.toChain.chain);
104105
}
105106

106107
async validate(params: Tp): Promise<Vr> {
@@ -172,9 +173,9 @@ export class NttAutomaticRoute<N extends Network>
172173
};
173174
}
174175

175-
async initiate(signer: Signer, quote: Q): Promise<R> {
176+
async initiate(signer: Signer, quote: Q, to: ChainAddress): Promise<R> {
176177
const { params } = quote;
177-
const { fromChain, from, to } = this.request;
178+
const { fromChain } = this.request;
178179
const sender = Wormhole.parseAddress(signer.chain(), signer.address());
179180

180181
const ntt = await fromChain.getProtocol("Ntt", {
@@ -190,7 +191,7 @@ export class NttAutomaticRoute<N extends Network>
190191
const txids = await signSendWait(fromChain, initXfer, signer);
191192

192193
return {
193-
from: from.chain,
194+
from: fromChain.chain,
194195
to: to.chain,
195196
state: TransferState.SourceInitiated,
196197
originTxs: txids,

sdk/route/src/manual.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
AttestedTransferReceipt,
33
Chain,
4+
ChainAddress,
45
ChainContext,
56
CompletedTransferReceipt,
67
Network,
@@ -139,9 +140,9 @@ export class NttManualRoute<N extends Network>
139140
};
140141
}
141142

142-
async initiate(signer: Signer, quote: Q): Promise<R> {
143+
async initiate(signer: Signer, quote: Q, to: ChainAddress): Promise<R> {
143144
const { params } = quote;
144-
const { fromChain, from, to } = this.request;
145+
const { fromChain } = this.request;
145146
const sender = Wormhole.parseAddress(signer.chain(), signer.address());
146147

147148
const ntt = await fromChain.getProtocol("Ntt", {
@@ -156,7 +157,7 @@ export class NttManualRoute<N extends Network>
156157
const txids = await signSendWait(fromChain, initXfer, signer);
157158

158159
return {
159-
from: from.chain,
160+
from: fromChain.chain,
160161
to: to.chain,
161162
state: TransferState.SourceInitiated,
162163
originTxs: txids,

solana/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
"@solana/spl-token": "0.4.0",
5555
"@solana/web3.js": "1.91.7",
5656
"bn.js": "5.2.1",
57-
"@wormhole-foundation/sdk-connect": "0.6.5",
58-
"@wormhole-foundation/sdk-solana": "0.6.5",
59-
"@wormhole-foundation/sdk-solana-core": "0.6.5"
57+
"@wormhole-foundation/sdk-connect": "0.7.0-beta.0",
58+
"@wormhole-foundation/sdk-solana": "0.7.0-beta.0",
59+
"@wormhole-foundation/sdk-solana-core": "0.7.0-beta.0"
6060
},
6161
"type": "module",
6262
"exports": {

0 commit comments

Comments
 (0)