How to set or revoke approval for a specific operator to manage all tokens of the sender?
import { L1XProvider, NFTSetApprovalForAllArg } from "@l1x/l1x-wallet-sdk";
let l1xProvider = new L1XProvider({
clusterType: "mainnet",
endpoint: "https://v2-mainnet-rpc.l1x.foundation"
});
let params: NFTSetApprovalForAllArg = {
attrib: {
contract_address: "cf0289e86714d97979d726eeb2fa3a23b9c007c1",
operator_address: "4669899603735f7b06645c73fb73376b4a5c6f43",
approved: true,
},
private_key: "YOUR_PRIVATE_KEY",
fee_limit: 0,
};
l1xProvider.tokens.NFT.setApprovalForAll(params)
.then((response) => console.log(response)) // log response
.catch((err) => console.error(err)); // log errorPreviousHow to approve a spender to manage a specific Non-Fungible token?NextHow to get the owner of a Non-Fungible token by its ID?
Last updated