-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: tipusinghaw <[email protected]> Co-authored-by: Sai Ranjit Tummalapalli <[email protected]> Co-authored-by: Krishna <[email protected]> Co-authored-by: KulkarniShashank <[email protected]>
- Loading branch information
1 parent
86c4fcf
commit 9412886
Showing
15 changed files
with
2,939 additions
and
2,327 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
diff --git a/node_modules/@credo-ts/core/build/agent/EnvelopeService.js b/node_modules/@credo-ts/core/build/agent/EnvelopeService.js | ||
index 12261a9..0238d59 100644 | ||
--- a/node_modules/@credo-ts/core/build/agent/EnvelopeService.js | ||
+++ b/node_modules/@credo-ts/core/build/agent/EnvelopeService.js | ||
@@ -32,12 +32,14 @@ let EnvelopeService = class EnvelopeService { | ||
let encryptedMessage = await agentContext.wallet.pack(message, recipientKeysBase58, senderKeyBase58 !== null && senderKeyBase58 !== void 0 ? senderKeyBase58 : undefined); | ||
// If the message has routing keys (mediator) pack for each mediator | ||
for (const routingKeyBase58 of routingKeysBase58) { | ||
+ console.log(`message['@type']`, JSON.stringify(message['@type'])) | ||
const forwardMessage = new messages_1.ForwardMessage({ | ||
// Forward to first recipient key | ||
to: recipientKeysBase58[0], | ||
message: encryptedMessage, | ||
}); | ||
recipientKeysBase58 = [routingKeyBase58]; | ||
+ forwardMessage["messageType"] = message['@type']; | ||
this.logger.debug('Forward message created', forwardMessage); | ||
const forwardJson = forwardMessage.toJSON({ | ||
useDidSovPrefixWhereAllowed: agentContext.config.useDidSovPrefixWhereAllowed, | ||
diff --git a/node_modules/@credo-ts/core/build/modules/routing/messages/ForwardMessage.d.ts b/node_modules/@credo-ts/core/build/modules/routing/messages/ForwardMessage.d.ts | ||
index 4f8577b..396f78a 100644 | ||
--- a/node_modules/@credo-ts/core/build/modules/routing/messages/ForwardMessage.d.ts | ||
+++ b/node_modules/@credo-ts/core/build/modules/routing/messages/ForwardMessage.d.ts | ||
@@ -3,6 +3,7 @@ import { EncryptedMessage } from '../../../types'; | ||
export interface ForwardMessageOptions { | ||
id?: string; | ||
to: string; | ||
+ messageType: string; | ||
message: EncryptedMessage; | ||
} | ||
/** | ||
@@ -19,5 +20,6 @@ export declare class ForwardMessage extends AgentMessage { | ||
readonly type: string; | ||
static readonly type: import("../../../utils/messageType").ParsedMessageType; | ||
to: string; | ||
+ messageType: string; | ||
message: EncryptedMessage; | ||
} | ||
diff --git a/node_modules/@credo-ts/core/build/types.d.ts b/node_modules/@credo-ts/core/build/types.d.ts | ||
index e0384d9..0a669fb 100644 | ||
--- a/node_modules/@credo-ts/core/build/types.d.ts | ||
+++ b/node_modules/@credo-ts/core/build/types.d.ts | ||
@@ -81,6 +81,7 @@ export interface PlaintextMessage { | ||
thid?: string; | ||
pthid?: string; | ||
}; | ||
+ messageType: string; | ||
[key: string]: unknown; | ||
} | ||
export interface OutboundPackage { |
33 changes: 33 additions & 0 deletions
33
patches/@credo-ts+core+0.5.3+002+fix-process-problem-report.patch
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,33 @@ | ||
diff --git a/node_modules/@credo-ts/core/build/modules/credentials/protocol/BaseCredentialProtocol.js b/node_modules/@credo-ts/core/build/modules/credentials/protocol/BaseCredentialProtocol.js | ||
index 30dbb7a..5b1b54c 100644 | ||
--- a/node_modules/@credo-ts/core/build/modules/credentials/protocol/BaseCredentialProtocol.js | ||
+++ b/node_modules/@credo-ts/core/build/modules/credentials/protocol/BaseCredentialProtocol.js | ||
@@ -19,11 +19,9 @@ class BaseCredentialProtocol { | ||
*/ | ||
async processProblemReport(messageContext) { | ||
const { message: credentialProblemReportMessage, agentContext } = messageContext; | ||
- const connection = messageContext.assertReadyConnection(); | ||
agentContext.config.logger.debug(`Processing problem report with message id ${credentialProblemReportMessage.id}`); | ||
const credentialRecord = await this.getByProperties(agentContext, { | ||
threadId: credentialProblemReportMessage.threadId, | ||
- connectionId: connection.id, | ||
}); | ||
// Update record | ||
credentialRecord.errorMessage = `${credentialProblemReportMessage.description.code}: ${credentialProblemReportMessage.description.en}`; | ||
diff --git a/node_modules/@credo-ts/core/build/modules/proofs/protocol/BaseProofProtocol.js b/node_modules/@credo-ts/core/build/modules/proofs/protocol/BaseProofProtocol.js | ||
index 25d2948..cf9e315 100644 | ||
--- a/node_modules/@credo-ts/core/build/modules/proofs/protocol/BaseProofProtocol.js | ||
+++ b/node_modules/@credo-ts/core/build/modules/proofs/protocol/BaseProofProtocol.js | ||
@@ -8,11 +8,10 @@ const ProofState_1 = require("../models/ProofState"); | ||
const repository_1 = require("../repository"); | ||
class BaseProofProtocol { | ||
async processProblemReport(messageContext) { | ||
- const { message: proofProblemReportMessage, agentContext, connection } = messageContext; | ||
+ const { message: proofProblemReportMessage, agentContext } = messageContext; | ||
agentContext.config.logger.debug(`Processing problem report with message id ${proofProblemReportMessage.id}`); | ||
const proofRecord = await this.getByProperties(agentContext, { | ||
threadId: proofProblemReportMessage.threadId, | ||
- connectionId: connection === null || connection === void 0 ? void 0 : connection.id, | ||
}); | ||
// Update record | ||
proofRecord.errorMessage = `${proofProblemReportMessage.description.code}: ${proofProblemReportMessage.description.en}`; |
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.