mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
linter fixes
This commit is contained in:
parent
cfda1e6130
commit
879921ec0a
@ -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<DDO>) {
|
||||
this.created = (ddo && ddo.created) || new Date(Date.now()).toISOString().replace(/\.[0-9]{3}/, "")
|
||||
|
@ -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<agreementPreparionResult>} Agreement ID and signaturee.
|
||||
* @return {Promise<AgreementPreparionResult>} Agreement ID and signaturee.
|
||||
*/
|
||||
public async prepare(
|
||||
did: string,
|
||||
serviceDefinitionId: string,
|
||||
consumer: Account,
|
||||
): Promise<agreementPreparionResult> {
|
||||
): Promise<AgreementPreparionResult> {
|
||||
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user