amorriscode / axolotl

Write Anchor-compatible Solana programs in TypeScript
MIT License
16 stars 0 forks source link

Develop TypeScript library #3

Open amorriscode opened 1 year ago

amorriscode commented 1 year ago

The Axolotl TypeScript library will be used to:

Types

Since Axolotl programs are written with TypeScript, we can provide types to the users. For Seahorse programs, the types are included in a static file next to your Anchor program.

Rust data types

Refer to the Rust documentation for data types.

Anchor has defined JavaScript --> Rust types. We'll be taking as much inspiration from their implementation as possible. Integers greater than 32 bytes will utilize bn.js, common for both Anchor and Solana.

Solana types

@solana/web3.js has a lot of classes and types that we will likely be able to utilize/export from Axolotl.

Anchor types

Helper functions

Release

amorriscode commented 1 year ago

There's a lot of great work done on @polkadot/types-codec that can help develop the Rust data types.