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

cardano transfer: narrow credential relation filter #332

Merged
merged 2 commits into from
Mar 31, 2024

Conversation

ecioppettini
Copy link
Contributor

implements #325

Comment on lines 28 to 34
const relationFilter =
RelationFilterType.Output |
RelationFilterType.Input |
RelationFilterType.StakeRegistration |
RelationFilterType.StakeDeregistration |
RelationFilterType.StakeDelegation |
RelationFilterType.Withdrawal;
Copy link
Contributor

@SebastienGllmt SebastienGllmt Mar 26, 2024

Choose a reason for hiding this comment

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

Hmm, this way is possible I guess, but we'd have to be clear in the docs that users have to manually parse the transaction to know if the address appears in

  1. ins: Input, Withdrawal
  2. certs (arguably an ins type): StakeRegistration, StakeDeregistration, StakeDelegation
  3. outs: Output

since right now the CDE only gives you access to the Input and Output cases

Copy link
Contributor

@SebastienGllmt SebastienGllmt Mar 30, 2024

Choose a reason for hiding this comment

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

I can't think of a particular nice way to do this other than to include the tx cbor as well (as mentioned originally here: #262), but even tx cbor is not enough for everything (ex: it doesn't give you the datum for the tx)

Copy link
Contributor

@SebastienGllmt SebastienGllmt Mar 31, 2024

Choose a reason for hiding this comment

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

Also I just realized we can replace all input types with TxCredentialRelationValue.Witness

@SebastienGllmt SebastienGllmt merged commit 7929811 into master Mar 31, 2024
@SebastienGllmt SebastienGllmt deleted the enzo/cardano-transfer-update-filter branch March 31, 2024 18:14
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