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 extra fields to utxo events #47

Merged
merged 2 commits into from
Jan 22, 2025
Merged

Add extra fields to utxo events #47

merged 2 commits into from
Jan 22, 2025

Conversation

SupernaviX
Copy link
Collaborator

Add some fields to the wit definition of a "utxo" or "utxoundo" event:

  • block-hash is the hash of the utxo's block
  • block-height is the height of the utxo's block
  • tx-hash: is the hash of the tx which contains the output
  • index is the index of the output

As far as I can tell, other utxo-based chains would also have all of these fields associated with their utxos. So I think these all make sense to go in the wit, and don't need to be smuggled inside the utxo cbor (which is otherwise just straight-up utxorpc bytes)

wit/balius.wit Outdated
Comment on lines 82 to 84
block-hash: list<u8>,
block-height: u64,
tx-hash: list<u8>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we match the approach used in the ledger interface above?

something like:

utxo {
  body: cbor,
  tx: txo-ref,
  block: block-ref
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@SupernaviX SupernaviX merged commit dd56cd0 into main Jan 22, 2025
1 check passed
@SupernaviX SupernaviX deleted the utxo-tx-fields branch January 22, 2025 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants