This function is used to Create a new NFT token.
import { L1XProvider, NFTTokenCreateArg } from "@l1x/l1x-wallet-sdk";
let l1xProvider = new L1XProvider({
clusterType: "mainnet",
endpoint: "https://v2-mainnet-rpc.l1x.foundation",
});
let params: NFTTokenCreateArg = {
private_key: "YOUR_PRIVATE_KEY",
attrib: {
name: "My NFT Token",
symbol: "NFT",
},
};
l1xProvider.tokens.NFT.create(params)
.then((response) => console.log(response)) // log response
.catch((err) => console.error(err)); // log error
{
private_key: "YOUR_PRIVATE_KEY",
attrib: {
name: "My NFT Token",
symbol: "NFT",
},
}
A promise that resolves when the transaction is submitted.
{
"contract_address": "8f37d1efb9ba093358520b19aacc1259983ba67e",
"hash": "4d93fdbdcc1e04fb5237f85c3018e038832829527b3ee011c322739ae9d179bd"
}