#anchor #idl #json-file #solana #cli

app simple-anchor-idl-ts

A tool for generating a typescript file from an Anchor IDL json file

2 releases

0.1.1 Jan 4, 2024
0.1.0 Jan 3, 2024

#33 in #anchor

MIT/Apache

6KB

simple-anchor-idl-ts

A tool for generating a TS file from a lone Anchor IDL JSON file.

Creates a type and an object for the IDL. Lower camel cases the account names.

Usually this TS file is generated when building an Anchor repo. https://github.com/coral-xyz/anchor/blob/master/cli/src/rust_template.rs#L222

Sometimes you just have another project's JSON file and want a TS file for your client.

Dependencies

~5MB
~102K SLoC