Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mercurial-finance/farming-sdk

Package Overview
Dependencies
Maintainers
4
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mercurial-finance/farming-sdk - npm Package Compare versions

Comparing version 1.0.15-abc1234.3 to 1.0.15

43

dist/index.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var __defProp = Object.defineProperty;
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;

@@ -47,3 +47,2 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;

var _web3js = require('@solana/web3.js');
var _bufferlayout = require('buffer-layout'); var BufferLayout = _interopRequireWildcard(_bufferlayout);

@@ -60,3 +59,2 @@ // src/utils.ts

var _nodefetch = require('node-fetch'); var _nodefetch2 = _interopRequireDefault(_nodefetch);

@@ -1529,24 +1527,2 @@

}
// async getClaimableReward(owner: PublicKey) {
// if (!this.eventParser) throw "EventParser not found";
// const claimMethodBuilder = await this.claimMethodBuilder(owner);
// const claimTransaction = await claimMethodBuilder.transaction();
// if (!claimTransaction) return;
// const blockhash = (
// await this.program.provider.connection.getLatestBlockhash("finalized")
// ).blockhash;
// const claimTx = new Transaction({
// recentBlockhash: blockhash,
// feePayer: SIMULATION_USER,
// });
// claimTransaction && claimTx.add(claimTransaction);
// const tx = await this.program.provider.connection.simulateTransaction(
// claimTx
// );
// const simulatedReward = (await parseLogs(
// this.eventParser,
// tx?.value?.logs ?? []
// )) as { amountA: BN; amountB: BN };
// return simulatedReward;
// }
static getClaimableRewards(owner, farmMints, connection) {

@@ -1568,13 +1544,4 @@ return __async(this, null, function* () {

const [clockAccountInfo, ...restAccounts] = accounts;
const ClockLayout = BufferLayout.struct([
BufferLayout.blob(8, "slot"),
BufferLayout.blob(8, "epochStartTimestamp"),
BufferLayout.blob(8, "epoch"),
BufferLayout.blob(8, "leaderScheduleEpoch"),
BufferLayout.blob(8, "unixTimestamp")
]);
const clockState = (clockAccountInfo == null ? void 0 : clockAccountInfo.data) ? ClockLayout.decode(clockAccountInfo.data) : void 0;
if (!clockState)
throw new Error("Clock state not found");
const onChainTime = clockState.unixTimestamp;
const clockData = clockAccountInfo == null ? void 0 : clockAccountInfo.data;
const onChainTime = Number(clockData.readBigInt64LE(8 * 4));
const poolStatesMap = /* @__PURE__ */ new Map();

@@ -1627,4 +1594,4 @@ for (let i = 0; i < farmMints.length; i++) {

),
b: pool.rewardAPerTokenStored.add(
timePeriod.mul(pool.rewardARateU128).div(totalStake)
b: pool.rewardBPerTokenStored.add(
timePeriod.mul(pool.rewardBRateU128).div(totalStake)
)

@@ -1631,0 +1598,0 @@ };

2

package.json
{
"name": "@mercurial-finance/farming-sdk",
"version": "1.0.15-abc1234.3",
"version": "1.0.15",
"description": "",

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

Sorry, the diff of this file is not supported yet

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