Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Coin Model #30

Merged
merged 4 commits into from
Jul 25, 2020
Merged

Add Coin Model #30

merged 4 commits into from
Jul 25, 2020

Conversation

patrick-ogrady
Copy link
Contributor

@patrick-ogrady patrick-ogrady commented Jul 25, 2020

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

  • add Coin, CoinIdentifier, CoinChange, and CoinAction model
  • Add CoinChange as an optional field on Operation
  • Add coins as an optional field in AccountBalanceResponse
  • add descriptions

@patrick-ogrady patrick-ogrady mentioned this pull request Jul 25, 2020
5 tasks
@patrick-ogrady patrick-ogrady requested review from juliankoh, qiwu7, brockmiller and a team July 25, 2020 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants