Skip to main content
Generate ABI (Application Binary Interface) from an Aleo bytecode file. This command reads a .aleo file and produces a JSON representation of the program’s interface.

Usage

Arguments

string
required
Path to the .aleo bytecode file

Options

string
default:"testnet"
Network for parsing. Valid values:
  • mainnet - Mainnet network
  • testnet - Testnet network (default)
  • canary - Canary network
string
Output file path. If not specified, prints to stdout.

Examples

Generate ABI to stdout

Generate ABI to file

Generate ABI for mainnet

Output Format

The generated ABI is a JSON file describing the program’s interface:

Use Cases

  • Documentation - Generate API documentation for your program
  • Integration - Provide ABI to frontend applications for integration
  • Tooling - Build tools that interact with Leo programs
  • Analysis - Analyze program interfaces and dependencies
  • Build - Compile Leo programs to bytecode
  • Deploy - Deploy programs to network

Troubleshooting

File not found

Ensure the .aleo file path is correct and the file exists:

Invalid .aleo file

The file must be valid Aleo bytecode. If you have a Leo source file, compile it first: