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.1 to 0.0.2

1

dist/src/sdk.d.ts

@@ -19,2 +19,3 @@ import { Keypair, PublicKey, TransactionInstruction } from "@solana/web3.js";

callPrepareForRevoke(user: PublicKey, signature: string, amount?: BN): Promise<any>;
callRebalanceHint(user: PublicKey): Promise<any>;
fetchRewards(user: PublicKey): Promise<RewardsResponse>;

@@ -21,0 +22,0 @@ buildRevokeInstructions(user: PublicKey, stakeAccounts: PublicKey[]): TransactionInstruction[];

@@ -25,2 +25,3 @@ "use strict";

};
const buildRequestBodyForRebalanceHint = (user) => ({ user: user.toBase58() });
class NativeStakingSDK {

@@ -98,2 +99,12 @@ constructor(config = new config_1.NativeStakingConfig()) {

}
callRebalanceHint(user) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield fetch(`${this.config.nativeStakingApiUrl}/v1/rebalance-hint`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(buildRequestBodyForRebalanceHint(user)),
});
return yield response.json();
});
}
fetchRewards(user) {

@@ -100,0 +111,0 @@ return __awaiter(this, void 0, void 0, function* () {

78

package.json
{
"name": "@marinade.finance/native-staking-sdk",
"version": "0.0.1",
"description": "Marinade SDK for the Native Staking",
"main": "dist/src/index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/marinade-finance/native-staking.git"
},
"publishConfig": {
"access": "public"
},
"files": [
"dist",
"README.md"
],
"type": "commonjs",
"scripts": {
"preinstall": "npx only-allow pnpm",
"build": "rm -fr dist; npx tsc -b -verbose",
"pretest": "pnpm lint",
"test": "echo 'No tests'",
"prepack": "pnpm test && pnpm build"
},
"keywords": [
"solana",
"marinade.finance",
"blockchain",
"staking"
],
"license": "ISC",
"dependencies": {
"@solana/spl-memo": "^0.2.3",
"@solana/web3.js": "^1.74.0",
"bn.js": "^5.2.1"
},
"devDependencies": {
"@types/bn.js": "^5.1.1",
"@types/node": "^18.16.3",
"typescript": "^5.0.4"
}
"name": "@marinade.finance/native-staking-sdk",
"version": "0.0.2",
"description": "Marinade SDK for the Native Staking",
"main": "dist/src/index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/marinade-finance/native-staking.git"
},
"publishConfig": {
"access": "public"
},
"files": [
"dist",
"README.md"
],
"type": "commonjs",
"keywords": [
"solana",
"marinade.finance",
"blockchain",
"staking"
],
"license": "ISC",
"dependencies": {
"@solana/spl-memo": "^0.2.3",
"@solana/web3.js": "^1.74.0",
"bn.js": "^5.2.1"
},
"devDependencies": {
"@types/bn.js": "^5.1.1",
"@types/node": "^18.16.3",
"typescript": "^5.0.4"
},
"scripts": {
"build": "rm -fr dist; npx tsc -b -verbose",
"pretest": "pnpm lint",
"test": "echo 'No tests'"
}
}

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