Skip to content

Commit

Permalink
fix: rename prism-agent into edge-agent (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
elribonazo authored Apr 30, 2024
1 parent 4080d78 commit e608830
Show file tree
Hide file tree
Showing 62 changed files with 69 additions and 70 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion src/prism-agent/Agent.ts → src/edge-agent/Agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 12 additions & 12 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion src/mercury/didcomm/Wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/pollux/Pollux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
24 changes: 12 additions & 12 deletions tests/agent/Agent.ConnectionsManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion tests/agent/Agent.functional.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
24 changes: 12 additions & 12 deletions tests/agent/Agent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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";


Expand Down
6 changes: 3 additions & 3 deletions tests/agent/mocks/ConnectionManagerMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";


Expand Down
6 changes: 3 additions & 3 deletions tests/agent/protocols/connection/HandShakeRequest.test.ts
Original file line number Diff line number Diff line change
@@ -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", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions tests/agent/protocols/issueCredential/IssueCredential.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down
4 changes: 2 additions & 2 deletions tests/agent/protocols/issueCredential/OfferCredential.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/agent/protocols/pickup/PickupRunner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
@@ -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 () => {
Expand Down
8 changes: 4 additions & 4 deletions tests/agent/protocols/proofPresentation/Presentation.test.ts
Original file line number Diff line number Diff line change
@@ -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", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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", () => {
Expand Down
Loading

0 comments on commit e608830

Please sign in to comment.