simple-nft-mint
v1.0.2
Published
Professional SDK for the Simple NFT Mint contract on Stacks
Maintainers
Readme
Simple NFT Mint SDK
Professional SDK for interacting with the Simple NFT Mint smart contract on the Stacks blockchain.
Installation
npm install simple-nft-mintFeatures
- Mint new NFTs
- Transfer NFTs
- Query contract state (total minted, last token ID, mint price)
- Supports Mainnet and Testnet
Usage
Initialize SDK
import { SimpleNFTMint } from 'simple-nft-mint';
const sdk = new SimpleNFTMint();Query Contract State
const total = await sdk.getTotalMinted();
console.log(`Total NFTs minted: ${total}`);
const price = await sdk.getMintPrice();
console.log(`Current mint price: ${price} microSTX`);Mint an NFT
const privateKey = 'YOUR_PRIVATE_KEY_HEX';
const result = await sdk.mint(privateKey);
if (result.txid) {
console.log(`Mint transaction broadcast: ${result.txid}`);
} else {
console.error(`Mint failed: ${result.error}`);
}Transfer an NFT
const result = await sdk.transfer(
1, // tokenId
'SPADDRESS1...', // sender address
'SPADDRESS2...', // recipient address
'SENDER_PRIVATE_KEY'
);License
MIT
