@streamflow/common 7.1.0 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,8 +31,8 @@ const p_queue_1 = __importDefault(require("p-queue"));
31
31
  const types_js_1 = require("./types.js");
32
32
  const utils_js_1 = require("../lib/utils.js");
33
33
  const SIMULATE_TRIES = 3;
34
- const buildSendThrottler = (sendRate) => {
35
- return new p_queue_1.default({ concurrency: sendRate, intervalCap: 1, interval: 1000 });
34
+ const buildSendThrottler = (sendRate, sendInterval = 1000) => {
35
+ return new p_queue_1.default({ concurrency: sendRate, intervalCap: 1, interval: sendInterval });
36
36
  };
37
37
  exports.buildSendThrottler = buildSendThrottler;
38
38
  /**
@@ -3,7 +3,7 @@ import { SignerWalletAdapter } from "@solana/wallet-adapter-base";
3
3
  import { BlockhashWithExpiryBlockHeight, Commitment, Connection, Keypair, PublicKey, Transaction, TransactionInstruction, SignatureStatus, VersionedTransaction, Context, RpcResponseAndContext, SimulatedTransactionResponse } from "@solana/web3.js";
4
4
  import PQueue from "p-queue";
5
5
  import { Account, AtaParams, ConfirmationParams, ITransactionSolanaExt, ThrottleParams } from "./types.js";
6
- export declare const buildSendThrottler: (sendRate: number) => PQueue;
6
+ export declare const buildSendThrottler: (sendRate: number, sendInterval?: number) => PQueue;
7
7
  /**
8
8
  * Wrapper function for Solana web3 getProgramAccounts with slightly better call interface
9
9
  * @param {Connection} connection - Solana web3 connection object.
@@ -5,8 +5,8 @@ import PQueue from "p-queue";
5
5
  import { TransactionFailedError, } from "./types.js";
6
6
  import { sleep } from "../lib/utils.js";
7
7
  const SIMULATE_TRIES = 3;
8
- export const buildSendThrottler = (sendRate) => {
9
- return new PQueue({ concurrency: sendRate, intervalCap: 1, interval: 1000 });
8
+ export const buildSendThrottler = (sendRate, sendInterval = 1000) => {
9
+ return new PQueue({ concurrency: sendRate, intervalCap: 1, interval: sendInterval });
10
10
  };
11
11
  /**
12
12
  * Wrapper function for Solana web3 getProgramAccounts with slightly better call interface
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamflow/common",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "Common utilities and types used by streamflow packages.",
5
5
  "homepage": "https://github.com/streamflow-finance/js-sdk/",
6
6
  "main": "./dist/esm/index.js",
@@ -27,9 +27,9 @@
27
27
  "lint-config": "eslint --print-config",
28
28
  "prepublishOnly": "npm run lint && npm run build"
29
29
  },
30
- "gitHead": "43138796876f19398e3fbae5173c901cd7b5a580",
30
+ "gitHead": "e56411e57d702a9f74d9611317fffa7e0a827c8c",
31
31
  "devDependencies": {
32
- "@streamflow/eslint-config": "7.1.0",
32
+ "@streamflow/eslint-config": "7.2.0",
33
33
  "@types/bn.js": "5.1.1",
34
34
  "date-fns": "2.28.0",
35
35
  "typescript": "^5.6.3"