wormhole/sdk
Chirantan Ekbote d19fc98091 sdk/rust: Properly support tokenbridge payload3 messages
Add the payload as an explicit field to the `TransferWithPayload` enum
variant.  This is a generic parameter that defaults to `Box<RawMessage>`
for maximum flexibility (and to avoid leaking lifetimes higher up the
stack) but users are encouraged to replace this default type parameter
with an explicit `&RawMessage` in places where the serde_wormhole data
format is used.

The main benefit of this change is that the payload is now included as
part of the actual message and no longer requires callers to awkwardly
append it after serialization.  This is especially useful in human-
readable formats like JSON (see the `transfer_with_payload` test in
token.rs for an example of this simplification).

The main downside is that this now requires explicit type annotations
when using the non-payload3 variants so that the compiler will pick up
the default generic parameter.  This is a relatively minor inconvenience
and the benefit appears to be worth the cost.

There should be no functional change.
2023-01-20 18:12:41 +09:00
..
js sdk: Add Aptos NFT bridge address (#2244) 2023-01-13 15:03:15 -06:00
js-proto-node rename dev.v2 to main 2022-11-29 10:43:07 -05:00
js-proto-web rename dev.v2 to main 2022-11-29 10:43:07 -05:00
js-wasm rename dev.v2 to main 2022-11-29 10:43:07 -05:00
rust sdk/rust: Properly support tokenbridge payload3 messages 2023-01-20 18:12:41 +09:00
vaa sdk: tests for vaa.UnmarshalBody() 2023-01-03 09:59:56 -05:00
README.md Add a wormhole go sdk 2022-09-15 14:35:46 +01:00
devnet_consts.go Wormhole chain integration 2022-10-03 17:34:42 +09:00
go.mod WH-1934: upgrade golang to 1.19 (#1941) 2022-11-28 07:48:27 -06:00
go.sum Add a wormhole go sdk 2022-09-15 14:35:46 +01:00
mainnet_consts.go sdk: Add Aptos NFT bridge address (#2244) 2023-01-13 15:03:15 -06:00
p2p_consts.go wormchain: add admin-sign command to continue wormchain validator enrollment 2022-11-30 09:23:19 -06:00
testnet_consts.go node: Injective mainnet support (#2084) 2022-12-07 13:43:44 -06:00

README.md

Wormhole Software Development Kit

This directory contains libraries in various languages for developing software that interacts with wormhole.

Directory Structure

  • sdk/: Go SDK. This package must live in this directory so that clients can use the gitub.com/wormhole-foundation/wormhole/sdk import path.
  • vaa/: Go package for using VAAs (Verifiable Action Approval).
  • js/: Javascript SDK.
  • js-proto-node/: NodeJS client protobuf.
  • js-proto-web/: Web client protobuf.
  • js-wasm/: WebAssembly libraries.
  • rust/: Rust SDK.