@xact-wallet-sdk/nft
Create a NFT with Hedera and FileCoin
Installation
- Install package from npm and dependencies.
npm i @xact-wallet-sdk/nft
Before Starting
-
Please create your account on Hedera Portal.
-
Please create your account on NFT Storage.
Usage
const hederaAccount = {
accountId: 'YOUR_ACCOUNTID',
privateKey: 'YOUR_PRIVATEKEY',
environment: HederaEnvironment.TESTNET,
};
const client = new ClientNFT({hederaAccount, nftStorageApiKey: 'YOUR_TOKEN', debugLevel:DebugLevel.DEBUG });
const fees = await client.getFees();
const name = 'NFT Test';
const description = 'Description of my NFT';
const category = CategoryNFT.ART;
const creator = 'Johny.B';
const media = '';
const supply = 1;
const customRoyaltyFee = [{
numerator: 1,
denominator: 10,
fallbackFee: 100,
collectorAccountId: '0.0.123456',
}]
await client.createAndMint({name, description, category, creator, media, supply, customRoyaltyFee});
const name = 'NFT Test';
const customRoyaltyFee = [{
numerator: 1,
denominator: 10,
fallbackFee: 100,
collectorAccountId: '0.0.123456',
}]
const nfts: NFT = [
{
name: 'NFT Test 1',
description: 'Description of my first NFT',
category: CategoryNFT.ART,
creator: 'Johny.B',
attributes: [],
customProperties: null,
media: '',
},
{
name: 'NFT Test 2',
description: 'Description of my second NFT',
category: CategoryNFT.ART,
creator: 'Johny.B',
attributes: [],
customProperties: null,
media: '',
}
]
await client.createAndMint({name, customRoyaltyFee, nfts});