Practical overview
When it fits
Use the SDK when building application-side transaction flows for Candy Machine v2 collections on Solana, or when implementing the documented NFT airdrop operation.
Who it is for
- Developers adding Candy Machine v2 minting to a Solana collection-launch application.
- Teams building a mint flow in which a separate payer covers transaction fees.
- Developers who need an SDK method to airdrop an NFT without creating it separately first.
Documented uses
- Construct a standard Candy Machine v2 mint transaction for a specified network, collection and user.
- Construct a gasless mint transaction with a designated fee payer.
- Airdrop an NFT using supplied metadata and payer and recipient keys.
Requirements & limits
The repository is public and lists an MIT license. The documented installation uses npm packages.
- Candy Machine minting parameters include a network, Candy Machine address and user public key; a custom RPC URL is optional.
- Candy Machine minting documents mainnet-beta and devnet; airdrop also lists testnet.
- The gasless method assigns transaction fees to a separate payer, while the standard mint method has the end user pay them.
- For Next.js, the documentation warns that Anchor's use of Node's native fs module can cause build-time errors and recommends setting a webpack fallback.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install and initialize the SDK
Add the SDK dependencies and create a CandyPay instance.
Before you start
- A JavaScript or TypeScript project using npm.
Steps
Install
@candypay/sdkand@project-serum/anchorwith npm.Import
CandyPayfrom@candypay/sdk.Create a
CandyPayinstance withnew CandyPay().
Expected outcome
The SDK instance is initialized and ready to access its documented modules.
Guide limitations
- This covers installation and initialization only; it does not run a mint or verify a project configuration.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 16 October 2026
- Original website title
- candypay/nft-sdk · Official homepage title · retained in its source language

