Skip to content

Account

View as Markdown

Use thru abi account when you are publishing ABI YAML to chain state or reading an existing ABI account back out.

  • you are attaching an ABI to a managed program you control
  • you are publishing a third-party or standalone ABI account
  • you need to inspect an ABI account address and optionally export its YAML contents

Choose another ABI command when:

  • you want to generate client code locally: Codegen
  • you want to validate or inspect ABI types without touching chain state: Analyze
  • you want to decode a captured binary payload: Reflect

Program

Use for the official ABI attached to a managed program you control.

Third-Party

Use when you are publishing an ABI for someone else’s deployed program.

Standalone

Use for shared type packages or ABI files not tied to one program account.

TypeUse it forSeed inputSigner flagExtra requirement
programABI for a managed program you control.The managed program seed.--authorityNone
third-partyABI for a program you do not control.A 32-byte hex seed.--publisher--target-program is required
standaloneABI not tied to a specific program.A standalone seed string.--publisherNone

--authority is still accepted as a compatibility alias for non-program account types, but --publisher is the clearer choice for third-party and standalone flows.

FlagUse it for
`—account-type programthird-party
—target-program <ADDRESS>Required for third-party accounts.
--ephemeralMatch ephemeral program mode when the ABI targets an ephemeral program.
—authority <KEY_NAME>Choose the configured authority key for program ABIs.
—publisher <KEY_NAME>Choose the configured publisher key for third-party and standalone ABIs.
—fee-payer <KEY_NAME>Override the configured fee payer for state-changing commands.
--include-dataInclude ABI YAML contents when using get.
—out <PATH>Write ABI YAML contents from get to a file.
CommandSyntax
createthru abi account create [FLAGS] <SEED> <ABI_FILE>
upgradethru abi account upgrade [FLAGS] <SEED> <ABI_FILE>
finalizethru abi account finalize [FLAGS] <SEED>
closethru abi account close [FLAGS] <SEED>
getthru abi account get <ABI_ACCOUNT> [—include-data] [—out <PATH>]
Terminal window
thru abi account create my_program ./program.abi.yaml
Terminal window
thru program create my_program ./build/program.bin
thru abi account create my_program ./program.abi.yaml
thru abi account get --include-data ta...$abi_account
Terminal window
thru abi account upgrade my_program ./program_v2.abi.yaml
thru abi account get --include-data ta...$abi_account
Terminal window
thru abi account finalize my_program
  • third-party accounts require --target-program. Without it, the command cannot derive the ABI account.
  • upgrade and close fail once an ABI account has been finalized.
  • The seed meaning changes with --account-type, so do not reuse a human-readable standalone seed where a third-party 32-byte hex seed is expected.
  • get takes an ABI account address, not the original program seed.