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

@orca-so/common-sdk

Package Overview
Dependencies
Maintainers
6
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orca-so/common-sdk - npm Package Compare versions

Comparing version 0.5.5 to 0.5.6

3

dist/web3/transactions/compute-budget.d.ts

@@ -8,2 +8,3 @@ import { AddressLookupTableAccount, Connection, PublicKey } from "@solana/web3.js";

export declare function estimateComputeBudgetLimit(connection: Connection, instructions: Instruction[], lookupTableAccounts: AddressLookupTableAccount[] | undefined, payer: PublicKey, margin: number): Promise<number>;
export declare function getPriorityFeeInLamports(connection: Connection, computeBudgetLimit: number, instructions: Instruction[], percentile: number): Promise<number>;
export declare function getPriorityFeeInLamports(connection: Connection, computeBudgetLimit: number, lockedWritableAccounts: PublicKey[], percentile?: number): Promise<number>;
export declare function getLockWritableAccounts(instructions: Instruction[]): PublicKey[];
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPriorityFeeInLamports = exports.estimateComputeBudgetLimit = exports.DEFAULT_MAX_COMPUTE_UNIT_LIMIT = exports.DEFAULT_MAX_PRIORITY_FEE_LAMPORTS = exports.DEFAULT_PRIORITY_FEE_PERCENTILE = exports.MICROLAMPORTS_PER_LAMPORT = void 0;
exports.getLockWritableAccounts = exports.getPriorityFeeInLamports = exports.estimateComputeBudgetLimit = exports.DEFAULT_MAX_COMPUTE_UNIT_LIMIT = exports.DEFAULT_MAX_PRIORITY_FEE_LAMPORTS = exports.DEFAULT_PRIORITY_FEE_PERCENTILE = exports.MICROLAMPORTS_PER_LAMPORT = void 0;
const web3_js_1 = require("@solana/web3.js");

@@ -32,5 +32,5 @@ exports.MICROLAMPORTS_PER_LAMPORT = 1000000;

exports.estimateComputeBudgetLimit = estimateComputeBudgetLimit;
async function getPriorityFeeInLamports(connection, computeBudgetLimit, instructions, percentile) {
async function getPriorityFeeInLamports(connection, computeBudgetLimit, lockedWritableAccounts, percentile = exports.DEFAULT_PRIORITY_FEE_PERCENTILE) {
const recentPriorityFees = await connection.getRecentPrioritizationFees({
lockedWritableAccounts: getLockWritableAccounts(instructions),
lockedWritableAccounts,
});

@@ -55,1 +55,2 @@ const priorityFee = getPriorityFeeSuggestion(recentPriorityFees, percentile);

}
exports.getLockWritableAccounts = getLockWritableAccounts;

@@ -210,3 +210,3 @@ "use strict";

const percentile = finalComputeBudgetOption.computePricePercentile ?? compute_budget_1.DEFAULT_PRIORITY_FEE_PERCENTILE;
const priorityFee = await (0, compute_budget_1.getPriorityFeeInLamports)(this.connection, computeBudgetLimit, this.instructions, percentile);
const priorityFee = await (0, compute_budget_1.getPriorityFeeInLamports)(this.connection, computeBudgetLimit, (0, compute_budget_1.getLockWritableAccounts)(this.instructions), percentile);
const maxPriorityFeeLamports = finalComputeBudgetOption.maxPriorityFeeLamports ?? compute_budget_1.DEFAULT_MAX_PRIORITY_FEE_LAMPORTS;

@@ -213,0 +213,0 @@ const priorityFeeLamports = Math.min(priorityFee, maxPriorityFeeLamports);

{
"name": "@orca-so/common-sdk",
"version": "0.5.5",
"version": "0.5.6",
"description": "Common Typescript components across Orca",

@@ -5,0 +5,0 @@ "repository": "https://github.com/orca-so/orca-sdks",

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