-
Notifications
You must be signed in to change notification settings - Fork 204
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
feat: add anoncreds-rs package #1275
feat: add anoncreds-rs package #1275
Conversation
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
…redential defs Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Co-authored-by: Ariel Gentile <[email protected]> Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
…ProofRequest Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
…s using anoncreds-rs Signed-off-by: Ariel Gentile <[email protected]>
@genaris awesome work! Excited for the refactoring! As I am looking though the files it’s still not clear to me where the ledger transactions are happening? If I wanted to plug in cheqd and the cardano drivers what’s the entry point to do that? It seems to me that the Indy driver is embedded in the anoncreds-rs repo but I may be wrong since I’m not familiar with rust! Thank you! |
Thanks! We are pretty close to complete the puzzle. We can probably discuss about it in next WG call, but basically the idea is that AnonCreds module ( For integration with Cardano, Cheqd and other VDRs, you will need to create your own implementation of AnonCredsRegistry interface and register it into the AnonCreds module. This is the equivalent of the work being done in #1270 for Indy VDR. In addition, you may need to create a DID Registrar and a DID Resolver for your ledger and register them in Agent's |
Signed-off-by: Ariel Gentile <[email protected]>
@@ -0,0 +1,42 @@ | |||
{ | |||
"name": "@aries-framework/anoncreds-rs", |
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.
@karimStekelenburg if you want to have some input on the name, now is the time!
I made this issue: hyperledger/anoncreds-rs#103. The API is a bit weird here |
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.
Awesome!! Great work @genaris
|
||
public async deleteCredential(agentContext: AgentContext, credentialId: string): Promise<void> { | ||
const credentialRepository = agentContext.dependencyManager.resolve(AnonCredsCredentialRepository) | ||
const credentialRecord = await credentialRepository.getByCredentialId(agentContext, credentialId) |
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.
We also have deleteById
now I think. Or do you do this so an error is thrown if it doesn't exist?
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.
This is because I'm not using AnonCredsCredentialRecord.id but a separate AnonCredsCredentialRecord.credentialId. However, I don't see the benefit on having a dedicated property for credentialId in this case, so I'm thinking on simplifying it and just use the id. What do you think?
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.
I think it could work. However it has caused issues for me in the past. E.g with using the did
as an id for a record 🤦
But as we always generate an uuid I think we should be fine here?
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.
Yeah exactly, we are always doing so internally, either at xxxFormatService or xxxHolderService.
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.
But still, based on previous experiences maybe it will be better to keep it as is and conceptually separate the storage record Id from other queries.
packages/anoncreds-rs/src/services/__tests__/AnonCredsRsHolderService.test.ts
Outdated
Show resolved
Hide resolved
|
||
expect(findByQueryMock).toHaveBeenCalledWith(agentContext, { | ||
attributes: ['age'], | ||
$and: [{ $or: [{ schemaId: 'schemaid:uri' }, { schemaName: 'schemaName' }] }, { schemaVersion: '1.0' }], |
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.
Shouldn't this be inversed?
So
$and: [{ $or: [{ schemaId: 'schemaid:uri' }, { schemaName: 'schemaName' }] }, { schemaVersion: '1.0' }], | |
$or: [{ $and: [{ schemaId: 'schemaid:uri' }, { schemaName: 'schemaName' }] }, { schemaVersion: '1.0' }], |
The restrictions array is an or, but if you have multiple properties in a single restrictritction object they should all be present on the same credential.
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.
And couldn't we simplify the query by just creating a single object with the different properties for a single restriction object?
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.
So write it like this:
$and: [{ $or: [{ schemaId: 'schemaid:uri' }, { schemaName: 'schemaName' }] }, { schemaVersion: '1.0' }], | |
$or: [ | |
{ | |
schemaId: 'schemaid:uri', | |
schemaName: 'schemaName' | |
}, | |
{ | |
schemaVersion: '1.0' | |
} | |
] |
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.
This is the part I struggled the most, as it was not clear for me the logic expression ordering based on the specification. In AnonCreds spec it provides an example and states: The properties in each list item are OR’d together, and the array elements are AND’d together.. Is it an error in the spec or am I interpreting incorrectly?
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.
I've asked Stephen in discord. That seems incorrect to me
packages/anoncreds-rs/src/services/__tests__/AnonCredsRsServices.test.ts
Outdated
Show resolved
Hide resolved
credentialId: this.credentialId, | ||
credentialRevocationId: this.credentialRevocationId, | ||
linkSecretId: this.linkSecretId, | ||
attributes: Object.keys(this.credential.values), |
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.
This will only store the credential attribute names right? I think to support all query types we have to store both the attribute name (so we can check if it exists), but also the value.
We can also do that in post filtering, as we do with JSON-LD creds, but it's a bit less efficient
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.
Yes, I kept only the names for the moment. I'm a bit reluctant on storing values as tags because I feel it's very arbitrary in terms of content length and amount, and with current implementation we are restricted to a single tag containing strings that are supposed to be short.
Also I don't imagine a case where a holder has hundreds or thousands credentials matching a query, that usually will include not only attribute names but also issuer/credentialDefinition/schema Ids. Do you think it could become common?
In regards to this topic, note that AnonCredsRsHolderService.getCredentialsForProofRequest
currently is not taking into account predicates p_type and p_value (e.g. for a given predicate, it will return all credentials that matches its name and restrictions). Is this OK (meaning that this will be checked in another layer) or should it manually process all predicates and only return those matching the logical conditions?
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.
Update: I see I missed the attr::<attribute-name>::marker
and attr::<attribute-name>::<attribute-value>
from the spec. So we should either:
- add as many tags as attributes the credential has, or
- filter it in AnonCredsRsHolderService after doing the findByQuery
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
commit 0351eec Author: Ariel Gentile <[email protected]> Date: Wed Mar 15 12:02:50 2023 -0300 fix: connection id in sessions for new connections (openwallet-foundation#1383) Signed-off-by: Ariel Gentile <[email protected]> commit f27fb99 Author: Ariel Gentile <[email protected]> Date: Wed Mar 15 09:23:10 2023 -0300 feat: basic message pthid/thid support (openwallet-foundation#1381) Signed-off-by: Ariel Gentile <[email protected]> commit d59366a Author: Jim Ezesinachi <[email protected]> Date: Wed Mar 15 11:04:52 2023 +0100 docs: fix example usage of indy-sdk-react-native package (openwallet-foundation#1382) Signed-off-by: Jim Ezesinachi <[email protected]> commit a4204ef Author: Timo Glastra <[email protected]> Date: Sat Mar 11 16:31:09 2023 +0100 fix: remove named capture groups (openwallet-foundation#1378) named capture groups are only supported in more recent versions of hermes Signed-off-by: Timo Glastra <[email protected]> commit dd6c020 Author: Ariel Gentile <[email protected]> Date: Sat Mar 11 11:57:37 2023 -0300 feat(anoncreds-rs): use new API methods for json conversion (openwallet-foundation#1373) Signed-off-by: Ariel Gentile <[email protected]> commit 122cdde Author: Timo Glastra <[email protected]> Date: Sat Mar 11 13:31:09 2023 +0100 fix: return HTTP 415 if unsupported content type (openwallet-foundation#1313) Signed-off-by: Timo Glastra <[email protected]> commit 582c711 Author: Mo <[email protected]> Date: Sat Mar 11 12:08:02 2023 +0100 feat: outbound message send via session (openwallet-foundation#1335) Co-authored-by: Jim Ezesinachi <[email protected]> Co-authored-by: Timo Glastra <[email protected]> Signed-off-by: Moriarty <[email protected]> commit 19cefa5 Author: Ariel Gentile <[email protected]> Date: Sat Mar 11 07:20:49 2023 -0300 feat(askar): import/export wallet support for SQLite (openwallet-foundation#1377) Signed-off-by: Ariel Gentile <[email protected]> commit c72ba14 Author: Timo Glastra <[email protected]> Date: Wed Mar 8 17:40:03 2023 +0100 fix(askar): custom error handling (openwallet-foundation#1372) Signed-off-by: Timo Glastra <[email protected]> commit 39c4ed0 Author: Timo Glastra <[email protected]> Date: Wed Mar 8 16:52:12 2023 +0100 feat(indy-vdr)!: extend did:indy support (openwallet-foundation#1362) Signed-off-by: Timo Glastra <[email protected]> commit 01669a7 Author: Timo Glastra <[email protected]> Date: Wed Mar 8 14:48:34 2023 +0100 test: increase timeout to 120 seconds (openwallet-foundation#1375) Signed-off-by: Timo Glastra <[email protected]> commit 953069a Author: Ariel Gentile <[email protected]> Date: Mon Mar 6 10:28:30 2023 -0300 fix(core): repository event when calling deleteById (openwallet-foundation#1356) Signed-off-by: Ariel Gentile <[email protected]> commit c133538 Author: Ariel Gentile <[email protected]> Date: Mon Mar 6 08:26:42 2023 -0300 fix(anoncreds): Buffer not imported from core (openwallet-foundation#1367) Signed-off-by: Ariel Gentile <[email protected]> commit 8f6b344 Author: Timo Glastra <[email protected]> Date: Fri Mar 3 12:15:58 2023 +0100 feat(indy-sdk)!: move to did:indy with limited support (openwallet-foundation#1347) Signed-off-by: Timo Glastra <[email protected]> commit 7795975 Author: Martin Auer <[email protected]> Date: Fri Mar 3 11:07:43 2023 +0100 fix(tenant): Correctly configure storage for multi tenant agents (openwallet-foundation#1359) Fixes hyperledger#1353 Signed-off-by: martin auer <[email protected]> commit cb4e469 Author: Timo Glastra <[email protected]> Date: Thu Mar 2 22:38:14 2023 +0100 test: various improvements (openwallet-foundation#1361) Signed-off-by: Timo Glastra <[email protected]> commit fd13bb8 Author: Ariel Gentile <[email protected]> Date: Thu Mar 2 17:00:57 2023 -0300 feat(oob): implicit invitations (openwallet-foundation#1348) Signed-off-by: Ariel Gentile <[email protected]> commit 18abb18 Author: Pritam Singh <[email protected]> Date: Thu Mar 2 22:11:20 2023 +0530 fix: isNewSocket logic (openwallet-foundation#1355) Signed-off-by: Pritam Singh <[email protected]> commit 2c792fe Author: Martin Auer <[email protected]> Date: Thu Mar 2 14:29:05 2023 +0100 refactor!: remove getKeyDidMappingByVerificationMethod (openwallet-foundation#1350) Signed-off-by: martin auer <[email protected]> commit 78ecf1e Author: Ariel Gentile <[email protected]> Date: Wed Mar 1 18:44:26 2023 -0300 refactor!: remove Dispatcher.registerMessageHandler (openwallet-foundation#1354) BREAKING CHANGE: `Dispatcher.registerMessageHandler` has been removed in favour of `MessageHandlerRegistry.registerMessageHandler`. If you want to register message handlers in an extension module, you can use directly `agentContext.dependencyManager.registerMessageHandlers`. Signed-off-by: Ariel Gentile <[email protected]> commit 1bda3f0 Author: Ariel Gentile <[email protected]> Date: Mon Feb 27 15:35:16 2023 -0300 fix(anoncreds-rs): save revocation registry index (openwallet-foundation#1351) Signed-off-by: Ariel Gentile <[email protected]> commit 4ab3b54 Author: Timo Glastra <[email protected]> Date: Mon Feb 27 13:23:47 2023 +0100 refactor!: set default outbound content type to didcomm v1 (openwallet-foundation#1314) Signed-off-by: Timo Glastra <[email protected]> BREAKING CHANGE: Agent default outbound content type has been changed to DIDComm V1. If you want to use former behaviour, you can do it so by manually setting `didcommMimeType` in `Agent`'s init config: ``` const agent = new Agent({ config: { ... didCommMimeType: DidCommMimeType.V0 }, ... }) ``` commit 254f661 Author: Ariel Gentile <[email protected]> Date: Sat Feb 25 11:49:36 2023 -0300 fix(indy-sdk): import from core (openwallet-foundation#1346) Signed-off-by: Ariel Gentile <[email protected]> commit 21d4bf7 Author: Timo Glastra <[email protected]> Date: Fri Feb 24 22:20:54 2023 +0100 feat!: allow to import created dids (and remove legacy `publicDidSeed`) (openwallet-foundation#1325) Signed-off-by: Timo Glastra <[email protected]> commit dc60acb Author: Timo Glastra <[email protected]> Date: Fri Feb 24 20:50:28 2023 +0100 build(anoncreds): remove node package from deps (openwallet-foundation#1339) Signed-off-by: Timo Glastra <[email protected]> commit e14d853 Author: Timo Glastra <[email protected]> Date: Fri Feb 24 17:59:30 2023 +0100 test: increase indy-sdk timeout (openwallet-foundation#1345) Signed-off-by: Timo Glastra <[email protected]> commit d38ecb1 Author: Ariel Gentile <[email protected]> Date: Fri Feb 24 09:12:40 2023 -0300 fix(anoncreds): include prover_did for legacy indy (openwallet-foundation#1342) Signed-off-by: Ariel Gentile <[email protected]> commit da8f2ad Author: Niall Shaw <[email protected]> Date: Fri Feb 24 13:01:47 2023 +0200 fix: create new socket if socket state is 'closing' (openwallet-foundation#1337) Signed-off-by: Niall Shaw <[email protected]> commit cac2ec3 Author: Martin Auer <[email protected]> Date: Fri Feb 24 11:11:28 2023 +0100 refactor(core)!: remove deprecated injectionContainer prop (openwallet-foundation#1344) Signed-off-by: martin auer <[email protected]> commit d5e34ff Author: Ariel Gentile <[email protected]> Date: Fri Feb 24 06:19:32 2023 -0300 test(indy-sdk): wait before resolving ledger objects (openwallet-foundation#1340) Signed-off-by: Ariel Gentile <[email protected]> commit 518e5e4 Author: Ariel Gentile <[email protected]> Date: Wed Feb 22 04:36:33 2023 -0300 fix: expose indy pool configs and action menu messages (openwallet-foundation#1333) Signed-off-by: Ariel Gentile <[email protected]> commit 1c6aeae Author: Ariel Gentile <[email protected]> Date: Tue Feb 21 19:18:19 2023 -0300 fix(askar): anoncrypt messages unpacking (openwallet-foundation#1332) Signed-off-by: Ariel Gentile <[email protected]> commit fb7ee50 Author: Victor Anene <[email protected]> Date: Tue Feb 21 15:39:14 2023 +0100 feat: IndyVdrAnonCredsRegistry revocation methods (openwallet-foundation#1328) Signed-off-by: Victor Anene <[email protected]> commit 64e20f1 Author: Timo Glastra <[email protected]> Date: Mon Feb 20 17:07:30 2023 +0100 fix!: don't emit legacy did:sov prefix for new protocols (openwallet-foundation#1245) Signed-off-by: Timo Glastra <[email protected]> commit c0e5339 Author: Ariel Gentile <[email protected]> Date: Mon Feb 20 09:04:20 2023 -0300 fix: seed and private key validation and return type in registrars (openwallet-foundation#1324) Signed-off-by: Ariel Gentile <[email protected]> commit edf392f Author: Timo Glastra <[email protected]> Date: Mon Feb 20 12:14:21 2023 +0100 refactor: remove master secret id from wallet (openwallet-foundation#1320) Signed-off-by: Timo Glastra <[email protected]> commit b6d66b1 Author: Timo Glastra <[email protected]> Date: Mon Feb 20 00:59:42 2023 +0100 refactor!: remove indy from core (openwallet-foundation#1286) Signed-off-by: Timo Glastra <[email protected]> commit 616b908 Author: Ariel Gentile <[email protected]> Date: Sun Feb 19 13:27:16 2023 -0300 feat(wallet)!: createKey from private key (openwallet-foundation#1301) Signed-off-by: Ariel Gentile <[email protected]> commit 64a5da9 Author: Ariel Gentile <[email protected]> Date: Sat Feb 18 16:54:25 2023 -0300 fix(samples): dummy module response message type (openwallet-foundation#1321) Signed-off-by: Ariel Gentile <[email protected]> commit ff5596d Author: Ariel Gentile <[email protected]> Date: Fri Feb 17 23:10:09 2023 -0300 feat!: add data, cache and temp dirs to FileSystem (openwallet-foundation#1306) Signed-off-by: Ariel Gentile <[email protected]> BREAKING CHANGE: Agent-produced files will now be divided in different system paths depending on their nature: data, temp and cache. Previously, they were located at a single location, defaulting to a temporary directory. If you specified a custom path in `FileSystem` object constructor, you now must provide an object containing `baseDataPath`, `baseTempPath` and `baseCachePath`. They can point to the same path, although it's recommended to specify different path to avoid future file clashes. commit af384e8 Author: Timo Glastra <[email protected]> Date: Sat Feb 18 01:32:45 2023 +0100 fix: loosen base64 validation (openwallet-foundation#1312) Signed-off-by: Timo Glastra <[email protected]> commit 229ed1b Author: Timo Glastra <[email protected]> Date: Fri Feb 17 21:31:47 2023 +0100 fix: thread id improvements (openwallet-foundation#1311) Signed-off-by: Timo Glastra <[email protected]> commit 1d782f5 Author: Victor Anene <[email protected]> Date: Fri Feb 17 20:01:35 2023 +0100 feat: add fetch indy schema method (openwallet-foundation#1290) Signed-off-by: Victor Anene <[email protected]> commit 3e02227 Author: Ariel Gentile <[email protected]> Date: Wed Feb 15 20:14:47 2023 -0300 fix: imports from core (openwallet-foundation#1303) Signed-off-by: Ariel Gentile <[email protected]> commit 4ac5332 Author: Jason C. Leach <[email protected]> Date: Wed Feb 15 14:11:41 2023 -0800 feat: add devcontainer support (openwallet-foundation#1282) Signed-off-by: Jason C. Leach <[email protected]> commit efab8dd Author: Ariel Gentile <[email protected]> Date: Tue Feb 14 19:49:59 2023 -0300 feat(indy-vdr): resolver and registrar for did:indy (openwallet-foundation#1253) Signed-off-by: Ariel Gentile <[email protected]> commit a487705 Author: Timo Glastra <[email protected]> Date: Tue Feb 14 10:57:22 2023 +0100 docs: update readme (openwallet-foundation#1298) docs: update reaadme Signed-off-by: Timo Glastra <[email protected]> commit ecce0a7 Author: Ariel Gentile <[email protected]> Date: Mon Feb 13 19:01:39 2023 -0300 fix(askar): generate nonce suitable for anoncreds (openwallet-foundation#1295) Signed-off-by: Ariel Gentile <[email protected]> commit c63350c Author: Timo Glastra <[email protected]> Date: Mon Feb 13 20:58:46 2023 +0100 test: add anoncreds restriction test (openwallet-foundation#1294) Signed-off-by: Timo Glastra <[email protected]> commit b570e0f Author: Karim Stekelenburg <[email protected]> Date: Mon Feb 13 19:49:21 2023 +0100 fix(indy-vdr): export relevant packages from root (openwallet-foundation#1291) Signed-off-by: Karim Stekelenburg <[email protected]> commit c72fd74 Author: Timo Glastra <[email protected]> Date: Mon Feb 13 18:40:44 2023 +0100 feat(anoncreds): legacy indy proof format service (openwallet-foundation#1283) Signed-off-by: Timo Glastra <[email protected]> commit dfb3eaf Author: Karim Stekelenburg <[email protected]> Date: Mon Feb 13 16:23:41 2023 +0100 build(indy-sdk): set private to false (openwallet-foundation#1293) Signed-off-by: Karim Stekelenburg <[email protected]> commit 231145f Author: Ariel Gentile <[email protected]> Date: Mon Feb 13 10:22:44 2023 -0300 chore: make askar, anoncreds(-rs), indy-vdr packages public (openwallet-foundation#1292) Signed-off-by: Ariel Gentile <[email protected]> commit fb8d58b Author: Timo Glastra <[email protected]> Date: Mon Feb 13 12:57:35 2023 +0100 refactor(proofs)!: generalize proofs api and improve consistency with credentials module (openwallet-foundation#1279) Signed-off-by: Timo Glastra <[email protected]> commit 51030d4 Author: Karim Stekelenburg <[email protected]> Date: Mon Feb 13 11:43:02 2023 +0100 feat(indy-vdr): module registration (openwallet-foundation#1285) Signed-off-by: Karim Stekelenburg <[email protected]> commit d61f6ed Author: Berend Sliedrecht <[email protected]> Date: Mon Feb 13 09:23:17 2023 +0100 chore(core): remove useless file (openwallet-foundation#1288) commit 30857b9 Author: Berend Sliedrecht <[email protected]> Date: Sat Feb 11 22:50:10 2023 +0100 fix(transport)!: added docs moved connection to connectionId (openwallet-foundation#1222) Signed-off-by: blu3beri <[email protected]> commit efe0271 Author: Ariel Gentile <[email protected]> Date: Fri Feb 10 19:15:36 2023 -0300 feat: add anoncreds-rs package (openwallet-foundation#1275) Signed-off-by: Ariel Gentile <[email protected]> commit 2669d7d Author: KolbyRKunz <[email protected]> Date: Fri Feb 10 14:14:59 2023 -0700 fix: set updateAt on records when updating a record (openwallet-foundation#1272) Signed-off-by: KolbyRKunz <[email protected]> commit 1d487b1 Author: Jim Ezesinachi <[email protected]> Date: Fri Feb 10 20:21:20 2023 +0100 feat: added endpoint setter to agent InitConfig (openwallet-foundation#1278) Signed-off-by: Jim Ezesinachi <[email protected]> commit 86cb9d0 Author: Ariel Gentile <[email protected]> Date: Fri Feb 10 11:13:44 2023 -0300 ci: increase maximum heap memory for node (openwallet-foundation#1280) Signed-off-by: Ariel Gentile <[email protected]> commit d056316 Author: Victor Anene <[email protected]> Date: Fri Feb 10 01:31:43 2023 +0100 feat(indy-vdr): add IndyVdrAnonCredsRegistry (openwallet-foundation#1270) Signed-off-by: Timo Glastra <[email protected]> commit f18d189 Author: Ariel Gentile <[email protected]> Date: Mon Feb 6 23:34:21 2023 -0300 feat: add initial askar package (openwallet-foundation#1211) Signed-off-by: Ariel Gentile <[email protected]> commit 115d897 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Feb 6 23:45:01 2023 +0000 build(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 (openwallet-foundation#1258) commit 3d86e78 Author: Karim Stekelenburg <[email protected]> Date: Tue Feb 7 00:09:24 2023 +0100 feat(openid4vc-client): pre-authorized (openwallet-foundation#1243) This PR adds support for the `pre-authorized` OpenID for Verifiable Credentials issuance flow to the new `openid4vc-client` module. Here are some highlights of the work: - Allows the user to execute the entire `pre-authorized` flow by calling a single method. - Adds a happy-flow test - HTTP(S) requests and responses are mocked using a network mocking library called [nock](https://github.com/nock/nock) - Because the JSON-LD credential that is received is expanded by the `W3cCredentialService`, I've added a few new contexts to our test document loader. - Not-so-happy-flow tests will be added later on. If you have any suggestions for edge cases that deserve testing, feel free to drop a comment. - Modifies the `JwsService` - The `JwsService` was geared towards a very specific use case. I've generalized its API so it's usable for a wider range of applications. - All pre-existing tests and calls to the `JwsService` have been updated. It's worth noting that I have had to add some `@ts-ignore` statements here and there to get around some incomplete types in the `OpenID4VCI-Client` library we're using. Once these issues have been resolved in the client library, they will be removed. **Work funded by the government of Ontario** --------- Signed-off-by: Karim Stekelenburg <[email protected]> Co-authored-by: Timo Glastra <[email protected]> commit 7f65ba9 Author: Jim Ezesinachi <[email protected]> Date: Mon Feb 6 22:27:03 2023 +0100 feat: optional routing for legacy connectionless invitation (openwallet-foundation#1271) Signed-off-by: Jim Ezesinachi <[email protected]> commit 3a4c5ec Author: Timo Glastra <[email protected]> Date: Mon Feb 6 21:49:12 2023 +0100 feat(anoncreds): add anoncreds API (openwallet-foundation#1232) Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Ariel Gentile <[email protected]>
Finally, the long-awaited
@aries-framework/anoncreds-rs
has come! It implements the main three services and can be start being used for integration with the new AnonCreds API.Summary of the changes done:
AnonCredsRsModule
, which registers automatically anoncreds-rs bindings (as in askar and indy-vdr) and its three services to DependencyManager. We were discussing about making this module inherit AnonCredsApi but this is not done yetAnonCredsRsHolderService
fully implements AnonCredsHolderService interface. We are not yet supporting all restriction types: we missattr::<attribute-name>::marker
andattr::<attribute-name>::<attribute-value>
AnonCredsRsIssuerService
implements all methods from AnonCredsIssuerService interface, but currently does not support revocation parametersAnonCredsRsVerifierService
implements the only method from AnonCredsVerifierServiceAnonCredsCredentialRecord
andAnonCredsCredentialRepository
have been added to @aries-framework/anoncreds package. In order to fully support restriction queries, maybe it will be needed to add more tag typesAs you can see, there are a lot of JSON.stringify and JSON.parse when calling anoncreds-rs. I think it will be nice to update its JS wrapper API to be more adapted to typical usage (for instance, create
fromJSON()
andtoJSON()
with JS objects as input/output andfromString()
andtoString()
with strings as input/output).In terms of performance, it would be nice to avoid some FFI calls to optimize it, but I'm under the impression that in this case the performance is more limited by crypto calculations than memory management between Node and Rust layers.