updateDocument(contract, sender, document, currency)

Feature

Return raw operation that update exist did document.

Parameters

string contract Address,

string sender,

document document, //document must in document type.

string currency ID

Return Value

object update did document operation

[ parameter did document structure ]
{
    _hint: "mitum-did-document”,
    "@context": string,
    id: string,
    authentication: (asymkeyAuth | socialLoginAuth)[],
    verificationMethod: [],
    service: {
        id: string,
        type: string,
        service_end_point: string
    }
}

type asymkeyAuth = {
    _hint: "mitum-did-asymmetric-key-authentication”,
    id: string,
    authType: "EcdsaSecp256k1VerificationKey2019",
    controller: string,
    publicKey: string,
}

type socialLoginAuth = {
    _hint: "mitum-did-social-login-authentication”,
    id: string,
    authType: "VerifiableCredential",
    controller: string,
    serviceEndpoint: string,
    proof: {
        verificationMethod: string
    }
}

example1. Case of using document in object (json) format

example2. Case of using getDDocByDID and fix authentication info.

Last updated