Aleo RPC API

An RPC API made to enable more diverse use cases and support many DApps in the Aleo ecosystem. It is currently used to support the Leo Wallet and follows the JSON-RPC 2.0 specification.

Available methods

πŸ“š Blocks

πŸ’Έ Transactions

  • transaction - Get transaction details with a specific transaction ID.

  • aleoTransaction - Get transaction full content corresponding to a specific transaction ID.

  • transactions - Get transactions details included in a specific block.

  • getPublicTransactionsForAddress - Get IDs of public transactions associated with a given address within a range of block heights.

  • generateTransaction - Delegate generation of a transaction proof by providing an authorization and transaction inputs.

  • getGeneratedTransaction - Get transaction generation job status, result, error message.

πŸ”„ Transitions

πŸ“ Records

  • records/all - Get all records generated within a range of blocks from the server.

  • records/isOwner - Get minimal information needed to verify ownership for records within a given block range on the Aleo blockchain.

  • records/byTransitionAndIndex - Get a specific record from id of transition where it got generarated and output index of it in this transition.

  • serialNumbers - Get information for a list of serial numbers.

  • getStatePath - Get state path for a specific commitment.

πŸ“‘ Programs

πŸ—ΊοΈ Mappings

🎨 NFTs

πŸ’° Coinbase

🏦 Staking

πŸ“Š Status

Usage

Call a method

Any method above can be called by submitting a POST HTTP request to the unique endpoint corresponding to desired network, as described in JSON-RPC 2.0 specification.

This request should include a body with the following structure:

{ 
  "jsonrpc": "2.0", 
  "id": 1, 
  "method": "...",
  (optional) "params": [...]
}

Example

Here is an example of such a request using curl command line program:

curl \
  --request POST \
  --location 'https://testnet3.aleorpc.com' \
  --header 'Content-Type: application/json' \
  --data-raw '{ 
    "jsonrpc": "2.0", 
    "id": 1, 
    "method": "getHeight",
  }'

Which corresponding response is:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": 1470801
}

Networks

Networks supported by the API:

Status of these endpoints is available on the Official Leo Status Page.

Disclaimer

This API is free to use but rate limiting may be introduced to prevent spamming at any point.

Last updated