To support automatic testing of UTXO-based chains, we need greater visibility into the creation and destruction of "coins". This PR adds support for doing so with the concept of the Coin. Generic UTXOs in Rosetta have a coin_identifier, which can be any string (ex: Bitcoin would be tx_hash:index), and can be created or spent with CoinAction.
Because of this modeling abstraction, it is possible to support both UTXO-based transfers and account-based transfers at the same time.
Related Issue: #28
Changes
[x] add Coin, CoinIdentifier, CoinChange, and CoinAction model
[x] Add CoinChange as an optional field on Operation
[x] Add coins as an optional field in AccountBalanceResponse
To support automatic testing of UTXO-based chains, we need greater visibility into the creation and destruction of "coins". This PR adds support for doing so with the concept of the
Coin
. Generic UTXOs in Rosetta have acoin_identifier
, which can be any string (ex: Bitcoin would betx_hash:index
), and can be created or spent withCoinAction
.Because of this modeling abstraction, it is possible to support both UTXO-based transfers and account-based transfers at the same time.
Related Issue: #28
Changes
Coin
,CoinIdentifier
,CoinChange
, andCoinAction
modelCoinChange
as an optional field onOperation
coins
as an optional field inAccountBalanceResponse