Typescript SDK for interacting with our Token minting smart contract
NOTE This is an UNPUBLISHED npm package. You have to build and install it locally from this repo
- Clone the sdk repo
git clone https://github.com/SoundWorkLabs/token-test-sdk
- Build the NPM project and pack it into a distributable format
npm run build:ts && npm pack
- Install/Add the package to your project using the relative paths
npm install <PATH TO CLONED AND BUILD SDK REPO> # e.g. npm install ../token-test-sdk
Initialization
import { TokenTestSDK } from "token-test-sdk";
// provide your anchor provider and solana connection to
const SDK = await new TokenTestSDK(provider, connection);
- Create Mint details
SDK.createToken(name, uri, symbol, supply, decimals);
- Revoke mint details
SDK.revoke(mint);
- Mint tokens
SDK.mint(amount, mint);
- transfer tokens
SDK.mint(mint, recipient, amount);