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

Expose signer payload to allow external signing #861

Merged
merged 4 commits into from
Mar 15, 2023

Conversation

jsdw
Copy link
Collaborator

@jsdw jsdw commented Mar 14, 2023

This PR adds a few methods to client.tx(); create_partial_signed_with_nonce and create_partial_signed (to mirror create_signed_with_nonce and create_signed). These return a PartialExtrinsic, which just needs a signature to be turned into a "proper" extrinsic, and exposes a signer_payload() method to get back the signer payload that needs to be signed.

The added test is currently the best example of this flow. I'll do a documentation pass quite soon to add a bunch of examples and document some common flows and such.

Closes #836

@jsdw jsdw requested a review from a team March 15, 2023 10:59
Copy link
Collaborator

@lexnv lexnv left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

Copy link
Member

@niklasad1 niklasad1 left a comment

Choose a reason for hiding this comment

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

clean 👍

@jsdw jsdw merged commit f2b03d8 into master Mar 15, 2023
@jsdw jsdw deleted the jsdw-expose-signer-payload branch March 15, 2023 13:28
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.

How can we sign things via a browser?
3 participants