From e6088307abc4946b93fc6bd4f039a8cbae264e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Rib=C3=B3?= Date: Tue, 30 Apr 2024 09:53:37 +0200 Subject: [PATCH] fix: rename prism-agent into edge-agent (#203) --- .../Agent.Credentials.ts | 0 .../Agent.DIDHigherFunctions.ts | 0 .../Agent.Invitations.ts | 0 .../Agent.MessageEvents.ts | 0 .../Agent.PrismKeyPathIndexTask.ts | 0 src/{prism-agent => edge-agent}/Agent.ts | 1 - .../connectionsManager/ConnectionsManager.ts | 0 .../helpers/ApiImpl.ts | 0 .../helpers/HttpError.ts | 0 .../helpers/ProtocolHelpers.ts | 0 .../helpers/Task.ts | 0 .../mediator/BasicMediatorHandler.ts | 0 .../mediator/PlutoMediatorStore.ts | 0 .../protocols/ProtocolTypes.ts | 0 .../connection/DIDCommConnectionRunner.ts | 0 .../protocols/connection/HandshakeRequest.ts | 0 .../invitation/v2/DIDCommInvitationRunner.ts | 0 .../invitation/v2/InvitationRunner.ts | 0 .../invitation/v2/OutOfBandInvitation.ts | 0 .../invitation/v2/OutOfBandParser.ts | 0 .../ClaimRequestSignatureJWT.ts | 0 .../issueCredential/CredentialFormat.ts | 0 .../issueCredential/CredentialPreview.ts | 0 .../issueCredential/IssueCredential.ts | 0 .../issueCredential/OfferCredential.ts | 0 .../issueCredential/ProposeCredential.ts | 0 .../issueCredential/RequestCredential.ts | 0 .../protocols/mediation/MediationGrant.ts | 0 .../mediation/MediationKeysUpdateList.ts | 0 .../protocols/mediation/MediationRequest.ts | 0 .../protocols/other/BasicMessage.ts | 0 .../protocols/pickup/PickupReceived.ts | 0 .../protocols/pickup/PickupRequest.ts | 0 .../protocols/pickup/PickupRunner.ts | 0 .../PrismOnboardingInvitation.ts | 0 .../proofPresentation/Presentation.ts | 0 .../proofPresentation/ProposePresentation.ts | 0 .../proofPresentation/RequestPresentation.ts | 0 .../protocols/proofPresentation/index.ts | 0 .../revocation/RevocationNotfiication.ts | 0 .../protocols/types.ts | 0 .../types/index.ts | 0 src/index.ts | 24 +++++++++---------- src/mercury/didcomm/Wrapper.ts | 2 +- src/pollux/Pollux.ts | 2 +- tests/agent/Agent.ConnectionsManager.test.ts | 24 +++++++++---------- tests/agent/Agent.functional.test.ts | 2 +- tests/agent/Agent.test.ts | 24 +++++++++---------- tests/agent/mocks/ConnectionManagerMock.ts | 6 ++--- .../connection/HandShakeRequest.test.ts | 6 ++--- .../v2/DIDCommInvitationRunner.test.ts | 2 +- .../issueCredential/IssueCredential.test.ts | 6 ++--- .../issueCredential/OfferCredential.test.ts | 4 ++-- .../issueCredential/ProposeCredential.test.ts | 4 ++-- .../issueCredential/RequestCredential.test.ts | 2 +- .../protocols/pickup/PickupRunner.test.ts | 2 +- .../PrismOnboardingInvitation.test.ts | 6 ++--- .../proofPresentation/Presentation.test.ts | 8 +++---- .../ProposePresentation.test.ts | 4 ++-- .../RequestPresentation.test.ts | 4 ++-- tests/fixtures/credentials/anoncreds.ts | 4 ++-- tests/fixtures/credentials/jwt.ts | 2 +- 62 files changed, 69 insertions(+), 70 deletions(-) rename src/{prism-agent => edge-agent}/Agent.Credentials.ts (100%) rename src/{prism-agent => edge-agent}/Agent.DIDHigherFunctions.ts (100%) rename src/{prism-agent => edge-agent}/Agent.Invitations.ts (100%) rename src/{prism-agent => edge-agent}/Agent.MessageEvents.ts (100%) rename src/{prism-agent => edge-agent}/Agent.PrismKeyPathIndexTask.ts (100%) rename src/{prism-agent => edge-agent}/Agent.ts (99%) rename src/{prism-agent => edge-agent}/connectionsManager/ConnectionsManager.ts (100%) rename src/{prism-agent => edge-agent}/helpers/ApiImpl.ts (100%) rename src/{prism-agent => edge-agent}/helpers/HttpError.ts (100%) rename src/{prism-agent => edge-agent}/helpers/ProtocolHelpers.ts (100%) rename src/{prism-agent => edge-agent}/helpers/Task.ts (100%) rename src/{prism-agent => edge-agent}/mediator/BasicMediatorHandler.ts (100%) rename src/{prism-agent => edge-agent}/mediator/PlutoMediatorStore.ts (100%) rename src/{prism-agent => edge-agent}/protocols/ProtocolTypes.ts (100%) rename src/{prism-agent => edge-agent}/protocols/connection/DIDCommConnectionRunner.ts (100%) rename src/{prism-agent => edge-agent}/protocols/connection/HandshakeRequest.ts (100%) rename src/{prism-agent => edge-agent}/protocols/invitation/v2/DIDCommInvitationRunner.ts (100%) rename src/{prism-agent => edge-agent}/protocols/invitation/v2/InvitationRunner.ts (100%) rename src/{prism-agent => edge-agent}/protocols/invitation/v2/OutOfBandInvitation.ts (100%) rename src/{prism-agent => edge-agent}/protocols/invitation/v2/OutOfBandParser.ts (100%) rename src/{prism-agent => edge-agent}/protocols/issueCredential/ClaimRequestSignatureJWT.ts (100%) rename src/{prism-agent => edge-agent}/protocols/issueCredential/CredentialFormat.ts (100%) rename src/{prism-agent => edge-agent}/protocols/issueCredential/CredentialPreview.ts (100%) rename src/{prism-agent => edge-agent}/protocols/issueCredential/IssueCredential.ts (100%) rename src/{prism-agent => edge-agent}/protocols/issueCredential/OfferCredential.ts (100%) rename src/{prism-agent => edge-agent}/protocols/issueCredential/ProposeCredential.ts (100%) rename src/{prism-agent => edge-agent}/protocols/issueCredential/RequestCredential.ts (100%) rename src/{prism-agent => edge-agent}/protocols/mediation/MediationGrant.ts (100%) rename src/{prism-agent => edge-agent}/protocols/mediation/MediationKeysUpdateList.ts (100%) rename src/{prism-agent => edge-agent}/protocols/mediation/MediationRequest.ts (100%) rename src/{prism-agent => edge-agent}/protocols/other/BasicMessage.ts (100%) rename src/{prism-agent => edge-agent}/protocols/pickup/PickupReceived.ts (100%) rename src/{prism-agent => edge-agent}/protocols/pickup/PickupRequest.ts (100%) rename src/{prism-agent => edge-agent}/protocols/pickup/PickupRunner.ts (100%) rename src/{prism-agent => edge-agent}/protocols/prismOnboarding/PrismOnboardingInvitation.ts (100%) rename src/{prism-agent => edge-agent}/protocols/proofPresentation/Presentation.ts (100%) rename src/{prism-agent => edge-agent}/protocols/proofPresentation/ProposePresentation.ts (100%) rename src/{prism-agent => edge-agent}/protocols/proofPresentation/RequestPresentation.ts (100%) rename src/{prism-agent => edge-agent}/protocols/proofPresentation/index.ts (100%) rename src/{prism-agent => edge-agent}/protocols/revocation/RevocationNotfiication.ts (100%) rename src/{prism-agent => edge-agent}/protocols/types.ts (100%) rename src/{prism-agent => edge-agent}/types/index.ts (100%) diff --git a/src/prism-agent/Agent.Credentials.ts b/src/edge-agent/Agent.Credentials.ts similarity index 100% rename from src/prism-agent/Agent.Credentials.ts rename to src/edge-agent/Agent.Credentials.ts diff --git a/src/prism-agent/Agent.DIDHigherFunctions.ts b/src/edge-agent/Agent.DIDHigherFunctions.ts similarity index 100% rename from src/prism-agent/Agent.DIDHigherFunctions.ts rename to src/edge-agent/Agent.DIDHigherFunctions.ts diff --git a/src/prism-agent/Agent.Invitations.ts b/src/edge-agent/Agent.Invitations.ts similarity index 100% rename from src/prism-agent/Agent.Invitations.ts rename to src/edge-agent/Agent.Invitations.ts diff --git a/src/prism-agent/Agent.MessageEvents.ts b/src/edge-agent/Agent.MessageEvents.ts similarity index 100% rename from src/prism-agent/Agent.MessageEvents.ts rename to src/edge-agent/Agent.MessageEvents.ts diff --git a/src/prism-agent/Agent.PrismKeyPathIndexTask.ts b/src/edge-agent/Agent.PrismKeyPathIndexTask.ts similarity index 100% rename from src/prism-agent/Agent.PrismKeyPathIndexTask.ts rename to src/edge-agent/Agent.PrismKeyPathIndexTask.ts diff --git a/src/prism-agent/Agent.ts b/src/edge-agent/Agent.ts similarity index 99% rename from src/prism-agent/Agent.ts rename to src/edge-agent/Agent.ts index d28b7dde5..2e4b53b06 100644 --- a/src/prism-agent/Agent.ts +++ b/src/edge-agent/Agent.ts @@ -32,7 +32,6 @@ import { RequestPresentation } from "./protocols/proofPresentation/RequestPresen import { DIDCommWrapper } from "../mercury/didcomm/Wrapper"; import { PublicMediatorStore } from "./mediator/PlutoMediatorStore"; import { BasicMediatorHandler } from "./mediator/BasicMediatorHandler"; -import { ProofTypes } from "./protocols/types"; enum AgentState { STOPPED = "stopped", diff --git a/src/prism-agent/connectionsManager/ConnectionsManager.ts b/src/edge-agent/connectionsManager/ConnectionsManager.ts similarity index 100% rename from src/prism-agent/connectionsManager/ConnectionsManager.ts rename to src/edge-agent/connectionsManager/ConnectionsManager.ts diff --git a/src/prism-agent/helpers/ApiImpl.ts b/src/edge-agent/helpers/ApiImpl.ts similarity index 100% rename from src/prism-agent/helpers/ApiImpl.ts rename to src/edge-agent/helpers/ApiImpl.ts diff --git a/src/prism-agent/helpers/HttpError.ts b/src/edge-agent/helpers/HttpError.ts similarity index 100% rename from src/prism-agent/helpers/HttpError.ts rename to src/edge-agent/helpers/HttpError.ts diff --git a/src/prism-agent/helpers/ProtocolHelpers.ts b/src/edge-agent/helpers/ProtocolHelpers.ts similarity index 100% rename from src/prism-agent/helpers/ProtocolHelpers.ts rename to src/edge-agent/helpers/ProtocolHelpers.ts diff --git a/src/prism-agent/helpers/Task.ts b/src/edge-agent/helpers/Task.ts similarity index 100% rename from src/prism-agent/helpers/Task.ts rename to src/edge-agent/helpers/Task.ts diff --git a/src/prism-agent/mediator/BasicMediatorHandler.ts b/src/edge-agent/mediator/BasicMediatorHandler.ts similarity index 100% rename from src/prism-agent/mediator/BasicMediatorHandler.ts rename to src/edge-agent/mediator/BasicMediatorHandler.ts diff --git a/src/prism-agent/mediator/PlutoMediatorStore.ts b/src/edge-agent/mediator/PlutoMediatorStore.ts similarity index 100% rename from src/prism-agent/mediator/PlutoMediatorStore.ts rename to src/edge-agent/mediator/PlutoMediatorStore.ts diff --git a/src/prism-agent/protocols/ProtocolTypes.ts b/src/edge-agent/protocols/ProtocolTypes.ts similarity index 100% rename from src/prism-agent/protocols/ProtocolTypes.ts rename to src/edge-agent/protocols/ProtocolTypes.ts diff --git a/src/prism-agent/protocols/connection/DIDCommConnectionRunner.ts b/src/edge-agent/protocols/connection/DIDCommConnectionRunner.ts similarity index 100% rename from src/prism-agent/protocols/connection/DIDCommConnectionRunner.ts rename to src/edge-agent/protocols/connection/DIDCommConnectionRunner.ts diff --git a/src/prism-agent/protocols/connection/HandshakeRequest.ts b/src/edge-agent/protocols/connection/HandshakeRequest.ts similarity index 100% rename from src/prism-agent/protocols/connection/HandshakeRequest.ts rename to src/edge-agent/protocols/connection/HandshakeRequest.ts diff --git a/src/prism-agent/protocols/invitation/v2/DIDCommInvitationRunner.ts b/src/edge-agent/protocols/invitation/v2/DIDCommInvitationRunner.ts similarity index 100% rename from src/prism-agent/protocols/invitation/v2/DIDCommInvitationRunner.ts rename to src/edge-agent/protocols/invitation/v2/DIDCommInvitationRunner.ts diff --git a/src/prism-agent/protocols/invitation/v2/InvitationRunner.ts b/src/edge-agent/protocols/invitation/v2/InvitationRunner.ts similarity index 100% rename from src/prism-agent/protocols/invitation/v2/InvitationRunner.ts rename to src/edge-agent/protocols/invitation/v2/InvitationRunner.ts diff --git a/src/prism-agent/protocols/invitation/v2/OutOfBandInvitation.ts b/src/edge-agent/protocols/invitation/v2/OutOfBandInvitation.ts similarity index 100% rename from src/prism-agent/protocols/invitation/v2/OutOfBandInvitation.ts rename to src/edge-agent/protocols/invitation/v2/OutOfBandInvitation.ts diff --git a/src/prism-agent/protocols/invitation/v2/OutOfBandParser.ts b/src/edge-agent/protocols/invitation/v2/OutOfBandParser.ts similarity index 100% rename from src/prism-agent/protocols/invitation/v2/OutOfBandParser.ts rename to src/edge-agent/protocols/invitation/v2/OutOfBandParser.ts diff --git a/src/prism-agent/protocols/issueCredential/ClaimRequestSignatureJWT.ts b/src/edge-agent/protocols/issueCredential/ClaimRequestSignatureJWT.ts similarity index 100% rename from src/prism-agent/protocols/issueCredential/ClaimRequestSignatureJWT.ts rename to src/edge-agent/protocols/issueCredential/ClaimRequestSignatureJWT.ts diff --git a/src/prism-agent/protocols/issueCredential/CredentialFormat.ts b/src/edge-agent/protocols/issueCredential/CredentialFormat.ts similarity index 100% rename from src/prism-agent/protocols/issueCredential/CredentialFormat.ts rename to src/edge-agent/protocols/issueCredential/CredentialFormat.ts diff --git a/src/prism-agent/protocols/issueCredential/CredentialPreview.ts b/src/edge-agent/protocols/issueCredential/CredentialPreview.ts similarity index 100% rename from src/prism-agent/protocols/issueCredential/CredentialPreview.ts rename to src/edge-agent/protocols/issueCredential/CredentialPreview.ts diff --git a/src/prism-agent/protocols/issueCredential/IssueCredential.ts b/src/edge-agent/protocols/issueCredential/IssueCredential.ts similarity index 100% rename from src/prism-agent/protocols/issueCredential/IssueCredential.ts rename to src/edge-agent/protocols/issueCredential/IssueCredential.ts diff --git a/src/prism-agent/protocols/issueCredential/OfferCredential.ts b/src/edge-agent/protocols/issueCredential/OfferCredential.ts similarity index 100% rename from src/prism-agent/protocols/issueCredential/OfferCredential.ts rename to src/edge-agent/protocols/issueCredential/OfferCredential.ts diff --git a/src/prism-agent/protocols/issueCredential/ProposeCredential.ts b/src/edge-agent/protocols/issueCredential/ProposeCredential.ts similarity index 100% rename from src/prism-agent/protocols/issueCredential/ProposeCredential.ts rename to src/edge-agent/protocols/issueCredential/ProposeCredential.ts diff --git a/src/prism-agent/protocols/issueCredential/RequestCredential.ts b/src/edge-agent/protocols/issueCredential/RequestCredential.ts similarity index 100% rename from src/prism-agent/protocols/issueCredential/RequestCredential.ts rename to src/edge-agent/protocols/issueCredential/RequestCredential.ts diff --git a/src/prism-agent/protocols/mediation/MediationGrant.ts b/src/edge-agent/protocols/mediation/MediationGrant.ts similarity index 100% rename from src/prism-agent/protocols/mediation/MediationGrant.ts rename to src/edge-agent/protocols/mediation/MediationGrant.ts diff --git a/src/prism-agent/protocols/mediation/MediationKeysUpdateList.ts b/src/edge-agent/protocols/mediation/MediationKeysUpdateList.ts similarity index 100% rename from src/prism-agent/protocols/mediation/MediationKeysUpdateList.ts rename to src/edge-agent/protocols/mediation/MediationKeysUpdateList.ts diff --git a/src/prism-agent/protocols/mediation/MediationRequest.ts b/src/edge-agent/protocols/mediation/MediationRequest.ts similarity index 100% rename from src/prism-agent/protocols/mediation/MediationRequest.ts rename to src/edge-agent/protocols/mediation/MediationRequest.ts diff --git a/src/prism-agent/protocols/other/BasicMessage.ts b/src/edge-agent/protocols/other/BasicMessage.ts similarity index 100% rename from src/prism-agent/protocols/other/BasicMessage.ts rename to src/edge-agent/protocols/other/BasicMessage.ts diff --git a/src/prism-agent/protocols/pickup/PickupReceived.ts b/src/edge-agent/protocols/pickup/PickupReceived.ts similarity index 100% rename from src/prism-agent/protocols/pickup/PickupReceived.ts rename to src/edge-agent/protocols/pickup/PickupReceived.ts diff --git a/src/prism-agent/protocols/pickup/PickupRequest.ts b/src/edge-agent/protocols/pickup/PickupRequest.ts similarity index 100% rename from src/prism-agent/protocols/pickup/PickupRequest.ts rename to src/edge-agent/protocols/pickup/PickupRequest.ts diff --git a/src/prism-agent/protocols/pickup/PickupRunner.ts b/src/edge-agent/protocols/pickup/PickupRunner.ts similarity index 100% rename from src/prism-agent/protocols/pickup/PickupRunner.ts rename to src/edge-agent/protocols/pickup/PickupRunner.ts diff --git a/src/prism-agent/protocols/prismOnboarding/PrismOnboardingInvitation.ts b/src/edge-agent/protocols/prismOnboarding/PrismOnboardingInvitation.ts similarity index 100% rename from src/prism-agent/protocols/prismOnboarding/PrismOnboardingInvitation.ts rename to src/edge-agent/protocols/prismOnboarding/PrismOnboardingInvitation.ts diff --git a/src/prism-agent/protocols/proofPresentation/Presentation.ts b/src/edge-agent/protocols/proofPresentation/Presentation.ts similarity index 100% rename from src/prism-agent/protocols/proofPresentation/Presentation.ts rename to src/edge-agent/protocols/proofPresentation/Presentation.ts diff --git a/src/prism-agent/protocols/proofPresentation/ProposePresentation.ts b/src/edge-agent/protocols/proofPresentation/ProposePresentation.ts similarity index 100% rename from src/prism-agent/protocols/proofPresentation/ProposePresentation.ts rename to src/edge-agent/protocols/proofPresentation/ProposePresentation.ts diff --git a/src/prism-agent/protocols/proofPresentation/RequestPresentation.ts b/src/edge-agent/protocols/proofPresentation/RequestPresentation.ts similarity index 100% rename from src/prism-agent/protocols/proofPresentation/RequestPresentation.ts rename to src/edge-agent/protocols/proofPresentation/RequestPresentation.ts diff --git a/src/prism-agent/protocols/proofPresentation/index.ts b/src/edge-agent/protocols/proofPresentation/index.ts similarity index 100% rename from src/prism-agent/protocols/proofPresentation/index.ts rename to src/edge-agent/protocols/proofPresentation/index.ts diff --git a/src/prism-agent/protocols/revocation/RevocationNotfiication.ts b/src/edge-agent/protocols/revocation/RevocationNotfiication.ts similarity index 100% rename from src/prism-agent/protocols/revocation/RevocationNotfiication.ts rename to src/edge-agent/protocols/revocation/RevocationNotfiication.ts diff --git a/src/prism-agent/protocols/types.ts b/src/edge-agent/protocols/types.ts similarity index 100% rename from src/prism-agent/protocols/types.ts rename to src/edge-agent/protocols/types.ts diff --git a/src/prism-agent/types/index.ts b/src/edge-agent/types/index.ts similarity index 100% rename from src/prism-agent/types/index.ts rename to src/edge-agent/types/index.ts diff --git a/src/index.ts b/src/index.ts index aa7a4a172..760d40f16 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,17 +6,17 @@ export * as Domain from "./domain"; export { default as Mercury } from "./mercury/Mercury"; export * from "./pluto"; export { default as Pollux } from "./pollux/Pollux"; -export { default as Agent } from "./prism-agent/Agent"; -export * from "./prism-agent/protocols/other/BasicMessage"; -export { IssueCredential } from "./prism-agent/protocols/issueCredential/IssueCredential"; -export { OfferCredential } from "./prism-agent/protocols/issueCredential/OfferCredential"; -export * from "./prism-agent/protocols/proofPresentation"; -export * from "./prism-agent/connectionsManager/ConnectionsManager"; -export * from "./prism-agent/mediator/BasicMediatorHandler"; -export * from "./prism-agent/mediator/PlutoMediatorStore"; +export { default as Agent } from "./edge-agent/Agent"; +export * from "./edge-agent/protocols/other/BasicMessage"; +export { IssueCredential } from "./edge-agent/protocols/issueCredential/IssueCredential"; +export { OfferCredential } from "./edge-agent/protocols/issueCredential/OfferCredential"; +export * from "./edge-agent/protocols/proofPresentation"; +export * from "./edge-agent/connectionsManager/ConnectionsManager"; +export * from "./edge-agent/mediator/BasicMediatorHandler"; +export * from "./edge-agent/mediator/PlutoMediatorStore"; export * from "./mercury/didcomm/Wrapper"; -export * from "./prism-agent/helpers/ApiImpl"; -export { ListenerKey } from "./prism-agent/types"; +export * from "./edge-agent/helpers/ApiImpl"; +export { ListenerKey } from "./edge-agent/types"; export * from './peer-did/PeerDID'; export type { MediatorHandler, @@ -26,9 +26,9 @@ export type { AgentInvitations, AgentDIDHigherFunctions, AgentMessageEvents, -} from "./prism-agent/types"; +} from "./edge-agent/types"; export type { DIDCommProtocol } from "./mercury/DIDCommProtocol"; -export * from "./prism-agent/protocols/types"; +export * from "./edge-agent/protocols/types"; export * from "./apollo/utils/Secp256k1PrivateKey"; export * from "./apollo/utils/Secp256k1PublicKey"; export * from "./apollo/utils/Secp256k1KeyPair"; diff --git a/src/mercury/didcomm/Wrapper.ts b/src/mercury/didcomm/Wrapper.ts index 532185646..f0596fe51 100644 --- a/src/mercury/didcomm/Wrapper.ts +++ b/src/mercury/didcomm/Wrapper.ts @@ -14,7 +14,7 @@ import { DIDCommSecretsResolver } from "./SecretsResolver"; import { DIDCommProtocol } from "../DIDCommProtocol"; import { MercuryError } from "../../domain/models/Errors"; -import { ProtocolType } from "../../prism-agent/protocols/ProtocolTypes"; +import { ProtocolType } from "../../edge-agent/protocols/ProtocolTypes"; export class DIDCommWrapper implements DIDCommProtocol { public static didcomm: typeof import("didcomm-node"); diff --git a/src/pollux/Pollux.ts b/src/pollux/Pollux.ts index bbd964428..ea98d7235 100644 --- a/src/pollux/Pollux.ts +++ b/src/pollux/Pollux.ts @@ -36,7 +36,7 @@ import { import { AnonCredsCredential } from "./models/AnonCredsVerifiableCredential"; import { JWTCredential } from "./models/JWTVerifiableCredential"; import { Anoncreds } from "../domain/models/Anoncreds"; -import { ApiImpl } from "../prism-agent/helpers/ApiImpl"; +import { ApiImpl } from "../edge-agent/helpers/ApiImpl"; import { PresentationRequest } from "./models/PresentationRequest"; import { Secp256k1PrivateKey } from "../apollo/utils/Secp256k1PrivateKey"; import { DescriptorPath } from "./utils/DescriptorPath"; diff --git a/tests/agent/Agent.ConnectionsManager.test.ts b/tests/agent/Agent.ConnectionsManager.test.ts index 2165efdd9..0dcd7225c 100644 --- a/tests/agent/Agent.ConnectionsManager.test.ts +++ b/tests/agent/Agent.ConnectionsManager.test.ts @@ -7,8 +7,8 @@ import SinonChai from "sinon-chai"; import { Apollo, BasicMediatorHandler, Castor, ConnectionsManager, MediatorStore, Pluto } from "../../src"; import { Curve, KeyTypes, Mercury, Service, ServiceEndpoint } from "../../src/domain"; import { MercuryStub } from "./mocks/MercuryMock"; -import { AgentCredentials } from "../../src/prism-agent/Agent.Credentials"; -import { AgentOptions } from "../../src/prism-agent/types"; +import { AgentCredentials } from "../../src/edge-agent/Agent.Credentials"; +import { AgentOptions } from "../../src/edge-agent/types"; chai.use(SinonChai); chai.use(chaiAsPromised); @@ -87,8 +87,8 @@ describe("ConnectionsManager tests", () => { new ServiceEndpoint("ws://localhost:12346") ) ]; - const ConnectionsManager = jest.requireActual('../../src/prism-agent/connectionsManager/ConnectionsManager').ConnectionsManager; - const BasicMediatorHandler = jest.requireActual('../../src/prism-agent/mediator/BasicMediatorHandler').BasicMediatorHandler; + const ConnectionsManager = jest.requireActual('../../src/edge-agent/connectionsManager/ConnectionsManager').ConnectionsManager; + const BasicMediatorHandler = jest.requireActual('../../src/edge-agent/mediator/BasicMediatorHandler').BasicMediatorHandler; jest.mock('isows', () => ({ WebSocket: jest.fn(() => ({ addEventListener: jest.fn(), @@ -123,8 +123,8 @@ describe("ConnectionsManager tests", () => { new ServiceEndpoint("ws://localhost:12346") ) ]; - const ConnectionsManager = jest.requireActual('../../src/prism-agent/connectionsManager/ConnectionsManager').ConnectionsManager; - const BasicMediatorHandler = jest.requireMock('../../src/prism-agent/mediator/BasicMediatorHandler').BasicMediatorHandler; + const ConnectionsManager = jest.requireActual('../../src/edge-agent/connectionsManager/ConnectionsManager').ConnectionsManager; + const BasicMediatorHandler = jest.requireMock('../../src/edge-agent/mediator/BasicMediatorHandler').BasicMediatorHandler; jest.mock('isows', () => ({ WebSocket: jest.fn(() => ({ addEventListener: jest.fn(), @@ -154,8 +154,8 @@ describe("ConnectionsManager tests", () => { new ServiceEndpoint("ws://localhost:12346") ) ]; - const ConnectionsManager = jest.requireActual('../../src/prism-agent/connectionsManager/ConnectionsManager').ConnectionsManager; - const BasicMediatorHandler = jest.requireMock('../../src/prism-agent/mediator/BasicMediatorHandler').BasicMediatorHandler; + const ConnectionsManager = jest.requireActual('../../src/edge-agent/connectionsManager/ConnectionsManager').ConnectionsManager; + const BasicMediatorHandler = jest.requireMock('../../src/edge-agent/mediator/BasicMediatorHandler').BasicMediatorHandler; jest.mock('isows', () => ({ WebSocket: jest.fn(() => ({ addEventListener: jest.fn(), @@ -190,8 +190,8 @@ describe("ConnectionsManager tests", () => { new ServiceEndpoint("ws://localhost:12346") ) ]; - const ConnectionsManager = jest.requireActual('../../src/prism-agent/connectionsManager/ConnectionsManager').ConnectionsManager; - const BasicMediatorHandler = jest.requireMock('../../src/prism-agent/mediator/BasicMediatorHandler').BasicMediatorHandler; + const ConnectionsManager = jest.requireActual('../../src/edge-agent/connectionsManager/ConnectionsManager').ConnectionsManager; + const BasicMediatorHandler = jest.requireMock('../../src/edge-agent/mediator/BasicMediatorHandler').BasicMediatorHandler; jest.mock('isows', () => ({ WebSocket: jest.fn(() => ({ addEventListener: jest.fn(), @@ -226,8 +226,8 @@ describe("ConnectionsManager tests", () => { new ServiceEndpoint("http://localhost:12346") ) ]; - const ConnectionsManager = jest.requireActual('../../src/prism-agent/connectionsManager/ConnectionsManager').ConnectionsManager; - const BasicMediatorHandler = jest.requireMock('../../src/prism-agent/mediator/BasicMediatorHandler').BasicMediatorHandler; + const ConnectionsManager = jest.requireActual('../../src/edge-agent/connectionsManager/ConnectionsManager').ConnectionsManager; + const BasicMediatorHandler = jest.requireMock('../../src/edge-agent/mediator/BasicMediatorHandler').BasicMediatorHandler; jest.mock('isows', () => ({ WebSocket: jest.fn(() => ({ addEventListener: jest.fn(), diff --git a/tests/agent/Agent.functional.test.ts b/tests/agent/Agent.functional.test.ts index cd2038d4a..ab92e1255 100644 --- a/tests/agent/Agent.functional.test.ts +++ b/tests/agent/Agent.functional.test.ts @@ -5,7 +5,7 @@ import chai from "chai"; import chaiAsPromised from "chai-as-promised"; import * as sinon from "sinon"; import SinonChai from "sinon-chai"; -import Agent from "../../src/prism-agent/Agent"; +import Agent from "../../src/edge-agent/Agent"; import { Pluto } from "../../src"; import { mockPluto } from "../fixtures/inmemory/factory"; import * as Fixtures from "../fixtures"; diff --git a/tests/agent/Agent.test.ts b/tests/agent/Agent.test.ts index b9dd95729..260b59862 100644 --- a/tests/agent/Agent.test.ts +++ b/tests/agent/Agent.test.ts @@ -5,7 +5,7 @@ import chai from "chai"; import chaiAsPromised from "chai-as-promised"; import * as sinon from "sinon"; import SinonChai from "sinon-chai"; -import Agent from "../../src/prism-agent/Agent"; +import Agent from "../../src/edge-agent/Agent"; import Mercury from "../../src/mercury/Mercury"; import * as UUIDLib from "@stablelib/uuid"; import Apollo from "../../src/apollo/Apollo"; @@ -30,27 +30,27 @@ import { import { DIDCommProtocol } from "../../src/mercury/DIDCommProtocol"; import { Castor as CastorType } from "../../src/domain/buildingBlocks/Castor"; import { AgentError } from "../../src/domain/models/Errors"; -import { HandshakeRequest } from "../../src/prism-agent/protocols/connection/HandshakeRequest"; -import { OfferCredential } from "../../src/prism-agent/protocols/issueCredential/OfferCredential"; -import { ProtocolType } from "../../src/prism-agent/protocols/ProtocolTypes"; -import { CredentialPreview } from "../../src/prism-agent/protocols/issueCredential/CredentialPreview"; -import { RequestCredential } from "../../src/prism-agent/protocols/issueCredential/RequestCredential"; -import { IssueCredential } from "../../src/prism-agent/protocols/issueCredential/IssueCredential"; +import { HandshakeRequest } from "../../src/edge-agent/protocols/connection/HandshakeRequest"; +import { OfferCredential } from "../../src/edge-agent/protocols/issueCredential/OfferCredential"; +import { ProtocolType } from "../../src/edge-agent/protocols/ProtocolTypes"; +import { CredentialPreview } from "../../src/edge-agent/protocols/issueCredential/CredentialPreview"; +import { RequestCredential } from "../../src/edge-agent/protocols/issueCredential/RequestCredential"; +import { IssueCredential } from "../../src/edge-agent/protocols/issueCredential/IssueCredential"; import { base64url } from "multiformats/bases/base64"; import Pollux from "../../src/pollux/Pollux"; import { AnoncredsLoader } from "../../src/pollux/AnoncredsLoader"; -import { RequestPresentation } from "../../src/prism-agent/protocols/proofPresentation/RequestPresentation"; -import { Presentation } from "../../src/prism-agent/protocols/proofPresentation/Presentation"; +import { RequestPresentation } from "../../src/edge-agent/protocols/proofPresentation/RequestPresentation"; +import { Presentation } from "../../src/edge-agent/protocols/proofPresentation/Presentation"; import { JWTCredential } from "../../src/pollux/models/JWTVerifiableCredential"; import { AnonCredsCredential } from "../../src/pollux/models/AnonCredsVerifiableCredential"; import InMemoryStore from "../fixtures/inmemory"; import { Pluto as IPluto } from "../../src/domain"; import { Pluto } from "../../src/pluto/Pluto"; -import { RevocationNotification } from "../../src/prism-agent/protocols/revocation/RevocationNotfiication"; -import { AgentCredentials } from "../../src/prism-agent/Agent.Credentials"; +import { RevocationNotification } from "../../src/edge-agent/protocols/revocation/RevocationNotfiication"; +import { AgentCredentials } from "../../src/edge-agent/Agent.Credentials"; import { BasicMediatorHandler, Castor, Store } from "../../src"; import { randomUUID } from "crypto"; -import { AgentDIDHigherFunctions } from "../../src/prism-agent/Agent.DIDHigherFunctions"; +import { AgentDIDHigherFunctions } from "../../src/edge-agent/Agent.DIDHigherFunctions"; import { JWT } from "../../src/pollux/utils/JWT"; diff --git a/tests/agent/mocks/ConnectionManagerMock.ts b/tests/agent/mocks/ConnectionManagerMock.ts index ccef8a27c..f21a0d1db 100644 --- a/tests/agent/mocks/ConnectionManagerMock.ts +++ b/tests/agent/mocks/ConnectionManagerMock.ts @@ -4,14 +4,14 @@ import { ConnectionsManager as ConnectionsManagerClass, EventCallback, MediatorHandler, -} from "../../../src/prism-agent/types"; +} from "../../../src/edge-agent/types"; import { Castor } from "../../../src/domain/buildingBlocks/Castor"; import { Mercury } from "../../../src/domain/buildingBlocks/Mercury"; import { Pluto } from "../../../src/domain/buildingBlocks/Pluto"; import { DIDPair } from "../../../src/domain/models/DIDPair"; -import { CancellableTask } from "../../../src/prism-agent/helpers/Task"; +import { CancellableTask } from "../../../src/edge-agent/helpers/Task"; import { DID, Mediator, Message, Pollux } from "../../../src/domain"; -import { AgentMessageEvents } from "../../../src/prism-agent/Agent.MessageEvents"; +import { AgentMessageEvents } from "../../../src/edge-agent/Agent.MessageEvents"; import { ConnectionsManager } from "../../../src"; diff --git a/tests/agent/protocols/connection/HandShakeRequest.test.ts b/tests/agent/protocols/connection/HandShakeRequest.test.ts index 19f781660..5ee56597a 100644 --- a/tests/agent/protocols/connection/HandShakeRequest.test.ts +++ b/tests/agent/protocols/connection/HandShakeRequest.test.ts @@ -1,9 +1,9 @@ import { expect } from "chai"; import { Message } from "../../../../src/domain"; -import { HandshakeRequest } from "../../../../src/prism-agent/protocols/connection/HandshakeRequest"; -import { ProtocolType } from "../../../../src/prism-agent/protocols/ProtocolTypes"; -import { HandshakeRequestBody } from "../../../../src/prism-agent/protocols/types"; +import { HandshakeRequest } from "../../../../src/edge-agent/protocols/connection/HandshakeRequest"; +import { ProtocolType } from "../../../../src/edge-agent/protocols/ProtocolTypes"; +import { HandshakeRequestBody } from "../../../../src/edge-agent/protocols/types"; import { DIDTest } from "../../helpers/DID"; describe("HandShakeRequest Test", () => { diff --git a/tests/agent/protocols/invitation/v2/DIDCommInvitationRunner.test.ts b/tests/agent/protocols/invitation/v2/DIDCommInvitationRunner.test.ts index 54c5ef8df..a2a152bab 100644 --- a/tests/agent/protocols/invitation/v2/DIDCommInvitationRunner.test.ts +++ b/tests/agent/protocols/invitation/v2/DIDCommInvitationRunner.test.ts @@ -4,7 +4,7 @@ import chaiAsPromised from "chai-as-promised"; import { Message } from "../../../../../src/domain"; import { Mercury } from "../../../../../src/domain/buildingBlocks/Mercury"; import { AgentError } from "../../../../../src/domain/models/Errors"; -import { DIDCommInvitationRunner } from "../../../../../src/prism-agent/protocols/invitation/v2/DIDCommInvitationRunner"; +import { DIDCommInvitationRunner } from "../../../../../src/edge-agent/protocols/invitation/v2/DIDCommInvitationRunner"; import { MercuryStub } from "../../../mocks/MercuryMock"; let mercury: Mercury; diff --git a/tests/agent/protocols/issueCredential/IssueCredential.test.ts b/tests/agent/protocols/issueCredential/IssueCredential.test.ts index 0a6d57b6e..c6c58c63a 100644 --- a/tests/agent/protocols/issueCredential/IssueCredential.test.ts +++ b/tests/agent/protocols/issueCredential/IssueCredential.test.ts @@ -4,9 +4,9 @@ import { AgentError } from "../../../../src/domain/models/Errors"; import { createIssueCredentialBody, IssueCredential, -} from "../../../../src/prism-agent/protocols/issueCredential/IssueCredential"; -import { RequestCredential } from "../../../../src/prism-agent/protocols/issueCredential/RequestCredential"; -import { ProtocolType } from "../../../../src/prism-agent/protocols/ProtocolTypes"; +} from "../../../../src/edge-agent/protocols/issueCredential/IssueCredential"; +import { RequestCredential } from "../../../../src/edge-agent/protocols/issueCredential/RequestCredential"; +import { ProtocolType } from "../../../../src/edge-agent/protocols/ProtocolTypes"; import { DIDTest } from "../../helpers/DID"; describe("IssueCredential", () => { diff --git a/tests/agent/protocols/issueCredential/OfferCredential.test.ts b/tests/agent/protocols/issueCredential/OfferCredential.test.ts index 3000ded0f..74f2f1888 100644 --- a/tests/agent/protocols/issueCredential/OfferCredential.test.ts +++ b/tests/agent/protocols/issueCredential/OfferCredential.test.ts @@ -4,8 +4,8 @@ import { AgentError } from "../../../../src/domain/models/Errors"; import { createOfferCredentialBody, OfferCredential, -} from "../../../../src/prism-agent/protocols/issueCredential/OfferCredential"; -import { ProtocolType } from "../../../../src/prism-agent/protocols/ProtocolTypes"; +} from "../../../../src/edge-agent/protocols/issueCredential/OfferCredential"; +import { ProtocolType } from "../../../../src/edge-agent/protocols/ProtocolTypes"; import { DIDTest } from "../../helpers/DID"; describe("OfferCredential", () => { diff --git a/tests/agent/protocols/issueCredential/ProposeCredential.test.ts b/tests/agent/protocols/issueCredential/ProposeCredential.test.ts index fbd5e8baf..ed1fbd517 100644 --- a/tests/agent/protocols/issueCredential/ProposeCredential.test.ts +++ b/tests/agent/protocols/issueCredential/ProposeCredential.test.ts @@ -5,8 +5,8 @@ import { AgentError } from "../../../../src/domain/models/Errors"; import { createProposeCredentialBody, ProposeCredential, -} from "../../../../src/prism-agent/protocols/issueCredential/ProposeCredential"; -import { ProtocolType } from "../../../../src/prism-agent/protocols/ProtocolTypes"; +} from "../../../../src/edge-agent/protocols/issueCredential/ProposeCredential"; +import { ProtocolType } from "../../../../src/edge-agent/protocols/ProtocolTypes"; import { DIDTest } from "../../helpers/DID"; describe("ProposeCredential", () => { diff --git a/tests/agent/protocols/issueCredential/RequestCredential.test.ts b/tests/agent/protocols/issueCredential/RequestCredential.test.ts index 8566af448..a630aca44 100644 --- a/tests/agent/protocols/issueCredential/RequestCredential.test.ts +++ b/tests/agent/protocols/issueCredential/RequestCredential.test.ts @@ -5,7 +5,7 @@ import { AgentError } from "../../../../src/domain/models/Errors"; import { createRequestCredentialBody, RequestCredential, -} from "../../../../src/prism-agent/protocols/issueCredential/RequestCredential"; +} from "../../../../src/edge-agent/protocols/issueCredential/RequestCredential"; import { DIDTest } from "../../helpers/DID"; describe("RequestCredential", () => { diff --git a/tests/agent/protocols/pickup/PickupRunner.test.ts b/tests/agent/protocols/pickup/PickupRunner.test.ts index 362383bc0..967c4845a 100644 --- a/tests/agent/protocols/pickup/PickupRunner.test.ts +++ b/tests/agent/protocols/pickup/PickupRunner.test.ts @@ -11,7 +11,7 @@ import { AttachmentDescriptor, Message, } from "../../../../src/domain"; -import { PickupRunner } from "../../../../src/prism-agent/protocols/pickup/PickupRunner"; +import { PickupRunner } from "../../../../src/edge-agent/protocols/pickup/PickupRunner"; chai.use(chaiAsPromised); diff --git a/tests/agent/protocols/prismOnboarding/PrismOnboardingInvitation.test.ts b/tests/agent/protocols/prismOnboarding/PrismOnboardingInvitation.test.ts index 102f3872b..45aabbed2 100644 --- a/tests/agent/protocols/prismOnboarding/PrismOnboardingInvitation.test.ts +++ b/tests/agent/protocols/prismOnboarding/PrismOnboardingInvitation.test.ts @@ -1,8 +1,8 @@ import { expect } from "chai"; import { AgentError } from "../../../../src/domain/models/Errors"; -import { PrismOnboardingInvitation } from "../../../../src/prism-agent/protocols/prismOnboarding/PrismOnboardingInvitation"; -import { ProtocolType } from "../../../../src/prism-agent/protocols/ProtocolTypes"; -import { PrismOnboardingInvitationBody } from "../../../../src/prism-agent/protocols/types"; +import { PrismOnboardingInvitation } from "../../../../src/edge-agent/protocols/prismOnboarding/PrismOnboardingInvitation"; +import { ProtocolType } from "../../../../src/edge-agent/protocols/ProtocolTypes"; +import { PrismOnboardingInvitationBody } from "../../../../src/edge-agent/protocols/types"; describe("PrismOnboardingInvitation Tests", () => { it("Should create a valid PrismOnboardingInvitation from json", async () => { diff --git a/tests/agent/protocols/proofPresentation/Presentation.test.ts b/tests/agent/protocols/proofPresentation/Presentation.test.ts index b67b02ef6..d75851bd9 100644 --- a/tests/agent/protocols/proofPresentation/Presentation.test.ts +++ b/tests/agent/protocols/proofPresentation/Presentation.test.ts @@ -1,10 +1,10 @@ import { expect } from "chai"; import { Message } from "../../../../src/domain"; import { AgentError } from "../../../../src/domain/models/Errors"; -import { ProtocolHelpers } from "../../../../src/prism-agent/helpers/ProtocolHelpers"; -import { Presentation } from "../../../../src/prism-agent/protocols/proofPresentation/Presentation"; -import { ProtocolType } from "../../../../src/prism-agent/protocols/ProtocolTypes"; -import { PresentationBody } from "../../../../src/prism-agent/protocols/types"; +import { ProtocolHelpers } from "../../../../src/edge-agent/helpers/ProtocolHelpers"; +import { Presentation } from "../../../../src/edge-agent/protocols/proofPresentation/Presentation"; +import { ProtocolType } from "../../../../src/edge-agent/protocols/ProtocolTypes"; +import { PresentationBody } from "../../../../src/edge-agent/protocols/types"; import { DIDTest } from "../../helpers/DID"; describe("ProofPresentation->Presentation Tests", () => { diff --git a/tests/agent/protocols/proofPresentation/ProposePresentation.test.ts b/tests/agent/protocols/proofPresentation/ProposePresentation.test.ts index 2579b79b1..2d5d7289d 100644 --- a/tests/agent/protocols/proofPresentation/ProposePresentation.test.ts +++ b/tests/agent/protocols/proofPresentation/ProposePresentation.test.ts @@ -1,8 +1,8 @@ import { expect } from "chai"; import { Message } from "../../../../src/domain"; import { AgentError } from "../../../../src/domain/models/Errors"; -import { ProposePresentation } from "../../../../src/prism-agent/protocols/proofPresentation/ProposePresentation"; -import { RequestPresentation } from "../../../../src/prism-agent/protocols/proofPresentation/RequestPresentation"; +import { ProposePresentation } from "../../../../src/edge-agent/protocols/proofPresentation/ProposePresentation"; +import { RequestPresentation } from "../../../../src/edge-agent/protocols/proofPresentation/RequestPresentation"; import { DIDTest } from "../../helpers/DID"; describe("ProofPresentation->ProposePresentation Tests", () => { diff --git a/tests/agent/protocols/proofPresentation/RequestPresentation.test.ts b/tests/agent/protocols/proofPresentation/RequestPresentation.test.ts index 4e25ec8f5..5e7ba4876 100644 --- a/tests/agent/protocols/proofPresentation/RequestPresentation.test.ts +++ b/tests/agent/protocols/proofPresentation/RequestPresentation.test.ts @@ -1,8 +1,8 @@ import { expect } from "chai"; import { Message } from "../../../../src/domain"; import { AgentError } from "../../../../src/domain/models/Errors"; -import { ProposePresentation } from "../../../../src/prism-agent/protocols/proofPresentation/ProposePresentation"; -import { RequestPresentation } from "../../../../src/prism-agent/protocols/proofPresentation/RequestPresentation"; +import { ProposePresentation } from "../../../../src/edge-agent/protocols/proofPresentation/ProposePresentation"; +import { RequestPresentation } from "../../../../src/edge-agent/protocols/proofPresentation/RequestPresentation"; import { DIDTest } from "../../helpers/DID"; describe("ProofPresentation->RequestPresentation Tests", () => { diff --git a/tests/fixtures/credentials/anoncreds.ts b/tests/fixtures/credentials/anoncreds.ts index 88fa7b0bb..6b1c5ae44 100644 --- a/tests/fixtures/credentials/anoncreds.ts +++ b/tests/fixtures/credentials/anoncreds.ts @@ -1,6 +1,6 @@ import { Anoncreds, AttachmentDescriptor, LinkSecret } from "../../../src/domain"; -import { ProtocolType } from "../../../src/prism-agent/protocols/ProtocolTypes"; -import { OfferCredential } from "../../../src/prism-agent/protocols/issueCredential/OfferCredential"; +import { ProtocolType } from "../../../src/edge-agent/protocols/ProtocolTypes"; +import { OfferCredential } from "../../../src/edge-agent/protocols/issueCredential/OfferCredential"; import { list } from "../dids"; export const linkSecret = new LinkSecret("11713282333014162675185775227133916651856831195832037281552411830422122210216"); diff --git a/tests/fixtures/credentials/jwt.ts b/tests/fixtures/credentials/jwt.ts index be8765ab1..26d398052 100644 --- a/tests/fixtures/credentials/jwt.ts +++ b/tests/fixtures/credentials/jwt.ts @@ -1,6 +1,6 @@ import Apollo from "../../../src/apollo"; import { AttachmentDescriptor, JWTCredentialPayload, W3CVerifiableCredential, W3CVerifiableCredentialContext, W3CVerifiableCredentialType } from "../../../src/domain"; -import { OfferCredential } from "../../../src/prism-agent/protocols/issueCredential/OfferCredential"; +import { OfferCredential } from "../../../src/edge-agent/protocols/issueCredential/OfferCredential"; import { list } from "../dids"; const apollo = new Apollo();