wen-community / wen-program-library

Apache License 2.0
90 stars 21 forks source link

WEN Rust SDK #54

Closed kespinola closed 5 months ago

kespinola commented 7 months ago

Goal

Provide developers a rust SDK that provides a intuitive DX for building WNS and Token Extension instructions.

Requirements

kespinola commented 7 months ago

Look into kinobi to generate the based sdk for instruction assembly. We may run into issues with the updated idl standard released in 0.30.0 of anchor. I would like to update the project if supported by this team.

https://github.com/metaplex-foundation/kinobi

balmy-gazebo commented 7 months ago

Update Kinobi to work with Anchor 0.30.0? Overall very much support getting a better client out. I think the other thing in this vein that might be useful is providing a non-Anchor interface for the contract so composing programs can interact without requiring Anchor

balmy-gazebo commented 7 months ago

Not sure if that falls into the same bucket or if thats new tooling all together

kespinola commented 7 months ago

non-Anchor interface for the contract so composing programs can interact without requiring Anchor

This is actually more of what I'm targeting for the SDK. It should help put together instructions for use in rust backend services or in a program and not have a dependency on anchor just solana.

For anchor project I want to have a doc showing how to use declare_program. And maybe the wen cli downloads the idl and lands in the expected directory.

https://docs.rs/anchor-lang/latest/anchor_lang/macro.declare_program.html

kespinola commented 7 months ago

Can use cargo features to add "rpc" which includes extras to fetch data.

kespinola commented 6 months ago

https://github.com/kinobi-so/kinobi/pull/15

Kinobi is getting a new version and migrated to its own org. This PR will be adding anchor 0.30.0 IDL support.