thru-cli abi command manages on-chain ABI accounts that store program interface definitions. ABIs describe the instructions, accounts, and data structures that a program exposes, enabling clients and tools to interact with programs in a type-safe way.
Prerequisites
- CLI setup with configured keys and RPC endpoint
- An ABI definition file in YAML format
- For official ABIs: a deployed managed program
ABI Account Types
Thru supports three types of on-chain ABI accounts, each suited to different use cases:Official
Tied to a managed program. Only the program authority can create and update it. This is the standard choice for program authors publishing their own ABI.
Third-Party
Created by anyone for an existing program they do not control. Useful for community-contributed ABIs or when the program author has not published one.
Standalone
Not associated with any specific program. Useful for shared type libraries or reusable ABI definitions.
Command Overview
Create
Upload a new ABI to the blockchain
Upgrade
Replace the ABI data on an existing account
Finalize
Make an ABI account permanently immutable
Close
Remove an ABI account and reclaim balance
Get
Inspect an ABI account and optionally export its contents
Create
Upload a new ABI definition to the blockchain. Choose the variant that matches your use case.Official ABI
Create an ABI account linked to a managed program you control.Seed for the managed program meta account. Must match the seed used when creating the program.
Path to the ABI definition YAML file.
Set if the managed program uses ephemeral accounts.
Authority account name from your configuration.
Account to pay transaction fees.
Third-Party ABI
Create an ABI account for a program you do not own.Public key (Thru address) of the target program.
32-byte hex seed for the third-party ABI meta account.
Path to the ABI definition YAML file.
Ephemeral flag for the ABI account.
Authority account name from your configuration.
Account to pay transaction fees.
Standalone ABI
Create an ABI account not associated with any program.Seed string used to derive the standalone ABI meta seed.
Path to the ABI definition YAML file.
Ephemeral flag for the ABI account.
Authority account name from your configuration.
Account to pay transaction fees.
Upgrade
Replace the ABI data on an existing account with a new YAML file. The account must not be finalized.Official ABI
Seed for the managed program meta account.
Path to the updated ABI definition YAML file.
Set if the managed program uses ephemeral accounts.
Authority account name from your configuration.
Account to pay transaction fees.
Third-Party ABI
Standalone ABI
Finalize
Make an ABI account permanently immutable. Once finalized, the ABI data can never be changed or deleted.Official ABI
Seed for the managed program meta account.
Set if the managed program uses ephemeral accounts.
Authority account name from your configuration.
Account to pay transaction fees.
Third-Party ABI
Standalone ABI
Close
Close an ABI account and reclaim its balance. The account must not be finalized.Official ABI
Seed for the managed program meta account.
Set if the managed program uses ephemeral accounts.
Authority account name from your configuration.
Account to pay transaction fees.
Third-Party ABI
Standalone ABI
Get
Inspect an ABI account’s metadata and optionally export the ABI YAML contents to the terminal or a file.Public key (Thru address) of the ABI account to inspect.
Whether to include the ABI YAML contents in the output. Set to
Y to display, N to show only metadata.File path to write the ABI YAML contents to. Useful for downloading an on-chain ABI for local use.