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
- 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.
| Type | Use it for | Seed input | Signer flag | Extra requirement |
|---|---|---|---|---|
program | ABI for a managed program you control. | The managed program seed. | --authority | None |
third-party | ABI for a program you do not control. | A 32-byte hex seed. | --publisher | --target-program is required |
standalone | ABI not tied to a specific program. | A standalone seed string. | --publisher | None |
--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
| Flag | Use it for | ||
|---|---|---|---|
| `—account-type program | third-party | standalone` | Choose which ABI account derivation and signer rules apply. |
—target-program <ADDRESS> | Required for third-party accounts. | ||
--ephemeral | Match 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-data | Include ABI YAML contents when using get. | ||
—out <PATH> | Write ABI YAML contents from get to a file. |
Command Shapes
| Command | Syntax |
|---|---|
create | thru-cli abi account create [FLAGS] <SEED> <ABI_FILE> |
upgrade | thru-cli abi account upgrade [FLAGS] <SEED> <ABI_FILE> |
finalize | thru-cli abi account finalize [FLAGS] <SEED> |
close | thru-cli abi account close [FLAGS] <SEED> |
get | thru-cli abi account get <ABI_ACCOUNT> [—include-data] [—out <PATH>] |
Minimal Patterns
Common Workflows
Publish a managed program ABI
Upgrade before finalization
Finalize once stable
Common Failures
third-partyaccounts require--target-program. Without it, the command cannot derive the ABI account.upgradeandclosefail once an ABI account has been finalized.- The
seedmeaning changes with--account-type, so do not reuse a human-readable standalone seed where a third-party 32-byte hex seed is expected. gettakes an ABI account address, not the original program seed.