#cpi #did #helper #sol-did

sol-did-cpi

CPI helpers for the Sol-DID program

1 unstable release

0.0.1 Oct 12, 2022

#60 in #cpi

30 downloads per month

Custom license

4KB

_# sol-did-cpi

CPI helpers for the Sol-DID program, that manages the did:sol DID method on Solana.

This crate was automatically generated by anchor-gen, a crate for generating Anchor CPI helpers from JSON IDLs.

Usage

use sol_did_cpi::State;
use sol_did_cpi::cpi::{ initialize };
use sol_did_cpi::cpi::accounts::{ Initialize };
use sol_did_cpi::program::sol_did;

pub fn initialize(ctx: Context<Initialize>, size: u64) -> Result<()> {
    let cpi_program = ctx.accounts.sol_did_program.to_account_info();
    let cpi_accounts = Initialize {
        did_data: ctx.accounts.did_data.to_account_info(),
        authority: ctx.accounts.authority.to_account_info(),
        payer: ctx.accounts.payer.to_account_info(),
        system_program: ctx.accounts.system_program.to_account_info(),
    };
    let cpi_ctx = CpiContext::new(cpi_program, cpi_accounts);
    initialize(cpi_ctx, size)
}

Publish

To publish a new version:

cargo build
# allow-dirty, to include the idl passed in via the build script
cargo publish --allow-dirty

Dependencies

~18–27MB
~463K SLoC