Token Functions
How to use Token model using mitumjs SDK.
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()
orcontract.createWallet()
, and useoperation.sign()
andoperation.send()
, or usecontract.touch()
to sign and send at once.)Create a register token operation using function
registerModel()
of token class.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 usinggetBalance()
)The owner of the contract-account can mint the new token. Use the function
mint()
to make raw operation.Sign and send the operation to Mitum network.
Last updated