mint(receiver, currency, amount)

Feature

Return raw operation for increasing the total supply of a particular currency. Signature of nodes is required, not a general account signature.

Parameters

string receiver address, string currency ID, int amount

Return Value

object inflation operation

example

const receiver = "0x626410F061e62d79294f82603b872Db7d1711Bf7fca";
const currencyID = "MCC";
const amount = 100000000;

const rawOperation = mitum.currency.mint(receiver, currencyID, amount);
console.log(rawOperation);

// output
Operation {
  id: 'mitum',
  fact: MintFact {
    hint: Hint { s: 'mitum-currency-mint-operation-fact' },
    token: Token { s: '2023-09-22 08:56:04.087 +0000 UTC' },
    _hash: <Buffer 59 ac ce 26 b7 89 55 c0 2f 5f d2 c6 90 fd 41 42 b4 ed ba 0f c1 e5 e9 b2 b8 ee 03 de 38 d9 56 3e>,
    items: [ [MintItem] ]
  },
  hint: Hint { s: 'mitum-currency-mint-operation' },
  _factSigns: [],
  _hash: <Buffer >
}

Last updated