transfer(contract, sender, receiver, nftIdx, currencyId)
Feature
Return raw operation for transferring of NFT. The owner of the NFT or an account delegated authority from the owner, creates an operation to transfer ownership of the NFT to the 'receiver'.
Parameters
string
contract address,
string
sender (= owner or approved account),
string
receiver,
int
nft Idx,
string
currency Id
Return Value
object
transfer Operation
example
const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const sender = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const receiver = "0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca";
const nftIdx = 0;
const currencyId = "MCC";
const transferOperation = mitum.nft.transfer(contractAddress, sender, receiver, nftIdx, currencyId);
console.log(transferOperation);
// output
Operation {
id: 'mitum',
fact: TransferFact {
hint: Hint { s: 'mitum-nft-transfer-operation-fact' },
token: Token { s: '2024-04-29 08:32:35.668 +0000 UTC' },
_hash: <Buffer d6 8c 88 b5 68 17 c4 8a 51 bb b3 0a dd fb a6 32 91 51 3b df 64 12 23 21 ff 62 7d 07 58 b4 be ea>,
sender: Address {
s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
type: 'mitum'
},
items: [ [TransferItem] ]
},
hint: Hint { s: 'mitum-nft-transfer-operation' },
_factSigns: [],
_hash: <Buffer >
}
PreviousgetApprovedAll(contract, owner)Next⚠️ multiTransfer(contract, sender, receiver, nftIdx, currencyId)
Last updated