Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aries-framework/anoncreds

Package Overview
Dependencies
Maintainers
3
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aries-framework/anoncreds - npm Package Compare versions

Comparing version 0.4.1-alpha.55 to 0.4.1-alpha.56

42

build/protocols/proofs/v1/V1ProofProtocol.js

@@ -503,2 +503,3 @@ "use strict";

async processPresentation(messageContext) {
var _a;
const { message: presentationMessage, connection, agentContext } = messageContext;

@@ -535,13 +536,16 @@ agentContext.config.logger.debug(`Processing presentation with message id ${presentationMessage.id}`);

if (!presentationAttachment) {
throw new core_1.AriesFrameworkError('Missing indy proof attachment in processPresentation');
proofRecord.errorMessage = 'Missing indy proof attachment';
await this.updateState(agentContext, proofRecord, core_1.ProofState.Abandoned);
throw new errors_1.V1PresentationProblemReportError(proofRecord.errorMessage, {
problemCode: core_1.PresentationProblemReportReason.Abandoned,
});
}
const requestAttachment = requestMessage.getRequestAttachmentById(messages_1.INDY_PROOF_REQUEST_ATTACHMENT_ID);
if (!requestAttachment) {
throw new core_1.AriesFrameworkError('Missing indy proof request attachment in processPresentation');
proofRecord.errorMessage = 'Missing indy proof request attachment';
await this.updateState(agentContext, proofRecord, core_1.ProofState.Abandoned);
throw new errors_1.V1PresentationProblemReportError(proofRecord.errorMessage, {
problemCode: core_1.PresentationProblemReportReason.Abandoned,
});
}
const isValid = await this.indyProofFormat.processPresentation(agentContext, {
proofRecord,
attachment: presentationAttachment,
requestAttachment,
});
await didCommMessageRepository.saveAgentMessage(agentContext, {

@@ -552,2 +556,26 @@ agentMessage: presentationMessage,

});
let isValid;
try {
isValid = await this.indyProofFormat.processPresentation(agentContext, {
proofRecord,
attachment: presentationAttachment,
requestAttachment,
});
}
catch (error) {
proofRecord.errorMessage = (_a = error.message) !== null && _a !== void 0 ? _a : 'Error verifying proof on presentation';
proofRecord.isVerified = false;
await this.updateState(agentContext, proofRecord, core_1.ProofState.Abandoned);
throw new errors_1.V1PresentationProblemReportError('Error verifying proof on presentation', {
problemCode: core_1.PresentationProblemReportReason.Abandoned,
});
}
if (!isValid) {
proofRecord.errorMessage = 'Invalid proof';
proofRecord.isVerified = false;
await this.updateState(agentContext, proofRecord, core_1.ProofState.Abandoned);
throw new errors_1.V1PresentationProblemReportError('Invalid proof', {
problemCode: core_1.PresentationProblemReportReason.Abandoned,
});
}
// Update record

@@ -554,0 +582,0 @@ proofRecord.isVerified = isValid;

8

package.json

@@ -5,3 +5,3 @@ {

"types": "build/index",
"version": "0.4.1-alpha.55+5cac2bea",
"version": "0.4.1-alpha.56+b2ba7c71",
"files": [

@@ -28,3 +28,3 @@ "build"

"dependencies": {
"@aries-framework/core": "0.4.1-alpha.55+5cac2bea",
"@aries-framework/core": "0.4.1-alpha.56+b2ba7c71",
"bn.js": "^5.2.1",

@@ -36,3 +36,3 @@ "class-transformer": "0.5.1",

"devDependencies": {
"@aries-framework/node": "0.4.1-alpha.55+5cac2bea",
"@aries-framework/node": "0.4.1-alpha.56+b2ba7c71",
"indy-sdk": "^1.16.0-dev-1636",

@@ -43,3 +43,3 @@ "rimraf": "^4.4.0",

},
"gitHead": "5cac2bea656ba130d5d4cfa2bde4b06d9df92f0f"
"gitHead": "b2ba7c7197139e780cbb95eed77dc0a2ad3b3210"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc