sol-did-cpi

Crates.iosol-did-cpi
lib.rssol-did-cpi
version0.0.1
sourcesrc
created_at2022-10-12 13:50:25.227924
updated_at2022-10-12 13:50:25.227924
descriptionCPI helpers for the Sol-DID program
homepage
repository
max_upload_size
id686325
size18,047
Martin Riedel (rado0x54)

documentation

README

_# 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
Commit count: 0

cargo fmt