registerModel(contract, sender, didMethod, currency)

Feature

Return raw operation for creating new did-registry model. 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 didMethod, string currency ID

Return Value

object register model operation

example

const sender = "0x4526f3D0EdC63D9EaeCD94D56551e0f061CFCa47fca";
const contract = "0x99e749E6e00fc6BA3E965881589D185cc5B447d4fca";
const didMethod = "mitum";
const currencyID = "MCC";

const operation = mitum.authdid.registerModel(contract, sender, didMethod, currencyID);
console.log(operation)

// output
Operation {
  id: 'mitum',
  fact: RegisterModelFact {
    hint: Hint { s: 'mitum-did-register-model-operation-fact' },
    token: Token { s: '2024-12-05 00:57:08.678 +0000 UTC' },
    _hash: <Buffer e4 fa 03 63 6e e6 d7 70 74 1f 96 1d c4 76 58 82 c6 81 40 8b 88 24 4e 08 39 4b dd 14 da 4c 2d 65>,
    sender: Address {
      s: '0x4526f3D0EdC63D9EaeCD94D56551e0f061CFCa47fca',
      type: 'mitum'
    },
    contract: Address {
      s: '0x99e749E6e00fc6BA3E965881589D185cc5B447d4fca',
      type: 'mitum'
    },
    currency: CurrencyID { s: 'MCC' },
    didMethod: LongString { s: 'mitum' }
  },
  hint: Hint { s: 'mitum-did-register-model-operation' },
  _factSigns: [],
  _hash: <Buffer >
}

Last updated