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

fix(Pluto): encoding / decoding PrivateKeys #78

Merged
merged 1 commit into from
Aug 22, 2023
Merged

Conversation

curtis-h
Copy link
Contributor

@curtis-h curtis-h commented Aug 18, 2023

Description

  • Added some helper functions for conversions to the different PrivateKeys
  • Pluto:
    • changed to use PrivateKey.to.Hex and PrivateKey.from.Hex for the conversions, so all keys convert into a legible string and back
    • storePrivateKeys: changed to store as hex
    • getAllPeerDids: changed to convert from hex
    • getDIDPrivateKeysByDID: changed to handle Secp256 and convert from hex
    • getDIDPrivateKeyByID: changed to handle Secp256 and convert from hex
  • Added unit tests for simple cases

Jira link

https://input-output.atlassian.net/browse/ATL-5537

Checklist

  • Self-reviewed the diff
  • New code has inline documentation
  • New code has proper comments/tests
  • Any changes not covered by tests have been tested manually

@curtis-h curtis-h self-assigned this Aug 18, 2023
@curtis-h curtis-h changed the title Fix(Pluto): encoding / decoding PrivateKeys fix(Pluto): encoding / decoding PrivateKeys Aug 18, 2023
@curtis-h curtis-h force-pushed the fix/ATL-5537 branch 3 times, most recently from 2e239b1 to 22fa289 Compare August 21, 2023 10:28
@github-actions
Copy link

github-actions bot commented Aug 21, 2023

Coverage report

Branches coverage not met for global: expected >=30%, but got 22.52836304700162%

St.
Category Percentage Covered / Total
🔴 Statements
34.7% (+0.58% 🔼)
1360/3919
🔴 Branches
22.53% (+0.11% 🔼)
556/2468
🔴 Functions
35.32% (+1.44% 🔼)
408/1155
🔴 Lines
35.41% (+0.59% 🔼)
1331/3759

Test suite run success

113 tests passing in 23 suites.

Report generated by 🧪jest coverage report action from 29df198

@curtis-h curtis-h merged commit b9133ac into master Aug 22, 2023
4 checks passed
@curtis-h curtis-h deleted the fix/ATL-5537 branch August 22, 2023 09:41
atala-dev added a commit that referenced this pull request Aug 23, 2023
# [2.2.0](v2.1.0...v2.2.0) (2023-08-23)

### Bug Fixes

* **Pluto:** encoding / decoding PrivateKeys ([#78](#78)) ([b9133ac](b9133ac))

### Features

* **Castor:** extending createPrismDID to accept a KeyPair or PublicKey ([#70](#70)) ([d06871c](d06871c))
* **Demo:** Update Mediator DID for demo apps ([#73](#73)) ([7f3c98e](7f3c98e))
github-actions bot pushed a commit that referenced this pull request Aug 23, 2023
# [2.2.0](v2.1.0...v2.2.0) (2023-08-23)

### Bug Fixes

* **Pluto:** encoding / decoding PrivateKeys ([#78](#78)) ([b9133ac](b9133ac))

### Features

* **Castor:** extending createPrismDID to accept a KeyPair or PublicKey ([#70](#70)) ([d06871c](d06871c))
* **Demo:** Update Mediator DID for demo apps ([#73](#73)) ([7f3c98e](7f3c98e))
mixmix pushed a commit to mixmix/atala-prism-wallet-sdk-ts that referenced this pull request May 6, 2024
Signed-off-by: Francisco Javier Ribó Labrador <elribonazo@gmail.com>
mixmix pushed a commit to mixmix/atala-prism-wallet-sdk-ts that referenced this pull request May 6, 2024
# [2.2.0](hyperledger/identus-edge-agent-sdk-ts@v2.1.0...v2.2.0) (2023-08-23)

### Bug Fixes

* **Pluto:** encoding / decoding PrivateKeys ([hyperledger#78](hyperledger#78)) ([b9133ac](hyperledger@b9133ac))

### Features

* **Castor:** extending createPrismDID to accept a KeyPair or PublicKey ([hyperledger#70](hyperledger#70)) ([d06871c](hyperledger@d06871c))
* **Demo:** Update Mediator DID for demo apps ([hyperledger#73](hyperledger#73)) ([7f3c98e](hyperledger@7f3c98e))

Signed-off-by: Francisco Javier Ribó Labrador <elribonazo@gmail.com>
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.

2 participants