File tree 9 files changed +1364
-719
lines changed
9 files changed +1364
-719
lines changed Original file line number Diff line number Diff line change 44
44
"test" : " jest --config ./jest.config.ts"
45
45
},
46
46
"dependencies" : {
47
- "@wormhole-foundation/sdk-connect" : " 0.6.5 " ,
47
+ "@wormhole-foundation/sdk-connect" : " ^0.7 " ,
48
48
"@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 " ,
51
51
"ethers" : " ^6.5.1"
52
52
},
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
+ },
53
58
"devDependencies" : {
54
59
"@typechain/ethers-v6" : " ^0.5.1" ,
55
60
"tsx" : " ^4.7.2" ,
Original file line number Diff line number Diff line change 17
17
"version" : " tsx setSdkVersion.ts"
18
18
},
19
19
"devDependencies" : {
20
- "@wormhole-foundation/sdk" : " 0.6.5 " ,
20
+ "@wormhole-foundation/sdk" : " 0.7.0 " ,
21
21
"@solana/spl-token" : " 0.3.9" ,
22
22
"@solana/web3.js" : " 1.91.7" ,
23
23
"@types/jest" : " ^29.5.12" ,
Original file line number Diff line number Diff line change 50
50
},
51
51
"dependencies" : {
52
52
"@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"
55
59
},
56
60
"type" : " module"
57
61
}
Original file line number Diff line number Diff line change 32
32
"tsx" : " ^4.7.2"
33
33
},
34
34
"dependencies" : {
35
- "@wormhole-foundation/sdk" : " 0.6.5 " ,
35
+ "@wormhole-foundation/sdk" : " ^0.7 " ,
36
36
"@wormhole-foundation/sdk-definitions-ntt" : " 0.1.0-beta.0" ,
37
37
"@wormhole-foundation/sdk-evm-ntt" : " 0.1.0-beta.0" ,
38
38
"@wormhole-foundation/sdk-solana-ntt" : " 0.1.0-beta.0" ,
Original file line number Diff line number Diff line change 48
48
"@wormhole-foundation/sdk-definitions-ntt" : " 0.1.0-beta.0" ,
49
49
"@wormhole-foundation/sdk-solana-ntt" : " 0.1.0-beta.0" ,
50
50
"@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 "
52
52
},
53
53
"peerDependencies" : {
54
- "@wormhole-foundation/sdk-connect" : " ^0.6 "
54
+ "@wormhole-foundation/sdk-connect" : " ^0.7 "
55
55
},
56
56
"type" : " module" ,
57
57
"exports" : {
Original file line number Diff line number Diff line change 1
1
import {
2
2
AttestedTransferReceipt ,
3
3
Chain ,
4
+ ChainAddress ,
4
5
ChainContext ,
5
6
CompletedTransferReceipt ,
6
7
Network ,
@@ -100,7 +101,7 @@ export class NttAutomaticRoute<N extends Network>
100
101
ntt : nttContracts ,
101
102
} ) ;
102
103
103
- return ntt . isRelayingAvailable ( this . request . to . chain ) ;
104
+ return ntt . isRelayingAvailable ( this . request . toChain . chain ) ;
104
105
}
105
106
106
107
async validate ( params : Tp ) : Promise < Vr > {
@@ -172,9 +173,9 @@ export class NttAutomaticRoute<N extends Network>
172
173
} ;
173
174
}
174
175
175
- async initiate ( signer : Signer , quote : Q ) : Promise < R > {
176
+ async initiate ( signer : Signer , quote : Q , to : ChainAddress ) : Promise < R > {
176
177
const { params } = quote ;
177
- const { fromChain, from , to } = this . request ;
178
+ const { fromChain } = this . request ;
178
179
const sender = Wormhole . parseAddress ( signer . chain ( ) , signer . address ( ) ) ;
179
180
180
181
const ntt = await fromChain . getProtocol ( "Ntt" , {
@@ -190,7 +191,7 @@ export class NttAutomaticRoute<N extends Network>
190
191
const txids = await signSendWait ( fromChain , initXfer , signer ) ;
191
192
192
193
return {
193
- from : from . chain ,
194
+ from : fromChain . chain ,
194
195
to : to . chain ,
195
196
state : TransferState . SourceInitiated ,
196
197
originTxs : txids ,
Original file line number Diff line number Diff line change 1
1
import {
2
2
AttestedTransferReceipt ,
3
3
Chain ,
4
+ ChainAddress ,
4
5
ChainContext ,
5
6
CompletedTransferReceipt ,
6
7
Network ,
@@ -139,9 +140,9 @@ export class NttManualRoute<N extends Network>
139
140
} ;
140
141
}
141
142
142
- async initiate ( signer : Signer , quote : Q ) : Promise < R > {
143
+ async initiate ( signer : Signer , quote : Q , to : ChainAddress ) : Promise < R > {
143
144
const { params } = quote ;
144
- const { fromChain, from , to } = this . request ;
145
+ const { fromChain } = this . request ;
145
146
const sender = Wormhole . parseAddress ( signer . chain ( ) , signer . address ( ) ) ;
146
147
147
148
const ntt = await fromChain . getProtocol ( "Ntt" , {
@@ -156,7 +157,7 @@ export class NttManualRoute<N extends Network>
156
157
const txids = await signSendWait ( fromChain , initXfer , signer ) ;
157
158
158
159
return {
159
- from : from . chain ,
160
+ from : fromChain . chain ,
160
161
to : to . chain ,
161
162
state : TransferState . SourceInitiated ,
162
163
originTxs : txids ,
Original file line number Diff line number Diff line change 55
55
"@solana/spl-token" : " 0.4.0" ,
56
56
"@solana/web3.js" : " 1.91.7" ,
57
57
"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"
61
66
},
62
67
"type" : " module" ,
63
68
"exports" : {
You can’t perform that action at this time.
0 commit comments