wormhole-foundation/example-native-token-transfers

SDK: Solana package restructure

Opened this issue · 0 comments

Restructure the SDK workspace, allowing platform specific SDK source files to live alongside their contracts.

Goals

  1. Reduce code duplication
    a. Reuse existing TS library code in SDK
    b. Check in a single copy of the IDL for a contract version
  2. Provide a more convenient way to interact with the ts code for a given platform
  • Move package workspace to root and update
  • Move /solana/ts to /solana/ts/lib to allow re-use of the library methods
  • Move /sdk/solana to /solana/ts/sdk
  • Check in generated IDL to /solana/ts/idl

The above items are completed in this pr

  • Remove the OmitGenerics type, we have a Makefile directive to generate generic-free .ts files
  • Modify the SDK code in /solana/ts/sdk to invoke methods provided in /sdk/ts/lib