diff --git a/integration-tests/e2e-tests/src/abilities/WalletSdk.ts b/integration-tests/e2e-tests/src/abilities/WalletSdk.ts index be5851693..4f67b222f 100644 --- a/integration-tests/e2e-tests/src/abilities/WalletSdk.ts +++ b/integration-tests/e2e-tests/src/abilities/WalletSdk.ts @@ -5,7 +5,6 @@ import { CloudAgentConfiguration } from "../configuration/CloudAgentConfiguratio import InMemoryStore from "../configuration/inmemory" import { randomUUID, UUID } from "crypto" -const { Agent, Apollo, Domain, ListenerKey, } = SDK // fallback in any case of dangling sdk agents export const agentList: Map = new Map() @@ -15,7 +14,7 @@ export class WalletSdk extends Ability implements Initialisable, Discardable { store: SDK.Store messages: MessageQueue = new MessageQueue() id: UUID = randomUUID() - + static async withANewInstance(): Promise { return new WalletSdk() } @@ -85,6 +84,7 @@ export class WalletSdk extends Ability implements Initialisable, Discardable { } async createSdk(seed: SDK.Domain.Seed = undefined) { + const { Agent, Apollo, Domain, ListenerKey, } = SDK const apollo = new Apollo() this.store = new SDK.Store({ name: [...Array(30)].map(() => Math.random().toString(36)[2]).join(""), diff --git a/integration-tests/e2e-tests/src/workflow/EdgeAgentWorkflow.ts b/integration-tests/e2e-tests/src/workflow/EdgeAgentWorkflow.ts index 0bd551689..f4b334c32 100644 --- a/integration-tests/e2e-tests/src/workflow/EdgeAgentWorkflow.ts +++ b/integration-tests/e2e-tests/src/workflow/EdgeAgentWorkflow.ts @@ -7,7 +7,6 @@ import { randomUUID } from "crypto" import _ from "lodash" import { assert } from "chai" -const { IssueCredential, OfferCredential, RequestPresentation, Presentation } = SDK export class EdgeAgentWorkflow { @@ -40,6 +39,7 @@ export class EdgeAgentWorkflow { } static async processIssuedCredential(edgeAgent: Actor, recordId: string) { + const { IssueCredential } = SDK; await edgeAgent.attemptsTo( WalletSdk.execute(async (sdk, messages) => { const issuedCredential = messages.issuedCredentialStack.shift()! @@ -51,6 +51,8 @@ export class EdgeAgentWorkflow { } static async acceptCredential(edgeAgent: Actor) { + const { OfferCredential } = SDK + await edgeAgent.attemptsTo( WalletSdk.execute(async (sdk, messages) => { const message = OfferCredential.fromMessage(messages.credentialOfferStack.shift()!) @@ -75,6 +77,8 @@ export class EdgeAgentWorkflow { } static async presentVerificationRequest(edgeAgent: Actor) { + const { RequestPresentation } = SDK + await edgeAgent.attemptsTo( WalletSdk.execute(async (sdk, messages) => { const credentials = await sdk.verifiableCredentials() @@ -96,6 +100,8 @@ export class EdgeAgentWorkflow { } static async verifyPresentation(edgeAgent: Actor, expected: boolean = true) { + const { Presentation } = SDK + await edgeAgent.attemptsTo( WalletSdk.execute(async (sdk, messages) => { const presentation = messages.presentationMessagesStack.shift()! @@ -117,6 +123,7 @@ export class EdgeAgentWorkflow { } static async tryToPresentVerificationRequestWithWrongAnoncred(edgeAgent: Actor) { + const { RequestPresentation } = SDK await edgeAgent.attemptsTo( WalletSdk.execute(async (sdk, messages) => { const credentials = await sdk.verifiableCredentials() @@ -135,6 +142,8 @@ export class EdgeAgentWorkflow { } static async presentProof(edgeAgent: Actor) { + const { RequestPresentation } = SDK + await edgeAgent.attemptsTo( WalletSdk.execute(async (sdk, messages) => { const credentials = await sdk.verifiableCredentials()