approve(contract, sender, approved, nftIdx, currency)
Feature
Return raw operation for approving permission for a specific NFT of sender to the given account.
Parameters
string contract address,
string sender,
string approved, //account to approve int nftIdx
int nftIdx,
int currency
Return Value
object approve operation
example
const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const sender = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const approved = "0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca";
const nftIdx = 0;
const currencyID = "MCC";
const approveOperation = mitum.nft.approve(contractAddress, sender, approved, nftIdx, currencyID);
console.log(approveOperation);
// output
Operation {
id: 'mitum',
fact: ApproveFact {
hint: Hint { s: 'mitum-nft-approve-operation-fact' },
token: Token { s: '2023-10-10 04:53:48.582 +0000 UTC' },
_hash: <Buffer 95 13 b1 c0 86 87 f7 d5 2e 18 c4 25 10 fa d8 0b 91 ee 66 c3 92 30 15 d7 c4 43 95 d7 6a 31 6a cc>,
sender: Address {
s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
type: 'mitum'
},
items: [ [ApproveItem] ]
},
hint: Hint { s: 'mitum-nft-approve-operation' },
_factSigns: [],
_hash: <Buffer >
}PreviousaddSignature(contract, sender, nftIdx, currency)Next⚠️ multiApprove(contract, sender, approved, nft
Last updated