-
Notifications
You must be signed in to change notification settings - Fork 62
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
NativeScript signing #1599
NativeScript signing #1599
Conversation
Thanks for submitting this @Riley-Kilgore. @AngelCastilloB, who is the best candidate for review, will be back on Monday. In the mean-time, would you mind re-working your commits to follow Conventional Commits? This product has an automatic release process that requires formatting in this way to generate the changelog. Sorry, we're missing a contributor guide |
d5028bb
to
f855e12
Compare
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.
Thanks for the PR @Riley-Kilgore ❤️ . I made a small change request, additionally, for this change to be effective we need to:
add a new property here:
probably 'scripts' ?,
Then we need to use that new property to pass into ownSignatureKeyPaths
in this two places:
const signatureKeyPaths = uniqWith( | |
[...ownSignatureKeyPaths(txBody, knownAddresses, txInKeyPathMap, dRepKeyHash), ...additionalKeyPaths], | |
deepEquals |
const derivationPaths = ownSignatureKeyPaths(body, knownAddresses, txInKeyPathMap, dRepKeyHash); |
Additionally would be great to add some unit test to the change to ownSignatureKeyPaths
here:
util.ownSignatureKeyPaths(txBody, knownAddresses, { |
As a side note, this will only enable signing transactions with native scripts with in-memory wallets. For hardware wallets, we need to somehow tell the devices to sign with these keys found on the scripts (currently they only parse the body data), I think they allow to specify additional key paths for signing as options, but I am not sure, we need to check. There is a workaround for this, and is to add the key hashes present on the scripts on the DApp side to the requieredExtraSigners field in the transaction body:
6c37f72
to
8a7a723
Compare
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.
LGTM @Riley-Kilgore , thanks for the contribution. adding @mkazlauskas and @mirceahasegan for review
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.
Thanks for contribution! ❤️
8a7a723
to
85befa6
Compare
85befa6
to
255d0d5
Compare
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.
Fantastic work @Riley-Kilgore 👏 . Thank you
Context
Lace currently fails to identify when it is being requested to sign a transaction on behalf of a NativeScript where it's signature may be one of the signatures required by that NativeScript.
Proposed Solution
Evaluate NativeScript(s) used as witnesses to determine keypaths which must be used to sign (if any).
Important Changes Introduced
Added the capability described above to enhance Lace's functionality with CIP-30 dApps that leverage NativeScripts.