Point Functions

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

  3. Sign and send the operation to Mitum network. Then the initial point is generated and belong to the owner of contract. (You can check whether the point 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 point. Use the function mint() to make raw operation.

  5. Sign and send the operation to Mitum network.

Last updated