transfer(contract, sender, currency, receiver, amount)

Feature
Returns raw operation to transfer given amount of token to receiver.

Parameters

string contract address, string sender, string currency ID, string receiver, string | int amount

Return Value

object transfer token operation

example

const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const sender = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const currencyID = "MCC"
const reciever = "0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca";
const amount = 100;

const Operation = mitum.token.transfer(contractAddress, sender, currencyID, reciever, amount);
console.log(Operation);

// output
BaseOperation {
  id: 'mitum',
  fact: TransferFact {
    hint: Hint { s: 'mitum-token-transfer-operation-fact' },
    token: Token { s: '2026-02-19 03:09:58.115 +0000 UTC' },
    _hash: <Buffer 5a e5 69 a4 52 74 e1 ce 62 cf 43 1f 6a 16 16 d7 61 82 7d 08 9b 48 fc f9 38 c0 d9 fc 34 d8 8a 7f>,
    sender: Address {
      s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
      type: 'mitum'
    },
    items: [ [TransferItem] ]
  },
  hint: Hint { s: 'mitum-token-transfer-operation' },
  _factSigns: [],
  _hash: <Buffer >
}

Last updated