cardano-foundation / cardano-foundation/cardano-rosetta-java
Document coin_change behavior correctly
- Dominant language
- Java
- Stars
- 26
- Forks
- 15
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 2
Description
### Context & versions
cardano-rosetta-java 1.3.x - Construction vs Data API endpoints
### Problem
Documentation needs to clarify `coin_change` requirements.
### Current behavior
**Construction API:**
```json
// Input operation - MUST include coin_change
{
"type": "input",
"coin_change": {
"coin_identifier": {"identifier": "txhash:0"}, // REQUIRED - tells API which UTXO to spend
"coin_action": "coin_spent"
}
}
// Output operation - coin_identifier not possible yet
{
"type": "output"
// coin_identifier missing (tx hash doesn't exist yet)
// coin_action could be present but coin_identifier cannot
}
```
**Data API (confirmed working):**
```json
// ✅ Both inputs and outputs have complete coin_change
{
"type": "input",
"coin_change": {"coin_action": "coin_spent", "coin_identifier": {...}}
},
{
"type": "output",
"coin_change": {"coin_action": "coin_created", "coin_identifier": {...}}
}
```
### Tasks
- [ ] Document that inputs MUST have coin_identifier in construction
- [ ] Document that outputs CANNOT have coin_identifier in construction (no tx hash yet)
- [ ] Confirm both implementations follow this pattern
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.