A Rosetta API implementation for the Mochimo blockchain.
- Build:
docker build -t mochimo-mesh .
- Run:
docker run -p 8080:8080 -p 2095:2095 --name mochimo-mesh mochimo-mesh
- Stop:
docker stop mochimo-mesh
- Remove container (after stopping):
docker rm mochimo-mesh
- View logs:
docker logs mochimo-mesh
- View running containers:
docker ps
Lists supported networks (currently only Mochimo mainnet).
curl -X POST http://localhost:8080/network/list
Returns current blockchain status including latest block.
curl -X POST http://localhost:8080/network/status \
-d '{"network_identifier":{"blockchain":"mochimo","network":"mainnet"}}'
Retrieves block data by index or hash.
curl -X POST http://localhost:8080/block \
-d '{
"network_identifier": {"blockchain":"mochimo","network":"mainnet"},
"block_identifier": {"index":123456}
}'
Retrieves specific transaction from a block.
curl -X POST http://localhost:8080/block/transaction \
-d '{
"network_identifier": {"blockchain":"mochimo","network":"mainnet"},
"block_identifier": {"index":123456},
"transaction_identifier": {"hash":"0x..."}
}'
Retrieves account balance and block information.
curl -X POST http://localhost:8080/account/balance \
-d '{
"network_identifier": {"blockchain":"mochimo","network":"mainnet"},
"account_identifier": {"address":"0x..."}
}'
Used for creating and submitting transactions. All endpoints require network_identifier.
/construction/derive
- Derives address from public key/construction/preprocess
- Prepares transaction construction/construction/metadata
- Gets transaction metadata/construction/payloads
- Creates unsigned transaction/construction/combine
- Combines signatures with transaction/construction/submit
- Submits signed transaction
Mochimo supports several transaction patterns:
-
Tagged to Tagged Address:
- Source uses tag identifier
- Destination uses different tag
- Change returns to source tag
-
Tagged to WOTS:
- Source uses tag
- Destination uses full WOTS address
- Change returns to source tag
-
WOTS to Tagged:
- Source uses full WOTS
- Destination uses tag
- Change goes to new WOTS
-
WOTS to WOTS:
- All addresses use full WOTS format
- Requires new change address
- WOTS addresses: 2208 bytes
- Tagged addresses: 12 bytes
- Currency: MCM (9 decimals)
- Amount format: nanoMCM (1 MCM = 10^9 nanoMCM)
- Signature scheme: WOTS+ (Winternitz One-Time Signature Plus)
The API returns standardized errors with the following structure:
{
"code": 1,
"message": "Invalid request",
"retriable": false
}
Code | Message | Retriable | Description |
---|---|---|---|
1 | Invalid request | false | Malformed or invalid request |
2 | Internal general error | true | Server-side error |
3 | Transaction not found | true | TX doesn't exist |
4 | Account not found | true | Account doesn't exist |
5 | Wrong network identifier | false | Invalid network specified |
6 | Block not found | true | Block doesn't exist |
7 | Wrong curve type | false | Must use "wotsp" |
8 | Invalid account format | false | Malformed address |
Retriable errors may succeed on retry. Non-retriable errors require request modification.