Socket
Socket
Sign inDemoInstall

@marinade.finance/native-staking-sdk

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@marinade.finance/native-staking-sdk - npm Package Compare versions

Comparing version 0.0.2 to 1.0.0

6

dist/src/config.js

@@ -9,5 +9,5 @@ "use strict";

const bn_js_1 = __importDefault(require("bn.js"));
exports.DEFAULT_STAKE_AUTHORITY = new web3_js_1.PublicKey('noMa7dN4cHQLV4ZonXrC29HTKFpxrpFbDLK5Gub8W8t');
exports.DEFAULT_EXIT_AUTHORITY = new web3_js_1.PublicKey('exGQS9BR9Y1zLf36iM4pqHCDGoj2HChcjzu6kQTV2Ju');
exports.DEFAULT_BENEFICIARY = new web3_js_1.PublicKey('noMa7dN4cHQLV4ZonXrC29HTKFpxrpFbDLK5Gub8W8t');
exports.DEFAULT_STAKE_AUTHORITY = new web3_js_1.PublicKey('stWirqFCf2Uts1JBL1Jsd3r6VBWhgnpdPxCTe1MFjrq');
exports.DEFAULT_EXIT_AUTHORITY = new web3_js_1.PublicKey('ex9CfkBZZd6Nv9XdnoDmmB45ymbu4arXVk7g5pWnt3N');
exports.DEFAULT_BENEFICIARY = new web3_js_1.PublicKey('opNS8ENpEMWdXcJUgJCsJTDp7arTXayoBEeBUg6UezP');
exports.DEFAULT_NATIVE_STAKING_API_URL = "https://native-staking.marinade.finance";

@@ -14,0 +14,0 @@ exports.NATIVE_STAKING_API_URL_DEV = "https://native-staking-dev.marinade.finance";

@@ -0,1 +1,5 @@

export interface Proxy {
root: string;
operator: string;
}
export interface OrderMessage {

@@ -7,2 +11,3 @@ }

withdraw_authority: string;
stake_proxy?: Proxy;
};

@@ -14,2 +19,3 @@ }

withdraw_authority: string;
stake_proxy?: Proxy;
};

@@ -21,2 +27,3 @@ }

withdraw_authority: string;
stake_proxy?: Proxy;
};

@@ -32,4 +39,5 @@ }

};
stake_proxy?: Proxy;
};
}
export declare const orderMessagesToStdin: (messages: OrderMessage[]) => string;

@@ -46,6 +46,9 @@ import { Keypair, PublicKey, TransactionInstruction } from "@solana/web3.js";

buildRebalanceOrderMessage: (withdrawAuthority: PublicKey) => RebalanceOrderMessage;
buildRebalanceOrderWithProxyMessage: (withdrawAuthority: PublicKey, root: PublicKey, operator: PublicKey) => RebalanceOrderMessage;
buildMergeOrderMessage: (withdrawAuthority: PublicKey) => MergeOrderMessage;
buildMergeOrderWithProxyMessage: (withdrawAuthority: PublicKey, root: PublicKey, operator: PublicKey) => MergeOrderMessage;
buildClaimExtraBalanceOrderMessage: (withdrawAuthority: PublicKey) => ClaimExtraBalanceOrderMessage;
buildExitAllOrderMessage: (withdrawAuthority: PublicKey) => ExitMessage;
buildExitPartOrderMessage: (withdrawAuthority: PublicKey, amount: BN) => ExitMessage;
buildExitPartOrderWithProxyMessage: (withdrawAuthority: PublicKey, amount: BN, root: PublicKey, operator: PublicKey) => ExitMessage;
}

@@ -52,0 +55,0 @@ export type RewardsResponse = {

@@ -50,6 +50,9 @@ "use strict";

this.buildRebalanceOrderMessage = (withdrawAuthority) => ({ "Rebalance": { "stake_authority": this.config.stakeAuthority.toBase58(), "withdraw_authority": withdrawAuthority.toBase58() } });
this.buildRebalanceOrderWithProxyMessage = (withdrawAuthority, root, operator) => ({ "Rebalance": { "stake_authority": this.config.stakeAuthority.toBase58(), "withdraw_authority": withdrawAuthority.toBase58(), "stake_proxy": { root: root.toBase58(), operator: operator.toBase58() } } });
this.buildMergeOrderMessage = (withdrawAuthority) => ({ "Merge": { "stake_authority": this.config.stakeAuthority.toBase58(), "withdraw_authority": withdrawAuthority.toBase58() } });
this.buildMergeOrderWithProxyMessage = (withdrawAuthority, root, operator) => ({ "Merge": { "stake_authority": this.config.stakeAuthority.toBase58(), "withdraw_authority": withdrawAuthority.toBase58(), "stake_proxy": { root: root.toBase58(), operator: operator.toBase58() } } });
this.buildClaimExtraBalanceOrderMessage = (withdrawAuthority) => ({ "ClaimExtraBalance": { "stake_authority": this.config.stakeAuthority.toBase58(), "withdraw_authority": withdrawAuthority.toBase58() } });
this.buildExitAllOrderMessage = (withdrawAuthority) => ({ "Exit": { "stake_authority": this.config.stakeAuthority.toBase58(), "withdraw_authority": withdrawAuthority.toBase58(), "exit_authority": this.config.exitAuthority.toBase58(), "amount": "All" } });
this.buildExitPartOrderMessage = (withdrawAuthority, amount) => ({ "Exit": { "stake_authority": this.config.stakeAuthority.toBase58(), "withdraw_authority": withdrawAuthority.toBase58(), "exit_authority": this.config.exitAuthority.toBase58(), "amount": { "Part": amount.toNumber() } } });
this.buildExitPartOrderWithProxyMessage = (withdrawAuthority, amount, root, operator) => ({ "Exit": { "stake_authority": this.config.stakeAuthority.toBase58(), "withdraw_authority": withdrawAuthority.toBase58(), "exit_authority": this.config.exitAuthority.toBase58(), "amount": { "Part": amount.toNumber() }, "stake_proxy": { root: root.toBase58(), operator: operator.toBase58() } } });
}

@@ -56,0 +59,0 @@ buildCreateAuthorizedStakeInstructions(user, amount, stakeKeypair = web3_js_1.Keypair.generate()) {

{
"name": "@marinade.finance/native-staking-sdk",
"version": "0.0.2",
"version": "1.0.0",
"description": "Marinade SDK for the Native Staking",

@@ -5,0 +5,0 @@ "main": "dist/src/index.js",

Sorry, the diff of this file is not supported yet

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