@marinade.finance/incentives-distribution-sdk
Advanced tools
Comparing version 1.0.9 to 1.0.10
{ | ||
"name": "@marinade.finance/incentives-distribution-sdk", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "SDK of the incentives distribution contract", | ||
@@ -5,0 +5,0 @@ "repository": { |
import { PublicKey, TransactionInstruction } from '@solana/web3.js'; | ||
import { IncentivesDistributionProgram } from './sdk'; | ||
/** | ||
* Generate instruction to claim and deposit. The claim instruction of the contract requires | ||
* the same transaction to create the deposit entry when does not exist. | ||
* For that we need to find out deposit entry for the MNDE token of the expected 30 days lockup time, | ||
* Generate instruction calling the `claimAndDeposit` | ||
* that does the both actions as once as the instruction do CPI call. | ||
* | ||
* This functions preset all required data and returns composed set of instructions. | ||
* The claimAndDeposit instruction of the contract requires | ||
* a VSR voter to exist before the call. This state is verified from chain | ||
* and this SDK call adds the required create ix before the claimAndDeposit call. | ||
* On top the SDK searches the deposit entries of the VSR voter | ||
* and verifies there is an entry represented by the mint with the expected lockup time 30 days. | ||
* When there is no such entry, the SDK adds the configure deposit entry call. | ||
* | ||
* @type {Object} args - Arguments on instruction creation | ||
* @param param {IncentivesDistributionProgram} args.program - anchor program instance | ||
* @param param {PublicKey} args.treasuryAccount - treasury account | ||
* @param param {PublicKey} args.treasuryAccount - incentives distribution program treasury account | ||
* @param param {PublicKey} args.authority - claim record authority [SIGNER] | ||
* @param param {PublicKey} args.mint - mint that is used for the deposit entry | ||
* @param param {PublicKey} args.realm - realm address the VSR registrar account belongs to | ||
* @type {Object} return - Return instructions | ||
* @return {TransactionInstruction[]} return.instructions - Instructions to manage claiming and depositing | ||
* @return {TransactionInstruction[]} return.instructions - Instructions to manage claimAndDeposit | ||
*/ | ||
@@ -17,0 +23,0 @@ export declare function claimOwnerAndDepositInstructions({ program, authority, mint, treasuryAccount, realm, }: { |
@@ -11,14 +11,20 @@ "use strict"; | ||
/** | ||
* Generate instruction to claim and deposit. The claim instruction of the contract requires | ||
* the same transaction to create the deposit entry when does not exist. | ||
* For that we need to find out deposit entry for the MNDE token of the expected 30 days lockup time, | ||
* Generate instruction calling the `claimAndDeposit` | ||
* that does the both actions as once as the instruction do CPI call. | ||
* | ||
* This functions preset all required data and returns composed set of instructions. | ||
* The claimAndDeposit instruction of the contract requires | ||
* a VSR voter to exist before the call. This state is verified from chain | ||
* and this SDK call adds the required create ix before the claimAndDeposit call. | ||
* On top the SDK searches the deposit entries of the VSR voter | ||
* and verifies there is an entry represented by the mint with the expected lockup time 30 days. | ||
* When there is no such entry, the SDK adds the configure deposit entry call. | ||
* | ||
* @type {Object} args - Arguments on instruction creation | ||
* @param param {IncentivesDistributionProgram} args.program - anchor program instance | ||
* @param param {PublicKey} args.treasuryAccount - treasury account | ||
* @param param {PublicKey} args.treasuryAccount - incentives distribution program treasury account | ||
* @param param {PublicKey} args.authority - claim record authority [SIGNER] | ||
* @param param {PublicKey} args.mint - mint that is used for the deposit entry | ||
* @param param {PublicKey} args.realm - realm address the VSR registrar account belongs to | ||
* @type {Object} return - Return instructions | ||
* @return {TransactionInstruction[]} return.instructions - Instructions to manage claiming and depositing | ||
* @return {TransactionInstruction[]} return.instructions - Instructions to manage claimAndDeposit | ||
*/ | ||
@@ -25,0 +31,0 @@ async function claimOwnerAndDepositInstructions({ program, authority, mint = vsr_client_1.MNDE_MINT, treasuryAccount = sdk_1.STAKERS_TREASURY, realm = vsr_client_1.MNDE_REALM_ADDRESS, }) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
1
36
275631
58
5934