Socket
Socket
Sign inDemoInstall

@marinade.finance/incentives-distribution-sdk

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@marinade.finance/incentives-distribution-sdk - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

README.md

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc