-
Notifications
You must be signed in to change notification settings - Fork 208
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
refactor!: didcomm module #2127
Merged
genaris
merged 25 commits into
openwallet-foundation:main
from
genaris:refactor/didcomm-module
Jan 28, 2025
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
ededb58
refactor: move to separate didcomm package
genaris 89f8d62
Merge branch 'main' into refactor/didcomm-module
genaris 524a07c
refactor: remove didcomm packages from BaseAgent
genaris 73fafcf
fix: move luxon dependency to didcomm
genaris 851cf8a
fix: fixed cheqd SDK to 2.5.1 because otherwise it won't build (targe…
genaris 17b2674
test: fix some core tests
genaris 618b975
test: more fixed tests
genaris 0e46629
test: fixes
genaris 17386a4
fix: update pnpm lock
genaris bb6917a
test: fix most tests
genaris add1645
Merge branch 'main' into refactor/didcomm-module
genaris d1143ad
fix: several types, format and lint errors
genaris 5b40e63
fix: upgrade asn1/sd-swt libraries to pass x509/oidc tests
genaris c902a37
fix: demo and extension module
genaris 6d21374
test: storage tests
genaris 02e8d90
fix: types
genaris bc1ba33
fix: sphereon lib as didcomm dev dep
genaris 17e4fe2
feat: add some basic documentation and expose convenience function
genaris d50f20e
Merge branch 'main' into refactor/didcomm-module
genaris 76813b0
docs(changeset): DIDComm has been extracted out of the Core. This mea…
genaris 30a937d
fix: changeset comment
genaris e64dfb6
style: fix prettier
genaris 728aa33
fix: address PR feedback
genaris a93c6ba
Merge branch 'main' into refactor/didcomm-module
genaris ba42e98
fix: no updateConfig currently used
genaris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
'@credo-ts/question-answer': minor | ||
'@credo-ts/bbs-signatures': minor | ||
'@credo-ts/action-menu': minor | ||
'@credo-ts/anoncreds': minor | ||
'@credo-ts/indy-vdr': minor | ||
'@credo-ts/didcomm': minor | ||
'@credo-ts/tenants': minor | ||
'@credo-ts/askar': minor | ||
'@credo-ts/cheqd': minor | ||
'@credo-ts/core': minor | ||
'@credo-ts/drpc': minor | ||
'@credo-ts/node': minor | ||
--- | ||
|
||
DIDComm has been extracted out of the Core. This means that now all DIDComm related modules (e.g. proofs, credentials) must be explicitly added when creating an `Agent` instance. Therefore, their API will be accesable under `agent.modules.[moduleAPI]` instead of `agent.[moduleAPI]`. Some `Agent` DIDComm-related properties and methods where also moved to the API of a new DIDComm module (e.g. `agent.registerInboundTransport` turned into `agent.modules.didcomm.registerInboundTransport`). | ||
|
||
**Example of DIDComm Agent** | ||
|
||
Previously: | ||
|
||
```ts | ||
const config = { | ||
label: name, | ||
endpoints: ['https://myendpoint'], | ||
walletConfig: { | ||
id: name, | ||
key: name, | ||
}, | ||
} satisfies InitConfig | ||
|
||
const agent = new Agent({ | ||
config, | ||
dependencies: agentDependencies, | ||
modules: { | ||
connections: new ConnectionsModule({ | ||
autoAcceptConnections: true, | ||
}) | ||
}) | ||
this.agent.registerInboundTransport(new HttpInboundTransport({ port })) | ||
this.agent.registerOutboundTransport(new HttpOutboundTransport()) | ||
|
||
``` | ||
|
||
Now: | ||
|
||
```ts | ||
const config = { | ||
label: name, | ||
walletConfig: { | ||
id: name, | ||
key: name, | ||
}, | ||
} satisfies InitConfig | ||
|
||
const agent = new Agent({ | ||
config, | ||
dependencies: agentDependencies, | ||
modules: { | ||
...getDefaultDidcommModules({ endpoints: ['https://myendpoint'] }), | ||
connections: new ConnectionsModule({ | ||
autoAcceptConnections: true, | ||
}) | ||
}) | ||
agent.modules.didcomm.registerInboundTransport(new HttpInboundTransport({ port })) | ||
agent.modules.didcomm.registerOutboundTransport(new HttpOutboundTransport()) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 not for this PR, but I think before 0.6 we should look at making:
agent.didcomm
possible (nesting is getting quite large)agent.didcomm
, also becauseagent.credentials
/agent.modules.credentials
is misleading, since it's didcomm specific. I think registerinDidcommModule
interface that has special feature registry etc.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 good ideas there! Initially I made a "DidCommModule" but I decided to leave it for a further PR to not overcomplicate it. But for sure it is something that makes sense, especially to have a tidy Agent API.
Same thing about the transport config, which is something not so evident for developers.