anchor-generate-cpi-interface-mod

Crates.ioanchor-generate-cpi-interface-mod
lib.rsanchor-generate-cpi-interface-mod
version0.3.3
sourcesrc
created_at2023-08-01 13:21:21.264587
updated_at2023-08-01 13:43:25.493661
descriptionGenerates an Anchor CPI crate from a JSON IDL.
homepage
repositoryhttps://github.com/AlphaPrime8/anchor-gen
max_upload_size
id931857
size3,850
AlphaPrime8 (AlphaPrime8)

documentation

README

anchor-gen

Generates a crate for cross-program invocations to an Anchor program from a JSON IDL.

Usage

In a new crate, write:

anchor_gen::generate_cpi_crate!("../../examples/govern-cpi/idl.json");

declare_id!("GjphYQcbP1m3FuDyCTUJf2mUMxKPE3j6feWU1rxvC7Ps");

This will generate a fully functional Rust CPI client for your IDL.

More examples can be found in the examples/ directory.

License: Apache-2.0

Commit count: 39

cargo fmt