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
latest/height - Get latest block height.
latest/hash - Get latest block hash.
latest/block - Get latest block details.
getStateRoot - Get current state root.
block - Get a specific block details.
blocks - Get specific blocks details within a range of heights.
getAleoBlocks - Get specific blocks full content within a range of heights.
πΈ 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
getTransactionId - Get transaction ID from a transition ID.
transitionsWithoutRecordInputs - Get details of transitions that do not have record inputs within a range of heights from Aleo blockchain.
π 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
program - Get program source code corresponding to a specific program ID.
getProgramTypes - Get type of multiple programs from their IDs, ie: which standard they implement.
transactionsForProgram - Get all transactions involving a specific program ID and function name.
transactionsForProgramCount - Get the amount of transactions involving a specific program ID and function name.
generateDeployment - Delegate proof generation of a program deployment.
getGeneratedDeployment - Get deployment job status, result, error message.
πΊοΈ Mappings
getMappingValue - Get value of a mapping at a specific key.
π¨ NFTs
getPublicNFTsForAddress - Get public NFTs associated with a given address from Aleo blockchain.
getPublicTokenProgramsForAddress - Get all the IDs of token programs that an address interracted with publicly.
π° Coinbase
getCoinbaseRewards - Get the coinbase rewards associated with a given addres within a block range and page.
getCoinbaseSummary - Get the coinbase summary for a given address.
π¦ Staking
getStakedBalanceForAddress - Get the amount of Aleo credits a specific address has staked.
π Status
chainStatus - Get blockchain status details.
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:
Example
Here is an example of such a request using curl
command line program:
Which corresponding response is:
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