-
Notifications
You must be signed in to change notification settings - Fork 134
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
represent whether signed and/or proven within Transaction
type + rework prove
method
#1567
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@harrysolovay it would be nice if you added an entry about all of the new chaining methods in CHANGELOG.md
The prove()
change in particular belongs under breaking changes because .prove()
returns the proofs in a different format now
Given that the changelog is part of the codebase, the commit range would be self-referential. I'm not sure what the o1js workflow is for including this range. Any guidance for where to / how to set up the contents for the next changelog? |
Transaction
type + rework prove
method
Don't change any commit range - just include a bullet point with your change and a link to this PR |
Hey @harrysolovay, as a next step it would be nice to merge main, so that we can run the ci pipeline again |
….prove() to ensure correct data extraction
…ansaction.prove() to correctly get proof data This change is necessary because the previous implementation was not correctly extracting the proof data from the transaction.prove() promise.
@MartinMinkov thank you for getting this passed the finish line! |
Closes #1514
Updates the
Transaction
andTransactionPromise
types with two type paramsProven extends boolean
andSigned extends boolean
. This enables us to do the following.1. conditionally include/exclude members based on stage of method chaining.
2. Constrain transaction-accepting methods based on the transaction stage.
An additional change that was needed to make this possible: the
prove
method no longer directly returns the proofs, but rather aTransaction<true, Signed>
, wheretrue
is the boolean type param representing whether the transaction has been proven.TransactionPromise
has a correspondingprove
method, which produces aTransactionPromise<Signed, true>
.In order to access the actual proofs, one can utilize the
proofs
method of a givenTransaction<true, boolean>
orTransactionPromise<true, boolean>
.