pub enum IdlCommand {
    Init {
        program_id: Pubkey,
        filepath: String,
    },
    WriteBuffer {
        program_id: Pubkey,
        filepath: String,
    },
    SetBuffer {
        program_id: Pubkey,
        buffer: Pubkey,
    },
    Upgrade {
        program_id: Pubkey,
        filepath: String,
    },
    SetAuthority {
        address: Option<Pubkey>,
        program_id: Pubkey,
        new_authority: Pubkey,
    },
    EraseAuthority {
        program_id: Pubkey,
    },
    Authority {
        program_id: Pubkey,
    },
    Parse {
        file: String,
        out: Option<String>,
        out_ts: Option<String>,
        no_docs: bool,
    },
    Fetch {
        address: Pubkey,
        out: Option<String>,
    },
}

Variants§

§

Init

Fields

§program_id: Pubkey
§filepath: String

Initializes a program’s IDL account. Can only be run once.

§

WriteBuffer

Fields

§program_id: Pubkey
§filepath: String

Writes an IDL into a buffer account. This can be used with SetBuffer to perform an upgrade.

§

SetBuffer

Fields

§program_id: Pubkey
§buffer: Pubkey

Address of the buffer account to set as the idl on the program.

Sets a new IDL buffer for the program.

§

Upgrade

Fields

§program_id: Pubkey
§filepath: String

Upgrades the IDL to the new file. An alias for first writing and then then setting the idl buffer account.

§

SetAuthority

Fields

§address: Option<Pubkey>

The IDL account buffer to set the authority of. If none is given, then the canonical IDL account is used.

§program_id: Pubkey

Program to change the IDL authority.

§new_authority: Pubkey

New authority of the IDL account.

Sets a new authority on the IDL account.

§

EraseAuthority

Fields

§program_id: Pubkey

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

Fields

§program_id: Pubkey

The program to view.

Outputs the authority for the IDL account.

§

Parse

Fields

§file: String

Path to the program’s interface definition.

§out: Option<String>

Output file for the IDL (stdout if not specified).

§out_ts: Option<String>

Output file for the TypeScript IDL.

§no_docs: bool

Suppress doc strings in output

Parses an IDL from source.

§

Fetch

Fields

§address: Pubkey
§out: Option<String>

Output file for the idl (stdout if not specified).

Fetches an IDL for the given address from a cluster. The address can be a program, IDL account, or IDL buffer.

Trait Implementations§

Build a Command that can instantiate Self. Read more
Build a Command that can update self. Read more
Formats the value using the given formatter. Read more
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Assign values from ArgMatches to self.
Assign values from ArgMatches to self.
Parse from std::env::args_os(), exit on error
Parse from std::env::args_os(), return Err on error.
Parse from iterator, exit on error
Parse from iterator, return Err on error.
Update from iterator, exit on error
Update from iterator, return Err on error.
Append to Command so it can instantiate Self. Read more
Append to Command so it can update self. Read more
Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more