hyperledger / identus-edge-agent-sdk-ts

Apache License 2.0
20 stars 10 forks source link

feat: Implement sd+jwt for issuance and verification flows with cloud agent #228

Closed elribonazo closed 3 months ago

elribonazo commented 3 months ago

Description:

Features

  1. Implement sd+jwt Issuance and Verification protocols for sd+jwt, tests and demo working with cloud agent.

  2. Implement new derivation paths Refactor the DerivationPath internally to now support different derivationSchemas which we can extend in a future, always keeps backwards compatibility between the old and new paths

Fixes and improvements

  1. Making all the disclosable for UI Helps user interface have a better experience by providing a simple function users can call to disclose any kind of credential claims that the EdgeAgent supports.

  2. Allow Apollo to create Public and PrismDIDPublicKeys and make other building blocks agnostic (castor, pollux) As we move towards separating the Agent from its core functionality even further with abstractions, some work is required to ensure domain separation between the different building blocks.

Castor was importing Secp256k1 from Apollo to create Secp256k1 keys, instead it will now call the Apollo function to createPublicKeys, prismDIDPublicKeys on demand. That benefits Castor and Pollux now.

  1. Add secp256k1 signature DER to raw normalisation Apollo is currently creating DER signatures for Secp256K1 and while this is not wrong the Cloud Agent will not be able to verify the signatures correctly.

We simply add 2 normalization functions in Secp256K1 PrivateKey and PublicKey, so that in case a DER signature is provided on verifying or signing it will automatically convert it. Apollo should probably fix this

BREAKING CHANGE:

Checklist:

github-actions[bot] commented 3 months ago
Lines Statements Branches Functions
Coverage: 74%
75.03% (2717/3621) 63.96% (1308/2045) 80.63% (712/883)

JUnit

Tests Skipped Failures Errors Time
483 6 :zzz: 0 :x: 0 :fire: 1m 11s :stopwatch: