# AI Skills
URL: /docs/ai-tools/ai-skills
## Overview [#overview]
The SDK ships with structured context files under `skills/` that give AI coding assistants accurate knowledge of the Streamflow APIs without requiring them to search through source code.
## Stream creation skill [#stream-creation-skill]
`skills/stream-creation/SKILL.md` covers everything needed to create streams correctly:
* Which function to call for each use case (`createLock` vs `createVesting`, single vs batch)
* Full parameter signatures with types and defaults
* `amountPerPeriod` auto-compute formula and duration rules (`endDate` XOR `duration`)
* The `initialAllocation` overload and when to use it
* Classification gotcha - when a vesting stream silently becomes a lock
It also references [`skills/stream-creation/assets/advanced.md`](https://github.com/streamflow-finance/js-sdk/blob/master/skills/stream-creation/assets/advanced.md) for protocol-level details: `StreamType` fee tiers, `isTokenLock()` criteria, and price-triggered stream params.
[View SKILL.md on GitHub](https://github.com/streamflow-finance/js-sdk/blob/master/skills/stream-creation/SKILL.md)
## Using the skill [#using-the-skill]
Skills load automatically when you work on stream-related tasks. Claude Code discovers the `skills/` directory in the repo root and injects the relevant skill into context.
For your own projects, copy the `skills/` directory to your project root - Claude Code will pick it up automatically.
Add the contents of `SKILL.md` to your project's `AGENTS.md` - Codex reads this file automatically for project-level instructions.
Open [`SKILL.md` on GitHub](https://github.com/streamflow-finance/js-sdk/blob/master/skills/stream-creation/SKILL.md), copy the raw content, and paste it into your chat before asking questions about stream creation. It is plain Markdown and works in any AI assistant - Claude, ChatGPT, Gemini, or any other.
Skills are plain Markdown files - no special tooling required. The format works universally across AI assistants.
# Get Help
URL: /docs/ai-tools/get-dev-help
## Contact [#contact]
For questions about the SDK or to report an error in the docs, reach the team on [Telegram](https://t.me/+139FsvY76HIzMzc0).
## Links [#links]
* **App**: [app.streamflow.finance](https://app.streamflow.finance)
* **Website**: [streamflow.finance](https://streamflow.finance)
* **X / Twitter**: [@streamflow\_fi](https://x.com/streamflow_fi)
# llms.txt
URL: /docs/ai-tools/llms-txt
## Endpoints [#endpoints]
| URL | Content |
| ---------------------------------- | ----------------------------------------------- |
| [`/llms.txt`](/llms.txt) | Index of all pages with titles and descriptions |
| [`/llms-full.txt`](/llms-full.txt) | Full text of every page concatenated |
| `/docs/{slug}.mdx` | Individual page as plain Markdown |
## Usage [#usage]
```bash
# Full SDK context in one file - paste into any AI chat
curl https://developers.streamflow.finance/llms-full.txt
# Single page
curl https://developers.streamflow.finance/docs/composable-apis/create-lock.mdx
# Page index
curl https://developers.streamflow.finance/llms.txt
```
Each docs page also has a **Copy as Markdown** and **Open in AI** button in the top-right toolbar.
## Using with AI tools [#using-with-ai-tools]
**Claude / Codex Projects** - add `https://developers.streamflow.finance/llms-full.txt` as a knowledge source so the assistant has full SDK context in every conversation.
**Cursor / Windsurf** - add the docs URL under `@Docs` (or equivalent) and the IDE fetches `/llms.txt` automatically to index available pages.
**Any AI chat** - fetch `llms-full.txt` and paste it directly into the context window before asking questions about the SDK.
`/llms.txt` follows the [llms.txt standard](https://llmstxt.org/) - a convention for making documentation machine-readable for AI tools.
# ContractError
URL: /docs/api/common/classes/ContractError
# ContractError [#contracterror]
Defined in: [types.ts:144](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L144)
Error wrapper for calls made to the contract on chain
## Extends [#extends]
* `Error`
## Constructors [#constructors]
### Constructor [#constructor]
```ts
new ContractError(
error,
code?,
description?): ContractError;
```
Defined in: [types.ts:154](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L154)
Constructs the Error Wrapper
#### Parameters [#parameters]
| Parameter | Type | Description |
| -------------- | -------- | ---------------------------------------------------- |
| `error` | `Error` | Original error raised probably by the chain SDK |
| `code?` | `string` | extracted code from the error if managed to parse it |
| `description?` | `string` | - |
#### Returns [#returns]
`ContractError`
#### Overrides [#overrides]
```ts
Error.constructor
```
## Properties [#properties]
| Property | Modifier | Type | Description | Inherited from | Defined in |
| ------------------------------------------------ | -------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `cause?` | `public` | `unknown` | - | `Error.cause` | node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 |
| `contractErrorCode` | `public` | `string` | - | - | [packages/common/solana/types.ts:145](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L145) |
| `description` | `public` | `string` | - | - | [packages/common/solana/types.ts:147](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L147) |
| `message` | `public` | `string` | - | `Error.message` | node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 |
| `name` | `public` | `string` | - | `Error.name` | node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 |
| `stack?` | `public` | `string` | - | `Error.stack` | node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1078 |
| `stackTraceLimit` | `static` | `number` | The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | `Error.stackTraceLimit` | node\_modules/.pnpm/@types+node\@24.3.0/node\_modules/@types/node/globals.d.ts:162 |
## Methods [#methods]
### captureStackTrace() [#capturestacktrace]
```ts
static captureStackTrace(targetObject, constructorOpt?): void;
```
Defined in: node\_modules/.pnpm/@types+node\@24.3.0/node\_modules/@types/node/globals.d.ts:146
Creates a `.stack` property on `targetObject`, which when accessed returns
a string representing the location in the code at which
`Error.captureStackTrace()` was called.
```js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
```
The first line of the trace will be prefixed with
`$\{myObject.name\}: $\{myObject.message\}`.
The optional `constructorOpt` argument accepts a function. If given, all frames
above `constructorOpt`, including `constructorOpt`, will be omitted from the
generated stack trace.
The `constructorOpt` argument is useful for hiding implementation
details of error generation from the user. For instance:
```js
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
```
#### Parameters [#parameters-1]
| Parameter | Type |
| ----------------- | ---------- |
| `targetObject` | `object` |
| `constructorOpt?` | `Function` |
#### Returns [#returns-1]
`void`
#### Inherited from [#inherited-from]
```ts
Error.captureStackTrace
```
***
### prepareStackTrace() [#preparestacktrace]
```ts
static prepareStackTrace(err, stackTraces): any;
```
Defined in: node\_modules/.pnpm/@types+node\@24.3.0/node\_modules/@types/node/globals.d.ts:150
#### Parameters [#parameters-2]
| Parameter | Type |
| ------------- | ------------- |
| `err` | `Error` |
| `stackTraces` | `CallSite`\[] |
#### Returns [#returns-2]
`any`
#### See [#see]
[https://v8.dev/docs/stack-trace-api#customizing-stack-traces](https://v8.dev/docs/stack-trace-api#customizing-stack-traces)
#### Inherited from [#inherited-from-1]
```ts
Error.prepareStackTrace
```
# TransactionFailedError
URL: /docs/api/common/classes/TransactionFailedError
# TransactionFailedError [#transactionfailederror]
Defined in: [types.ts:100](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L100)
## Extends [#extends]
* `Error`
## Constructors [#constructors]
### Constructor [#constructor]
```ts
new TransactionFailedError(m): TransactionFailedError;
```
Defined in: [types.ts:101](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L101)
#### Parameters [#parameters]
| Parameter | Type |
| --------- | -------- |
| `m` | `string` |
#### Returns [#returns]
`TransactionFailedError`
#### Overrides [#overrides]
```ts
Error.constructor
```
## Properties [#properties]
| Property | Modifier | Type | Description | Inherited from | Defined in |
| -------------------------------------------- | -------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------- |
| `cause?` | `public` | `unknown` | - | `Error.cause` | node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:26 |
| `message` | `public` | `string` | - | `Error.message` | node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 |
| `name` | `public` | `string` | - | `Error.name` | node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 |
| `stack?` | `public` | `string` | - | `Error.stack` | node\_modules/.pnpm/typescript\@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1078 |
| `stackTraceLimit` | `static` | `number` | The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | `Error.stackTraceLimit` | node\_modules/.pnpm/@types+node\@24.3.0/node\_modules/@types/node/globals.d.ts:162 |
## Methods [#methods]
### captureStackTrace() [#capturestacktrace]
```ts
static captureStackTrace(targetObject, constructorOpt?): void;
```
Defined in: node\_modules/.pnpm/@types+node\@24.3.0/node\_modules/@types/node/globals.d.ts:146
Creates a `.stack` property on `targetObject`, which when accessed returns
a string representing the location in the code at which
`Error.captureStackTrace()` was called.
```js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
```
The first line of the trace will be prefixed with
`$\{myObject.name\}: $\{myObject.message\}`.
The optional `constructorOpt` argument accepts a function. If given, all frames
above `constructorOpt`, including `constructorOpt`, will be omitted from the
generated stack trace.
The `constructorOpt` argument is useful for hiding implementation
details of error generation from the user. For instance:
```js
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
```
#### Parameters [#parameters-1]
| Parameter | Type |
| ----------------- | ---------- |
| `targetObject` | `object` |
| `constructorOpt?` | `Function` |
#### Returns [#returns-1]
`void`
#### Inherited from [#inherited-from]
```ts
Error.captureStackTrace
```
***
### prepareStackTrace() [#preparestacktrace]
```ts
static prepareStackTrace(err, stackTraces): any;
```
Defined in: node\_modules/.pnpm/@types+node\@24.3.0/node\_modules/@types/node/globals.d.ts:150
#### Parameters [#parameters-2]
| Parameter | Type |
| ------------- | ------------- |
| `err` | `Error` |
| `stackTraces` | `CallSite`\[] |
#### Returns [#returns-2]
`any`
#### See [#see]
[https://v8.dev/docs/stack-trace-api#customizing-stack-traces](https://v8.dev/docs/stack-trace-api#customizing-stack-traces)
#### Inherited from [#inherited-from-1]
```ts
Error.prepareStackTrace
```
# ICluster
URL: /docs/api/common/enumerations/ICluster
# ICluster [#icluster]
Defined in: [types.ts:117](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L117)
## Enumeration Members [#enumeration-members]
| Enumeration Member | Value | Defined in |
| ----------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `Devnet` | `"devnet"` | [packages/common/solana/types.ts:119](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L119) |
| `Local` | `"local"` | [packages/common/solana/types.ts:121](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L121) |
| `Mainnet` | `"mainnet"` | [packages/common/solana/types.ts:118](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L118) |
| `Testnet` | `"testnet"` | [packages/common/solana/types.ts:120](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L120) |
# assertHasPublicKey()
URL: /docs/api/common/functions/assertHasPublicKey
# assertHasPublicKey() [#asserthaspublickey]
```ts
function assertHasPublicKey(value, message?): asserts value is T & { publicKey: PublicKey };
```
Defined in: [assertions.ts:17](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/assertions.ts#L17)
## Type Parameters [#type-parameters]
| Type Parameter |
| ---------------------- |
| `T` *extends* `object` |
## Parameters [#parameters]
| Parameter | Type |
| ---------- | ---------------------------- |
| `value` | `T` |
| `message?` | `string` \| (() => `string`) |
## Returns [#returns]
`asserts value is T & \{ publicKey: PublicKey \}`
# ata()
URL: /docs/api/common/functions/ata
# ata() [#ata]
```ts
function ata(
mint,
owner,
programId?): Promise;
```
Defined in: [utils.ts:438](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L438)
Shorthand call signature for getAssociatedTokenAddress, with allowance for address to be offCurve
## Parameters [#parameters]
| Parameter | Type | Description |
| ------------ | ----------- | ------------------------------------- |
| `mint` | `PublicKey` | SPL token Mint address. |
| `owner` | `PublicKey` | Owner of the Associated Token Address |
| `programId?` | `PublicKey` | Program ID of the mint |
## Returns [#returns]
`Promise`\<`PublicKey`>
* Associated Token Address
# ataBatchExist()
URL: /docs/api/common/functions/ataBatchExist
# ataBatchExist() [#atabatchexist]
```ts
function ataBatchExist(connection, paramsBatch): Promise;
```
Defined in: [utils.ts:448](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L448)
Function that checks whether ATA exists for each provided owner
## Parameters [#parameters]
| Parameter | Type | Description |
| ------------- | ------------------------------------------------------- | ---------------------------------------------------- |
| `connection` | `Connection` | Solana client connection |
| `paramsBatch` | [`AtaParams`](/docs/api/common/interfaces/AtaParams)\[] | Array of Params for each ATA account: \{mint, owner} |
## Returns [#returns]
`Promise`\<`boolean`\[]>
Array of boolean where each member corresponds to an owner
# buildPartnerOracle()
URL: /docs/api/common/functions/buildPartnerOracle
# buildPartnerOracle() [#buildpartneroracle]
```ts
function buildPartnerOracle(connection): Program;
```
Defined in: [utils.ts:644](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L644)
Build a partner oracle program without a wallet, just to fetch accounts.
## Parameters [#parameters]
| Parameter | Type |
| ------------ | ------------ |
| `connection` | `Connection` |
## Returns [#returns]
`Program`\<[`PartnerOracle`](/docs/api/common/type-aliases/PartnerOracle)>
# buildSendThrottler()
URL: /docs/api/common/functions/buildSendThrottler
# buildSendThrottler() [#buildsendthrottler]
```ts
function buildSendThrottler(sendRate, sendInterval?): PQueue;
```
Defined in: [utils.ts:49](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L49)
## Parameters [#parameters]
| Parameter | Type | Default value |
| -------------- | -------- | ------------- |
| `sendRate` | `number` | `undefined` |
| `sendInterval` | `number` | `1000` |
## Returns [#returns]
`PQueue`
# checkOrCreateAtaBatch()
URL: /docs/api/common/functions/checkOrCreateAtaBatch
# checkOrCreateAtaBatch() [#checkorcreateatabatch]
```ts
function checkOrCreateAtaBatch(
connection,
owners,
mint,
invoker,
programId?,
payer?): Promise;
```
Defined in: [utils.ts:539](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L539)
Utility function that checks whether associated token accounts exist and return instructions to populate them if not
## Parameters [#parameters]
| Parameter | Type | Description |
| ------------------- | ------------------------------ | ------------------------------------------------------------------- |
| `connection` | `Connection` | Solana client connection |
| `owners` | `PublicKey`\[] | Array of ATA owners |
| `mint` | `PublicKey` | Mint for which ATA will be checked |
| `invoker` | \{ `publicKey`: `PublicKey`; } | Transaction invoker and payer |
| `invoker.publicKey` | `PublicKey` | - |
| `programId?` | `PublicKey` | Program ID of the Mint |
| `payer?` | `PublicKey` | optional payer account, will be used instead of invoker as `source` |
## Returns [#returns]
`Promise`\<`TransactionInstruction`\[]>
Array of Transaction Instructions that should be added to a transaction
# confirmAndEnsureTransaction()
URL: /docs/api/common/functions/confirmAndEnsureTransaction
# confirmAndEnsureTransaction() [#confirmandensuretransaction]
```ts
function confirmAndEnsureTransaction(
connection,
signature,
ignoreError?): Promise;
```
Defined in: [utils.ts:390](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L390)
Confirms and validates transaction success once
## Parameters [#parameters]
| Parameter | Type | Description |
| -------------- | ------------ | ------------------------------- |
| `connection` | `Connection` | Solana client connection |
| `signature` | `string` | Transaction signature |
| `ignoreError?` | `boolean` | return status even if tx failed |
## Returns [#returns]
`Promise`\<`SignatureStatus`>
Transaction Status
# createAndEstimateTransaction()
URL: /docs/api/common/functions/createAndEstimateTransaction
# createAndEstimateTransaction() [#createandestimatetransaction]
## Call Signature [#call-signature]
```ts
function createAndEstimateTransaction(createFn, extParams): Promise>>;
```
Defined in: [estimate.ts:25](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/lib/estimate.ts#L25)
### Type Parameters [#type-parameters]
| Type Parameter |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ParamsT` *extends* [`ITransactionExtResolved`](/docs/api/common/type-aliases/ITransactionExtResolved)\<[`IInteractExt`](/docs/api/common/interfaces/IInteractExt)> |
| `CreateFn` *extends* (`extParams`) => `Promise`\<`TransactionInstruction`\[]> |
### Parameters [#parameters]
| Parameter | Type |
| ----------- | ---------- |
| `createFn` | `CreateFn` |
| `extParams` | `ParamsT` |
### Returns [#returns]
`Promise`\<`Awaited`\<`ReturnType`\<`CreateFn`>>>
## Call Signature [#call-signature-1]
```ts
function createAndEstimateTransaction(
createFn,
extParams,
select): Promise>>;
```
Defined in: [estimate.ts:30](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/lib/estimate.ts#L30)
### Type Parameters [#type-parameters-1]
| Type Parameter |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ParamsT` *extends* [`ITransactionExtResolved`](/docs/api/common/type-aliases/ITransactionExtResolved)\<[`IInteractExt`](/docs/api/common/interfaces/IInteractExt)> |
| `CreateFn` *extends* (`extParams`) => `Promise`\<`any`> |
### Parameters [#parameters-1]
| Parameter | Type |
| ----------- | ----------------------------------------- |
| `createFn` | `CreateFn` |
| `extParams` | `ParamsT` |
| `select` | (`result`) => `TransactionInstruction`\[] |
### Returns [#returns-1]
`Promise`\<`Awaited`\<`ReturnType`\<`CreateFn`>>>
# createAtaBatch()
URL: /docs/api/common/functions/createAtaBatch
# createAtaBatch() [#createatabatch]
```ts
function createAtaBatch(
connection,
invoker,
paramsBatch,
commitment?,
rate?): Promise;
```
Defined in: [utils.ts:513](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L513)
Creates ATA for an array of owners
## Parameters [#parameters]
| Parameter | Type | Description |
| ------------- | ------------------------------------------------------- | -------------------------------------------------------- |
| `connection` | `Connection` | Solana client connection |
| `invoker` | `Keypair` \| `SignerWalletAdapter` | Transaction invoker and payer |
| `paramsBatch` | [`AtaParams`](/docs/api/common/interfaces/AtaParams)\[] | Array of Params for an each ATA account: \{mint, owner} |
| `commitment?` | `Commitment` | optional commitment that will be used to fetch Blockhash |
| `rate?` | `number` | throttle rate for tx sending |
## Returns [#returns]
`Promise`\<`string`>
Transaction signature
# createVersionedTransaction()
URL: /docs/api/common/functions/createVersionedTransaction
# createVersionedTransaction() [#createversionedtransaction]
```ts
function createVersionedTransaction(
ixs,
payer,
recentBlockhash,
partialSigners?,
lookupTables?): VersionedTransaction;
```
Defined in: [utils.ts:147](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L147)
## Parameters [#parameters]
| Parameter | Type |
| ----------------- | ------------------------------ |
| `ixs` | `TransactionInstruction`\[] |
| `payer` | `PublicKey` |
| `recentBlockhash` | `string` |
| `partialSigners?` | `Keypair`\[] |
| `lookupTables?` | `AddressLookupTableAccount`\[] |
## Returns [#returns]
`VersionedTransaction`
# deserializeRawTransaction()
URL: /docs/api/common/functions/deserializeRawTransaction
# deserializeRawTransaction() [#deserializerawtransaction]
```ts
function deserializeRawTransaction(serializedTx):
| {
accounts: PublicKey[];
transaction: Transaction;
type: string;
writableAccounts: PublicKey[];
}
| {
accounts: PublicKey[];
transaction: VersionedTransaction;
type: string;
writableAccounts: PublicKey[];
};
```
Defined in: [deserialize-raw-transaction.ts:8](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/lib/deserialize-raw-transaction.ts#L8)
## Parameters [#parameters]
| Parameter | Type |
| -------------- | -------- |
| `serializedTx` | `string` |
## Returns [#returns]
\| \{
`accounts`: `PublicKey`\[];
`transaction`: `Transaction`;
`type`: `string`;
`writableAccounts`: `PublicKey`\[];
}
\| \{
`accounts`: `PublicKey`\[];
`transaction`: `VersionedTransaction`;
`type`: `string`;
`writableAccounts`: `PublicKey`\[];
}
# divCeilN()
URL: /docs/api/common/functions/divCeilN
# divCeilN() [#divceiln]
```ts
function divCeilN(n, d): bigint;
```
Defined in: [utils.ts:63](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/utils.ts#L63)
## Parameters [#parameters]
| Parameter | Type |
| --------- | -------- |
| `n` | `bigint` |
| `d` | `bigint` |
## Returns [#returns]
`bigint`
# enrichAtaParams()
URL: /docs/api/common/functions/enrichAtaParams
# enrichAtaParams() [#enrichataparams]
```ts
function enrichAtaParams(connection, paramsBatch): Promise;
```
Defined in: [utils.ts:458](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L458)
## Parameters [#parameters]
| Parameter | Type |
| ------------- | ------------------------------------------------------- |
| `connection` | `Connection` |
| `paramsBatch` | [`AtaParams`](/docs/api/common/interfaces/AtaParams)\[] |
## Returns [#returns]
`Promise`\<[`AtaParams`](/docs/api/common/interfaces/AtaParams)\[]>
# estimateComputeUnitPrice()
URL: /docs/api/common/functions/estimateComputeUnitPrice
# estimateComputeUnitPrice() [#estimatecomputeunitprice]
```ts
function estimateComputeUnitPrice(estimate, testTx): Promise;
```
Defined in: [estimate.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/lib/estimate.ts#L18)
## Parameters [#parameters]
| Parameter | Type |
| ---------- | ---------------------------------------------------------------------------- |
| `estimate` | [`ComputePriceEstimate`](/docs/api/common/type-aliases/ComputePriceEstimate) |
| `testTx` | `VersionedTransaction` |
## Returns [#returns]
`Promise`\<`number`>
# executeMultipleTransactions()
URL: /docs/api/common/functions/executeMultipleTransactions
# executeMultipleTransactions() [#executemultipletransactions]
```ts
function executeMultipleTransactions(
connection,
txs,
confirmationParams,
throttleParams): Promise[]>;
```
Defined in: [utils.ts:248](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L248)
Launches a PromisePool with all transaction being executed at the same time, allows to throttle all TXs through one Queue
## Parameters [#parameters]
| Parameter | Type | Description |
| -------------------- | ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `connection` | `Connection` | Solana client connection |
| `txs` | (`VersionedTransaction` \| `Transaction`)\[] | Transactions |
| `confirmationParams` | [`ConfirmationParams`](/docs/api/common/interfaces/ConfirmationParams) | Confirmation Params that will be used for execution |
| `throttleParams` | [`ThrottleParams`](/docs/api/common/interfaces/ThrottleParams) | rate or throttler instance to throttle TX sending - to not spam the blockchain too much |
## Returns [#returns]
`Promise`\<`PromiseSettledResult`\<`string`>\[]>
Raw Promise Results - should be handled by the consumer and unwrapped accordingly
# executeTransaction()
URL: /docs/api/common/functions/executeTransaction
# executeTransaction() [#executetransaction]
```ts
function executeTransaction(
connection,
tx,
confirmationParams,
transactionExecutionParams): Promise;
```
Defined in: [utils.ts:223](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L223)
Sends and confirms Transaction
Uses custom confirmation logic that:
* simulates tx before sending separately
* sends transaction without preFlight checks but with some valuable flags [https://twitter.com/jordaaash/status/1774892862049800524?s=46\&t=bhZ10V0r7IX5Lk5kKzxfGw](https://twitter.com/jordaaash/status/1774892862049800524?s=46\&t=bhZ10V0r7IX5Lk5kKzxfGw)
* rebroadcasts a tx every 500 ms
* after broadcasting check whether tx has executed once
* catch errors for every actionable item, throw only the ones that signal that tx has failed
* otherwise there is a chance of marking a landed tx as failed if it was broadcasted at least once
## Parameters [#parameters]
| Parameter | Type | Description |
| ---------------------------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `connection` | `Connection` | Solana client connection |
| `tx` | `VersionedTransaction` \| `Transaction` | Transaction instance |
| `confirmationParams` | [`ConfirmationParams`](/docs/api/common/interfaces/ConfirmationParams) | Confirmation Params that will be used for execution |
| `transactionExecutionParams` | [`TransactionExecutionParams`](/docs/api/common/interfaces/TransactionExecutionParams) | rate or throttler instance to throttle TX sending - to not spam the blockchain too much and solana execution params (eg. skipSimulation) |
## Returns [#returns]
`Promise`\<`string`>
Transaction signature
# fetchTokenPrice()
URL: /docs/api/common/functions/fetchTokenPrice
# fetchTokenPrice() [#fetchtokenprice]
```ts
function fetchTokenPrice(
mintId,
cluster?,
options?): Promise;
```
Defined in: [fetch-token-price.ts:14](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/fetch-token-price.ts#L14)
## Parameters [#parameters]
| Parameter | Type | Default value |
| ---------- | ------------------------------------------------------------------------------ | ------------------ |
| `mintId` | `string` | `undefined` |
| `cluster` | [`ICluster`](/docs/api/common/enumerations/ICluster) | `ICluster.Mainnet` |
| `options?` | [`FetchTokenPriceOptions`](/docs/api/common/interfaces/FetchTokenPriceOptions) | `undefined` |
## Returns [#returns]
`Promise`\<[`TokenPriceResult`](/docs/api/common/type-aliases/TokenPriceResult)>
# generateCreateAtaBatchTx()
URL: /docs/api/common/functions/generateCreateAtaBatchTx
# generateCreateAtaBatchTx() [#generatecreateatabatchtx]
```ts
function generateCreateAtaBatchTx(
connection,
payer,
paramsBatch,
commitment?): Promise<{
context: Context;
hash: BlockhashWithExpiryBlockHeight;
tx: VersionedTransaction;
}>;
```
Defined in: [utils.ts:484](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L484)
Generates a Transaction to create ATA for an array of owners
## Parameters [#parameters]
| Parameter | Type | Description |
| ------------- | ------------------------------------------------------- | -------------------------------------------------------- |
| `connection` | `Connection` | Solana client connection |
| `payer` | `PublicKey` | Transaction invoker, should be a signer |
| `paramsBatch` | [`AtaParams`](/docs/api/common/interfaces/AtaParams)\[] | Array of Params for an each ATA account: \{mint, owner} |
| `commitment?` | `Commitment` | optional commitment that will be used to fetch Blockhash |
## Returns [#returns]
`Promise`\<\{
`context`: `Context`;
`hash`: `BlockhashWithExpiryBlockHeight`;
`tx`: `VersionedTransaction`;
}>
Unsigned Transaction with create ATA instructions
# getBN()
URL: /docs/api/common/functions/getBN
# getBN() [#getbn]
```ts
function getBN(value, decimals): BN;
```
Defined in: [utils.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/utils.ts#L11)
Used for conversion of token amounts to their Big Number representation.
Get Big Number representation in the smallest units from the same value in the highest units.
## Parameters [#parameters]
| Parameter | Type | Description |
| ---------- | -------- | -------------------------------------------------------------- |
| `value` | `number` | Number of tokens you want to convert to its BN representation. |
| `decimals` | `number` | Number of decimals the token has. |
## Returns [#returns]
`BN`
# getFilters()
URL: /docs/api/common/functions/getFilters
# getFilters() [#getfilters]
```ts
function getFilters(criteria, byteOffsets): MemcmpFilter[];
```
Defined in: [account-filters.ts:3](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/account-filters.ts#L3)
## Type Parameters [#type-parameters]
| Type Parameter |
| ---------------------------------------------------------- |
| `T` *extends* `Record`\<`string`, `number` \| `PublicKey`> |
## Parameters [#parameters]
| Parameter | Type |
| ------------- | ------------------------------ |
| `criteria` | `T` |
| `byteOffsets` | `Record`\ |
## Returns [#returns]
`MemcmpFilter`\[]
# getMintAndProgram()
URL: /docs/api/common/functions/getMintAndProgram
# getMintAndProgram() [#getmintandprogram]
```ts
function getMintAndProgram(
connection,
address,
commitment?): Promise<{
mint: Mint;
tokenProgramId: PublicKey;
}>;
```
Defined in: [utils.ts:598](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L598)
Retrieve information about a mint and its program ID, supports all Token Programs.
## Parameters [#parameters]
| Parameter | Type | Description |
| ------------- | ------------ | -------------------------------------------------- |
| `connection` | `Connection` | Connection to use |
| `address` | `PublicKey` | Mint account |
| `commitment?` | `Commitment` | Desired level of commitment for querying the state |
## Returns [#returns]
`Promise`\<\{
`mint`: `Mint`;
`tokenProgramId`: `PublicKey`;
}>
Mint information
# getMultipleAccountsInfoBatched()
URL: /docs/api/common/functions/getMultipleAccountsInfoBatched
# getMultipleAccountsInfoBatched() [#getmultipleaccountsinfobatched]
```ts
function getMultipleAccountsInfoBatched(
connection,
pubKeys,
commitment?): Promise>[]>;
```
Defined in: [utils.ts:624](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L624)
Split fetching of Multiple Accounts Info into batches of 100
as the maximum number of accounts that can be fetched in a single call is 100
## Parameters [#parameters]
| Parameter | Type | Description |
| ------------- | -------------- | -------------------------------------------------- |
| `connection` | `Connection` | Connection to use |
| `pubKeys` | `PublicKey`\[] | Array of public keys to fetch account info for |
| `commitment?` | `Commitment` | Desired level of commitment for querying the state |
## Returns [#returns]
`Promise`\<`AccountInfo`\<`Buffer`\<`ArrayBufferLike`>>\[]>
Array of AccountInfo objects
# getNumberFromBN()
URL: /docs/api/common/functions/getNumberFromBN
# getNumberFromBN() [#getnumberfrombn]
```ts
function getNumberFromBN(value, decimals): number;
```
Defined in: [utils.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/utils.ts#L28)
Used for token amounts conversion from their Big Number representation to number.
Get value in the highest units from BN representation of the same value in the smallest units.
## Parameters [#parameters]
| Parameter | Type | Description |
| ---------- | -------- | --------------------------------------------------------- |
| `value` | `BN` | Big Number representation of value in the smallest units. |
| `decimals` | `number` | Number of decimals the token has. |
## Returns [#returns]
`number`
# getProgramAccounts()
URL: /docs/api/common/functions/getProgramAccounts
# getProgramAccounts() [#getprogramaccounts]
```ts
function getProgramAccounts(
connection,
wallet,
offset,
programId): Promise;
```
Defined in: [utils.ts:61](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L61)
Wrapper function for Solana web3 getProgramAccounts with slightly better call interface
## Parameters [#parameters]
| Parameter | Type | Description |
| ------------ | ------------ | ------------------------------------------------------ |
| `connection` | `Connection` | Solana web3 connection object. |
| `wallet` | `PublicKey` | PublicKey to compare against. |
| `offset` | `number` | Offset of bits of the PublicKey in the account binary. |
| `programId` | `PublicKey` | Solana program ID. |
## Returns [#returns]
`Promise`\<[`Account`](/docs/api/common/interfaces/Account)\[]>
* Array of resulting accounts.
# handleContractError()
URL: /docs/api/common/functions/handleContractError
# handleContractError() [#handlecontracterror]
```ts
function handleContractError(func, callback?): Promise;
```
Defined in: [utils.ts:37](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/utils.ts#L37)
Used to make on chain calls to the contract and wrap raised errors if any
## Type Parameters [#type-parameters]
| Type Parameter |
| -------------- |
| `T` |
## Parameters [#parameters]
| Parameter | Type | Description |
| ----------- | --------------------- | ----------------------------------------------- |
| `func` | () => `Promise`\<`T`> | function that interacts with the contract |
| `callback?` | (`err`) => `string` | callback that may be used to extract error code |
## Returns [#returns]
`Promise`\<`T`>
# isSignerKeypair()
URL: /docs/api/common/functions/isSignerKeypair
# isSignerKeypair() [#issignerkeypair]
```ts
function isSignerKeypair(walletOrKeypair): walletOrKeypair is Keypair;
```
Defined in: [utils.ts:95](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L95)
Utility function to check if the transaction initiator a Keypair object, tries to mitigate version mismatch issues
## Parameters [#parameters]
| Parameter | Type | Description | |
| ----------------- | ---------------------------------- | ----------- | -------------------------------------------------------------------- |
| `walletOrKeypair` | `Keypair` \| `SignerWalletAdapter` | \{Keypair | SignerWalletAdapter} walletOrKeypair - Wallet or Keypair in question |
## Returns [#returns]
`walletOrKeypair is Keypair`
* Returns true if parameter is a Keypair.
# isSignerWallet()
URL: /docs/api/common/functions/isSignerWallet
# isSignerWallet() [#issignerwallet]
```ts
function isSignerWallet(walletOrKeypair): walletOrKeypair is SignerWalletAdapter;
```
Defined in: [utils.ts:86](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L86)
Utility function to check if the transaction initiator is a Wallet object
## Parameters [#parameters]
| Parameter | Type | Description |
| ----------------- | ---------------------------------- | ----------------------------- |
| `walletOrKeypair` | `Keypair` \| `SignerWalletAdapter` | Wallet or Keypair in question |
## Returns [#returns]
`walletOrKeypair is SignerWalletAdapter`
* Returns true if parameter is a Wallet.
# isTransactionVersioned()
URL: /docs/api/common/functions/isTransactionVersioned
# isTransactionVersioned() [#istransactionversioned]
```ts
function isTransactionVersioned(tx): tx is VersionedTransaction;
```
Defined in: [utils.ts:108](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L108)
Utility function to check whether given transaction is Versioned
## Parameters [#parameters]
| Parameter | Type | Description | |
| --------- | --------------------------------------- | ------------- | -------------------------------------------- |
| `tx` | `VersionedTransaction` \| `Transaction` | \{Transaction | VersionedTransaction} - Transaction to check |
## Returns [#returns]
`tx is VersionedTransaction`
* Returns true if transaction is Versioned.
# multiplyBigIntByNumber()
URL: /docs/api/common/functions/multiplyBigIntByNumber
# multiplyBigIntByNumber() [#multiplybigintbynumber]
```ts
function multiplyBigIntByNumber(
x,
y,
scaleDigits?): bigint;
```
Defined in: [utils.ts:69](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/utils.ts#L69)
Multiply a bigint by a JS number using string-based fixed-point to avoid overflow/precision issues.
Returns floor(x \* y).
## Parameters [#parameters]
| Parameter | Type | Default value |
| ------------- | -------- | ------------- |
| `x` | `bigint` | `undefined` |
| `y` | `number` | `undefined` |
| `scaleDigits` | `number` | `9` |
## Returns [#returns]
`bigint`
# pk()
URL: /docs/api/common/functions/pk
# pk() [#pk]
```ts
function pk(address): PublicKey;
```
Defined in: [public-key.ts:8](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/lib/public-key.ts#L8)
Converts a string or PublicKey to a PublicKey object.
## Parameters [#parameters]
| Parameter | Type | Description |
| --------- | ----------------------- | ------------------------------------------- |
| `address` | `string` \| `PublicKey` | The input address as a string or PublicKey. |
## Returns [#returns]
`PublicKey`
The PublicKey object.
# prepareBaseInstructions()
URL: /docs/api/common/functions/prepareBaseInstructions
# prepareBaseInstructions() [#preparebaseinstructions]
```ts
function prepareBaseInstructions(connection, __namedParameters): TransactionInstruction[];
```
Defined in: [utils.ts:573](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L573)
Create Base instructions for Solana
* sets compute price if `computePrice` is provided. If `computePrice` is a function, it will be ignored (the value must be resolved before calling this function).
* sets compute limit if `computeLimit` is provided. If `computeLimit` is a function, it will be ignored (the value must be resolved before calling this function).
## Parameters [#parameters]
| Parameter | Type |
| ------------------- | ---------------------------------------------------------------- |
| `connection` | `Connection` |
| `__namedParameters` | [`ITransactionExt`](/docs/api/common/interfaces/ITransactionExt) |
## Returns [#returns]
`TransactionInstruction`\[]
# prepareTransaction()
URL: /docs/api/common/functions/prepareTransaction
# prepareTransaction() [#preparetransaction]
```ts
function prepareTransaction(
connection,
ixs,
payer,
commitment?,
partialSigners?,
lookupTables?): Promise<{
context: Context;
hash: BlockhashWithExpiryBlockHeight;
tx: VersionedTransaction;
}>;
```
Defined in: [utils.ts:122](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L122)
Creates a Transaction with given instructions and optionally signs it.
## Parameters [#parameters]
| Parameter | Type | Description |
| ----------------- | ------------------------------ | ------------------------------------------------------------------ |
| `connection` | `Connection` | Solana client connection |
| `ixs` | `TransactionInstruction`\[] | Instructions to add to the Transaction |
| `payer` | `PublicKey` | PublicKey of payer |
| `commitment?` | `Commitment` | optional Commitment that will be used to fetch latest blockhash |
| `partialSigners?` | `Keypair`\[] | optional signers that will be used to partially sign a Transaction |
| `lookupTables?` | `AddressLookupTableAccount`\[] | lookup table accounts to use in the transaction |
## Returns [#returns]
`Promise`\<\{
`context`: `Context`;
`hash`: `BlockhashWithExpiryBlockHeight`;
`tx`: `VersionedTransaction`;
}>
Transaction and Blockhash
# prepareWrappedAccount()
URL: /docs/api/common/functions/prepareWrappedAccount
# prepareWrappedAccount() [#preparewrappedaccount]
```ts
function prepareWrappedAccount(
connection,
senderAddress,
amount): Promise;
```
Defined in: [instructions.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/instructions.ts#L11)
## Parameters [#parameters]
| Parameter | Type |
| --------------- | ------------ |
| `connection` | `Connection` |
| `senderAddress` | `PublicKey` |
| `amount` | `BN` |
## Returns [#returns]
`Promise`\<`TransactionInstruction`\[]>
# resolveTransactionAccounts()
URL: /docs/api/common/functions/resolveTransactionAccounts
# resolveTransactionAccounts() [#resolvetransactionaccounts]
```ts
function resolveTransactionAccounts(tx):
| {
accounts: PublicKey[];
transaction: Transaction;
type: string;
writableAccounts: PublicKey[];
}
| {
accounts: PublicKey[];
transaction: VersionedTransaction;
type: string;
writableAccounts: PublicKey[];
};
```
Defined in: [deserialize-raw-transaction.ts:25](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/lib/deserialize-raw-transaction.ts#L25)
## Parameters [#parameters]
| Parameter | Type |
| --------- | --------------------------------------- |
| `tx` | `VersionedTransaction` \| `Transaction` |
## Returns [#returns]
\| \{
`accounts`: `PublicKey`\[];
`transaction`: `Transaction`;
`type`: `string`;
`writableAccounts`: `PublicKey`\[];
}
\| \{
`accounts`: `PublicKey`\[];
`transaction`: `VersionedTransaction`;
`type`: `string`;
`writableAccounts`: `PublicKey`\[];
}
# sendAndConfirmTransaction()
URL: /docs/api/common/functions/sendAndConfirmTransaction
# sendAndConfirmTransaction() [#sendandconfirmtransaction]
```ts
function sendAndConfirmTransaction(
connection,
tx,
confirmationParams,
throttleParams): Promise;
```
Defined in: [utils.ts:281](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L281)
Sends and confirm transaction in a loop, constantly re-broadcsting the tx until Blockheight expires.
* we add additional 30 bocks to account for validators in an PRC pool divergence
## Parameters [#parameters]
| Parameter | Type | Description |
| -------------------- | ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `connection` | `Connection` | Solana client connection |
| `tx` | `VersionedTransaction` \| `Transaction` | Transaction instance |
| `confirmationParams` | [`ConfirmationParams`](/docs/api/common/interfaces/ConfirmationParams) | Confirmation Params that will be used for execution |
| `throttleParams` | [`ThrottleParams`](/docs/api/common/interfaces/ThrottleParams) | rate or throttler instance to throttle TX sending - to not spam the blockchain too much |
## Returns [#returns]
`Promise`\<`string`>
# signAndExecuteTransaction()
URL: /docs/api/common/functions/signAndExecuteTransaction
# signAndExecuteTransaction() [#signandexecutetransaction]
```ts
function signAndExecuteTransaction(
connection,
invoker,
tx,
confirmationParams,
transactionExecutionParams): Promise;
```
Defined in: [utils.ts:196](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L196)
Signs, sends and confirms Transaction
## Parameters [#parameters]
| Parameter | Type | Description |
| ---------------------------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `connection` | `Connection` | Solana client connection |
| `invoker` | `Keypair` \| `SignerWalletAdapter` | Keypair used as signer |
| `tx` | `VersionedTransaction` \| `Transaction` | Transaction instance |
| `confirmationParams` | [`ConfirmationParams`](/docs/api/common/interfaces/ConfirmationParams) | Confirmation Params that will be used for execution |
| `transactionExecutionParams` | [`TransactionExecutionParams`](/docs/api/common/interfaces/TransactionExecutionParams) | rate or throttler instance to throttle TX sending - to not spam the blockchain too much and solana execution params (eg. skipSimulation) |
## Returns [#returns]
`Promise`\<`string`>
Transaction signature
# signTransaction()
URL: /docs/api/common/functions/signTransaction
# signTransaction() [#signtransaction]
```ts
function signTransaction(invoker, tx): Promise;
```
Defined in: [utils.ts:169](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L169)
## Type Parameters [#type-parameters]
| Type Parameter |
| ----------------------------------------------------- |
| `T` *extends* `VersionedTransaction` \| `Transaction` |
## Parameters [#parameters]
| Parameter | Type |
| --------- | ---------------------------------- |
| `invoker` | `Keypair` \| `SignerWalletAdapter` |
| `tx` | `T` |
## Returns [#returns]
`Promise`\<`T`>
# simulateTransaction()
URL: /docs/api/common/functions/simulateTransaction
# simulateTransaction() [#simulatetransaction]
```ts
function simulateTransaction(connection, tx): Promise>;
```
Defined in: [utils.ts:348](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/utils.ts#L348)
## Parameters [#parameters]
| Parameter | Type |
| ------------ | --------------------------------------- |
| `connection` | `Connection` |
| `tx` | `VersionedTransaction` \| `Transaction` |
## Returns [#returns]
`Promise`\<`RpcResponseAndContext`\<`SimulatedTransactionResponse`>>
# sleep()
URL: /docs/api/common/functions/sleep
# sleep() [#sleep]
```ts
function sleep(ms): Promise;
```
Defined in: [utils.ts:59](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/utils.ts#L59)
Pause async function execution for given amount of milliseconds
## Parameters [#parameters]
| Parameter | Type | Description |
| --------- | -------- | ------------------------ |
| `ms` | `number` | millisecond to sleep for |
## Returns [#returns]
`Promise`\<`void`>
# unwrapExecutionParams()
URL: /docs/api/common/functions/unwrapExecutionParams
# unwrapExecutionParams() [#unwrapexecutionparams]
```ts
function unwrapExecutionParams(__namedParameters, connection): UnwrapAutoSimulate;
```
Defined in: [unwrap-auto-simulate-ext.ts:10](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/lib/unwrap-auto-simulate-ext.ts#L10)
## Type Parameters [#type-parameters]
| Type Parameter |
| ------------------------------------------------------------------------ |
| `T` *extends* [`IInteractExt`](/docs/api/common/interfaces/IInteractExt) |
## Parameters [#parameters]
| Parameter | Type |
| ------------------- | ------------ |
| `__namedParameters` | `T` |
| `connection` | `Connection` |
## Returns [#returns]
`UnwrapAutoSimulate`\<`T`>
# index
URL: /docs/api/common
# @streamflow/common v11.3.1 [#streamflowcommon-v1131]
## Enumerations [#enumerations]
* [ICluster](/docs/api/common/enumerations/ICluster)
## Classes [#classes]
* [ContractError](/docs/api/common/classes/ContractError)
* [TransactionFailedError](/docs/api/common/classes/TransactionFailedError)
## Interfaces [#interfaces]
* [Account](/docs/api/common/interfaces/Account)
* [AtaParams](/docs/api/common/interfaces/AtaParams)
* [CheckAssociatedTokenAccountsData](/docs/api/common/interfaces/CheckAssociatedTokenAccountsData)
* [ConfirmationParams](/docs/api/common/interfaces/ConfirmationParams)
* [FetchTokenPriceOptions](/docs/api/common/interfaces/FetchTokenPriceOptions)
* [IInteractExt](/docs/api/common/interfaces/IInteractExt)
* [IPrepareResult](/docs/api/common/interfaces/IPrepareResult)
* [IProgramAccount](/docs/api/common/interfaces/IProgramAccount)
* [ITransactionExt](/docs/api/common/interfaces/ITransactionExt)
* [ITransactionResult](/docs/api/common/interfaces/ITransactionResult)
* [ThrottleParams](/docs/api/common/interfaces/ThrottleParams)
* [TransactionExecutionParams](/docs/api/common/interfaces/TransactionExecutionParams)
## Type Aliases [#type-aliases]
* [ComputeLimitEstimate](/docs/api/common/type-aliases/ComputeLimitEstimate)
* [ComputePriceEstimate](/docs/api/common/type-aliases/ComputePriceEstimate)
* [IdlAccountsOfMethod](/docs/api/common/type-aliases/IdlAccountsOfMethod)
* [IdlArgsOfMethod](/docs/api/common/type-aliases/IdlArgsOfMethod)
* [IdlInstruction](/docs/api/common/type-aliases/IdlInstruction)
* [ITransactionExtResolved](/docs/api/common/type-aliases/ITransactionExtResolved)
* [PartnerOracle](/docs/api/common/type-aliases/PartnerOracle)
* [PartnerOracleAccounts](/docs/api/common/type-aliases/PartnerOracleAccounts)
* [PartnerOracleTypes](/docs/api/common/type-aliases/PartnerOracleTypes)
* [TokenPriceResult](/docs/api/common/type-aliases/TokenPriceResult)
* [TokensPricesResponse](/docs/api/common/type-aliases/TokensPricesResponse)
## Variables [#variables]
* [invariant](/docs/api/common/variables/invariant)
* [isDev](/docs/api/common/variables/isDev)
## Functions [#functions]
* [assertHasPublicKey](/docs/api/common/functions/assertHasPublicKey)
* [ata](/docs/api/common/functions/ata)
* [ataBatchExist](/docs/api/common/functions/ataBatchExist)
* [buildPartnerOracle](/docs/api/common/functions/buildPartnerOracle)
* [buildSendThrottler](/docs/api/common/functions/buildSendThrottler)
* [checkOrCreateAtaBatch](/docs/api/common/functions/checkOrCreateAtaBatch)
* [confirmAndEnsureTransaction](/docs/api/common/functions/confirmAndEnsureTransaction)
* [createAndEstimateTransaction](/docs/api/common/functions/createAndEstimateTransaction)
* [createAtaBatch](/docs/api/common/functions/createAtaBatch)
* [createVersionedTransaction](/docs/api/common/functions/createVersionedTransaction)
* [deserializeRawTransaction](/docs/api/common/functions/deserializeRawTransaction)
* [divCeilN](/docs/api/common/functions/divCeilN)
* [enrichAtaParams](/docs/api/common/functions/enrichAtaParams)
* [estimateComputeUnitPrice](/docs/api/common/functions/estimateComputeUnitPrice)
* [executeMultipleTransactions](/docs/api/common/functions/executeMultipleTransactions)
* [executeTransaction](/docs/api/common/functions/executeTransaction)
* [fetchTokenPrice](/docs/api/common/functions/fetchTokenPrice)
* [generateCreateAtaBatchTx](/docs/api/common/functions/generateCreateAtaBatchTx)
* [getBN](/docs/api/common/functions/getBN)
* [getFilters](/docs/api/common/functions/getFilters)
* [getMintAndProgram](/docs/api/common/functions/getMintAndProgram)
* [getMultipleAccountsInfoBatched](/docs/api/common/functions/getMultipleAccountsInfoBatched)
* [getNumberFromBN](/docs/api/common/functions/getNumberFromBN)
* [getProgramAccounts](/docs/api/common/functions/getProgramAccounts)
* [handleContractError](/docs/api/common/functions/handleContractError)
* [isSignerKeypair](/docs/api/common/functions/isSignerKeypair)
* [isSignerWallet](/docs/api/common/functions/isSignerWallet)
* [isTransactionVersioned](/docs/api/common/functions/isTransactionVersioned)
* [multiplyBigIntByNumber](/docs/api/common/functions/multiplyBigIntByNumber)
* [pk](/docs/api/common/functions/pk)
* [prepareBaseInstructions](/docs/api/common/functions/prepareBaseInstructions)
* [prepareTransaction](/docs/api/common/functions/prepareTransaction)
* [prepareWrappedAccount](/docs/api/common/functions/prepareWrappedAccount)
* [resolveTransactionAccounts](/docs/api/common/functions/resolveTransactionAccounts)
* [sendAndConfirmTransaction](/docs/api/common/functions/sendAndConfirmTransaction)
* [signAndExecuteTransaction](/docs/api/common/functions/signAndExecuteTransaction)
* [signTransaction](/docs/api/common/functions/signTransaction)
* [simulateTransaction](/docs/api/common/functions/simulateTransaction)
* [sleep](/docs/api/common/functions/sleep)
* [unwrapExecutionParams](/docs/api/common/functions/unwrapExecutionParams)
# Account
URL: /docs/api/common/interfaces/Account
# Account [#account]
Defined in: [types.ts:60](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L60)
## Properties [#properties]
| Property | Type | Defined in |
| ---------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `account` | `AccountInfo`\<`Buffer`\<`ArrayBufferLike`>> | [packages/common/solana/types.ts:62](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L62) |
| `pubkey` | `PublicKey` | [packages/common/solana/types.ts:61](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L61) |
# AtaParams
URL: /docs/api/common/interfaces/AtaParams
# AtaParams [#ataparams]
Defined in: [types.ts:73](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L73)
## Properties [#properties]
| Property | Type | Defined in |
| --------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `mint` | `PublicKey` | [packages/common/solana/types.ts:74](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L74) |
| `owner` | `PublicKey` | [packages/common/solana/types.ts:75](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L75) |
| `programId?` | `PublicKey` | [packages/common/solana/types.ts:76](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L76) |
# CheckAssociatedTokenAccountsData
URL: /docs/api/common/interfaces/CheckAssociatedTokenAccountsData
# CheckAssociatedTokenAccountsData [#checkassociatedtokenaccountsdata]
Defined in: [types.ts:65](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L65)
## Properties [#properties]
| Property | Type | Defined in |
| -------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `mint` | `PublicKey` | [packages/common/solana/types.ts:70](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L70) |
| `partner` | `PublicKey` | [packages/common/solana/types.ts:68](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L68) |
| `recipient` | `PublicKey` | [packages/common/solana/types.ts:67](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L67) |
| `sender` | `PublicKey` | [packages/common/solana/types.ts:66](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L66) |
| `streamflowTreasury` | `PublicKey` | [packages/common/solana/types.ts:69](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L69) |
# ConfirmationParams
URL: /docs/api/common/interfaces/ConfirmationParams
# ConfirmationParams [#confirmationparams]
Defined in: [types.ts:79](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L79)
## Properties [#properties]
| Property | Type | Defined in |
| ----------------------------------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `commitment?` | `Commitment` | [packages/common/solana/types.ts:82](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L82) |
| `context` | `Context` | [packages/common/solana/types.ts:81](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L81) |
| `hash` | `BlockhashWithExpiryBlockHeight` | [packages/common/solana/types.ts:80](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L80) |
# FetchTokenPriceOptions
URL: /docs/api/common/interfaces/FetchTokenPriceOptions
# FetchTokenPriceOptions [#fetchtokenpriceoptions]
Defined in: [fetch-token-price.ts:9](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/fetch-token-price.ts#L9)
## Properties [#properties]
| Property | Type | Defined in |
| --------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fetchImpl?` | (`input`, `init?`) => `Promise`\<`Response`> | [packages/common/lib/fetch-token-price.ts:10](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/fetch-token-price.ts#L10) |
| `timeoutMs?` | `number` | [packages/common/lib/fetch-token-price.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/fetch-token-price.ts#L11) |
# IInteractExt
URL: /docs/api/common/interfaces/IInteractExt
# IInteractExt [#iinteractext]
Defined in: [types.ts:54](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L54)
Additional parameter for Solana Transaction processing.
computePrice - compute price per CU in micro-lamports to be set in a transaction - priority fee, accepts:
* a constant number;
* a callable that returns a price for a built transaction;
computeLimit - compute limit in CUs to set for a transaction, `computePrice` is paid per every allocated CU, accepts:
* a constant number;
* a callable that returns a CU limit for a built transaction;
* `autoSimulate` - will be unwrapped by `unwrapExecutionParams` and converted to a callable that runs a simulation to estimate CUs and set a limit with some margin;
feePayer - account that will be set as sol fee payer in instructions that accept such account, i.e. ATA creation:
* should be only when building instructions via `prepare` methods, as tx executing methods will fail without a signer;
* currently supported only when claiming an Airdrop;
## Extends [#extends]
* [`ITransactionExt`](/docs/api/common/interfaces/ITransactionExt)
## Properties [#properties]
| Property | Type | Inherited from | Defined in |
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `computeLimit?` | \| `number` \| [`ComputeLimitEstimate`](/docs/api/common/type-aliases/ComputeLimitEstimate) \| `"autoSimulate"` | [`ITransactionExt`](/docs/api/common/interfaces/ITransactionExt).[`computeLimit`](/docs/api/common/interfaces/ITransactionExt#computelimit) | [packages/common/solana/types.ts:34](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L34) |
| `computePrice?` | \| `number` \| [`ComputePriceEstimate`](/docs/api/common/type-aliases/ComputePriceEstimate) | [`ITransactionExt`](/docs/api/common/interfaces/ITransactionExt).[`computePrice`](/docs/api/common/interfaces/ITransactionExt#computeprice) | [packages/common/solana/types.ts:33](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L33) |
| `feePayer?` | `PublicKey` | [`ITransactionExt`](/docs/api/common/interfaces/ITransactionExt).[`feePayer`](/docs/api/common/interfaces/ITransactionExt#feepayer) | [packages/common/solana/types.ts:35](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L35) |
| `invoker` | `object` | - | [packages/common/solana/types.ts:55](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L55) |
| `invoker.publicKey` | `string` \| `PublicKey` | - | [packages/common/solana/types.ts:56](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L56) |
# IPrepareResult
URL: /docs/api/common/interfaces/IPrepareResult
# IPrepareResult [#iprepareresult]
Defined in: [types.ts:108](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L108)
## Extended by [#extended-by]
* [`ITransactionResult`](/docs/api/common/interfaces/ITransactionResult)
## Properties [#properties]
| Property | Type | Defined in |
| -------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `ixs` | `TransactionInstruction`\[] | [packages/common/solana/types.ts:109](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L109) |
# IProgramAccount
URL: /docs/api/common/interfaces/IProgramAccount
# IProgramAccount\ [#iprogramaccountt]
Defined in: [types.ts:95](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L95)
## Type Parameters [#type-parameters]
| Type Parameter |
| -------------- |
| `T` |
## Properties [#properties]
| Property | Type | Defined in |
| -------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `account` | `T` | [packages/common/solana/types.ts:97](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L97) |
| `publicKey` | `PublicKey` | [packages/common/solana/types.ts:96](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L96) |
# ITransactionExt
URL: /docs/api/common/interfaces/ITransactionExt
# ITransactionExt [#itransactionext]
Defined in: [types.ts:32](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L32)
Additional parameter for Solana Transaction processing.
computePrice - compute price per CU in micro-lamports to be set in a transaction - priority fee, accepts:
* a constant number;
* a callable that returns a price for a built transaction;
computeLimit - compute limit in CUs to set for a transaction, `computePrice` is paid per every allocated CU, accepts:
* a constant number;
* a callable that returns a CU limit for a built transaction;
* `autoSimulate` - will be unwrapped by `unwrapExecutionParams` and converted to a callable that runs a simulation to estimate CUs and set a limit with some margin;
feePayer - account that will be set as sol fee payer in instructions that accept such account, i.e. ATA creation:
* should be only when building instructions via `prepare` methods, as tx executing methods will fail without a signer;
* currently supported only when claiming an Airdrop;
## Extended by [#extended-by]
* [`IInteractExt`](/docs/api/common/interfaces/IInteractExt)
## Properties [#properties]
| Property | Type | Defined in |
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `computeLimit?` | \| `number` \| [`ComputeLimitEstimate`](/docs/api/common/type-aliases/ComputeLimitEstimate) \| `"autoSimulate"` | [packages/common/solana/types.ts:34](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L34) |
| `computePrice?` | \| `number` \| [`ComputePriceEstimate`](/docs/api/common/type-aliases/ComputePriceEstimate) | [packages/common/solana/types.ts:33](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L33) |
| `feePayer?` | `PublicKey` | [packages/common/solana/types.ts:35](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L35) |
# ITransactionResult
URL: /docs/api/common/interfaces/ITransactionResult
# ITransactionResult [#itransactionresult]
Defined in: [types.ts:112](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L112)
## Extends [#extends]
* [`IPrepareResult`](/docs/api/common/interfaces/IPrepareResult)
## Properties [#properties]
| Property | Type | Inherited from | Defined in |
| ---------------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `ixs` | `TransactionInstruction`\[] | [`IPrepareResult`](/docs/api/common/interfaces/IPrepareResult).[`ixs`](/docs/api/common/interfaces/IPrepareResult#ixs) | [packages/common/solana/types.ts:109](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L109) |
| `txId` | `string` | - | [packages/common/solana/types.ts:113](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L113) |
# ThrottleParams
URL: /docs/api/common/interfaces/ThrottleParams
# ThrottleParams [#throttleparams]
Defined in: [types.ts:85](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L85)
## Extended by [#extended-by]
* [`TransactionExecutionParams`](/docs/api/common/interfaces/TransactionExecutionParams)
## Properties [#properties]
| Property | Type | Defined in |
| ------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `sendRate?` | `number` | [packages/common/solana/types.ts:86](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L86) |
| `sendThrottler?` | `PQueue` | [packages/common/solana/types.ts:87](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L87) |
| `waitBeforeConfirming?` | `number` | [packages/common/solana/types.ts:88](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L88) |
# TransactionExecutionParams
URL: /docs/api/common/interfaces/TransactionExecutionParams
# TransactionExecutionParams [#transactionexecutionparams]
Defined in: [types.ts:91](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L91)
## Extends [#extends]
* [`ThrottleParams`](/docs/api/common/interfaces/ThrottleParams)
## Properties [#properties]
| Property | Type | Inherited from | Defined in |
| ------------------------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `sendRate?` | `number` | [`ThrottleParams`](/docs/api/common/interfaces/ThrottleParams).[`sendRate`](/docs/api/common/interfaces/ThrottleParams#sendrate) | [packages/common/solana/types.ts:86](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L86) |
| `sendThrottler?` | `PQueue` | [`ThrottleParams`](/docs/api/common/interfaces/ThrottleParams).[`sendThrottler`](/docs/api/common/interfaces/ThrottleParams#sendthrottler) | [packages/common/solana/types.ts:87](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L87) |
| `skipSimulation?` | `boolean` | - | [packages/common/solana/types.ts:92](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L92) |
| `waitBeforeConfirming?` | `number` | [`ThrottleParams`](/docs/api/common/interfaces/ThrottleParams).[`waitBeforeConfirming`](/docs/api/common/interfaces/ThrottleParams#waitbeforeconfirming) | [packages/common/solana/types.ts:88](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L88) |
# estimateConsumeLimit()
URL: /docs/api/common/solana/rpc/functions/estimateConsumeLimit
# estimateConsumeLimit() [#estimateconsumelimit]
```ts
function estimateConsumeLimit(
connection,
tx,
options?): Promise<{
data: RpcResponseAndContext;
unitsConsumed: number;
}>;
```
Defined in: [estimate.ts:12](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/rpc/consume-limit-estimate/estimate.ts#L12)
Estimate the consume limit of a transaction based on the simulation results of the transaction.
## Parameters [#parameters]
| Parameter | Type | Description |
| ------------ | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| `connection` | `Connection` | The connection to the RPC |
| `tx` | `VersionedTransaction` | The transaction to estimate the consume limit for |
| `options` | [`GetConsumeLimitEstimateOptions`](/docs/api/common/solana/rpc/interfaces/GetConsumeLimitEstimateOptions) | The options for the estimate |
## Returns [#returns]
`Promise`\<\{
`data`: `RpcResponseAndContext`\<`SimulatedTransactionResponse`>;
`unitsConsumed`: `number`;
}>
The consume limit estimate multiplied by a multiplier percent or undefined and the native simulation results
# solana/rpc
URL: /docs/api/common/solana/rpc
# solana/rpc [#solanarpc]
## Namespaces [#namespaces]
* [priorityFeeEstimation](/docs/api/common/solana/rpc/namespaces/priorityFeeEstimation/index)
* [priorityFeeEstimationPercentile](/docs/api/common/solana/rpc/namespaces/priorityFeeEstimationPercentile/index)
## Interfaces [#interfaces]
* [GetConsumeLimitEstimateOptions](/docs/api/common/solana/rpc/interfaces/GetConsumeLimitEstimateOptions)
* [GetPriorityFeeEstimateOptions](/docs/api/common/solana/rpc/interfaces/GetPriorityFeeEstimateOptions)
## Functions [#functions]
* [estimateConsumeLimit](/docs/api/common/solana/rpc/functions/estimateConsumeLimit)
# GetConsumeLimitEstimateOptions
URL: /docs/api/common/solana/rpc/interfaces/GetConsumeLimitEstimateOptions
# GetConsumeLimitEstimateOptions [#getconsumelimitestimateoptions]
Defined in: [types.ts:31](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/rpc/types.ts#L31)
GetConsumeLimitEstimateOptions - The options for the consume limit estimate
## Properties [#properties]
| Property | Type | Description | Defined in |
| ------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `increaseFactor?` | `number` | The multiplier to apply to the consume limit estimate. The result is multiplied by 1 + increaseFactor. **Default** `0.05 = 5%` | [packages/common/solana/rpc/types.ts:37](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/rpc/types.ts#L37) |
# GetPriorityFeeEstimateOptions
URL: /docs/api/common/solana/rpc/interfaces/GetPriorityFeeEstimateOptions
# GetPriorityFeeEstimateOptions [#getpriorityfeeestimateoptions]
Defined in: [types.ts:6](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/rpc/types.ts#L6)
GetPriorityFeeEstimateOptions - The options for the priority fee estimate
## Properties [#properties]
| Property | Type | Description | Defined in |
| ------------------------------------------- | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `accountsOrTx` | `string` \| (`string` \| `PublicKey`)\[] | The accounts or transaction to get the priority fee estimate for. `string` is a serialized base64 transaction. `array` is interpreted as an array of public keys in string format or as PublicKey instances (writable accounts). | [packages/common/solana/rpc/types.ts:12](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/rpc/types.ts#L12) |
| `increaseFactor?` | `number` | The multiplier to apply to the priority fee estimate. The result is multiplied by 1 + increaseFactor. **Default** `0.05 = 5%` | [packages/common/solana/rpc/types.ts:25](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/rpc/types.ts#L25) |
| `percentile?` | `number` | The percentile of the priority fee estimate to return. examples: Triton RPC - \[0, 10000] **Default** `5000` | [packages/common/solana/rpc/types.ts:19](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/rpc/types.ts#L19) |
# ~~Function: getPriorityFeeEstimate()~~
URL: /docs/api/common/solana/rpc/namespaces/priorityFeeEstimation/functions/getPriorityFeeEstimate
# ~~Function: getPriorityFeeEstimate()~~ [#function-getpriorityfeeestimate]
```ts
function getPriorityFeeEstimate(connection, options): Promise<{
data: RecentPrioritizationFees[];
median: number;
}>;
```
Defined in: [general.ts:15](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/rpc/priority-fee-estimate/general.ts#L15)
Fetch the recent prioritization fees from the RPC \[getRecentPrioritizationFees] ([https://solana.com/docs/rpc/http/getrecentprioritizationfees](https://solana.com/docs/rpc/http/getrecentprioritizationfees))
## Parameters [#parameters]
| Parameter | Type | Description |
| ------------ | ------------------------------------------------------------------------------------------------------- | ------------------------- |
| `connection` | `Connection` | The connection to the RPC |
| `options` | [`GetPriorityFeeEstimateOptions`](/docs/api/common/solana/rpc/interfaces/GetPriorityFeeEstimateOptions) | The options for the RPC |
## Returns [#returns]
`Promise`\<\{
`data`: `RecentPrioritizationFees`\[];
`median`: `number`;
}>
The priority fee estimate
## Deprecated [#deprecated]
Not recommended for use because it provides a single number per slot to indicate the minimum priority fee amount.
# ~~Function: getRecentPrioritizationFee()~~
URL: /docs/api/common/solana/rpc/namespaces/priorityFeeEstimation/functions/getRecentPrioritizationFee
# ~~Function: getRecentPrioritizationFee()~~ [#function-getrecentprioritizationfee]
```ts
function getRecentPrioritizationFee(connection, options): Promise;
```
Defined in: [general.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/rpc/priority-fee-estimate/general.ts#L28)
Fetch the recent prioritization fees from the RPC \[getRecentPrioritizationFees] ([https://solana.com/docs/rpc/http/getrecentprioritizationfees](https://solana.com/docs/rpc/http/getrecentprioritizationfees))
## Parameters [#parameters]
| Parameter | Type | Description |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
| `connection` | `Connection` | The connection to the RPC |
| `options` | `Pick`\<[`GetPriorityFeeEstimateOptions`](/docs/api/common/solana/rpc/interfaces/GetPriorityFeeEstimateOptions), `"accountsOrTx"`> | The options for the RPC |
## Returns [#returns]
`Promise`\<`RecentPrioritizationFees`\[]>
The priority fee estimate
## Deprecated [#deprecated]
Not recommended for use because it provides a single number per slot to indicate the minimum priority fee amount.
# priorityFeeEstimation
URL: /docs/api/common/solana/rpc/namespaces/priorityFeeEstimation
# priorityFeeEstimation [#priorityfeeestimation]
## Functions [#functions]
* [~~getPriorityFeeEstimate~~](/docs/api/common/solana/rpc/namespaces/priorityFeeEstimation/functions/getPriorityFeeEstimate)
* [~~getRecentPrioritizationFee~~](/docs/api/common/solana/rpc/namespaces/priorityFeeEstimation/functions/getRecentPrioritizationFee)
# getPriorityFeeEstimate()
URL: /docs/api/common/solana/rpc/namespaces/priorityFeeEstimationPercentile/functions/getPriorityFeeEstimate
# getPriorityFeeEstimate() [#getpriorityfeeestimate]
```ts
function getPriorityFeeEstimate(connection, options): Promise<{
data: RecentPrioritizationFee;
median: number;
}>;
```
Defined in: [percentile.ts:26](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/rpc/priority-fee-estimate/percentile.ts#L26)
Fetch the recent prioritization fees from the RPC \[getRecentPrioritizationFees]
## Parameters [#parameters]
| Parameter | Type | Description |
| ------------ | ------------------------------------------------------------------------------------------------------- | ------------------------- |
| `connection` | `Connection` | The connection to the RPC |
| `options` | [`GetPriorityFeeEstimateOptions`](/docs/api/common/solana/rpc/interfaces/GetPriorityFeeEstimateOptions) | The options for the RPC |
## Returns [#returns]
`Promise`\<\{
`data`: `RecentPrioritizationFee`;
`median`: `number`;
}>
The priority fee estimate
# getRecentPrioritizationFee()
URL: /docs/api/common/solana/rpc/namespaces/priorityFeeEstimationPercentile/functions/getRecentPrioritizationFee
# getRecentPrioritizationFee() [#getrecentprioritizationfee]
```ts
function getRecentPrioritizationFee(connection, options): Promise;
```
Defined in: [percentile.ts:38](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/rpc/priority-fee-estimate/percentile.ts#L38)
If an RPC of use supports percentile value, aka [https://docs.triton.one/chains/solana/improved-priority-fees-api](https://docs.triton.one/chains/solana/improved-priority-fees-api)
## Parameters [#parameters]
| Parameter | Type | Description |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
| `connection` | `Connection` | The connection to the RPC |
| `options` | `Pick`\<[`GetPriorityFeeEstimateOptions`](/docs/api/common/solana/rpc/interfaces/GetPriorityFeeEstimateOptions), `"accountsOrTx"` \| `"percentile"`> | The options for the RPC |
## Returns [#returns]
`Promise`\<`RecentPrioritizationFee`>
The priority fee estimate
# priorityFeeEstimationPercentile
URL: /docs/api/common/solana/rpc/namespaces/priorityFeeEstimationPercentile
# priorityFeeEstimationPercentile [#priorityfeeestimationpercentile]
## Functions [#functions]
* [getPriorityFeeEstimate](/docs/api/common/solana/rpc/namespaces/priorityFeeEstimationPercentile/functions/getPriorityFeeEstimate)
* [getRecentPrioritizationFee](/docs/api/common/solana/rpc/namespaces/priorityFeeEstimationPercentile/functions/getRecentPrioritizationFee)
# ComputeLimitEstimate
URL: /docs/api/common/type-aliases/ComputeLimitEstimate
# ComputeLimitEstimate [#computelimitestimate]
```ts
type ComputeLimitEstimate = (tx) => Promise;
```
Defined in: [types.ts:16](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L16)
## Parameters [#parameters]
| Parameter | Type |
| --------- | ---------------------- |
| `tx` | `VersionedTransaction` |
## Returns [#returns]
`Promise`\<`number`>
# ComputePriceEstimate
URL: /docs/api/common/type-aliases/ComputePriceEstimate
# ComputePriceEstimate [#computepriceestimate]
```ts
type ComputePriceEstimate = (tx) => Promise;
```
Defined in: [types.ts:15](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L15)
## Parameters [#parameters]
| Parameter | Type |
| --------- | ---------------------------------------- |
| `tx` | `string` \| (`string` \| `PublicKey`)\[] |
## Returns [#returns]
`Promise`\<`number`>
# ITransactionExtResolved
URL: /docs/api/common/type-aliases/ITransactionExtResolved
# ITransactionExtResolved\ [#itransactionextresolvedt]
```ts
type ITransactionExtResolved = { [AK in keyof KeysNotOfA]: T[AK] } & ITransactionExtResolvedValues;
```
Defined in: [types.ts:50](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L50)
## Type Parameters [#type-parameters]
| Type Parameter | Default type |
| ------------------------------------------------------------------------------ | ---------------------------------------------------------------- |
| `T` *extends* [`ITransactionExt`](/docs/api/common/interfaces/ITransactionExt) | [`ITransactionExt`](/docs/api/common/interfaces/ITransactionExt) |
# IdlAccountsOfMethod
URL: /docs/api/common/type-aliases/IdlAccountsOfMethod
# IdlAccountsOfMethod\ [#idlaccountsofmethodidl-m]
```ts
type IdlAccountsOfMethod = Parameters["methods"][M]>["accounts"]>[0];
```
Defined in: [types.ts:130](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L130)
## Type Parameters [#type-parameters]
| Type Parameter |
| --------------------------------------------------- |
| `IDL` *extends* `Idl` |
| `M` *extends* keyof `Program`\<`IDL`>\[`"methods"`] |
# IdlArgsOfMethod
URL: /docs/api/common/type-aliases/IdlArgsOfMethod
# IdlArgsOfMethod\ [#idlargsofmethodidl-m]
```ts
type IdlArgsOfMethod = Parameters["methods"][M]>;
```
Defined in: [types.ts:133](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L133)
## Type Parameters [#type-parameters]
| Type Parameter |
| --------------------------------------------------- |
| `IDL` *extends* `Idl` |
| `M` *extends* keyof `Program`\<`IDL`>\[`"methods"`] |
# IdlInstruction
URL: /docs/api/common/type-aliases/IdlInstruction
# IdlInstruction\ [#idlinstructionidl-name]
```ts
type IdlInstruction = Extract;
```
Defined in: [types.ts:125](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L125)
## Type Parameters [#type-parameters]
| Type Parameter |
| --------------------------------------------------------------- |
| `IDL` *extends* `Idl` |
| `Name` *extends* `IDL`\[`"instructions"`]\[`number`]\[`"name"`] |
# PartnerOracle
URL: /docs/api/common/type-aliases/PartnerOracle
# PartnerOracle [#partneroracle]
```ts
type PartnerOracle = object;
```
Defined in: [partner\_oracle.ts:7](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/descriptor/partner_oracle.ts#L7)
Program IDL in camelCase format in order to be used in JS/TS.
Note that this is only a type helper and is not the actual IDL. The original
IDL can be found at `target/idl/partner_oracle.json`.
## Properties [#properties]
| Property | Type | Defined in |
| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accounts` | \[\{ `discriminator`: \[`194`, `149`, `223`, `142`, `42`, `98`, `128`, `16`]; `name`: `"airdropConfig"`; }] | [packages/common/solana/descriptor/partner\_oracle.ts:674](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/descriptor/partner_oracle.ts#L674) |
| `address` | `"pardpVtPjC8nLj1Dwncew62mUzfChdCX1EaoZe8oCAa"` | [packages/common/solana/descriptor/partner\_oracle.ts:8](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/descriptor/partner_oracle.ts#L8) |
| `errors` | \[\{ `code`: `6000`; `msg`: `"Account is not authorized to execute this instruction"`; `name`: `"unauthorized"`; }, \{ `code`: `6001`; `msg`: `"Arithmetic Error (overflow/underflow)"`; `name`: `"arithmeticError"`; }, \{ `code`: `6100`; `msg`: `"Provided expiry ts is invalid"`; `name`: `"invalidExpiry"`; }, \{ `code`: `6101`; `msg`: `"No expired fees found, transaction won't change the config"`; `name`: `"noExpiredFees"`; }, \{ `code`: `6200`; `msg`: `"Received invalid Vesting Fee configuration"`; `name`: `"invalidVestingFee"`; }, \{ `code`: `6300`; `msg`: `"Received invalid Airdrop Fee configuration"`; `name`: `"invalidAirdropFee"`; }, \{ `code`: `6301`; `msg`: `"Airdrop config is full, can not write fees"`; `name`: `"airdropConfigFull"`; }] | [packages/common/solana/descriptor/partner\_oracle.ts:689](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/descriptor/partner_oracle.ts#L689) |
| `instructions` | \[\{ `accounts`: \[\{ `docs`: \[`"Account that stores the config"`]; `name`: `"config"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`97`, `105`, `114`, `100`, `114`, `111`, `112`, `95`, `99`, `111`, `110`, `102`, `105`, `103`]; }]; }; `writable`: `true`; }]; `args`: \[]; `discriminator`: \[`203`, `5`, `237`, `235`, `32`, `38`, `150`, `235`]; `name`: `"airdropClearExpiredFees"`; }, \{ `accounts`: \[\{ `docs`: \[`"Account that stores the config"`]; `name`: `"config"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`97`, `105`, `114`, `100`, `114`, `111`, `112`, `95`, `99`, `111`, `110`, `102`, `105`, `103`]; }]; }; }]; `args`: \[\{ `name`: `"pubkey"`; `type`: `"pubkey"`; }]; `discriminator`: \[`185`, `20`, `28`, `207`, `70`, `243`, `32`, `62`]; `name`: `"airdropGetFees"`; `returns`: \{ `defined`: \{ `name`: `"airdropFees"`; }; }; }, \{ `accounts`: \[\{ `docs`: \[`"Account that will cover tx fees, can be anybody since the instruction is safe"`]; `name`: `"payer"`; `signer`: `true`; `writable`: `true`; }, \{ `name`: `"config"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`97`, `105`, `114`, `100`, `114`, `111`, `112`, `95`, `99`, `111`, `110`, `102`, `105`, `103`]; }]; }; `writable`: `true`; }, \{ `address`: `"11111111111111111111111111111111"`; `name`: `"systemProgram"`; }]; `args`: \[]; `discriminator`: \[`2`, `110`, `102`, `10`, `34`, `83`, `164`, `55`]; `name`: `"airdropInitializeConfig"`; }, \{ `accounts`: \[\{ `address`: `"CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7"`; `docs`: \[`"Fee Authority"`]; `name`: `"authority"`; `signer`: `true`; `writable`: `true`; }, \{ `docs`: \[`"Account that stores the config"`]; `name`: `"config"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`97`, `105`, `114`, `100`, `114`, `111`, `112`, `95`, `99`, `111`, `110`, `102`, `105`, `103`]; }]; }; `writable`: `true`; }]; `args`: \[\{ `name`: `"pubkey"`; `type`: `"pubkey"`; }]; `discriminator`: \[`119`, `246`, `202`, `91`, `59`, `94`, `252`, `239`]; `name`: `"airdropRemoveFees"`; }, \{ `accounts`: \[\{ `address`: `"CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7"`; `docs`: \[`"Fee Authority"`]; `name`: `"authority"`; `signer`: `true`; `writable`: `true`; }, \{ `docs`: \[`"Account that stores the config"`]; `name`: `"config"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`97`, `105`, `114`, `100`, `114`, `111`, `112`, `95`, `99`, `111`, `110`, `102`, `105`, `103`]; }]; }; `writable`: `true`; }]; `args`: \[\{ `name`: `"creationFee"`; `type`: `"u32"`; }, \{ `name`: `"priceOracleFee"`; `type`: `"u32"`; }, \{ `name`: `"claimMinFee"`; `type`: `"u32"`; }, \{ `name`: `"claimMaxFee"`; `type`: `"u32"`; }, \{ `name`: `"allocationFactor"`; `type`: `"f64"`; }, \{ `name`: `"clawbackTokenFeePercent"`; `type`: `"f64"`; }]; `discriminator`: \[`37`, `104`, `254`, `202`, `136`, `124`, `245`, `94`]; `name`: `"airdropWriteDefaultFees"`; }, \{ `accounts`: \[\{ `address`: `"CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7"`; `docs`: \[`"Fee Authority"`]; `name`: `"authority"`; `signer`: `true`; `writable`: `true`; }, \{ `docs`: \[`"Account that stores the config"`]; `name`: `"config"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`97`, `105`, `114`, `100`, `114`, `111`, `112`, `95`, `99`, `111`, `110`, `102`, `105`, `103`]; }]; }; `writable`: `true`; }]; `args`: \[\{ `name`: `"pubkey"`; `type`: `"pubkey"`; }, \{ `name`: `"creationFee"`; `type`: `"u32"`; }, \{ `name`: `"priceOracleFee"`; `type`: `"u32"`; }, \{ `name`: `"claimMinFee"`; `type`: `"u32"`; }, \{ `name`: `"claimMaxFee"`; `type`: `"u32"`; }, \{ `name`: `"allocationFactor"`; `type`: `"f64"`; }, \{ `name`: `"clawbackTokenFeePercent"`; `type`: `"f64"`; }, \{ `name`: `"expiryTs"`; `type`: `"u64"`; }]; `discriminator`: \[`71`, `165`, `178`, `215`, `19`, `70`, `146`, `71`]; `name`: `"airdropWriteFees"`; }, \{ `accounts`: \[\{ `name`: `"partners"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`115`, `116`, `114`, `109`, `95`, `102`, `101`, `101`, `115`]; }]; }; }]; `args`: \[\{ `name`: `"pubkey"`; `type`: `"pubkey"`; }]; `discriminator`: \[`239`, `230`, `28`, `173`, `134`, `247`, `57`, `176`]; `name`: `"vestingGetFees"`; `returns`: \{ `defined`: \{ `name`: `"vestingFees"`; }; }; }, \{ `accounts`: \[\{ `docs`: \[`"Account that will cover tx fees, can be anybody since the instruction is safe"`]; `name`: `"payer"`; `signer`: `true`; `writable`: `true`; }, \{ `name`: `"partners"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`115`, `116`, `114`, `109`, `95`, `102`, `101`, `101`, `115`]; }]; }; `writable`: `true`; }, \{ `address`: `"11111111111111111111111111111111"`; `name`: `"systemProgram"`; }]; `args`: \[]; `discriminator`: \[`205`, `170`, `148`, `219`, `143`, `38`, `77`, `196`]; `name`: `"vestingInitializePartners"`; }, \{ `accounts`: \[\{ `address`: `"CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7"`; `docs`: \[`"Account that will cover tx fees, should be equal to creator if not is not expired"`]; `name`: `"authority"`; `signer`: `true`; `writable`: `true`; }, \{ `name`: `"partners"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`115`, `116`, `114`, `109`, `95`, `102`, `101`, `101`, `115`]; }]; }; `writable`: `true`; }]; `args`: \[\{ `name`: `"pubkey"`; `type`: `"pubkey"`; }]; `discriminator`: \[`233`, `176`, `222`, `64`, `79`, `14`, `48`, `168`]; `name`: `"vestingRemoveFees"`; }, \{ `accounts`: \[\{ `address`: `"CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7"`; `docs`: \[`"Account that will cover tx fees, should be equal to creator if not is not expired"`]; `name`: `"authority"`; `signer`: `true`; `writable`: `true`; }, \{ `name`: `"partners"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`115`, `116`, `114`, `109`, `95`, `102`, `101`, `101`, `115`]; }]; }; `writable`: `true`; }]; `args`: \[\{ `name`: `"creationFee"`; `type`: `"u32"`; }, \{ `name`: `"autoClaimFee"`; `type`: `"u32"`; }, \{ `name`: `"tokenFeePercent"`; `type`: `"f32"`; }]; `discriminator`: \[`96`, `198`, `97`, `81`, `162`, `50`, `51`, `10`]; `name`: `"vestingWriteDefaultFees"`; }, \{ `accounts`: \[\{ `address`: `"CgdggophaMCFRP8gA1QjrZHsHaNQgByhBU7zoF5TpXF7"`; `docs`: \[`"Account that will cover tx fees, should be equal to creator if not is not expired"`]; `name`: `"authority"`; `signer`: `true`; `writable`: `true`; }, \{ `name`: `"partners"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`115`, `116`, `114`, `109`, `95`, `102`, `101`, `101`, `115`]; }]; }; `writable`: `true`; }]; `args`: \[\{ `name`: `"pubkey"`; `type`: `"pubkey"`; }, \{ `name`: `"creationFee"`; `type`: `"u32"`; }, \{ `name`: `"autoClaimFee"`; `type`: `"u32"`; }, \{ `name`: `"tokenFeePercent"`; `type`: `"f32"`; }]; `discriminator`: \[`251`, `24`, `6`, `241`, `182`, `56`, `93`, `100`]; `name`: `"vestingWriteFees"`; }] | [packages/common/solana/descriptor/partner\_oracle.ts:15](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/descriptor/partner_oracle.ts#L15) |
| `metadata` | `object` | [packages/common/solana/descriptor/partner\_oracle.ts:9](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/descriptor/partner_oracle.ts#L9) |
| `metadata.description` | `"Created with Anchor"` | [packages/common/solana/descriptor/partner\_oracle.ts:13](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/descriptor/partner_oracle.ts#L13) |
| `metadata.name` | `"partnerOracle"` | [packages/common/solana/descriptor/partner\_oracle.ts:10](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/descriptor/partner_oracle.ts#L10) |
| `metadata.spec` | `"0.1.0"` | [packages/common/solana/descriptor/partner\_oracle.ts:12](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/descriptor/partner_oracle.ts#L12) |
| `metadata.version` | `"1.0.0"` | [packages/common/solana/descriptor/partner\_oracle.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/descriptor/partner_oracle.ts#L11) |
| `types` | \[\{ `name`: `"airdropConfig"`; `repr`: \{ `kind`: `"c"`; }; `serialization`: `"bytemuck"`; `type`: \{ `fields`: \[\{ `name`: `"version"`; `type`: `"u32"`; }, \{ `docs`: \[`"Multiplier to apply when calculating ALL fees"`]; `name`: `"usdMultiplier"`; `type`: `"f32"`; }, \{ `docs`: \[`"Last solana price used"`]; `name`: `"solanaPrice"`; `type`: `"u64"`; }, \{ `docs`: \[`"Creation SOL fee"`]; `name`: `"creationFee"`; `type`: `"u32"`; }, \{ `docs`: \[`"Fee for custom price oracle used in dynamic airdrops"`]; `name`: `"priceOracleFee"`; `type`: `"u32"`; }, \{ `docs`: \[`"Dynamic claim fee in SOL, min"`]; `name`: `"claimMinFee"`; `type`: `"u32"`; }, \{ `docs`: \[`"Dynamic claim fee in SOL, max"`]; `name`: `"claimMaxFee"`; `type`: `"u32"`; }, \{ `docs`: \[`"Factor to multiple claimable SOL by when calculating fee"`]; `name`: `"allocationFactor"`; `type`: `"f64"`; }, \{ `docs`: \[`"Toke % fee on clawback"`]; `name`: `"clawbackTokenFeePercent"`; `type`: `"f64"`; }, \{ `name`: `"buffer"`; `type`: \{ `array`: \[`"u8"`, `144`]; }; }, \{ `name`: `"partners"`; `type`: \{ `array`: \[\{ `defined`: \{ `name`: `"airdropPartner"`; }; }, `100`]; }; }]; `kind`: `"struct"`; }; }, \{ `name`: `"airdropFees"`; `type`: \{ `fields`: \[\{ `docs`: \[`"Account for which the fees were configured"`]; `name`: `"pubkey"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Creation SOL fee"`]; `name`: `"creationFee"`; `type`: `"u32"`; }, \{ `docs`: \[`"Fee for custom price oracle used in dynamic airdrops"`]; `name`: `"priceOracleFee"`; `type`: `"u32"`; }, \{ `docs`: \[`"Dynamic claim fee in SOL, min"`]; `name`: `"claimMinFee"`; `type`: `"u32"`; }, \{ `docs`: \[`"Dynamic claim fee in SOL, max"`]; `name`: `"claimMaxFee"`; `type`: `"u32"`; }, \{ `docs`: \[`"Factor to multiple claimable SOL by when calculating fee"`]; `name`: `"allocationFactor"`; `type`: `"f64"`; }, \{ `docs`: \[`"Token % fee on clawback"`]; `name`: `"clawbackTokenFeePercent"`; `type`: `"f64"`; }]; `kind`: `"struct"`; }; }, \{ `name`: `"airdropPartner"`; `repr`: \{ `kind`: `"c"`; }; `serialization`: `"bytemuck"`; `type`: \{ `fields`: \[\{ `docs`: \[`"Pubkey of the partner"`]; `name`: `"pubkey"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Creation SOL fee"`]; `name`: `"creationFee"`; `type`: `"u32"`; }, \{ `docs`: \[`"Fee for custom price oracle used in dynamic airdrops"`]; `name`: `"priceOracleFee"`; `type`: `"u32"`; }, \{ `docs`: \[`"Dynamic claim fee in SOL, min"`]; `name`: `"claimMinFee"`; `type`: `"u32"`; }, \{ `docs`: \[`"Dynamic claim fee in SOL, max"`]; `name`: `"claimMaxFee"`; `type`: `"u32"`; }, \{ `docs`: \[`"Factor to multiple claimable SOL by when calculating fee"`]; `name`: `"allocationFactor"`; `type`: `"f64"`; }, \{ `docs`: \[`"Toke % fee on clawback"`]; `name`: `"clawbackTokenFeePercent"`; `type`: `"f64"`; }, \{ `docs`: \[`"Time when fee configuration expires"`]; `name`: `"expiryTs"`; `type`: `"u64"`; }, \{ `docs`: \[`"Buffer for additional fields"`]; `name`: `"buffer"`; `type`: \{ `array`: \[`"u8"`, `16`]; }; }]; `kind`: `"struct"`; }; }, \{ `name`: `"vestingFees"`; `type`: \{ `fields`: \[\{ `name`: `"pubkey"`; `type`: `"pubkey"`; }, \{ `name`: `"creationFee"`; `type`: `"u32"`; }, \{ `name`: `"autoClaimFee"`; `type`: `"u32"`; }, \{ `name`: `"tokenFeePercent"`; `type`: `"f32"`; }]; `kind`: `"struct"`; }; }] | [packages/common/solana/descriptor/partner\_oracle.ts:726](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/descriptor/partner_oracle.ts#L726) |
# PartnerOracleAccounts
URL: /docs/api/common/type-aliases/PartnerOracleAccounts
# PartnerOracleAccounts [#partneroracleaccounts]
```ts
type PartnerOracleAccounts = IdlAccounts;
```
Defined in: [types.ts:139](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L139)
# PartnerOracleTypes
URL: /docs/api/common/type-aliases/PartnerOracleTypes
# PartnerOracleTypes [#partneroracletypes]
```ts
type PartnerOracleTypes = IdlTypes;
```
Defined in: [types.ts:138](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/solana/types.ts#L138)
# TokenPriceResult
URL: /docs/api/common/type-aliases/TokenPriceResult
# TokenPriceResult [#tokenpriceresult]
```ts
type TokenPriceResult = object;
```
Defined in: [fetch-token-price.ts:7](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/fetch-token-price.ts#L7)
## Properties [#properties]
| Property | Type | Defined in |
| ------------------------ | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id` | `string` | [packages/common/lib/fetch-token-price.ts:7](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/fetch-token-price.ts#L7) |
| `value` | `number` \| `undefined` | [packages/common/lib/fetch-token-price.ts:7](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/fetch-token-price.ts#L7) |
# TokensPricesResponse
URL: /docs/api/common/type-aliases/TokensPricesResponse
# TokensPricesResponse [#tokenspricesresponse]
```ts
type TokensPricesResponse = object;
```
Defined in: [fetch-token-price.ts:3](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/fetch-token-price.ts#L3)
## Properties [#properties]
| Property | Type | Defined in |
| ---------------------- | ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `data` | `Record`\<`string`, [`TokenPriceResult`](/docs/api/common/type-aliases/TokenPriceResult)> | [packages/common/lib/fetch-token-price.ts:4](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/fetch-token-price.ts#L4) |
# invariant
URL: /docs/api/common/variables/invariant
# invariant [#invariant]
```ts
const invariant: (condition, message?) => asserts condition;
```
Defined in: [assertions.ts:5](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/assertions.ts#L5)
## Parameters [#parameters]
| Parameter | Type |
| ----------- | ---------------------------- |
| `condition` | `any` |
| `message?` | `string` \| (() => `string`) |
## Returns [#returns]
`asserts condition`
# isDev
URL: /docs/api/common/variables/isDev
# isDev [#isdev]
```ts
const isDev: boolean;
```
Defined in: [env.ts:1](https://github.com/streamflow-finance/js-sdk/blob/master/packages/common/lib/env.ts#L1)
# index
URL: /docs/api/distributor
# @streamflow/distributor v11.3.1 [#streamflowdistributor-v1131]
The Merkle airdrop protocol SDK. All protocol types and the client class live under the `solana` submodule.
## Submodules [#submodules]
* [solana](/docs/api/distributor/solana/index) — Client class, interfaces, enumerations, functions, and type aliases for the airdrop protocol
# SolanaAlignedDistributorClient
URL: /docs/api/distributor/solana/classes/SolanaAlignedDistributorClient
# SolanaAlignedDistributorClient [#solanaaligneddistributorclient]
Defined in: [distributor/solana/clients/SolanaAlignedDistributorClient.ts:23](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/SolanaAlignedDistributorClient.ts#L23)
## Extends [#extends]
* `default`
## Constructors [#constructors]
### Constructor [#constructor]
```ts
new SolanaAlignedDistributorClient(__namedParameters): SolanaAlignedDistributorClient;
```
Defined in: [distributor/solana/clients/SolanaAlignedDistributorClient.ts:26](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/SolanaAlignedDistributorClient.ts#L26)
#### Parameters [#parameters]
| Parameter | Type |
| ------------------- | -------------- |
| `__namedParameters` | `IInitOptions` |
#### Returns [#returns]
`SolanaAlignedDistributorClient`
#### Overrides [#overrides]
```ts
BaseDistributorClient.constructor
```
## Properties [#properties]
| Property | Modifier | Type | Inherited from | Defined in |
| -------------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `alignedProxyProgram` | `public` | `Program`\<[`AlignedDistributor`](/docs/api/distributor/solana/descriptor/aligned_distributor/type-aliases/AlignedDistributor)> | - | [distributor/solana/clients/SolanaAlignedDistributorClient.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/SolanaAlignedDistributorClient.ts#L24) |
| `apiKey?` | `protected` | `string` | `BaseDistributorClient.apiKey` | [distributor/solana/clients/BaseDistributorClient.ts:103](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L103) |
| `apiUrl` | `protected` | `string` | `BaseDistributorClient.apiUrl` | [distributor/solana/clients/BaseDistributorClient.ts:101](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L101) |
| `cluster` | `protected` | `ICluster` | `BaseDistributorClient.cluster` | [distributor/solana/clients/BaseDistributorClient.ts:99](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L99) |
| `commitment` | `protected` | `Commitment` \| `ConnectionConfig` | `BaseDistributorClient.commitment` | [distributor/solana/clients/BaseDistributorClient.ts:93](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L93) |
| `connection` | `protected` | `Connection` | `BaseDistributorClient.connection` | [distributor/solana/clients/BaseDistributorClient.ts:83](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L83) |
| `feeConfigPublicKey` | `protected` | `PublicKey` | `BaseDistributorClient.feeConfigPublicKey` | [distributor/solana/clients/BaseDistributorClient.ts:91](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L91) |
| `merkleDistributorProgram` | `public` | `Program`\<[`MerkleDistributor`](/docs/api/distributor/solana/descriptor/merkle_distributor/type-aliases/MerkleDistributor)> | `BaseDistributorClient.merkleDistributorProgram` | [distributor/solana/clients/BaseDistributorClient.ts:97](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L97) |
| `partnerOracle` | `protected` | `Program`\<`PartnerOracle`> | `BaseDistributorClient.partnerOracle` | [distributor/solana/clients/BaseDistributorClient.ts:89](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L89) |
| `partnerOracleProgramId` | `protected` | `PublicKey` | `BaseDistributorClient.partnerOracleProgramId` | [distributor/solana/clients/BaseDistributorClient.ts:87](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L87) |
| `programId` | `protected` | `PublicKey` | `BaseDistributorClient.programId` | [distributor/solana/clients/BaseDistributorClient.ts:85](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L85) |
| `sendThrottler` | `protected` | `PQueue` | `BaseDistributorClient.sendThrottler` | [distributor/solana/clients/BaseDistributorClient.ts:95](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L95) |
## Methods [#methods]
### claim() [#claim]
```ts
claim(data, extParams): Promise;
```
Defined in: [distributor/solana/clients/BaseDistributorClient.ts:257](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L257)
#### Parameters [#parameters-1]
| Parameter | Type |
| ----------- | ---------------------------------------------------------------------- |
| `data` | [`IClaimData`](/docs/api/distributor/solana/interfaces/IClaimData) |
| `extParams` | [`IInteractExt`](/docs/api/distributor/solana/interfaces/IInteractExt) |
#### Returns [#returns-1]
`Promise`\<`ITransactionResult`>
#### Inherited from [#inherited-from]
```ts
BaseDistributorClient.claim
```
***
### clawback() [#clawback]
```ts
clawback(data, extParams): Promise;
```
Defined in: [distributor/solana/clients/BaseDistributorClient.ts:536](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L536)
#### Parameters [#parameters-2]
| Parameter | Type |
| ----------- | ------------------------------------------------------------------------ |
| `data` | [`IClawbackData`](/docs/api/distributor/solana/interfaces/IClawbackData) |
| `extParams` | [`IInteractExt`](/docs/api/distributor/solana/interfaces/IInteractExt) |
#### Returns [#returns-2]
`Promise`\<`ITransactionResult`>
#### Inherited from [#inherited-from-1]
```ts
BaseDistributorClient.clawback
```
***
### closeClaim() [#closeclaim]
```ts
closeClaim(data, extParams): Promise;
```
Defined in: [distributor/solana/clients/BaseDistributorClient.ts:429](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L429)
#### Parameters [#parameters-3]
| Parameter | Type |
| ----------- | ---------------------------------------------------------------------------- |
| `data` | [`ICloseClaimData`](/docs/api/distributor/solana/interfaces/ICloseClaimData) |
| `extParams` | [`IInteractExt`](/docs/api/distributor/solana/interfaces/IInteractExt) |
#### Returns [#returns-3]
`Promise`\<`ITransactionResult`>
#### Inherited from [#inherited-from-2]
```ts
BaseDistributorClient.closeClaim
```
***
### create() [#create]
```ts
create(data, extParams): Promise;
```
Defined in: [distributor/solana/clients/BaseDistributorClient.ts:221](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L221)
#### Parameters [#parameters-4]
| Parameter | Type |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `data` | \| [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData) \| [`ICreateAlignedDistributorData`](/docs/api/distributor/solana/interfaces/ICreateAlignedDistributorData) |
| `extParams` | [`ICreateExt`](/docs/api/distributor/solana/interfaces/ICreateExt) |
#### Returns [#returns-4]
`Promise`\<[`ICreateDistributorResult`](/docs/api/distributor/solana/interfaces/ICreateDistributorResult)>
#### Inherited from [#inherited-from-3]
```ts
BaseDistributorClient.create
```
***
### getAlignedDistributorAddress() [#getaligneddistributoraddress]
```ts
getAlignedDistributorAddress(distributorAddress): PublicKey;
```
Defined in: [distributor/solana/clients/SolanaAlignedDistributorClient.ts:47](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/SolanaAlignedDistributorClient.ts#L47)
#### Parameters [#parameters-5]
| Parameter | Type |
| -------------------- | -------- |
| `distributorAddress` | `string` |
#### Returns [#returns-5]
`PublicKey`
***
### getAlignedDistributorData() [#getaligneddistributordata]
```ts
getAlignedDistributorData(distributorAddress): Promise;
```
Defined in: [distributor/solana/clients/SolanaAlignedDistributorClient.ts:52](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/SolanaAlignedDistributorClient.ts#L52)
#### Parameters [#parameters-6]
| Parameter | Type |
| -------------------- | -------- |
| `distributorAddress` | `string` |
#### Returns [#returns-6]
`Promise`\<[`AlignedDistributorData`](/docs/api/distributor/solana/interfaces/AlignedDistributorData)>
***
### getAlignedDistributorProgramId() [#getaligneddistributorprogramid]
```ts
getAlignedDistributorProgramId(): PublicKey;
```
Defined in: [distributor/solana/clients/SolanaAlignedDistributorClient.ts:43](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/SolanaAlignedDistributorClient.ts#L43)
#### Returns [#returns-7]
`PublicKey`
***
### getClaim() [#getclaim]
```ts
getClaim(claimStatus): Promise;
```
Defined in: [distributor/solana/clients/BaseDistributorClient.ts:560](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L560)
#### Parameters [#parameters-7]
| Parameter | Type |
| ------------- | ----------------------- |
| `claimStatus` | `string` \| `PublicKey` |
#### Returns [#returns-8]
`Promise`\<[`AnyClaimStatus`](/docs/api/distributor/solana/type-aliases/AnyClaimStatus)>
#### Inherited from [#inherited-from-4]
```ts
BaseDistributorClient.getClaim
```
***
### getClaims() [#getclaims]
```ts
getClaims(data): Promise;
```
Defined in: [distributor/solana/clients/BaseDistributorClient.ts:564](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L564)
#### Parameters [#parameters-8]
| Parameter | Type |
| --------- | --------------------------------------------------------------------------- |
| `data` | [`IGetClaimData`](/docs/api/distributor/solana/interfaces/IGetClaimData)\[] |
#### Returns [#returns-9]
`Promise`\<[`AnyClaimStatus`](/docs/api/distributor/solana/type-aliases/AnyClaimStatus)\[]>
#### Inherited from [#inherited-from-5]
```ts
BaseDistributorClient.getClaims
```
***
### getClawbackInstruction() [#getclawbackinstruction]
```ts
protected getClawbackInstruction(accounts): Promise;
```
Defined in: [distributor/solana/clients/SolanaAlignedDistributorClient.ts:116](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/SolanaAlignedDistributorClient.ts#L116)
#### Parameters [#parameters-9]
| Parameter | Type |
| ---------- | ------------------ |
| `accounts` | `ResolvedAccounts` |
#### Returns [#returns-10]
`Promise`\<`TransactionInstruction`>
#### Overrides [#overrides-1]
```ts
BaseDistributorClient.getClawbackInstruction
```
***
### getCommitment() [#getcommitment]
```ts
getCommitment(): Commitment;
```
Defined in: [distributor/solana/clients/BaseDistributorClient.ts:141](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L141)
#### Returns [#returns-11]
`Commitment`
#### Inherited from [#inherited-from-6]
```ts
BaseDistributorClient.getCommitment
```
***
### getConnection() [#getconnection]
```ts
getConnection(): Connection;
```
Defined in: [distributor/solana/clients/BaseDistributorClient.ts:137](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L137)
#### Returns [#returns-12]
`Connection`
#### Inherited from [#inherited-from-7]
```ts
BaseDistributorClient.getConnection
```
***
### getDefaultFees() [#getdefaultfees]
```ts
getDefaultFees(): Promise<{
allocationFactor: number;
claimMaxFee: number;
claimMinFee: number;
clawbackTokenFeePercent: number;
creationFee: number;
priceOracleFee: number;
pubkey: PublicKey;
}>;
```
Defined in: [distributor/solana/clients/BaseDistributorClient.ts:614](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L614)
Get all defaults fees applied by the protocol.
#### Returns [#returns-13]
`Promise`\<\{
`allocationFactor`: `number`;
`claimMaxFee`: `number`;
`claimMinFee`: `number`;
`clawbackTokenFeePercent`: `number`;
`creationFee`: `number`;
`priceOracleFee`: `number`;
`pubkey`: `PublicKey`;
}>
#### Inherited from [#inherited-from-8]
```ts
BaseDistributorClient.getDefaultFees
```
***
### getDistributorProgramId() [#getdistributorprogramid]
```ts
getDistributorProgramId(): PublicKey;
```
Defined in: [distributor/solana/clients/BaseDistributorClient.ts:145](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L145)
#### Returns [#returns-14]
`PublicKey`
#### Inherited from [#inherited-from-9]
```ts
BaseDistributorClient.getDistributorProgramId
```
***
### getDistributors() [#getdistributors]
```ts
getDistributors(data): Promise