diff --git a/apps/ssi-abstraction/src/agent/agent.service.ts b/apps/ssi-abstraction/src/agent/agent.service.ts index 745ab35b3165e974ed606fbcae58760f08551393..9d46f9cd18f60774ac81978a082fd9d4012e354d 100644 --- a/apps/ssi-abstraction/src/agent/agent.service.ts +++ b/apps/ssi-abstraction/src/agent/agent.service.ts @@ -30,6 +30,7 @@ import { V2CredentialProtocol, V2ProofProtocol, WebDidResolver, + WsOutboundTransport, } from '@credo-ts/core'; import { IndyVdrAnonCredsRegistry, @@ -78,6 +79,7 @@ export class AgentService implements OnApplicationShutdown { this.agent.registerInboundTransport(httpInbound); + this.agent.registerOutboundTransport(new WsOutboundTransport()); this.agent.registerOutboundTransport(new HttpOutboundTransport()); } diff --git a/apps/ssi-abstraction/src/agent/anoncredsCredentials/anoncredsCredentials.service.ts b/apps/ssi-abstraction/src/agent/anoncredsCredentials/anoncredsCredentials.service.ts index 103f0c2ba80d4795a13fe4d0de965991cc2ae266..2cd8fd93b6133a4fd90122d295e2dde3e51dc1e1 100644 --- a/apps/ssi-abstraction/src/agent/anoncredsCredentials/anoncredsCredentials.service.ts +++ b/apps/ssi-abstraction/src/agent/anoncredsCredentials/anoncredsCredentials.service.ts @@ -16,8 +16,6 @@ import type { EventAnonCredsCredentialsDeleteByIdInput, EventAnonCredsCredentialsGetAllInput, EventAnonCredsCredentialsGetByIdInput, - EventDidcommAnonCredsCredentialsAcceptOffer, - EventDidcommAnonCredsCredentialsAcceptOfferInput, EventDidcommAnonCredsCredentialsOffer, EventDidcommAnonCredsCredentialsOfferInput, EventDidcommAnonCredsCredentialsOfferToSelf, @@ -151,19 +149,6 @@ export class AnonCredsCredentialsService { }); } - public async acceptOffer({ - tenantId, - credentialId, - }: EventDidcommAnonCredsCredentialsAcceptOfferInput): Promise< - EventDidcommAnonCredsCredentialsAcceptOffer['data'] - > { - return this.withTenantService.invoke(tenantId, (t) => - t.credentials.acceptOffer({ - credentialRecordId: credentialId, - }), - ); - } - public async offer({ tenantId, connectionId, @@ -217,8 +202,6 @@ export class AnonCredsCredentialsService { throw new Error('Connection with yourself is not ready, yet'); } - const revocationRegistryIndex = await this.getNextRevocationIdx(t); - const acceptOfferListener = new Promise((resolve) => { this.agentService.agent.events.on<CredentialStateChangedEvent>( CredentialEventTypes.CredentialStateChanged, @@ -262,6 +245,8 @@ export class AnonCredsCredentialsService { ), ); + const revocationRegistryIndex = await this.getNextRevocationIdx(t); + void t.credentials.offerCredential({ protocolVersion: 'v2', autoAcceptCredential: AutoAcceptCredential.Always, diff --git a/apps/ssi-abstraction/test/revocation.e2e-spec.ts b/apps/ssi-abstraction/test/revocation.e2e-spec.ts index 080f361586e732307e7e21d375b21baab00ee8da..394036189af05cd3b45c64d2a00d1b6d13df96c2 100644 --- a/apps/ssi-abstraction/test/revocation.e2e-spec.ts +++ b/apps/ssi-abstraction/test/revocation.e2e-spec.ts @@ -140,7 +140,7 @@ describe.skip('Revocation', () => { client.close(); }); - it( + xit( EventAnonCredsRevocationRegisterRevocationRegistryDefinition.token, async () => { const response$ = client.send<