Skip to content

Commit ee09ba3

Browse files
committed
update wormhole sdk version, updates for route interface
1 parent 10365ec commit ee09ba3

File tree

9 files changed

+1364
-719
lines changed

9 files changed

+1364
-719
lines changed

evm/ts/package.json

+8-3
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,17 @@
4444
"test": "jest --config ./jest.config.ts"
4545
},
4646
"dependencies": {
47-
"@wormhole-foundation/sdk-connect": "0.6.5",
47+
"@wormhole-foundation/sdk-connect": "^0.7",
4848
"@wormhole-foundation/sdk-definitions-ntt": "0.1.0-beta.0",
49-
"@wormhole-foundation/sdk-evm": "0.6.5",
50-
"@wormhole-foundation/sdk-evm-core": "0.6.5",
49+
"@wormhole-foundation/sdk-evm": "^0.7",
50+
"@wormhole-foundation/sdk-evm-core": "^0.7",
5151
"ethers": "^6.5.1"
5252
},
53+
"peerDependencies": {
54+
"@wormhole-foundation/sdk-connect": "^0.7",
55+
"@wormhole-foundation/sdk-evm": "^0.7",
56+
"@wormhole-foundation/sdk-evm-core": "^0.7"
57+
},
5358
"devDependencies": {
5459
"@typechain/ethers-v6": "^0.5.1",
5560
"tsx": "^4.7.2",

package-lock.json

+1,329-700
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
@@ -17,7 +17,7 @@
1717
"version": "tsx setSdkVersion.ts"
1818
},
1919
"devDependencies": {
20-
"@wormhole-foundation/sdk": "0.6.5",
20+
"@wormhole-foundation/sdk": "0.7.0",
2121
"@solana/spl-token": "0.3.9",
2222
"@solana/web3.js": "1.91.7",
2323
"@types/jest": "^29.5.12",

sdk/definitions/package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,12 @@
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",
54+
"@wormhole-foundation/sdk-definitions": "^0.7"
55+
},
56+
"peerDependencies": {
57+
"@wormhole-foundation/sdk-base": "^0.7",
58+
"@wormhole-foundation/sdk-definitions": "^0.7"
5559
},
5660
"type": "module"
5761
}

sdk/examples/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"tsx": "^4.7.2"
3333
},
3434
"dependencies": {
35-
"@wormhole-foundation/sdk": "0.6.5",
35+
"@wormhole-foundation/sdk": "^0.7",
3636
"@wormhole-foundation/sdk-definitions-ntt": "0.1.0-beta.0",
3737
"@wormhole-foundation/sdk-evm-ntt": "0.1.0-beta.0",
3838
"@wormhole-foundation/sdk-solana-ntt": "0.1.0-beta.0",

sdk/route/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@
4848
"@wormhole-foundation/sdk-definitions-ntt": "0.1.0-beta.0",
4949
"@wormhole-foundation/sdk-solana-ntt": "0.1.0-beta.0",
5050
"@wormhole-foundation/sdk-evm-ntt": "0.1.0-beta.0",
51-
"@wormhole-foundation/sdk-connect": "0.6.5"
51+
"@wormhole-foundation/sdk-connect": "^0.7"
5252
},
5353
"peerDependencies": {
54-
"@wormhole-foundation/sdk-connect": "^0.6"
54+
"@wormhole-foundation/sdk-connect": "^0.7"
5555
},
5656
"type": "module",
5757
"exports": {

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

+8-3
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,14 @@
5555
"@solana/spl-token": "0.4.0",
5656
"@solana/web3.js": "1.91.7",
5757
"bn.js": "5.2.1",
58-
"@wormhole-foundation/sdk-connect": "0.6.5",
59-
"@wormhole-foundation/sdk-solana": "0.6.5",
60-
"@wormhole-foundation/sdk-solana-core": "0.6.5"
58+
"@wormhole-foundation/sdk-connect": "^0.7",
59+
"@wormhole-foundation/sdk-solana": "^0.7",
60+
"@wormhole-foundation/sdk-solana-core": "^0.7"
61+
},
62+
"peerDependencies": {
63+
"@wormhole-foundation/sdk-connect": "^0.7",
64+
"@wormhole-foundation/sdk-solana": "^0.7",
65+
"@wormhole-foundation/sdk-solana-core": "^0.7"
6166
},
6267
"type": "module",
6368
"exports": {

0 commit comments

Comments
 (0)