pub enum IdlCommand {
Init {
program_id: Pubkey,
filepath: String,
priority_fee: Option<u64>,
},
Close {
program_id: Pubkey,
idl_address: Option<Pubkey>,
print_only: bool,
priority_fee: Option<u64>,
},
WriteBuffer {
program_id: Pubkey,
filepath: String,
priority_fee: Option<u64>,
},
SetBuffer {
program_id: Pubkey,
buffer: Pubkey,
print_only: bool,
priority_fee: Option<u64>,
},
Upgrade {
program_id: Pubkey,
filepath: String,
priority_fee: Option<u64>,
},
SetAuthority {
address: Option<Pubkey>,
program_id: Pubkey,
new_authority: Pubkey,
print_only: bool,
priority_fee: Option<u64>,
},
EraseAuthority {
program_id: Pubkey,
priority_fee: Option<u64>,
},
Authority {
program_id: Pubkey,
},
Build {
program_name: Option<String>,
out: Option<String>,
out_ts: Option<String>,
no_docs: bool,
skip_lint: bool,
cargo_args: Vec<String>,
},
Fetch {
address: Pubkey,
out: Option<String>,
},
Convert {
path: String,
out: Option<String>,
program_id: Option<Pubkey>,
},
Type {
path: String,
out: Option<String>,
},
}Variants§
Init
Initializes a program’s IDL account. Can only be run once.
Close
Fields
idl_address: Option<Pubkey>The IDL account to close. If none is given, then the IDL account derived from program_id is used.
WriteBuffer
Writes an IDL into a buffer account. This can be used with SetBuffer to perform an upgrade.
SetBuffer
Sets a new IDL buffer for the program.
Fields
Upgrade
Upgrades the IDL to the new file. An alias for first writing and then then setting the idl buffer account.
SetAuthority
Sets a new authority on the IDL account.
Fields
address: Option<Pubkey>The IDL account buffer to set the authority of. If none is given, then the canonical IDL account is used.
New authority of the IDL account.
EraseAuthority
Command to remove the ability to modify the IDL account. This should likely be used in conjection with eliminating an “upgrade authority” on the program.
Authority
Outputs the authority for the IDL account.
Build
Generates the IDL for the program using the compilation method.
Fields
Fetch
Fetches an IDL for the given address from a cluster. The address can be a program, IDL account, or IDL buffer.
Convert
Convert legacy IDLs (pre Anchor 0.30) to the new IDL spec
Fields
Type
Generate TypeScript type for the IDL
Trait Implementations§
Source§impl CommandFactory for IdlCommand
impl CommandFactory for IdlCommand
Source§impl Debug for IdlCommand
impl Debug for IdlCommand
Source§impl FromArgMatches for IdlCommand
impl FromArgMatches for IdlCommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for IdlCommand
impl Parser for IdlCommand
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Source§impl Subcommand for IdlCommand
impl Subcommand for IdlCommand
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand