Context
Yaci Store uses "lovelace" as the native currency unit internally, but the Rosetta API represents it as "symbol": "ADA" with "decimals": 6. The two terms are not handled consistently across endpoints (v2.1.1, preprod):
| Endpoint |
"symbol": "ADA" |
"symbol": "lovelace" |
/account/balance |
Works |
Error 4024 |
/account/coins |
Works |
Error 4024 |
/search/transactions |
Works |
Works |
| All responses |
"ADA" |
"ADA" |
The /search/transactions endpoint accepts "lovelace" due to checks at TxRepositoryCustomBase.java#L48 and #L57 that were not present in the original TypeScript implementation. Our docs also only reference "ADA".
Steps to reproduce
- Start the application connected to any network (preprod used for testing)
- Send a search request with
"lovelace" as currency symbol:
curl -s http://localhost:8082/search/transactions \
-H 'Content-Type: application/json' \
-d '{"network_identifier":{"blockchain":"cardano","network":"preprod"},
"currency":{"symbol":"lovelace","decimals":6},
"account_identifier":{"address":"addr_test1wz46ld96kucmcsmdsjnwf6p9p9mxjlq7z5gfwl405wtgj5se0d8tr"},
"limit":1}'
Result: 200 OK with results (accepts "lovelace")
- Send an account balance request with the same symbol:
curl -s http://localhost:8082/account/balance \
-H 'Content-Type: application/json' \
-d '{"network_identifier":{"blockchain":"cardano","network":"preprod"},
"account_identifier":{"address":"addr_test1wz46ld96kucmcsmdsjnwf6p9p9mxjlq7z5gfwl405wtgj5se0d8tr"},
"currencies":[{"symbol":"lovelace","decimals":6}]}'
Result: Error 4024 "Invalid token name"
- Send an account coins request with the same symbol:
curl -s http://localhost:8082/account/coins \
-H 'Content-Type: application/json' \
-d '{"network_identifier":{"blockchain":"cardano","network":"preprod"},
"account_identifier":{"address":"addr_test1wz46ld96kucmcsmdsjnwf6p9p9mxjlq7z5gfwl405wtgj5se0d8tr"},
"include_mempool":false,
"currencies":[{"symbol":"lovelace","decimals":6}]}'
Result: Error 4024 "Invalid token name"
Expected behavior
All endpoints should reject "lovelace" consistently.
In the Rosetta model, "symbol" names the currency and "decimals" describes the unit conversion. Our API returns "symbol": "ADA" with "decimals": 6, which already tells the client that values are in lovelace. Accepting "lovelace" as a symbol conflates the unit with the currency name. For comparison, Bitcoin Mesh uses "BTC" with decimals: 8, not "satoshi".
Context
Yaci Store uses
"lovelace"as the native currency unit internally, but the Rosetta API represents it as"symbol": "ADA"with"decimals": 6. The two terms are not handled consistently across endpoints (v2.1.1, preprod):"symbol": "ADA""symbol": "lovelace"/account/balance/account/coins/search/transactions"ADA""ADA"The
/search/transactionsendpoint accepts"lovelace"due to checks atTxRepositoryCustomBase.java#L48and#L57that were not present in the original TypeScript implementation. Our docs also only reference"ADA".Steps to reproduce
"lovelace"as currency symbol:Result: 200 OK with results (accepts
"lovelace")Result: Error 4024 "Invalid token name"
Result: Error 4024 "Invalid token name"
Expected behavior
All endpoints should reject
"lovelace"consistently.In the Rosetta model,
"symbol"names the currency and"decimals"describes the unit conversion. Our API returns"symbol": "ADA"with"decimals": 6, which already tells the client that values are in lovelace. Accepting"lovelace"as a symbol conflates the unit with the currency name. For comparison, Bitcoin Mesh uses"BTC"withdecimals: 8, not"satoshi".