Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Sign, recover, verify, and validate functions (release/21.0.x branch) #654

Merged
merged 5 commits into from
Jan 23, 2020

Conversation

bradlhart
Copy link
Contributor

Change Description

Adding functions that were available in eosjs-ecc to PrivateKey/PublicKey/Signature classes to handle the format conversions and call elliptic functions.

Second PR to cherry pick commits to release/21.0.x branch

API Changes

  • API Changes

PrivateKey.getPublicKey(): Retrieve the public key from a private key
PrivateKey.sign(): Sign a message digest with private key

PublicKey.validate(): Validate a public key

Signature.verify(): Verify a signature with a message digest and public key
Signature.recoverPublicKey(): Recover a public key from a message digest and signature

constructElliptic() in eosjs-key-conversions.js: Used for PrivateKey, PublicKey, Signature

Documentation Additions

  • Documentation Additions

Bradley Hart added 5 commits January 23, 2020 15:43
Added/adjusted tests

Adjusted JsSignatureProvider to use new sign method
Moving constructElliptic to a central location
@jlamarr22 jlamarr22 merged commit 87ac6b3 into release/21.0.x Jan 23, 2020
@jlamarr22 jlamarr22 deleted the ecc-pkg-functions branch January 23, 2020 21:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants