@jimii/solquest-sdk
v0.0.10
Published
### Fungible Token Staking Program
Downloads
11
Readme
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]);