https://github.com/soundworklabs/spl-token-minter-sdk
https://github.com/soundworklabs/spl-token-minter-sdk
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/soundworklabs/spl-token-minter-sdk
- Owner: SoundWorkLabs
- Created: 2024-05-05T13:36:26.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-13T09:51:54.000Z (about 2 years ago)
- Last Synced: 2024-12-28T10:48:20.286Z (over 1 year ago)
- Language: TypeScript
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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
1. Clone the sdk repo
```bash
git clone https://github.com/SoundWorkLabs/token-test-sdk
```
2. Build the NPM project and pack it into a distributable format
```bash
npm run build:ts && npm pack
```
3. Install/Add the package to your project using the relative paths
```bash
npm install # e.g. npm install ../token-test-sdk
```
## Usage
Initialization
```ts
import { TokenTestSDK } from "token-test-sdk";
// provide your anchor provider and solana connection to
const SDK = await new TokenTestSDK(provider, connection);
```
### Available Instructions
1. Create Mint details
```ts
SDK.createToken(name, uri, symbol, supply, decimals);
```
2. Revoke mint details
```ts
SDK.revoke(mint);
```
3. Mint tokens
```ts
SDK.mint(amount, mint);
```
4. transfer tokens
```ts
SDK.mint(mint, recipient, amount);
```