Skip to content

Commit 6cf611a

Browse files
authored
V0.5.0 beta.13 (#411)
1 parent 9c384fa commit 6cf611a

File tree

36 files changed

+248
-236
lines changed

36 files changed

+248
-236
lines changed

README.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import evm from "@wormhole-foundation/sdk/evm";
4646
import solana from "@wormhole-foundation/sdk/solana";
4747
import sui from "@wormhole-foundation/sdk/sui";
4848
```
49-
See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/examples/src/index.ts#L2)
49+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/index.ts#L2)
5050
<!--EXAMPLE_IMPORTS-->
5151

5252
And pass those to the Wormhole constructor to make them available for use
@@ -55,7 +55,7 @@ And pass those to the Wormhole constructor to make them available for use
5555
```ts
5656
const wh = await wormhole("Testnet", [evm, solana, algorand, sui, cosmwasm]);
5757
```
58-
See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/examples/src/index.ts#L15)
58+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/index.ts#L15)
5959
<!--EXAMPLE_WORMHOLE_INIT-->
6060

6161
With a configured Wormhole object, we have the ability to do things like; parse addresses for the platforms we passed, get a [ChainContext](#chain-context) object, or fetch VAAs.
@@ -65,7 +65,7 @@ With a configured Wormhole object, we have the ability to do things like; parse
6565
// Grab a ChainContext object from our configured Wormhole instance
6666
const ctx = wh.getChain("Solana");
6767
```
68-
See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/examples/src/index.ts#L19)
68+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/index.ts#L19)
6969
<!--EXAMPLE_WORMHOLE_CHAIN-->
7070

7171
<!--EXAMPLE_WORMHOLE_VAA-->
@@ -80,7 +80,7 @@ See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/
8080
60_000,
8181
);
8282
```
83-
See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/examples/src/index.ts#L48)
83+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/index.ts#L48)
8484
<!--EXAMPLE_WORMHOLE_VAA-->
8585

8686

@@ -101,7 +101,7 @@ Optionally, the default configuration may be overriden in the case that you want
101101
},
102102
});
103103
```
104-
See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/examples/src/config.ts#L6)
104+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/config.ts#L6)
105105
<!--EXAMPLE_CONFIG_OVERRIDE-->
106106

107107
## Concepts
@@ -268,7 +268,7 @@ The protocol that underlies all Wormhole activity is the Core protocol. This pro
268268
const verifyTxs = coreBridge.verifyMessage(address.address, vaa!);
269269
console.log(await signSendWait(chain, verifyTxs, signer));
270270
```
271-
See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/examples/src/messaging.ts#L7)
271+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/messaging.ts#L7)
272272
<!--EXAMPLE_CORE_BRIDGE-->
273273

274274
Within the payload is the information necessary to perform whatever action is required based on the Protocol that uses it.
@@ -350,7 +350,7 @@ We can create a new `Wormhole` object and use it to to create `TokenTransfer`, `
350350
const destTxids = await xfer.completeTransfer(route.destination.signer);
351351
console.log(`Completed Transfer: `, destTxids);
352352
```
353-
See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/examples/src/tokenBridge.ts#L125)
353+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/tokenBridge.ts#L125)
354354
<!--EXAMPLE_TOKEN_TRANSFER-->
355355

356356

@@ -405,7 +405,7 @@ We can also transfer native USDC using [Circle's CCTP](https://www.circle.com/en
405405
const dstTxids = await xfer.completeTransfer(dst.signer);
406406
console.log(`Completed Transfer: `, dstTxids);
407407
```
408-
See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/examples/src/cctp.ts#L79)
408+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/cctp.ts#L79)
409409
<!--EXAMPLE_CCTP_TRANSFER-->
410410

411411

@@ -436,7 +436,7 @@ A transfer into Cosmos from outside cosmos will be automatically delivered to th
436436
const attests = await xfer.fetchAttestation(600_000);
437437
console.log("Got Attestations", attests);
438438
```
439-
See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/examples/src/cosmos.ts#L120)
439+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/cosmos.ts#L120)
440440
<!--EXAMPLE_GATEWAY_INBOUND-->
441441

442442
A transfer within Cosmos will use IBC to transfer from the origin to the Gateway chain, then out from the Gateway to the destination chain
@@ -462,7 +462,7 @@ A transfer within Cosmos will use IBC to transfer from the origin to the Gateway
462462
const attests = await xfer.fetchAttestation(60_000);
463463
console.log("Got attests: ", attests);
464464
```
465-
See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/examples/src/cosmos.ts#L152)
465+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/cosmos.ts#L152)
466466
<!--EXAMPLE_GATEWAY_INTERCOSMOS-->
467467

468468
A transfer leaving Cosmos will produce a VAA from the Gateway that must be manually redeemed on the destination chain
@@ -491,7 +491,7 @@ A transfer leaving Cosmos will produce a VAA from the Gateway that must be manua
491491
const dstTxIds = await xfer.completeTransfer(dst.signer);
492492
console.log("Completed transfer on destination chain", dstTxIds);
493493
```
494-
See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/examples/src/cosmos.ts#L184)
494+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/cosmos.ts#L184)
495495
<!--EXAMPLE_GATEWAY_OUTBOUND-->
496496

497497

@@ -512,7 +512,7 @@ A `TransactionId` or `WormholeMessageId` may be used to recover the transfer
512512
const dstTxIds = await xfer.completeTransfer(signer);
513513
console.log("Completed transfer: ", dstTxIds);
514514
```
515-
See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/examples/src/cctp.ts#L130)
515+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/cctp.ts#L130)
516516
<!--EXAMPLE_RECOVER_TRANSFER-->
517517

518518
### Routes
@@ -532,7 +532,7 @@ To provide a more flexible and generic interface, the `Wormhole` class provides
532532
routes.AutomaticPorticoRoute, // Native eth transfers
533533
]);
534534
```
535-
See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/examples/src/router.ts#L23)
535+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/router.ts#L23)
536536
<!--EXAMPLE_RESOLVER_CREATE-->
537537

538538
Once created, the resolver can be used to provide a list of input and possible output tokens.
@@ -553,7 +553,7 @@ Once created, the resolver can be used to provide a list of input and possible o
553553
destTokens.map((t) => canonicalAddress(t)),
554554
);
555555
```
556-
See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/examples/src/router.ts#L34)
556+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/router.ts#L34)
557557
<!--EXAMPLE_RESOLVER_LIST_TOKENS-->
558558

559559
Once the tokens are selected, a `RouteTransferRequest` may be created to provide a list of routes that can fulfil the request
@@ -573,7 +573,7 @@ Once the tokens are selected, a `RouteTransferRequest` may be created to provide
573573
const foundRoutes = await resolver.findRoutes(tr);
574574
console.log("For the transfer parameters, we found these routes: ", foundRoutes);
575575
```
576-
See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/examples/src/router.ts#L50)
576+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/router.ts#L50)
577577
<!--EXAMPLE_REQUEST_CREATE-->
578578

579579
Choosing the best route is currently left to the developer but strategies might include sorting by output amount or expected time to complete the transfer (no estimate currently provided).
@@ -601,7 +601,7 @@ After choosing the best route, extra parameters like `amount`, `nativeGasDropoff
601601
if (!quote.success) throw quote.error;
602602
console.log("Best route quote: ", quote);
603603
```
604-
See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/examples/src/router.ts#L70)
604+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/router.ts#L70)
605605
<!--EXAMPLE_REQUEST_VALIDATE-->
606606

607607

@@ -614,7 +614,7 @@ Finally, assuming the quote looks good, the route can initiate the request with
614614
const receipt = await bestRoute.initiate(sender.signer, quote);
615615
console.log("Initiated transfer with receipt: ", receipt);
616616
```
617-
See example [here](https://github.com/wormhole-foundation/connect-sdk/blob/main/examples/src/router.ts#L94)
617+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/router.ts#L94)
618618
<!--EXAMPLE_REQUEST_INITIATE-->
619619

620620
Note: See the `router.ts` example in the examples directory for a full working example

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.5.0-alpha.8
1+
0.5.0-beta.13

connect/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wormhole-foundation/sdk-connect",
3-
"version": "0.5.0-alpha.8",
3+
"version": "0.5.0-beta.13",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/wormhole-foundation/connect-sdk.git"
@@ -58,8 +58,8 @@
5858
},
5959
"dependencies": {
6060
"axios": "^1.4.0",
61-
"@wormhole-foundation/sdk-base": "0.5.0-alpha.8",
62-
"@wormhole-foundation/sdk-definitions": "0.5.0-alpha.8"
61+
"@wormhole-foundation/sdk-base": "0.5.0-beta.13",
62+
"@wormhole-foundation/sdk-definitions": "0.5.0-beta.13"
6363
},
6464
"type": "module"
6565
}

core/base/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wormhole-foundation/sdk-base",
3-
"version": "0.5.0-alpha.8",
3+
"version": "0.5.0-beta.13",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/wormhole-foundation/connect-sdk.git"

core/base/src/constants/contracts/core.ts

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ export const coreBridgeContracts = [[
7575
["Holesky", "0xa10f2eF61dE1f19f586ab8B6F2EbA89bACE63F7a"],
7676
["Neutron", "neutron1enf63k37nnv9cugggpm06mg70emcnxgj9p64v2s8yx7a2yhhzk2q6xesk4"],
7777
["Mantle", "0x376428e7f26D5867e69201b275553C45B09EE090"],
78+
["PolygonSepolia", "0x6b9C8671cdDC8dEab9c719bB87cBd3e782bA6a35"],
79+
["Scroll", "0x055F47F1250012C6B20c436570a76e52c17Af2D5"],
7880
]], [
7981
"Devnet", [
8082
["Solana", "Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o"],

core/base/src/constants/contracts/nftBridge.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { MapLevels } from './../../utils/index.js';
2-
import type { Network } from '../networks.js';
3-
import type { Chain } from '../chains.js';
1+
import type { MapLevels } from "./../../utils/index.js";
2+
import type { Network } from "../networks.js";
3+
import type { Chain } from "../chains.js";
44

55
// prettier-ignore
66
export const nftBridgeContracts = [[
@@ -47,6 +47,9 @@ export const nftBridgeContracts = [[
4747
["BaseSepolia", "0x268557122Ffd64c85750d630b716471118F323c8"],
4848
["OptimismSepolia", "0x27812285fbe85BA1DF242929B906B31EE3dd1b9f"],
4949
["Holesky", "0xc8941d483c45eF8FB72E4d1F9dDE089C95fF8171"],
50+
["PolygonSepolia", "0x23908A62110e21C04F3A4e011d24F901F911744A"],
51+
["Mantle", "0xD7D732C8Bf5eBF620EA55b5828eae20418eEF083"],
52+
["Scroll", "0x47B9a1406BEe29a3001BFEB7e45aE45fFFB40c18"],
5053
]], [
5154
"Devnet", [
5255
["Solana", "NFTWqJR8YnRVqPDvTJrYuLrQDitTG5AScqbeghi4zSA"],

core/base/src/constants/contracts/tokenBridge.ts

+2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ export const tokenBridgeContracts = [[
6666
["Wormchain", "wormhole1aaf9r6s7nxhysuegqrxv0wpm27ypyv4886medd3mrkrw6t4yfcnst3qpex"],
6767
["Holesky", "0x76d093BbaE4529a342080546cAFEec4AcbA59EC6"],
6868
["Mantle", "0x75Bfa155a9D7A3714b0861c8a8aF0C4633c45b5D"],
69+
["PolygonSepolia", "0xC7A204bDBFe983FCD8d8E61D02b475D4073fF97e"],
70+
["Scroll", "0x22427d90B7dA3fA4642F7025A854c7254E4e45BF"],
6971
]], [
7072
"Devnet", [
7173
["Solana", "B6RHG3mfcckmrYN1UhmJzyS1XX3fZKbkeUcpJe9Sy3FE"],

core/base/src/constants/nativeChainIds.ts

+10-5
Original file line numberDiff line numberDiff line change
@@ -171,20 +171,25 @@ const chainNetworkNativeChainIdEntries = [[
171171
]],[
172172
"Dymension", [
173173
["Mainnet", "dymension_1100-1"]
174-
]], [
174+
]],[
175175
"Seda",[
176176
["Testnet", "seda-1-testnet"],
177-
]], [
177+
]],[
178178
"PolygonSepolia", [
179179
["Testnet", 80002n]
180-
]],
181-
[
180+
]],[
182181
"Mantle", [
183182
["Mainnet", 5000n],
184183
["Testnet", 5003n] // Sepolia testnet
185-
]]
184+
]],
185+
[
186+
"Scroll", [
187+
["Mainnet", 534352n],
188+
["Testnet", 534351n],
189+
]],
186190
] as const satisfies MapLevels<[Chain, Network, bigint | string]>;
187191

192+
// @ts-ignore -- type instantiation too large and possibly infinite??
188193
export const networkChainToNativeChainId = constMap(chainNetworkNativeChainIdEntries, [[1, 0], 2]);
189194

190195
//When mapping a Platform and native chain id to a network and chain pair, we assume that the

core/definitions/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wormhole-foundation/sdk-definitions",
3-
"version": "0.5.0-alpha.8",
3+
"version": "0.5.0-beta.13",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/wormhole-foundation/connect-sdk.git"
@@ -65,7 +65,7 @@
6565
},
6666
"dependencies": {
6767
"@noble/hashes": "^1.3.1",
68-
"@wormhole-foundation/sdk-base": "0.5.0-alpha.8"
68+
"@wormhole-foundation/sdk-base": "0.5.0-beta.13"
6969
},
7070
"type": "module"
7171
}

examples/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wormhole-foundation/connect-sdk-examples",
3-
"version": "0.5.0-alpha.8",
3+
"version": "0.5.0-beta.13",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/wormhole-foundation/connect-sdk.git"
@@ -52,6 +52,6 @@
5252
"algosdk": "^2.7.0"
5353
},
5454
"dependencies": {
55-
"@wormhole-foundation/sdk": "0.5.0-alpha.8"
55+
"@wormhole-foundation/sdk": "0.5.0-beta.13"
5656
}
5757
}

0 commit comments

Comments
 (0)