[OUTDATED] Automated Construction API Testing

Following the release of the Rosetta Construction API late last month, we are excited to announce that we have added support for automatically testing these endpoints in rosetta-cli@v0.4.0.

You can now use the rosetta-cli to perform an automated test of transaction construction, signing, and broadcast just by populating a configuration file. But wait, there’s more! This tool also confirms the transactions it broadcasts land on-chain and that they match the “intent” provided during construction, without any human intervention. In other words, it checks if the transaction it meant to create is what actually shows up on-chain!

Getting Started

Start a Rosetta implementation

Start any Rosetta implementation that implements both the Data API and Construction API. We will use the Construction API to create our transactions and will use the Data API to confirm those transactions landed on-chain.

Start the rosetta-cli

In a separate terminal, run the rosetta-cli check:construction command with a configuration file that specifies how to construct a transfer (Ethereum example).

Load Testnet Funds

The rosetta-cli will prompt you to fund an address it creates with testnet funds (Ethereum Faucet). Because the rosetta-cli saves the addresses it creates, you will only need to perform this step the first time you run this command!

Sit back and Relax

The rest (address generation, fund management, transaction creation, on-chain confirmation, etc.) is fully automatic.

Automated Testing with an Ethereum Implementation of Rosetta

To show how this tool works, we created a demo using our Ethereum Rosetta implementation.

Our Ethereum implementation is not public, however, we hope to release it soon!

Example Configuration Files

Before creating a configuration file for your implementation, we recommend taking a look at the Bitcoin and Ethereum rosetta-cli configuration files. You can read detailed descriptions of all possible configuration options here and can view the default configuration file here.


If you have any questions about the Construction API, please post in the Construction API category!

If you’ve created a Rosetta implementation, please share it in the Ecosystem category for others to check out!