You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See the testing signers ([Evm](https://github.com/wormhole-foundation/connect-sdk/blob/main/platforms/evm/src/signer.ts), [Solana](https://github.com/wormhole-foundation/connect-sdk/blob/main/platforms/solana/src/signer.ts), ...) for an example of how to implement a signer for a specific chain or platform.
210
210
211
+
### VAAs
212
+
213
+
Working with VAAs directly may be necessary. The SDK includes an entire layouting package to define the structure of a VAA payload and provides the ability to easily serialize and deserialize the VAAs or VAA payloads.
214
+
215
+
Using `Uint8Array` as the paylaod type will always work:
216
+
<!--EXAMPLE_PARSE_VAA-->
217
+
```ts
218
+
// Create a fake vaa and serialize it to bytes
219
+
// the first argument to `createVAA` describes the payload type
@@ -573,7 +680,7 @@ Once the tokens are selected, a `RouteTransferRequest` may be created to provide
573
680
const foundRoutes =awaitresolver.findRoutes(tr);
574
681
console.log("For the transfer parameters, we found these routes: ", foundRoutes);
575
682
```
576
-
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/router.ts#L63)
683
+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/router.ts#L53)
577
684
<!--EXAMPLE_REQUEST_CREATE-->
578
685
579
686
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 +708,7 @@ After choosing the best route, extra parameters like `amount`, `nativeGasDropoff
601
708
if (!quote.success) throwquote.error;
602
709
console.log("Best route quote: ", quote);
603
710
```
604
-
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/router.ts#L83)
711
+
See example [here](https://github.com/wormhole-foundation/wormhole-sdk-ts/blob/main/examples/src/router.ts#L71)
605
712
<!--EXAMPLE_REQUEST_VALIDATE-->
606
713
607
714
@@ -611,10 +718,10 @@ Finally, assuming the quote looks good, the route can initiate the request with
611
718
```ts
612
719
// Now the transfer may be initiated
613
720
// A receipt will be returned, guess what you gotta do with that?
0 commit comments