diff --git a/demo/src/Alice.ts b/demo/src/Alice.ts index 67b100f8c6..252c04c632 100644 --- a/demo/src/Alice.ts +++ b/demo/src/Alice.ts @@ -1,4 +1,4 @@ -import type { ConnectionRecord, CredentialExchangeRecord, ProofRecord } from '@aries-framework/core' +import type { ConnectionRecord, CredentialExchangeRecord, ProofExchangeRecord } from '@aries-framework/core' import { BaseAgent } from './BaseAgent' import { greenText, Output, redText } from './OutputClass' @@ -51,7 +51,7 @@ export class Alice extends BaseAgent { }) } - public async acceptProofRequest(proofRecord: ProofRecord) { + public async acceptProofRequest(proofRecord: ProofExchangeRecord) { const requestedCredentials = await this.agent.proofs.autoSelectCredentialsForProofRequest({ proofRecordId: proofRecord.id, config: { diff --git a/demo/src/AliceInquirer.ts b/demo/src/AliceInquirer.ts index 457d33b528..d11e7f6021 100644 --- a/demo/src/AliceInquirer.ts +++ b/demo/src/AliceInquirer.ts @@ -1,4 +1,4 @@ -import type { CredentialExchangeRecord, ProofRecord } from '@aries-framework/core' +import type { CredentialExchangeRecord, ProofExchangeRecord } from '@aries-framework/core' import { clear } from 'console' import { textSync } from 'figlet' @@ -78,7 +78,7 @@ export class AliceInquirer extends BaseInquirer { } } - public async acceptProofRequest(proofRecord: ProofRecord) { + public async acceptProofRequest(proofRecord: ProofExchangeRecord) { const confirm = await inquirer.prompt([this.inquireConfirmation(Title.ProofRequestTitle)]) if (confirm.options === ConfirmOptions.No) { await this.alice.agent.proofs.declineRequest(proofRecord.id) diff --git a/demo/src/Listener.ts b/demo/src/Listener.ts index 97f98c741a..1da8970aa5 100644 --- a/demo/src/Listener.ts +++ b/demo/src/Listener.ts @@ -7,7 +7,7 @@ import type { BasicMessageStateChangedEvent, CredentialExchangeRecord, CredentialStateChangedEvent, - ProofRecord, + ProofExchangeRecord, ProofStateChangedEvent, } from '@aries-framework/core' import type BottomBar from 'inquirer/lib/ui/bottom-bar' @@ -78,7 +78,7 @@ export class Listener { }) } - private async newProofRequestPrompt(proofRecord: ProofRecord, aliceInquirer: AliceInquirer) { + private async newProofRequestPrompt(proofRecord: ProofExchangeRecord, aliceInquirer: AliceInquirer) { this.turnListenerOn() await aliceInquirer.acceptProofRequest(proofRecord) this.turnListenerOff() diff --git a/packages/core/src/modules/proofs/ProofEvents.ts b/packages/core/src/modules/proofs/ProofEvents.ts index ba1c7b047b..20394c56a9 100644 --- a/packages/core/src/modules/proofs/ProofEvents.ts +++ b/packages/core/src/modules/proofs/ProofEvents.ts @@ -1,6 +1,6 @@ import type { BaseEvent } from '../../agent/Events' import type { ProofState } from './models/ProofState' -import type { ProofRecord } from './repository' +import type { ProofExchangeRecord } from './repository' export enum ProofEventTypes { ProofStateChanged = 'ProofStateChanged', @@ -9,7 +9,7 @@ export enum ProofEventTypes { export interface ProofStateChangedEvent extends BaseEvent { type: typeof ProofEventTypes.ProofStateChanged payload: { - proofRecord: ProofRecord + proofRecord: ProofExchangeRecord previousState: ProofState | null } } diff --git a/packages/core/src/modules/proofs/ProofResponseCoordinator.ts b/packages/core/src/modules/proofs/ProofResponseCoordinator.ts index 24bf56dda5..8996649c4f 100644 --- a/packages/core/src/modules/proofs/ProofResponseCoordinator.ts +++ b/packages/core/src/modules/proofs/ProofResponseCoordinator.ts @@ -1,5 +1,5 @@ import type { AgentContext } from '../../agent/context/AgentContext' -import type { ProofRecord } from './repository' +import type { ProofExchangeRecord } from './repository' import { injectable } from '../../plugins' @@ -34,7 +34,7 @@ export class ProofResponseCoordinator { /** * Checks whether it should automatically respond to a proposal */ - public shouldAutoRespondToProposal(agentContext: AgentContext, proofRecord: ProofRecord) { + public shouldAutoRespondToProposal(agentContext: AgentContext, proofRecord: ProofExchangeRecord) { const autoAccept = ProofResponseCoordinator.composeAutoAccept( proofRecord.autoAcceptProof, agentContext.config.autoAcceptProofs @@ -54,7 +54,7 @@ export class ProofResponseCoordinator { /** * Checks whether it should automatically respond to a request */ - public shouldAutoRespondToRequest(agentContext: AgentContext, proofRecord: ProofRecord) { + public shouldAutoRespondToRequest(agentContext: AgentContext, proofRecord: ProofExchangeRecord) { const autoAccept = ProofResponseCoordinator.composeAutoAccept( proofRecord.autoAcceptProof, agentContext.config.autoAcceptProofs @@ -74,7 +74,7 @@ export class ProofResponseCoordinator { /** * Checks whether it should automatically respond to a presentation of proof */ - public shouldAutoRespondToPresentation(agentContext: AgentContext, proofRecord: ProofRecord) { + public shouldAutoRespondToPresentation(agentContext: AgentContext, proofRecord: ProofExchangeRecord) { const autoAccept = ProofResponseCoordinator.composeAutoAccept( proofRecord.autoAcceptProof, agentContext.config.autoAcceptProofs diff --git a/packages/core/src/modules/proofs/ProofService.ts b/packages/core/src/modules/proofs/ProofService.ts index ab84926214..9fcd016b19 100644 --- a/packages/core/src/modules/proofs/ProofService.ts +++ b/packages/core/src/modules/proofs/ProofService.ts @@ -29,7 +29,7 @@ import type { ProofRequestFromProposalOptions, } from './models/ProofServiceOptions' import type { ProofState } from './models/ProofState' -import type { ProofRecord, ProofRepository } from './repository' +import type { ProofExchangeRecord, ProofRepository } from './repository' import { JsonTransformer } from '../../utils/JsonTransformer' @@ -64,7 +64,11 @@ export abstract class ProofService { return await this.wallet.generateNonce() } - public emitStateChangedEvent(agentContext: AgentContext, proofRecord: ProofRecord, previousState: ProofState | null) { + public emitStateChangedEvent( + agentContext: AgentContext, + proofRecord: ProofExchangeRecord, + previousState: ProofState | null + ) { const clonedProof = JsonTransformer.clone(proofRecord) this.eventEmitter.emit(agentContext, { @@ -84,7 +88,7 @@ export abstract class ProofService { * @param newState The state to update to * */ - public async updateState(agentContext: AgentContext, proofRecord: ProofRecord, newState: ProofState) { + public async updateState(agentContext: AgentContext, proofRecord: ProofExchangeRecord, newState: ProofState) { const previousState = proofRecord.state proofRecord.state = newState await this.proofRepository.update(agentContext, proofRecord) @@ -92,7 +96,7 @@ export abstract class ProofService { this.emitStateChangedEvent(agentContext, proofRecord, previousState) } - public update(agentContext: AgentContext, proofRecord: ProofRecord) { + public update(agentContext: AgentContext, proofRecord: ProofExchangeRecord) { return this.proofRepository.update(agentContext, proofRecord) } @@ -107,7 +111,7 @@ export abstract class ProofService { abstract createProposal( agentContext: AgentContext, options: CreateProposalOptions - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> /** * Create a proposal message in response to a received proof request message @@ -122,7 +126,7 @@ export abstract class ProofService { abstract createProposalAsResponse( agentContext: AgentContext, options: CreateProposalAsResponseOptions - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> /** * Process a received proposal message (does not accept yet) @@ -142,48 +146,54 @@ export abstract class ProofService { * 4. Loop through all format services to process proposal message * 5. Save & return record */ - abstract processProposal(messageContext: InboundMessageContext): Promise + abstract processProposal(messageContext: InboundMessageContext): Promise abstract createRequest( agentContext: AgentContext, options: CreateRequestOptions - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> abstract createRequestAsResponse( agentContext: AgentContext, options: CreateRequestAsResponseOptions - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> - abstract processRequest(messageContext: InboundMessageContext): Promise + abstract processRequest(messageContext: InboundMessageContext): Promise abstract createPresentation( agentContext: AgentContext, options: CreatePresentationOptions - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> - abstract processPresentation(messageContext: InboundMessageContext): Promise + abstract processPresentation(messageContext: InboundMessageContext): Promise abstract createAck( agentContext: AgentContext, options: CreateAckOptions - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> - abstract processAck(messageContext: InboundMessageContext): Promise + abstract processAck(messageContext: InboundMessageContext): Promise abstract createProblemReport( agentContext: AgentContext, options: CreateProblemReportOptions - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> - abstract processProblemReport(messageContext: InboundMessageContext): Promise + abstract processProblemReport(messageContext: InboundMessageContext): Promise - public abstract shouldAutoRespondToProposal(agentContext: AgentContext, proofRecord: ProofRecord): Promise + public abstract shouldAutoRespondToProposal( + agentContext: AgentContext, + proofRecord: ProofExchangeRecord + ): Promise - public abstract shouldAutoRespondToRequest(agentContext: AgentContext, proofRecord: ProofRecord): Promise + public abstract shouldAutoRespondToRequest( + agentContext: AgentContext, + proofRecord: ProofExchangeRecord + ): Promise public abstract shouldAutoRespondToPresentation( agentContext: AgentContext, - proofRecord: ProofRecord + proofRecord: ProofExchangeRecord ): Promise public abstract registerHandlers( @@ -204,7 +214,7 @@ export abstract class ProofService { public async saveOrUpdatePresentationMessage( agentContext: AgentContext, options: { - proofRecord: ProofRecord + proofRecord: ProofExchangeRecord message: AgentMessage role: DidCommMessageRole } @@ -218,7 +228,7 @@ export abstract class ProofService { public async delete( agentContext: AgentContext, - proofRecord: ProofRecord, + proofRecord: ProofExchangeRecord, options?: DeleteProofOptions ): Promise { await this.proofRepository.delete(agentContext, proofRecord) diff --git a/packages/core/src/modules/proofs/ProofsApi.ts b/packages/core/src/modules/proofs/ProofsApi.ts index 27b72d6fcf..ce7acf47a8 100644 --- a/packages/core/src/modules/proofs/ProofsApi.ts +++ b/packages/core/src/modules/proofs/ProofsApi.ts @@ -29,7 +29,7 @@ import type { DeleteProofOptions, GetFormatDataReturn, } from './models/ProofServiceOptions' -import type { ProofRecord } from './repository/ProofRecord' +import type { ProofExchangeRecord } from './repository/ProofExchangeRecord' import { inject, injectable } from 'tsyringe' @@ -55,21 +55,21 @@ import { ProofRepository } from './repository/ProofRepository' export interface ProofsApi[]> { // Proposal methods - proposeProof(options: ProposeProofOptions): Promise - acceptProposal(options: AcceptProposalOptions): Promise + proposeProof(options: ProposeProofOptions): Promise + acceptProposal(options: AcceptProposalOptions): Promise // Request methods - requestProof(options: RequestProofOptions): Promise - acceptRequest(options: AcceptPresentationOptions): Promise - declineRequest(proofRecordId: string): Promise + requestProof(options: RequestProofOptions): Promise + acceptRequest(options: AcceptPresentationOptions): Promise + declineRequest(proofRecordId: string): Promise // Present - acceptPresentation(proofRecordId: string): Promise + acceptPresentation(proofRecordId: string): Promise // out of band createRequest(options: CreateProofRequestOptions): Promise<{ message: AgentMessage - proofRecord: ProofRecord + proofRecord: ProofExchangeRecord }> // Auto Select @@ -82,15 +82,15 @@ export interface ProofsApi> - sendProblemReport(proofRecordId: string, message: string): Promise + sendProblemReport(proofRecordId: string, message: string): Promise // Record Methods - getAll(): Promise - findAllByQuery(query: Query): Promise - getById(proofRecordId: string): Promise - findById(proofRecordId: string): Promise + getAll(): Promise + findAllByQuery(query: Query): Promise + getById(proofRecordId: string): Promise + findById(proofRecordId: string): Promise deleteById(proofId: string, options?: DeleteProofOptions): Promise - update(proofRecord: ProofRecord): Promise + update(proofRecord: ProofExchangeRecord): Promise getFormatData(proofRecordId: string): Promise> // DidComm Message Records @@ -164,7 +164,7 @@ export class ProofsApi< * to include in the message * @returns Proof record associated with the sent proposal message */ - public async proposeProof(options: ProposeProofOptions): Promise { + public async proposeProof(options: ProposeProofOptions): Promise { const service = this.getService(options.protocolVersion) const { connectionId } = options @@ -198,7 +198,7 @@ export class ProofsApi< * @param options multiple properties like proof record id, additional configuration for creating the request * @returns Proof record associated with the presentation request */ - public async acceptProposal(options: AcceptProposalOptions): Promise { + public async acceptProposal(options: AcceptProposalOptions): Promise { const { proofRecordId } = options const proofRecord = await this.getById(proofRecordId) @@ -247,7 +247,7 @@ export class ProofsApi< * @param options multiple properties like connection id, protocol version, proof Formats to build the proof request * @returns Proof record associated with the sent request message */ - public async requestProof(options: RequestProofOptions): Promise { + public async requestProof(options: RequestProofOptions): Promise { const service = this.getService(options.protocolVersion) const connection = await this.connectionService.getById(this.agentContext, options.connectionId) @@ -278,7 +278,7 @@ export class ProofsApi< * specifying which credentials to use for the proof * @returns Proof record associated with the sent presentation message */ - public async acceptRequest(options: AcceptPresentationOptions): Promise { + public async acceptRequest(options: AcceptPresentationOptions): Promise { const { proofRecordId, proofFormats, comment } = options const record = await this.getById(proofRecordId) @@ -353,7 +353,7 @@ export class ProofsApi< */ public async createRequest(options: CreateProofRequestOptions): Promise<{ message: AgentMessage - proofRecord: ProofRecord + proofRecord: ProofExchangeRecord }> { const service = this.getService(options.protocolVersion) @@ -367,7 +367,7 @@ export class ProofsApi< return await service.createRequest(this.agentContext, createProofRequest) } - public async declineRequest(proofRecordId: string): Promise { + public async declineRequest(proofRecordId: string): Promise { const proofRecord = await this.getById(proofRecordId) const service = this.getService(proofRecord.protocolVersion) @@ -382,11 +382,11 @@ export class ProofsApi< * Accept a presentation as prover (by sending a presentation acknowledgement message) to the connection * associated with the proof record. * - * @param proofRecordId The id of the proof record for which to accept the presentation + * @param proofRecordId The id of the proof exchange record for which to accept the presentation * @returns Proof record associated with the sent presentation acknowledgement message * */ - public async acceptPresentation(proofRecordId: string): Promise { + public async acceptPresentation(proofRecordId: string): Promise { const record = await this.getById(proofRecordId) const service = this.getService(record.protocolVersion) @@ -481,7 +481,7 @@ export class ProofsApi< * @param message message to send * @returns proof record associated with the proof problem report message */ - public async sendProblemReport(proofRecordId: string, message: string): Promise { + public async sendProblemReport(proofRecordId: string, message: string): Promise { const record = await this.getById(proofRecordId) const service = this.getService(record.protocolVersion) if (!record.connectionId) { @@ -515,7 +515,7 @@ export class ProofsApi< * * @returns List containing all proof records */ - public async getAll(): Promise { + public async getAll(): Promise { return this.proofRepository.getAll(this.agentContext) } @@ -524,7 +524,7 @@ export class ProofsApi< * * @returns List containing all proof records matching specified params */ - public findAllByQuery(query: Query): Promise { + public findAllByQuery(query: Query): Promise { return this.proofRepository.findByQuery(this.agentContext, query) } @@ -536,7 +536,7 @@ export class ProofsApi< * @return The proof record * */ - public async getById(proofRecordId: string): Promise { + public async getById(proofRecordId: string): Promise { return await this.proofRepository.getById(this.agentContext, proofRecordId) } @@ -547,7 +547,7 @@ export class ProofsApi< * @return The proof record or null if not found * */ - public async findById(proofRecordId: string): Promise { + public async findById(proofRecordId: string): Promise { return await this.proofRepository.findById(this.agentContext, proofRecordId) } @@ -571,7 +571,7 @@ export class ProofsApi< * @throws {RecordDuplicateError} If multiple records are found * @returns The proof record */ - public async getByThreadAndConnectionId(threadId: string, connectionId?: string): Promise { + public async getByThreadAndConnectionId(threadId: string, connectionId?: string): Promise { return this.proofRepository.getByThreadAndConnectionId(this.agentContext, threadId, connectionId) } @@ -582,7 +582,10 @@ export class ProofsApi< * @param parentThreadId The parent thread id * @returns List containing all proof records matching the given query */ - public async getByParentThreadAndConnectionId(parentThreadId: string, connectionId?: string): Promise { + public async getByParentThreadAndConnectionId( + parentThreadId: string, + connectionId?: string + ): Promise { return this.proofRepository.getByParentThreadAndConnectionId(this.agentContext, parentThreadId, connectionId) } @@ -591,7 +594,7 @@ export class ProofsApi< * * @param proofRecord the proof record */ - public async update(proofRecord: ProofRecord): Promise { + public async update(proofRecord: ProofExchangeRecord): Promise { await this.proofRepository.update(this.agentContext, proofRecord) } diff --git a/packages/core/src/modules/proofs/__tests__/V1ProofService.test.ts b/packages/core/src/modules/proofs/__tests__/V1ProofService.test.ts index 7c73c959d5..180a1b8a34 100644 --- a/packages/core/src/modules/proofs/__tests__/V1ProofService.test.ts +++ b/packages/core/src/modules/proofs/__tests__/V1ProofService.test.ts @@ -2,7 +2,7 @@ import type { AgentContext } from '../../../agent' import type { Wallet } from '../../../wallet/Wallet' import type { CredentialRepository } from '../../credentials/repository' import type { ProofStateChangedEvent } from '../ProofEvents' -import type { CustomProofTags } from './../repository/ProofRecord' +import type { CustomProofTags } from './../repository/ProofExchangeRecord' import { Subject } from 'rxjs' @@ -22,7 +22,7 @@ import { ProofState } from '../models/ProofState' import { V1ProofService } from '../protocol/v1' import { INDY_PROOF_REQUEST_ATTACHMENT_ID, V1RequestPresentationMessage } from '../protocol/v1/messages' import { V1PresentationProblemReportMessage } from '../protocol/v1/messages/V1PresentationProblemReportMessage' -import { ProofRecord } from '../repository/ProofRecord' +import { ProofExchangeRecord } from '../repository/ProofExchangeRecord' import { ProofRepository } from '../repository/ProofRepository' import { credDef } from './fixtures' @@ -62,7 +62,7 @@ const requestAttachment = new Attachment({ // A record is deserialized to JSON when it's stored into the storage. We want to simulate this behaviour for `offer` // object to test our service would behave correctly. We use type assertion for `offer` attribute to `any`. -const mockProofRecord = ({ +const mockProofExchangeRecord = ({ state, threadId, connectionId, @@ -81,7 +81,7 @@ const mockProofRecord = ({ requestPresentationAttachments: [requestAttachment], }) - const proofRecord = new ProofRecord({ + const proofRecord = new ProofExchangeRecord({ protocolVersion: 'v1', id, state: state || ProofState.RequestSent, @@ -156,11 +156,11 @@ describe('V1ProofService', () => { const repositorySaveSpy = jest.spyOn(proofRepository, 'save') // when - const returnedProofRecord = await proofService.processRequest(messageContext) + const returnedProofExchangeRecord = await proofService.processRequest(messageContext) // then - const expectedProofRecord = { - type: ProofRecord.name, + const expectedProofExchangeRecord = { + type: ProofExchangeRecord.type, id: expect.any(String), createdAt: expect.any(Date), state: ProofState.RequestReceived, @@ -168,9 +168,9 @@ describe('V1ProofService', () => { connectionId: connection.id, } expect(repositorySaveSpy).toHaveBeenCalledTimes(1) - const [[, createdProofRecord]] = repositorySaveSpy.mock.calls - expect(createdProofRecord).toMatchObject(expectedProofRecord) - expect(returnedProofRecord).toMatchObject(expectedProofRecord) + const [[, createdProofExchangeRecord]] = repositorySaveSpy.mock.calls + expect(createdProofExchangeRecord).toMatchObject(expectedProofExchangeRecord) + expect(returnedProofExchangeRecord).toMatchObject(expectedProofExchangeRecord) }) test(`emits stateChange event with ${ProofState.RequestReceived}`, async () => { @@ -198,10 +198,10 @@ describe('V1ProofService', () => { describe('createProblemReport', () => { const threadId = 'fd9c5ddb-ec11-4acd-bc32-540736249746' - let proof: ProofRecord + let proof: ProofExchangeRecord beforeEach(() => { - proof = mockProofRecord({ + proof = mockProofExchangeRecord({ state: ProofState.RequestReceived, threadId, connectionId: 'b1e2f039-aa39-40be-8643-6ce2797b5190', @@ -233,11 +233,11 @@ describe('V1ProofService', () => { }) describe('processProblemReport', () => { - let proof: ProofRecord + let proof: ProofExchangeRecord let messageContext: InboundMessageContext beforeEach(() => { - proof = mockProofRecord({ + proof = mockProofExchangeRecord({ state: ProofState.RequestReceived, }) diff --git a/packages/core/src/modules/proofs/__tests__/V2ProofService.test.ts b/packages/core/src/modules/proofs/__tests__/V2ProofService.test.ts index e5781dce63..255c97a92b 100644 --- a/packages/core/src/modules/proofs/__tests__/V2ProofService.test.ts +++ b/packages/core/src/modules/proofs/__tests__/V2ProofService.test.ts @@ -1,7 +1,7 @@ import type { AgentContext } from '../../../agent' import type { Wallet } from '../../../wallet/Wallet' import type { ProofStateChangedEvent } from '../ProofEvents' -import type { CustomProofTags } from '../repository/ProofRecord' +import type { CustomProofTags } from '../repository/ProofExchangeRecord' import { Subject } from 'rxjs' @@ -19,7 +19,7 @@ import { IndyProofFormatService } from '../formats/indy/IndyProofFormatService' import { ProofState } from '../models/ProofState' import { V2ProofService } from '../protocol/v2/V2ProofService' import { V2PresentationProblemReportMessage, V2RequestPresentationMessage } from '../protocol/v2/messages' -import { ProofRecord } from '../repository/ProofRecord' +import { ProofExchangeRecord } from '../repository/ProofExchangeRecord' import { ProofRepository } from '../repository/ProofRepository' import { credDef } from './fixtures' @@ -56,7 +56,7 @@ const requestAttachment = new Attachment({ // A record is deserialized to JSON when it's stored into the storage. We want to simulate this behaviour for `offer` // object to test our service would behave correctly. We use type assertion for `offer` attribute to `any`. -const mockProofRecord = ({ +const mockProofExchangeRecord = ({ state, threadId, connectionId, @@ -83,7 +83,7 @@ const mockProofRecord = ({ comment: 'some comment', }) - const proofRecord = new ProofRecord({ + const proofRecord = new ProofExchangeRecord({ protocolVersion: 'v2', id, state: state || ProofState.RequestSent, @@ -153,11 +153,11 @@ describe('V2ProofService', () => { const repositorySaveSpy = jest.spyOn(proofRepository, 'save') // when - const returnedProofRecord = await proofService.processRequest(messageContext) + const returnedProofExchangeRecord = await proofService.processRequest(messageContext) // then - const expectedProofRecord = { - type: ProofRecord.name, + const expectedProofExchangeRecord = { + type: ProofExchangeRecord.type, id: expect.any(String), createdAt: expect.any(Date), state: ProofState.RequestReceived, @@ -165,9 +165,9 @@ describe('V2ProofService', () => { connectionId: connection.id, } expect(repositorySaveSpy).toHaveBeenCalledTimes(1) - const [[, createdProofRecord]] = repositorySaveSpy.mock.calls - expect(createdProofRecord).toMatchObject(expectedProofRecord) - expect(returnedProofRecord).toMatchObject(expectedProofRecord) + const [[, createdProofExchangeRecord]] = repositorySaveSpy.mock.calls + expect(createdProofExchangeRecord).toMatchObject(expectedProofExchangeRecord) + expect(returnedProofExchangeRecord).toMatchObject(expectedProofExchangeRecord) }) test(`emits stateChange event with ${ProofState.RequestReceived}`, async () => { @@ -195,10 +195,10 @@ describe('V2ProofService', () => { describe('createProblemReport', () => { const threadId = 'fd9c5ddb-ec11-4acd-bc32-540736249746' - let proof: ProofRecord + let proof: ProofExchangeRecord beforeEach(() => { - proof = mockProofRecord({ + proof = mockProofExchangeRecord({ state: ProofState.RequestReceived, threadId, connectionId: 'b1e2f039-aa39-40be-8643-6ce2797b5190', @@ -230,10 +230,10 @@ describe('V2ProofService', () => { }) describe('processProblemReport', () => { - let proof: ProofRecord + let proof: ProofExchangeRecord let messageContext: InboundMessageContext beforeEach(() => { - proof = mockProofRecord({ + proof = mockProofExchangeRecord({ state: ProofState.RequestReceived, }) diff --git a/packages/core/src/modules/proofs/formats/indy/IndyProofFormatsServiceOptions.ts b/packages/core/src/modules/proofs/formats/indy/IndyProofFormatsServiceOptions.ts index 47ddd8c489..8500d4646f 100644 --- a/packages/core/src/modules/proofs/formats/indy/IndyProofFormatsServiceOptions.ts +++ b/packages/core/src/modules/proofs/formats/indy/IndyProofFormatsServiceOptions.ts @@ -1,12 +1,8 @@ import type { Attachment } from '../../../../decorators/attachment/Attachment' import type { IndyRevocationInterval } from '../../../credentials' import type { GetRequestedCredentialsConfig } from '../../models/GetRequestedCredentialsConfig' -import type { - PresentationPreview, - PresentationPreviewAttribute, - PresentationPreviewPredicate, -} from '../../protocol/v1/models/V1PresentationPreview' -import type { ProofRecord } from '../../repository/ProofRecord' +import type { PresentationPreview } from '../../protocol/v1/models/V1PresentationPreview' +import type { ProofExchangeRecord } from '../../repository/ProofExchangeRecord' import type { ProofAttributeInfo } from '.././indy/models/ProofAttributeInfo' import type { ProofPredicateInfo } from '.././indy/models/ProofPredicateInfo' import type { IndyRequestedCredentialsFormat } from './IndyProofFormat' @@ -37,7 +33,7 @@ export interface GetRequestedCredentialsFormat { } export interface IndyProofRequestFromProposalOptions { - proofRecord: ProofRecord + proofRecord: ProofExchangeRecord name?: string version?: string nonce?: string diff --git a/packages/core/src/modules/proofs/formats/models/ProofFormatServiceOptions.ts b/packages/core/src/modules/proofs/formats/models/ProofFormatServiceOptions.ts index 8212d2b6dd..1a377f4af2 100644 --- a/packages/core/src/modules/proofs/formats/models/ProofFormatServiceOptions.ts +++ b/packages/core/src/modules/proofs/formats/models/ProofFormatServiceOptions.ts @@ -1,6 +1,6 @@ import type { Attachment } from '../../../../decorators/attachment/Attachment' import type { ProposeProofFormats } from '../../models/SharedOptions' -import type { ProofRecord } from '../../repository' +import type { ProofExchangeRecord } from '../../repository' import type { ProofFormat, ProofFormatPayload } from '../ProofFormat' import type { ProofRequestOptions } from '../indy/models/ProofRequest' import type { ProofAttachmentFormat } from './ProofAttachmentFormat' @@ -22,7 +22,7 @@ export interface CreateProposalOptions { export interface ProcessProposalOptions { proposal: ProofAttachmentFormat - record?: ProofRecord + record?: ProofExchangeRecord } export interface CreateRequestOptions { @@ -32,7 +32,7 @@ export interface CreateRequestOptions { export interface ProcessRequestOptions { requestAttachment: ProofAttachmentFormat - record?: ProofRecord + record?: ProofExchangeRecord } export interface FormatCreatePresentationOptions { @@ -42,7 +42,7 @@ export interface FormatCreatePresentationOptions { } export interface ProcessPresentationOptions { - record: ProofRecord + record: ProofExchangeRecord formatAttachments: { request: ProofAttachmentFormat[] presentation: ProofAttachmentFormat[] @@ -55,7 +55,7 @@ export interface VerifyProofOptions { } export interface CreateProblemReportOptions { - proofRecord: ProofRecord + proofRecord: ProofExchangeRecord description: string } diff --git a/packages/core/src/modules/proofs/models/ProofServiceOptions.ts b/packages/core/src/modules/proofs/models/ProofServiceOptions.ts index 47f650faf9..3c7e7e47af 100644 --- a/packages/core/src/modules/proofs/models/ProofServiceOptions.ts +++ b/packages/core/src/modules/proofs/models/ProofServiceOptions.ts @@ -1,6 +1,6 @@ import type { ConnectionRecord } from '../../connections' import type { ProofFormat, ProofFormatPayload } from '../formats/ProofFormat' -import type { ProofRecord } from '../repository' +import type { ProofExchangeRecord } from '../repository' import type { GetRequestedCredentialsConfig } from './GetRequestedCredentialsConfig' import type { AutoAcceptProof } from './ProofAutoAcceptType' @@ -25,13 +25,13 @@ export interface CreateProposalOptions extends BaseOp } export interface CreateProposalAsResponseOptions extends BaseOptions { - proofRecord: ProofRecord + proofRecord: ProofExchangeRecord proofFormats: ProofFormatPayload } export interface CreateRequestAsResponseOptions extends BaseOptions { id?: string - proofRecord: ProofRecord + proofRecord: ProofExchangeRecord proofFormats: ProofFormatPayload } @@ -43,7 +43,7 @@ export interface CreateRequestOptions extends BaseOpt export interface CreateProofRequestFromProposalOptions extends BaseOptions { id?: string - proofRecord: ProofRecord + proofRecord: ProofExchangeRecord } export interface FormatRetrievedCredentialOptions { @@ -55,22 +55,22 @@ export interface FormatRequestedCredentialReturn { } export interface CreatePresentationOptions extends BaseOptions { - proofRecord: ProofRecord + proofRecord: ProofExchangeRecord proofFormats: ProofFormatPayload // lastPresentation?: boolean } export interface CreateAckOptions { - proofRecord: ProofRecord + proofRecord: ProofExchangeRecord } export interface GetRequestedCredentialsForProofRequestOptions { - proofRecord: ProofRecord + proofRecord: ProofExchangeRecord config?: GetRequestedCredentialsConfig } export interface ProofRequestFromProposalOptions { - proofRecord: ProofRecord + proofRecord: ProofExchangeRecord proofFormats: ProofFormatPayload } diff --git a/packages/core/src/modules/proofs/protocol/v1/V1ProofService.ts b/packages/core/src/modules/proofs/protocol/v1/V1ProofService.ts index dd3479fcf2..f850df9aaf 100644 --- a/packages/core/src/modules/proofs/protocol/v1/V1ProofService.ts +++ b/packages/core/src/modules/proofs/protocol/v1/V1ProofService.ts @@ -28,7 +28,6 @@ import type { GetRequestedCredentialsForProofRequestOptions, ProofRequestFromProposalOptions, } from '../../models/ProofServiceOptions' -import type { ProofRequestFormats } from '../../models/SharedOptions' import { validateOrReject } from 'class-validator' import { inject, Lifecycle, scoped } from 'tsyringe' @@ -56,7 +55,7 @@ import { IndyProofUtils } from '../../formats/indy/IndyProofUtils' import { ProofRequest } from '../../formats/indy/models/ProofRequest' import { RequestedCredentials } from '../../formats/indy/models/RequestedCredentials' import { ProofState } from '../../models/ProofState' -import { ProofRecord } from '../../repository/ProofRecord' +import { ProofExchangeRecord } from '../../repository/ProofExchangeRecord' import { ProofRepository } from '../../repository/ProofRepository' import { V1PresentationProblemReportError } from './errors' @@ -118,7 +117,7 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { public async createProposal( agentContext: AgentContext, options: CreateProposalOptions<[IndyProofFormat]> - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> { + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> { const { connectionRecord, proofFormats } = options // Assert @@ -141,7 +140,7 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { }) // Create record - const proofRecord = new ProofRecord({ + const proofRecord = new ProofExchangeRecord({ connectionId: connectionRecord.id, threadId: proposalMessage.threadId, parentThreadId: proposalMessage.thread?.parentThreadId, @@ -165,7 +164,7 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { public async createProposalAsResponse( agentContext: AgentContext, options: CreateProposalAsResponseOptions<[IndyProofFormat]> - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> { + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> { const { proofRecord, proofFormats, comment } = options // Assert @@ -202,8 +201,8 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { public async processProposal( messageContext: InboundMessageContext - ): Promise { - let proofRecord: ProofRecord + ): Promise { + let proofRecord: ProofExchangeRecord const { message: proposalMessage, connection } = messageContext this.logger.debug(`Processing presentation proposal with id ${proposalMessage.id}`) @@ -238,7 +237,7 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { await this.updateState(messageContext.agentContext, proofRecord, ProofState.ProposalReceived) } catch { // No proof record exists with thread id - proofRecord = new ProofRecord({ + proofRecord = new ProofExchangeRecord({ connectionId: connection?.id, threadId: proposalMessage.threadId, parentThreadId: proposalMessage.thread?.parentThreadId, @@ -267,7 +266,7 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { public async createRequestAsResponse( agentContext: AgentContext, options: CreateRequestAsResponseOptions<[IndyProofFormat]> - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> { + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> { const { proofRecord, comment, proofFormats } = options if (!proofFormats.indy) { throw new AriesFrameworkError('Only indy proof format is supported for present proof protocol v1') @@ -305,7 +304,7 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { public async createRequest( agentContext: AgentContext, options: CreateRequestOptions<[IndyProofFormat]> - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> { + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> { this.logger.debug(`Creating proof request`) // Assert @@ -330,7 +329,7 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { }) // Create record - const proofRecord = new ProofRecord({ + const proofRecord = new ProofExchangeRecord({ connectionId: options.connectionRecord?.id, threadId: requestPresentationMessage.threadId, parentThreadId: requestPresentationMessage.thread?.parentThreadId, @@ -353,8 +352,8 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { public async processRequest( messageContext: InboundMessageContext - ): Promise { - let proofRecord: ProofRecord + ): Promise { + let proofRecord: ProofExchangeRecord const { message: proofRequestMessage, connection } = messageContext this.logger.debug(`Processing presentation request with id ${proofRequestMessage.id}`) @@ -418,7 +417,7 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { await this.updateState(messageContext.agentContext, proofRecord, ProofState.RequestReceived) } catch { // No proof record exists with thread id - proofRecord = new ProofRecord({ + proofRecord = new ProofExchangeRecord({ connectionId: connection?.id, threadId: proofRequestMessage.threadId, parentThreadId: proofRequestMessage.thread?.parentThreadId, @@ -446,7 +445,7 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { public async createPresentation( agentContext: AgentContext, options: CreatePresentationOptions<[IndyProofFormat]> - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> { + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> { const { proofRecord, proofFormats } = options this.logger.debug(`Creating presentation for proof record with id ${proofRecord.id}`) @@ -516,7 +515,9 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { return { message: presentationMessage, proofRecord } } - public async processPresentation(messageContext: InboundMessageContext): Promise { + public async processPresentation( + messageContext: InboundMessageContext + ): Promise { const { message: presentationMessage, connection } = messageContext this.logger.debug(`Processing presentation with id ${presentationMessage.id}`) @@ -573,7 +574,9 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { return proofRecord } - public async processAck(messageContext: InboundMessageContext): Promise { + public async processAck( + messageContext: InboundMessageContext + ): Promise { const { message: presentationAckMessage, connection } = messageContext this.logger.debug(`Processing presentation ack with id ${presentationAckMessage.id}`) @@ -610,7 +613,7 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { public async createProblemReport( agentContext: AgentContext, options: CreateProblemReportOptions - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> { + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> { const msg = new V1PresentationProblemReportMessage({ description: { code: PresentationProblemReportReason.Abandoned, @@ -631,7 +634,7 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { public async processProblemReport( messageContext: InboundMessageContext - ): Promise { + ): Promise { const { message: presentationProblemReportMessage } = messageContext const connection = messageContext.assertReadyConnection() @@ -755,7 +758,10 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { return attachments.length ? attachments : undefined } - public async shouldAutoRespondToProposal(agentContext: AgentContext, proofRecord: ProofRecord): Promise { + public async shouldAutoRespondToProposal( + agentContext: AgentContext, + proofRecord: ProofExchangeRecord + ): Promise { const proposal = await this.didCommMessageRepository.findAgentMessage(agentContext, { associatedRecordId: proofRecord.id, messageClass: V1ProposePresentationMessage, @@ -827,7 +833,10 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { return true } - public async shouldAutoRespondToRequest(agentContext: AgentContext, proofRecord: ProofRecord): Promise { + public async shouldAutoRespondToRequest( + agentContext: AgentContext, + proofRecord: ProofExchangeRecord + ): Promise { const proposal = await this.didCommMessageRepository.findAgentMessage(agentContext, { associatedRecordId: proofRecord.id, messageClass: V1ProposePresentationMessage, @@ -843,7 +852,9 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { }) if (!request) { - throw new AriesFrameworkError(`Expected to find a request message for ProofRecord with id ${proofRecord.id}`) + throw new AriesFrameworkError( + `Expected to find a request message for ProofExchangeRecord with id ${proofRecord.id}` + ) } const proofRequest = request.indyProofRequest @@ -899,7 +910,10 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { return true } - public async shouldAutoRespondToPresentation(agentContext: AgentContext, proofRecord: ProofRecord): Promise { + public async shouldAutoRespondToPresentation( + agentContext: AgentContext, + proofRecord: ProofExchangeRecord + ): Promise { this.logger.debug(`Should auto respond to presentation for proof record id: ${proofRecord.id}`) return true } @@ -1059,7 +1073,7 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { * * @returns List containing all proof records */ - public async getAll(agentContext: AgentContext): Promise { + public async getAll(agentContext: AgentContext): Promise { return this.proofRepository.getAll(agentContext) } @@ -1076,14 +1090,14 @@ export class V1ProofService extends ProofService<[IndyProofFormat]> { agentContext: AgentContext, threadId: string, connectionId?: string - ): Promise { + ): Promise { return this.proofRepository.getSingleByQuery(agentContext, { threadId, connectionId }) } public async createAck( gentContext: AgentContext, options: CreateAckOptions - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> { + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> { const { proofRecord } = options this.logger.debug(`Creating presentation ack for proof record with id ${proofRecord.id}`) diff --git a/packages/core/src/modules/proofs/protocol/v1/__tests__/indy-proof-presentation.test.ts b/packages/core/src/modules/proofs/protocol/v1/__tests__/indy-proof-presentation.test.ts index a7bba2c894..975a6aed43 100644 --- a/packages/core/src/modules/proofs/protocol/v1/__tests__/indy-proof-presentation.test.ts +++ b/packages/core/src/modules/proofs/protocol/v1/__tests__/indy-proof-presentation.test.ts @@ -1,12 +1,12 @@ import type { Agent } from '../../../../../agent/Agent' import type { ConnectionRecord } from '../../../../connections/repository/ConnectionRecord' -import type { ProofRecord } from '../../../repository/ProofRecord' import type { PresentationPreview } from '../models/V1PresentationPreview' -import { setupProofsTest, waitForProofRecord } from '../../../../../../tests/helpers' +import { setupProofsTest, waitForProofExchangeRecord } from '../../../../../../tests/helpers' import testLogger from '../../../../../../tests/logger' import { DidCommMessageRepository } from '../../../../../storage/didcomm' import { ProofState } from '../../../models/ProofState' +import { ProofExchangeRecord } from '../../../repository/ProofExchangeRecord' import { V1PresentationMessage, V1ProposePresentationMessage, V1RequestPresentationMessage } from '../messages' describe('Present Proof', () => { @@ -14,8 +14,8 @@ describe('Present Proof', () => { let aliceAgent: Agent let aliceConnection: ConnectionRecord let presentationPreview: PresentationPreview - let faberProofRecord: ProofRecord - let aliceProofRecord: ProofRecord + let faberProofExchangeRecord: ProofExchangeRecord + let aliceProofExchangeRecord: ProofExchangeRecord let didCommMessageRepository: DidCommMessageRepository beforeAll(async () => { @@ -37,11 +37,11 @@ describe('Present Proof', () => { test(`Alice Creates and sends Proof Proposal to Faber`, async () => { testLogger.test('Alice sends proof proposal to Faber') - const faberProofRecordPromise = waitForProofRecord(faberAgent, { + const faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { state: ProofState.ProposalReceived, }) - aliceProofRecord = await aliceAgent.proofs.proposeProof({ + aliceProofExchangeRecord = await aliceAgent.proofs.proposeProof({ connectionId: aliceConnection.id, protocolVersion: 'v1', proofFormats: { @@ -58,12 +58,12 @@ describe('Present Proof', () => { testLogger.test('Faber waits for presentation from Alice') - faberProofRecord = await faberProofRecordPromise + faberProofExchangeRecord = await faberProofExchangeRecordPromise didCommMessageRepository = faberAgent.injectionContainer.resolve(DidCommMessageRepository) const proposal = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V1ProposePresentationMessage, }) @@ -95,9 +95,9 @@ describe('Present Proof', () => { ], }, }) - expect(faberProofRecord).toMatchObject({ + expect(faberProofExchangeRecord).toMatchObject({ id: expect.anything(), - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, state: ProofState.ProposalReceived, protocolVersion: 'v1', }) @@ -105,23 +105,23 @@ describe('Present Proof', () => { test(`Faber accepts the Proposal send by Alice`, async () => { // Accept Proposal - const aliceProofRecordPromise = waitForProofRecord(aliceAgent, { - threadId: faberProofRecord.threadId, + const aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { + threadId: faberProofExchangeRecord.threadId, state: ProofState.RequestReceived, }) testLogger.test('Faber accepts presentation proposal from Alice') - faberProofRecord = await faberAgent.proofs.acceptProposal({ - proofRecordId: faberProofRecord.id, + faberProofExchangeRecord = await faberAgent.proofs.acceptProposal({ + proofRecordId: faberProofExchangeRecord.id, }) testLogger.test('Alice waits for proof request from Faber') - aliceProofRecord = await aliceProofRecordPromise + aliceProofExchangeRecord = await aliceProofExchangeRecordPromise didCommMessageRepository = faberAgent.injectionContainer.resolve(DidCommMessageRepository) const request = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V1RequestPresentationMessage, }) @@ -138,12 +138,12 @@ describe('Present Proof', () => { }, ], thread: { - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, }, }) - expect(aliceProofRecord).toMatchObject({ + expect(aliceProofExchangeRecord).toMatchObject({ id: expect.anything(), - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, state: ProofState.RequestReceived, protocolVersion: 'v1', }) @@ -151,28 +151,28 @@ describe('Present Proof', () => { test(`Alice accepts presentation request from Faber`, async () => { const requestedCredentials = await aliceAgent.proofs.autoSelectCredentialsForProofRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, config: { filterByPresentationPreview: true, }, }) - const faberProofRecordPromise = waitForProofRecord(faberAgent, { - threadId: aliceProofRecord.threadId, + const faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.PresentationReceived, }) await aliceAgent.proofs.acceptRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, proofFormats: { indy: requestedCredentials.proofFormats.indy }, }) // Faber waits for the presentation from Alice testLogger.test('Faber waits for presentation from Alice') - faberProofRecord = await faberProofRecordPromise + faberProofExchangeRecord = await faberProofExchangeRecordPromise const presentation = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V1PresentationMessage, }) @@ -202,42 +202,42 @@ describe('Present Proof', () => { }, }) - expect(faberProofRecord.id).not.toBeNull() - expect(faberProofRecord).toMatchObject({ - threadId: faberProofRecord.threadId, + expect(faberProofExchangeRecord.id).not.toBeNull() + expect(faberProofExchangeRecord).toMatchObject({ + threadId: faberProofExchangeRecord.threadId, state: ProofState.PresentationReceived, protocolVersion: 'v1', }) }) test(`Faber accepts the presentation provided by Alice`, async () => { - const aliceProofRecordPromise = waitForProofRecord(aliceAgent, { - threadId: aliceProofRecord.threadId, + const aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.Done, }) // Faber accepts the presentation provided by Alice - await faberAgent.proofs.acceptPresentation(faberProofRecord.id) + await faberAgent.proofs.acceptPresentation(faberProofExchangeRecord.id) // Alice waits until she received a presentation acknowledgement testLogger.test('Alice waits until she receives a presentation acknowledgement') - aliceProofRecord = await aliceProofRecordPromise + aliceProofExchangeRecord = await aliceProofExchangeRecordPromise - expect(faberProofRecord).toMatchObject({ - // type: ProofRecord.name, + expect(faberProofExchangeRecord).toMatchObject({ + type: ProofExchangeRecord.type, id: expect.any(String), createdAt: expect.any(Date), - threadId: aliceProofRecord.threadId, + threadId: aliceProofExchangeRecord.threadId, connectionId: expect.any(String), isVerified: true, state: ProofState.PresentationReceived, }) - expect(aliceProofRecord).toMatchObject({ - // type: ProofRecord.name, + expect(aliceProofExchangeRecord).toMatchObject({ + type: ProofExchangeRecord.type, id: expect.any(String), createdAt: expect.any(Date), - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, connectionId: expect.any(String), state: ProofState.Done, }) diff --git a/packages/core/src/modules/proofs/protocol/v1/__tests__/indy-proof-proposal.test.ts b/packages/core/src/modules/proofs/protocol/v1/__tests__/indy-proof-proposal.test.ts index e0cf1c0751..e2b2df04ff 100644 --- a/packages/core/src/modules/proofs/protocol/v1/__tests__/indy-proof-proposal.test.ts +++ b/packages/core/src/modules/proofs/protocol/v1/__tests__/indy-proof-proposal.test.ts @@ -1,12 +1,9 @@ import type { Agent } from '../../../../../agent/Agent' import type { ConnectionRecord } from '../../../../connections/repository/ConnectionRecord' -import type { ProposeProofOptions } from '../../../ProofsApiOptions' -import type { IndyProofFormat } from '../../../formats/indy/IndyProofFormat' -import type { ProofRecord } from '../../../repository/ProofRecord' -import type { V1ProofService } from '../V1ProofService' +import type { ProofExchangeRecord } from '../../../repository/ProofExchangeRecord' import type { PresentationPreview } from '../models/V1PresentationPreview' -import { setupProofsTest, waitForProofRecord } from '../../../../../../tests/helpers' +import { setupProofsTest, waitForProofExchangeRecord } from '../../../../../../tests/helpers' import testLogger from '../../../../../../tests/logger' import { DidCommMessageRepository } from '../../../../../storage' import { ProofState } from '../../../models/ProofState' @@ -17,7 +14,7 @@ describe('Present Proof', () => { let aliceAgent: Agent let aliceConnection: ConnectionRecord let presentationPreview: PresentationPreview - let faberProofRecord: ProofRecord + let faberProofExchangeRecord: ProofExchangeRecord let didCommMessageRepository: DidCommMessageRepository beforeAll(async () => { @@ -39,7 +36,7 @@ describe('Present Proof', () => { test(`Alice Creates and sends Proof Proposal to Faber`, async () => { testLogger.test('Alice sends proof proposal to Faber') - const faberProofRecordPromise = waitForProofRecord(faberAgent, { + const faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { state: ProofState.ProposalReceived, }) @@ -59,12 +56,12 @@ describe('Present Proof', () => { }) testLogger.test('Faber waits for presentation from Alice') - faberProofRecord = await faberProofRecordPromise + faberProofExchangeRecord = await faberProofExchangeRecordPromise didCommMessageRepository = faberAgent.injectionContainer.resolve(DidCommMessageRepository) const proposal = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V1ProposePresentationMessage, }) @@ -97,9 +94,9 @@ describe('Present Proof', () => { }, }) - expect(faberProofRecord).toMatchObject({ + expect(faberProofExchangeRecord).toMatchObject({ id: expect.anything(), - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, state: ProofState.ProposalReceived, protocolVersion: 'v1', }) diff --git a/packages/core/src/modules/proofs/protocol/v1/__tests__/indy-proof-request.test.ts b/packages/core/src/modules/proofs/protocol/v1/__tests__/indy-proof-request.test.ts index 7d371a4b9c..b60a16ad4a 100644 --- a/packages/core/src/modules/proofs/protocol/v1/__tests__/indy-proof-request.test.ts +++ b/packages/core/src/modules/proofs/protocol/v1/__tests__/indy-proof-request.test.ts @@ -1,12 +1,10 @@ import type { Agent } from '../../../../../agent/Agent' import type { ConnectionRecord } from '../../../../connections/repository/ConnectionRecord' -import type { AcceptProposalOptions, ProposeProofOptions } from '../../../ProofsApiOptions' -import type { IndyProofFormat } from '../../../formats/indy/IndyProofFormat' -import type { ProofRecord } from '../../../repository/ProofRecord' -import type { V1ProofService } from '../V1ProofService' +import type { AcceptProposalOptions } from '../../../ProofsApiOptions' +import type { ProofExchangeRecord } from '../../../repository/ProofExchangeRecord' import type { PresentationPreview } from '../models/V1PresentationPreview' -import { setupProofsTest, waitForProofRecord } from '../../../../../../tests/helpers' +import { setupProofsTest, waitForProofExchangeRecord } from '../../../../../../tests/helpers' import testLogger from '../../../../../../tests/logger' import { DidCommMessageRepository } from '../../../../../storage/didcomm' import { ProofState } from '../../../models/ProofState' @@ -17,8 +15,8 @@ describe('Present Proof', () => { let aliceAgent: Agent let aliceConnection: ConnectionRecord let presentationPreview: PresentationPreview - let faberProofRecord: ProofRecord - let aliceProofRecord: ProofRecord + let faberProofExchangeRecord: ProofExchangeRecord + let aliceProofExchangeRecord: ProofExchangeRecord let didCommMessageRepository: DidCommMessageRepository beforeAll(async () => { @@ -40,11 +38,11 @@ describe('Present Proof', () => { test(`Alice Creates and sends Proof Proposal to Faber`, async () => { testLogger.test('Alice sends proof proposal to Faber') - const faberProofRecordPromise = waitForProofRecord(faberAgent, { + const faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { state: ProofState.ProposalReceived, }) - aliceProofRecord = await aliceAgent.proofs.proposeProof({ + aliceProofExchangeRecord = await aliceAgent.proofs.proposeProof({ connectionId: aliceConnection.id, protocolVersion: 'v1', proofFormats: { @@ -60,12 +58,12 @@ describe('Present Proof', () => { }) testLogger.test('Faber waits for presentation from Alice') - faberProofRecord = await faberProofRecordPromise + faberProofExchangeRecord = await faberProofExchangeRecordPromise didCommMessageRepository = faberAgent.injectionContainer.resolve(DidCommMessageRepository) const proposal = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V1ProposePresentationMessage, }) @@ -97,9 +95,9 @@ describe('Present Proof', () => { ], }, }) - expect(faberProofRecord).toMatchObject({ + expect(faberProofExchangeRecord).toMatchObject({ id: expect.anything(), - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, state: ProofState.ProposalReceived, protocolVersion: 'v1', }) @@ -108,24 +106,24 @@ describe('Present Proof', () => { test(`Faber accepts the Proposal send by Alice and Creates Proof Request`, async () => { // Accept Proposal const acceptProposalOptions: AcceptProposalOptions = { - proofRecordId: faberProofRecord.id, + proofRecordId: faberProofExchangeRecord.id, } - const aliceProofRecordPromise = waitForProofRecord(aliceAgent, { - threadId: faberProofRecord.threadId, + const aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { + threadId: faberProofExchangeRecord.threadId, state: ProofState.RequestReceived, }) testLogger.test('Faber accepts presentation proposal from Alice') - faberProofRecord = await faberAgent.proofs.acceptProposal(acceptProposalOptions) + faberProofExchangeRecord = await faberAgent.proofs.acceptProposal(acceptProposalOptions) testLogger.test('Alice waits for proof request from Faber') - aliceProofRecord = await aliceProofRecordPromise + aliceProofExchangeRecord = await aliceProofExchangeRecordPromise didCommMessageRepository = faberAgent.injectionContainer.resolve(DidCommMessageRepository) const request = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V1RequestPresentationMessage, }) @@ -142,12 +140,12 @@ describe('Present Proof', () => { }, ], thread: { - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, }, }) - expect(aliceProofRecord).toMatchObject({ + expect(aliceProofExchangeRecord).toMatchObject({ id: expect.anything(), - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, state: ProofState.RequestReceived, protocolVersion: 'v1', }) diff --git a/packages/core/src/modules/proofs/protocol/v1/handlers/V1PresentationHandler.ts b/packages/core/src/modules/proofs/protocol/v1/handlers/V1PresentationHandler.ts index 9c97a5991d..c55e644b44 100644 --- a/packages/core/src/modules/proofs/protocol/v1/handlers/V1PresentationHandler.ts +++ b/packages/core/src/modules/proofs/protocol/v1/handlers/V1PresentationHandler.ts @@ -2,7 +2,7 @@ import type { AgentConfig } from '../../../../../agent/AgentConfig' import type { Handler, HandlerInboundMessage } from '../../../../../agent/Handler' import type { DidCommMessageRepository } from '../../../../../storage' import type { ProofResponseCoordinator } from '../../../ProofResponseCoordinator' -import type { ProofRecord } from '../../../repository' +import type { ProofExchangeRecord } from '../../../repository' import type { V1ProofService } from '../V1ProofService' import { createOutboundMessage, createOutboundServiceMessage } from '../../../../../agent/helpers' @@ -35,7 +35,7 @@ export class V1PresentationHandler implements Handler { } } - private async createAck(record: ProofRecord, messageContext: HandlerInboundMessage) { + private async createAck(record: ProofExchangeRecord, messageContext: HandlerInboundMessage) { this.agentConfig.logger.info( `Automatically sending acknowledgement with autoAccept on ${this.agentConfig.autoAcceptProofs}` ) diff --git a/packages/core/src/modules/proofs/protocol/v1/handlers/V1ProposePresentationHandler.ts b/packages/core/src/modules/proofs/protocol/v1/handlers/V1ProposePresentationHandler.ts index 19c88f33ab..31146937c2 100644 --- a/packages/core/src/modules/proofs/protocol/v1/handlers/V1ProposePresentationHandler.ts +++ b/packages/core/src/modules/proofs/protocol/v1/handlers/V1ProposePresentationHandler.ts @@ -5,7 +5,7 @@ import type { ProofResponseCoordinator } from '../../../ProofResponseCoordinator import type { IndyProofFormat } from '../../../formats/indy/IndyProofFormat' import type { IndyProofRequestFromProposalOptions } from '../../../formats/indy/IndyProofFormatsServiceOptions' import type { ProofRequestFromProposalOptions } from '../../../models/ProofServiceOptions' -import type { ProofRecord } from '../../../repository/ProofRecord' +import type { ProofExchangeRecord } from '../../../repository/ProofExchangeRecord' import type { V1ProofService } from '../V1ProofService' import { createOutboundMessage } from '../../../../../agent/helpers' @@ -39,7 +39,7 @@ export class V1ProposePresentationHandler implements Handler { } private async createRequest( - proofRecord: ProofRecord, + proofRecord: ProofExchangeRecord, messageContext: HandlerInboundMessage ) { this.agentConfig.logger.info( diff --git a/packages/core/src/modules/proofs/protocol/v1/handlers/V1RequestPresentationHandler.ts b/packages/core/src/modules/proofs/protocol/v1/handlers/V1RequestPresentationHandler.ts index e38f3ba0cb..5f7e72e7e8 100644 --- a/packages/core/src/modules/proofs/protocol/v1/handlers/V1RequestPresentationHandler.ts +++ b/packages/core/src/modules/proofs/protocol/v1/handlers/V1RequestPresentationHandler.ts @@ -8,7 +8,7 @@ import type { FormatRequestedCredentialReturn, FormatRetrievedCredentialOptions, } from '../../../models/ProofServiceOptions' -import type { ProofRecord } from '../../../repository/ProofRecord' +import type { ProofExchangeRecord } from '../../../repository/ProofExchangeRecord' import type { V1ProofService } from '../V1ProofService' import { createOutboundMessage, createOutboundServiceMessage } from '../../../../../agent/helpers' @@ -50,7 +50,7 @@ export class V1RequestPresentationHandler implements Handler { } private async createPresentation( - record: ProofRecord, + record: ProofExchangeRecord, messageContext: HandlerInboundMessage ) { const requestMessage = await this.didCommMessageRepository.getAgentMessage(messageContext.agentContext, { diff --git a/packages/core/src/modules/proofs/protocol/v2/V2ProofService.ts b/packages/core/src/modules/proofs/protocol/v2/V2ProofService.ts index 25c5e171ca..50fb3efd7a 100644 --- a/packages/core/src/modules/proofs/protocol/v2/V2ProofService.ts +++ b/packages/core/src/modules/proofs/protocol/v2/V2ProofService.ts @@ -43,7 +43,7 @@ import { V2_INDY_PRESENTATION_REQUEST } from '../../formats/ProofFormatConstants import { IndyProofFormatService } from '../../formats/indy/IndyProofFormatService' import { IndyProofUtils } from '../../formats/indy/IndyProofUtils' import { ProofState } from '../../models/ProofState' -import { PresentationRecordType, ProofRecord, ProofRepository } from '../../repository' +import { PresentationRecordType, ProofExchangeRecord, ProofRepository } from '../../repository' import { V2PresentationProblemReportError } from './errors' import { V2PresentationAckHandler } from './handlers/V2PresentationAckHandler' @@ -86,7 +86,7 @@ export class V2ProofService extends P public async createProposal( agentContext: AgentContext, options: CreateProposalOptions - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> { + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> { const formats = [] for (const key of Object.keys(options.proofFormats)) { const service = this.formatServiceMap[key] @@ -108,7 +108,7 @@ export class V2ProofService extends P parentThreadId: options.parentThreadId, }) - const proofRecord = new ProofRecord({ + const proofRecord = new ProofExchangeRecord({ connectionId: options.connectionRecord.id, threadId: proposalMessage.threadId, parentThreadId: proposalMessage.thread?.parentThreadId, @@ -135,7 +135,7 @@ export class V2ProofService extends P public async createProposalAsResponse( agentContext: AgentContext, options: CreateProposalAsResponseOptions - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> { + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> { options.proofRecord.assertState(ProofState.RequestReceived) const formats = [] @@ -168,9 +168,9 @@ export class V2ProofService extends P public async processProposal( messageContext: InboundMessageContext - ): Promise { + ): Promise { const { message: proposalMessage, connection: connectionRecord } = messageContext - let proofRecord: ProofRecord + let proofRecord: ProofExchangeRecord const proposalAttachments = proposalMessage.getAttachmentFormats() @@ -208,7 +208,7 @@ export class V2ProofService extends P await this.updateState(messageContext.agentContext, proofRecord, ProofState.ProposalReceived) } catch { // No proof record exists with thread id - proofRecord = new ProofRecord({ + proofRecord = new ProofExchangeRecord({ connectionId: connectionRecord?.id, threadId: proposalMessage.threadId, parentThreadId: proposalMessage.thread?.parentThreadId, @@ -236,7 +236,7 @@ export class V2ProofService extends P public async createRequest( agentContext: AgentContext, options: CreateRequestOptions - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> { + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> { // create attachment formats const formats = [] for (const key of Object.keys(options.proofFormats)) { @@ -258,7 +258,7 @@ export class V2ProofService extends P }) // create & store proof record - const proofRecord = new ProofRecord({ + const proofRecord = new ProofExchangeRecord({ connectionId: options.connectionRecord?.id, threadId: requestMessage.threadId, parentThreadId: requestMessage.thread?.parentThreadId, @@ -286,7 +286,7 @@ export class V2ProofService extends P public async createRequestAsResponse( agentContext: AgentContext, options: CreateRequestAsResponseOptions - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> { + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> { options.proofRecord.assertState(ProofState.ProposalReceived) const proposal = await this.didCommMessageRepository.getAgentMessage(agentContext, { @@ -334,7 +334,7 @@ export class V2ProofService extends P public async processRequest( messageContext: InboundMessageContext - ): Promise { + ): Promise { const { message: proofRequestMessage, connection: connectionRecord } = messageContext const requestAttachments = proofRequestMessage.getAttachmentFormats() @@ -356,7 +356,7 @@ export class V2ProofService extends P this.logger.debug(`Received proof request`, proofRequestMessage) - let proofRecord: ProofRecord + let proofRecord: ProofExchangeRecord try { proofRecord = await this.proofRepository.getSingleByQuery(messageContext.agentContext, { @@ -391,7 +391,7 @@ export class V2ProofService extends P await this.updateState(messageContext.agentContext, proofRecord, ProofState.RequestReceived) } catch { // No proof record exists with thread id - proofRecord = new ProofRecord({ + proofRecord = new ProofExchangeRecord({ connectionId: connectionRecord?.id, threadId: proofRequestMessage.threadId, parentThreadId: proofRequestMessage.thread?.parentThreadId, @@ -419,7 +419,7 @@ export class V2ProofService extends P public async createPresentation( agentContext: AgentContext, options: CreatePresentationOptions - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> { + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> { // assert state options.proofRecord.assertState(ProofState.RequestReceived) @@ -458,7 +458,9 @@ export class V2ProofService extends P return { message: presentationMessage, proofRecord: options.proofRecord } } - public async processPresentation(messageContext: InboundMessageContext): Promise { + public async processPresentation( + messageContext: InboundMessageContext + ): Promise { const { message: presentationMessage, connection: connectionRecord } = messageContext this.logger.debug(`Processing presentation with id ${presentationMessage.id}`) @@ -533,7 +535,7 @@ export class V2ProofService extends P public async createAck( agentContext: AgentContext, options: CreateAckOptions - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> { + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> { // assert we've received the final presentation const presentation = await this.didCommMessageRepository.getAgentMessage(agentContext, { associatedRecordId: options.proofRecord.id, @@ -559,7 +561,9 @@ export class V2ProofService extends P } } - public async processAck(messageContext: InboundMessageContext): Promise { + public async processAck( + messageContext: InboundMessageContext + ): Promise { const { message: ackMessage, connection: connectionRecord } = messageContext const proofRecord = await this.proofRepository.getSingleByQuery(messageContext.agentContext, { @@ -593,7 +597,7 @@ export class V2ProofService extends P public async createProblemReport( agentContext: AgentContext, options: CreateProblemReportOptions - ): Promise<{ proofRecord: ProofRecord; message: AgentMessage }> { + ): Promise<{ proofRecord: ProofExchangeRecord; message: AgentMessage }> { const msg = new V2PresentationProblemReportMessage({ description: { code: PresentationProblemReportReason.Abandoned, @@ -614,7 +618,7 @@ export class V2ProofService extends P public async processProblemReport( messageContext: InboundMessageContext - ): Promise { + ): Promise { const { message: presentationProblemReportMessage } = messageContext const connectionRecord = messageContext.assertReadyConnection() @@ -671,7 +675,10 @@ export class V2ProofService extends P return retVal } - public async shouldAutoRespondToProposal(agentContext: AgentContext, proofRecord: ProofRecord): Promise { + public async shouldAutoRespondToProposal( + agentContext: AgentContext, + proofRecord: ProofExchangeRecord + ): Promise { const proposal = await this.didCommMessageRepository.findAgentMessage(agentContext, { associatedRecordId: proofRecord.id, messageClass: V2ProposalPresentationMessage, @@ -700,7 +707,10 @@ export class V2ProofService extends P return true } - public async shouldAutoRespondToRequest(agentContext: AgentContext, proofRecord: ProofRecord): Promise { + public async shouldAutoRespondToRequest( + agentContext: AgentContext, + proofRecord: ProofExchangeRecord + ): Promise { const proposal = await this.didCommMessageRepository.findAgentMessage(agentContext, { associatedRecordId: proofRecord.id, messageClass: V2ProposalPresentationMessage, @@ -716,7 +726,9 @@ export class V2ProofService extends P }) if (!request) { - throw new AriesFrameworkError(`Expected to find a request message for ProofRecord with id ${proofRecord.id}`) + throw new AriesFrameworkError( + `Expected to find a request message for ProofExchangeRecord with id ${proofRecord.id}` + ) } const proposalAttachments = proposal.getAttachmentFormats() @@ -731,7 +743,10 @@ export class V2ProofService extends P return equalityResults.every((x) => x === true) } - public async shouldAutoRespondToPresentation(agentContext: AgentContext, proofRecord: ProofRecord): Promise { + public async shouldAutoRespondToPresentation( + agentContext: AgentContext, + proofRecord: ProofExchangeRecord + ): Promise { const request = await this.didCommMessageRepository.getAgentMessage(agentContext, { associatedRecordId: proofRecord.id, messageClass: V2RequestPresentationMessage, diff --git a/packages/core/src/modules/proofs/protocol/v2/__tests__/indy-proof-presentation.test.ts b/packages/core/src/modules/proofs/protocol/v2/__tests__/indy-proof-presentation.test.ts index 04c06388b5..e36fe8d4ad 100644 --- a/packages/core/src/modules/proofs/protocol/v2/__tests__/indy-proof-presentation.test.ts +++ b/packages/core/src/modules/proofs/protocol/v2/__tests__/indy-proof-presentation.test.ts @@ -1,12 +1,9 @@ import type { Agent } from '../../../../../agent/Agent' import type { ConnectionRecord } from '../../../../connections/repository/ConnectionRecord' -import type { ProposeProofOptions, AcceptProposalOptions } from '../../../ProofsApiOptions' -import type { IndyProofFormat } from '../../../formats/indy/IndyProofFormat' -import type { ProofRecord } from '../../../repository/ProofRecord' +import type { AcceptProposalOptions } from '../../../ProofsApiOptions' import type { PresentationPreview } from '../../v1/models/V1PresentationPreview' -import type { V2ProofService } from '../V2ProofService' -import { setupProofsTest, waitForProofRecord } from '../../../../../../tests/helpers' +import { setupProofsTest, waitForProofExchangeRecord } from '../../../../../../tests/helpers' import testLogger from '../../../../../../tests/logger' import { DidCommMessageRepository } from '../../../../../storage' import { @@ -15,6 +12,7 @@ import { V2_INDY_PRESENTATION, } from '../../../formats/ProofFormatConstants' import { ProofState } from '../../../models/ProofState' +import { ProofExchangeRecord } from '../../../repository/ProofExchangeRecord' import { V2PresentationMessage, V2RequestPresentationMessage } from '../messages' import { V2ProposalPresentationMessage } from '../messages/V2ProposalPresentationMessage' @@ -23,8 +21,8 @@ describe('Present Proof', () => { let aliceAgent: Agent let aliceConnection: ConnectionRecord let presentationPreview: PresentationPreview - let faberProofRecord: ProofRecord - let aliceProofRecord: ProofRecord + let faberProofExchangeRecord: ProofExchangeRecord + let aliceProofExchangeRecord: ProofExchangeRecord let didCommMessageRepository: DidCommMessageRepository beforeAll(async () => { @@ -46,11 +44,11 @@ describe('Present Proof', () => { test(`Alice Creates and sends Proof Proposal to Faber`, async () => { testLogger.test('Alice sends proof proposal to Faber') - const faberPresentationRecordPromise = waitForProofRecord(faberAgent, { + const faberPresentationRecordPromise = waitForProofExchangeRecord(faberAgent, { state: ProofState.ProposalReceived, }) - aliceProofRecord = await aliceAgent.proofs.proposeProof({ + aliceProofExchangeRecord = await aliceAgent.proofs.proposeProof({ connectionId: aliceConnection.id, protocolVersion: 'v2', proofFormats: { @@ -66,12 +64,12 @@ describe('Present Proof', () => { }) testLogger.test('Faber waits for presentation from Alice') - faberProofRecord = await faberPresentationRecordPromise + faberProofExchangeRecord = await faberPresentationRecordPromise didCommMessageRepository = faberAgent.injectionContainer.resolve(DidCommMessageRepository) const proposal = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V2ProposalPresentationMessage, }) @@ -95,9 +93,9 @@ describe('Present Proof', () => { id: expect.any(String), comment: 'V2 propose proof test', }) - expect(faberProofRecord).toMatchObject({ + expect(faberProofExchangeRecord).toMatchObject({ id: expect.anything(), - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, state: ProofState.ProposalReceived, protocolVersion: 'v2', }) @@ -106,24 +104,24 @@ describe('Present Proof', () => { test(`Faber accepts the Proposal send by Alice`, async () => { // Accept Proposal const acceptProposalOptions: AcceptProposalOptions = { - proofRecordId: faberProofRecord.id, + proofRecordId: faberProofExchangeRecord.id, } - const alicePresentationRecordPromise = waitForProofRecord(aliceAgent, { - threadId: faberProofRecord.threadId, + const alicePresentationRecordPromise = waitForProofExchangeRecord(aliceAgent, { + threadId: faberProofExchangeRecord.threadId, state: ProofState.RequestReceived, }) testLogger.test('Faber accepts presentation proposal from Alice') - faberProofRecord = await faberAgent.proofs.acceptProposal(acceptProposalOptions) + faberProofExchangeRecord = await faberAgent.proofs.acceptProposal(acceptProposalOptions) testLogger.test('Alice waits for proof request from Faber') - aliceProofRecord = await alicePresentationRecordPromise + aliceProofExchangeRecord = await alicePresentationRecordPromise didCommMessageRepository = faberAgent.injectionContainer.resolve(DidCommMessageRepository) const request = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V2RequestPresentationMessage, }) @@ -146,12 +144,12 @@ describe('Present Proof', () => { ], id: expect.any(String), thread: { - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, }, }) - expect(aliceProofRecord).toMatchObject({ + expect(aliceProofExchangeRecord).toMatchObject({ id: expect.anything(), - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, state: ProofState.RequestReceived, protocolVersion: 'v2', }) @@ -162,28 +160,28 @@ describe('Present Proof', () => { testLogger.test('Alice accepts presentation request from Faber') const requestedCredentials = await aliceAgent.proofs.autoSelectCredentialsForProofRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, config: { filterByPresentationPreview: true, }, }) - const faberPresentationRecordPromise = waitForProofRecord(faberAgent, { - threadId: aliceProofRecord.threadId, + const faberPresentationRecordPromise = waitForProofExchangeRecord(faberAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.PresentationReceived, }) await aliceAgent.proofs.acceptRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, proofFormats: { indy: requestedCredentials.proofFormats.indy }, }) // Faber waits for the presentation from Alice testLogger.test('Faber waits for presentation from Alice') - faberProofRecord = await faberPresentationRecordPromise + faberProofExchangeRecord = await faberPresentationRecordPromise const presentation = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V2PresentationMessage, }) @@ -206,46 +204,46 @@ describe('Present Proof', () => { ], id: expect.any(String), thread: { - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, }, }) - expect(faberProofRecord.id).not.toBeNull() - expect(faberProofRecord).toMatchObject({ - threadId: faberProofRecord.threadId, + expect(faberProofExchangeRecord.id).not.toBeNull() + expect(faberProofExchangeRecord).toMatchObject({ + threadId: faberProofExchangeRecord.threadId, state: ProofState.PresentationReceived, protocolVersion: 'v2', }) }) test(`Faber accepts the presentation provided by Alice`, async () => { - const aliceProofRecordPromise = waitForProofRecord(aliceAgent, { - threadId: aliceProofRecord.threadId, + const aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.Done, }) // Faber accepts the presentation provided by Alice testLogger.test('Faber accepts the presentation provided by Alice') - await faberAgent.proofs.acceptPresentation(faberProofRecord.id) + await faberAgent.proofs.acceptPresentation(faberProofExchangeRecord.id) // Alice waits until she received a presentation acknowledgement testLogger.test('Alice waits until she receives a presentation acknowledgement') - aliceProofRecord = await aliceProofRecordPromise + aliceProofExchangeRecord = await aliceProofExchangeRecordPromise - expect(faberProofRecord).toMatchObject({ - // type: ProofRecord.name, + expect(faberProofExchangeRecord).toMatchObject({ + type: ProofExchangeRecord.type, id: expect.any(String), createdAt: expect.any(Date), - threadId: aliceProofRecord.threadId, + threadId: aliceProofExchangeRecord.threadId, connectionId: expect.any(String), isVerified: true, state: ProofState.PresentationReceived, }) - expect(aliceProofRecord).toMatchObject({ - // type: ProofRecord.name, + expect(aliceProofExchangeRecord).toMatchObject({ + type: ProofExchangeRecord.type, id: expect.any(String), createdAt: expect.any(Date), - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, connectionId: expect.any(String), state: ProofState.Done, }) diff --git a/packages/core/src/modules/proofs/protocol/v2/__tests__/indy-proof-proposal.test.ts b/packages/core/src/modules/proofs/protocol/v2/__tests__/indy-proof-proposal.test.ts index 8b3d37be7c..0aed8af01c 100644 --- a/packages/core/src/modules/proofs/protocol/v2/__tests__/indy-proof-proposal.test.ts +++ b/packages/core/src/modules/proofs/protocol/v2/__tests__/indy-proof-proposal.test.ts @@ -1,12 +1,9 @@ import type { Agent } from '../../../../../agent/Agent' import type { ConnectionRecord } from '../../../../connections/repository/ConnectionRecord' -import type { ProposeProofOptions } from '../../../ProofsApiOptions' -import type { IndyProofFormat } from '../../../formats/indy/IndyProofFormat' -import type { ProofRecord } from '../../../repository' +import type { ProofExchangeRecord } from '../../../repository' import type { PresentationPreview } from '../../v1/models/V1PresentationPreview' -import type { V2ProofService } from '../V2ProofService' -import { setupProofsTest, waitForProofRecord } from '../../../../../../tests/helpers' +import { setupProofsTest, waitForProofExchangeRecord } from '../../../../../../tests/helpers' import testLogger from '../../../../../../tests/logger' import { DidCommMessageRepository } from '../../../../../storage' import { V2_INDY_PRESENTATION_PROPOSAL } from '../../../formats/ProofFormatConstants' @@ -18,7 +15,7 @@ describe('Present Proof', () => { let aliceAgent: Agent let aliceConnection: ConnectionRecord let presentationPreview: PresentationPreview - let faberPresentationRecord: ProofRecord + let faberPresentationRecord: ProofExchangeRecord let didCommMessageRepository: DidCommMessageRepository beforeAll(async () => { @@ -40,7 +37,7 @@ describe('Present Proof', () => { test(`Alice Creates and sends Proof Proposal to Faber`, async () => { testLogger.test('Alice sends proof proposal to Faber') - const faberPresentationRecordPromise = waitForProofRecord(faberAgent, { + const faberPresentationRecordPromise = waitForProofExchangeRecord(faberAgent, { state: ProofState.ProposalReceived, }) diff --git a/packages/core/src/modules/proofs/protocol/v2/__tests__/indy-proof-request.test.ts b/packages/core/src/modules/proofs/protocol/v2/__tests__/indy-proof-request.test.ts index c2d7ea262e..5fae009dc1 100644 --- a/packages/core/src/modules/proofs/protocol/v2/__tests__/indy-proof-request.test.ts +++ b/packages/core/src/modules/proofs/protocol/v2/__tests__/indy-proof-request.test.ts @@ -1,12 +1,10 @@ import type { Agent } from '../../../../../agent/Agent' import type { ConnectionRecord } from '../../../../connections/repository/ConnectionRecord' -import type { ProposeProofOptions, AcceptProposalOptions } from '../../../ProofsApiOptions' -import type { IndyProofFormat } from '../../../formats/indy/IndyProofFormat' -import type { ProofRecord } from '../../../repository/ProofRecord' +import type { AcceptProposalOptions } from '../../../ProofsApiOptions' +import type { ProofExchangeRecord } from '../../../repository/ProofExchangeRecord' import type { PresentationPreview } from '../../v1/models/V1PresentationPreview' -import type { V2ProofService } from '../V2ProofService' -import { setupProofsTest, waitForProofRecord } from '../../../../../../tests/helpers' +import { setupProofsTest, waitForProofExchangeRecord } from '../../../../../../tests/helpers' import testLogger from '../../../../../../tests/logger' import { DidCommMessageRepository } from '../../../../../storage' import { V2_INDY_PRESENTATION_PROPOSAL, V2_INDY_PRESENTATION_REQUEST } from '../../../formats/ProofFormatConstants' @@ -19,8 +17,8 @@ describe('Present Proof', () => { let aliceAgent: Agent let aliceConnection: ConnectionRecord let presentationPreview: PresentationPreview - let faberProofRecord: ProofRecord - let aliceProofRecord: ProofRecord + let faberProofExchangeRecord: ProofExchangeRecord + let aliceProofExchangeRecord: ProofExchangeRecord let didCommMessageRepository: DidCommMessageRepository beforeAll(async () => { @@ -42,11 +40,11 @@ describe('Present Proof', () => { test(`Alice Creates and sends Proof Proposal to Faber`, async () => { testLogger.test('Alice sends proof proposal to Faber') - const faberPresentationRecordPromise = waitForProofRecord(faberAgent, { + const faberPresentationRecordPromise = waitForProofExchangeRecord(faberAgent, { state: ProofState.ProposalReceived, }) - aliceProofRecord = await aliceAgent.proofs.proposeProof({ + aliceProofExchangeRecord = await aliceAgent.proofs.proposeProof({ connectionId: aliceConnection.id, protocolVersion: 'v2', proofFormats: { @@ -62,12 +60,12 @@ describe('Present Proof', () => { }) testLogger.test('Faber waits for presentation from Alice') - faberProofRecord = await faberPresentationRecordPromise + faberProofExchangeRecord = await faberPresentationRecordPromise didCommMessageRepository = faberAgent.injectionContainer.resolve(DidCommMessageRepository) const proposal = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V2ProposalPresentationMessage, }) @@ -91,9 +89,9 @@ describe('Present Proof', () => { id: expect.any(String), comment: 'V2 propose proof test', }) - expect(faberProofRecord).toMatchObject({ + expect(faberProofExchangeRecord).toMatchObject({ id: expect.anything(), - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, state: ProofState.ProposalReceived, protocolVersion: 'v2', }) @@ -102,24 +100,24 @@ describe('Present Proof', () => { test(`Faber accepts the Proposal send by Alice`, async () => { // Accept Proposal const acceptProposalOptions: AcceptProposalOptions = { - proofRecordId: faberProofRecord.id, + proofRecordId: faberProofExchangeRecord.id, } - const alicePresentationRecordPromise = waitForProofRecord(aliceAgent, { - threadId: faberProofRecord.threadId, + const alicePresentationRecordPromise = waitForProofExchangeRecord(aliceAgent, { + threadId: faberProofExchangeRecord.threadId, state: ProofState.RequestReceived, }) testLogger.test('Faber accepts presentation proposal from Alice') - faberProofRecord = await faberAgent.proofs.acceptProposal(acceptProposalOptions) + faberProofExchangeRecord = await faberAgent.proofs.acceptProposal(acceptProposalOptions) testLogger.test('Alice waits for proof request from Faber') - aliceProofRecord = await alicePresentationRecordPromise + aliceProofExchangeRecord = await alicePresentationRecordPromise didCommMessageRepository = faberAgent.injectionContainer.resolve(DidCommMessageRepository) const request = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V2RequestPresentationMessage, }) @@ -142,12 +140,12 @@ describe('Present Proof', () => { ], id: expect.any(String), thread: { - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, }, }) - expect(aliceProofRecord).toMatchObject({ + expect(aliceProofExchangeRecord).toMatchObject({ id: expect.anything(), - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, state: ProofState.RequestReceived, protocolVersion: 'v2', }) diff --git a/packages/core/src/modules/proofs/protocol/v2/handlers/V2PresentationHandler.ts b/packages/core/src/modules/proofs/protocol/v2/handlers/V2PresentationHandler.ts index d75a4a855c..c9723d8555 100644 --- a/packages/core/src/modules/proofs/protocol/v2/handlers/V2PresentationHandler.ts +++ b/packages/core/src/modules/proofs/protocol/v2/handlers/V2PresentationHandler.ts @@ -2,7 +2,7 @@ import type { AgentConfig } from '../../../../../agent/AgentConfig' import type { Handler, HandlerInboundMessage } from '../../../../../agent/Handler' import type { DidCommMessageRepository } from '../../../../../storage' import type { ProofResponseCoordinator } from '../../../ProofResponseCoordinator' -import type { ProofRecord } from '../../../repository' +import type { ProofExchangeRecord } from '../../../repository' import type { V2ProofService } from '../V2ProofService' import { createOutboundMessage, createOutboundServiceMessage } from '../../../../../agent/helpers' @@ -35,7 +35,7 @@ export class V2PresentationHandler implements Handler { } } - private async createAck(record: ProofRecord, messageContext: HandlerInboundMessage) { + private async createAck(record: ProofExchangeRecord, messageContext: HandlerInboundMessage) { this.agentConfig.logger.info( `Automatically sending acknowledgement with autoAccept on ${this.agentConfig.autoAcceptProofs}` ) diff --git a/packages/core/src/modules/proofs/protocol/v2/handlers/V2ProposePresentationHandler.ts b/packages/core/src/modules/proofs/protocol/v2/handlers/V2ProposePresentationHandler.ts index 232065fd58..e3ddafe295 100644 --- a/packages/core/src/modules/proofs/protocol/v2/handlers/V2ProposePresentationHandler.ts +++ b/packages/core/src/modules/proofs/protocol/v2/handlers/V2ProposePresentationHandler.ts @@ -8,7 +8,7 @@ import type { CreateRequestAsResponseOptions, ProofRequestFromProposalOptions, } from '../../../models/ProofServiceOptions' -import type { ProofRecord } from '../../../repository/ProofRecord' +import type { ProofExchangeRecord } from '../../../repository/ProofExchangeRecord' import type { V2ProofService } from '../V2ProofService' import { createOutboundMessage } from '../../../../../agent/helpers' @@ -43,7 +43,7 @@ export class V2ProposePresentationHandler ) { this.agentConfig.logger.info( diff --git a/packages/core/src/modules/proofs/protocol/v2/handlers/V2RequestPresentationHandler.ts b/packages/core/src/modules/proofs/protocol/v2/handlers/V2RequestPresentationHandler.ts index 4f3c5ee123..39df9b627f 100644 --- a/packages/core/src/modules/proofs/protocol/v2/handlers/V2RequestPresentationHandler.ts +++ b/packages/core/src/modules/proofs/protocol/v2/handlers/V2RequestPresentationHandler.ts @@ -8,7 +8,7 @@ import type { FormatRequestedCredentialReturn, FormatRetrievedCredentialOptions, } from '../../../models/ProofServiceOptions' -import type { ProofRecord } from '../../../repository/ProofRecord' +import type { ProofExchangeRecord } from '../../../repository/ProofExchangeRecord' import type { V2ProofService } from '../V2ProofService' import { createOutboundMessage, createOutboundServiceMessage } from '../../../../../agent/helpers' @@ -49,7 +49,7 @@ export class V2RequestPresentationHandler ) { const requestMessage = await this.didCommMessageRepository.getAgentMessage(messageContext.agentContext, { diff --git a/packages/core/src/modules/proofs/repository/ProofRecord.ts b/packages/core/src/modules/proofs/repository/ProofExchangeRecord.ts similarity index 91% rename from packages/core/src/modules/proofs/repository/ProofRecord.ts rename to packages/core/src/modules/proofs/repository/ProofExchangeRecord.ts index 54cb12538e..f145703dff 100644 --- a/packages/core/src/modules/proofs/repository/ProofRecord.ts +++ b/packages/core/src/modules/proofs/repository/ProofExchangeRecord.ts @@ -6,7 +6,7 @@ import { AriesFrameworkError } from '../../../error' import { BaseRecord } from '../../../storage/BaseRecord' import { uuid } from '../../../utils/uuid' -export interface ProofRecordProps { +export interface ProofExchangeRecordProps { id?: string createdAt?: Date protocolVersion: string @@ -28,9 +28,7 @@ export type DefaultProofTags = { state: ProofState } -// T-TODO: rename to proof exchange record - -export class ProofRecord extends BaseRecord { +export class ProofExchangeRecord extends BaseRecord { public connectionId?: string public threadId!: string public protocolVersion!: string @@ -41,9 +39,9 @@ export class ProofRecord extends BaseRecord { public errorMessage?: string public static readonly type = 'ProofRecord' - public readonly type = ProofRecord.type + public readonly type = ProofExchangeRecord.type - public constructor(props: ProofRecordProps) { + public constructor(props: ProofExchangeRecordProps) { super() if (props) { diff --git a/packages/core/src/modules/proofs/repository/ProofRepository.ts b/packages/core/src/modules/proofs/repository/ProofRepository.ts index cb7a5033ef..48c6453d76 100644 --- a/packages/core/src/modules/proofs/repository/ProofRepository.ts +++ b/packages/core/src/modules/proofs/repository/ProofRepository.ts @@ -6,15 +6,15 @@ import { inject, injectable } from '../../../plugins' import { Repository } from '../../../storage/Repository' import { StorageService } from '../../../storage/StorageService' -import { ProofRecord } from './ProofRecord' +import { ProofExchangeRecord } from './ProofExchangeRecord' @injectable() -export class ProofRepository extends Repository { +export class ProofRepository extends Repository { public constructor( - @inject(InjectionSymbols.StorageService) storageService: StorageService, + @inject(InjectionSymbols.StorageService) storageService: StorageService, eventEmitter: EventEmitter ) { - super(ProofRecord, storageService, eventEmitter) + super(ProofExchangeRecord, storageService, eventEmitter) } /** @@ -30,7 +30,7 @@ export class ProofRepository extends Repository { agentContext: AgentContext, threadId: string, connectionId?: string - ): Promise { + ): Promise { return this.getSingleByQuery(agentContext, { threadId, connectionId }) } @@ -45,7 +45,7 @@ export class ProofRepository extends Repository { agentContext: AgentContext, parentThreadId: string, connectionId?: string - ): Promise { + ): Promise { return this.findByQuery(agentContext, { parentThreadId, connectionId }) } } diff --git a/packages/core/src/modules/proofs/repository/index.ts b/packages/core/src/modules/proofs/repository/index.ts index 8c1bf5235e..f861fe0806 100644 --- a/packages/core/src/modules/proofs/repository/index.ts +++ b/packages/core/src/modules/proofs/repository/index.ts @@ -1,3 +1,3 @@ -export * from './ProofRecord' +export * from './ProofExchangeRecord' export * from './ProofRepository' export * from './PresentationExchangeRecord' diff --git a/packages/core/src/storage/migration/__tests__/__fixtures__/alice-4-proofs-0.2.json b/packages/core/src/storage/migration/__tests__/__fixtures__/alice-4-proofs-0.2.json index 3a479abd31..c5f554ff3e 100644 --- a/packages/core/src/storage/migration/__tests__/__fixtures__/alice-4-proofs-0.2.json +++ b/packages/core/src/storage/migration/__tests__/__fixtures__/alice-4-proofs-0.2.json @@ -68,7 +68,7 @@ "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5" }, "id": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", - "type": "ProofRecord", + "type": "ProofExchangeRecord", "tags": { "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", @@ -115,7 +115,7 @@ "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82" }, "id": "ea840186-3c77-45f4-a2e6-349811ad8994", - "type": "ProofRecord", + "type": "ProofExchangeRecord", "tags": { "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", @@ -179,7 +179,7 @@ "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5" }, "id": "ec02ba64-63e3-46bc-b2a4-9d549d642d30", - "type": "ProofRecord", + "type": "ProofExchangeRecord", "tags": { "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", @@ -225,7 +225,7 @@ "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82" }, "id": "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e", - "type": "ProofRecord", + "type": "ProofExchangeRecord", "tags": { "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", diff --git a/packages/core/src/storage/migration/__tests__/__snapshots__/0.2.test.ts.snap b/packages/core/src/storage/migration/__tests__/__snapshots__/0.2.test.ts.snap index 47b6988932..f46399930f 100644 --- a/packages/core/src/storage/migration/__tests__/__snapshots__/0.2.test.ts.snap +++ b/packages/core/src/storage/migration/__tests__/__snapshots__/0.2.test.ts.snap @@ -2,64 +2,20 @@ exports[`UpdateAssistant | v0.2 - v0.3 should correctly update proof records and create didcomm records 1`] = ` Object { - "1-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "1-4e4f-41d9-94c4-f49351b811f1", - "tags": Object { - "associatedRecordId": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", - "messageId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - "messageName": "propose-presentation", - "messageType": "https://didcomm.org/present-proof/1.0/propose-presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "receiver", - "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - }, - "type": "DidCommMessageRecord", - "value": Object { - "_tags": Object {}, - "associatedRecordId": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "1-4e4f-41d9-94c4-f49351b811f1", - "message": Object { - "@id": "00cdd404-82fc-431d-9c18-fb643636d2a5", - "@type": "https://didcomm.org/present-proof/1.0/propose-presentation", - "presentation_proposal": Object { - "@type": "https://didcomm.org/present-proof/1.0/presentation-preview", - "attributes": Array [ - Object { - "cred_def_id": "7yW6SoTjHNhD3zYgm4PbK8:3:CL:472319:TAG", - "name": "name", - "value": "Alice", - }, - ], - "predicates": Array [], - }, - }, - "metadata": Object {}, - "role": "receiver", - }, - }, - "10-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "10-4e4f-41d9-94c4-f49351b811f1", + "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e": Object { + "id": "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e", "tags": Object { - "associatedRecordId": "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e", - "messageId": "2481ce81-560b-4ce6-a22b-ee4b6ed369e8", - "messageName": "presentation", - "messageType": "https://didcomm.org/present-proof/1.0/presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "sender", + "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", + "state": "done", "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", }, - "type": "DidCommMessageRecord", + "type": "ProofExchangeRecord", "value": Object { - "_tags": Object {}, - "associatedRecordId": "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "10-4e4f-41d9-94c4-f49351b811f1", - "message": Object { + "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", + "createdAt": "2022-09-08T19:36:06.261Z", + "id": "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e", + "metadata": Object {}, + "presentationMessage": Object { "@id": "2481ce81-560b-4ce6-a22b-ee4b6ed369e8", "@type": "https://didcomm.org/present-proof/1.0/presentation", "presentations~attach": Array [ @@ -75,202 +31,54 @@ Object { "thid": "7fcfc074-43ac-43cc-92b9-76afceeebe82", }, }, - "metadata": Object {}, - "role": "sender", - }, - }, - "2-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "2-4e4f-41d9-94c4-f49351b811f1", - "tags": Object { - "associatedRecordId": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", - "messageId": "2862b25d-396c-46d7-ad09-f48ff4ea6db6", - "messageName": "request-presentation", - "messageType": "https://didcomm.org/present-proof/1.0/request-presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "sender", - "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - }, - "type": "DidCommMessageRecord", - "value": Object { - "_tags": Object {}, - "associatedRecordId": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "2-4e4f-41d9-94c4-f49351b811f1", - "message": Object { - "@id": "2862b25d-396c-46d7-ad09-f48ff4ea6db6", + "requestMessage": Object { + "@id": "7fcfc074-43ac-43cc-92b9-76afceeebe82", "@type": "https://didcomm.org/present-proof/1.0/request-presentation", "request_presentations~attach": Array [ Object { "@id": "libindy-request-presentation-0", "data": Object { - "base64": "eyJuYW1lIjoicHJvb2YtcmVxdWVzdCIsInZlcnNpb24iOiIxLjAiLCJub25jZSI6IjQwMzU1MDc0MDYxMTU0MzEwMzA5NzMyMiIsInJlcXVlc3RlZF9hdHRyaWJ1dGVzIjp7IjBmZWExODk3LTQzMTEtNDhmMi1hMmMyLTM4NzRlOTkzYWVmMCI6eyJuYW1lIjoibmFtZSIsInJlc3RyaWN0aW9ucyI6W3siY3JlZF9kZWZfaWQiOiI3eVc2U29UakhOaEQzellnbTRQYks4OjM6Q0w6NDcyMzE5OlRBRyJ9XX19LCJyZXF1ZXN0ZWRfcHJlZGljYXRlcyI6e319", - }, - "mime-type": "application/json", - }, - ], - "~thread": Object { - "thid": "00cdd404-82fc-431d-9c18-fb643636d2a5", - }, - }, - "metadata": Object {}, - "role": "sender", - }, - }, - "3-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "3-4e4f-41d9-94c4-f49351b811f1", - "tags": Object { - "associatedRecordId": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", - "messageId": "4185f336-f307-4022-a27d-78d1271586f6", - "messageName": "presentation", - "messageType": "https://didcomm.org/present-proof/1.0/presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "receiver", - "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - }, - "type": "DidCommMessageRecord", - "value": Object { - "_tags": Object {}, - "associatedRecordId": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "3-4e4f-41d9-94c4-f49351b811f1", - "message": Object { - "@id": "4185f336-f307-4022-a27d-78d1271586f6", - "@type": "https://didcomm.org/present-proof/1.0/presentation", - "presentations~attach": Array [ - Object { - "@id": "libindy-presentation-0", - "data": Object { - "base64": "eyJwcm9vZiI6eyJwcm9vZnMiOlt7InByaW1hcnlfcHJvb2YiOnsiZXFfcHJvb2YiOnsicmV2ZWFsZWRfYXR0cnMiOnsibmFtZSI6IjI3MDM0NjQwMDI0MTE3MzMxMDMzMDYzMTI4MDQ0MDA0MzE4MjE4NDg2ODE2OTMxNTIwODg2ND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F0ZXMiOnt9fQ==", }, "mime-type": "application/json", }, ], - "~thread": Object { - "thid": "00cdd404-82fc-431d-9c18-fb643636d2a5", - }, }, - "metadata": Object {}, - "role": "receiver", + "state": "done", + "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", }, }, - "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e": Object { - "id": "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e", + "72c96cd1-1f26-4bf3-8a00-5c00926859a8": Object { + "id": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", "tags": Object { "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", - "parentThreadId": undefined, "state": "done", - "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", + "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", }, - "type": "ProofRecord", + "type": "ProofExchangeRecord", "value": Object { "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", - "createdAt": "2022-09-08T19:36:06.261Z", - "id": "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e", - "metadata": Object {}, - "protocolVersion": "v1", - "state": "done", - "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", - }, - }, - "4-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "4-4e4f-41d9-94c4-f49351b811f1", - "tags": Object { - "associatedRecordId": "ea840186-3c77-45f4-a2e6-349811ad8994", - "messageId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", - "messageName": "request-presentation", - "messageType": "https://didcomm.org/present-proof/1.0/request-presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "sender", - "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", - }, - "type": "DidCommMessageRecord", - "value": Object { - "_tags": Object {}, - "associatedRecordId": "ea840186-3c77-45f4-a2e6-349811ad8994", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "4-4e4f-41d9-94c4-f49351b811f1", - "message": Object { - "@id": "7fcfc074-43ac-43cc-92b9-76afceeebe82", - "@type": "https://didcomm.org/present-proof/1.0/request-presentation", - "request_presentations~attach": Array [ - Object { - "@id": "libindy-request-presentation-0", - "data": Object { - "base64": "eyJuYW1lIjoicHJvb2YtcmVxdWVzdCIsInZlcnNpb24iOiIxLjAiLCJub25jZSI6IjUyODExNDc1NTIxNzg3NzExMjI1Mzc0NSIsInJlcXVlc3RlZF9hdHRyaWJ1dGVzIjp7Im5hbWUiOnsibmFtZSI6Im5hbWUiLCJyZXN0cmljdGlvbnMiOlt7ImNyZWRfZGVmX2lkIjoiN3lXNlNvVGpITmhEM3pZZ200UGJLODozOkNMOjQ3MjMxOTpUQUcifV19fSwicmVxdWVzdGVkX3ByZWRpY2F0ZXMiOnt9fQ==", - }, - "mime-type": "application/json", - }, - ], - }, + "createdAt": "2022-09-08T19:36:06.208Z", + "id": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", + "isVerified": true, "metadata": Object {}, - "role": "sender", - }, - }, - "5-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "5-4e4f-41d9-94c4-f49351b811f1", - "tags": Object { - "associatedRecordId": "ea840186-3c77-45f4-a2e6-349811ad8994", - "messageId": "2481ce81-560b-4ce6-a22b-ee4b6ed369e8", - "messageName": "presentation", - "messageType": "https://didcomm.org/present-proof/1.0/presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "receiver", - "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", - }, - "type": "DidCommMessageRecord", - "value": Object { - "_tags": Object {}, - "associatedRecordId": "ea840186-3c77-45f4-a2e6-349811ad8994", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "5-4e4f-41d9-94c4-f49351b811f1", - "message": Object { - "@id": "2481ce81-560b-4ce6-a22b-ee4b6ed369e8", + "presentationMessage": Object { + "@id": "4185f336-f307-4022-a27d-78d1271586f6", "@type": "https://didcomm.org/present-proof/1.0/presentation", "presentations~attach": Array [ Object { "@id": "libindy-presentation-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yLDIwNSwzMywxMDksMjMyLDE3LDEwNiw2OSw3Miw2MCwyMTAsMjMyLDExMywxMjQsNzYsMTgxLDIwOCwwLDE4NiwyNTEsMTQzLDExMyw0NSwxNzEsMTAsNDMsMTUsMzAsMjA4LDkzLDYsMTY4LDEwNiwyMDMsNDgsMjUwLDIxOSw5LDE3LDEwNCwzNSw1OCwxNTksMTgwLDExMyw2NiwxMzYsNjJdXX19LCJyZXF1ZXN0ZWRfcHJvb2YiOnsicmV2ZWFsZWRfYXR0cnMiOnsiMGZlYTE4OTctNDMxMS00OGYyLWEyYzItMzg3NGU5OTNhZWYwIjp7InN1Yl9wcm9vZl9pbmRleCI6MCwicmF3IjoiQWxpY2UiLCJlbmNvZGVkIjoiMjcwMzQ2NDAwMjQxMTczMzEwMzMwNjMxMjgwNDQwMDQzMTgyMTg0ODY4MTY5MzE1MjA4ODY0MDU1MzU2NTk5MzQ0MTc0Mzg3ODE1MDcifX0sInNlbGZfYXR0ZXN0ZWRfYXR0cnMiOnt9LCJ1bnJldmVhbGVkX2F0dHJzIjp7fSwicHJlZGljYXRlcyI6e319LCJpZGVudGlmaWVycyI6W3sic2NoZW1hX2lkIjoiN3lXNlNvVGpITmhEM3pZZ200UGJLODoyOnRlc3Qtc2NoZW1hLTRlOTRjMmU0LTRmNDctNGZmMy1hODg4LTZmNjRkYTZhOTJkYzoxLjAiLCJjcmVkX2RlZl9pZCI6Ijd5VzZTb1RqSE5oRDN6WWdtNFBiSzg6MzpDTDo0NzIzMTk6VEFHIiwicmV2X3JlZ19pZCI6bnVsbCwidGltZXN0YW1wIjpudWxsfV19", }, "mime-type": "application/json", }, ], "~thread": Object { - "thid": "7fcfc074-43ac-43cc-92b9-76afceeebe82", + "thid": "00cdd404-82fc-431d-9c18-fb643636d2a5", }, }, - "metadata": Object {}, - "role": "receiver", - }, - }, - "6-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "6-4e4f-41d9-94c4-f49351b811f1", - "tags": Object { - "associatedRecordId": "ec02ba64-63e3-46bc-b2a4-9d549d642d30", - "messageId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - "messageName": "propose-presentation", - "messageType": "https://didcomm.org/present-proof/1.0/propose-presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "sender", - "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - }, - "type": "DidCommMessageRecord", - "value": Object { - "_tags": Object {}, - "associatedRecordId": "ec02ba64-63e3-46bc-b2a4-9d549d642d30", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "6-4e4f-41d9-94c4-f49351b811f1", - "message": Object { + "proposalMessage": Object { "@id": "00cdd404-82fc-431d-9c18-fb643636d2a5", "@type": "https://didcomm.org/present-proof/1.0/propose-presentation", "presentation_proposal": Object { @@ -285,30 +93,7 @@ Object { "predicates": Array [], }, }, - "metadata": Object {}, - "role": "sender", - }, - }, - "7-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "7-4e4f-41d9-94c4-f49351b811f1", - "tags": Object { - "associatedRecordId": "ec02ba64-63e3-46bc-b2a4-9d549d642d30", - "messageId": "2862b25d-396c-46d7-ad09-f48ff4ea6db6", - "messageName": "request-presentation", - "messageType": "https://didcomm.org/present-proof/1.0/request-presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "receiver", - "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - }, - "type": "DidCommMessageRecord", - "value": Object { - "_tags": Object {}, - "associatedRecordId": "ec02ba64-63e3-46bc-b2a4-9d549d642d30", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "7-4e4f-41d9-94c4-f49351b811f1", - "message": Object { + "requestMessage": Object { "@id": "2862b25d-396c-46d7-ad09-f48ff4ea6db6", "@type": "https://didcomm.org/present-proof/1.0/request-presentation", "request_presentations~attach": Array [ @@ -324,89 +109,52 @@ Object { "thid": "00cdd404-82fc-431d-9c18-fb643636d2a5", }, }, + "state": "done", + "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", + }, + }, + "STORAGE_VERSION_RECORD_ID": Object { + "id": "STORAGE_VERSION_RECORD_ID", + "tags": Object {}, + "type": "StorageVersionRecord", + "value": Object { + "createdAt": "2022-09-08T19:35:53.872Z", + "id": "STORAGE_VERSION_RECORD_ID", "metadata": Object {}, - "role": "receiver", + "storageVersion": "0.3", }, }, - "72c96cd1-1f26-4bf3-8a00-5c00926859a8": Object { - "id": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", + "ea840186-3c77-45f4-a2e6-349811ad8994": Object { + "id": "ea840186-3c77-45f4-a2e6-349811ad8994", "tags": Object { "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", - "parentThreadId": undefined, "state": "done", - "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", + "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", }, - "type": "ProofRecord", + "type": "ProofExchangeRecord", "value": Object { "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", - "createdAt": "2022-09-08T19:36:06.208Z", - "id": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", + "createdAt": "2022-09-08T19:36:06.261Z", + "id": "ea840186-3c77-45f4-a2e6-349811ad8994", "isVerified": true, "metadata": Object {}, - "protocolVersion": "v1", - "state": "done", - "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - }, - }, - "8-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "8-4e4f-41d9-94c4-f49351b811f1", - "tags": Object { - "associatedRecordId": "ec02ba64-63e3-46bc-b2a4-9d549d642d30", - "messageId": "4185f336-f307-4022-a27d-78d1271586f6", - "messageName": "presentation", - "messageType": "https://didcomm.org/present-proof/1.0/presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "sender", - "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - }, - "type": "DidCommMessageRecord", - "value": Object { - "_tags": Object {}, - "associatedRecordId": "ec02ba64-63e3-46bc-b2a4-9d549d642d30", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "8-4e4f-41d9-94c4-f49351b811f1", - "message": Object { - "@id": "4185f336-f307-4022-a27d-78d1271586f6", + "presentationMessage": Object { + "@id": "2481ce81-560b-4ce6-a22b-ee4b6ed369e8", "@type": "https://didcomm.org/present-proof/1.0/presentation", "presentations~attach": Array [ Object { "@id": "libindy-presentation-0", "data": Object { - "base64": "eyJwcm9vZiI6eyJwcm9vZnMiOlt7InByaW1hcnlfcHJvb2YiOnsiZXFfcHJvb2YiOnsicmV2ZWFsZWRfYXR0cnMiOnsibmFtZSI6IjI3MDM0NjQwMDI0MTE3MzMxMDMzMDYzMTI4MDQ0MDA0MzE4MjE4NDg2ODE2OTMxNTIwODg2NDA1NTM1NjU5OTM0NDE3NDM4NzgxNTA3In0sImFfcHJpbWUiOiI1MjE1MTkyMzYwMDA2NTg5OTUyMjM1MTYwNjkxMzU1OTc4MjA2NDUzODA3NDUzNTk5OTE5OTkzNzM1NTczNzA1OTA2OTY5MTAwMjIzOTM4MjMyMzE5NDE1Njk1NTMzNjQ4MDMzNzc3NzI4NTE3NzI4Mjk4NDU1OTI0NjQ1NTU1NjQyNjE1NTQ3NTI0MDc0MTAyOTQyNjg4NzQwNDcwMjg4MDAyNTgwMjI4OTg4MDk4MDk0NjQxODc5NjkxNzQwMTY2OTc0MzA2OTczNjQ2MDA3ODg3NTU1NDU2NjM3NTUyODk2NjkxNDc3NDg2MDM1MTIxMjU0NDY0NzA2MDY0Mzg2NzA1MzU0MDk3MDcxNDc5OTkwMzIwNzIxMzQ4MjM1NTQ2NjI5OTcxNzAyNzgwNjUwNTgyMDQ3MzMxOTIwNjE5OTIzODg4NjU1NjI0NjYzMDE4NTAzMDUzOTQ4OTEyNzk4MDE1ODA2Mzk5MTAxNTg3MzAzNTgwNzkyMzQ3OTU2NjE1MDgzODczNDQ5MTM0MjEyOTE2MDY3MTExMjM4MjQzMjM1MTk5OTk1MTUzNjIyMTM1N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nVsbH1dfQ==", }, "mime-type": "application/json", }, ], "~thread": Object { - "thid": "00cdd404-82fc-431d-9c18-fb643636d2a5", + "thid": "7fcfc074-43ac-43cc-92b9-76afceeebe82", }, }, - "metadata": Object {}, - "role": "sender", - }, - }, - "9-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "9-4e4f-41d9-94c4-f49351b811f1", - "tags": Object { - "associatedRecordId": "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e", - "messageId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", - "messageName": "request-presentation", - "messageType": "https://didcomm.org/present-proof/1.0/request-presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "receiver", - "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", - }, - "type": "DidCommMessageRecord", - "value": Object { - "_tags": Object {}, - "associatedRecordId": "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "9-4e4f-41d9-94c4-f49351b811f1", - "message": Object { + "requestMessage": Object { "@id": "7fcfc074-43ac-43cc-92b9-76afceeebe82", "@type": "https://didcomm.org/present-proof/1.0/request-presentation", "request_presentations~attach": Array [ @@ -419,37 +167,6 @@ Object { }, ], }, - "metadata": Object {}, - "role": "receiver", - }, - }, - "STORAGE_VERSION_RECORD_ID": Object { - "id": "STORAGE_VERSION_RECORD_ID", - "tags": Object {}, - "type": "StorageVersionRecord", - "value": Object { - "createdAt": "2022-09-08T19:35:53.872Z", - "id": "STORAGE_VERSION_RECORD_ID", - "metadata": Object {}, - "storageVersion": "0.3", - }, - }, - "ea840186-3c77-45f4-a2e6-349811ad8994": Object { - "id": "ea840186-3c77-45f4-a2e6-349811ad8994", - "tags": Object { - "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", - "parentThreadId": undefined, - "state": "done", - "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", - }, - "type": "ProofRecord", - "value": Object { - "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", - "createdAt": "2022-09-08T19:36:06.261Z", - "id": "ea840186-3c77-45f4-a2e6-349811ad8994", - "isVerified": true, - "metadata": Object {}, - "protocolVersion": "v1", "state": "done", "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", }, @@ -458,46 +175,32 @@ Object { "id": "ec02ba64-63e3-46bc-b2a4-9d549d642d30", "tags": Object { "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", - "parentThreadId": undefined, "state": "done", "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", }, - "type": "ProofRecord", + "type": "ProofExchangeRecord", "value": Object { "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", "createdAt": "2022-09-08T19:36:06.208Z", "id": "ec02ba64-63e3-46bc-b2a4-9d549d642d30", "metadata": Object {}, - "protocolVersion": "v1", - "state": "done", - "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - }, - }, -} -`; - -exports[`UpdateAssistant | v0.2 - v0.3 should correctly update the proofs records and create didcomm records with auto update 1`] = ` -Object { - "1-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "1-4e4f-41d9-94c4-f49351b811f1", - "tags": Object { - "associatedRecordId": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", - "messageId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - "messageName": "propose-presentation", - "messageType": "https://didcomm.org/present-proof/1.0/propose-presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "receiver", - "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - }, - "type": "DidCommMessageRecord", - "value": Object { - "_tags": Object {}, - "associatedRecordId": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "1-4e4f-41d9-94c4-f49351b811f1", - "message": Object { + "presentationMessage": Object { + "@id": "4185f336-f307-4022-a27d-78d1271586f6", + "@type": "https://didcomm.org/present-proof/1.0/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636d2a5", + }, + }, + "proposalMessage": Object { "@id": "00cdd404-82fc-431d-9c18-fb643636d2a5", "@type": "https://didcomm.org/present-proof/1.0/propose-presentation", "presentation_proposal": Object { @@ -512,69 +215,7 @@ Object { "predicates": Array [], }, }, - "metadata": Object {}, - "role": "receiver", - }, - }, - "10-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "10-4e4f-41d9-94c4-f49351b811f1", - "tags": Object { - "associatedRecordId": "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e", - "messageId": "2481ce81-560b-4ce6-a22b-ee4b6ed369e8", - "messageName": "presentation", - "messageType": "https://didcomm.org/present-proof/1.0/presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "sender", - "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", - }, - "type": "DidCommMessageRecord", - "value": Object { - "_tags": Object {}, - "associatedRecordId": "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "10-4e4f-41d9-94c4-f49351b811f1", - "message": Object { - "@id": "2481ce81-560b-4ce6-a22b-ee4b6ed369e8", - "@type": "https://didcomm.org/present-proof/1.0/presentation", - "presentations~attach": Array [ - Object { - "@id": "libindy-presentation-0", - "data": Object { - "base64": "eyJwcm9vZiI6eyJwcm9vZnMiOlt7InByaW1hcnlfcHJvb2YiOnsiZXFfcHJvb2YiOnsicmV2ZWFsZWRfYXR0cnMiOnsibmFtZSI6IjI3MDM0NjQwMDI0MTE3MzMxMDMzMDYzMTI4MDQ0MDA0MzE4MjE4NDg2ODE2OTMxNTIwODg2NDA1NTM1NjU5OTM0NDE3NDM4NzgxNTA3In0sImFfcHJpbWUiOiI5MDg5MzE2Mjc0ODc5NTI4MjMzNDA1MTY0NTgwOTM1OTIxMjIwMjMyMzg5ODE0NjE4OTc3ODA3MjA0MDg4OTQ0ODkzNDc1OTE5NTE4Mjc0NDEwNTU3OTU3NjEwNjYzOTAxMTcw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fcHJvb2YiOnsicmV2ZWFsZWRfYXR0cnMiOnsibmFtZSI6eyJzdWJfcHJvb2ZfaW5kZXgiOjAsInJhdyI6IkFsaWNlIiwiZW5jb2RlZCI6IjI3MDM0NjQwMDI0MTE3MzMxMDMzMDYzMTI4MDQ0MDA0MzE4MjE4NDg2ODE2OTMxNTIwODg2NDA1NTM1NjU5OTM0NDE3NDM4NzgxNTA3In19LCJzZWxmX2F0dGVzdGVkX2F0dHJzIjp7fSwidW5yZXZlYWxlZF9hdHRycyI6e30sInByZWRpY2F0ZXMiOnt9fSwiaWRlbnRpZmllcnMiOlt7InNjaGVtYV9pZCI6Ijd5VzZTb1RqSE5oRDN6WWdtNFBiSzg6Mjp0ZXN0LXNjaGVtYS00ZTk0YzJlNC00ZjQ3LTRmZjMtYTg4OC02ZjY0ZGE2YTkyZGM6MS4wIiwiY3JlZF9kZWZfaWQiOiI3eVc2U29UakhOaEQzellnbTRQYks4OjM6Q0w6NDcyMzE5OlRBRyIsInJldl9yZWdfaWQiOm51bGwsInRpbWVzdGFtcCI6bnVsbH1dfQ==", - }, - "mime-type": "application/json", - }, - ], - "~thread": Object { - "thid": "7fcfc074-43ac-43cc-92b9-76afceeebe82", - }, - }, - "metadata": Object {}, - "role": "sender", - }, - }, - "2-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "2-4e4f-41d9-94c4-f49351b811f1", - "tags": Object { - "associatedRecordId": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", - "messageId": "2862b25d-396c-46d7-ad09-f48ff4ea6db6", - "messageName": "request-presentation", - "messageType": "https://didcomm.org/present-proof/1.0/request-presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "sender", - "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - }, - "type": "DidCommMessageRecord", - "value": Object { - "_tags": Object {}, - "associatedRecordId": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "2-4e4f-41d9-94c4-f49351b811f1", - "message": Object { + "requestMessage": Object { "@id": "2862b25d-396c-46d7-ad09-f48ff4ea6db6", "@type": "https://didcomm.org/present-proof/1.0/request-presentation", "request_presentations~attach": Array [ @@ -590,88 +231,45 @@ Object { "thid": "00cdd404-82fc-431d-9c18-fb643636d2a5", }, }, - "metadata": Object {}, - "role": "sender", + "state": "done", + "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", }, }, - "3-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "3-4e4f-41d9-94c4-f49351b811f1", +} +`; + +exports[`UpdateAssistant | v0.2 - v0.3 should correctly update the proofs records and create didcomm records with auto update 1`] = ` +Object { + "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e": Object { + "id": "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e", "tags": Object { - "associatedRecordId": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", - "messageId": "4185f336-f307-4022-a27d-78d1271586f6", - "messageName": "presentation", - "messageType": "https://didcomm.org/present-proof/1.0/presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "receiver", - "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", + "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", + "state": "done", + "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", }, - "type": "DidCommMessageRecord", + "type": "ProofExchangeRecord", "value": Object { - "_tags": Object {}, - "associatedRecordId": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "3-4e4f-41d9-94c4-f49351b811f1", - "message": Object { - "@id": "4185f336-f307-4022-a27d-78d1271586f6", + "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", + "createdAt": "2022-09-08T19:36:06.261Z", + "id": "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e", + "metadata": Object {}, + "presentationMessage": Object { + "@id": "2481ce81-560b-4ce6-a22b-ee4b6ed369e8", "@type": "https://didcomm.org/present-proof/1.0/presentation", "presentations~attach": Array [ Object { "@id": "libindy-presentation-0", "data": Object { - "base64": "eyJwcm9vZiI6eyJwcm9vZnMiOlt7InByaW1hcnlfcHJvb2YiOnsiZXFfcHJvb2YiOnsicmV2ZWFsZWRfYXR0cnMiOnsibmFtZSI6IjI3MDM0NjQwMDI0MTE3MzMxMDMzMDYzMTI4MDQ0MDA0MzE4MjE4NDg2ODE2OTMxNTIwODg2NDA1NTM1NjU5OTM0NDE3NDM4NzgxNTA3In0sImFfcHJpbWUiOiI1MjE1MTkyMzYwMDA2NTg5OTUyMjM1MTYwNjkxMzU1OTc4MjA2NDUzODA3NDUzNTk5OTE5OTkzNzM1NTczNzA1OTA2OTY5MTAwMjIzOTM4MjMyMzE5NDE1Njk1NTMzNjQ4MDMzNzc3NzI4NTE3NzI4Mjk4NDU1OTI0NjQ1NTU1NjQyNjE1NTQ3NTI0MDc0MTAyOTQyNjg4NzQwNDcwMjg4MDAyNTgwMjI4OTg4MDk4MDk0NjQxODc5NjkxNzQwMTY2OTc0MzA2OTczNjQ2MDA3ODg3NTU1NDU2NjM3NTUyODk2NjkxNDc3NDg2MDM1MTIxMjU0NDY0NzA2MDY0Mzg2NzA1MzU0MDk3MDcxNDc5OTkwMzIwNzIxMzQ4MjM1NTQ2NjI5OTcxNzAyNzgwNjUwNTgyMDQ3MzMxOTIwNjE5OTIzODg4NjU1NjI0NjYzMDE4NTAzMDUzOTQ4OTEyNzk4MDE1ODA2Mzk5MTAxNTg3MzAzNTgwNzkyMzQ3OTU2NjE1MDgzODczNDQ5MTM0MjEyOTE2MDY3MTExMjM4MjQzMjM1MTk5OTk1MTUzNjIyMTM1NjA4Nzg5OTc2MTk2NTkzMTczNTU4NTA0NDYxODA0MTk5MzY3MTkwODY2MDY5MTk1MDE5MjA4NjQyMzAwNzE5NjAzMDk5MzI1MjA0Njg4MzkwMjc2NTM5NjQxMDk0Mjc4NTY2NTUzOTU1Mzg4N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ksMTksMTk5LDQ4LDEyNyw5LDYzLDg4LDIxLDAsMjE1LDE3NCw0NywxNzcsMjMyLDE4MiwyNTMsMjQ5LDI0OCwxMTgsMTk2LDI1NCwxMzksMTIsMjksMSw0OCwxMDUsMzMsNCwyMDgsMTA2LDIzNSwyNDcsMjEwLDExMiwyMTAsMTA2LDE5OSwxOTgsNDcsOCwyMzYsNTIsOSw2NywxMjgsMjQwLDI1NCwyMzIsMjEwLDQsMjM5LDE4MywzOSwxOTMsMjQyLDMyLDEzMywxOTQsMTQ4LDk4LDExMSw3NywxNTUsMjA1LDE3OCwxOTcsMTRdXX19LCJyZXF1ZXN0ZWRfcHJvb2YiOnsicmV2ZWFsZWRfYXR0cnMiOnsibmFtZSI6eyJzdWJfcHJvb2ZfaW5kZXgiOjAsInJhdyI6IkFsaWNlIiwiZW5jb2RlZCI6IjI3MDM0NjQwMDI0MTE3MzMxMDMzMDYzMTI4MDQ0MDA0MzE4MjE4NDg2ODE2OTMxNTIwODg2NDA1NTM1NjU5OTM0NDE3NDM4NzgxNTA3In19LCJzZWxmX2F0dGVzdGVkX2F0dHJzIjp7fSwidW5yZXZlYWxlZF9hdHRycyI6e30sInByZWRpY2F0ZXMiOnt9fSwiaWRlbnRpZmllcnMiOlt7InNjaGVtYV9pZCI6Ijd5VzZTb1RqSE5oRDN6WWdtNFBiSzg6Mjp0ZXN0LXNjaGVtYS00ZTk0YzJlNC00ZjQ3LTRmZjMtYTg4OC02ZjY0ZGE2YTkyZGM6MS4wIiwiY3JlZF9kZWZfaWQiOiI3eVc2U29UakhOaEQzellnbTRQYks4OjM6Q0w6NDcyMzE5OlRBRyIsInJldl9yZWdfaWQiOm51bGwsInRpbWVzdGFtcCI6bnVsbH1dfQ==", }, "mime-type": "application/json", }, ], "~thread": Object { - "thid": "00cdd404-82fc-431d-9c18-fb643636d2a5", + "thid": "7fcfc074-43ac-43cc-92b9-76afceeebe82", }, }, - "metadata": Object {}, - "role": "receiver", - }, - }, - "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e": Object { - "id": "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e", - "tags": Object { - "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", - "parentThreadId": undefined, - "state": "done", - "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", - }, - "type": "ProofRecord", - "value": Object { - "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", - "createdAt": "2022-09-08T19:36:06.261Z", - "id": "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e", - "metadata": Object {}, - "protocolVersion": "v1", - "state": "done", - "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", - }, - }, - "4-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "4-4e4f-41d9-94c4-f49351b811f1", - "tags": Object { - "associatedRecordId": "ea840186-3c77-45f4-a2e6-349811ad8994", - "messageId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", - "messageName": "request-presentation", - "messageType": "https://didcomm.org/present-proof/1.0/request-presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "sender", - "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", - }, - "type": "DidCommMessageRecord", - "value": Object { - "_tags": Object {}, - "associatedRecordId": "ea840186-3c77-45f4-a2e6-349811ad8994", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "4-4e4f-41d9-94c4-f49351b811f1", - "message": Object { + "requestMessage": Object { "@id": "7fcfc074-43ac-43cc-92b9-76afceeebe82", "@type": "https://didcomm.org/present-proof/1.0/request-presentation", "request_presentations~attach": Array [ @@ -684,69 +282,41 @@ Object { }, ], }, - "metadata": Object {}, - "role": "sender", + "state": "done", + "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", }, }, - "5-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "5-4e4f-41d9-94c4-f49351b811f1", + "72c96cd1-1f26-4bf3-8a00-5c00926859a8": Object { + "id": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", "tags": Object { - "associatedRecordId": "ea840186-3c77-45f4-a2e6-349811ad8994", - "messageId": "2481ce81-560b-4ce6-a22b-ee4b6ed369e8", - "messageName": "presentation", - "messageType": "https://didcomm.org/present-proof/1.0/presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "receiver", - "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", + "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", + "state": "done", + "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", }, - "type": "DidCommMessageRecord", + "type": "ProofExchangeRecord", "value": Object { - "_tags": Object {}, - "associatedRecordId": "ea840186-3c77-45f4-a2e6-349811ad8994", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "5-4e4f-41d9-94c4-f49351b811f1", - "message": Object { - "@id": "2481ce81-560b-4ce6-a22b-ee4b6ed369e8", + "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", + "createdAt": "2022-09-08T19:36:06.208Z", + "id": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", + "isVerified": true, + "metadata": Object {}, + "presentationMessage": Object { + "@id": "4185f336-f307-4022-a27d-78d1271586f6", "@type": "https://didcomm.org/present-proof/1.0/presentation", "presentations~attach": Array [ Object { "@id": "libindy-presentation-0", "data": Object { - "base64": "eyJwcm9vZiI6eyJwcm9vZnMiOlt7InByaW1hcnlfcHJvb2YiOnsiZXFfcHJvb2YiOnsicmV2ZWFsZWRfYXR0cnMiOnsibmFtZSI6IjI3MDM0NjQwMDI0MTE3MzMxMDMzMDYzMTI4MDQ0MDA0MzE4MjE4NDg2ODE2OTMxNTIwODg2NDA1NTM1NjU5OTM0NDE3NDM4NzgxNTA3In0sImFfcHJpbWUiOiI5MDg5MzE2Mjc0ODc5NTI4MjMzNDA1MTY0NTgwOTM1OTIxMjIwMjMyMzg5ODE0NjE4OTc3ODA3MjA0MDg4OTQ0ODkzNDc1OTE5NTE4Mj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RleCI6MCwicmF3IjoiQWxpY2UiLCJlbmNvZGVkIjoiMjcwMzQ2NDAwMjQxMTczMzEwMzMwNjMxMjgwNDQwMDQzMTgyMTg0ODY4MTY5MzE1MjA4ODY0MDU1MzU2NTk5MzQ0MTc0Mzg3ODE1MDcifX0sInNlbGZfYXR0ZXN0ZWRfYXR0cnMiOnt9LCJ1bnJldmVhbGVkX2F0dHJzIjp7fSwicHJlZGljYXRlcyI6e319LCJpZGVudGlmaWVycyI6W3sic2NoZW1hX2lkIjoiN3lXNlNvVGpITmhEM3pZZ200UGJLODoyOnRlc3Qtc2NoZW1hLTRlOTRjMmU0LTRmNDctNGZmMy1hODg4LTZmNjRkYTZhOTJkYzoxLjAiLCJjcmVkX2RlZl9pZCI6Ijd5VzZTb1RqSE5oRDN6WWdtNFBiSzg6MzpDTDo0NzIzMTk6VEFHIiwicmV2X3JlZ19pZCI6bnVsbCwidGltZXN0YW1wIjpudWxsfV19", }, "mime-type": "application/json", }, ], "~thread": Object { - "thid": "7fcfc074-43ac-43cc-92b9-76afceeebe82", + "thid": "00cdd404-82fc-431d-9c18-fb643636d2a5", }, }, - "metadata": Object {}, - "role": "receiver", - }, - }, - "6-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "6-4e4f-41d9-94c4-f49351b811f1", - "tags": Object { - "associatedRecordId": "ec02ba64-63e3-46bc-b2a4-9d549d642d30", - "messageId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - "messageName": "propose-presentation", - "messageType": "https://didcomm.org/present-proof/1.0/propose-presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "sender", - "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - }, - "type": "DidCommMessageRecord", - "value": Object { - "_tags": Object {}, - "associatedRecordId": "ec02ba64-63e3-46bc-b2a4-9d549d642d30", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "6-4e4f-41d9-94c4-f49351b811f1", - "message": Object { + "proposalMessage": Object { "@id": "00cdd404-82fc-431d-9c18-fb643636d2a5", "@type": "https://didcomm.org/present-proof/1.0/propose-presentation", "presentation_proposal": Object { @@ -761,30 +331,7 @@ Object { "predicates": Array [], }, }, - "metadata": Object {}, - "role": "sender", - }, - }, - "7-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "7-4e4f-41d9-94c4-f49351b811f1", - "tags": Object { - "associatedRecordId": "ec02ba64-63e3-46bc-b2a4-9d549d642d30", - "messageId": "2862b25d-396c-46d7-ad09-f48ff4ea6db6", - "messageName": "request-presentation", - "messageType": "https://didcomm.org/present-proof/1.0/request-presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "receiver", - "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - }, - "type": "DidCommMessageRecord", - "value": Object { - "_tags": Object {}, - "associatedRecordId": "ec02ba64-63e3-46bc-b2a4-9d549d642d30", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "7-4e4f-41d9-94c4-f49351b811f1", - "message": Object { + "requestMessage": Object { "@id": "2862b25d-396c-46d7-ad09-f48ff4ea6db6", "@type": "https://didcomm.org/present-proof/1.0/request-presentation", "request_presentations~attach": Array [ @@ -800,89 +347,52 @@ Object { "thid": "00cdd404-82fc-431d-9c18-fb643636d2a5", }, }, + "state": "done", + "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", + }, + }, + "STORAGE_VERSION_RECORD_ID": Object { + "id": "STORAGE_VERSION_RECORD_ID", + "tags": Object {}, + "type": "StorageVersionRecord", + "value": Object { + "createdAt": "2022-09-08T19:35:53.872Z", + "id": "STORAGE_VERSION_RECORD_ID", "metadata": Object {}, - "role": "receiver", + "storageVersion": "0.3", }, }, - "72c96cd1-1f26-4bf3-8a00-5c00926859a8": Object { - "id": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", + "ea840186-3c77-45f4-a2e6-349811ad8994": Object { + "id": "ea840186-3c77-45f4-a2e6-349811ad8994", "tags": Object { "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", - "parentThreadId": undefined, "state": "done", - "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", + "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", }, - "type": "ProofRecord", + "type": "ProofExchangeRecord", "value": Object { "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", - "createdAt": "2022-09-08T19:36:06.208Z", - "id": "72c96cd1-1f26-4bf3-8a00-5c00926859a8", + "createdAt": "2022-09-08T19:36:06.261Z", + "id": "ea840186-3c77-45f4-a2e6-349811ad8994", "isVerified": true, "metadata": Object {}, - "protocolVersion": "v1", - "state": "done", - "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - }, - }, - "8-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "8-4e4f-41d9-94c4-f49351b811f1", - "tags": Object { - "associatedRecordId": "ec02ba64-63e3-46bc-b2a4-9d549d642d30", - "messageId": "4185f336-f307-4022-a27d-78d1271586f6", - "messageName": "presentation", - "messageType": "https://didcomm.org/present-proof/1.0/presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "sender", - "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", - }, - "type": "DidCommMessageRecord", - "value": Object { - "_tags": Object {}, - "associatedRecordId": "ec02ba64-63e3-46bc-b2a4-9d549d642d30", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "8-4e4f-41d9-94c4-f49351b811f1", - "message": Object { - "@id": "4185f336-f307-4022-a27d-78d1271586f6", + "presentationMessage": Object { + "@id": "2481ce81-560b-4ce6-a22b-ee4b6ed369e8", "@type": "https://didcomm.org/present-proof/1.0/presentation", "presentations~attach": Array [ Object { "@id": "libindy-presentation-0", "data": Object { - "base64": "eyJwcm9vZiI6eyJwcm9vZnMiOlt7InByaW1hcnlfcHJvb2YiOnsiZXFfcHJvb2YiOnsicmV2ZWFsZWRfYXR0cnMiOnsibmFtZSI6IjI3MDM0NjQwMDI0M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NTIsOSw2NywxMjgsMjQwLDI1NCwyMzIsMjEwLDQsMjM5LDE4MywzOSwxOTMsMjQyLDMyLDEzMywxOTQsMTQ4LDk4LDExMSw3NywxNTUsMjA1LDE3OCwxOTcsMTRdXX19LCJyZXF1ZXN0ZWRfcHJvb2YiOnsicmV2ZWFsZWRfYXR0cnMiOnsibmFtZSI6eyJzdWJfcHJvb2ZfaW5kZXgiOjAsInJhdyI6IkFsaWNlIiwiZW5jb2RlZCI6IjI3MDM0NjQwMDI0MTE3MzMxMDMzMDYzMTI4MDQ0MDA0MzE4MjE4NDg2ODE2OTMxNTIwODg2NDA1NTM1NjU5OTM0NDE3NDM4NzgxNTA3In19LCJzZWxmX2F0dGVzdGVkX2F0dHJzIjp7fSwidW5yZXZlYWxlZF9hdHRycyI6e30sInByZWRpY2F0ZXMiOnt9fSwiaWRlbnRpZmllcnMiOlt7InNjaGVtYV9pZCI6Ijd5VzZTb1RqSE5oRDN6WWdtNFBiSzg6Mjp0ZXN0LXNjaGVtYS00ZTk0YzJlNC00ZjQ3LTRmZjMtYTg4OC02ZjY0ZGE2YTkyZGM6MS4wIiwiY3JlZF9kZWZfaWQiOiI3eVc2U29UakhOaEQzellnbTRQYks4OjM6Q0w6NDcyMzE5OlRBRyIsInJldl9yZWdfaWQiOm51bGwsInRpbWVzdGFtcCI6bnVsbH1dfQ==", }, "mime-type": "application/json", }, ], "~thread": Object { - "thid": "00cdd404-82fc-431d-9c18-fb643636d2a5", + "thid": "7fcfc074-43ac-43cc-92b9-76afceeebe82", }, }, - "metadata": Object {}, - "role": "sender", - }, - }, - "9-4e4f-41d9-94c4-f49351b811f1": Object { - "id": "9-4e4f-41d9-94c4-f49351b811f1", - "tags": Object { - "associatedRecordId": "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e", - "messageId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", - "messageName": "request-presentation", - "messageType": "https://didcomm.org/present-proof/1.0/request-presentation", - "protocolMajorVersion": "1", - "protocolMinorVersion": "0", - "protocolName": "present-proof", - "role": "receiver", - "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", - }, - "type": "DidCommMessageRecord", - "value": Object { - "_tags": Object {}, - "associatedRecordId": "3d5d7ad4-f0aa-4b1b-8c2c-780ee383564e", - "createdAt": "2022-01-21T22:50:20.522Z", - "id": "9-4e4f-41d9-94c4-f49351b811f1", - "message": Object { + "requestMessage": Object { "@id": "7fcfc074-43ac-43cc-92b9-76afceeebe82", "@type": "https://didcomm.org/present-proof/1.0/request-presentation", "request_presentations~attach": Array [ @@ -895,37 +405,6 @@ Object { }, ], }, - "metadata": Object {}, - "role": "receiver", - }, - }, - "STORAGE_VERSION_RECORD_ID": Object { - "id": "STORAGE_VERSION_RECORD_ID", - "tags": Object {}, - "type": "StorageVersionRecord", - "value": Object { - "createdAt": "2022-09-08T19:35:53.872Z", - "id": "STORAGE_VERSION_RECORD_ID", - "metadata": Object {}, - "storageVersion": "0.3", - }, - }, - "ea840186-3c77-45f4-a2e6-349811ad8994": Object { - "id": "ea840186-3c77-45f4-a2e6-349811ad8994", - "tags": Object { - "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", - "parentThreadId": undefined, - "state": "done", - "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", - }, - "type": "ProofRecord", - "value": Object { - "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", - "createdAt": "2022-09-08T19:36:06.261Z", - "id": "ea840186-3c77-45f4-a2e6-349811ad8994", - "isVerified": true, - "metadata": Object {}, - "protocolVersion": "v1", "state": "done", "threadId": "7fcfc074-43ac-43cc-92b9-76afceeebe82", }, @@ -934,17 +413,62 @@ Object { "id": "ec02ba64-63e3-46bc-b2a4-9d549d642d30", "tags": Object { "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", - "parentThreadId": undefined, "state": "done", "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", }, - "type": "ProofRecord", + "type": "ProofExchangeRecord", "value": Object { "connectionId": "946f660f-bfa6-4a98-a801-ebde5da95e2c", "createdAt": "2022-09-08T19:36:06.208Z", "id": "ec02ba64-63e3-46bc-b2a4-9d549d642d30", "metadata": Object {}, - "protocolVersion": "v1", + "presentationMessage": Object { + "@id": "4185f336-f307-4022-a27d-78d1271586f6", + "@type": "https://didcomm.org/present-proof/1.0/presentation", + "presentations~attach": Array [ + Object { + "@id": "libindy-presentation-0", + "data": Object { + "base64": "eyJwcm9vZiI6eyJwcm9vZnMiOlt7InByaW1hcnlfcHJvb2YiOnsiZXFfcHJvb2YiOnsicmV2ZWFsZWRfYXR0cnMiOnsibmFtZSI6IjI3MDM0NjQwMDI0MTE3MzMxMDMzMDYzMTI4MDQ0MDA0MzE4MjE4NDg2ODE2OTMxNTIwODg2NDA1NTM1NjU5OTM0NDE3NDM4NzgxNTA3In0sImFfcHJpbWUiOiI1MjE1MTkyMzYwMDA2NTg5OTUyMjM1MTYwNjkxMzU1OTc4MjA2NDUzODA3NDUzNTk5OTE5OTkzNzM1NTczNzA1OTA2OTY5MTAwMjIzOTM4MjMyMzE5NDE1Njk1NTMzNjQ4MDMzNzc3NzI4NTE3NzI4Mjk4NDU1OTI0NjQ1NTU1NjQyNjE1NTQ3NTI0MDc0MTAyOTQyNjg4NzQwNDcwMjg4MDAyNTgwMjI4OTg4MDk4MDk0NjQxODc5NjkxNzQwMTY2OTc0MzA2OTczNjQ2MDA3ODg3NTU1NDU2NjM3NTUyODk2NjkxNDc3NDg2MDM1MTIxMjU0NDY0NzA2MDY0Mzg2NzA1MzU0MDk3MDcxNDc5OTkwMzIwNzIxMzQ4MjM1NTQ2NjI5OTcxNzAyNzgwNjUwNTgyMDQ3MzMxOTIwNjE5OTIzODg4NjU1NjI0NjYzMDE4NTAzMDUzOTQ4OTEyNzk4MDE1ODA2Mzk5MTAxNTg3MzAzNTgwNzkyMzQ3OTU2NjE1MDgzODczNDQ5MTM0MjEyOTE2MDY3MTExMjM4MjQzMjM1MTk5OTk1MTUzNjIyMTM1N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jcmVkX2RlZl9pZCI6Ijd5VzZTb1RqSE5oRDN6WWdtNFBiSzg6MzpDTDo0NzIzMTk6VEFHIiwicmV2X3JlZ19pZCI6bnVsbCwidGltZXN0YW1wIjpudWxsfV19", + }, + "mime-type": "application/json", + }, + ], + "~thread": Object { + "thid": "00cdd404-82fc-431d-9c18-fb643636d2a5", + }, + }, + "proposalMessage": Object { + "@id": "00cdd404-82fc-431d-9c18-fb643636d2a5", + "@type": "https://didcomm.org/present-proof/1.0/propose-presentation", + "presentation_proposal": Object { + "@type": "https://didcomm.org/present-proof/1.0/presentation-preview", + "attributes": Array [ + Object { + "cred_def_id": "7yW6SoTjHNhD3zYgm4PbK8:3:CL:472319:TAG", + "name": "name", + "value": "Alice", + }, + ], + "predicates": Array [], + }, + }, + "requestMessage": Object { + "@id": "2862b25d-396c-46d7-ad09-f48ff4ea6db6", + "@type": "https://didcomm.org/present-proof/1.0/request-presentation", + "request_presentations~attach": Array [ + Object { + "@id": "libindy-request-presentation-0", + "data": Object { + "base64": "eyJuYW1lIjoicHJvb2YtcmVxdWVzdCIsInZlcnNpb24iOiIxLjAiLCJub25jZSI6IjQwMzU1MDc0MDYxMTU0MzEwMzA5NzMyMiIsInJlcXVlc3RlZF9hdHRyaWJ1dGVzIjp7IjBmZWExODk3LTQzMTEtNDhmMi1hMmMyLTM4NzRlOTkzYWVmMCI6eyJuYW1lIjoibmFtZSIsInJlc3RyaWN0aW9ucyI6W3siY3JlZF9kZWZfaWQiOiI3eVc2U29UakhOaEQzellnbTRQYks4OjM6Q0w6NDcyMzE5OlRBRyJ9XX19LCJyZXF1ZXN0ZWRfcHJlZGljYXRlcyI6e319", + }, + "mime-type": "application/json", + }, + ], + "~thread": Object { + "thid": "00cdd404-82fc-431d-9c18-fb643636d2a5", + }, + }, "state": "done", "threadId": "00cdd404-82fc-431d-9c18-fb643636d2a5", }, diff --git a/packages/core/src/storage/migration/updates/0.2-0.3/__tests__/proof.test.ts b/packages/core/src/storage/migration/updates/0.2-0.3/__tests__/proof.test.ts index b3026f8bf2..29e508eb4f 100644 --- a/packages/core/src/storage/migration/updates/0.2-0.3/__tests__/proof.test.ts +++ b/packages/core/src/storage/migration/updates/0.2-0.3/__tests__/proof.test.ts @@ -1,13 +1,13 @@ import { getAgentConfig, getAgentContext, mockFunction } from '../../../../../../tests/helpers' import { Agent } from '../../../../../agent/Agent' -import { ProofRecord, ProofState } from '../../../../../modules/proofs' +import { ProofExchangeRecord, ProofState } from '../../../../../modules/proofs' import { ProofRepository } from '../../../../../modules/proofs/repository/ProofRepository' import { JsonTransformer } from '../../../../../utils' import { DidCommMessageRole } from '../../../../didcomm' import { DidCommMessageRepository } from '../../../../didcomm/DidCommMessageRepository' import * as testModule from '../proof' -const agentConfig = getAgentConfig('Migration ProofRecord 0.2-0.3') +const agentConfig = getAgentConfig('Migration ProofExchangeRecord 0.2-0.3') const agentContext = getAgentContext() jest.mock('../../../../../modules/proofs/repository/ProofRepository') @@ -44,13 +44,13 @@ describe('0.2-0.3 | Proof', () => { mockFunction(didCommMessageRepository.save).mockReset() }) - describe('migrateProofRecordToV0_3()', () => { + describe('migrateProofExchangeRecordToV0_3()', () => { it('should fetch all records and apply the needed updates ', async () => { - const records: ProofRecord[] = [getProof({})] + const records: ProofExchangeRecord[] = [getProof({})] mockFunction(proofRepository.getAll).mockResolvedValue(records) - await testModule.migrateProofRecordToV0_3(agent) + await testModule.migrateProofExchangeRecordToV0_3(agent) expect(proofRepository.getAll).toHaveBeenCalledTimes(1) expect(proofRepository.update).toHaveBeenCalledTimes(records.length) @@ -64,11 +64,11 @@ describe('0.2-0.3 | Proof', () => { }) }) - describe('migrateInternalProofRecordProperties()', () => { + describe('migrateInternalProofExchangeRecordProperties()', () => { it('should set the protocol version to v1 if not set on the record', async () => { const proofRecord = getProof({}) - await testModule.migrateInternalProofRecordProperties(agent, proofRecord) + await testModule.migrateInternalProofExchangeRecordProperties(agent, proofRecord) expect(proofRecord).toMatchObject({ protocolVersion: 'v1', @@ -80,7 +80,7 @@ describe('0.2-0.3 | Proof', () => { protocolVersion: 'v2', }) - await testModule.migrateInternalProofRecordProperties(agent, proofRecord) + await testModule.migrateInternalProofExchangeRecordProperties(agent, proofRecord) expect(proofRecord).toMatchObject({ protocolVersion: 'v2', @@ -305,6 +305,6 @@ function getProof({ isVerified, id, }, - ProofRecord + ProofExchangeRecord ) } diff --git a/packages/core/src/storage/migration/updates/0.2-0.3/index.ts b/packages/core/src/storage/migration/updates/0.2-0.3/index.ts index 562ddba1db..a47fa4f328 100644 --- a/packages/core/src/storage/migration/updates/0.2-0.3/index.ts +++ b/packages/core/src/storage/migration/updates/0.2-0.3/index.ts @@ -1,7 +1,7 @@ import type { BaseAgent } from '../../../../agent/BaseAgent' -import { migrateProofRecordToV0_3 } from './proof' +import { migrateProofExchangeRecordToV0_3 } from './proof' export async function updateV0_2ToV0_3(agent: Agent): Promise { - await migrateProofRecordToV0_3(agent) + await migrateProofExchangeRecordToV0_3(agent) } diff --git a/packages/core/src/storage/migration/updates/0.2-0.3/proof.ts b/packages/core/src/storage/migration/updates/0.2-0.3/proof.ts index 71a9f10cc3..7e923a3d48 100644 --- a/packages/core/src/storage/migration/updates/0.2-0.3/proof.ts +++ b/packages/core/src/storage/migration/updates/0.2-0.3/proof.ts @@ -1,5 +1,5 @@ import type { BaseAgent } from '../../../../agent/BaseAgent' -import type { ProofRecord } from '../../../../modules/proofs' +import type { ProofExchangeRecord } from '../../../../modules/proofs' import type { JsonObject } from '../../../../types' import { ProofState } from '../../../../modules/proofs/models' @@ -7,15 +7,15 @@ import { ProofRepository } from '../../../../modules/proofs/repository/ProofRepo import { DidCommMessageRepository, DidCommMessageRecord, DidCommMessageRole } from '../../../didcomm' /** - * Migrates the {@link ProofRecord} to 0.3 compatible format. It fetches all records from storage + * Migrates the {@link ProofExchangeRecord} to 0.3 compatible format. It fetches all records from storage * and applies the needed updates to the records. After a record has been transformed, it is updated * in storage and the next record will be transformed. * * The following transformations are applied: - * - {@link migrateInternalProofRecordProperties} + * - {@link migrateInternalProofExchangeRecordProperties} * - {@link moveDidCommMessages} */ -export async function migrateProofRecordToV0_3(agent: Agent) { +export async function migrateProofExchangeRecordToV0_3(agent: Agent) { agent.config.logger.info('Migrating proof records to storage version 0.3') const proofRepository = agent.dependencyManager.resolve(ProofRepository) @@ -26,7 +26,7 @@ export async function migrateProofRecordToV0_3(agent: A for (const proofRecord of allProofs) { agent.config.logger.debug(`Migrating proof record with id ${proofRecord.id} to storage version 0.3`) - await migrateInternalProofRecordProperties(agent, proofRecord) + await migrateInternalProofExchangeRecordProperties(agent, proofRecord) await moveDidCommMessages(agent, proofRecord) await proofRepository.update(agent.context, proofRecord) @@ -63,7 +63,7 @@ const didCommMessageRoleMapping = { const proofRecordMessageKeys = ['proposalMessage', 'requestMessage', 'presentationMessage'] as const -export function getProofRole(proofRecord: ProofRecord) { +export function getProofRole(proofRecord: ProofExchangeRecord) { // Proofs will only have an isVerified value when a presentation is verified, meaning we're the verifier if (proofRecord.isVerified !== undefined) { return ProofRole.Verifier @@ -99,9 +99,9 @@ export function getProofRole(proofRecord: ProofRecord) { * } * ``` */ -export async function migrateInternalProofRecordProperties( +export async function migrateInternalProofExchangeRecordProperties( agent: Agent, - proofRecord: ProofRecord + proofRecord: ProofExchangeRecord ) { agent.config.logger.debug(`Migrating internal proof record ${proofRecord.id} properties to storage version 0.3`) @@ -120,7 +120,7 @@ export async function migrateInternalProofRecordProperties(agent: Agent, proofRecord: ProofRecord) { +export async function moveDidCommMessages(agent: Agent, proofRecord: ProofExchangeRecord) { agent.config.logger.debug( `Moving didcomm messages from proof record with id ${proofRecord.id} to DidCommMessageRecord` ) diff --git a/packages/core/tests/helpers.ts b/packages/core/tests/helpers.ts index 571eba9577..9124eaacdb 100644 --- a/packages/core/tests/helpers.ts +++ b/packages/core/tests/helpers.ts @@ -14,11 +14,8 @@ import type { } from '../src' import type { AgentModulesInput } from '../src/agent/AgentModules' import type { IndyOfferCredentialFormat } from '../src/modules/credentials/formats/indy/IndyCredentialFormat' -import type { RequestProofOptions } from '../src/modules/proofs/ProofsApiOptions' -import type { IndyProofFormat } from '../src/modules/proofs/formats/indy/IndyProofFormat' import type { ProofAttributeInfo, ProofPredicateInfo } from '../src/modules/proofs/formats/indy/models' import type { AutoAcceptProof } from '../src/modules/proofs/models/ProofAutoAcceptType' -import type { V2ProofService } from '../src/modules/proofs/protocol/v2' import type { CredDef, Schema } from 'indy-sdk' import type { Observable } from 'rxjs' @@ -166,7 +163,7 @@ export function getAgentContext({ return new AgentContext({ dependencyManager, contextCorrelationId }) } -export async function waitForProofRecord( +export async function waitForProofExchangeRecord( agent: Agent, options: { threadId?: string @@ -178,10 +175,10 @@ export async function waitForProofRecord( ) { const observable = agent.events.observable(ProofEventTypes.ProofStateChanged) - return waitForProofRecordSubject(observable, options) + return waitForProofExchangeRecordSubject(observable, options) } -export function waitForProofRecordSubject( +export function waitForProofExchangeRecordSubject( subject: ReplaySubject | Observable, { threadId, @@ -582,7 +579,7 @@ export async function presentProof({ verifierAgent.events.observable(ProofEventTypes.ProofStateChanged).subscribe(verifierReplay) holderAgent.events.observable(ProofEventTypes.ProofStateChanged).subscribe(holderReplay) - let holderProofRecordPromise = waitForProofRecordSubject(holderReplay, { + let holderProofExchangeRecordPromise = waitForProofExchangeRecordSubject(holderReplay, { state: ProofState.RequestReceived, }) @@ -600,7 +597,7 @@ export async function presentProof({ protocolVersion: 'v2', }) - let holderRecord = await holderProofRecordPromise + let holderRecord = await holderProofExchangeRecordPromise const requestedCredentials = await holderAgent.proofs.autoSelectCredentialsForProofRequest({ proofRecordId: holderRecord.id, @@ -609,7 +606,7 @@ export async function presentProof({ }, }) - const verifierProofRecordPromise = waitForProofRecordSubject(verifierReplay, { + const verifierProofExchangeRecordPromise = waitForProofExchangeRecordSubject(verifierReplay, { threadId: holderRecord.threadId, state: ProofState.PresentationReceived, }) @@ -619,18 +616,18 @@ export async function presentProof({ proofFormats: { indy: requestedCredentials.proofFormats.indy }, }) - verifierRecord = await verifierProofRecordPromise + verifierRecord = await verifierProofExchangeRecordPromise // assert presentation is valid expect(verifierRecord.isVerified).toBe(true) - holderProofRecordPromise = waitForProofRecordSubject(holderReplay, { + holderProofExchangeRecordPromise = waitForProofExchangeRecordSubject(holderReplay, { threadId: holderRecord.threadId, state: ProofState.Done, }) verifierRecord = await verifierAgent.proofs.acceptPresentation(verifierRecord.id) - holderRecord = await holderProofRecordPromise + holderRecord = await holderProofExchangeRecordPromise return { verifierProof: verifierRecord, diff --git a/packages/core/tests/proofs-sub-protocol.test.ts b/packages/core/tests/proofs-sub-protocol.test.ts index 06ec56c9aa..271bd089c3 100644 --- a/packages/core/tests/proofs-sub-protocol.test.ts +++ b/packages/core/tests/proofs-sub-protocol.test.ts @@ -1,4 +1,4 @@ -import type { Agent, ConnectionRecord, ProofRecord } from '../src' +import type { Agent, ConnectionRecord, ProofExchangeRecord } from '../src' import type { PresentationPreview } from '../src/modules/proofs/protocol/v1/models/V1PresentationPreview' import type { CredDefId } from 'indy-sdk' @@ -11,7 +11,7 @@ import { import { ProofState } from '../src/modules/proofs/models/ProofState' import { uuid } from '../src/utils/uuid' -import { setupProofsTest, waitForProofRecord } from './helpers' +import { setupProofsTest, waitForProofExchangeRecord } from './helpers' import testLogger from './logger' describe('Present Proof Subprotocol', () => { @@ -20,7 +20,7 @@ describe('Present Proof Subprotocol', () => { let credDefId: CredDefId let faberConnection: ConnectionRecord let aliceConnection: ConnectionRecord - let aliceProofRecord: ProofRecord + let aliceProofExchangeRecord: ProofExchangeRecord let presentationPreview: PresentationPreview beforeAll(async () => { @@ -44,12 +44,12 @@ describe('Present Proof Subprotocol', () => { // Alice sends a presentation proposal to Faber testLogger.test('Alice sends a presentation proposal to Faber') - const faberProofRecordPromise = waitForProofRecord(faberAgent, { + const faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { parentThreadId, state: ProofState.ProposalReceived, }) - aliceProofRecord = await aliceAgent.proofs.proposeProof({ + aliceProofExchangeRecord = await aliceAgent.proofs.proposeProof({ connectionId: aliceConnection.id, protocolVersion: 'v1', parentThreadId, @@ -64,22 +64,22 @@ describe('Present Proof Subprotocol', () => { }, }) - expect(aliceProofRecord.parentThreadId).toBe(parentThreadId) + expect(aliceProofExchangeRecord.parentThreadId).toBe(parentThreadId) const proofsByParentThread = await aliceAgent.proofs.getByParentThreadAndConnectionId(parentThreadId) expect(proofsByParentThread.length).toEqual(1) expect(proofsByParentThread[0].parentThreadId).toBe(parentThreadId) - const threadId = aliceProofRecord.threadId + const threadId = aliceProofExchangeRecord.threadId testLogger.test('Faber waits for a presentation proposal from Alice') - let faberProofRecord = await faberProofRecordPromise + let faberProofExchangeRecord = await faberProofExchangeRecordPromise // Faber accepts the presentation proposal from Alice testLogger.test('Faber accepts the presentation proposal from Alice') - await faberAgent.proofs.acceptProposal({ proofRecordId: faberProofRecord.id }) + await faberAgent.proofs.acceptProposal({ proofRecordId: faberProofExchangeRecord.id }) testLogger.test('Alice waits till it receives presentation ack') - await waitForProofRecord(aliceAgent, { + await waitForProofExchangeRecord(aliceAgent, { threadId, parentThreadId, state: ProofState.RequestReceived, @@ -88,18 +88,18 @@ describe('Present Proof Subprotocol', () => { // Alice retrieves the requested credentials and accepts the presentation request testLogger.test('Alice accepts presentation request from Faber') const requestedCredentials = await aliceAgent.proofs.autoSelectCredentialsForProofRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, config: { filterByPresentationPreview: true, }, }) await aliceAgent.proofs.acceptRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, proofFormats: requestedCredentials.proofFormats, }) testLogger.test('Faber waits for presentation from Alice') - faberProofRecord = await waitForProofRecord(faberAgent, { + faberProofExchangeRecord = await waitForProofExchangeRecord(faberAgent, { threadId, parentThreadId, state: ProofState.PresentationReceived, @@ -107,11 +107,11 @@ describe('Present Proof Subprotocol', () => { // Faber accepts the presentation provided by Alice testLogger.test('Faber accepts the presentation provided by Alice') - await faberAgent.proofs.acceptPresentation(faberProofRecord.id) + await faberAgent.proofs.acceptPresentation(faberProofExchangeRecord.id) // Alice waits until she received a presentation acknowledgement testLogger.test('Alice waits until she receives a presentation acknowledgement') - await waitForProofRecord(aliceAgent, { + await waitForProofExchangeRecord(aliceAgent, { threadId, parentThreadId, state: ProofState.Done, @@ -146,14 +146,14 @@ describe('Present Proof Subprotocol', () => { }), } - const aliceProofRecordPromise = waitForProofRecord(aliceAgent, { + const aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { parentThreadId, state: ProofState.RequestReceived, }) // Faber sends a presentation request to Alice testLogger.test('Faber sends a presentation request to Alice') - const faberProofRecord = await faberAgent.proofs.requestProof({ + const faberProofExchangeRecord = await faberAgent.proofs.requestProof({ connectionId: faberConnection.id, parentThreadId, protocolVersion: 'v1', @@ -168,33 +168,33 @@ describe('Present Proof Subprotocol', () => { }, }) - expect(faberProofRecord.parentThreadId).toBe(parentThreadId) + expect(faberProofExchangeRecord.parentThreadId).toBe(parentThreadId) const proofsByParentThread = await faberAgent.proofs.getByParentThreadAndConnectionId(parentThreadId) expect(proofsByParentThread.length).toEqual(1) expect(proofsByParentThread[0].parentThreadId).toBe(parentThreadId) - const threadId = faberProofRecord.threadId + const threadId = faberProofExchangeRecord.threadId // Alice waits for presentation request from Faber testLogger.test('Alice waits for presentation request from Faber') - const aliceProofRecord = await aliceProofRecordPromise + const aliceProofExchangeRecord = await aliceProofExchangeRecordPromise // Alice retrieves the requested credentials and accepts the presentation request testLogger.test('Alice accepts presentation request from Faber') const requestedCredentials = await aliceAgent.proofs.autoSelectCredentialsForProofRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, config: { filterByPresentationPreview: true, }, }) await aliceAgent.proofs.acceptRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, proofFormats: requestedCredentials.proofFormats, }) // Faber waits until it receives a presentation from Alice testLogger.test('Faber waits for presentation from Alice') - await waitForProofRecord(faberAgent, { + await waitForProofExchangeRecord(faberAgent, { threadId, parentThreadId, state: ProofState.PresentationReceived, @@ -202,11 +202,11 @@ describe('Present Proof Subprotocol', () => { // Faber accepts the presentation testLogger.test('Faber accept the presentation from Alice') - await faberAgent.proofs.acceptPresentation(faberProofRecord.id) + await faberAgent.proofs.acceptPresentation(faberProofExchangeRecord.id) // Alice waits until she receives a presentation acknowledgement testLogger.test('Alice waits for acceptance by Faber') - await waitForProofRecord(aliceAgent, { + await waitForProofExchangeRecord(aliceAgent, { threadId, parentThreadId, state: ProofState.Done, @@ -219,12 +219,12 @@ describe('Present Proof Subprotocol', () => { // Alice sends a presentation proposal to Faber testLogger.test('Alice sends a presentation proposal to Faber') - const faberProofRecordPromise = waitForProofRecord(faberAgent, { + const faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { parentThreadId, state: ProofState.ProposalReceived, }) - aliceProofRecord = await aliceAgent.proofs.proposeProof({ + aliceProofExchangeRecord = await aliceAgent.proofs.proposeProof({ connectionId: aliceConnection.id, protocolVersion: 'v2', parentThreadId, @@ -239,22 +239,22 @@ describe('Present Proof Subprotocol', () => { }, }) - expect(aliceProofRecord.parentThreadId).toBe(parentThreadId) + expect(aliceProofExchangeRecord.parentThreadId).toBe(parentThreadId) const proofsByParentThread = await aliceAgent.proofs.getByParentThreadAndConnectionId(parentThreadId) expect(proofsByParentThread.length).toEqual(1) expect(proofsByParentThread[0].parentThreadId).toBe(parentThreadId) - const threadId = aliceProofRecord.threadId + const threadId = aliceProofExchangeRecord.threadId testLogger.test('Faber waits for a presentation proposal from Alice') - let faberProofRecord = await faberProofRecordPromise + let faberProofExchangeRecord = await faberProofExchangeRecordPromise // Faber accepts the presentation proposal from Alice testLogger.test('Faber accepts the presentation proposal from Alice') - await faberAgent.proofs.acceptProposal({ proofRecordId: faberProofRecord.id }) + await faberAgent.proofs.acceptProposal({ proofRecordId: faberProofExchangeRecord.id }) testLogger.test('Alice waits till it receives presentation ack') - await waitForProofRecord(aliceAgent, { + await waitForProofExchangeRecord(aliceAgent, { threadId, parentThreadId, state: ProofState.RequestReceived, @@ -263,18 +263,18 @@ describe('Present Proof Subprotocol', () => { // Alice retrieves the requested credentials and accepts the presentation request testLogger.test('Alice accepts presentation request from Faber') const requestedCredentials = await aliceAgent.proofs.autoSelectCredentialsForProofRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, config: { filterByPresentationPreview: true, }, }) await aliceAgent.proofs.acceptRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, proofFormats: requestedCredentials.proofFormats, }) testLogger.test('Faber waits for presentation from Alice') - faberProofRecord = await waitForProofRecord(faberAgent, { + faberProofExchangeRecord = await waitForProofExchangeRecord(faberAgent, { threadId, parentThreadId, state: ProofState.PresentationReceived, @@ -282,11 +282,11 @@ describe('Present Proof Subprotocol', () => { // Faber accepts the presentation provided by Alice testLogger.test('Faber accepts the presentation provided by Alice') - await faberAgent.proofs.acceptPresentation(faberProofRecord.id) + await faberAgent.proofs.acceptPresentation(faberProofExchangeRecord.id) // Alice waits until she received a presentation acknowledgement testLogger.test('Alice waits until she receives a presentation acknowledgement') - await waitForProofRecord(aliceAgent, { + await waitForProofExchangeRecord(aliceAgent, { threadId, parentThreadId, state: ProofState.Done, @@ -321,14 +321,14 @@ describe('Present Proof Subprotocol', () => { }), } - const aliceProofRecordPromise = waitForProofRecord(aliceAgent, { + const aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { parentThreadId, state: ProofState.RequestReceived, }) // Faber sends a presentation request to Alice testLogger.test('Faber sends a presentation request to Alice') - const faberProofRecord = await faberAgent.proofs.requestProof({ + const faberProofExchangeRecord = await faberAgent.proofs.requestProof({ connectionId: faberConnection.id, parentThreadId, protocolVersion: 'v2', @@ -343,33 +343,33 @@ describe('Present Proof Subprotocol', () => { }, }) - expect(faberProofRecord.parentThreadId).toBe(parentThreadId) + expect(faberProofExchangeRecord.parentThreadId).toBe(parentThreadId) const proofsByParentThread = await faberAgent.proofs.getByParentThreadAndConnectionId(parentThreadId) expect(proofsByParentThread.length).toEqual(1) expect(proofsByParentThread[0].parentThreadId).toBe(parentThreadId) - const threadId = faberProofRecord.threadId + const threadId = faberProofExchangeRecord.threadId // Alice waits for presentation request from Faber testLogger.test('Alice waits for presentation request from Faber') - const aliceProofRecord = await aliceProofRecordPromise + const aliceProofExchangeRecord = await aliceProofExchangeRecordPromise // Alice retrieves the requested credentials and accepts the presentation request testLogger.test('Alice accepts presentation request from Faber') const requestedCredentials = await aliceAgent.proofs.autoSelectCredentialsForProofRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, config: { filterByPresentationPreview: true, }, }) await aliceAgent.proofs.acceptRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, proofFormats: requestedCredentials.proofFormats, }) // Faber waits until it receives a presentation from Alice testLogger.test('Faber waits for presentation from Alice') - await waitForProofRecord(faberAgent, { + await waitForProofExchangeRecord(faberAgent, { threadId, parentThreadId, state: ProofState.PresentationReceived, @@ -377,11 +377,11 @@ describe('Present Proof Subprotocol', () => { // Faber accepts the presentation testLogger.test('Faber accept the presentation from Alice') - await faberAgent.proofs.acceptPresentation(faberProofRecord.id) + await faberAgent.proofs.acceptPresentation(faberProofExchangeRecord.id) // Alice waits until she receives a presentation acknowledgement testLogger.test('Alice waits for acceptance by Faber') - await waitForProofRecord(aliceAgent, { + await waitForProofExchangeRecord(aliceAgent, { threadId, parentThreadId, state: ProofState.Done, diff --git a/packages/core/tests/v1-connectionless-proofs.test.ts b/packages/core/tests/v1-connectionless-proofs.test.ts index 6094a0d65d..d2fe8af3c3 100644 --- a/packages/core/tests/v1-connectionless-proofs.test.ts +++ b/packages/core/tests/v1-connectionless-proofs.test.ts @@ -28,7 +28,7 @@ import { makeConnection, prepareForIssuance, setupProofsTest, - waitForProofRecordSubject, + waitForProofExchangeRecordSubject, } from './helpers' import testLogger from './logger' @@ -75,12 +75,12 @@ describe('Present Proof', () => { }), } - let aliceProofRecordPromise = waitForProofRecordSubject(aliceReplay, { + let aliceProofExchangeRecordPromise = waitForProofExchangeRecordSubject(aliceReplay, { state: ProofState.RequestReceived, }) // eslint-disable-next-line prefer-const - let { proofRecord: faberProofRecord, message } = await faberAgent.proofs.createRequest({ + let { proofRecord: faberProofExchangeRecord, message } = await faberAgent.proofs.createRequest({ protocolVersion: 'v1', proofFormats: { indy: { @@ -94,49 +94,49 @@ describe('Present Proof', () => { }) const { message: requestMessage } = await faberAgent.oob.createLegacyConnectionlessInvitation({ - recordId: faberProofRecord.id, + recordId: faberProofExchangeRecord.id, message, domain: 'https://a-domain.com', }) await aliceAgent.receiveMessage(requestMessage.toJSON()) testLogger.test('Alice waits for presentation request from Faber') - let aliceProofRecord = await aliceProofRecordPromise + let aliceProofExchangeRecord = await aliceProofExchangeRecordPromise testLogger.test('Alice accepts presentation request from Faber') const requestedCredentials = await aliceAgent.proofs.autoSelectCredentialsForProofRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, config: { filterByPresentationPreview: true, }, }) - const faberProofRecordPromise = waitForProofRecordSubject(faberReplay, { - threadId: aliceProofRecord.threadId, + const faberProofExchangeRecordPromise = waitForProofExchangeRecordSubject(faberReplay, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.PresentationReceived, }) await aliceAgent.proofs.acceptRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, proofFormats: { indy: requestedCredentials.proofFormats.indy }, }) testLogger.test('Faber waits for presentation from Alice') - faberProofRecord = await faberProofRecordPromise + faberProofExchangeRecord = await faberProofExchangeRecordPromise // assert presentation is valid - expect(faberProofRecord.isVerified).toBe(true) + expect(faberProofExchangeRecord.isVerified).toBe(true) - aliceProofRecordPromise = waitForProofRecordSubject(aliceReplay, { - threadId: aliceProofRecord.threadId, + aliceProofExchangeRecordPromise = waitForProofExchangeRecordSubject(aliceReplay, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.Done, }) // Faber accepts presentation - await faberAgent.proofs.acceptPresentation(faberProofRecord.id) + await faberAgent.proofs.acceptPresentation(faberProofExchangeRecord.id) // Alice waits till it receives presentation ack - aliceProofRecord = await aliceProofRecordPromise + aliceProofExchangeRecord = await aliceProofExchangeRecordPromise }) test('Faber starts with connection-less proof requests to Alice with auto-accept enabled', async () => { @@ -174,16 +174,16 @@ describe('Present Proof', () => { }), } - const aliceProofRecordPromise = waitForProofRecordSubject(aliceReplay, { + const aliceProofExchangeRecordPromise = waitForProofExchangeRecordSubject(aliceReplay, { state: ProofState.Done, }) - const faberProofRecordPromise = waitForProofRecordSubject(faberReplay, { + const faberProofExchangeRecordPromise = waitForProofExchangeRecordSubject(faberReplay, { state: ProofState.Done, }) // eslint-disable-next-line prefer-const - let { message, proofRecord: faberProofRecord } = await faberAgent.proofs.createRequest({ + let { message, proofRecord: faberProofExchangeRecord } = await faberAgent.proofs.createRequest({ protocolVersion: 'v1', proofFormats: { indy: { @@ -198,16 +198,16 @@ describe('Present Proof', () => { }) const { message: requestMessage } = await faberAgent.oob.createLegacyConnectionlessInvitation({ - recordId: faberProofRecord.id, + recordId: faberProofExchangeRecord.id, message, domain: 'https://a-domain.com', }) await aliceAgent.receiveMessage(requestMessage.toJSON()) - await aliceProofRecordPromise + await aliceProofExchangeRecordPromise - await faberProofRecordPromise + await faberProofExchangeRecordPromise }) test('Faber starts with connection-less proof requests to Alice with auto-accept enabled and both agents having a mediator', async () => { @@ -338,16 +338,16 @@ describe('Present Proof', () => { }), } - const aliceProofRecordPromise = waitForProofRecordSubject(aliceReplay, { + const aliceProofExchangeRecordPromise = waitForProofExchangeRecordSubject(aliceReplay, { state: ProofState.Done, }) - const faberProofRecordPromise = waitForProofRecordSubject(faberReplay, { + const faberProofExchangeRecordPromise = waitForProofExchangeRecordSubject(faberReplay, { state: ProofState.Done, }) // eslint-disable-next-line prefer-const - let { message, proofRecord: faberProofRecord } = await faberAgent.proofs.createRequest({ + let { message, proofRecord: faberProofExchangeRecord } = await faberAgent.proofs.createRequest({ protocolVersion: 'v1', proofFormats: { indy: { @@ -362,7 +362,7 @@ describe('Present Proof', () => { }) const { message: requestMessage } = await faberAgent.oob.createLegacyConnectionlessInvitation({ - recordId: faberProofRecord.id, + recordId: faberProofExchangeRecord.id, message, domain: 'https://a-domain.com', }) @@ -382,9 +382,9 @@ describe('Present Proof', () => { await aliceAgent.receiveMessage(requestMessage.toJSON()) - await aliceProofRecordPromise + await aliceProofExchangeRecordPromise - await faberProofRecordPromise + await faberProofExchangeRecordPromise await aliceAgent.mediationRecipient.stopMessagePickup() await faberAgent.mediationRecipient.stopMessagePickup() diff --git a/packages/core/tests/v1-indy-proofs.test.ts b/packages/core/tests/v1-indy-proofs.test.ts index 4246ed8278..b8142c4b17 100644 --- a/packages/core/tests/v1-indy-proofs.test.ts +++ b/packages/core/tests/v1-indy-proofs.test.ts @@ -1,14 +1,9 @@ -import type { Agent, ConnectionRecord, ProofRecord } from '../src' -import type { - AcceptProposalOptions, - ProposeProofOptions, - RequestProofOptions, -} from '../src/modules/proofs/ProofsApiOptions' -import type { IndyProofFormat } from '../src/modules/proofs/formats/indy/IndyProofFormat' -import type { V1ProofService } from '../src/modules/proofs/protocol/v1' +import type { Agent, ConnectionRecord } from '../src' +import type { AcceptProposalOptions } from '../src/modules/proofs/ProofsApiOptions' import type { PresentationPreview } from '../src/modules/proofs/protocol/v1/models/V1PresentationPreview' import type { CredDefId } from 'indy-sdk' +import { ProofExchangeRecord } from '../src' import { getGroupKeysFromIndyProofFormatData } from '../src/modules/proofs/__tests__/groupKeys' import { ProofAttributeInfo, @@ -24,7 +19,7 @@ import { } from '../src/modules/proofs/protocol/v1/messages' import { DidCommMessageRepository } from '../src/storage/didcomm' -import { setupProofsTest, waitForProofRecord } from './helpers' +import { setupProofsTest, waitForProofExchangeRecord } from './helpers' import testLogger from './logger' describe('Present Proof', () => { @@ -33,8 +28,8 @@ describe('Present Proof', () => { let credDefId: CredDefId let faberConnection: ConnectionRecord let aliceConnection: ConnectionRecord - let faberProofRecord: ProofRecord - let aliceProofRecord: ProofRecord + let faberProofExchangeRecord: ProofExchangeRecord + let aliceProofExchangeRecord: ProofExchangeRecord let presentationPreview: PresentationPreview let didCommMessageRepository: DidCommMessageRepository @@ -57,7 +52,11 @@ describe('Present Proof', () => { // Alice sends a presentation proposal to Faber testLogger.test('Alice sends a presentation proposal to Faber') - const proposeProofOptions: ProposeProofOptions<[IndyProofFormat], [V1ProofService]> = { + let faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { + state: ProofState.ProposalReceived, + }) + + aliceProofExchangeRecord = await aliceAgent.proofs.proposeProof({ connectionId: aliceConnection.id, protocolVersion: 'v1', proofFormats: { @@ -69,22 +68,16 @@ describe('Present Proof', () => { predicates: presentationPreview.predicates, }, }, - } - - let faberProofRecordPromise = waitForProofRecord(faberAgent, { - state: ProofState.ProposalReceived, }) - aliceProofRecord = await aliceAgent.proofs.proposeProof(proposeProofOptions) - // Faber waits for a presentation proposal from Alice testLogger.test('Faber waits for a presentation proposal from Alice') - faberProofRecord = await faberProofRecordPromise + faberProofExchangeRecord = await faberProofExchangeRecordPromise didCommMessageRepository = faberAgent.injectionContainer.resolve(DidCommMessageRepository) const proposal = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V1ProposePresentationMessage, }) @@ -115,32 +108,32 @@ describe('Present Proof', () => { ], }, }) - expect(faberProofRecord.id).not.toBeNull() - expect(faberProofRecord).toMatchObject({ - threadId: faberProofRecord.threadId, + expect(faberProofExchangeRecord.id).not.toBeNull() + expect(faberProofExchangeRecord).toMatchObject({ + threadId: faberProofExchangeRecord.threadId, state: ProofState.ProposalReceived, protocolVersion: 'v1', }) const acceptProposalOptions: AcceptProposalOptions = { - proofRecordId: faberProofRecord.id, + proofRecordId: faberProofExchangeRecord.id, } - let aliceProofRecordPromise = waitForProofRecord(aliceAgent, { - threadId: aliceProofRecord.threadId, + let aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.RequestReceived, }) // Faber accepts the presentation proposal from Alice testLogger.test('Faber accepts presentation proposal from Alice') - faberProofRecord = await faberAgent.proofs.acceptProposal(acceptProposalOptions) + faberProofExchangeRecord = await faberAgent.proofs.acceptProposal(acceptProposalOptions) // Alice waits for presentation request from Faber testLogger.test('Alice waits for presentation request from Faber') - aliceProofRecord = await aliceProofRecordPromise + aliceProofExchangeRecord = await aliceProofExchangeRecordPromise const request = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V1RequestPresentationMessage, }) @@ -157,7 +150,7 @@ describe('Present Proof', () => { }, ], thread: { - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, }, }) @@ -165,28 +158,28 @@ describe('Present Proof', () => { testLogger.test('Alice accepts presentation request from Faber') const requestedCredentials = await aliceAgent.proofs.autoSelectCredentialsForProofRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, config: { filterByPresentationPreview: true, }, }) - faberProofRecordPromise = waitForProofRecord(faberAgent, { - threadId: aliceProofRecord.threadId, + faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.PresentationReceived, }) await aliceAgent.proofs.acceptRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, proofFormats: { indy: requestedCredentials.proofFormats.indy }, }) // Faber waits for the presentation from Alice testLogger.test('Faber waits for presentation from Alice') - faberProofRecord = await faberProofRecordPromise + faberProofExchangeRecord = await faberProofExchangeRecordPromise const presentation = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V1PresentationMessage, }) @@ -216,54 +209,54 @@ describe('Present Proof', () => { }, }) - expect(faberProofRecord.id).not.toBeNull() - expect(faberProofRecord).toMatchObject({ - threadId: faberProofRecord.threadId, + expect(faberProofExchangeRecord.id).not.toBeNull() + expect(faberProofExchangeRecord).toMatchObject({ + threadId: faberProofExchangeRecord.threadId, state: ProofState.PresentationReceived, protocolVersion: 'v1', }) - aliceProofRecordPromise = waitForProofRecord(aliceAgent, { - threadId: aliceProofRecord.threadId, + aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.Done, }) // Faber accepts the presentation provided by Alice testLogger.test('Faber accepts the presentation provided by Alice') - await faberAgent.proofs.acceptPresentation(faberProofRecord.id) + await faberAgent.proofs.acceptPresentation(faberProofExchangeRecord.id) // Alice waits until she received a presentation acknowledgement testLogger.test('Alice waits until she receives a presentation acknowledgement') - aliceProofRecord = await aliceProofRecordPromise + aliceProofExchangeRecord = await aliceProofExchangeRecordPromise - expect(faberProofRecord).toMatchObject({ - // type: ProofRecord.name, + expect(faberProofExchangeRecord).toMatchObject({ + type: ProofExchangeRecord.type, id: expect.any(String), createdAt: expect.any(Date), - threadId: aliceProofRecord.threadId, + threadId: aliceProofExchangeRecord.threadId, connectionId: expect.any(String), isVerified: true, state: ProofState.PresentationReceived, }) - expect(aliceProofRecord).toMatchObject({ - // type: ProofRecord.name, + expect(aliceProofExchangeRecord).toMatchObject({ + type: ProofExchangeRecord.type, id: expect.any(String), createdAt: expect.any(Date), - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, connectionId: expect.any(String), state: ProofState.Done, }) - const proposalMessage = await aliceAgent.proofs.findProposalMessage(aliceProofRecord.id) - const requestMessage = await aliceAgent.proofs.findRequestMessage(aliceProofRecord.id) - const presentationMessage = await aliceAgent.proofs.findPresentationMessage(aliceProofRecord.id) + const proposalMessage = await aliceAgent.proofs.findProposalMessage(aliceProofExchangeRecord.id) + const requestMessage = await aliceAgent.proofs.findRequestMessage(aliceProofExchangeRecord.id) + const presentationMessage = await aliceAgent.proofs.findPresentationMessage(aliceProofExchangeRecord.id) expect(proposalMessage).toBeInstanceOf(V1ProposePresentationMessage) expect(requestMessage).toBeInstanceOf(V1RequestPresentationMessage) expect(presentationMessage).toBeInstanceOf(V1PresentationMessage) - const formatData = await aliceAgent.proofs.getFormatData(aliceProofRecord.id) + const formatData = await aliceAgent.proofs.getFormatData(aliceProofExchangeRecord.id) // eslint-disable-next-line prefer-const let { proposeKey1, proposeKey2, requestKey1, requestKey2 } = getGroupKeysFromIndyProofFormatData(formatData) @@ -377,13 +370,13 @@ describe('Present Proof', () => { }), } - let aliceProofRecordPromise = waitForProofRecord(aliceAgent, { + let aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { state: ProofState.RequestReceived, }) // Faber sends a presentation request to Alice testLogger.test('Faber sends a presentation request to Alice') - faberProofRecord = await faberAgent.proofs.requestProof({ + faberProofExchangeRecord = await faberAgent.proofs.requestProof({ protocolVersion: 'v1', connectionId: faberConnection.id, proofFormats: { @@ -399,12 +392,12 @@ describe('Present Proof', () => { // Alice waits for presentation request from Faber testLogger.test('Alice waits for presentation request from Faber') - aliceProofRecord = await aliceProofRecordPromise + aliceProofExchangeRecord = await aliceProofExchangeRecordPromise didCommMessageRepository = faberAgent.injectionContainer.resolve(DidCommMessageRepository) const request = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V1RequestPresentationMessage, }) @@ -422,9 +415,9 @@ describe('Present Proof', () => { ], }) - expect(aliceProofRecord.id).not.toBeNull() - expect(aliceProofRecord).toMatchObject({ - threadId: aliceProofRecord.threadId, + expect(aliceProofExchangeRecord.id).not.toBeNull() + expect(aliceProofExchangeRecord).toMatchObject({ + threadId: aliceProofExchangeRecord.threadId, state: ProofState.RequestReceived, protocolVersion: 'v1', }) @@ -433,28 +426,28 @@ describe('Present Proof', () => { testLogger.test('Alice accepts presentation request from Faber') const requestedCredentials = await aliceAgent.proofs.autoSelectCredentialsForProofRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, config: { filterByPresentationPreview: true, }, }) - const faberProofRecordPromise = waitForProofRecord(faberAgent, { - threadId: aliceProofRecord.threadId, + const faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.PresentationReceived, }) await aliceAgent.proofs.acceptRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, proofFormats: { indy: requestedCredentials.proofFormats.indy }, }) // Faber waits until it receives a presentation from Alice testLogger.test('Faber waits for presentation from Alice') - faberProofRecord = await faberProofRecordPromise + faberProofExchangeRecord = await faberProofExchangeRecordPromise const presentation = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V1PresentationMessage, }) @@ -484,41 +477,41 @@ describe('Present Proof', () => { }, }) - expect(faberProofRecord.id).not.toBeNull() - expect(faberProofRecord).toMatchObject({ - threadId: faberProofRecord.threadId, + expect(faberProofExchangeRecord.id).not.toBeNull() + expect(faberProofExchangeRecord).toMatchObject({ + threadId: faberProofExchangeRecord.threadId, state: ProofState.PresentationReceived, protocolVersion: 'v1', }) - aliceProofRecordPromise = waitForProofRecord(aliceAgent, { - threadId: aliceProofRecord.threadId, + aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.Done, }) // Faber accepts the presentation testLogger.test('Faber accept the presentation from Alice') - await faberAgent.proofs.acceptPresentation(faberProofRecord.id) + await faberAgent.proofs.acceptPresentation(faberProofExchangeRecord.id) // Alice waits until she receives a presentation acknowledgement testLogger.test('Alice waits for acceptance by Faber') - aliceProofRecord = await aliceProofRecordPromise + aliceProofExchangeRecord = await aliceProofExchangeRecordPromise - expect(faberProofRecord).toMatchObject({ - // type: ProofRecord.name, + expect(faberProofExchangeRecord).toMatchObject({ + type: ProofExchangeRecord.type, id: expect.any(String), createdAt: expect.any(Date), - threadId: aliceProofRecord.threadId, + threadId: aliceProofExchangeRecord.threadId, connectionId: expect.any(String), isVerified: true, state: ProofState.PresentationReceived, }) - expect(aliceProofRecord).toMatchObject({ - // type: ProofRecord.name, + expect(aliceProofExchangeRecord).toMatchObject({ + type: ProofExchangeRecord.type, id: expect.any(String), createdAt: expect.any(Date), - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, connectionId: expect.any(String), state: ProofState.Done, }) @@ -602,13 +595,13 @@ describe('Present Proof', () => { }), } - const aliceProofRecordPromise = waitForProofRecord(aliceAgent, { + const aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { state: ProofState.RequestReceived, }) // Faber sends a presentation request to Alice testLogger.test('Faber sends a presentation request to Alice') - faberProofRecord = await faberAgent.proofs.requestProof({ + faberProofExchangeRecord = await faberAgent.proofs.requestProof({ protocolVersion: 'v1', connectionId: faberConnection.id, proofFormats: { @@ -624,12 +617,12 @@ describe('Present Proof', () => { // Alice waits for presentation request from Faber testLogger.test('Alice waits for presentation request from Faber') - aliceProofRecord = await aliceProofRecordPromise + aliceProofExchangeRecord = await aliceProofExchangeRecordPromise didCommMessageRepository = faberAgent.injectionContainer.resolve(DidCommMessageRepository) const request = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V1RequestPresentationMessage, }) @@ -647,24 +640,27 @@ describe('Present Proof', () => { ], }) - expect(aliceProofRecord.id).not.toBeNull() - expect(aliceProofRecord).toMatchObject({ - threadId: aliceProofRecord.threadId, + expect(aliceProofExchangeRecord.id).not.toBeNull() + expect(aliceProofExchangeRecord).toMatchObject({ + threadId: aliceProofExchangeRecord.threadId, state: ProofState.RequestReceived, protocolVersion: 'v1', }) - const faberProofRecordPromise = waitForProofRecord(faberAgent, { - threadId: aliceProofRecord.threadId, + const faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.Abandoned, }) - aliceProofRecord = await aliceAgent.proofs.sendProblemReport(aliceProofRecord.id, 'Problem inside proof request') + aliceProofExchangeRecord = await aliceAgent.proofs.sendProblemReport( + aliceProofExchangeRecord.id, + 'Problem inside proof request' + ) - faberProofRecord = await faberProofRecordPromise + faberProofExchangeRecord = await faberProofExchangeRecordPromise - expect(faberProofRecord).toMatchObject({ - threadId: aliceProofRecord.threadId, + expect(faberProofExchangeRecord).toMatchObject({ + threadId: aliceProofExchangeRecord.threadId, state: ProofState.Abandoned, protocolVersion: 'v1', }) diff --git a/packages/core/tests/v1-proofs-auto-accept.test.ts b/packages/core/tests/v1-proofs-auto-accept.test.ts index 37056c0d81..fbca03df04 100644 --- a/packages/core/tests/v1-proofs-auto-accept.test.ts +++ b/packages/core/tests/v1-proofs-auto-accept.test.ts @@ -1,7 +1,4 @@ import type { Agent, ConnectionRecord } from '../src' -import type { ProposeProofOptions, RequestProofOptions } from '../src/modules/proofs/ProofsApiOptions' -import type { IndyProofFormat } from '../src/modules/proofs/formats/indy/IndyProofFormat' -import type { V1ProofService } from '../src/modules/proofs/protocol/v1/V1ProofService' import type { PresentationPreview } from '../src/modules/proofs/protocol/v1/models/V1PresentationPreview' import { @@ -13,7 +10,7 @@ import { PredicateType, } from '../src' -import { setupProofsTest, waitForProofRecord } from './helpers' +import { setupProofsTest, waitForProofExchangeRecord } from './helpers' import testLogger from './logger' describe('Auto accept present proof', () => { @@ -43,7 +40,15 @@ describe('Auto accept present proof', () => { test('Alice starts with proof proposal to Faber, both with autoAcceptProof on `always`', async () => { testLogger.test('Alice sends presentation proposal to Faber') - const proposeProofOptions: ProposeProofOptions<[IndyProofFormat], [V1ProofService]> = { + const faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { + state: ProofState.Done, + }) + + const aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { + state: ProofState.Done, + }) + + await aliceAgent.proofs.proposeProof({ connectionId: aliceConnection.id, protocolVersion: 'v1', proofFormats: { @@ -55,23 +60,13 @@ describe('Auto accept present proof', () => { predicates: presentationPreview.predicates, }, }, - } - - const faberProofRecordPromise = waitForProofRecord(faberAgent, { - state: ProofState.Done, - }) - - const aliceProofRecordPromise = waitForProofRecord(aliceAgent, { - state: ProofState.Done, }) - await aliceAgent.proofs.proposeProof(proposeProofOptions) - testLogger.test('Faber waits for presentation from Alice') - await faberProofRecordPromise + await faberProofExchangeRecordPromise testLogger.test('Alice waits till it receives presentation ack') - await aliceProofRecordPromise + await aliceProofExchangeRecordPromise }) test('Faber starts with proof requests to Alice, both with autoAcceptProof on `always`', async () => { @@ -99,11 +94,11 @@ describe('Auto accept present proof', () => { }), } - const faberProofRecordPromise = waitForProofRecord(faberAgent, { + const faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { state: ProofState.Done, }) - const aliceProofRecordPromise = waitForProofRecord(aliceAgent, { + const aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { state: ProofState.Done, }) @@ -123,10 +118,10 @@ describe('Auto accept present proof', () => { testLogger.test('Faber waits for presentation from Alice') - await faberProofRecordPromise + await faberProofExchangeRecordPromise // Alice waits till it receives presentation ack - await aliceProofRecordPromise + await aliceProofExchangeRecordPromise }) }) @@ -151,7 +146,11 @@ describe('Auto accept present proof', () => { test('Alice starts with proof proposal to Faber, both with autoacceptproof on `contentApproved`', async () => { testLogger.test('Alice sends presentation proposal to Faber') - const proposal: ProposeProofOptions<[IndyProofFormat], [V1ProofService]> = { + let faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { + state: ProofState.ProposalReceived, + }) + + const aliceProofExchangeRecord = await aliceAgent.proofs.proposeProof({ connectionId: aliceConnection.id, protocolVersion: 'v1', proofFormats: { @@ -163,35 +162,29 @@ describe('Auto accept present proof', () => { predicates: presentationPreview.predicates, }, }, - } - - let faberProofRecordPromise = waitForProofRecord(faberAgent, { - state: ProofState.ProposalReceived, }) - const aliceProofRecord = await aliceAgent.proofs.proposeProof(proposal) - testLogger.test('Faber waits for presentation proposal from Alice') - await faberProofRecordPromise + await faberProofExchangeRecordPromise testLogger.test('Faber accepts presentation proposal from Alice') - faberProofRecordPromise = waitForProofRecord(faberAgent, { - threadId: aliceProofRecord.threadId, + faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.Done, }) - const aliceProofRecordPromise = waitForProofRecord(aliceAgent, { - threadId: aliceProofRecord.threadId, + const aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.Done, }) testLogger.test('Faber waits for presentation from Alice') - await faberProofRecordPromise + await faberProofExchangeRecordPromise // Alice waits till it receives presentation ack - await aliceProofRecordPromise + await aliceProofExchangeRecordPromise }) test('Faber starts with proof requests to Alice, both with autoacceptproof on `contentApproved`', async () => { @@ -219,11 +212,11 @@ describe('Auto accept present proof', () => { }), } - const faberProofRecordPromise = waitForProofRecord(faberAgent, { + const faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { state: ProofState.Done, }) - const aliceProofRecordPromise = waitForProofRecord(aliceAgent, { + const aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { state: ProofState.Done, }) @@ -242,10 +235,10 @@ describe('Auto accept present proof', () => { }) testLogger.test('Faber waits for presentation from Alice') - await faberProofRecordPromise + await faberProofExchangeRecordPromise // Alice waits till it receives presentation ack - await aliceProofRecordPromise + await aliceProofExchangeRecordPromise }) }) }) diff --git a/packages/core/tests/v2-connectionless-proofs.test.ts b/packages/core/tests/v2-connectionless-proofs.test.ts index ef9f5f69cc..29263d692e 100644 --- a/packages/core/tests/v2-connectionless-proofs.test.ts +++ b/packages/core/tests/v2-connectionless-proofs.test.ts @@ -1,8 +1,5 @@ import type { SubjectMessage } from '../../../tests/transport/SubjectInboundTransport' import type { ProofStateChangedEvent } from '../src/modules/proofs' -import type { CreateProofRequestOptions } from '../src/modules/proofs/ProofsApiOptions' -import type { IndyProofFormat } from '../src/modules/proofs/formats/indy/IndyProofFormat' -import type { V2ProofService } from '../src/modules/proofs/protocol/v2' import { Subject, ReplaySubject } from 'rxjs' @@ -31,7 +28,7 @@ import { makeConnection, prepareForIssuance, setupProofsTest, - waitForProofRecordSubject, + waitForProofExchangeRecordSubject, } from './helpers' import testLogger from './logger' @@ -78,12 +75,12 @@ describe('Present Proof', () => { }), } - let aliceProofRecordPromise = waitForProofRecordSubject(aliceReplay, { + let aliceProofExchangeRecordPromise = waitForProofExchangeRecordSubject(aliceReplay, { state: ProofState.RequestReceived, }) // eslint-disable-next-line prefer-const - let { proofRecord: faberProofRecord, message } = await faberAgent.proofs.createRequest({ + let { proofRecord: faberProofExchangeRecord, message } = await faberAgent.proofs.createRequest({ protocolVersion: 'v2', proofFormats: { indy: { @@ -97,7 +94,7 @@ describe('Present Proof', () => { }) const { message: requestMessage } = await faberAgent.oob.createLegacyConnectionlessInvitation({ - recordId: faberProofRecord.id, + recordId: faberProofExchangeRecord.id, message, domain: 'https://a-domain.com', }) @@ -105,43 +102,43 @@ describe('Present Proof', () => { await aliceAgent.receiveMessage(requestMessage.toJSON()) testLogger.test('Alice waits for presentation request from Faber') - let aliceProofRecord = await aliceProofRecordPromise + let aliceProofExchangeRecord = await aliceProofExchangeRecordPromise testLogger.test('Alice accepts presentation request from Faber') const requestedCredentials = await aliceAgent.proofs.autoSelectCredentialsForProofRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, config: { filterByPresentationPreview: true, }, }) - const faberProofRecordPromise = waitForProofRecordSubject(faberReplay, { - threadId: aliceProofRecord.threadId, + const faberProofExchangeRecordPromise = waitForProofExchangeRecordSubject(faberReplay, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.PresentationReceived, }) await aliceAgent.proofs.acceptRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, proofFormats: { indy: requestedCredentials.proofFormats.indy }, }) testLogger.test('Faber waits for presentation from Alice') - faberProofRecord = await faberProofRecordPromise + faberProofExchangeRecord = await faberProofExchangeRecordPromise // assert presentation is valid - expect(faberProofRecord.isVerified).toBe(true) + expect(faberProofExchangeRecord.isVerified).toBe(true) - aliceProofRecordPromise = waitForProofRecordSubject(aliceReplay, { - threadId: aliceProofRecord.threadId, + aliceProofExchangeRecordPromise = waitForProofExchangeRecordSubject(aliceReplay, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.Done, }) // Faber accepts presentation - await faberAgent.proofs.acceptPresentation(faberProofRecord.id) + await faberAgent.proofs.acceptPresentation(faberProofExchangeRecord.id) // Alice waits till it receives presentation ack - aliceProofRecord = await aliceProofRecordPromise + aliceProofExchangeRecord = await aliceProofExchangeRecordPromise }) test('Faber starts with connection-less proof requests to Alice with auto-accept enabled', async () => { @@ -179,16 +176,16 @@ describe('Present Proof', () => { }), } - const aliceProofRecordPromise = waitForProofRecordSubject(aliceReplay, { + const aliceProofExchangeRecordPromise = waitForProofExchangeRecordSubject(aliceReplay, { state: ProofState.Done, }) - const faberProofRecordPromise = waitForProofRecordSubject(faberReplay, { + const faberProofExchangeRecordPromise = waitForProofExchangeRecordSubject(faberReplay, { state: ProofState.Done, }) // eslint-disable-next-line prefer-const - let { message, proofRecord: faberProofRecord } = await faberAgent.proofs.createRequest({ + let { message, proofRecord: faberProofExchangeRecord } = await faberAgent.proofs.createRequest({ protocolVersion: 'v2', proofFormats: { indy: { @@ -203,15 +200,15 @@ describe('Present Proof', () => { }) const { message: requestMessage } = await faberAgent.oob.createLegacyConnectionlessInvitation({ - recordId: faberProofRecord.id, + recordId: faberProofExchangeRecord.id, message, domain: 'https://a-domain.com', }) await aliceAgent.receiveMessage(requestMessage.toJSON()) - await aliceProofRecordPromise + await aliceProofExchangeRecordPromise - await faberProofRecordPromise + await faberProofExchangeRecordPromise }) test('Faber starts with connection-less proof requests to Alice with auto-accept enabled and both agents having a mediator', async () => { @@ -343,16 +340,16 @@ describe('Present Proof', () => { }), } - const aliceProofRecordPromise = waitForProofRecordSubject(aliceReplay, { + const aliceProofExchangeRecordPromise = waitForProofExchangeRecordSubject(aliceReplay, { state: ProofState.Done, }) - const faberProofRecordPromise = waitForProofRecordSubject(faberReplay, { + const faberProofExchangeRecordPromise = waitForProofExchangeRecordSubject(faberReplay, { state: ProofState.Done, }) // eslint-disable-next-line prefer-const - let { message, proofRecord: faberProofRecord } = await faberAgent.proofs.createRequest({ + let { message, proofRecord: faberProofExchangeRecord } = await faberAgent.proofs.createRequest({ protocolVersion: 'v2', proofFormats: { indy: { @@ -367,7 +364,7 @@ describe('Present Proof', () => { }) const { message: requestMessage } = await faberAgent.oob.createLegacyConnectionlessInvitation({ - recordId: faberProofRecord.id, + recordId: faberProofExchangeRecord.id, message, domain: 'https://a-domain.com', }) @@ -387,8 +384,8 @@ describe('Present Proof', () => { await aliceAgent.receiveMessage(requestMessage.toJSON()) - await aliceProofRecordPromise + await aliceProofExchangeRecordPromise - await faberProofRecordPromise + await faberProofExchangeRecordPromise }) }) diff --git a/packages/core/tests/v2-indy-proofs.test.ts b/packages/core/tests/v2-indy-proofs.test.ts index 0f8a750f16..d59df461bb 100644 --- a/packages/core/tests/v2-indy-proofs.test.ts +++ b/packages/core/tests/v2-indy-proofs.test.ts @@ -1,15 +1,16 @@ -import type { Agent, ConnectionRecord, ProofRecord } from '../src' -import type { - AcceptProposalOptions, - ProposeProofOptions, - RequestProofOptions, -} from '../src/modules/proofs/ProofsApiOptions' -import type { IndyProofFormat } from '../src/modules/proofs/formats/indy/IndyProofFormat' +import type { Agent, ConnectionRecord } from '../src' +import type { AcceptProposalOptions } from '../src/modules/proofs/ProofsApiOptions' import type { PresentationPreview } from '../src/modules/proofs/protocol/v1/models/V1PresentationPreview' -import type { V2ProofService } from '../src/modules/proofs/protocol/v2' import type { CredDefId } from 'indy-sdk' -import { AttributeFilter, PredicateType, ProofAttributeInfo, ProofPredicateInfo, ProofState } from '../src' +import { + ProofExchangeRecord, + AttributeFilter, + PredicateType, + ProofAttributeInfo, + ProofPredicateInfo, + ProofState, +} from '../src' import { getGroupKeysFromIndyProofFormatData } from '../src/modules/proofs/__tests__/groupKeys' import { V2_INDY_PRESENTATION_PROPOSAL, @@ -23,7 +24,7 @@ import { } from '../src/modules/proofs/protocol/v2/messages' import { DidCommMessageRepository } from '../src/storage/didcomm' -import { setupProofsTest, waitForProofRecord } from './helpers' +import { setupProofsTest, waitForProofExchangeRecord } from './helpers' import testLogger from './logger' describe('Present Proof', () => { @@ -32,8 +33,8 @@ describe('Present Proof', () => { let credDefId: CredDefId let aliceConnection: ConnectionRecord let faberConnection: ConnectionRecord - let faberProofRecord: ProofRecord - let aliceProofRecord: ProofRecord + let faberProofExchangeRecord: ProofExchangeRecord + let aliceProofExchangeRecord: ProofExchangeRecord let presentationPreview: PresentationPreview let didCommMessageRepository: DidCommMessageRepository @@ -55,7 +56,11 @@ describe('Present Proof', () => { // Alice sends a presentation proposal to Faber testLogger.test('Alice sends a presentation proposal to Faber') - const proposeProofOptions: ProposeProofOptions<[IndyProofFormat], [V2ProofService]> = { + let faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { + state: ProofState.ProposalReceived, + }) + + aliceProofExchangeRecord = await aliceAgent.proofs.proposeProof({ connectionId: aliceConnection.id, protocolVersion: 'v2', proofFormats: { @@ -67,22 +72,16 @@ describe('Present Proof', () => { predicates: presentationPreview.predicates, }, }, - } - - let faberProofRecordPromise = waitForProofRecord(faberAgent, { - state: ProofState.ProposalReceived, }) - aliceProofRecord = await aliceAgent.proofs.proposeProof(proposeProofOptions) - // Faber waits for a presentation proposal from Alice testLogger.test('Faber waits for a presentation proposal from Alice') - faberProofRecord = await faberProofRecordPromise + faberProofExchangeRecord = await faberProofExchangeRecordPromise didCommMessageRepository = faberAgent.injectionContainer.resolve(DidCommMessageRepository) const proposal = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V2ProposalPresentationMessage, }) @@ -105,31 +104,31 @@ describe('Present Proof', () => { ], id: expect.any(String), }) - expect(faberProofRecord.id).not.toBeNull() - expect(faberProofRecord).toMatchObject({ - threadId: faberProofRecord.threadId, + expect(faberProofExchangeRecord.id).not.toBeNull() + expect(faberProofExchangeRecord).toMatchObject({ + threadId: faberProofExchangeRecord.threadId, state: ProofState.ProposalReceived, protocolVersion: 'v2', }) const acceptProposalOptions: AcceptProposalOptions = { - proofRecordId: faberProofRecord.id, + proofRecordId: faberProofExchangeRecord.id, } - let aliceProofRecordPromise = waitForProofRecord(aliceAgent, { + let aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { state: ProofState.RequestReceived, }) // Faber accepts the presentation proposal from Alice testLogger.test('Faber accepts presentation proposal from Alice') - faberProofRecord = await faberAgent.proofs.acceptProposal(acceptProposalOptions) + faberProofExchangeRecord = await faberAgent.proofs.acceptProposal(acceptProposalOptions) // Alice waits for presentation request from Faber testLogger.test('Alice waits for presentation request from Faber') - aliceProofRecord = await aliceProofRecordPromise + aliceProofExchangeRecord = await aliceProofExchangeRecordPromise const request = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V2RequestPresentationMessage, }) @@ -152,7 +151,7 @@ describe('Present Proof', () => { ], id: expect.any(String), thread: { - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, }, }) @@ -160,28 +159,28 @@ describe('Present Proof', () => { testLogger.test('Alice accepts presentation request from Faber') const requestedCredentials = await aliceAgent.proofs.autoSelectCredentialsForProofRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, config: { filterByPresentationPreview: true, }, }) - faberProofRecordPromise = waitForProofRecord(faberAgent, { - threadId: aliceProofRecord.threadId, + faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.PresentationReceived, }) await aliceAgent.proofs.acceptRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, proofFormats: { indy: requestedCredentials.proofFormats.indy }, }) // Faber waits for the presentation from Alice testLogger.test('Faber waits for presentation from Alice') - faberProofRecord = await faberProofRecordPromise + faberProofExchangeRecord = await faberProofExchangeRecordPromise const presentation = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V2PresentationMessage, }) @@ -204,57 +203,57 @@ describe('Present Proof', () => { ], id: expect.any(String), thread: { - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, }, }) - expect(faberProofRecord.id).not.toBeNull() - expect(faberProofRecord).toMatchObject({ - threadId: faberProofRecord.threadId, + expect(faberProofExchangeRecord.id).not.toBeNull() + expect(faberProofExchangeRecord).toMatchObject({ + threadId: faberProofExchangeRecord.threadId, state: ProofState.PresentationReceived, protocolVersion: 'v2', }) - aliceProofRecordPromise = waitForProofRecord(aliceAgent, { - threadId: aliceProofRecord.threadId, + aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.Done, }) // Faber accepts the presentation provided by Alice testLogger.test('Faber accepts the presentation provided by Alice') - await faberAgent.proofs.acceptPresentation(faberProofRecord.id) + await faberAgent.proofs.acceptPresentation(faberProofExchangeRecord.id) // Alice waits until she received a presentation acknowledgement testLogger.test('Alice waits until she receives a presentation acknowledgement') - aliceProofRecord = await aliceProofRecordPromise + aliceProofExchangeRecord = await aliceProofExchangeRecordPromise - expect(faberProofRecord).toMatchObject({ - // type: ProofRecord.name, + expect(faberProofExchangeRecord).toMatchObject({ + type: ProofExchangeRecord.type, id: expect.any(String), createdAt: expect.any(Date), - threadId: aliceProofRecord.threadId, + threadId: aliceProofExchangeRecord.threadId, connectionId: expect.any(String), isVerified: true, state: ProofState.PresentationReceived, }) - expect(aliceProofRecord).toMatchObject({ - // type: ProofRecord.name, + expect(aliceProofExchangeRecord).toMatchObject({ + type: ProofExchangeRecord.type, id: expect.any(String), createdAt: expect.any(Date), - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, connectionId: expect.any(String), state: ProofState.Done, }) - const proposalMessage = await aliceAgent.proofs.findProposalMessage(aliceProofRecord.id) - const requestMessage = await aliceAgent.proofs.findRequestMessage(aliceProofRecord.id) - const presentationMessage = await aliceAgent.proofs.findPresentationMessage(aliceProofRecord.id) + const proposalMessage = await aliceAgent.proofs.findProposalMessage(aliceProofExchangeRecord.id) + const requestMessage = await aliceAgent.proofs.findRequestMessage(aliceProofExchangeRecord.id) + const presentationMessage = await aliceAgent.proofs.findPresentationMessage(aliceProofExchangeRecord.id) expect(proposalMessage).toBeInstanceOf(V2ProposalPresentationMessage) expect(requestMessage).toBeInstanceOf(V2RequestPresentationMessage) expect(presentationMessage).toBeInstanceOf(V2PresentationMessage) - const formatData = await aliceAgent.proofs.getFormatData(aliceProofRecord.id) + const formatData = await aliceAgent.proofs.getFormatData(aliceProofExchangeRecord.id) // eslint-disable-next-line prefer-const let { proposeKey1, proposeKey2, requestKey1, requestKey2 } = getGroupKeysFromIndyProofFormatData(formatData) @@ -379,13 +378,13 @@ describe('Present Proof', () => { }), } - let aliceProofRecordPromise = waitForProofRecord(aliceAgent, { + let aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { state: ProofState.RequestReceived, }) // Faber sends a presentation request to Alice testLogger.test('Faber sends a presentation request to Alice') - faberProofRecord = await faberAgent.proofs.requestProof({ + faberProofExchangeRecord = await faberAgent.proofs.requestProof({ protocolVersion: 'v2', connectionId: faberConnection.id, proofFormats: { @@ -401,10 +400,10 @@ describe('Present Proof', () => { // Alice waits for presentation request from Faber testLogger.test('Alice waits for presentation request from Faber') - aliceProofRecord = await aliceProofRecordPromise + aliceProofExchangeRecord = await aliceProofExchangeRecordPromise const request = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V2RequestPresentationMessage, }) @@ -428,9 +427,9 @@ describe('Present Proof', () => { id: expect.any(String), }) - expect(aliceProofRecord.id).not.toBeNull() - expect(aliceProofRecord).toMatchObject({ - threadId: aliceProofRecord.threadId, + expect(aliceProofExchangeRecord.id).not.toBeNull() + expect(aliceProofExchangeRecord).toMatchObject({ + threadId: aliceProofExchangeRecord.threadId, state: ProofState.RequestReceived, protocolVersion: 'v2', }) @@ -439,28 +438,28 @@ describe('Present Proof', () => { testLogger.test('Alice accepts presentation request from Faber') const requestedCredentials = await aliceAgent.proofs.autoSelectCredentialsForProofRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, config: { filterByPresentationPreview: true, }, }) - const faberProofRecordPromise = waitForProofRecord(faberAgent, { - threadId: aliceProofRecord.threadId, + const faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.PresentationReceived, }) await aliceAgent.proofs.acceptRequest({ - proofRecordId: aliceProofRecord.id, + proofRecordId: aliceProofExchangeRecord.id, proofFormats: { indy: requestedCredentials.proofFormats.indy }, }) // Faber waits until it receives a presentation from Alice testLogger.test('Faber waits for presentation from Alice') - faberProofRecord = await faberProofRecordPromise + faberProofExchangeRecord = await faberProofExchangeRecordPromise const presentation = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V2PresentationMessage, }) @@ -483,44 +482,44 @@ describe('Present Proof', () => { ], id: expect.any(String), thread: { - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, }, }) - expect(faberProofRecord.id).not.toBeNull() - expect(faberProofRecord).toMatchObject({ - threadId: faberProofRecord.threadId, + expect(faberProofExchangeRecord.id).not.toBeNull() + expect(faberProofExchangeRecord).toMatchObject({ + threadId: faberProofExchangeRecord.threadId, state: ProofState.PresentationReceived, protocolVersion: 'v2', }) - aliceProofRecordPromise = waitForProofRecord(aliceAgent, { - threadId: aliceProofRecord.threadId, + aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.Done, }) // Faber accepts the presentation testLogger.test('Faber accept the presentation from Alice') - await faberAgent.proofs.acceptPresentation(faberProofRecord.id) + await faberAgent.proofs.acceptPresentation(faberProofExchangeRecord.id) // Alice waits until she receives a presentation acknowledgement testLogger.test('Alice waits for acceptance by Faber') - aliceProofRecord = await aliceProofRecordPromise + aliceProofExchangeRecord = await aliceProofExchangeRecordPromise - expect(faberProofRecord).toMatchObject({ - // type: ProofRecord.name, + expect(faberProofExchangeRecord).toMatchObject({ + type: ProofExchangeRecord.type, id: expect.any(String), createdAt: expect.any(Date), - threadId: aliceProofRecord.threadId, + threadId: aliceProofExchangeRecord.threadId, connectionId: expect.any(String), isVerified: true, state: ProofState.PresentationReceived, }) - expect(aliceProofRecord).toMatchObject({ - // type: ProofRecord.name, + expect(aliceProofExchangeRecord).toMatchObject({ + type: ProofExchangeRecord.type, id: expect.any(String), createdAt: expect.any(Date), - threadId: faberProofRecord.threadId, + threadId: faberProofExchangeRecord.threadId, connectionId: expect.any(String), state: ProofState.Done, }) @@ -560,13 +559,13 @@ describe('Present Proof', () => { }), } - const aliceProofRecordPromise = waitForProofRecord(aliceAgent, { + const aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { state: ProofState.RequestReceived, }) // Faber sends a presentation request to Alice testLogger.test('Faber sends a presentation request to Alice') - faberProofRecord = await faberAgent.proofs.requestProof({ + faberProofExchangeRecord = await faberAgent.proofs.requestProof({ protocolVersion: 'v2', connectionId: faberConnection.id, proofFormats: { @@ -582,10 +581,10 @@ describe('Present Proof', () => { // Alice waits for presentation request from Faber testLogger.test('Alice waits for presentation request from Faber') - aliceProofRecord = await aliceProofRecordPromise + aliceProofExchangeRecord = await aliceProofExchangeRecordPromise const retrievedCredentials = await faberAgent.proofs.getRequestedCredentialsForProofRequest({ - proofRecordId: faberProofRecord.id, + proofRecordId: faberProofExchangeRecord.id, config: {}, }) @@ -632,13 +631,13 @@ describe('Present Proof', () => { }), } - const aliceProofRecordPromise = waitForProofRecord(aliceAgent, { + const aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { state: ProofState.RequestReceived, }) // Faber sends a presentation request to Alice testLogger.test('Faber sends a presentation request to Alice') - faberProofRecord = await faberAgent.proofs.requestProof({ + faberProofExchangeRecord = await faberAgent.proofs.requestProof({ protocolVersion: 'v2', connectionId: faberConnection.id, proofFormats: { @@ -654,10 +653,10 @@ describe('Present Proof', () => { // Alice waits for presentation request from Faber testLogger.test('Alice waits for presentation request from Faber') - aliceProofRecord = await aliceProofRecordPromise + aliceProofExchangeRecord = await aliceProofExchangeRecordPromise const request = await didCommMessageRepository.findAgentMessage(faberAgent.context, { - associatedRecordId: faberProofRecord.id, + associatedRecordId: faberProofExchangeRecord.id, messageClass: V2RequestPresentationMessage, }) @@ -681,24 +680,27 @@ describe('Present Proof', () => { id: expect.any(String), }) - expect(aliceProofRecord.id).not.toBeNull() - expect(aliceProofRecord).toMatchObject({ - threadId: aliceProofRecord.threadId, + expect(aliceProofExchangeRecord.id).not.toBeNull() + expect(aliceProofExchangeRecord).toMatchObject({ + threadId: aliceProofExchangeRecord.threadId, state: ProofState.RequestReceived, protocolVersion: 'v2', }) - const faberProofRecordPromise = waitForProofRecord(faberAgent, { - threadId: aliceProofRecord.threadId, + const faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.Abandoned, }) - aliceProofRecord = await aliceAgent.proofs.sendProblemReport(aliceProofRecord.id, 'Problem inside proof request') + aliceProofExchangeRecord = await aliceAgent.proofs.sendProblemReport( + aliceProofExchangeRecord.id, + 'Problem inside proof request' + ) - faberProofRecord = await faberProofRecordPromise + faberProofExchangeRecord = await faberProofExchangeRecordPromise - expect(faberProofRecord).toMatchObject({ - threadId: aliceProofRecord.threadId, + expect(faberProofExchangeRecord).toMatchObject({ + threadId: aliceProofExchangeRecord.threadId, state: ProofState.Abandoned, protocolVersion: 'v2', }) diff --git a/packages/core/tests/v2-proofs-auto-accept.test.ts b/packages/core/tests/v2-proofs-auto-accept.test.ts index 11c9f6f865..aa58d430d5 100644 --- a/packages/core/tests/v2-proofs-auto-accept.test.ts +++ b/packages/core/tests/v2-proofs-auto-accept.test.ts @@ -1,8 +1,5 @@ import type { Agent, ConnectionRecord } from '../src' -import type { ProposeProofOptions, RequestProofOptions } from '../src/modules/proofs/ProofsApiOptions' -import type { IndyProofFormat } from '../src/modules/proofs/formats/indy/IndyProofFormat' import type { PresentationPreview } from '../src/modules/proofs/protocol/v1/models/V1PresentationPreview' -import type { V2ProofService } from '../src/modules/proofs/protocol/v2' import { AutoAcceptProof, @@ -13,7 +10,7 @@ import { PredicateType, } from '../src' -import { setupProofsTest, waitForProofRecord } from './helpers' +import { setupProofsTest, waitForProofExchangeRecord } from './helpers' import testLogger from './logger' describe('Auto accept present proof', () => { @@ -43,7 +40,15 @@ describe('Auto accept present proof', () => { test('Alice starts with proof proposal to Faber, both with autoAcceptProof on `always`', async () => { testLogger.test('Alice sends presentation proposal to Faber') - const proposeProofOptions: ProposeProofOptions<[IndyProofFormat], [V2ProofService]> = { + const faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { + state: ProofState.Done, + }) + + const aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { + state: ProofState.Done, + }) + + await aliceAgent.proofs.proposeProof({ connectionId: aliceConnection.id, protocolVersion: 'v2', proofFormats: { @@ -55,23 +60,13 @@ describe('Auto accept present proof', () => { predicates: presentationPreview.predicates, }, }, - } - - const faberProofRecordPromise = waitForProofRecord(faberAgent, { - state: ProofState.Done, - }) - - const aliceProofRecordPromise = waitForProofRecord(aliceAgent, { - state: ProofState.Done, }) - await aliceAgent.proofs.proposeProof(proposeProofOptions) - testLogger.test('Faber waits for presentation from Alice') - await faberProofRecordPromise + await faberProofExchangeRecordPromise testLogger.test('Alice waits till it receives presentation ack') - await aliceProofRecordPromise + await aliceProofExchangeRecordPromise }) test('Faber starts with proof requests to Alice, both with autoAcceptProof on `always`', async () => { @@ -99,11 +94,11 @@ describe('Auto accept present proof', () => { }), } - const faberProofRecordPromise = waitForProofRecord(faberAgent, { + const faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { state: ProofState.Done, }) - const aliceProofRecordPromise = waitForProofRecord(aliceAgent, { + const aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { state: ProofState.Done, }) @@ -122,9 +117,9 @@ describe('Auto accept present proof', () => { }) testLogger.test('Faber waits for presentation from Alice') - await faberProofRecordPromise + await faberProofExchangeRecordPromise // Alice waits till it receives presentation ack - await aliceProofRecordPromise + await aliceProofExchangeRecordPromise }) }) @@ -149,7 +144,11 @@ describe('Auto accept present proof', () => { test('Alice starts with proof proposal to Faber, both with autoacceptproof on `contentApproved`', async () => { testLogger.test('Alice sends presentation proposal to Faber') - const proposal: ProposeProofOptions<[IndyProofFormat], [V2ProofService]> = { + let faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { + state: ProofState.ProposalReceived, + }) + + const aliceProofExchangeRecord = await aliceAgent.proofs.proposeProof({ connectionId: aliceConnection.id, protocolVersion: 'v2', proofFormats: { @@ -161,35 +160,29 @@ describe('Auto accept present proof', () => { version: '1.0', }, }, - } - - let faberProofRecordPromise = waitForProofRecord(faberAgent, { - state: ProofState.ProposalReceived, }) - const aliceProofRecord = await aliceAgent.proofs.proposeProof(proposal) - testLogger.test('Faber waits for presentation proposal from Alice') - await faberProofRecordPromise + await faberProofExchangeRecordPromise testLogger.test('Faber accepts presentation proposal from Alice') - faberProofRecordPromise = waitForProofRecord(faberAgent, { - threadId: aliceProofRecord.threadId, + faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.Done, }) - const aliceProofRecordPromise = waitForProofRecord(aliceAgent, { - threadId: aliceProofRecord.threadId, + const aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { + threadId: aliceProofExchangeRecord.threadId, state: ProofState.Done, }) testLogger.test('Faber waits for presentation from Alice') - await faberProofRecordPromise + await faberProofExchangeRecordPromise // Alice waits till it receives presentation ack - await aliceProofRecordPromise + await aliceProofExchangeRecordPromise }) test('Faber starts with proof requests to Alice, both with autoacceptproof on `contentApproved`', async () => { @@ -217,11 +210,11 @@ describe('Auto accept present proof', () => { }), } - const faberProofRecordPromise = waitForProofRecord(faberAgent, { + const faberProofExchangeRecordPromise = waitForProofExchangeRecord(faberAgent, { state: ProofState.Done, }) - const aliceProofRecordPromise = waitForProofRecord(aliceAgent, { + const aliceProofExchangeRecordPromise = waitForProofExchangeRecord(aliceAgent, { state: ProofState.Done, }) @@ -240,10 +233,10 @@ describe('Auto accept present proof', () => { }) testLogger.test('Faber waits for presentation from Alice') - await faberProofRecordPromise + await faberProofExchangeRecordPromise // Alice waits till it receives presentation ack - await aliceProofRecordPromise + await aliceProofExchangeRecordPromise }) }) })