Skip to content

Docs for adding arbitrary datum value to .add_output method #116

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

Closed
peterVG opened this issue Oct 29, 2022 · 2 comments
Closed

Docs for adding arbitrary datum value to .add_output method #116

peterVG opened this issue Oct 29, 2022 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@peterVG
Copy link
Contributor

peterVG commented Oct 29, 2022

This works:

builder.add_output(TransactionOutput.from_primitive([outaddress, 99900000]))

But now I would like to add some arbitrary datum value to my output UTXO. This doesn't work:

builder.add_output(TransactionOutput.from_primitive([outaddress, 99900000, datum="my_value"]))

Neither does:

builder.add_output(TransactionOutput(Datum.from_primitive("my_value")))
@cffls cffls added the documentation Improvements or additions to documentation label Oct 29, 2022
@peterVG peterVG changed the title Feature request: documentation enhancements for TransactionBuilder Documentation enhancements for TransactionBuilder Oct 29, 2022
@peterVG peterVG changed the title Documentation enhancements for TransactionBuilder Document .add_output method for TransactionBuilder Oct 30, 2022
@peterVG peterVG changed the title Document .add_output method for TransactionBuilder Document how to add arbitrary datum value to .add_output method for TransactionBuilder Oct 30, 2022
@peterVG peterVG changed the title Document how to add arbitrary datum value to .add_output method for TransactionBuilder Docs for adding arbitrary datum value to .add_output method Oct 30, 2022
@cffls
Copy link
Collaborator

cffls commented Jan 30, 2023

The docstring of TransactionOutput already provided a datum field. I think it is straightforward to write correct code by following typings in the doc string. Do you think we can close this one or if there is anything you think is missing?

@peterVG
Copy link
Contributor Author

peterVG commented Jan 30, 2023

Yes. Agreed. Thanks for the extra context and keep up the great work!

@peterVG peterVG closed this as completed Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants