Crates.io | solana_idl |
lib.rs | solana_idl |
version | 0.2.0 |
source | src |
created_at | 2023-01-22 08:56:25.051958 |
updated_at | 2024-07-17 14:22:53.754853 |
description | Rust Solana Classic IDL types definitions de/serializable with serde and converter. |
homepage | https://github.com/thlorenz/solana-idl |
repository | https://github.com/thlorenz/solana-idl |
max_upload_size | |
id | 764885 |
size | 4,410 |
Extracts Rust Solana IDL types definitions de/serializable with serde extracted from shank or anchor.
Handles multiple IDL versions to provide the classic IDL structure.
use solana_idl::try_extract_classic_idl;
let idl_json = // read JSON from somewhere
let classic_idl = try_extract_classic_idl(idl_json).unwrap();
// If you want to save the classic IDL to a file to upload, etc. do the below
let classic_idl_json = serde_json::to_string(&classic_idl).unwrap();
MIT