The Honeycomb instance to use for creating the operation.
The arguments required to create the stake operation.
An object containing the created operation.
// Assuming you have initialized the `honeycomb` instance and imported necessary types
const stakingPool = new NectarStaking(honeycomb, "your_staking_pool_address");
const nftMint = new web3.PublicKey("your_nft_mint_address");
const availableNft: AvailableNft = {
address: new web3.PublicKey("your_nft_account_address"),
tokenMint: nftMint,
tokenStandard: TokenStandard.ProgrammableNonFungible, // or TokenStandard.NonFungible
state: "unlocked", // or "frozen"
creator: new web3.PublicKey("nft_creator_address"),
collection: new web3.PublicKey("nft_collection_address"),
creators: [{ address: new web3.PublicKey("nft_creator_address"), share: 100 }],
programmableConfig: {
ruleSet: new web3.PublicKey("authorization_rules_program_address"),
maxStakePerWallet: 10, // Only required for TokenStandard.ProgrammableNonFungible
},
};
const createStakeArgs: CreateStakeOperationArgs = {
stakingPool,
nft: availableNft,
};
const operationResult = await createStakeOperation(honeycomb, createStakeArgs);
console.log("Created stake operation:", operationResult.operation);
Generated using TypeDoc
Creates a stake operation to stake an NFT into the specified staking pool.