Credential Functions

How to use credential model using mitumjs SDK.

  1. Create a contract-account first using function of contract class. The account must be deployed on the Mitum network. (Create an operation with contract.createAccount() or contract.createWallet(), and use operation.sign() and operation.send(), or use contract.touch() to sign and send at once.)

  2. Create a new credential model operation using function registerModel() of credential class.

  3. Sign and send the operation to Mitum network. (check with getModelInfo())

  4. The owner of the contract-account can add template for credential. Use the function addTemplate() to make raw operation.

  5. Sign and send the operation to Mitum network. (check with getTemplate())

  6. The owner of the contract-account can issue a new credential. Use the function issue() to make raw operation. (Also possible to revoke the credential with revoke())

  7. Sign and send the operation to Mitum network.

  8. The user can verify the credential using the function getByHolder().

Last updated