The javascript SDK for Solana with the most common use cases!
npm install @km7/zz-solana
# or
yarn add @km7/zz-solana
All the test cases is dependent on sepecial solana network.
localhost
: It's fast, but you must hava the solana localhost environment.network
: It's a bit slow, but more easy without localhost environment.
recommend to use devnet to perform test.
-
Install solana cli tools: Please refer to offical document.
-
Set the localhost network
solana config set --url localhost
-
Run the solana test validator
solana-test-validator
The nft section must be test on devnet, because the localhost network has no metadata relevent programs.
npm run test
All the usages can be find in test folder.
- query amount
- transfer
- query amount
- mint
- transfer
- burn
NFT is a special SPL Token in Solana!
- mint
- transfer
- burn