forked from openwallet-foundation/credo-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: didcomm module (openwallet-foundation#2127)
Signed-off-by: Ariel Gentile <[email protected]>
- Loading branch information
Showing
770 changed files
with
7,538 additions
and
7,920 deletions.
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.