From d4b6366a4a5626b16da8cdb39e0276782b1f7c86 Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Wed, 5 Dec 2018 12:40:38 +0100 Subject: [PATCH] latest adoption --- src/ddo/DDO.ts | 2 +- src/ddo/PublicKey.ts | 2 +- src/ocean/Ocean.ts | 9 ++------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/ddo/DDO.ts b/src/ddo/DDO.ts index 2158d37..49b447f 100644 --- a/src/ddo/DDO.ts +++ b/src/ddo/DDO.ts @@ -22,7 +22,7 @@ export default class DDO { public constructor(ddo?: { id?: string, - publicKey?: any[], + publicKey?: PublicKey[], authentication?: Authentication[], service?: Service[], }) { diff --git a/src/ddo/PublicKey.ts b/src/ddo/PublicKey.ts index 4de771c..81bf2f6 100644 --- a/src/ddo/PublicKey.ts +++ b/src/ddo/PublicKey.ts @@ -1,6 +1,6 @@ export default class PublicKey { public id: string = "did:op:123456789abcdefghi#keys-1" - public type: string = "RsaVerificationKey2018" + public type: string = "Ed25519VerificationKey2018" public owner: string = "did:op:123456789abcdefghi" public publicKeyPem?: string = "-----BEGIN PUBLIC KEY...END PUBLIC KEY-----\r\n" public publicKeyBase58?: string = "H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV" diff --git a/src/ocean/Ocean.ts b/src/ocean/Ocean.ts index fcd2ce4..80d1b26 100644 --- a/src/ocean/Ocean.ts +++ b/src/ocean/Ocean.ts @@ -9,6 +9,7 @@ import DDO from "../ddo/DDO" import Event from "../ddo/Event" import EventHandlers from "../ddo/EventHandlers" import MetaData from "../ddo/MetaData" +import PublicKey from "../ddo/PublicKey" import Service from "../ddo/Service" import ContractEvent from "../keeper/Event" import Keeper from "../keeper/Keeper" @@ -90,16 +91,10 @@ export default class Ocean { publicKey: [ { id: did + "#keys-1", - }, - { type: "Ed25519VerificationKey2018", - }, - { owner: did, - }, - { publicKeyBase58: await publisher.getPublicKey(), - }, + } as PublicKey, ], service: [ {