@jimii/solquest-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.0.10 • Public • Published

USAGE

Fungible Token Staking Program

// import the SDK
import { SolquestToken } from "@"; // todo: publish

// Instantiate the solquest token program SDK
let solToken = new SolquestToken(provider, connection);

// stake tokens
let amount = new BN(1 * decimals);
let ix = await solToken.stake(amount, mint);
let tx = new Transaction().add(ix);

// send the transaction
await sendAndConfirmTransaction(provider.connection, tx, [userKeypair]);

Non Fungible Token Staking Program

// import the SDK
import { SolquestNFT } from "@"; //todo: publish package

// Instantiate the solquest token program SDK
let solNFT = new SolquestNFT(provider, connection);

// stake an NFT
let ix = await solNFT.stakeNFT(mint, collectionAddress);
let tx = new Transaction().add(ix);

// send the transaction
await sendAndConfirmTransaction(provider.connection, tx, [userKeypair]);

Readme

Keywords

none

Package Sidebar

Install

npm i @jimii/solquest-sdk

Weekly Downloads

0

Version

0.0.10

License

ISC

Unpacked Size

76.2 kB

Total Files

20

Last publish

Collaborators

  • jimii