transfer(sender, receiver, currency, amount)
Feature
Return raw operation for transferring currency.
Parameters
string
sender address,
string
receiver address,
string
currency ID,
int
| string
amount
Return Value
object
transfer operation
example
const sender = "0x517ffA55D06AaEc6Fa9d27B54e21ebfeb58Ff692fca";
const receiver = "0xdCA5d22F192a5703d629602c25AC7252cE94dBa8fca";
const currencyID = "MCC";
const amount = 25000;
const rawOperation = mitum.currency.transfer(sender, receiver, currencyID, amount);
console.log(rawOperation);
// output
Operation {
id: 'mitum',
fact: TransferFact {
hint: Hint { s: 'mitum-currency-transfer-operation-fact' },
token: Token { s: '2024-05-20 07:55:53.729 +0000 UTC' },
_hash: <Buffer a0 41 09 ae 37 77 a8 57 72 e7 16 d0 62 88 f8 ed e2 d6 0c 18 1d 7f a9 ed 28 1c 4d 42 cf 8a 16 b4>,
sender: Address {
s: '0x517ffA55D06AaEc6Fa9d27B54e21ebfeb58Ff692fca',
type: 'mitum'
},
items: [ [TransferItem] ]
},
hint: Hint { s: 'mitum-currency-transfer-operation' },
_factSigns: [],
_hash: <Buffer >
}
Last updated