create(contract, sender, authType, publicKey, serviceType, serviceEndPoints, currency)

Feature

Return raw operation to create new did and did document. Note: Contract account must be deployed on the mitum network. Handler of contract also can execute the function.

Parameters

string contract Address,

string sender,

string currency ID

Return Value

object register model operation

example

const sender = "0x4526f3D0EdC63D9EaeCD94D56551e0f061CFCa47fca";
const currencyID = "MCC";
const contract = "0x99e749E6e00fc6BA3E965881589D185cc5B447d4fca";
const operation = mitum.authdid.create(contract, sender, currencyID);
console.log(operation);

// output
Operation {
  id: 'mitum',
  fact: CreateFact {
    hint: Hint { s: 'mitum-did-create-did-operation-fact-v0.0.1' },
    token: Token { s: '2026-01-27 09:02:56.261 +0000 UTC' },
    _hash: <Buffer c1 6b a0 74 93 3f 29 b8 ec d8 4b bb 1b 8e ee 91 dc be ed 97 53 00 be 74 3f cc 5b 53 cd 34 98 b4>,
    sender: Address {
      s: '0x4526f3D0EdC63D9EaeCD94D56551e0f061CFCa47fca',
      type: 'mitum'
    },
    contract: Address {
      s: '0x99e749E6e00fc6BA3E965881589D185cc5B447d4fca',
      type: 'mitum'
    },
    currency: CurrencyID { s: 'MCC' }
  },
  hint: Hint { s: 'mitum-did-create-did-operation-v0.0.1' },
  _factSigns: [],
  _hash: <Buffer >
}

Last updated