-
Notifications
You must be signed in to change notification settings - Fork 87
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
Condition and fulfillment in escrow #698
base: main
Are you sure you want to change the base?
Conversation
from typing import Dict, Optional, TypedDict | ||
|
||
# CK: TODO Find a py.typed or library stub for cryptoconditions | ||
from cryptoconditions import PreimageSha256 # type: ignore |
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.
Please let me know if you have any ideas to get mypy
to work with a cryptographic library
cancel_after=datetime_to_ripple_time(datetime.now()) + 100, | ||
) | ||
|
||
create_escrow_response = submit_and_wait(create_tx, client, wallet1) |
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.
I have empirically observed that the generated cryptographic condition always begins with A0258020...
and ends with ...810120
. I don't have statistical numbers to prove my point, but the outputs from this library do not appear random, despite varying secret inputs.
… into conditionalEscrow
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
High Level Overview of Change
Provide utility functions to generate cryptographic condition and fulfillment for conditional escrows.
Type of Change
Did you update CHANGELOG.md?
Test Plan
Included unit test and snippet test to validate the working of
generate_crypto_conditions
function.This work was inspired by the PR by author and also the XRPL tutorials
Many thanks to both these sources.