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

Use This When

  • 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

Account Types

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.

Shared Flags

FlagUse it for
`—account-type programthird-partystandalone`Choose which ABI account derivation and signer rules apply.
—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.

Command Shapes

CommandSyntax
createthru-cli abi account create [FLAGS] <SEED> <ABI_FILE>
upgradethru-cli abi account upgrade [FLAGS] <SEED> <ABI_FILE>
finalizethru-cli abi account finalize [FLAGS] <SEED>
closethru-cli abi account close [FLAGS] <SEED>
getthru-cli abi account get <ABI_ACCOUNT> [—include-data] [—out <PATH>]

Minimal Patterns

thru-cli abi account create my_program ./program.abi.yaml

Common Workflows

Publish a managed program ABI

thru-cli program create my_program ./build/program.bin
thru-cli abi account create my_program ./program.abi.yaml
thru-cli abi account get --include-data ta...$abi_account

Upgrade before finalization

thru-cli abi account upgrade my_program ./program_v2.abi.yaml
thru-cli abi account get --include-data ta...$abi_account

Finalize once stable

thru-cli abi account finalize my_program

Common Failures

  • 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.
Use thru-cli --json abi account get ... when another tool or agent needs the result in a machine-readable form.