diff --git a/src/ddo/DDO.ts b/src/ddo/DDO.ts index 2852921..0be52d6 100644 --- a/src/ddo/DDO.ts +++ b/src/ddo/DDO.ts @@ -38,12 +38,12 @@ export class DDO { * DID, descentralized ID. * @type {string} */ - id: string - created: string - publicKey: PublicKey[] - authentication: Authentication[] - service: Service[] - proof: Proof + public id: string + public created: string + public publicKey: PublicKey[] + public authentication: Authentication[] + public service: Service[] + public proof: Proof public constructor(ddo?: Partial) { this.created = (ddo && ddo.created) || new Date(Date.now()).toISOString().replace(/\.[0-9]{3}/, "") diff --git a/src/ocean/OceanAgreements.ts b/src/ocean/OceanAgreements.ts index 1ff1053..674170c 100644 --- a/src/ocean/OceanAgreements.ts +++ b/src/ocean/OceanAgreements.ts @@ -1,11 +1,14 @@ import AquariusProvider from "../aquarius/AquariusProvider" +import BrizoProvider from "../brizo/BrizoProvider" import Account from "./Account" import DID from "./DID" -import ServiceAgreement from "./ServiceAgreements/ServiceAgreement" import IdGenerator from "./IdGenerator" -import BrizoProvider from "../brizo/BrizoProvider" +import ServiceAgreement from "./ServiceAgreements/ServiceAgreement" -export type agreementPreparionResult = {agreementId: string, signature: string} +export interface AgreementPreparionResult { + agreementId: string + signature: string +} /** * Agreements submodule of Ocean Protocol. @@ -35,13 +38,13 @@ export default class OceanAgreements { * @param {string} did Decentralized ID. * @param {string} serviceDefinitionId Service definition ID. * @param {Account} consumer Consumer account. - * @return {Promise} Agreement ID and signaturee. + * @return {Promise} Agreement ID and signaturee. */ public async prepare( did: string, serviceDefinitionId: string, consumer: Account, - ): Promise { + ): Promise { const d: DID = DID.parse(did as string) const ddo = await AquariusProvider.getAquarius().retrieveDDO(d) @@ -52,7 +55,6 @@ export default class OceanAgreements { return {agreementId, signature} } - /** * Submit a service agreement to the publisher to create the agreement on-chain. * @param {string} did Decentralized ID.