@jimii/token-test-sdk
v0.0.1
Published
Typescript SDK for interacting with our Token minting smart contract
Downloads
3
Readme
SDK
Typescript SDK for interacting with our Token minting smart contract
Installation from source
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/jim4067/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
Usage
Initialization
import { TokenTestSDK } from "token-test-sdk";
// provide your anchor provider and solana connection to
const SDK = await new TokenTestSDK(provider, connection);
Available Instructions
- 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);