Token Functions

How to use Token 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 register token operation using function registerModel() of token class.

  3. Sign and send the operation to Mitum network. Then the initial token is generated and belong to the operation sender. (You can check whether the token information has been properly registered using the getModelInfo() function. Also you can check the balance using getBalance())

  4. The owner of the contract-account can mint the new token. Use the function mint() to make raw operation.

  5. Sign and send the operation to Mitum network.

Last updated