# 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; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:574](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L574) #### Parameters [#parameters-10] | Parameter | Type | | --------- | ------------------------------------------------------------------------------ | | `data` | [`IGetDistributors`](/docs/api/distributor/solana/interfaces/IGetDistributors) | #### Returns [#returns-15] `Promise`\<`object`\[]> #### Inherited from [#inherited-from-10] ```ts BaseDistributorClient.getDistributors ``` *** ### getFeeConfig() [#getfeeconfig] ```ts getFeeConfig(): Promise<{ allocationFactor: number; buffer: number[]; claimMaxFee: number; claimMinFee: number; clawbackTokenFeePercent: number; creationFee: number; partners: object[]; priceOracleFee: number; solanaPrice: BN; usdMultiplier: number; version: number; }>; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:603](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L603) Fetch Fee Config for the Airdrop protocol from Partner Oracle. #### Returns [#returns-16] `Promise`\<\{ `allocationFactor`: `number`; `buffer`: `number`\[]; `claimMaxFee`: `number`; `claimMinFee`: `number`; `clawbackTokenFeePercent`: `number`; `creationFee`: `number`; `partners`: `object`\[]; `priceOracleFee`: `number`; `solanaPrice`: `BN`; `usdMultiplier`: `number`; `version`: `number`; }> #### Inherited from [#inherited-from-11] ```ts BaseDistributorClient.getFeeConfig ``` *** ### getFees() [#getfees] ```ts getFees(pubkey): Promise<{ allocationFactor: number; claimMaxFee: number; claimMinFee: number; clawbackTokenFeePercent: number; creationFee: number; priceOracleFee: number; pubkey: PublicKey; }>; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:632](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L632) Get fees for a given wallet. #### Parameters [#parameters-11] | Parameter | Type | Description | | --------- | ----------- | -------------------------- | | `pubkey` | `PublicKey` | partner to search fees for | #### Returns [#returns-17] `Promise`\<\{ `allocationFactor`: `number`; `claimMaxFee`: `number`; `claimMinFee`: `number`; `clawbackTokenFeePercent`: `number`; `creationFee`: `number`; `priceOracleFee`: `number`; `pubkey`: `PublicKey`; }> #### Inherited from [#inherited-from-12] ```ts BaseDistributorClient.getFees ``` *** ### getNewAlignedDistributorArgs() [#getnewaligneddistributorargs] ```ts protected getNewAlignedDistributorArgs(data): NewAlignedDistributorArgs; ``` Defined in: [distributor/solana/clients/SolanaAlignedDistributorClient.ts:139](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/SolanaAlignedDistributorClient.ts#L139) #### Parameters [#parameters-12] | Parameter | Type | | --------- | -------------------------------------------------------------------------------------------------------- | | `data` | [`ICreateAlignedDistributorData`](/docs/api/distributor/solana/interfaces/ICreateAlignedDistributorData) | #### Returns [#returns-18] [`NewAlignedDistributorArgs`](/docs/api/distributor/solana/interfaces/NewAlignedDistributorArgs) *** ### getNewDistributorInstruction() [#getnewdistributorinstruction] ```ts protected getNewDistributorInstruction(data, accounts): Promise; ``` Defined in: [distributor/solana/clients/SolanaAlignedDistributorClient.ts:76](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/SolanaAlignedDistributorClient.ts#L76) #### Parameters [#parameters-13] | Parameter | Type | | ---------- | --------------------------------------------------------------------------------------------------------- | | `data` | [`ICreateAlignedDistributorData`](/docs/api/distributor/solana/interfaces/ICreateAlignedDistributorData) | | `accounts` | `Required`\<[`NewDistributorAccounts`](/docs/api/distributor/solana/type-aliases/NewDistributorAccounts)> | #### Returns [#returns-19] `Promise`\<`TransactionInstruction`> #### Overrides [#overrides-2] ```ts BaseDistributorClient.getNewDistributorInstruction ``` *** ### prepareClaimFeeInstruction() [#prepareclaimfeeinstruction] ```ts protected prepareClaimFeeInstruction(payer, fee?): TransactionInstruction; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:644](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L644) #### Parameters [#parameters-14] | Parameter | Type | Default value | | --------- | ----------- | ------------------- | | `payer` | `PublicKey` | `undefined` | | `fee` | `bigint` | `AIRDROP_CLAIM_FEE` | #### Returns [#returns-20] `TransactionInstruction` #### Inherited from [#inherited-from-13] ```ts BaseDistributorClient.prepareClaimFeeInstruction ``` *** ### prepareClaimInstructions() [#prepareclaiminstructions] ```ts prepareClaimInstructions(data, extParams): Promise; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:299](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L299) #### Parameters [#parameters-15] | Parameter | Type | | ----------- | -------------------------------------------------------------------------------------------------- | | `data` | [`IClaimData`](/docs/api/distributor/solana/interfaces/IClaimData) | | `extParams` | `ITransactionExtResolved`\<[`IInteractExt`](/docs/api/distributor/solana/interfaces/IInteractExt)> | #### Returns [#returns-21] `Promise`\<`TransactionInstruction`\[]> #### Inherited from [#inherited-from-14] ```ts BaseDistributorClient.prepareClaimInstructions ``` *** ### prepareClawbackInstructions() [#prepareclawbackinstructions] ```ts prepareClawbackInstructions(data, extParams): Promise; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:492](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L492) #### Parameters [#parameters-16] | Parameter | Type | | ----------- | -------------------------------------------------------------------------------------------------- | | `data` | [`IClawbackData`](/docs/api/distributor/solana/interfaces/IClawbackData) | | `extParams` | `ITransactionExtResolved`\<[`IInteractExt`](/docs/api/distributor/solana/interfaces/IInteractExt)> | #### Returns [#returns-22] `Promise`\<`TransactionInstruction`\[]> #### Inherited from [#inherited-from-15] ```ts BaseDistributorClient.prepareClawbackInstructions ``` *** ### prepareCloseClaimInstructions() [#preparecloseclaiminstructions] ```ts prepareCloseClaimInstructions(data, extParams): Promise; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:453](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L453) #### Parameters [#parameters-17] | Parameter | Type | | ----------- | -------------------------------------------------------------------------------------------------- | | `data` | [`ICloseClaimData`](/docs/api/distributor/solana/interfaces/ICloseClaimData) | | `extParams` | `ITransactionExtResolved`\<[`IInteractExt`](/docs/api/distributor/solana/interfaces/IInteractExt)> | #### Returns [#returns-23] `Promise`\<`TransactionInstruction`\[]> #### Inherited from [#inherited-from-16] ```ts BaseDistributorClient.prepareCloseClaimInstructions ``` *** ### prepareCreateInstructions() [#preparecreateinstructions] ```ts prepareCreateInstructions(data, extParams): Promise<{ distributorPublicKey: PublicKey; ixs: TransactionInstruction[]; }>; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:149](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L149) #### Parameters [#parameters-18] | Parameter | Type | | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `data` | \| [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData) \| [`ICreateAlignedDistributorData`](/docs/api/distributor/solana/interfaces/ICreateAlignedDistributorData) | | `extParams` | `ITransactionExtResolved`\<[`ICreateExt`](/docs/api/distributor/solana/interfaces/ICreateExt)> | #### Returns [#returns-24] `Promise`\<\{ `distributorPublicKey`: `PublicKey`; `ixs`: `TransactionInstruction`\[]; }> #### Inherited from [#inherited-from-17] ```ts BaseDistributorClient.prepareCreateInstructions ``` *** ### searchDistributors() [#searchdistributors] ```ts searchDistributors(data): Promise[]>; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:579](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L579) #### Parameters [#parameters-19] | Parameter | Type | | --------- | ------------------------------------------------------------------------------------ | | `data` | [`ISearchDistributors`](/docs/api/distributor/solana/interfaces/ISearchDistributors) | #### Returns [#returns-25] `Promise`\<`IProgramAccount`\<\{ `admin`: `PublicKey`; `allocationFactor`: `number`; `buffer`: `number`\[]; `bump`: `number`; `canUpdateDuration`: `boolean`; `claimFeeClaimed`: `boolean`; `claimMaxFee`: `number`; `claimMinFee`: `number`; `claimsClosableByAdmin`: `boolean`; `claimsClosableByClaimant`: `boolean`; `claimsLimit`: `number`; `clawbackFeeClaimed`: `boolean`; `clawbackReceiver`: `PublicKey`; `clawbackStartTs`: `BN`; `clawbackTokenFeePercent`: `number`; `clawedBack`: `boolean`; `clawedBackTs`: `BN`; `creationFee`: `number`; `creationFeeClaimed`: `boolean`; `endTs`: `BN`; `lastDurationUpdateTs`: `BN`; `maxNumNodes`: `BN`; `maxTotalClaim`: `BN`; `mint`: `PublicKey`; `numNodesClaimed`: `BN`; `programVersion`: `number`; `root`: `number`\[]; `startTs`: `BN`; `tokenPriceLamports`: `BN`; `tokenVault`: `PublicKey`; `totalAmountClaimed`: `BN`; `totalAmountLocked`: `BN`; `totalAmountUnlocked`: `BN`; `totalClaimablePreUpdate`: `BN`; `unlockPeriod`: `BN`; `version`: `BN`; }>\[]> #### Inherited from [#inherited-from-18] ```ts BaseDistributorClient.searchDistributors ``` *** ### unwrapExecutionParams() [#unwrapexecutionparams] ```ts protected unwrapExecutionParams(extParams): UnwrapAutoSimulate; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:661](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L661) #### Type Parameters [#type-parameters] | Type Parameter | | ------------------------------------------------------------------------------------ | | `T` *extends* [`IInteractExt`](/docs/api/distributor/solana/interfaces/IInteractExt) | #### Parameters [#parameters-20] | Parameter | Type | | ----------- | ---- | | `extParams` | `T` | #### Returns [#returns-26] `UnwrapAutoSimulate`\<`T`> #### Inherited from [#inherited-from-19] ```ts BaseDistributorClient.unwrapExecutionParams ``` *** ### validateDistributorArgs() [#validatedistributorargs] ```ts protected validateDistributorArgs(data): void; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:652](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L652) #### Parameters [#parameters-21] | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------ | | `data` | [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData) | #### Returns [#returns-27] `void` #### Inherited from [#inherited-from-20] ```ts BaseDistributorClient.validateDistributorArgs ``` # SolanaDistributorClient URL: /docs/api/distributor/solana/classes/SolanaDistributorClient # SolanaDistributorClient [#solanadistributorclient] Defined in: [distributor/solana/clients/SolanaDistributorClient.ts:7](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/SolanaDistributorClient.ts#L7) ## Extends [#extends] * `default` ## Constructors [#constructors] ### Constructor [#constructor] ```ts new SolanaDistributorClient(__namedParameters): SolanaDistributorClient; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:105](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L105) #### Parameters [#parameters] | Parameter | Type | | ------------------- | -------------- | | `__namedParameters` | `IInitOptions` | #### Returns [#returns] `SolanaDistributorClient` #### Inherited from [#inherited-from] ```ts BaseDistributorClient.constructor ``` ## Properties [#properties] | Property | Modifier | Type | Inherited from | Defined in | | -------------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `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` | [`SolanaAlignedDistributorClient`](/docs/api/distributor/solana/classes/SolanaAlignedDistributorClient).[`commitment`](/docs/api/distributor/solana/classes/SolanaAlignedDistributorClient#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-1] ```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-2] ```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-3] ```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-4] ```ts BaseDistributorClient.create ``` *** ### 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-5] | Parameter | Type | | ------------- | ----------------------- | | `claimStatus` | `string` \| `PublicKey` | #### Returns [#returns-5] `Promise`\<[`AnyClaimStatus`](/docs/api/distributor/solana/type-aliases/AnyClaimStatus)> #### Inherited from [#inherited-from-5] ```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-6] | Parameter | Type | | --------- | --------------------------------------------------------------------------- | | `data` | [`IGetClaimData`](/docs/api/distributor/solana/interfaces/IGetClaimData)\[] | #### Returns [#returns-6] `Promise`\<[`AnyClaimStatus`](/docs/api/distributor/solana/type-aliases/AnyClaimStatus)\[]> #### Inherited from [#inherited-from-6] ```ts BaseDistributorClient.getClaims ``` *** ### getClawbackInstruction() [#getclawbackinstruction] ```ts protected getClawbackInstruction(accounts): Promise; ``` Defined in: [distributor/solana/clients/SolanaDistributorClient.ts:35](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/SolanaDistributorClient.ts#L35) #### Parameters [#parameters-7] | Parameter | Type | | ---------- | ------------------ | | `accounts` | `ResolvedAccounts` | #### Returns [#returns-7] `Promise`\<`TransactionInstruction`> #### Overrides [#overrides] ```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-8] `Commitment` #### Inherited from [#inherited-from-7] ```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-9] `Connection` #### Inherited from [#inherited-from-8] ```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-10] `Promise`\<\{ `allocationFactor`: `number`; `claimMaxFee`: `number`; `claimMinFee`: `number`; `clawbackTokenFeePercent`: `number`; `creationFee`: `number`; `priceOracleFee`: `number`; `pubkey`: `PublicKey`; }> #### Inherited from [#inherited-from-9] ```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-11] `PublicKey` #### Inherited from [#inherited-from-10] ```ts BaseDistributorClient.getDistributorProgramId ``` *** ### getDistributors() [#getdistributors] ```ts getDistributors(data): Promise; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:574](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L574) #### Parameters [#parameters-8] | Parameter | Type | | --------- | ------------------------------------------------------------------------------ | | `data` | [`IGetDistributors`](/docs/api/distributor/solana/interfaces/IGetDistributors) | #### Returns [#returns-12] `Promise`\<`object`\[]> #### Inherited from [#inherited-from-11] ```ts BaseDistributorClient.getDistributors ``` *** ### getFeeConfig() [#getfeeconfig] ```ts getFeeConfig(): Promise<{ allocationFactor: number; buffer: number[]; claimMaxFee: number; claimMinFee: number; clawbackTokenFeePercent: number; creationFee: number; partners: object[]; priceOracleFee: number; solanaPrice: BN; usdMultiplier: number; version: number; }>; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:603](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L603) Fetch Fee Config for the Airdrop protocol from Partner Oracle. #### Returns [#returns-13] `Promise`\<\{ `allocationFactor`: `number`; `buffer`: `number`\[]; `claimMaxFee`: `number`; `claimMinFee`: `number`; `clawbackTokenFeePercent`: `number`; `creationFee`: `number`; `partners`: `object`\[]; `priceOracleFee`: `number`; `solanaPrice`: `BN`; `usdMultiplier`: `number`; `version`: `number`; }> #### Inherited from [#inherited-from-12] ```ts BaseDistributorClient.getFeeConfig ``` *** ### getFees() [#getfees] ```ts getFees(pubkey): Promise<{ allocationFactor: number; claimMaxFee: number; claimMinFee: number; clawbackTokenFeePercent: number; creationFee: number; priceOracleFee: number; pubkey: PublicKey; }>; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:632](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L632) Get fees for a given wallet. #### Parameters [#parameters-9] | Parameter | Type | Description | | --------- | ----------- | -------------------------- | | `pubkey` | `PublicKey` | partner to search fees for | #### Returns [#returns-14] `Promise`\<\{ `allocationFactor`: `number`; `claimMaxFee`: `number`; `claimMinFee`: `number`; `clawbackTokenFeePercent`: `number`; `creationFee`: `number`; `priceOracleFee`: `number`; `pubkey`: `PublicKey`; }> #### Inherited from [#inherited-from-13] ```ts BaseDistributorClient.getFees ``` *** ### getNewDistributorInstruction() [#getnewdistributorinstruction] ```ts protected getNewDistributorInstruction(data, accounts): Promise; ``` Defined in: [distributor/solana/clients/SolanaDistributorClient.ts:8](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/SolanaDistributorClient.ts#L8) #### Parameters [#parameters-10] | Parameter | Type | | ---------- | --------------------------------------------------------------------------------------------------------- | | `data` | [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData) | | `accounts` | `Required`\<[`NewDistributorAccounts`](/docs/api/distributor/solana/type-aliases/NewDistributorAccounts)> | #### Returns [#returns-15] `Promise`\<`TransactionInstruction`> #### Overrides [#overrides-1] ```ts BaseDistributorClient.getNewDistributorInstruction ``` *** ### prepareClaimFeeInstruction() [#prepareclaimfeeinstruction] ```ts protected prepareClaimFeeInstruction(payer, fee?): TransactionInstruction; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:644](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L644) #### Parameters [#parameters-11] | Parameter | Type | Default value | | --------- | ----------- | ------------------- | | `payer` | `PublicKey` | `undefined` | | `fee` | `bigint` | `AIRDROP_CLAIM_FEE` | #### Returns [#returns-16] `TransactionInstruction` #### Inherited from [#inherited-from-14] ```ts BaseDistributorClient.prepareClaimFeeInstruction ``` *** ### prepareClaimInstructions() [#prepareclaiminstructions] ```ts prepareClaimInstructions(data, extParams): Promise; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:299](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L299) #### Parameters [#parameters-12] | Parameter | Type | | ----------- | -------------------------------------------------------------------------------------------------- | | `data` | [`IClaimData`](/docs/api/distributor/solana/interfaces/IClaimData) | | `extParams` | `ITransactionExtResolved`\<[`IInteractExt`](/docs/api/distributor/solana/interfaces/IInteractExt)> | #### Returns [#returns-17] `Promise`\<`TransactionInstruction`\[]> #### Inherited from [#inherited-from-15] ```ts BaseDistributorClient.prepareClaimInstructions ``` *** ### prepareClawbackInstructions() [#prepareclawbackinstructions] ```ts prepareClawbackInstructions(data, extParams): Promise; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:492](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L492) #### Parameters [#parameters-13] | Parameter | Type | | ----------- | -------------------------------------------------------------------------------------------------- | | `data` | [`IClawbackData`](/docs/api/distributor/solana/interfaces/IClawbackData) | | `extParams` | `ITransactionExtResolved`\<[`IInteractExt`](/docs/api/distributor/solana/interfaces/IInteractExt)> | #### Returns [#returns-18] `Promise`\<`TransactionInstruction`\[]> #### Inherited from [#inherited-from-16] ```ts BaseDistributorClient.prepareClawbackInstructions ``` *** ### prepareCloseClaimInstructions() [#preparecloseclaiminstructions] ```ts prepareCloseClaimInstructions(data, extParams): Promise; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:453](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L453) #### Parameters [#parameters-14] | Parameter | Type | | ----------- | -------------------------------------------------------------------------------------------------- | | `data` | [`ICloseClaimData`](/docs/api/distributor/solana/interfaces/ICloseClaimData) | | `extParams` | `ITransactionExtResolved`\<[`IInteractExt`](/docs/api/distributor/solana/interfaces/IInteractExt)> | #### Returns [#returns-19] `Promise`\<`TransactionInstruction`\[]> #### Inherited from [#inherited-from-17] ```ts BaseDistributorClient.prepareCloseClaimInstructions ``` *** ### prepareCreateInstructions() [#preparecreateinstructions] ```ts prepareCreateInstructions(data, extParams): Promise<{ distributorPublicKey: PublicKey; ixs: TransactionInstruction[]; }>; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:149](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L149) #### Parameters [#parameters-15] | Parameter | Type | | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `data` | \| [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData) \| [`ICreateAlignedDistributorData`](/docs/api/distributor/solana/interfaces/ICreateAlignedDistributorData) | | `extParams` | `ITransactionExtResolved`\<[`ICreateExt`](/docs/api/distributor/solana/interfaces/ICreateExt)> | #### Returns [#returns-20] `Promise`\<\{ `distributorPublicKey`: `PublicKey`; `ixs`: `TransactionInstruction`\[]; }> #### Inherited from [#inherited-from-18] ```ts BaseDistributorClient.prepareCreateInstructions ``` *** ### searchDistributors() [#searchdistributors] ```ts searchDistributors(data): Promise[]>; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:579](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L579) #### Parameters [#parameters-16] | Parameter | Type | | --------- | ------------------------------------------------------------------------------------ | | `data` | [`ISearchDistributors`](/docs/api/distributor/solana/interfaces/ISearchDistributors) | #### Returns [#returns-21] `Promise`\<`IProgramAccount`\<\{ `admin`: `PublicKey`; `allocationFactor`: `number`; `buffer`: `number`\[]; `bump`: `number`; `canUpdateDuration`: `boolean`; `claimFeeClaimed`: `boolean`; `claimMaxFee`: `number`; `claimMinFee`: `number`; `claimsClosableByAdmin`: `boolean`; `claimsClosableByClaimant`: `boolean`; `claimsLimit`: `number`; `clawbackFeeClaimed`: `boolean`; `clawbackReceiver`: `PublicKey`; `clawbackStartTs`: `BN`; `clawbackTokenFeePercent`: `number`; `clawedBack`: `boolean`; `clawedBackTs`: `BN`; `creationFee`: `number`; `creationFeeClaimed`: `boolean`; `endTs`: `BN`; `lastDurationUpdateTs`: `BN`; `maxNumNodes`: `BN`; `maxTotalClaim`: `BN`; `mint`: `PublicKey`; `numNodesClaimed`: `BN`; `programVersion`: `number`; `root`: `number`\[]; `startTs`: `BN`; `tokenPriceLamports`: `BN`; `tokenVault`: `PublicKey`; `totalAmountClaimed`: `BN`; `totalAmountLocked`: `BN`; `totalAmountUnlocked`: `BN`; `totalClaimablePreUpdate`: `BN`; `unlockPeriod`: `BN`; `version`: `BN`; }>\[]> #### Inherited from [#inherited-from-19] ```ts BaseDistributorClient.searchDistributors ``` *** ### unwrapExecutionParams() [#unwrapexecutionparams] ```ts protected unwrapExecutionParams(extParams): UnwrapAutoSimulate; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:661](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L661) #### Type Parameters [#type-parameters] | Type Parameter | | ------------------------------------------------------------------------------------ | | `T` *extends* [`IInteractExt`](/docs/api/distributor/solana/interfaces/IInteractExt) | #### Parameters [#parameters-17] | Parameter | Type | | ----------- | ---- | | `extParams` | `T` | #### Returns [#returns-22] `UnwrapAutoSimulate`\<`T`> #### Inherited from [#inherited-from-20] ```ts BaseDistributorClient.unwrapExecutionParams ``` *** ### validateDistributorArgs() [#validatedistributorargs] ```ts protected validateDistributorArgs(data): void; ``` Defined in: [distributor/solana/clients/BaseDistributorClient.ts:652](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/clients/BaseDistributorClient.ts#L652) #### Parameters [#parameters-18] | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------ | | `data` | [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData) | #### Returns [#returns-23] `void` #### Inherited from [#inherited-from-21] ```ts BaseDistributorClient.validateDistributorArgs ``` # solana/descriptor/aligned_distributor URL: /docs/api/distributor/solana/descriptor/aligned_distributor # solana/descriptor/aligned\_distributor [#solanadescriptoraligned_distributor] ## Type Aliases [#type-aliases] * [AlignedDistributor](/docs/api/distributor/solana/descriptor/aligned_distributor/type-aliases/AlignedDistributor) # AlignedDistributor URL: /docs/api/distributor/solana/descriptor/aligned_distributor/type-aliases/AlignedDistributor # AlignedDistributor [#aligneddistributor] ```ts type AlignedDistributor = object; ``` Defined in: [distributor/solana/descriptor/aligned\_distributor.ts:7](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/aligned_distributor.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/aligned_distributor.json`. ## Properties [#properties] | Property | Type | Defined in | | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `accounts` | \[\{ `discriminator`: \[`128`, `76`, `80`, `203`, `248`, `175`, `3`, `43`]; `name`: `"alignedDistributor"`; }, \{ `discriminator`: \[`77`, `119`, `139`, `70`, `84`, `247`, `12`, `26`]; `name`: `"merkleDistributor"`; }, \{ `discriminator`: \[`198`, `49`, `63`, `134`, `232`, `251`, `168`, `28`]; `name`: `"testOracle"`; }] | [distributor/solana/descriptor/aligned\_distributor.ts:924](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/aligned_distributor.ts#L924) | | `address` | `"aMERKpFAWoChCi5oZwPvgsSCoGpZKBiU7fi76bdZjt2"` | [distributor/solana/descriptor/aligned\_distributor.ts:8](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/aligned_distributor.ts#L8) | | `errors` | \[\{ `code`: `6000`; `msg`: `"Account is not authorized to execute this instruction"`; `name`: `"unauthorized"`; }, \{ `code`: `6001`; `msg`: `"Arithmetic error"`; `name`: `"arithmeticError"`; }, \{ `code`: `6002`; `msg`: `"Provided Distributor has no locked amount"`; `name`: `"noLockedAmount"`; }, \{ `code`: `6003`; `msg`: `"Provided is invalid, should be equal or more than 30 seconds and unlock_period"`; `name`: `"invalidUpdatePeriod"`; }, \{ `code`: `6004`; `msg`: `"Provided percentage tick size is invalid"`; `name`: `"invalidTickSize"`; }, \{ `code`: `6005`; `msg`: `"Provided percentage bounds are invalid"`; `name`: `"invalidPercentageBoundaries"`; }, \{ `code`: `6006`; `msg`: `"Provided price bounds are invalid"`; `name`: `"invalidPriceBoundaries"`; }, \{ `code`: `6007`; `msg`: `"Unsupported price oracle"`; `name`: `"unsupportedOracle"`; }, \{ `code`: `6008`; `msg`: `"Invalid oracle account"`; `name`: `"invalidOracleAccount"`; }, \{ `code`: `6009`; `msg`: `"Invalid oracle price"`; `name`: `"invalidOraclePrice"`; }, \{ `code`: `6010`; `msg`: `"Duration has been already updated in this period"`; `name`: `"durationAlreadyUpdated"`; }, \{ `code`: `6011`; `msg`: `"Vesting already finished"`; `name`: `"vestingAlreadyFinished"`; }, \{ `code`: `6012`; `msg`: `"New and old admin are identical"`; `name`: `"sameAdmin"`; }, \{ `code`: `6013`; `msg`: `"Invalid Mint"`; `name`: `"invalidMint"`; }, \{ `code`: `6014`; `msg`: `"No fees to claim"`; `name`: `"noFeesToClaim"`; }] | [distributor/solana/descriptor/aligned\_distributor.ts:965](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/aligned_distributor.ts#L965) | | `instructions` | \[\{ `accounts`: \[\{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"alignedDistributor"`; `writable`: `true`; }, \{ `docs`: \[`"Admin signer"`]; `name`: `"admin"`; `signer`: `true`; `writable`: `true`; }, \{ `name`: `"newPriceOracle"`; }]; `args`: \[\{ `name`: `"ix"`; `type`: \{ `defined`: \{ `name`: `"changeOracleParams"`; }; }; }]; `discriminator`: \[`177`, `227`, `230`, `103`, `13`, `72`, `141`, `248`]; `name`: `"changeOracle"`; }, \{ `accounts`: \[\{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"alignedDistributor"`; `writable`: `true`; }, \{ `address`: `"5SEpbdjFK5FxwTvfsGMXVQTD2v4M2c5tyRTxhdsPkgDw"`; `name`: `"treasury"`; `writable`: `true`; }]; `args`: \[]; `discriminator`: \[`127`, `0`, `119`, `89`, `193`, `27`, `209`, `142`]; `name`: `"claimSolFees"`; }, \{ `accounts`: \[\{ `docs`: \[`"The [AlignedDistributor]."`]; `name`: `"alignedDistributor"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`97`, `108`, `105`, `103`, `110`, `101`, `100`, `45`, `100`, `105`, `115`, `116`, `114`, `105`, `98`, `117`, `116`, `111`, `114`]; }, \{ `kind`: `"account"`; `path`: `"distributor"`; }]; }; `writable`: `true`; }, \{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"distributor"`; `writable`: `true`; }, \{ `docs`: \[`"Distributor ATA containing the tokens to distribute."`]; `name`: `"from"`; `writable`: `true`; }, \{ `docs`: \[`"The Clawback token account."`]; `name`: `"to"`; `writable`: `true`; }, \{ `docs`: \[`"Only Admin can trigger the clawback of funds"`]; `name`: `"admin"`; `signer`: `true`; `writable`: `true`; }, \{ `name`: `"mint"`; }, \{ `address`: `"MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N"`; `name`: `"distributorProgram"`; }, \{ `address`: `"11111111111111111111111111111111"`; `docs`: \[`"The [System] program."`]; `name`: `"systemProgram"`; }, \{ `docs`: \[`"SPL [Token] program."`]; `name`: `"tokenProgram"`; }]; `args`: \[]; `discriminator`: \[`111`, `92`, `142`, `79`, `33`, `234`, `82`, `27`]; `name`: `"clawback"`; }, \{ `accounts`: \[\{ `docs`: \[`"The [AlignedDistributor]."`]; `name`: `"alignedDistributor"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`97`, `108`, `105`, `103`, `110`, `101`, `100`, `45`, `100`, `105`, `115`, `116`, `114`, `105`, `98`, `117`, `116`, `111`, `114`]; }, \{ `kind`: `"account"`; `path`: `"distributor"`; }]; }; `writable`: `true`; }, \{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"distributor"`; `writable`: `true`; }, \{ `docs`: \[`"Only Admin can trigger the clawback of funds"`]; `name`: `"admin"`; `signer`: `true`; `writable`: `true`; }, \{ `name`: `"claimant"`; `writable`: `true`; }, \{ `name`: `"claimStatus"`; `pda`: \{ `program`: \{ `kind`: `"account"`; `path`: `"distributorProgram"`; }; `seeds`: \[\{ `kind`: `"const"`; `value`: \[`67`, `108`, `97`, `105`, `109`, `83`, `116`, `97`, `116`, `117`, `115`]; }, \{ `kind`: `"account"`; `path`: `"claimant"`; }, \{ `kind`: `"account"`; `path`: `"distributor"`; }]; }; `writable`: `true`; }, \{ `name`: `"distributorEventAuthority"`; `pda`: \{ `program`: \{ `kind`: `"account"`; `path`: `"distributorProgram"`; }; `seeds`: \[\{ `kind`: `"const"`; `value`: \[`95`, `95`, `101`, `118`, `101`, `110`, `116`, `95`, `97`, `117`, `116`, `104`, `111`, `114`, `105`, `116`, `121`]; }]; }; }, \{ `address`: `"MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N"`; `name`: `"distributorProgram"`; }, \{ `address`: `"11111111111111111111111111111111"`; `docs`: \[`"The [System] program."`]; `name`: `"systemProgram"`; }]; `args`: \[]; `discriminator`: \[`42`, `177`, `165`, `35`, `213`, `179`, `211`, `19`]; `name`: `"closeClaim"`; }, \{ `accounts`: \[\{ `name`: `"creator"`; `signer`: `true`; `writable`: `true`; }, \{ `name`: `"mint"`; }, \{ `name`: `"testOracle"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`116`, `101`, `115`, `116`, `45`, `111`, `114`, `97`, `99`, `108`, `101`]; }, \{ `kind`: `"account"`; `path`: `"mint"`; }, \{ `kind`: `"account"`; `path`: `"creator"`; }]; }; `writable`: `true`; }, \{ `address`: `"11111111111111111111111111111111"`; `name`: `"systemProgram"`; }]; `args`: \[\{ `name`: `"ix"`; `type`: \{ `defined`: \{ `name`: `"createTestOracleParams"`; }; }; }]; `discriminator`: \[`183`, `110`, `4`, `11`, `131`, `220`, `84`, `12`]; `name`: `"createTestOracle"`; }, \{ `accounts`: \[\{ `name`: `"payer"`; `signer`: `true`; `writable`: `true`; }, \{ `name`: `"mint"`; }, \{ `name`: `"creator"`; }, \{ `name`: `"testOracle"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`116`, `101`, `115`, `116`, `45`, `111`, `114`, `97`, `99`, `108`, `101`]; }, \{ `kind`: `"account"`; `path`: `"mint"`; }, \{ `kind`: `"account"`; `path`: `"creator"`; }]; }; `writable`: `true`; }, \{ `address`: `"11111111111111111111111111111111"`; `name`: `"systemProgram"`; }]; `args`: \[]; `discriminator`: \[`203`, `254`, `19`, `3`, `172`, `185`, `85`, `190`]; `name`: `"migrateTestOracle"`; }, \{ `accounts`: \[\{ `name`: `"alignedDistributor"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`97`, `108`, `105`, `103`, `110`, `101`, `100`, `45`, `100`, `105`, `115`, `116`, `114`, `105`, `98`, `117`, `116`, `111`, `114`]; }, \{ `kind`: `"account"`; `path`: `"distributor"`; }]; }; `writable`: `true`; }, \{ `name`: `"priceOracle"`; }, \{ `address`: `"wdrwhnCv4pzW8beKsbPa4S2UDZrXenjg16KJdKSpb5u"`; `name`: `"withdrawor"`; `writable`: `true`; }, \{ `docs`: \[`"Clawback receiver token account"`]; `name`: `"clawbackReceiver"`; `writable`: `true`; }, \{ `docs`: \[`"The mint to distribute."`]; `name`: `"mint"`; }, \{ `name`: `"distributor"`; `writable`: `true`; }, \{ `name`: `"tokenVault"`; `writable`: `true`; }, \{ `docs`: \[`"Original Admin wallet, responsible for creating the distributor and paying for the transaction."`, `"Also has the authority to set the clawback receiver and change itself."`]; `name`: `"admin"`; `signer`: `true`; `writable`: `true`; }, \{ `address`: `"MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N"`; `docs`: \[`"MerkleDistributor program"`]; `name`: `"distributorProgram"`; }, \{ `address`: `"11111111111111111111111111111111"`; `docs`: \[`"The [System] program."`]; `name`: `"systemProgram"`; }, \{ `address`: `"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"`; `docs`: \[`"The [Associated Token] program."`]; `name`: `"associatedTokenProgram"`; }, \{ `docs`: \[`"The [Token] program."`]; `name`: `"tokenProgram"`; }, \{ `name`: `"partnerOracleConfig"`; `pda`: \{ `program`: \{ `kind`: `"const"`; `value`: \[`12`, `48`, `148`, `48`, `221`, `89`, `2`, `209`, `180`, `126`, `151`, `216`, `166`, `3`, `112`, `50`, `177`, `192`, `141`, `218`, `37`, `78`, `51`, `109`, `243`, `106`, `174`, `122`, `93`, `121`, `191`, `119`]; }; `seeds`: \[\{ `kind`: `"const"`; `value`: \[`97`, `105`, `114`, `100`, `114`, `111`, `112`, `95`, `99`, `111`, `110`, `102`, `105`, `103`]; }]; }; }, \{ `address`: `"pardpVtPjC8nLj1Dwncew62mUzfChdCX1EaoZe8oCAa"`; `docs`: \[`"Partner Oracle program that stores fees"`]; `name`: `"partnerOracle"`; }]; `args`: \[\{ `name`: `"ix"`; `type`: \{ `defined`: \{ `name`: `"newDistributorIx"`; }; }; }]; `discriminator`: \[`32`, `139`, `112`, `171`, `0`, `2`, `225`, `155`]; `name`: `"newDistributor"`; }, \{ `accounts`: \[\{ `name`: `"payer"`; `signer`: `true`; `writable`: `true`; }, \{ `name`: `"mint"`; }, \{ `name`: `"creator"`; }, \{ `name`: `"testOracle"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`116`, `101`, `115`, `116`, `45`, `111`, `114`, `97`, `99`, `108`, `101`]; }, \{ `kind`: `"account"`; `path`: `"mint"`; }, \{ `kind`: `"account"`; `path`: `"creator"`; }]; }; `writable`: `true`; }, \{ `address`: `"11111111111111111111111111111111"`; `name`: `"systemProgram"`; }]; `args`: \[]; `discriminator`: \[`234`, `221`, `116`, `4`, `198`, `251`, `244`, `206`]; `name`: `"reallocTestOracle"`; }, \{ `accounts`: \[\{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"alignedDistributor"`; `writable`: `true`; }, \{ `docs`: \[`"Admin signer"`]; `name`: `"admin"`; `signer`: `true`; `writable`: `true`; }, \{ `docs`: \[`"New admin account"`]; `name`: `"newAdmin"`; `writable`: `true`; }]; `args`: \[]; `discriminator`: \[`251`, `163`, `0`, `52`, `91`, `194`, `187`, `92`]; `name`: `"setAdmin"`; }, \{ `accounts`: \[\{ `name`: `"authority"`; `signer`: `true`; `writable`: `true`; }, \{ `name`: `"testOracle"`; `writable`: `true`; }, \{ `name`: `"newAuthority"`; }]; `args`: \[]; `discriminator`: \[`26`, `66`, `233`, `99`, `38`, `118`, `181`, `247`]; `name`: `"setTestOracleAuthority"`; }, \{ `accounts`: \[\{ `docs`: \[`"Wallet authorised to call this method"`]; `name`: `"authority"`; `signer`: `true`; `writable`: `true`; }, \{ `docs`: \[`"The account holding the proxy parameters."`]; `name`: `"alignedDistributor"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`97`, `108`, `105`, `103`, `110`, `101`, `100`, `45`, `100`, `105`, `115`, `116`, `114`, `105`, `98`, `117`, `116`, `111`, `114`]; }, \{ `kind`: `"account"`; `path`: `"distributor"`; }]; }; `writable`: `true`; }, \{ `docs`: \[`"The account holding the vesting parameters."`]; `name`: `"distributor"`; `writable`: `true`; }, \{ `name`: `"priceOracle"`; `relations`: \[`"alignedDistributor"`]; }, \{ `address`: `"MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N"`; `docs`: \[`"MerkleDistributor program"`]; `name`: `"distributorProgram"`; }, \{ `address`: `"11111111111111111111111111111111"`; `name`: `"systemProgram"`; }]; `args`: \[]; `discriminator`: \[`69`, `126`, `172`, `250`, `164`, `14`, `10`, `161`]; `name`: `"updateDuration"`; }, \{ `accounts`: \[\{ `name`: `"authority"`; `signer`: `true`; `writable`: `true`; }, \{ `name`: `"testOracle"`; `writable`: `true`; }]; `args`: \[\{ `name`: `"ix"`; `type`: \{ `defined`: \{ `name`: `"updateTestOracleParams"`; }; }; }]; `discriminator`: \[`158`, `147`, `215`, `74`, `34`, `123`, `80`, `76`]; `name`: `"updateTestOracle"`; }] | [distributor/solana/descriptor/aligned\_distributor.ts:15](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/aligned_distributor.ts#L15) | | `metadata` | `object` | [distributor/solana/descriptor/aligned\_distributor.ts:9](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/aligned_distributor.ts#L9) | | `metadata.description` | `"Proxy for merkle distributor that updates Vesting duration according to token market performance."` | [distributor/solana/descriptor/aligned\_distributor.ts:13](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/aligned_distributor.ts#L13) | | `metadata.name` | `"alignedDistributor"` | [distributor/solana/descriptor/aligned\_distributor.ts:10](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/aligned_distributor.ts#L10) | | `metadata.spec` | `"0.1.0"` | [distributor/solana/descriptor/aligned\_distributor.ts:12](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/aligned_distributor.ts#L12) | | `metadata.version` | `"2.0.0"` | [distributor/solana/descriptor/aligned\_distributor.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/aligned_distributor.ts#L11) | | `types` | \[\{ `docs`: \[`"State for the account which distributes tokens."`]; `name`: `"alignedDistributor"`; `type`: \{ `fields`: \[\{ `docs`: \[`"Bump seed."`]; `name`: `"bump"`; `type`: `"u8"`; }, \{ `docs`: \[`"[Mint] of the token to be distributed."`]; `name`: `"distributor"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Admin wallet"`]; `name`: `"admin"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Type of the Oracle used to derive Token Price"`]; `name`: `"priceOracleType"`; `type`: \{ `defined`: \{ `name`: `"oracleType"`; }; }; }, \{ `docs`: \[`"Address of the Price Oracle"`]; `name`: `"priceOracle"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Period of updates, can be different from unlock period if needed"`]; `name`: `"updatePeriod"`; `type`: `"u64"`; }, \{ `docs`: \[`"Min price boundary"`]; `name`: `"minPrice"`; `type`: `"u64"`; }, \{ `docs`: \[`"Max price boundary"`]; `name`: `"maxPrice"`; `type`: `"u64"`; }, \{ `docs`: \[`"Min percentage boundary, can be 0 that equals 1 Raw Token"`]; `name`: `"minPercentage"`; `type`: `"u64"`; }, \{ `docs`: \[`"Max percentage boundary"`]; `name`: `"maxPercentage"`; `type`: `"u64"`; }, \{ `docs`: \[`"Ticket size for percentage boundaries"`]; `name`: `"tickSize"`; `type`: `"u64"`; }, \{ `docs`: \[`"Copy start ts from the Distributor to be used in the worker"`]; `name`: `"startTs"`; `type`: `"u64"`; }, \{ `docs`: \[`"Copy end ts from the Distributor to be used in the worker"`]; `name`: `"endTs"`; `type`: `"u64"`; }, \{ `docs`: \[`"Copy last_duration_update_ts from Distributor for our worker to be able to fetch it in one call with the proxy"`]; `name`: `"lastDurationUpdateTs"`; `type`: `"u64"`; }, \{ `docs`: \[`"Price used on last amount calculation"`]; `name`: `"lastPrice"`; `type`: `"u64"`; }, \{ `docs`: \[`"Initial Airdrop Vesting duration"`]; `name`: `"initialDuration"`; `type`: `"u64"`; }, \{ `docs`: \[`"Initial token price at the time of Contract creation"`]; `name`: `"initialPrice"`; `type`: `"u64"`; }, \{ `docs`: \[`"Whether distributor was clawed backed"`]; `name`: `"distributorClawedBack"`; `type`: `"bool"`; }, \{ `docs`: \[`"Mint for which the distributor was created"`]; `name`: `"mint"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Fee for custom price oracle used in dynamic airdrops"`]; `name`: `"priceOracleFee"`; `type`: `"u32"`; }, \{ `docs`: \[`"Whether fee for the price oracle has been claimed"`]; `name`: `"priceOracleFeeClaimed"`; `type`: `"bool"`; }, \{ `docs`: \[`"Buffer for additional fields"`]; `name`: `"buffer2"`; `type`: \{ `array`: \[`"u8"`, `27`]; }; }, \{ `docs`: \[`"Buffer for additional fields"`]; `name`: `"buffer3"`; `type`: \{ `array`: \[`"u8"`, `32`]; }; }]; `kind`: `"struct"`; }; }, \{ `name`: `"changeOracleParams"`; `type`: \{ `fields`: \[\{ `name`: `"oracleType"`; `type`: \{ `defined`: \{ `name`: `"oracleType"`; }; }; }]; `kind`: `"struct"`; }; }, \{ `name`: `"createTestOracleParams"`; `type`: \{ `fields`: \[\{ `name`: `"price"`; `type`: `"u64"`; }, \{ `name`: `"expo"`; `type`: `"i32"`; }, \{ `name`: `"conf"`; `type`: `"u64"`; }, \{ `name`: `"publishTime"`; `type`: `"i64"`; }]; `kind`: `"struct"`; }; }, \{ `docs`: \[`"State for the account which distributes tokens."`]; `name`: `"merkleDistributor"`; `type`: \{ `fields`: \[\{ `docs`: \[`"Bump seed."`]; `name`: `"bump"`; `type`: `"u8"`; }, \{ `docs`: \[`"Version of the airdrop"`]; `name`: `"version"`; `type`: `"u64"`; }, \{ `docs`: \[`"The 256-bit merkle root."`]; `name`: `"root"`; `type`: \{ `array`: \[`"u8"`, `32`]; }; }, \{ `docs`: \[`"[Mint] of the token to be distributed."`]; `name`: `"mint"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Token Address of the vault"`]; `name`: `"tokenVault"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Maximum number of tokens that can ever be claimed from this [MerkleDistributor]."`]; `name`: `"maxTotalClaim"`; `type`: `"u64"`; }, \{ `docs`: \[`"Maximum number of nodes in [MerkleDistributor]."`]; `name`: `"maxNumNodes"`; `type`: `"u64"`; }, \{ `docs`: \[`"Time step (period) in seconds per which the unlock occurs"`]; `name`: `"unlockPeriod"`; `type`: `"u64"`; }, \{ `docs`: \[`"Total amount of tokens that have been claimed."`]; `name`: `"totalAmountClaimed"`; `type`: `"u64"`; }, \{ `docs`: \[`"Number of nodes that have been claimed."`]; `name`: `"numNodesClaimed"`; `type`: `"u64"`; }, \{ `docs`: \[`"Lockup time start (Unix Timestamp)"`]; `name`: `"startTs"`; `type`: `"u64"`; }, \{ `docs`: \[`"Lockup time end (Unix Timestamp)"`]; `name`: `"endTs"`; `type`: `"u64"`; }, \{ `docs`: \[`"Clawback start (Unix Timestamp)"`]; `name`: `"clawbackStartTs"`; `type`: `"u64"`; }, \{ `docs`: \[`"Clawback receiver"`]; `name`: `"clawbackReceiver"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Admin wallet"`]; `name`: `"admin"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Whether or not the distributor has been clawed back"`]; `name`: `"clawedBack"`; `type`: `"bool"`; }, \{ `docs`: \[`"Whether claims are closable by the admin or not"`]; `name`: `"claimsClosableByAdmin"`; `type`: `"bool"`; }, \{ `docs`: \[`"Whether admin can update vesting duration"`]; `name`: `"canUpdateDuration"`; `type`: `"bool"`; }, \{ `docs`: \[`"Total amount of funds unlocked (cliff/instant)"`]; `name`: `"totalAmountUnlocked"`; `type`: `"u64"`; }, \{ `docs`: \[`"Total amount of funds locked (vested)"`]; `name`: `"totalAmountLocked"`; `type`: `"u64"`; }, \{ `docs`: \[`"Timestamp when update was last called"`]; `name`: `"lastDurationUpdateTs"`; `type`: `"u64"`; }, \{ `docs`: \[`"Total amount of locked amount claimable as of last duration update, ever increasing total, accumulates with each update"`]; `name`: `"totalClaimablePreUpdate"`; `type`: `"u64"`; }, \{ `docs`: \[`"Timestamp when funds were clawed back"`]; `name`: `"clawedBackTs"`; `type`: `"u64"`; }, \{ `docs`: \[`"Whether claims are closable by claimant or not"`]; `name`: `"claimsClosableByClaimant"`; `type`: `"bool"`; }, \{ `docs`: \[`"Limit number of claims"`]; `name`: `"claimsLimit"`; `type`: `"u16"`; }, \{ `docs`: \[`"Creation SOL fee"`]; `name`: `"creationFee"`; `type`: `"u32"`; }, \{ `docs`: \[`"Whether creation SOL was claimed"`]; `name`: `"creationFeeClaimed"`; `type`: `"bool"`; }, \{ `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 multiply claimable SOL lamports by when calculating fee"`]; `name`: `"allocationFactor"`; `type`: `"f64"`; }, \{ `docs`: \[`"Whether all claim fees were claimed, true by default since no claim fee is taken on creation"`]; `name`: `"claimFeeClaimed"`; `type`: `"bool"`; }, \{ `docs`: \[`"Last observed token price in lamports per 1 whole token for claim fee calculation"`]; `name`: `"tokenPriceLamports"`; `type`: `"u64"`; }, \{ `docs`: \[`"Token % fee on clawback"`]; `name`: `"clawbackTokenFeePercent"`; `type`: `"f64"`; }, \{ `docs`: \[`"Whether clawback token % fee has been claimed"`]; `name`: `"clawbackFeeClaimed"`; `type`: `"bool"`; }, \{ `docs`: \[`"Program version that initiated the Distributor account"`]; `name`: `"programVersion"`; `type`: `"u8"`; }, \{ `docs`: \[`"Buffer for additional fields"`]; `name`: `"buffer"`; `type`: \{ `array`: \[`"u8"`, `13`]; }; }]; `kind`: `"struct"`; }; }, \{ `name`: `"newDistributorIx"`; `type`: \{ `fields`: \[\{ `name`: `"version"`; `type`: `"u64"`; }, \{ `name`: `"root"`; `type`: \{ `array`: \[`"u8"`, `32`]; }; }, \{ `name`: `"maxTotalClaim"`; `type`: `"u64"`; }, \{ `name`: `"maxNumNodes"`; `type`: `"u64"`; }, \{ `name`: `"unlockPeriod"`; `type`: `"u64"`; }, \{ `name`: `"startVestingTs"`; `type`: `"u64"`; }, \{ `name`: `"endVestingTs"`; `type`: `"u64"`; }, \{ `name`: `"clawbackStartTs"`; `type`: `"u64"`; }, \{ `name`: `"claimsClosable"`; `type`: `"bool"`; }, \{ `name`: `"totalAmountUnlocked"`; `type`: `"u64"`; }, \{ `name`: `"totalAmountLocked"`; `type`: `"u64"`; }, \{ `name`: `"updatePeriod"`; `type`: `"u64"`; }, \{ `name`: `"oracleType"`; `type`: \{ `defined`: \{ `name`: `"oracleType"`; }; }; }, \{ `name`: `"minPrice"`; `type`: `"u64"`; }, \{ `name`: `"maxPrice"`; `type`: `"u64"`; }, \{ `name`: `"minPercentage"`; `type`: `"u64"`; }, \{ `name`: `"maxPercentage"`; `type`: `"u64"`; }, \{ `name`: `"tickSize"`; `type`: `"u64"`; }, \{ `name`: `"skipInitial"`; `type`: `"bool"`; }]; `kind`: `"struct"`; }; }, \{ `name`: `"oracleType"`; `type`: \{ `kind`: `"enum"`; `variants`: \[\{ `name`: `"none"`; }, \{ `name`: `"test"`; }, \{ `name`: `"pyth"`; }, \{ `name`: `"switchboard"`; }]; }; }, \{ `name`: `"testOracle"`; `type`: \{ `fields`: \[\{ `name`: `"price"`; `type`: `"u64"`; }, \{ `name`: `"expo"`; `type`: `"i32"`; }, \{ `name`: `"conf"`; `type`: `"u64"`; }, \{ `name`: `"publishTime"`; `type`: `"i64"`; }, \{ `name`: `"creator"`; `type`: `"pubkey"`; }, \{ `name`: `"authority"`; `type`: `"pubkey"`; }, \{ `name`: `"mint"`; `type`: `"pubkey"`; }]; `kind`: `"struct"`; }; }, \{ `name`: `"updateTestOracleParams"`; `type`: \{ `fields`: \[\{ `name`: `"price"`; `type`: `"u64"`; }, \{ `name`: `"expo"`; `type`: `"i32"`; }, \{ `name`: `"conf"`; `type`: `"u64"`; }, \{ `name`: `"publishTime"`; `type`: `"i64"`; }]; `kind`: `"struct"`; }; }] | [distributor/solana/descriptor/aligned\_distributor.ts:1042](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/aligned_distributor.ts#L1042) | # solana/descriptor/merkle_distributor URL: /docs/api/distributor/solana/descriptor/merkle_distributor # solana/descriptor/merkle\_distributor [#solanadescriptormerkle_distributor] ## Type Aliases [#type-aliases] * [MerkleDistributor](/docs/api/distributor/solana/descriptor/merkle_distributor/type-aliases/MerkleDistributor) # MerkleDistributor URL: /docs/api/distributor/solana/descriptor/merkle_distributor/type-aliases/MerkleDistributor # MerkleDistributor [#merkledistributor] ```ts type MerkleDistributor = object; ``` Defined in: [distributor/solana/descriptor/merkle\_distributor.ts:7](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/merkle_distributor.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/merkle_distributor.json`. ## Properties [#properties] | Property | Type | Defined in | | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `accounts` | \[\{ `discriminator`: \[`22`, `183`, `249`, `157`, `247`, `95`, `150`, `96`]; `name`: `"claimStatus"`; }, \{ `discriminator`: \[`53`, `68`, `161`, `131`, `212`, `106`, `98`, `48`]; `name`: `"compressedClaimStatus"`; }, \{ `discriminator`: \[`77`, `119`, `139`, `70`, `84`, `247`, `12`, `26`]; `name`: `"merkleDistributor"`; }] | [distributor/solana/descriptor/merkle\_distributor.ts:1605](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/merkle_distributor.ts#L1605) | | `address` | `"MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N"` | [distributor/solana/descriptor/merkle\_distributor.ts:8](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/merkle_distributor.ts#L8) | | `errors` | \[\{ `code`: `6000`; `msg`: `"Insufficient unlocked tokens"`; `name`: `"insufficientUnlockedTokens"`; }, \{ `code`: `6001`; `msg`: `"Invalid Merkle proof"`; `name`: `"invalidProof"`; }, \{ `code`: `6002`; `msg`: `"Exceeded maximum claim amount"`; `name`: `"exceededMaxClaim"`; }, \{ `code`: `6003`; `msg`: `"Exceeded maximum node count"`; `name`: `"maxNodesExceeded"`; }, \{ `code`: `6004`; `msg`: `"Account is not authorized to execute this instruction"`; `name`: `"unauthorized"`; }, \{ `code`: `6005`; `msg`: `"Token account owner did not match intended owner"`; `name`: `"ownerMismatch"`; }, \{ `code`: `6006`; `msg`: `"Attempted clawback before start"`; `name`: `"clawbackBeforeStart"`; }, \{ `code`: `6007`; `msg`: `"Clawback already claimed"`; `name`: `"clawbackAlreadyClaimed"`; }, \{ `code`: `6008`; `msg`: `"New and old Clawback receivers are identical"`; `name`: `"sameClawbackReceiver"`; }, \{ `code`: `6009`; `msg`: `"Clawback receiver can not be the Token Vault"`; `name`: `"clawbackReceiverIsTokenVault"`; }, \{ `code`: `6010`; `msg`: `"New and old admin are identical"`; `name`: `"sameAdmin"`; }, \{ `code`: `6011`; `msg`: `"Claim window expired"`; `name`: `"claimExpired"`; }, \{ `code`: `6012`; `msg`: `"Arithmetic Error (overflow/underflow)"`; `name`: `"arithmeticError"`; }, \{ `code`: `6013`; `msg`: `"Start Timestamp cannot be after end Timestamp"`; `name`: `"startTimestampAfterEnd"`; }, \{ `code`: `6014`; `msg`: `"Timestamps cannot be in the past"`; `name`: `"timestampsNotInFuture"`; }, \{ `code`: `6015`; `msg`: `"Invalid Mint"`; `name`: `"invalidMint"`; }, \{ `code`: `6016`; `msg`: `"Claim is closed"`; `name`: `"claimIsClosed"`; }, \{ `code`: `6017`; `msg`: `"Claims are not closable"`; `name`: `"claimsAreNotClosable"`; }, \{ `code`: `6018`; `msg`: `"Invalid unlock period"`; `name`: `"invalidUnlockPeriod"`; }, \{ `code`: `6019`; `msg`: `"Duration update is not allowed"`; `name`: `"durationUpdateNotAllowed"`; }, \{ `code`: `6020`; `msg`: `"Vesting amounts are not set"`; `name`: `"noVestingAmount"`; }, \{ `code`: `6021`; `msg`: `"Vesting already finished"`; `name`: `"vestingAlreadyFinished"`; }, \{ `code`: `6022`; `msg`: `"Provided amounts are invalid"`; `name`: `"invalidAmounts"`; }, \{ `code`: `6023`; `msg`: `"Claims limit has been reached"`; `name`: `"claimsLimitReached"`; }, \{ `code`: `6024`; `msg`: `"Account does not have enough funds to cover fees"`; `name`: `"insufficientFunds"`; }, \{ `code`: `6025`; `msg`: `"This Airdrop must be claimed via claimLockedV2"`; `name`: `"claimV2Required"`; }, \{ `code`: `6026`; `msg`: `"No fees to claim"`; `name`: `"noFeesToClaim"`; }] | [distributor/solana/descriptor/merkle\_distributor.ts:1687](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/merkle_distributor.ts#L1687) | | `events` | \[\{ `discriminator`: \[`139`, `166`, `215`, `195`, `184`, `233`, `26`, `217`]; `name`: `"claimClosedEvent"`; }, \{ `discriminator`: \[`144`, `172`, `209`, `86`, `144`, `87`, `84`, `115`]; `name`: `"claimedEvent"`; }, \{ `discriminator`: \[`244`, `3`, `231`, `151`, `60`, `101`, `55`, `55`]; `name`: `"newClaimEvent"`; }] | [distributor/solana/descriptor/merkle\_distributor.ts:1646](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/merkle_distributor.ts#L1646) | | `instructions` | \[\{ `accounts`: \[\{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"distributor"`; }, \{ `docs`: \[`"Claim Status PDA"`]; `name`: `"claimStatus"`; `optional`: `true`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`67`, `108`, `97`, `105`, `109`, `83`, `116`, `97`, `116`, `117`, `115`]; }, \{ `kind`: `"account"`; `path`: `"claimant"`; }, \{ `kind`: `"account"`; `path`: `"distributor"`; }]; }; }, \{ `docs`: \[`"Compress Claim Status PDA"`]; `name`: `"compressedClaimStatus"`; `optional`: `true`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`67`, `108`, `97`, `105`, `109`, `83`, `116`, `97`, `116`, `117`, `115`]; }, \{ `kind`: `"account"`; `path`: `"claimant"`; }, \{ `kind`: `"account"`; `path`: `"distributor"`; }]; }; }, \{ `docs`: \[`"Who is claiming the tokens."`]; `name`: `"claimant"`; `signer`: `true`; }]; `args`: \[]; `discriminator`: \[`103`, `233`, `83`, `69`, `115`, `199`, `128`, `249`]; `name`: `"exposeClaim"`; }, \{ `accounts`: \[\{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"distributor"`; `writable`: `true`; }, \{ `name`: `"claimStatus"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`67`, `108`, `97`, `105`, `109`, `83`, `116`, `97`, `116`, `117`, `115`]; }, \{ `kind`: `"account"`; `path`: `"claimant"`; }, \{ `kind`: `"account"`; `path`: `"distributor"`; }]; }; `writable`: `true`; }, \{ `docs`: \[`"Distributor ATA containing the tokens to distribute."`]; `name`: `"from"`; `pda`: \{ `program`: \{ `kind`: `"const"`; `value`: \[`140`, `151`, `37`, `143`, `78`, `36`, `137`, `241`, `187`, `61`, `16`, `41`, `20`, `142`, `13`, `131`, `11`, `90`, `19`, `153`, `218`, `255`, `16`, `132`, `4`, `142`, `123`, `216`, `219`, `233`, `248`, `89`]; }; `seeds`: \[\{ `kind`: `"account"`; `path`: `"distributor"`; }, \{ `kind`: `"account"`; `path`: `"tokenProgram"`; }, \{ `account`: `"merkleDistributor"`; `kind`: `"account"`; `path`: `"distributor.mint"`; }]; }; `writable`: `true`; }, \{ `docs`: \[`"Account to send the claimed tokens to."`, `"Claimant must sign the transaction and can only claim on behalf of themself"`]; `name`: `"to"`; `writable`: `true`; }, \{ `docs`: \[`"Who is claiming the tokens."`]; `name`: `"claimant"`; `signer`: `true`; `writable`: `true`; }, \{ `docs`: \[`"The mint to claim."`]; `name`: `"mint"`; `relations`: \[`"distributor"`]; }, \{ `docs`: \[`"SPL [Token] program."`]; `name`: `"tokenProgram"`; }, \{ `name`: `"eventAuthority"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`95`, `95`, `101`, `118`, `101`, `110`, `116`, `95`, `97`, `117`, `116`, `104`, `111`, `114`, `105`, `116`, `121`]; }]; }; }, \{ `name`: `"program"`; }]; `args`: \[]; `discriminator`: \[`34`, `206`, `181`, `23`, `11`, `207`, `147`, `90`]; `name`: `"claimLocked"`; }, \{ `accounts`: \[\{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"distributor"`; `writable`: `true`; }, \{ `name`: `"claimStatus"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`67`, `108`, `97`, `105`, `109`, `83`, `116`, `97`, `116`, `117`, `115`]; }, \{ `kind`: `"account"`; `path`: `"claimant"`; }, \{ `kind`: `"account"`; `path`: `"distributor"`; }]; }; `writable`: `true`; }, \{ `docs`: \[`"Distributor ATA containing the tokens to distribute."`]; `name`: `"from"`; `pda`: \{ `program`: \{ `kind`: `"const"`; `value`: \[`140`, `151`, `37`, `143`, `78`, `36`, `137`, `241`, `187`, `61`, `16`, `41`, `20`, `142`, `13`, `131`, `11`, `90`, `19`, `153`, `218`, `255`, `16`, `132`, `4`, `142`, `123`, `216`, `219`, `233`, `248`, `89`]; }; `seeds`: \[\{ `kind`: `"account"`; `path`: `"distributor"`; }, \{ `kind`: `"account"`; `path`: `"tokenProgram"`; }, \{ `account`: `"merkleDistributor"`; `kind`: `"account"`; `path`: `"distributor.mint"`; }]; }; `writable`: `true`; }, \{ `docs`: \[`"Account to send the claimed tokens to."`, `"Claimant must sign the transaction and can only claim on behalf of themself"`]; `name`: `"to"`; `writable`: `true`; }, \{ `docs`: \[`"Who is claiming the tokens."`]; `name`: `"claimant"`; `signer`: `true`; `writable`: `true`; }, \{ `docs`: \[`"The mint to claim."`]; `name`: `"mint"`; `relations`: \[`"distributor"`]; }, \{ `docs`: \[`"SPL [Token] program."`]; `name`: `"tokenProgram"`; }, \{ `address`: `"11111111111111111111111111111111"`; `docs`: \[`"System program for fee transfers."`]; `name`: `"systemProgram"`; }, \{ `name`: `"eventAuthority"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`95`, `95`, `101`, `118`, `101`, `110`, `116`, `95`, `97`, `117`, `116`, `104`, `111`, `114`, `105`, `116`, `121`]; }]; }; }, \{ `name`: `"program"`; }]; `args`: \[]; `discriminator`: \[`44`, `21`, `175`, `161`, `99`, `76`, `44`, `249`]; `name`: `"claimLockedV2"`; }, \{ `accounts`: \[\{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"distributor"`; `writable`: `true`; }, \{ `address`: `"5SEpbdjFK5FxwTvfsGMXVQTD2v4M2c5tyRTxhdsPkgDw"`; `name`: `"treasury"`; `writable`: `true`; }]; `args`: \[]; `discriminator`: \[`127`, `0`, `119`, `89`, `193`, `27`, `209`, `142`]; `name`: `"claimSolFees"`; }, \{ `accounts`: \[\{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"distributor"`; `writable`: `true`; }, \{ `docs`: \[`"Token vault to return clawback fee from"`]; `name`: `"tokenVault"`; `relations`: \[`"distributor"`]; `writable`: `true`; }, \{ `docs`: \[`"Distributor mint"`]; `name`: `"mint"`; `relations`: \[`"distributor"`]; }, \{ `address`: `"5SEpbdjFK5FxwTvfsGMXVQTD2v4M2c5tyRTxhdsPkgDw"`; `name`: `"treasury"`; `writable`: `true`; }, \{ `docs`: \[`"Account to send the clawed back fee to."`]; `name`: `"to"`; `writable`: `true`; }, \{ `docs`: \[`"SPL [Token] program."`]; `name`: `"tokenProgram"`; }]; `args`: \[]; `discriminator`: \[`205`, `136`, `215`, `209`, `62`, `196`, `69`, `182`]; `name`: `"claimTokenFees"`; }, \{ `accounts`: \[\{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"distributor"`; `writable`: `true`; }, \{ `docs`: \[`"Distributor ATA containing the tokens to distribute."`]; `name`: `"from"`; `writable`: `true`; }, \{ `docs`: \[`"The Clawback token account."`]; `name`: `"to"`; `writable`: `true`; }, \{ `docs`: \[`"Only Admin can trigger the clawback of funds"`]; `name`: `"admin"`; `signer`: `true`; `writable`: `true`; }, \{ `name`: `"mint"`; }, \{ `address`: `"11111111111111111111111111111111"`; `docs`: \[`"The [System] program."`]; `name`: `"systemProgram"`; }, \{ `docs`: \[`"SPL [Token] program."`]; `name`: `"tokenProgram"`; }]; `args`: \[]; `discriminator`: \[`111`, `92`, `142`, `79`, `33`, `234`, `82`, `27`]; `name`: `"clawback"`; }, \{ `accounts`: \[\{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"distributor"`; `writable`: `true`; }, \{ `docs`: \[`"Admin signer"`]; `name`: `"adminOrClaimant"`; `signer`: `true`; `writable`: `true`; }, \{ `docs`: \[`"Optional payer for the account creation in case it doesn't exist"`]; `name`: `"payer"`; `signer`: `true`; `writable`: `true`; }, \{ `name`: `"claimant"`; `writable`: `true`; }, \{ `name`: `"claimStatus"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`67`, `108`, `97`, `105`, `109`, `83`, `116`, `97`, `116`, `117`, `115`]; }, \{ `kind`: `"account"`; `path`: `"claimant"`; }, \{ `kind`: `"account"`; `path`: `"distributor"`; }]; }; `writable`: `true`; }, \{ `address`: `"11111111111111111111111111111111"`; `docs`: \[`"The [System] program."`]; `name`: `"systemProgram"`; }, \{ `name`: `"eventAuthority"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`95`, `95`, `101`, `118`, `101`, `110`, `116`, `95`, `97`, `117`, `116`, `104`, `111`, `114`, `105`, `116`, `121`]; }]; }; }, \{ `name`: `"program"`; }]; `args`: \[\{ `name`: `"amountUnlocked"`; `type`: \{ `option`: `"u64"`; }; }, \{ `name`: `"amountLocked"`; `type`: \{ `option`: `"u64"`; }; }, \{ `name`: `"proof"`; `type`: \{ `option`: \{ `vec`: \{ `array`: \[`"u8"`, `32`]; }; }; }; }]; `discriminator`: \[`42`, `177`, `165`, `35`, `213`, `179`, `211`, `19`]; `name`: `"closeClaim"`; }, \{ `accounts`: \[\{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"distributor"`; `writable`: `true`; }, \{ `name`: `"claimStatus"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`67`, `108`, `97`, `105`, `109`, `83`, `116`, `97`, `116`, `117`, `115`]; }, \{ `kind`: `"account"`; `path`: `"claimant"`; }, \{ `kind`: `"account"`; `path`: `"distributor"`; }]; }; `writable`: `true`; }, \{ `docs`: \[`"Signer account"`]; `name`: `"signer"`; `signer`: `true`; `writable`: `true`; }, \{ `name`: `"claimant"`; }, \{ `address`: `"11111111111111111111111111111111"`; `docs`: \[`"The [System] program."`]; `name`: `"systemProgram"`; }]; `args`: \[]; `discriminator`: \[`219`, `45`, `247`, `134`, `71`, `119`, `125`, `89`]; `name`: `"compressClaim"`; }, \{ `accounts`: \[\{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"distributor"`; `writable`: `true`; }, \{ `name`: `"claimStatus"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`67`, `108`, `97`, `105`, `109`, `83`, `116`, `97`, `116`, `117`, `115`]; }, \{ `kind`: `"account"`; `path`: `"claimant"`; }, \{ `kind`: `"account"`; `path`: `"distributor"`; }]; }; `writable`: `true`; }, \{ `docs`: \[`"Distributor ATA containing the tokens to distribute."`]; `name`: `"from"`; `pda`: \{ `program`: \{ `kind`: `"const"`; `value`: \[`140`, `151`, `37`, `143`, `78`, `36`, `137`, `241`, `187`, `61`, `16`, `41`, `20`, `142`, `13`, `131`, `11`, `90`, `19`, `153`, `218`, `255`, `16`, `132`, `4`, `142`, `123`, `216`, `219`, `233`, `248`, `89`]; }; `seeds`: \[\{ `kind`: `"account"`; `path`: `"distributor"`; }, \{ `kind`: `"account"`; `path`: `"tokenProgram"`; }, \{ `account`: `"merkleDistributor"`; `kind`: `"account"`; `path`: `"distributor.mint"`; }]; }; `writable`: `true`; }, \{ `docs`: \[`"Account to send the claimed tokens to."`]; `name`: `"to"`; `writable`: `true`; }, \{ `docs`: \[`"Who is claiming the tokens."`]; `name`: `"claimant"`; `signer`: `true`; `writable`: `true`; }, \{ `docs`: \[`"The mint to claim."`]; `name`: `"mint"`; `relations`: \[`"distributor"`]; }, \{ `docs`: \[`"SPL [Token] program."`]; `name`: `"tokenProgram"`; }, \{ `address`: `"11111111111111111111111111111111"`; `docs`: \[`"The [System] program."`]; `name`: `"systemProgram"`; }, \{ `name`: `"eventAuthority"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`95`, `95`, `101`, `118`, `101`, `110`, `116`, `95`, `97`, `117`, `116`, `104`, `111`, `114`, `105`, `116`, `121`]; }]; }; }, \{ `name`: `"program"`; }]; `args`: \[\{ `name`: `"amountUnlocked"`; `type`: `"u64"`; }, \{ `name`: `"amountLocked"`; `type`: `"u64"`; }, \{ `name`: `"proof"`; `type`: \{ `vec`: \{ `array`: \[`"u8"`, `32`]; }; }; }]; `discriminator`: \[`78`, `177`, `98`, `123`, `210`, `21`, `187`, `83`]; `name`: `"newClaim"`; }, \{ `accounts`: \[\{ `docs`: \[`"[MerkleDistributor]."`]; `name`: `"distributor"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`77`, `101`, `114`, `107`, `108`, `101`, `68`, `105`, `115`, `116`, `114`, `105`, `98`, `117`, `116`, `111`, `114`]; }, \{ `kind`: `"account"`; `path`: `"mint"`; }, \{ `kind`: `"arg"`; `path`: `"version"`; }]; }; `writable`: `true`; }, \{ `docs`: \[`"Clawback receiver token account"`]; `name`: `"clawbackReceiver"`; `writable`: `true`; }, \{ `docs`: \[`"The mint to distribute."`]; `name`: `"mint"`; }, \{ `docs`: \[`"Token vault"`]; `name`: `"tokenVault"`; `pda`: \{ `program`: \{ `kind`: `"const"`; `value`: \[`140`, `151`, `37`, `143`, `78`, `36`, `137`, `241`, `187`, `61`, `16`, `41`, `20`, `142`, `13`, `131`, `11`, `90`, `19`, `153`, `218`, `255`, `16`, `132`, `4`, `142`, `123`, `216`, `219`, `233`, `248`, `89`]; }; `seeds`: \[\{ `kind`: `"account"`; `path`: `"distributor"`; }, \{ `kind`: `"account"`; `path`: `"tokenProgram"`; }, \{ `kind`: `"account"`; `path`: `"mint"`; }]; }; `writable`: `true`; }, \{ `docs`: \[`"Admin wallet, responsible for creating the distributor and paying for the transaction."`, `"Also has the authority to set the clawback receiver and change itself."`]; `name`: `"admin"`; `signer`: `true`; `writable`: `true`; }, \{ `address`: `"11111111111111111111111111111111"`; `docs`: \[`"The [System] program."`]; `name`: `"systemProgram"`; }, \{ `address`: `"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"`; `docs`: \[`"The [Associated Token] program."`]; `name`: `"associatedTokenProgram"`; }, \{ `docs`: \[`"The [Token] program."`]; `name`: `"tokenProgram"`; }, \{ `name`: `"partnerOracleConfig"`; `pda`: \{ `program`: \{ `kind`: `"const"`; `value`: \[`12`, `48`, `148`, `48`, `221`, `89`, `2`, `209`, `180`, `126`, `151`, `216`, `166`, `3`, `112`, `50`, `177`, `192`, `141`, `218`, `37`, `78`, `51`, `109`, `243`, `106`, `174`, `122`, `93`, `121`, `191`, `119`]; }; `seeds`: \[\{ `kind`: `"const"`; `value`: \[`97`, `105`, `114`, `100`, `114`, `111`, `112`, `95`, `99`, `111`, `110`, `102`, `105`, `103`]; }]; }; }, \{ `address`: `"pardpVtPjC8nLj1Dwncew62mUzfChdCX1EaoZe8oCAa"`; `docs`: \[`"Partner Oracle program that stores fees"`]; `name`: `"partnerOracle"`; }]; `args`: \[\{ `name`: `"version"`; `type`: `"u64"`; }, \{ `name`: `"root"`; `type`: \{ `array`: \[`"u8"`, `32`]; }; }, \{ `name`: `"maxTotalClaim"`; `type`: `"u64"`; }, \{ `name`: `"maxNumNodes"`; `type`: `"u64"`; }, \{ `name`: `"unlockPeriod"`; `type`: `"u64"`; }, \{ `name`: `"startVestingTs"`; `type`: `"u64"`; }, \{ `name`: `"endVestingTs"`; `type`: `"u64"`; }, \{ `name`: `"clawbackStartTs"`; `type`: `"u64"`; }, \{ `name`: `"claimsClosableByAdmin"`; `type`: `"bool"`; }, \{ `name`: `"canUpdateDuration"`; `type`: \{ `option`: `"bool"`; }; }, \{ `name`: `"totalAmountUnlocked"`; `type`: \{ `option`: `"u64"`; }; }, \{ `name`: `"totalAmountLocked"`; `type`: \{ `option`: `"u64"`; }; }, \{ `name`: `"claimsClosableByClaimant"`; `type`: \{ `option`: `"bool"`; }; }, \{ `name`: `"claimsLimit"`; `type`: \{ `option`: `"u16"`; }; }]; `discriminator`: \[`32`, `139`, `112`, `171`, `0`, `2`, `225`, `155`]; `docs`: \[`"READ THE FOLLOWING:"`, `""`, `"This instruction is susceptible to frontrunning that could result in loss of funds if not handled properly."`, `""`, `"An attack could look like:"`, `"- A legitimate user opens a new distributor."`, `"- Someone observes the call to this instruction."`, `"- They replace the clawback_receiver, admin, or time parameters with their own."`, `""`, `"One situation that could happen here is the attacker replaces the admin and clawback_receiver with their own"`, `"and sets the clawback_start_ts with the minimal time allowed. After clawback_start_ts has elapsed,"`, `"the attacker can steal all funds from the distributor to their own clawback_receiver account."`, `""`, `"HOW TO AVOID:"`, `"- When you call into this instruction, ensure your transaction succeeds."`, `"- To be extra safe, after your transaction succeeds, read back the state of the created MerkleDistributor account and"`, `"assert the parameters are what you expect, most importantly the clawback_receiver and admin."`, `"- If your transaction fails, double check the value on-chain matches what you expect."`]; `name`: `"newDistributor"`; }, \{ `accounts`: \[\{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"distributor"`; `writable`: `true`; }, \{ `name`: `"claimStatus"`; `pda`: \{ `seeds`: \[\{ `kind`: `"const"`; `value`: \[`67`, `108`, `97`, `105`, `109`, `83`, `116`, `97`, `116`, `117`, `115`]; }, \{ `kind`: `"account"`; `path`: `"claimant"`; }, \{ `kind`: `"account"`; `path`: `"distributor"`; }]; }; `writable`: `true`; }, \{ `docs`: \[`"Signer account"`]; `name`: `"signer"`; `signer`: `true`; `writable`: `true`; }, \{ `name`: `"claimant"`; }, \{ `address`: `"5SEpbdjFK5FxwTvfsGMXVQTD2v4M2c5tyRTxhdsPkgDw"`; `name`: `"streamflowTreasury"`; `writable`: `true`; }, \{ `address`: `"11111111111111111111111111111111"`; `docs`: \[`"The [System] program."`]; `name`: `"systemProgram"`; }]; `args`: \[]; `discriminator`: \[`157`, `23`, `164`, `146`, `176`, `53`, `147`, `143`]; `name`: `"refundClaim"`; }, \{ `accounts`: \[\{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"distributor"`; `writable`: `true`; }, \{ `docs`: \[`"Admin signer"`]; `name`: `"admin"`; `signer`: `true`; `writable`: `true`; }, \{ `docs`: \[`"New admin account"`]; `name`: `"newAdmin"`; `writable`: `true`; }]; `args`: \[]; `discriminator`: \[`251`, `163`, `0`, `52`, `91`, `194`, `187`, `92`]; `name`: `"setAdmin"`; }, \{ `accounts`: \[\{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"distributor"`; `writable`: `true`; }, \{ `docs`: \[`"New clawback account"`]; `name`: `"newClawbackAccount"`; }, \{ `docs`: \[`"Admin signer"`]; `name`: `"admin"`; `signer`: `true`; `writable`: `true`; }]; `args`: \[]; `discriminator`: \[`153`, `217`, `34`, `20`, `19`, `29`, `229`, `75`]; `name`: `"setClawbackReceiver"`; }, \{ `accounts`: \[\{ `address`: `"wdrwhnCv4pzW8beKsbPa4S2UDZrXenjg16KJdKSpb5u"`; `docs`: \[`"Wallet authorized to call this method"`]; `name`: `"authority"`; `signer`: `true`; `writable`: `true`; }, \{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"distributor"`; `writable`: `true`; }]; `args`: \[\{ `name`: `"priceLamports"`; `type`: `"u64"`; }]; `discriminator`: \[`166`, `216`, `142`, `197`, `200`, `225`, `253`, `233`]; `name`: `"setTokenPrice"`; }, \{ `accounts`: \[\{ `docs`: \[`"The [MerkleDistributor]."`]; `name`: `"distributor"`; `writable`: `true`; }, \{ `docs`: \[`"Only Admin can trigger the clawback of funds"`]; `name`: `"admin"`; `signer`: `true`; `writable`: `true`; }, \{ `address`: `"11111111111111111111111111111111"`; `docs`: \[`"The [System] program."`]; `name`: `"systemProgram"`; }]; `args`: \[\{ `name`: `"endTs"`; `type`: \{ `option`: `"u64"`; }; }]; `discriminator`: \[`219`, `200`, `88`, `176`, `158`, `63`, `253`, `127`]; `name`: `"update"`; }] | [distributor/solana/descriptor/merkle\_distributor.ts:16](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/merkle_distributor.ts#L16) | | `metadata` | `object` | [distributor/solana/descriptor/merkle\_distributor.ts:9](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/merkle_distributor.ts#L9) | | `metadata.description` | `"A Solana program for distributing tokens according to a Merkle root."` | [distributor/solana/descriptor/merkle\_distributor.ts:13](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/merkle_distributor.ts#L13) | | `metadata.name` | `"merkleDistributor"` | [distributor/solana/descriptor/merkle\_distributor.ts:10](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/merkle_distributor.ts#L10) | | `metadata.repository` | `"https://github.com/streamflow-finance/distributor"` | [distributor/solana/descriptor/merkle\_distributor.ts:14](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/merkle_distributor.ts#L14) | | `metadata.spec` | `"0.1.0"` | [distributor/solana/descriptor/merkle\_distributor.ts:12](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/merkle_distributor.ts#L12) | | `metadata.version` | `"2.0.0"` | [distributor/solana/descriptor/merkle\_distributor.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/merkle_distributor.ts#L11) | | `types` | \[\{ `docs`: \[`"Emitted when a new claim is created."`]; `name`: `"claimClosedEvent"`; `type`: \{ `fields`: \[\{ `docs`: \[`"User that claimed."`]; `name`: `"claimant"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Timestamp."`]; `name`: `"timestamp"`; `type`: `"u64"`; }]; `kind`: `"struct"`; }; }, \{ `docs`: \[`"Holds whether or not a claimant has claimed tokens."`]; `name`: `"claimStatus"`; `type`: \{ `fields`: \[\{ `docs`: \[`"Authority that claimed the tokens."`]; `name`: `"claimant"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Locked amount"`]; `name`: `"lockedAmount"`; `type`: `"u64"`; }, \{ `docs`: \[`"Locked amount withdrawn"`]; `name`: `"lockedAmountWithdrawn"`; `type`: `"u64"`; }, \{ `docs`: \[`"Unlocked amount"`]; `name`: `"unlockedAmount"`; `type`: `"u64"`; }, \{ `docs`: \[`"Last claim time"`]; `name`: `"lastClaimTs"`; `type`: `"u64"`; }, \{ `docs`: \[`"Track amount per unlock, can be useful for non-linear vesting"`]; `name`: `"lastAmountPerUnlock"`; `type`: `"u64"`; }, \{ `docs`: \[`"Whether claim is closed"`]; `name`: `"closed"`; `type`: `"bool"`; }, \{ `docs`: \[`"Distributor account for which ClaimStatus was created, useful to filter by in get_program_accounts"`]; `name`: `"distributor"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Number of time amount has been claimed"`]; `name`: `"claimsCount"`; `type`: `"u16"`; }, \{ `docs`: \[`"Time when claim has been closed"`]; `name`: `"closedTs"`; `type`: `"u64"`; }, \{ `docs`: \[`"Buffer for additional fields"`]; `name`: `"buffer2"`; `type`: \{ `array`: \[`"u8"`, `22`]; }; }]; `kind`: `"struct"`; }; }, \{ `docs`: \[`"Emitted when tokens are claimed."`]; `name`: `"claimedEvent"`; `type`: \{ `fields`: \[\{ `docs`: \[`"User that claimed."`]; `name`: `"claimant"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Amount of tokens to distribute."`]; `name`: `"amount"`; `type`: `"u64"`; }]; `kind`: `"struct"`; }; }, \{ `docs`: \[`"Holds whether or not a claimant has claimed tokens."`]; `name`: `"compressedClaimStatus"`; `type`: \{ `fields`: \[\{ `name`: `"state"`; `type`: \{ `defined`: \{ `name`: `"state"`; }; }; }]; `kind`: `"struct"`; }; }, \{ `docs`: \[`"State for the account which distributes tokens."`]; `name`: `"merkleDistributor"`; `type`: \{ `fields`: \[\{ `docs`: \[`"Bump seed."`]; `name`: `"bump"`; `type`: `"u8"`; }, \{ `docs`: \[`"Version of the airdrop"`]; `name`: `"version"`; `type`: `"u64"`; }, \{ `docs`: \[`"The 256-bit merkle root."`]; `name`: `"root"`; `type`: \{ `array`: \[`"u8"`, `32`]; }; }, \{ `docs`: \[`"[Mint] of the token to be distributed."`]; `name`: `"mint"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Token Address of the vault"`]; `name`: `"tokenVault"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Maximum number of tokens that can ever be claimed from this [MerkleDistributor]."`]; `name`: `"maxTotalClaim"`; `type`: `"u64"`; }, \{ `docs`: \[`"Maximum number of nodes in [MerkleDistributor]."`]; `name`: `"maxNumNodes"`; `type`: `"u64"`; }, \{ `docs`: \[`"Time step (period) in seconds per which the unlock occurs"`]; `name`: `"unlockPeriod"`; `type`: `"u64"`; }, \{ `docs`: \[`"Total amount of tokens that have been claimed."`]; `name`: `"totalAmountClaimed"`; `type`: `"u64"`; }, \{ `docs`: \[`"Number of nodes that have been claimed."`]; `name`: `"numNodesClaimed"`; `type`: `"u64"`; }, \{ `docs`: \[`"Lockup time start (Unix Timestamp)"`]; `name`: `"startTs"`; `type`: `"u64"`; }, \{ `docs`: \[`"Lockup time end (Unix Timestamp)"`]; `name`: `"endTs"`; `type`: `"u64"`; }, \{ `docs`: \[`"Clawback start (Unix Timestamp)"`]; `name`: `"clawbackStartTs"`; `type`: `"u64"`; }, \{ `docs`: \[`"Clawback receiver"`]; `name`: `"clawbackReceiver"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Admin wallet"`]; `name`: `"admin"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Whether or not the distributor has been clawed back"`]; `name`: `"clawedBack"`; `type`: `"bool"`; }, \{ `docs`: \[`"Whether claims are closable by the admin or not"`]; `name`: `"claimsClosableByAdmin"`; `type`: `"bool"`; }, \{ `docs`: \[`"Whether admin can update vesting duration"`]; `name`: `"canUpdateDuration"`; `type`: `"bool"`; }, \{ `docs`: \[`"Total amount of funds unlocked (cliff/instant)"`]; `name`: `"totalAmountUnlocked"`; `type`: `"u64"`; }, \{ `docs`: \[`"Total amount of funds locked (vested)"`]; `name`: `"totalAmountLocked"`; `type`: `"u64"`; }, \{ `docs`: \[`"Timestamp when update was last called"`]; `name`: `"lastDurationUpdateTs"`; `type`: `"u64"`; }, \{ `docs`: \[`"Total amount of locked amount claimable as of last duration update, ever increasing total, accumulates with each update"`]; `name`: `"totalClaimablePreUpdate"`; `type`: `"u64"`; }, \{ `docs`: \[`"Timestamp when funds were clawed back"`]; `name`: `"clawedBackTs"`; `type`: `"u64"`; }, \{ `docs`: \[`"Whether claims are closable by claimant or not"`]; `name`: `"claimsClosableByClaimant"`; `type`: `"bool"`; }, \{ `docs`: \[`"Limit number of claims"`]; `name`: `"claimsLimit"`; `type`: `"u16"`; }, \{ `docs`: \[`"Creation SOL fee"`]; `name`: `"creationFee"`; `type`: `"u32"`; }, \{ `docs`: \[`"Whether creation SOL was claimed"`]; `name`: `"creationFeeClaimed"`; `type`: `"bool"`; }, \{ `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 multiply claimable SOL lamports by when calculating fee"`]; `name`: `"allocationFactor"`; `type`: `"f64"`; }, \{ `docs`: \[`"Whether all claim fees were claimed, true by default since no claim fee is taken on creation"`]; `name`: `"claimFeeClaimed"`; `type`: `"bool"`; }, \{ `docs`: \[`"Last observed token price in lamports per 1 whole token for claim fee calculation"`]; `name`: `"tokenPriceLamports"`; `type`: `"u64"`; }, \{ `docs`: \[`"Token % fee on clawback"`]; `name`: `"clawbackTokenFeePercent"`; `type`: `"f64"`; }, \{ `docs`: \[`"Whether clawback token % fee has been claimed"`]; `name`: `"clawbackFeeClaimed"`; `type`: `"bool"`; }, \{ `docs`: \[`"Program version that initiated the Distributor account"`]; `name`: `"programVersion"`; `type`: `"u8"`; }, \{ `docs`: \[`"Buffer for additional fields"`]; `name`: `"buffer"`; `type`: \{ `array`: \[`"u8"`, `13`]; }; }]; `kind`: `"struct"`; }; }, \{ `docs`: \[`"Emitted when a new claim is created."`]; `name`: `"newClaimEvent"`; `type`: \{ `fields`: \[\{ `docs`: \[`"User that claimed."`]; `name`: `"claimant"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Timestamp."`]; `name`: `"timestamp"`; `type`: `"u64"`; }]; `kind`: `"struct"`; }; }, \{ `name`: `"state"`; `type`: \{ `kind`: `"enum"`; `variants`: \[\{ `name`: `"claimed"`; }, \{ `name`: `"closed"`; }]; }; }] | [distributor/solana/descriptor/merkle\_distributor.ts:1824](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/descriptor/merkle_distributor.ts#L1824) | # AnchorErrorCode URL: /docs/api/distributor/solana/enumerations/AnchorErrorCode # AnchorErrorCode [#anchorerrorcode] Defined in: [distributor/solana/types.ts:174](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L174) ## Enumeration Members [#enumeration-members] | Enumeration Member | Value | Description | Defined in | | ------------------------------------------------------------------------------------------------- | ------------------------------------ | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `AccountDidNotDeserialize` | `"AccountDidNotDeserialize"` | Failed to deserialize the account | [distributor/solana/types.ts:250](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L250) | | `AccountDidNotSerialize` | `"AccountDidNotSerialize"` | Failed to serialize the account | [distributor/solana/types.ts:252](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L252) | | `AccountDiscriminatorAlreadySet` | `"AccountDiscriminatorAlreadySet"` | The account discriminator was already set on this account | [distributor/solana/types.ts:244](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L244) | | `AccountDiscriminatorMismatch` | `"AccountDiscriminatorMismatch"` | 8 byte discriminator did not match what was expected | [distributor/solana/types.ts:248](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L248) | | `AccountDiscriminatorNotFound` | `"AccountDiscriminatorNotFound"` | No 8 byte discriminator was found on the account | [distributor/solana/types.ts:246](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L246) | | `AccountDuplicateReallocs` | `"AccountDuplicateReallocs"` | The account was duplicated for more than one reallocation | [distributor/solana/types.ts:278](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L278) | | `AccountNotAssociatedTokenAccount` | `"AccountNotAssociatedTokenAccount"` | The given account is not the associated token account | [distributor/solana/types.ts:272](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L272) | | `AccountNotEnoughKeys` | `"AccountNotEnoughKeys"` | Not enough account keys given to the instruction | [distributor/solana/types.ts:254](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L254) | | `AccountNotInitialized` | `"AccountNotInitialized"` | The program expected this account to be already initialized | [distributor/solana/types.ts:268](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L268) | | `AccountNotMutable` | `"AccountNotMutable"` | The given account is not mutable | [distributor/solana/types.ts:256](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L256) | | `AccountNotProgramData` | `"AccountNotProgramData"` | The given account is not a program data account | [distributor/solana/types.ts:270](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L270) | | `AccountNotSigner` | `"AccountNotSigner"` | The given account did not sign | [distributor/solana/types.ts:264](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L264) | | `AccountNotSystemOwned` | `"AccountNotSystemOwned"` | The given account is not owned by the system program | [distributor/solana/types.ts:266](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L266) | | `AccountOwnedByWrongProgram` | `"AccountOwnedByWrongProgram"` | The given account is owned by a different program than expected | [distributor/solana/types.ts:258](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L258) | | `AccountReallocExceedsLimit` | `"AccountReallocExceedsLimit"` | The account reallocation exceeds the MAX\_PERMITTED\_DATA\_INCREASE limit | [distributor/solana/types.ts:276](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L276) | | `AccountSysvarMismatch` | `"AccountSysvarMismatch"` | The given public key does not match the required sysvar | [distributor/solana/types.ts:274](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L274) | | `ConstraintAccountIsNone` | `"ConstraintAccountIsNone"` | A required account for the constraint is None | [distributor/solana/types.ts:228](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L228) | | `ConstraintAddress` | `"ConstraintAddress"` | An address constraint was violated | [distributor/solana/types.ts:212](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L212) | | `ConstraintAssociated` | `"ConstraintAssociated"` | An associated constraint was violated | [distributor/solana/types.ts:206](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L206) | | `ConstraintAssociatedInit` | `"ConstraintAssociatedInit"` | An associated init constraint was violated | [distributor/solana/types.ts:208](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L208) | | `ConstraintClose` | `"ConstraintClose"` | A close constraint was violated | [distributor/solana/types.ts:210](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L210) | | `ConstraintExecutable` | `"ConstraintExecutable"` | An executable constraint was violated | [distributor/solana/types.ts:202](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L202) | | `ConstraintHasOne` | `"ConstraintHasOne"` | A has one constraint was violated | [distributor/solana/types.ts:190](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L190) | | `ConstraintMintDecimals` | `"ConstraintMintDecimals"` | A mint decimals constraint was violated | [distributor/solana/types.ts:224](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L224) | | `ConstraintMintFreezeAuthority` | `"ConstraintMintFreezeAuthority"` | A mint freeze authority constraint was violated | [distributor/solana/types.ts:222](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L222) | | `ConstraintMintMintAuthority` | `"ConstraintMintMintAuthority"` | A mint mint authority constraint was violated | [distributor/solana/types.ts:220](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L220) | | `ConstraintMut` | `"ConstraintMut"` | A mut constraint was violated | [distributor/solana/types.ts:188](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L188) | | `ConstraintOwner` | `"ConstraintOwner"` | An owner constraint was violated | [distributor/solana/types.ts:196](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L196) | | `ConstraintRaw` | `"ConstraintRaw"` | A raw constraint was violated | [distributor/solana/types.ts:194](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L194) | | `ConstraintRentExempt` | `"ConstraintRentExempt"` | A rent exemption constraint was violated | [distributor/solana/types.ts:198](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L198) | | `ConstraintSeeds` | `"ConstraintSeeds"` | A seeds constraint was violated | [distributor/solana/types.ts:200](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L200) | | `ConstraintSigner` | `"ConstraintSigner"` | A signer constraint was violated | [distributor/solana/types.ts:192](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L192) | | `ConstraintSpace` | `"ConstraintSpace"` | A space constraint was violated | [distributor/solana/types.ts:226](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L226) | | `ConstraintState` | `"ConstraintState"` | Deprecated Error, feel free to replace with something else | [distributor/solana/types.ts:204](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L204) | | `ConstraintTokenMint` | `"ConstraintTokenMint"` | A token mint constraint was violated | [distributor/solana/types.ts:216](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L216) | | `ConstraintTokenOwner` | `"ConstraintTokenOwner"` | A token owner constraint was violated | [distributor/solana/types.ts:218](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L218) | | `ConstraintZero` | `"ConstraintZero"` | Expected zero account discriminant | [distributor/solana/types.ts:214](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L214) | | `DeclaredProgramIdMismatch` | `"DeclaredProgramIdMismatch"` | The declared program id does not match the actual program id | [distributor/solana/types.ts:280](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L280) | | `Deprecated` | `"Deprecated"` | The API being used is deprecated and should no longer be used | [distributor/solana/types.ts:282](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L282) | | `IdlInstructionInvalidProgram` | `"IdlInstructionInvalidProgram"` | The transaction was given an invalid program for the IDL instruction | [distributor/solana/types.ts:186](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L186) | | `IdlInstructionStub` | `"IdlInstructionStub"` | The program was compiled without idl instructions | [distributor/solana/types.ts:184](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L184) | | `InstructionDidNotDeserialize` | `"InstructionDidNotDeserialize"` | The program could not deserialize the given instruction | [distributor/solana/types.ts:180](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L180) | | `InstructionDidNotSerialize` | `"InstructionDidNotSerialize"` | The program could not serialize the given instruction | [distributor/solana/types.ts:182](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L182) | | `InstructionFallbackNotFound` | `"InstructionFallbackNotFound"` | Fallback functions are not supported | [distributor/solana/types.ts:178](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L178) | | `InstructionMissing` | `"InstructionMissing"` | 8 byte instruction identifier not provided | [distributor/solana/types.ts:176](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L176) | | `InvalidProgramExecutable` | `"InvalidProgramExecutable"` | Program account is not executable | [distributor/solana/types.ts:262](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L262) | | `InvalidProgramId` | `"InvalidProgramId"` | Program ID was not as expected | [distributor/solana/types.ts:260](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L260) | | `RequireEqViolated` | `"RequireEqViolated"` | A require\_eq expression was violated | [distributor/solana/types.ts:232](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L232) | | `RequireGteViolated` | `"RequireGteViolated"` | A require\_gte expression was violated | [distributor/solana/types.ts:242](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L242) | | `RequireGtViolated` | `"RequireGtViolated"` | A require\_gt expression was violated | [distributor/solana/types.ts:240](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L240) | | `RequireKeysEqViolated` | `"RequireKeysEqViolated"` | A require\_keys\_eq expression was violated | [distributor/solana/types.ts:234](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L234) | | `RequireKeysNeqViolated` | `"RequireKeysNeqViolated"` | A require\_keys\_neq expression was violated | [distributor/solana/types.ts:238](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L238) | | `RequireNeqViolated` | `"RequireNeqViolated"` | A require\_neq expression was violated | [distributor/solana/types.ts:236](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L236) | | `RequireViolated` | `"RequireViolated"` | A require expression was violated | [distributor/solana/types.ts:230](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L230) | # ContractErrorCode URL: /docs/api/distributor/solana/enumerations/ContractErrorCode # ContractErrorCode [#contracterrorcode] Defined in: [distributor/solana/types.ts:285](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L285) ## Enumeration Members [#enumeration-members] | Enumeration Member | Value | Description | Defined in | | ------------------------------------------------------------------------------------- | ------------------------------ | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `ArithmeticError` | `"ArithmeticError"` | Arithmetic Error (overflow/underflow) | [distributor/solana/types.ts:315](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L315) | | `ClaimExpired` | `"ClaimExpired"` | Claim window expired | [distributor/solana/types.ts:313](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L313) | | `ClaimIsClosed` | `"ClaimIsClosed"` | Claim is closed | [distributor/solana/types.ts:325](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L325) | | `ClaimsAreNotClosable` | `"ClaimsAreNotClosable"` | Claims are not closable | [distributor/solana/types.ts:327](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L327) | | `ClawbackAlreadyClaimed` | `"ClawbackAlreadyClaimed"` | Clawback already claimed | [distributor/solana/types.ts:305](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L305) | | `ClawbackBeforeStart` | `"ClawbackBeforeStart"` | Attempted clawback before start | [distributor/solana/types.ts:303](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L303) | | `ClawbackBeforeVesting` | `"ClawbackBeforeVesting"` | Clawback cannot be before vesting starts | [distributor/solana/types.ts:301](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L301) | | `ExceededMaxClaim` | `"ExceededMaxClaim"` | Exceeded maximum claim amount | [distributor/solana/types.ts:293](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L293) | | `InsufficientClawbackDelay` | `"InsufficientClawbackDelay"` | Clawback start must be at least one day after vesting end | [distributor/solana/types.ts:307](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L307) | | `InsufficientUnlockedTokens` | `"InsufficientUnlockedTokens"` | Insufficient unlocked tokens | [distributor/solana/types.ts:287](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L287) | | `InvalidMint` | `"InvalidMint"` | Invalid Mint | [distributor/solana/types.ts:323](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L323) | | `InvalidProof` | `"InvalidProof"` | Invalid Merkle proof | [distributor/solana/types.ts:291](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L291) | | `InvalidVersion` | `"InvalidVersion"` | Airdrop Version Mismatch | [distributor/solana/types.ts:321](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L321) | | `MaxNodesExceeded` | `"MaxNodesExceeded"` | Exceeded maximum node count | [distributor/solana/types.ts:295](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L295) | | `OwnerMismatch` | `"OwnerMismatch"` | Token account owner did not match intended owner | [distributor/solana/types.ts:299](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L299) | | `SameAdmin` | `"SameAdmin"` | New and old admin are identical | [distributor/solana/types.ts:311](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L311) | | `SameClawbackReceiver` | `"SameClawbackReceiver"` | New and old Clawback receivers are identical | [distributor/solana/types.ts:309](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L309) | | `StartTimestampAfterEnd` | `"StartTimestampAfterEnd"` | Start Timestamp cannot be after end Timestamp | [distributor/solana/types.ts:317](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L317) | | `StartTooFarInFuture` | `"StartTooFarInFuture"` | Deposit Start too far in future | [distributor/solana/types.ts:289](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L289) | | `TimestampsNotInFuture` | `"TimestampsNotInFuture"` | Timestamps cannot be in the past | [distributor/solana/types.ts:319](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L319) | | `Unauthorized` | `"Unauthorized"` | Account is not authorized to execute this instruction | [distributor/solana/types.ts:297](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L297) | # applyFeeLogic() URL: /docs/api/distributor/solana/functions/applyFeeLogic # applyFeeLogic() [#applyfeelogic] ```ts function applyFeeLogic(baseLamports): bigint; ``` Defined in: [distributor/solana/fees.ts:68](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L68) ## Parameters [#parameters] | Parameter | Type | | -------------- | -------- | | `baseLamports` | `bigint` | ## Returns [#returns] `bigint` # calculateAirdropFeeLamports() URL: /docs/api/distributor/solana/functions/calculateAirdropFeeLamports # calculateAirdropFeeLamports() [#calculateairdropfeelamports] ```ts function calculateAirdropFeeLamports(params): Promise; ``` Defined in: [distributor/solana/fees.ts:78](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L78) ## Parameters [#parameters] | Parameter | Type | | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `params` | \{ `claimableLamports?`: `bigint`; `client?`: [`AirdropFeeClient`](/docs/api/distributor/solana/type-aliases/AirdropFeeClient); `distributorAddress`: `string`; } | | `params.claimableLamports?` | `bigint` | | `params.client?` | [`AirdropFeeClient`](/docs/api/distributor/solana/type-aliases/AirdropFeeClient) | | `params.distributorAddress` | `string` | ## Returns [#returns] `Promise`\<`bigint`> # calculateAmountWithTransferFees() URL: /docs/api/distributor/solana/functions/calculateAmountWithTransferFees # calculateAmountWithTransferFees() [#calculateamountwithtransferfees] ```ts function calculateAmountWithTransferFees( connection, transferFeeConfig, transferAmount): Promise<{ feeCharged: bigint; transferAmount: bigint; }>; ``` Defined in: [distributor/solana/utils.ts:74](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/utils.ts#L74) ## Parameters [#parameters] | Parameter | Type | | ------------------- | ------------------- | | `connection` | `Connection` | | `transferFeeConfig` | `TransferFeeConfig` | | `transferAmount` | `bigint` | ## Returns [#returns] `Promise`\<\{ `feeCharged`: `bigint`; `transferAmount`: `bigint`; }> # calculateClaimableLamportsFromPrices() URL: /docs/api/distributor/solana/functions/calculateClaimableLamportsFromPrices # calculateClaimableLamportsFromPrices() [#calculateclaimablelamportsfromprices] ```ts function calculateClaimableLamportsFromPrices(params): bigint; ``` Defined in: [distributor/solana/fees.ts:118](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L118) Calculates claimable SOL lamports from: * claimable token amount in the token's base units (BN or bigint) * token USD price and SOL USD price * token decimals ## Parameters [#parameters] | Parameter | Type | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | | `params` | \{ `claimableAmount`: `bigint`; `solDecimals?`: `number`; `solPriceUsd`: `number`; `tokenDecimals`: `number`; `tokenPriceUsd`: `number`; } | | `params.claimableAmount` | `bigint` | | `params.solDecimals?` | `number` | | `params.solPriceUsd` | `number` | | `params.tokenDecimals` | `number` | | `params.tokenPriceUsd` | `number` | ## Returns [#returns] `bigint` # calculateDynamicFeeFromSolParams() URL: /docs/api/distributor/solana/functions/calculateDynamicFeeFromSolParams # calculateDynamicFeeFromSolParams() [#calculatedynamicfeefromsolparams] ```ts function calculateDynamicFeeFromSolParams(params): bigint; ``` Defined in: [distributor/solana/fees.ts:148](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L148) Calculates lamport fee using dynamic SOL parameters coming from backend minPrice/maxPrice/allocationFactor are strings from API; prices are in SOL units ## Parameters [#parameters] | Parameter | Type | | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | `params` | \{ `allocationFactor`: `string`; `claimableLamports`: `bigint`; `maxPrice`: `string`; `minPrice`: `string`; `solDecimals?`: `number`; } | | `params.allocationFactor` | `string` | | `params.claimableLamports` | `bigint` | | `params.maxPrice` | `string` | | `params.minPrice` | `string` | | `params.solDecimals?` | `number` | ## Returns [#returns] `bigint` # fetchAirdropFee() URL: /docs/api/distributor/solana/functions/fetchAirdropFee # fetchAirdropFee() [#fetchairdropfee] ```ts function fetchAirdropFee( distributorId, apiUrl, apiKey?, fetchFn?): Promise; ``` Defined in: [distributor/solana/fetchAirdropFee.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fetchAirdropFee.ts#L18) ## Parameters [#parameters] | Parameter | Type | Default value | | --------------- | -------------------------------------------- | ------------- | | `distributorId` | `string` | `undefined` | | `apiUrl` | `string` | `undefined` | | `apiKey?` | `string` | `undefined` | | `fetchFn?` | (`input`, `init?`) => `Promise`\<`Response`> | `fetch` | ## Returns [#returns] `Promise`\<[`AirdropFeeResponse`](/docs/api/distributor/solana/type-aliases/AirdropFeeResponse)> # getAlignedDistributorPda() URL: /docs/api/distributor/solana/functions/getAlignedDistributorPda # getAlignedDistributorPda() [#getaligneddistributorpda] ```ts function getAlignedDistributorPda(programId, distributor): PublicKey; ``` Defined in: [distributor/solana/utils.ts:17](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/utils.ts#L17) ## Parameters [#parameters] | Parameter | Type | | ------------- | ----------- | | `programId` | `PublicKey` | | `distributor` | `PublicKey` | ## Returns [#returns] `PublicKey` # getClaimantStatusPda() URL: /docs/api/distributor/solana/functions/getClaimantStatusPda # getClaimantStatusPda() [#getclaimantstatuspda] ```ts function getClaimantStatusPda( programId, distributor, claimant): PublicKey; ``` Defined in: [distributor/solana/utils.ts:37](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/utils.ts#L37) ## Parameters [#parameters] | Parameter | Type | | ------------- | ----------- | | `programId` | `PublicKey` | | `distributor` | `PublicKey` | | `claimant` | `PublicKey` | ## Returns [#returns] `PublicKey` # getDistributorPda() URL: /docs/api/distributor/solana/functions/getDistributorPda # getDistributorPda() [#getdistributorpda] ```ts function getDistributorPda( programId, mint, version): PublicKey; ``` Defined in: [distributor/solana/utils.ts:25](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/utils.ts#L25) ## Parameters [#parameters] | Parameter | Type | | ----------- | ----------- | | `programId` | `PublicKey` | | `mint` | `PublicKey` | | `version` | `number` | ## Returns [#returns] `PublicKey` # getEventAuthorityPda() URL: /docs/api/distributor/solana/functions/getEventAuthorityPda # getEventAuthorityPda() [#geteventauthoritypda] ```ts function getEventAuthorityPda(programId): PublicKey; ``` Defined in: [distributor/solana/utils.ts:45](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/utils.ts#L45) ## Parameters [#parameters] | Parameter | Type | | ----------- | ----------- | | `programId` | `PublicKey` | ## Returns [#returns] `PublicKey` # getTestOraclePda() URL: /docs/api/distributor/solana/functions/getTestOraclePda # getTestOraclePda() [#gettestoraclepda] ```ts function getTestOraclePda( programId, mint, creator): PublicKey; ``` Defined in: [distributor/solana/utils.ts:21](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/utils.ts#L21) ## Parameters [#parameters] | Parameter | Type | | ----------- | ----------- | | `programId` | `PublicKey` | | `mint` | `PublicKey` | | `creator` | `PublicKey` | ## Returns [#returns] `PublicKey` # isCompressedClaimStatus() URL: /docs/api/distributor/solana/functions/isCompressedClaimStatus # isCompressedClaimStatus() [#iscompressedclaimstatus] ```ts function isCompressedClaimStatus(status?): status is { state: DecodeEnum<{ kind: "enum"; variants: [{ name: "claimed" }, { name: "closed" }] }, EmptyDefined> }; ``` Defined in: [distributor/solana/utils.ts:53](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/utils.ts#L53) ## Parameters [#parameters] | Parameter | Type | | --------- | ---------------------------------------------------------------------------- | | `status?` | [`AnyClaimStatus`](/docs/api/distributor/solana/type-aliases/AnyClaimStatus) | ## Returns [#returns] `status is \{ state: DecodeEnum<\{ kind: "enum"; variants: [\{ name: "claimed" \}, \{ name: "closed" \}] \}, EmptyDefined> \}` # resolveAirdropFeeLamportsUsingApi() URL: /docs/api/distributor/solana/functions/resolveAirdropFeeLamportsUsingApi # resolveAirdropFeeLamportsUsingApi() [#resolveairdropfeelamportsusingapi] ```ts function resolveAirdropFeeLamportsUsingApi(params): Promise; ``` Defined in: [distributor/solana/fees.ts:165](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L165) ## Parameters [#parameters] | Parameter | Type | | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | | `params` | \{ `apiKey?`: `string`; `apiUrl`: `string`; `claimableAmount`: `bigint`; `cluster`: `ICluster`; `distributorAddress`: `string`; `mintAccount`: `Mint`; } | | `params.apiKey?` | `string` | | `params.apiUrl` | `string` | | `params.claimableAmount` | `bigint` | | `params.cluster` | `ICluster` | | `params.distributorAddress` | `string` | | `params.mintAccount` | `Mint` | ## Returns [#returns] `Promise`\<`bigint`> # toLamportsSOL() URL: /docs/api/distributor/solana/functions/toLamportsSOL # toLamportsSOL() [#tolamportssol] ```ts function toLamportsSOL(value, solDecimals?): bigint; ``` Defined in: [distributor/solana/fees.ts:61](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L61) ## Parameters [#parameters] | Parameter | Type | Default value | | ------------- | -------------------------------- | ------------- | | `value` | `string` \| `number` \| `bigint` | `undefined` | | `solDecimals` | `number` | `9` | ## Returns [#returns] `bigint` # wrappedSignAndExecuteTransaction() URL: /docs/api/distributor/solana/functions/wrappedSignAndExecuteTransaction # wrappedSignAndExecuteTransaction() [#wrappedsignandexecutetransaction] ```ts function wrappedSignAndExecuteTransaction(...args): Promise; ``` Defined in: [distributor/solana/utils.ts:57](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/utils.ts#L57) ## Parameters [#parameters] | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | ...`args` | \[`Connection`, `Keypair` \| `SignerWalletAdapter`, `Transaction` \| `VersionedTransaction`, `ConfirmationParams`, `TransactionExecutionParams`] | ## Returns [#returns] `Promise`\<`string`> # solana URL: /docs/api/distributor/solana # solana [#solana] ## Namespaces [#namespaces] * [constants](/docs/api/distributor/solana/namespaces/constants/index) ## Enumerations [#enumerations] * [AnchorErrorCode](/docs/api/distributor/solana/enumerations/AnchorErrorCode) * [ContractErrorCode](/docs/api/distributor/solana/enumerations/ContractErrorCode) ## Classes [#classes] * [SolanaAlignedDistributorClient](/docs/api/distributor/solana/classes/SolanaAlignedDistributorClient) * [SolanaDistributorClient](/docs/api/distributor/solana/classes/SolanaDistributorClient) ## Interfaces [#interfaces] * [AirdropFeeQueryOptionsOverrides](/docs/api/distributor/solana/interfaces/AirdropFeeQueryOptionsOverrides) * [AlignedDistributorData](/docs/api/distributor/solana/interfaces/AlignedDistributorData) * [IClaimData](/docs/api/distributor/solana/interfaces/IClaimData) * [IClawbackData](/docs/api/distributor/solana/interfaces/IClawbackData) * [ICloseClaimData](/docs/api/distributor/solana/interfaces/ICloseClaimData) * [ICreateAlignedDistributorData](/docs/api/distributor/solana/interfaces/ICreateAlignedDistributorData) * [ICreateDistributorData](/docs/api/distributor/solana/interfaces/ICreateDistributorData) * [ICreateDistributorResult](/docs/api/distributor/solana/interfaces/ICreateDistributorResult) * [ICreateExt](/docs/api/distributor/solana/interfaces/ICreateExt) * [IGetClaimData](/docs/api/distributor/solana/interfaces/IGetClaimData) * [IGetDistributors](/docs/api/distributor/solana/interfaces/IGetDistributors) * [IInteractExt](/docs/api/distributor/solana/interfaces/IInteractExt) * [ISearchDistributors](/docs/api/distributor/solana/interfaces/ISearchDistributors) * [ISetClawbackReceiverData](/docs/api/distributor/solana/interfaces/ISetClawbackReceiverData) * [ISetDataAdmin](/docs/api/distributor/solana/interfaces/ISetDataAdmin) * [NewAlignedDistributorArgs](/docs/api/distributor/solana/interfaces/NewAlignedDistributorArgs) ## Type Aliases [#type-aliases] * [AirdropFeeClient](/docs/api/distributor/solana/type-aliases/AirdropFeeClient) * [AirdropFeeDynamic](/docs/api/distributor/solana/type-aliases/AirdropFeeDynamic) * [AirdropFeeResponse](/docs/api/distributor/solana/type-aliases/AirdropFeeResponse) * [AirdropFeeServiceResponse](/docs/api/distributor/solana/type-aliases/AirdropFeeServiceResponse) * [AnyClaimStatus](/docs/api/distributor/solana/type-aliases/AnyClaimStatus) * [ClaimLockedAccounts](/docs/api/distributor/solana/type-aliases/ClaimLockedAccounts) * [ClaimLockedV2Accounts](/docs/api/distributor/solana/type-aliases/ClaimLockedV2Accounts) * [ClaimStatus](/docs/api/distributor/solana/type-aliases/ClaimStatus) * [ClawbackAccounts](/docs/api/distributor/solana/type-aliases/ClawbackAccounts) * [CloseClaimAccounts](/docs/api/distributor/solana/type-aliases/CloseClaimAccounts) * [CloseClaimArgs](/docs/api/distributor/solana/type-aliases/CloseClaimArgs) * [CompressedClaimStatus](/docs/api/distributor/solana/type-aliases/CompressedClaimStatus) * [FeeConfig](/docs/api/distributor/solana/type-aliases/FeeConfig) * [Fees](/docs/api/distributor/solana/type-aliases/Fees) * [MerkleDistributor](/docs/api/distributor/solana/type-aliases/MerkleDistributor) * [MerkleDistributorAccounts](/docs/api/distributor/solana/type-aliases/MerkleDistributorAccounts) * [MerkleDistributorAccountTypes](/docs/api/distributor/solana/type-aliases/MerkleDistributorAccountTypes) * [MerkleDistributorProgram](/docs/api/distributor/solana/type-aliases/MerkleDistributorProgram) * [NewClaimAccounts](/docs/api/distributor/solana/type-aliases/NewClaimAccounts) * [NewClaimArgs](/docs/api/distributor/solana/type-aliases/NewClaimArgs) * [NewDistributorAccounts](/docs/api/distributor/solana/type-aliases/NewDistributorAccounts) * [NewDistributorArgs](/docs/api/distributor/solana/type-aliases/NewDistributorArgs) * [OracleType](/docs/api/distributor/solana/type-aliases/OracleType) * [OracleTypeName](/docs/api/distributor/solana/type-aliases/OracleTypeName) ## Variables [#variables] * [FEE\_ALLOCATION\_FACTOR\_FALLBACK\_DENOMINATOR](/docs/api/distributor/solana/variables/FEE_ALLOCATION_FACTOR_FALLBACK_DENOMINATOR) * [FEE\_ALLOCATION\_FACTOR\_FALLBACK\_NUMERATOR](/docs/api/distributor/solana/variables/FEE_ALLOCATION_FACTOR_FALLBACK_NUMERATOR) * [MAXIMUM\_FEE\_FALLBACK](/docs/api/distributor/solana/variables/MAXIMUM_FEE_FALLBACK) * [MINIMUM\_FEE\_FALLBACK](/docs/api/distributor/solana/variables/MINIMUM_FEE_FALLBACK) ## Functions [#functions] * [applyFeeLogic](/docs/api/distributor/solana/functions/applyFeeLogic) * [calculateAirdropFeeLamports](/docs/api/distributor/solana/functions/calculateAirdropFeeLamports) * [calculateAmountWithTransferFees](/docs/api/distributor/solana/functions/calculateAmountWithTransferFees) * [calculateClaimableLamportsFromPrices](/docs/api/distributor/solana/functions/calculateClaimableLamportsFromPrices) * [calculateDynamicFeeFromSolParams](/docs/api/distributor/solana/functions/calculateDynamicFeeFromSolParams) * [fetchAirdropFee](/docs/api/distributor/solana/functions/fetchAirdropFee) * [getAlignedDistributorPda](/docs/api/distributor/solana/functions/getAlignedDistributorPda) * [getClaimantStatusPda](/docs/api/distributor/solana/functions/getClaimantStatusPda) * [getDistributorPda](/docs/api/distributor/solana/functions/getDistributorPda) * [getEventAuthorityPda](/docs/api/distributor/solana/functions/getEventAuthorityPda) * [getTestOraclePda](/docs/api/distributor/solana/functions/getTestOraclePda) * [isCompressedClaimStatus](/docs/api/distributor/solana/functions/isCompressedClaimStatus) * [resolveAirdropFeeLamportsUsingApi](/docs/api/distributor/solana/functions/resolveAirdropFeeLamportsUsingApi) * [toLamportsSOL](/docs/api/distributor/solana/functions/toLamportsSOL) * [wrappedSignAndExecuteTransaction](/docs/api/distributor/solana/functions/wrappedSignAndExecuteTransaction) # AirdropFeeQueryOptionsOverrides URL: /docs/api/distributor/solana/interfaces/AirdropFeeQueryOptionsOverrides # AirdropFeeQueryOptionsOverrides [#airdropfeequeryoptionsoverrides] Defined in: [distributor/solana/fetchAirdropFee.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fetchAirdropFee.ts#L11) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | `gcTimeMs?` | `number` | [distributor/solana/fetchAirdropFee.ts:13](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fetchAirdropFee.ts#L13) | | `refetchOnWindowFocus?` | `boolean` | [distributor/solana/fetchAirdropFee.ts:15](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fetchAirdropFee.ts#L15) | | `retry?` | `number` \| `boolean` | [distributor/solana/fetchAirdropFee.ts:14](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fetchAirdropFee.ts#L14) | | `staleTimeMs?` | `number` | [distributor/solana/fetchAirdropFee.ts:12](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fetchAirdropFee.ts#L12) | # AlignedDistributorData URL: /docs/api/distributor/solana/interfaces/AlignedDistributorData # AlignedDistributorData [#aligneddistributordata] Defined in: [distributor/solana/types.ts:84](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L84) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------------------------------ | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | `clawedBack` | `boolean` | [distributor/solana/types.ts:93](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L93) | | `initialDuration` | `number` | [distributor/solana/types.ts:94](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L94) | | `initialPrice` | `number` | [distributor/solana/types.ts:95](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L95) | | `lastDurationUpdateTs` | `number` | [distributor/solana/types.ts:97](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L97) | | `lastPrice` | `number` | [distributor/solana/types.ts:96](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L96) | | `maxPercentage` | `number` | [distributor/solana/types.ts:89](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L89) | | `maxPrice` | `number` | [distributor/solana/types.ts:87](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L87) | | `minPercentage` | `number` | [distributor/solana/types.ts:88](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L88) | | `minPrice` | `number` | [distributor/solana/types.ts:86](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L86) | | `oracleType` | [`OracleTypeName`](/docs/api/distributor/solana/type-aliases/OracleTypeName) | [distributor/solana/types.ts:90](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L90) | | `priceOracle` | `string` | [distributor/solana/types.ts:91](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L91) | | `sender` | `string` | [distributor/solana/types.ts:85](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L85) | | `updatePeriod` | `number` | [distributor/solana/types.ts:92](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L92) | # IClaimData URL: /docs/api/distributor/solana/interfaces/IClaimData # IClaimData [#iclaimdata] Defined in: [distributor/solana/types.ts:127](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L127) ## Properties [#properties] | Property | Type | Defined in | | -------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `amountLocked` | `BN` | [distributor/solana/types.ts:131](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L131) | | `amountUnlocked` | `BN` | [distributor/solana/types.ts:130](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L130) | | `claimableAmount` | `BN` | [distributor/solana/types.ts:132](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L132) | | `id` | `string` | [distributor/solana/types.ts:128](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L128) | | `proof` | `number`\[]\[] | [distributor/solana/types.ts:133](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L133) | # IClawbackData URL: /docs/api/distributor/solana/interfaces/IClawbackData # IClawbackData [#iclawbackdata] Defined in: [distributor/solana/types.ts:141](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L141) ## Properties [#properties] | Property | Type | Defined in | | ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `id` | `string` | [distributor/solana/types.ts:142](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L142) | # ICloseClaimData URL: /docs/api/distributor/solana/interfaces/ICloseClaimData # ICloseClaimData [#icloseclaimdata] Defined in: [distributor/solana/types.ts:136](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L136) ## Extends [#extends] * `Partial`\<`Omit`\<[`IClaimData`](/docs/api/distributor/solana/interfaces/IClaimData), `"id"`>> ## Properties [#properties] | Property | Type | Inherited from | Defined in | | --------------------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `amountLocked?` | `BN` | [`IClaimData`](/docs/api/distributor/solana/interfaces/IClaimData).[`amountLocked`](/docs/api/distributor/solana/interfaces/IClaimData#amountlocked) | [distributor/solana/types.ts:131](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L131) | | `amountUnlocked?` | `BN` | [`IClaimData`](/docs/api/distributor/solana/interfaces/IClaimData).[`amountUnlocked`](/docs/api/distributor/solana/interfaces/IClaimData#amountunlocked) | [distributor/solana/types.ts:130](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L130) | | `claimableAmount?` | `BN` | [`IClaimData`](/docs/api/distributor/solana/interfaces/IClaimData).[`claimableAmount`](/docs/api/distributor/solana/interfaces/IClaimData#claimableamount) | [distributor/solana/types.ts:132](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L132) | | `claimant` | `string` \| `PublicKey` | - | [distributor/solana/types.ts:138](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L138) | | `id` | `string` | - | [distributor/solana/types.ts:137](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L137) | | `proof?` | `number`\[]\[] | [`IClaimData`](/docs/api/distributor/solana/interfaces/IClaimData).[`proof`](/docs/api/distributor/solana/interfaces/IClaimData#proof) | [distributor/solana/types.ts:133](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L133) | # ICreateAlignedDistributorData URL: /docs/api/distributor/solana/interfaces/ICreateAlignedDistributorData # ICreateAlignedDistributorData [#icreatealigneddistributordata] Defined in: [distributor/solana/types.ts:113](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L113) ## Extends [#extends] * [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | --------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `claimsClosableByAdmin` | `boolean` | [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData).[`claimsClosableByAdmin`](/docs/api/distributor/solana/interfaces/ICreateDistributorData#claimsclosablebyadmin) | [distributor/solana/types.ts:79](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L79) | | `claimsClosableByClaimant?` | `boolean` | [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData).[`claimsClosableByClaimant`](/docs/api/distributor/solana/interfaces/ICreateDistributorData#claimsclosablebyclaimant) | [distributor/solana/types.ts:80](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L80) | | `claimsLimit?` | `number` | [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData).[`claimsLimit`](/docs/api/distributor/solana/interfaces/ICreateDistributorData#claimslimit) | [distributor/solana/types.ts:81](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L81) | | `clawbackStartTs` | `number` | [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData).[`clawbackStartTs`](/docs/api/distributor/solana/interfaces/ICreateDistributorData#clawbackstartts) | [distributor/solana/types.ts:78](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L78) | | `endVestingTs` | `number` | [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData).[`endVestingTs`](/docs/api/distributor/solana/interfaces/ICreateDistributorData#endvestingts) | [distributor/solana/types.ts:77](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L77) | | `maxNumNodes` | `string` \| `number` \| `BN` | [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData).[`maxNumNodes`](/docs/api/distributor/solana/interfaces/ICreateDistributorData#maxnumnodes) | [distributor/solana/types.ts:74](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L74) | | `maxPercentage` | `number` | - | [distributor/solana/types.ts:117](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L117) | | `maxPrice` | `number` | - | [distributor/solana/types.ts:115](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L115) | | `maxTotalClaim` | `string` \| `number` \| `BN` | [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData).[`maxTotalClaim`](/docs/api/distributor/solana/interfaces/ICreateDistributorData#maxtotalclaim) | [distributor/solana/types.ts:73](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L73) | | `minPercentage` | `number` | - | [distributor/solana/types.ts:116](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L116) | | `minPrice` | `number` | - | [distributor/solana/types.ts:114](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L114) | | `mint` | `string` | [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData).[`mint`](/docs/api/distributor/solana/interfaces/ICreateDistributorData#mint) | [distributor/solana/types.ts:70](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L70) | | `oracleAddress` | `string` | - | [distributor/solana/types.ts:119](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L119) | | `oracleType` | [`OracleTypeName`](/docs/api/distributor/solana/type-aliases/OracleTypeName) | - | [distributor/solana/types.ts:118](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L118) | | `root` | `number`\[] | [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData).[`root`](/docs/api/distributor/solana/interfaces/ICreateDistributorData#root) | [distributor/solana/types.ts:72](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L72) | | `skipInitial?` | `boolean` | - | [distributor/solana/types.ts:124](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L124) | | `startVestingTs` | `number` | [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData).[`startVestingTs`](/docs/api/distributor/solana/interfaces/ICreateDistributorData#startvestingts) | [distributor/solana/types.ts:76](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L76) | | `tickSize?` | `number` | - | [distributor/solana/types.ts:123](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L123) | | `totalAmountLocked` | `string` \| `number` \| `BN` | - | [distributor/solana/types.ts:120](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L120) | | `totalAmountUnlocked` | `string` \| `number` \| `BN` | - | [distributor/solana/types.ts:121](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L121) | | `unlockPeriod` | `number` | [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData).[`unlockPeriod`](/docs/api/distributor/solana/interfaces/ICreateDistributorData#unlockperiod) | [distributor/solana/types.ts:75](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L75) | | `updatePeriod?` | `number` | - | [distributor/solana/types.ts:122](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L122) | | `version` | `number` | [`ICreateDistributorData`](/docs/api/distributor/solana/interfaces/ICreateDistributorData).[`version`](/docs/api/distributor/solana/interfaces/ICreateDistributorData#version) | [distributor/solana/types.ts:71](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L71) | # ICreateDistributorData URL: /docs/api/distributor/solana/interfaces/ICreateDistributorData # ICreateDistributorData [#icreatedistributordata] Defined in: [distributor/solana/types.ts:69](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L69) ## Extended by [#extended-by] * [`ICreateAlignedDistributorData`](/docs/api/distributor/solana/interfaces/ICreateAlignedDistributorData) ## Properties [#properties] | Property | Type | Defined in | | --------------------------------------------------------------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | `claimsClosableByAdmin` | `boolean` | [distributor/solana/types.ts:79](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L79) | | `claimsClosableByClaimant?` | `boolean` | [distributor/solana/types.ts:80](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L80) | | `claimsLimit?` | `number` | [distributor/solana/types.ts:81](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L81) | | `clawbackStartTs` | `number` | [distributor/solana/types.ts:78](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L78) | | `endVestingTs` | `number` | [distributor/solana/types.ts:77](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L77) | | `maxNumNodes` | `string` \| `number` \| `BN` | [distributor/solana/types.ts:74](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L74) | | `maxTotalClaim` | `string` \| `number` \| `BN` | [distributor/solana/types.ts:73](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L73) | | `mint` | `string` | [distributor/solana/types.ts:70](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L70) | | `root` | `number`\[] | [distributor/solana/types.ts:72](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L72) | | `startVestingTs` | `number` | [distributor/solana/types.ts:76](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L76) | | `unlockPeriod` | `number` | [distributor/solana/types.ts:75](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L75) | | `version` | `number` | [distributor/solana/types.ts:71](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L71) | # ICreateDistributorResult URL: /docs/api/distributor/solana/interfaces/ICreateDistributorResult # ICreateDistributorResult [#icreatedistributorresult] Defined in: [distributor/solana/types.ts:170](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L170) ## Extends [#extends] * `ITransactionResult` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ---------------------------------- | --------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `ixs` | `TransactionInstruction`\[] | `ITransactionResult.ixs` | common/dist/esm/solana/index.d.ts:1073 | | `metadataId` | `string` | - | [distributor/solana/types.ts:171](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L171) | | `txId` | `string` | `ITransactionResult.txId` | common/dist/esm/solana/index.d.ts:1076 | # ICreateExt URL: /docs/api/distributor/solana/interfaces/ICreateExt # ICreateExt [#icreateext] Defined in: [distributor/solana/types.ts:65](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L65) ## Extends [#extends] * [`IInteractExt`](/docs/api/distributor/solana/interfaces/IInteractExt) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | --------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | `computeLimit?` | `number` \| `ComputeLimitEstimate` \| `"autoSimulate"` | [`IInteractExt`](/docs/api/distributor/solana/interfaces/IInteractExt).[`computeLimit`](/docs/api/distributor/solana/interfaces/IInteractExt#computelimit) | common/dist/esm/solana/index.d.ts:1015 | | `computePrice?` | `number` \| `ComputePriceEstimate` | [`IInteractExt`](/docs/api/distributor/solana/interfaces/IInteractExt).[`computePrice`](/docs/api/distributor/solana/interfaces/IInteractExt#computeprice) | common/dist/esm/solana/index.d.ts:1014 | | `feePayer?` | `PublicKey` | [`IInteractExt`](/docs/api/distributor/solana/interfaces/IInteractExt).[`feePayer`](/docs/api/distributor/solana/interfaces/IInteractExt#feepayer) | common/dist/esm/solana/index.d.ts:1016 | | `invoker` | `Keypair` \| `SignerWalletAdapter` | [`IInteractExt`](/docs/api/distributor/solana/interfaces/IInteractExt).[`invoker`](/docs/api/distributor/solana/interfaces/IInteractExt#invoker) | [distributor/solana/types.ts:62](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L62) | | `isNative?` | `boolean` | - | [distributor/solana/types.ts:66](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L66) | # IGetClaimData URL: /docs/api/distributor/solana/interfaces/IGetClaimData # IGetClaimData [#igetclaimdata] Defined in: [distributor/solana/types.ts:145](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L145) ## Properties [#properties] | Property | Type | Defined in | | -------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `id` | `string` | [distributor/solana/types.ts:146](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L146) | | `recipient` | `string` | [distributor/solana/types.ts:148](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L148) | # IGetDistributors URL: /docs/api/distributor/solana/interfaces/IGetDistributors # IGetDistributors [#igetdistributors] Defined in: [distributor/solana/types.ts:151](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L151) ## Properties [#properties] | Property | Type | Defined in | | -------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `ids` | `string`\[] | [distributor/solana/types.ts:152](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L152) | # IInteractExt URL: /docs/api/distributor/solana/interfaces/IInteractExt # IInteractExt [#iinteractext] Defined in: [distributor/solana/types.ts:61](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L61) ## Extends [#extends] * `ITransactionExt` ## Extended by [#extended-by] * [`ICreateExt`](/docs/api/distributor/solana/interfaces/ICreateExt) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | --------------------------------------- | ------------------------------------------------------ | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | | `computeLimit?` | `number` \| `ComputeLimitEstimate` \| `"autoSimulate"` | `ITransactionExt.computeLimit` | common/dist/esm/solana/index.d.ts:1015 | | `computePrice?` | `number` \| `ComputePriceEstimate` | `ITransactionExt.computePrice` | common/dist/esm/solana/index.d.ts:1014 | | `feePayer?` | `PublicKey` | `ITransactionExt.feePayer` | common/dist/esm/solana/index.d.ts:1016 | | `invoker` | `Keypair` \| `SignerWalletAdapter` | - | [distributor/solana/types.ts:62](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L62) | # ISearchDistributors URL: /docs/api/distributor/solana/interfaces/ISearchDistributors # ISearchDistributors [#isearchdistributors] Defined in: [distributor/solana/types.ts:155](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L155) ## Properties [#properties] | Property | Type | Defined in | | ------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `admin?` | `string` | [distributor/solana/types.ts:157](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L157) | | `mint?` | `string` | [distributor/solana/types.ts:156](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L156) | # ISetClawbackReceiverData URL: /docs/api/distributor/solana/interfaces/ISetClawbackReceiverData # ISetClawbackReceiverData [#isetclawbackreceiverdata] Defined in: [distributor/solana/types.ts:165](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L165) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `id` | `string` | [distributor/solana/types.ts:166](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L166) | | `newReceiver` | `string` | [distributor/solana/types.ts:167](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L167) | # ISetDataAdmin URL: /docs/api/distributor/solana/interfaces/ISetDataAdmin # ISetDataAdmin [#isetdataadmin] Defined in: [distributor/solana/types.ts:160](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L160) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `id` | `string` | [distributor/solana/types.ts:161](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L161) | | `newAdmin` | `string` | [distributor/solana/types.ts:162](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L162) | # NewAlignedDistributorArgs URL: /docs/api/distributor/solana/interfaces/NewAlignedDistributorArgs # NewAlignedDistributorArgs [#newaligneddistributorargs] Defined in: [distributor/solana/types.ts:100](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L100) ## Properties [#properties] | Property | Type | Defined in | | ---------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------- | | `maxPercentage` | `BN` | [distributor/solana/types.ts:107](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L107) | | `maxPrice` | `BN` | [distributor/solana/types.ts:105](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L105) | | `minPercentage` | `BN` | [distributor/solana/types.ts:106](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L106) | | `minPrice` | `BN` | [distributor/solana/types.ts:104](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L104) | | `oracleType` | `DecodeEnum` | [distributor/solana/types.ts:103](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L103) | | `skipInitial` | `boolean` | [distributor/solana/types.ts:109](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L109) | | `tickSize` | `BN` | [distributor/solana/types.ts:108](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L108) | | `totalAmountLocked` | `BN` | [distributor/solana/types.ts:101](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L101) | | `totalAmountUnlocked` | `BN` | [distributor/solana/types.ts:102](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L102) | | `updatePeriod` | `BN` | [distributor/solana/types.ts:110](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L110) | # constants URL: /docs/api/distributor/solana/namespaces/constants # constants [#constants] ## Variables [#variables] * [AIRDROP\_CLAIM\_FEE](/docs/api/distributor/solana/namespaces/constants/variables/AIRDROP_CLAIM_FEE) * [ALIGNED\_DISTRIBUTOR\_ERRORS](/docs/api/distributor/solana/namespaces/constants/variables/ALIGNED_DISTRIBUTOR_ERRORS) * [ALIGNED\_DISTRIBUTOR\_PREFIX](/docs/api/distributor/solana/namespaces/constants/variables/ALIGNED_DISTRIBUTOR_PREFIX) * [ALIGNED\_DISTRIBUTOR\_PROGRAM\_ID](/docs/api/distributor/solana/namespaces/constants/variables/ALIGNED_DISTRIBUTOR_PROGRAM_ID) * [ALIGNED\_PRECISION\_FACTOR\_POW](/docs/api/distributor/solana/namespaces/constants/variables/ALIGNED_PRECISION_FACTOR_POW) * [ANCHOR\_DISCRIMINATOR\_OFFSET](/docs/api/distributor/solana/namespaces/constants/variables/ANCHOR_DISCRIMINATOR_OFFSET) * [CLAIM\_STATUS\_PREFIX](/docs/api/distributor/solana/namespaces/constants/variables/CLAIM_STATUS_PREFIX) * [DISTRIBUTOR\_ADMIN\_OFFSET](/docs/api/distributor/solana/namespaces/constants/variables/DISTRIBUTOR_ADMIN_OFFSET) * [DISTRIBUTOR\_MINT\_OFFSET](/docs/api/distributor/solana/namespaces/constants/variables/DISTRIBUTOR_MINT_OFFSET) * [DISTRIBUTOR\_PREFIX](/docs/api/distributor/solana/namespaces/constants/variables/DISTRIBUTOR_PREFIX) * [DISTRIBUTOR\_PROGRAM\_ID](/docs/api/distributor/solana/namespaces/constants/variables/DISTRIBUTOR_PROGRAM_ID) * [FEE\_CONFIG\_PUBLIC\_KEY](/docs/api/distributor/solana/namespaces/constants/variables/FEE_CONFIG_PUBLIC_KEY) * [MERKLE\_DISTRIBUTOR\_ERRORS](/docs/api/distributor/solana/namespaces/constants/variables/MERKLE_DISTRIBUTOR_ERRORS) * [ONE\_IN\_BASIS\_POINTS](/docs/api/distributor/solana/namespaces/constants/variables/ONE_IN_BASIS_POINTS) * [PARTNER\_ORACLE\_PROGRAM\_ID](/docs/api/distributor/solana/namespaces/constants/variables/PARTNER_ORACLE_PROGRAM_ID) * [SOL\_FEE\_PROGRAM\_VERSION](/docs/api/distributor/solana/namespaces/constants/variables/SOL_FEE_PROGRAM_VERSION) * [STREAMFLOW\_TREASURY\_PUBLIC\_KEY](/docs/api/distributor/solana/namespaces/constants/variables/STREAMFLOW_TREASURY_PUBLIC_KEY) * [TEST\_ORACLE\_PREFIX](/docs/api/distributor/solana/namespaces/constants/variables/TEST_ORACLE_PREFIX) # AIRDROP_CLAIM_FEE URL: /docs/api/distributor/solana/namespaces/constants/variables/AIRDROP_CLAIM_FEE # AIRDROP\_CLAIM\_FEE [#airdrop_claim_fee] ```ts const AIRDROP_CLAIM_FEE: bigint; ``` Defined in: [distributor/solana/constants.ts:23](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L23) # ALIGNED_DISTRIBUTOR_ERRORS URL: /docs/api/distributor/solana/namespaces/constants/variables/ALIGNED_DISTRIBUTOR_ERRORS # ALIGNED\_DISTRIBUTOR\_ERRORS [#aligned_distributor_errors] ```ts const ALIGNED_DISTRIBUTOR_ERRORS: Map; ``` Defined in: [distributor/solana/constants.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L11) # ALIGNED_DISTRIBUTOR_PREFIX URL: /docs/api/distributor/solana/namespaces/constants/variables/ALIGNED_DISTRIBUTOR_PREFIX # ALIGNED\_DISTRIBUTOR\_PREFIX [#aligned_distributor_prefix] ```ts const ALIGNED_DISTRIBUTOR_PREFIX: Buffer; ``` Defined in: [distributor/solana/constants.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L18) # ALIGNED_DISTRIBUTOR_PROGRAM_ID URL: /docs/api/distributor/solana/namespaces/constants/variables/ALIGNED_DISTRIBUTOR_PROGRAM_ID # ALIGNED\_DISTRIBUTOR\_PROGRAM\_ID [#aligned_distributor_program_id] ```ts const ALIGNED_DISTRIBUTOR_PROGRAM_ID: object; ``` Defined in: [distributor/solana/constants.ts:30](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L30) ## Type Declaration [#type-declaration] | Name | Type | Default value | Defined in | | ------------------------------------- | -------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | | `devnet` | `string` | `"aMERKpFAWoChCi5oZwPvgsSCoGpZKBiU7fi76bdZjt2"` | [distributor/solana/constants.ts:31](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L31) | | `local` | `string` | `"aMERKpFAWoChCi5oZwPvgsSCoGpZKBiU7fi76bdZjt2"` | [distributor/solana/constants.ts:34](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L34) | | `mainnet` | `string` | `"aMERKpFAWoChCi5oZwPvgsSCoGpZKBiU7fi76bdZjt2"` | [distributor/solana/constants.ts:32](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L32) | | `testnet` | `string` | `"aMERKpFAWoChCi5oZwPvgsSCoGpZKBiU7fi76bdZjt2"` | [distributor/solana/constants.ts:33](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L33) | # ALIGNED_PRECISION_FACTOR_POW URL: /docs/api/distributor/solana/namespaces/constants/variables/ALIGNED_PRECISION_FACTOR_POW # ALIGNED\_PRECISION\_FACTOR\_POW [#aligned_precision_factor_pow] ```ts const ALIGNED_PRECISION_FACTOR_POW: 9 = 9; ``` Defined in: [distributor/solana/constants.ts:21](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L21) # ANCHOR_DISCRIMINATOR_OFFSET URL: /docs/api/distributor/solana/namespaces/constants/variables/ANCHOR_DISCRIMINATOR_OFFSET # ANCHOR\_DISCRIMINATOR\_OFFSET [#anchor_discriminator_offset] ```ts const ANCHOR_DISCRIMINATOR_OFFSET: 8 = 8; ``` Defined in: [distributor/solana/constants.ts:13](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L13) # CLAIM_STATUS_PREFIX URL: /docs/api/distributor/solana/namespaces/constants/variables/CLAIM_STATUS_PREFIX # CLAIM\_STATUS\_PREFIX [#claim_status_prefix] ```ts const CLAIM_STATUS_PREFIX: Buffer; ``` Defined in: [distributor/solana/constants.ts:20](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L20) # DISTRIBUTOR_ADMIN_OFFSET URL: /docs/api/distributor/solana/namespaces/constants/variables/DISTRIBUTOR_ADMIN_OFFSET # DISTRIBUTOR\_ADMIN\_OFFSET [#distributor_admin_offset] ```ts const DISTRIBUTOR_ADMIN_OFFSET: number; ``` Defined in: [distributor/solana/constants.ts:15](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L15) # DISTRIBUTOR_MINT_OFFSET URL: /docs/api/distributor/solana/namespaces/constants/variables/DISTRIBUTOR_MINT_OFFSET # DISTRIBUTOR\_MINT\_OFFSET [#distributor_mint_offset] ```ts const DISTRIBUTOR_MINT_OFFSET: number; ``` Defined in: [distributor/solana/constants.ts:14](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L14) # DISTRIBUTOR_PREFIX URL: /docs/api/distributor/solana/namespaces/constants/variables/DISTRIBUTOR_PREFIX # DISTRIBUTOR\_PREFIX [#distributor_prefix] ```ts const DISTRIBUTOR_PREFIX: Buffer; ``` Defined in: [distributor/solana/constants.ts:17](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L17) # DISTRIBUTOR_PROGRAM_ID URL: /docs/api/distributor/solana/namespaces/constants/variables/DISTRIBUTOR_PROGRAM_ID # DISTRIBUTOR\_PROGRAM\_ID [#distributor_program_id] ```ts const DISTRIBUTOR_PROGRAM_ID: object; ``` Defined in: [distributor/solana/constants.ts:37](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L37) ## Type Declaration [#type-declaration] | Name | Type | Default value | Defined in | | ------------------------------------- | -------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | | `devnet` | `string` | `"MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N"` | [distributor/solana/constants.ts:38](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L38) | | `local` | `string` | `"MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N"` | [distributor/solana/constants.ts:41](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L41) | | `mainnet` | `string` | `"MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N"` | [distributor/solana/constants.ts:39](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L39) | | `testnet` | `string` | `"MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N"` | [distributor/solana/constants.ts:40](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L40) | # FEE_CONFIG_PUBLIC_KEY URL: /docs/api/distributor/solana/namespaces/constants/variables/FEE_CONFIG_PUBLIC_KEY # FEE\_CONFIG\_PUBLIC\_KEY [#fee_config_public_key] ```ts const FEE_CONFIG_PUBLIC_KEY: object; ``` Defined in: [distributor/solana/constants.ts:55](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L55) ## Type Declaration [#type-declaration] | Name | Type | Default value | Defined in | | ------------------------------------- | -------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- | | `devnet` | `string` | `"5HCju3fLTQGNNPZyZwaWGQqRcTRKE1VEdr7HFZKc7NhB"` | [distributor/solana/constants.ts:56](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L56) | | `local` | `string` | `"5HCju3fLTQGNNPZyZwaWGQqRcTRKE1VEdr7HFZKc7NhB"` | [distributor/solana/constants.ts:59](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L59) | | `mainnet` | `string` | `"5WHEQeA5uX7zJ8r7yAzsxomF7LTnX9acQy3V8oWXHa8b"` | [distributor/solana/constants.ts:57](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L57) | | `testnet` | `string` | `"5HCju3fLTQGNNPZyZwaWGQqRcTRKE1VEdr7HFZKc7NhB"` | [distributor/solana/constants.ts:58](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L58) | # MERKLE_DISTRIBUTOR_ERRORS URL: /docs/api/distributor/solana/namespaces/constants/variables/MERKLE_DISTRIBUTOR_ERRORS # MERKLE\_DISTRIBUTOR\_ERRORS [#merkle_distributor_errors] ```ts const MERKLE_DISTRIBUTOR_ERRORS: Map; ``` Defined in: [distributor/solana/constants.ts:10](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L10) # ONE_IN_BASIS_POINTS URL: /docs/api/distributor/solana/namespaces/constants/variables/ONE_IN_BASIS_POINTS # ONE\_IN\_BASIS\_POINTS [#one_in_basis_points] ```ts const ONE_IN_BASIS_POINTS: bigint; ``` Defined in: [distributor/solana/constants.ts:26](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L26) # PARTNER_ORACLE_PROGRAM_ID URL: /docs/api/distributor/solana/namespaces/constants/variables/PARTNER_ORACLE_PROGRAM_ID # PARTNER\_ORACLE\_PROGRAM\_ID [#partner_oracle_program_id] ```ts const PARTNER_ORACLE_PROGRAM_ID: object; ``` Defined in: [distributor/solana/constants.ts:44](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L44) ## Type Declaration [#type-declaration] | Name | Type | Default value | Defined in | | ------------------------------------- | -------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | | `devnet` | `string` | `"pardoTarcc6HKsPcbXkVycxsJsoN9QEzrdHgVdHAGY3"` | [distributor/solana/constants.ts:45](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L45) | | `local` | `string` | `"pardoTarcc6HKsPcbXkVycxsJsoN9QEzrdHgVdHAGY3"` | [distributor/solana/constants.ts:48](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L48) | | `mainnet` | `string` | `"pardpVtPjC8nLj1Dwncew62mUzfChdCX1EaoZe8oCAa"` | [distributor/solana/constants.ts:46](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L46) | | `testnet` | `string` | `"pardoTarcc6HKsPcbXkVycxsJsoN9QEzrdHgVdHAGY3"` | [distributor/solana/constants.ts:47](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L47) | # SOL_FEE_PROGRAM_VERSION URL: /docs/api/distributor/solana/namespaces/constants/variables/SOL_FEE_PROGRAM_VERSION # SOL\_FEE\_PROGRAM\_VERSION [#sol_fee_program_version] ```ts const SOL_FEE_PROGRAM_VERSION: 1 = 1; ``` Defined in: [distributor/solana/constants.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L28) # STREAMFLOW_TREASURY_PUBLIC_KEY URL: /docs/api/distributor/solana/namespaces/constants/variables/STREAMFLOW_TREASURY_PUBLIC_KEY # STREAMFLOW\_TREASURY\_PUBLIC\_KEY [#streamflow_treasury_public_key] ```ts const STREAMFLOW_TREASURY_PUBLIC_KEY: PublicKey; ``` Defined in: [distributor/solana/constants.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L24) # TEST_ORACLE_PREFIX URL: /docs/api/distributor/solana/namespaces/constants/variables/TEST_ORACLE_PREFIX # TEST\_ORACLE\_PREFIX [#test_oracle_prefix] ```ts const TEST_ORACLE_PREFIX: Buffer; ``` Defined in: [distributor/solana/constants.ts:19](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/constants.ts#L19) # AirdropFeeClient URL: /docs/api/distributor/solana/type-aliases/AirdropFeeClient # AirdropFeeClient [#airdropfeeclient] ```ts type AirdropFeeClient = object; ``` Defined in: [distributor/solana/fees.ts:19](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L19) ## Properties [#properties] | Property | Type | Defined in | | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | | `getAirdropFee` | (`distributorAddress`) => `Promise`\<\{ `data?`: [`AirdropFeeServiceResponse`](/docs/api/distributor/solana/type-aliases/AirdropFeeServiceResponse); }> | [distributor/solana/fees.ts:20](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L20) | # AirdropFeeDynamic URL: /docs/api/distributor/solana/type-aliases/AirdropFeeDynamic # AirdropFeeDynamic [#airdropfeedynamic] ```ts type AirdropFeeDynamic = object; ``` Defined in: [distributor/solana/fees.ts:7](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L7) ## Properties [#properties] | Property | Type | Defined in | | ---------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- | | `allocationFactor` | `string` | [distributor/solana/fees.ts:10](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L10) | | `maxPrice` | `string` | [distributor/solana/fees.ts:9](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L9) | | `minPrice` | `string` | [distributor/solana/fees.ts:8](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L8) | # AirdropFeeResponse URL: /docs/api/distributor/solana/type-aliases/AirdropFeeResponse # AirdropFeeResponse [#airdropfeeresponse] ```ts type AirdropFeeResponse = object; ``` Defined in: [distributor/solana/fetchAirdropFee.ts:1](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fetchAirdropFee.ts#L1) ## Properties [#properties] | Property | Type | Defined in | | --------------------------------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | `claimFee` | `string` \| `number` | [distributor/solana/fetchAirdropFee.ts:2](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fetchAirdropFee.ts#L2) | | `claimFeeDynamic?` | `object` | [distributor/solana/fetchAirdropFee.ts:3](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fetchAirdropFee.ts#L3) | | `claimFeeDynamic.allocationFactor` | `string` | [distributor/solana/fetchAirdropFee.ts:6](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fetchAirdropFee.ts#L6) | | `claimFeeDynamic.maxPrice` | `string` | [distributor/solana/fetchAirdropFee.ts:5](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fetchAirdropFee.ts#L5) | | `claimFeeDynamic.minPrice` | `string` | [distributor/solana/fetchAirdropFee.ts:4](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fetchAirdropFee.ts#L4) | | `isCustom` | `boolean` | [distributor/solana/fetchAirdropFee.ts:8](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fetchAirdropFee.ts#L8) | # AirdropFeeServiceResponse URL: /docs/api/distributor/solana/type-aliases/AirdropFeeServiceResponse # AirdropFeeServiceResponse [#airdropfeeserviceresponse] ```ts type AirdropFeeServiceResponse = object; ``` Defined in: [distributor/solana/fees.ts:13](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L13) ## Properties [#properties] | Property | Type | Defined in | | --------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | | `claimFee?` | `string` \| `number` | [distributor/solana/fees.ts:15](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L15) | | `claimFeeDynamic?` | [`AirdropFeeDynamic`](/docs/api/distributor/solana/type-aliases/AirdropFeeDynamic) | [distributor/solana/fees.ts:16](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L16) | | `isCustom?` | `boolean` | [distributor/solana/fees.ts:14](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L14) | # AnyClaimStatus URL: /docs/api/distributor/solana/type-aliases/AnyClaimStatus # AnyClaimStatus [#anyclaimstatus] ```ts type AnyClaimStatus = | { buffer2: number[]; claimant: PublicKey; claimsCount: number; closed: boolean; closedTs: BN; distributor: PublicKey; lastAmountPerUnlock: BN; lastClaimTs: BN; lockedAmount: BN; lockedAmountWithdrawn: BN; unlockedAmount: BN; } | { state: DecodeEnum<{ kind: "enum"; variants: [{ name: "claimed"; }, { name: "closed"; }]; }, EmptyDefined>; }; ``` Defined in: [distributor/solana/types.ts:55](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L55) ## Inherit Doc [#inherit-doc] # ClaimLockedAccounts URL: /docs/api/distributor/solana/type-aliases/ClaimLockedAccounts # ClaimLockedAccounts [#claimlockedaccounts] ```ts type ClaimLockedAccounts = IdlAccountsOfMethod; ``` Defined in: [distributor/solana/types.ts:44](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L44) # ClaimLockedV2Accounts URL: /docs/api/distributor/solana/type-aliases/ClaimLockedV2Accounts # ClaimLockedV2Accounts [#claimlockedv2accounts] ```ts type ClaimLockedV2Accounts = IdlAccountsOfMethod; ``` Defined in: [distributor/solana/types.ts:43](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L43) # ClaimStatus URL: /docs/api/distributor/solana/type-aliases/ClaimStatus # ClaimStatus [#claimstatus] ```ts type ClaimStatus = MerkleDistributorAccountTypes["claimStatus"]; ``` Defined in: [distributor/solana/types.ts:27](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L27) # ClawbackAccounts URL: /docs/api/distributor/solana/type-aliases/ClawbackAccounts # ClawbackAccounts [#clawbackaccounts] ```ts type ClawbackAccounts = IdlAccountsOfMethod; ``` Defined in: [distributor/solana/types.ts:45](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L45) # CloseClaimAccounts URL: /docs/api/distributor/solana/type-aliases/CloseClaimAccounts # CloseClaimAccounts [#closeclaimaccounts] ```ts type CloseClaimAccounts = IdlAccountsOfMethod; ``` Defined in: [distributor/solana/types.ts:46](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L46) # CloseClaimArgs URL: /docs/api/distributor/solana/type-aliases/CloseClaimArgs # CloseClaimArgs [#closeclaimargs] ```ts type CloseClaimArgs = IdlInstruction["args"]; ``` Defined in: [distributor/solana/types.ts:47](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L47) # CompressedClaimStatus URL: /docs/api/distributor/solana/type-aliases/CompressedClaimStatus # CompressedClaimStatus [#compressedclaimstatus] ```ts type CompressedClaimStatus = MerkleDistributorAccountTypes["compressedClaimStatus"]; ``` Defined in: [distributor/solana/types.ts:32](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L32) # FeeConfig URL: /docs/api/distributor/solana/type-aliases/FeeConfig # FeeConfig [#feeconfig] ```ts type FeeConfig = PartnerOracleTypes["airdropConfig"]; ``` Defined in: [distributor/solana/types.ts:21](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L21) # Fees URL: /docs/api/distributor/solana/type-aliases/Fees # Fees [#fees] ```ts type Fees = PartnerOracleTypes["airdropFees"]; ``` Defined in: [distributor/solana/types.ts:22](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L22) # MerkleDistributor URL: /docs/api/distributor/solana/type-aliases/MerkleDistributor # MerkleDistributor [#merkledistributor] ```ts type MerkleDistributor = MerkleDistributorAccountTypes["merkleDistributor"]; ``` Defined in: [distributor/solana/types.ts:37](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L37) # MerkleDistributorAccountTypes URL: /docs/api/distributor/solana/type-aliases/MerkleDistributorAccountTypes # MerkleDistributorAccountTypes [#merkledistributoraccounttypes] ```ts type MerkleDistributorAccountTypes = IdlTypes; ``` Defined in: [distributor/solana/types.ts:17](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L17) # MerkleDistributorAccounts URL: /docs/api/distributor/solana/type-aliases/MerkleDistributorAccounts # MerkleDistributorAccounts [#merkledistributoraccounts] ```ts type MerkleDistributorAccounts = IdlAccounts; ``` Defined in: [distributor/solana/types.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L18) # MerkleDistributorProgram URL: /docs/api/distributor/solana/type-aliases/MerkleDistributorProgram # MerkleDistributorProgram [#merkledistributorprogram] ```ts type MerkleDistributorProgram = Program; ``` Defined in: [distributor/solana/types.ts:19](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L19) # NewClaimAccounts URL: /docs/api/distributor/solana/type-aliases/NewClaimAccounts # NewClaimAccounts [#newclaimaccounts] ```ts type NewClaimAccounts = IdlAccountsOfMethod; ``` Defined in: [distributor/solana/types.ts:41](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L41) # NewClaimArgs URL: /docs/api/distributor/solana/type-aliases/NewClaimArgs # NewClaimArgs [#newclaimargs] ```ts type NewClaimArgs = IdlInstruction["args"]; ``` Defined in: [distributor/solana/types.ts:42](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L42) # NewDistributorAccounts URL: /docs/api/distributor/solana/type-aliases/NewDistributorAccounts # NewDistributorAccounts [#newdistributoraccounts] ```ts type NewDistributorAccounts = IdlAccountsOfMethod; ``` Defined in: [distributor/solana/types.ts:39](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L39) # NewDistributorArgs URL: /docs/api/distributor/solana/type-aliases/NewDistributorArgs # NewDistributorArgs [#newdistributorargs] ```ts type NewDistributorArgs = IdlArgsOfMethod; ``` Defined in: [distributor/solana/types.ts:40](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L40) # OracleType URL: /docs/api/distributor/solana/type-aliases/OracleType # OracleType [#oracletype] ```ts type OracleType = IdlTypes["oracleType"]; ``` Defined in: [distributor/solana/types.ts:57](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L57) # OracleTypeName URL: /docs/api/distributor/solana/type-aliases/OracleTypeName # OracleTypeName [#oracletypename] ```ts type OracleTypeName = "none" | "pyth" | "switchboard" | "test"; ``` Defined in: [distributor/solana/types.ts:59](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/types.ts#L59) # FEE_ALLOCATION_FACTOR_FALLBACK_DENOMINATOR URL: /docs/api/distributor/solana/variables/FEE_ALLOCATION_FACTOR_FALLBACK_DENOMINATOR # FEE\_ALLOCATION\_FACTOR\_FALLBACK\_DENOMINATOR [#fee_allocation_factor_fallback_denominator] ```ts const FEE_ALLOCATION_FACTOR_FALLBACK_DENOMINATOR: 100n = 100n; ``` Defined in: [distributor/solana/fees.ts:26](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L26) # FEE_ALLOCATION_FACTOR_FALLBACK_NUMERATOR URL: /docs/api/distributor/solana/variables/FEE_ALLOCATION_FACTOR_FALLBACK_NUMERATOR # FEE\_ALLOCATION\_FACTOR\_FALLBACK\_NUMERATOR [#fee_allocation_factor_fallback_numerator] ```ts const FEE_ALLOCATION_FACTOR_FALLBACK_NUMERATOR: 90n = 90n; ``` Defined in: [distributor/solana/fees.ts:25](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L25) # MAXIMUM_FEE_FALLBACK URL: /docs/api/distributor/solana/variables/MAXIMUM_FEE_FALLBACK # MAXIMUM\_FEE\_FALLBACK [#maximum_fee_fallback] ```ts const MAXIMUM_FEE_FALLBACK: 9900000n = 9_900_000n; ``` Defined in: [distributor/solana/fees.ts:23](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L23) # MINIMUM_FEE_FALLBACK URL: /docs/api/distributor/solana/variables/MINIMUM_FEE_FALLBACK # MINIMUM\_FEE\_FALLBACK [#minimum_fee_fallback] ```ts const MINIMUM_FEE_FALLBACK: 5000000n = 5_000_000n; ``` Defined in: [distributor/solana/fees.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/distributor/solana/fees.ts#L24) # SDK Reference URL: /docs/api # SDK Reference [#sdk-reference] Auto-generated type and function reference for all published `@streamflow/*` packages. # SolanaLaunchpadClient URL: /docs/api/launchpad/classes/SolanaLaunchpadClient # SolanaLaunchpadClient [#solanalaunchpadclient] Defined in: [launchpad/solana/client.ts:69](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L69) ## Constructors [#constructors] ### Constructor [#constructor] ```ts new SolanaLaunchpadClient(__namedParameters): SolanaLaunchpadClient; ``` Defined in: [launchpad/solana/client.ts:88](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L88) #### Parameters [#parameters] | Parameter | Type | | ------------------- | -------------- | | `__namedParameters` | `IInitOptions` | #### Returns [#returns] `SolanaLaunchpadClient` ## Properties [#properties] | Property | Modifier | Type | Defined in | | ---------------------------------- | ---------- | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | | `cluster` | `public` | `ICluster` | [launchpad/solana/client.ts:72](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L72) | | `connection` | `public` | `Connection` | [launchpad/solana/client.ts:70](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L70) | | `program` | `readonly` | `Program`\<`StreamflowLaunchpad`> | [launchpad/solana/client.ts:86](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L86) | ## Methods [#methods] ### claimAllocatedVested() [#claimallocatedvested] ```ts claimAllocatedVested(data, extParams): Promise; ``` Defined in: [launchpad/solana/client.ts:376](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L376) #### Parameters [#parameters-1] | Parameter | Type | | ----------- | ------------------------------------------------------------------------------- | | `data` | [`IClaimAllocatedVested`](/docs/api/launchpad/interfaces/IClaimAllocatedVested) | | `extParams` | [`IInteractExt`](/docs/api/launchpad/interfaces/IInteractExt) | #### Returns [#returns-1] `Promise`\<`ITransactionResult`> *** ### claimDeposits() [#claimdeposits] ```ts claimDeposits(data, extParams): Promise; ``` Defined in: [launchpad/solana/client.ts:344](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L344) #### Parameters [#parameters-2] | Parameter | Type | | ----------- | ----------------------------------------------------------------- | | `data` | [`IClaimDeposits`](/docs/api/launchpad/interfaces/IClaimDeposits) | | `extParams` | [`IInteractExt`](/docs/api/launchpad/interfaces/IInteractExt) | #### Returns [#returns-2] `Promise`\<`ITransactionResult`> *** ### createLaunchpad() [#createlaunchpad] ```ts createLaunchpad(data, extParams): Promise; ``` Defined in: [launchpad/solana/client.ts:152](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L152) #### Parameters [#parameters-3] | Parameter | Type | | ----------- | --------------------------------------------------------------------- | | `data` | [`ICreateLaunchpad`](/docs/api/launchpad/interfaces/ICreateLaunchpad) | | `extParams` | [`IInteractExt`](/docs/api/launchpad/interfaces/IInteractExt) | #### Returns [#returns-3] `Promise`\<`CreationResult`> *** ### deposit() [#deposit] ```ts deposit(data, extParams): Promise; ``` Defined in: [launchpad/solana/client.ts:285](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L285) #### Parameters [#parameters-4] | Parameter | Type | | ----------- | ------------------------------------------------------------- | | `data` | [`IDeposit`](/docs/api/launchpad/interfaces/IDeposit) | | `extParams` | [`IInteractExt`](/docs/api/launchpad/interfaces/IInteractExt) | #### Returns [#returns-4] `Promise`\<`ITransactionResult`> *** ### fundLaunchpad() [#fundlaunchpad] ```ts fundLaunchpad(data, extParams): Promise; ``` Defined in: [launchpad/solana/client.ts:239](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L239) #### Parameters [#parameters-5] | Parameter | Type | | ----------- | ----------------------------------------------------------------- | | `data` | [`IFundLaunchpad`](/docs/api/launchpad/interfaces/IFundLaunchpad) | | `extParams` | [`IInteractExt`](/docs/api/launchpad/interfaces/IInteractExt) | #### Returns [#returns-5] `Promise`\<`ITransactionResult`> *** ### getCommitment() [#getcommitment] ```ts getCommitment(): Commitment; ``` Defined in: [launchpad/solana/client.ts:134](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L134) #### Returns [#returns-6] `Commitment` *** ### getCurrentProgramId() [#getcurrentprogramid] ```ts getCurrentProgramId(): PublicKey; ``` Defined in: [launchpad/solana/client.ts:129](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L129) #### Returns [#returns-7] `PublicKey` *** ### getDepositAccount() [#getdepositaccount] ```ts getDepositAccount(id): Promise<{ allocatedAmount: BN; amount: BN; buffer: number[]; claimedTs: BN; createdTs: BN; launchpad: PublicKey; owner: PublicKey; }>; ``` Defined in: [launchpad/solana/client.ts:148](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L148) #### Parameters [#parameters-6] | Parameter | Type | | --------- | --------- | | `id` | `Address` | #### Returns [#returns-8] `Promise`\<\{ `allocatedAmount`: `BN`; `amount`: `BN`; `buffer`: `number`\[]; `claimedTs`: `BN`; `createdTs`: `BN`; `launchpad`: `PublicKey`; `owner`: `PublicKey`; }> *** ### getLaunchpad() [#getlaunchpad] ```ts getLaunchpad(id): Promise<{ authority: PublicKey; baseMint: PublicKey; buffer: number[]; bump: number; config: { depositingEndTs: BN; depositingStartTs: BN; individualDepositingCap: BN; isMemoRequired: boolean; maxDepositingCap: BN; price: BN; }; filler: number[]; nonce: number; priceOracle: PublicKey; quoteMint: PublicKey; receiver: PublicKey; state: { buffer: number[]; cancelledTs: BN; claimedTs: BN; createdTs: BN; totalClaimedUsers: BN; totalDepositedAmount: BN; totalDepositedUsers: BN; }; vault: PublicKey; vestingConfig: { endTs: BN; maxPercentage: BN; maxPrice: BN; minPercentage: BN; minPrice: BN; oracleType: DecodeEnum<{ kind: "enum"; variants: [{ name: "none"; }, { name: "test"; }, { name: "pyth"; }, { name: "switchboard"; }]; }, DecodedHelper<[{ name: "createLaunchpadIx"; type: { fields: [{ name: "nonce"; type: "u8"; }, { docs: [...]; name: "price"; type: "u64"; }, { docs: [...]; name: "individualDepositingCap"; type: "u64"; }, { docs: [...]; name: "maxDepositingCap"; type: "u64"; }, { docs: [...]; name: "depositingStartTs"; type: "u64"; }]; kind: "struct"; }; }, { name: "depositAccount"; type: { fields: [{ docs: [...]; name: "launchpad"; type: "pubkey"; }, { docs: [...]; name: "owner"; type: "pubkey"; }, { docs: [...]; name: "amount"; type: "u64"; }, { docs: [...]; name: "allocatedAmount"; type: "u64"; }, { docs: [...]; name: "createdTs"; type: "u64"; }, { docs: [...]; name: "claimedTs"; type: "u64"; }, { docs: [...]; name: "buffer"; type: { array: ...; }; }]; kind: "struct"; }; }, { name: "depositIx"; type: { fields: [{ docs: [...]; name: "amount"; type: "u64"; }, { docs: [...]; name: "autoCap"; type: "bool"; }]; kind: "struct"; }; }], EmptyDefined>>; period: BN; skipInitial: boolean; startTs: BN; tickSize: BN; }; }>; ``` Defined in: [launchpad/solana/client.ts:138](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L138) #### Parameters [#parameters-7] | Parameter | Type | | --------- | --------- | | `id` | `Address` | #### Returns [#returns-9] `Promise`\<\{ `authority`: `PublicKey`; `baseMint`: `PublicKey`; `buffer`: `number`\[]; `bump`: `number`; `config`: \{ `depositingEndTs`: `BN`; `depositingStartTs`: `BN`; `individualDepositingCap`: `BN`; `isMemoRequired`: `boolean`; `maxDepositingCap`: `BN`; `price`: `BN`; }; `filler`: `number`\[]; `nonce`: `number`; `priceOracle`: `PublicKey`; `quoteMint`: `PublicKey`; `receiver`: `PublicKey`; `state`: \{ `buffer`: `number`\[]; `cancelledTs`: `BN`; `claimedTs`: `BN`; `createdTs`: `BN`; `totalClaimedUsers`: `BN`; `totalDepositedAmount`: `BN`; `totalDepositedUsers`: `BN`; }; `vault`: `PublicKey`; `vestingConfig`: \{ `endTs`: `BN`; `maxPercentage`: `BN`; `maxPrice`: `BN`; `minPercentage`: `BN`; `minPrice`: `BN`; `oracleType`: `DecodeEnum`\<\{ `kind`: `"enum"`; `variants`: \[\{ `name`: `"none"`; }, \{ `name`: `"test"`; }, \{ `name`: `"pyth"`; }, \{ `name`: `"switchboard"`; }]; }, `DecodedHelper`\<\[\{ `name`: `"createLaunchpadIx"`; `type`: \{ `fields`: \[\{ `name`: `"nonce"`; `type`: `"u8"`; }, \{ `docs`: \[...]; `name`: `"price"`; `type`: `"u64"`; }, \{ `docs`: \[...]; `name`: `"individualDepositingCap"`; `type`: `"u64"`; }, \{ `docs`: \[...]; `name`: `"maxDepositingCap"`; `type`: `"u64"`; }, \{ `docs`: \[...]; `name`: `"depositingStartTs"`; `type`: `"u64"`; }]; `kind`: `"struct"`; }; }, \{ `name`: `"depositAccount"`; `type`: \{ `fields`: \[\{ `docs`: \[...]; `name`: `"launchpad"`; `type`: `"pubkey"`; }, \{ `docs`: \[...]; `name`: `"owner"`; `type`: `"pubkey"`; }, \{ `docs`: \[...]; `name`: `"amount"`; `type`: `"u64"`; }, \{ `docs`: \[...]; `name`: `"allocatedAmount"`; `type`: `"u64"`; }, \{ `docs`: \[...]; `name`: `"createdTs"`; `type`: `"u64"`; }, \{ `docs`: \[...]; `name`: `"claimedTs"`; `type`: `"u64"`; }, \{ `docs`: \[...]; `name`: `"buffer"`; `type`: \{ `array`: ...; }; }]; `kind`: `"struct"`; }; }, \{ `name`: `"depositIx"`; `type`: \{ `fields`: \[\{ `docs`: \[...]; `name`: `"amount"`; `type`: `"u64"`; }, \{ `docs`: \[...]; `name`: `"autoCap"`; `type`: `"bool"`; }]; `kind`: `"struct"`; }; }], `EmptyDefined`>>; `period`: `BN`; `skipInitial`: `boolean`; `startTs`: `BN`; `tickSize`: `BN`; }; }> *** ### prepareClaimAllocatedVestedInstructions() [#prepareclaimallocatedvestedinstructions] ```ts prepareClaimAllocatedVestedInstructions(__namedParameters, extParams): Promise<{ ixs: TransactionInstruction[]; streamKeypair: Keypair; }>; ``` Defined in: [launchpad/solana/client.ts:388](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L388) #### Parameters [#parameters-8] | Parameter | Type | | ------------------- | ------------------------------------------------------------------------------- | | `__namedParameters` | [`IClaimAllocatedVested`](/docs/api/launchpad/interfaces/IClaimAllocatedVested) | | `extParams` | [`IInteractExt`](/docs/api/launchpad/interfaces/IInteractExt) | #### Returns [#returns-10] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; `streamKeypair`: `Keypair`; }> *** ### prepareClaimDepositsInstructions() [#prepareclaimdepositsinstructions] ```ts prepareClaimDepositsInstructions(__namedParameters, extParams): Promise<{ ixs: TransactionInstruction[]; }>; ``` Defined in: [launchpad/solana/client.ts:353](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L353) #### Parameters [#parameters-9] | Parameter | Type | | ------------------- | ----------------------------------------------------------------- | | `__namedParameters` | [`IClaimDeposits`](/docs/api/launchpad/interfaces/IClaimDeposits) | | `extParams` | [`IInteractExt`](/docs/api/launchpad/interfaces/IInteractExt) | #### Returns [#returns-11] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; }> *** ### prepareCreateLaunchpadInstructions() [#preparecreatelaunchpadinstructions] ```ts prepareCreateLaunchpadInstructions(__namedParameters, extParams): Promise<{ ixs: TransactionInstruction[]; publicKey: PublicKey; }>; ``` Defined in: [launchpad/solana/client.ts:162](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L162) #### Parameters [#parameters-10] | Parameter | Type | | ------------------- | --------------------------------------------------------------------- | | `__namedParameters` | [`ICreateLaunchpad`](/docs/api/launchpad/interfaces/ICreateLaunchpad) | | `extParams` | [`IInteractExt`](/docs/api/launchpad/interfaces/IInteractExt) | #### Returns [#returns-12] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; `publicKey`: `PublicKey`; }> *** ### prepareDepositInstructions() [#preparedepositinstructions] ```ts prepareDepositInstructions(__namedParameters, extParams): Promise<{ ixs: TransactionInstruction[]; publicKey: PublicKey; }>; ``` Defined in: [launchpad/solana/client.ts:294](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L294) #### Parameters [#parameters-11] | Parameter | Type | | ------------------- | ------------------------------------------------------------- | | `__namedParameters` | [`IDeposit`](/docs/api/launchpad/interfaces/IDeposit) | | `extParams` | [`IInteractExt`](/docs/api/launchpad/interfaces/IInteractExt) | #### Returns [#returns-13] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; `publicKey`: `PublicKey`; }> *** ### prepareFundLaunchpadInstructions() [#preparefundlaunchpadinstructions] ```ts prepareFundLaunchpadInstructions(__namedParameters, extParams): Promise<{ ixs: TransactionInstruction[]; }>; ``` Defined in: [launchpad/solana/client.ts:248](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L248) #### Parameters [#parameters-12] | Parameter | Type | | ------------------- | ----------------------------------------------------------------- | | `__namedParameters` | [`IFundLaunchpad`](/docs/api/launchpad/interfaces/IFundLaunchpad) | | `extParams` | [`IInteractExt`](/docs/api/launchpad/interfaces/IInteractExt) | #### Returns [#returns-14] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; }> *** ### searchLaunchpads() [#searchlaunchpads] ```ts searchLaunchpads(criteria?): Promise>; period: BN; skipInitial: boolean; startTs: BN; tickSize: BN; }; }>[]>; ``` Defined in: [launchpad/solana/client.ts:142](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/client.ts#L142) #### Parameters [#parameters-13] | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `criteria` | `Partial`\<`Pick`\<[`Launchpad`](/docs/api/launchpad/type-aliases/Launchpad), keyof *typeof* [`LAUNCHPAD_BYTE_OFFSETS`](/docs/api/launchpad/launchpad/namespaces/constants/variables/LAUNCHPAD_BYTE_OFFSETS)>> | #### Returns [#returns-15] `Promise`\<`ProgramAccount`\<\{ `authority`: `PublicKey`; `baseMint`: `PublicKey`; `buffer`: `number`\[]; `bump`: `number`; `config`: \{ `depositingEndTs`: `BN`; `depositingStartTs`: `BN`; `individualDepositingCap`: `BN`; `isMemoRequired`: `boolean`; `maxDepositingCap`: `BN`; `price`: `BN`; }; `filler`: `number`\[]; `nonce`: `number`; `priceOracle`: `PublicKey`; `quoteMint`: `PublicKey`; `receiver`: `PublicKey`; `state`: \{ `buffer`: `number`\[]; `cancelledTs`: `BN`; `claimedTs`: `BN`; `createdTs`: `BN`; `totalClaimedUsers`: `BN`; `totalDepositedAmount`: `BN`; `totalDepositedUsers`: `BN`; }; `vault`: `PublicKey`; `vestingConfig`: \{ `endTs`: `BN`; `maxPercentage`: `BN`; `maxPrice`: `BN`; `minPercentage`: `BN`; `minPrice`: `BN`; `oracleType`: `DecodeEnum`\<\{ `kind`: `"enum"`; `variants`: \[\{ `name`: `"none"`; }, \{ `name`: `"test"`; }, \{ `name`: `"pyth"`; }, \{ `name`: `"switchboard"`; }]; }, `DecodedHelper`\<\[\{ `name`: `"createLaunchpadIx"`; `type`: \{ `fields`: \[..., ..., ..., ..., ...]; `kind`: `"struct"`; }; }, \{ `name`: `"depositAccount"`; `type`: \{ `fields`: \[..., ..., ..., ..., ..., ..., ...]; `kind`: `"struct"`; }; }, \{ `name`: `"depositIx"`; `type`: \{ `fields`: \[..., ...]; `kind`: `"struct"`; }; }], `EmptyDefined`>>; `period`: `BN`; `skipInitial`: `boolean`; `startTs`: `BN`; `tickSize`: `BN`; }; }>\[]> # deriveDepositPDA() URL: /docs/api/launchpad/functions/deriveDepositPDA # deriveDepositPDA() [#derivedepositpda] ```ts function deriveDepositPDA( programId, launchpad, owner): PublicKey; ``` Defined in: [launchpad/solana/lib/derive-accounts.ts:14](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/lib/derive-accounts.ts#L14) ## Parameters [#parameters] | Parameter | Type | | ----------- | ----------- | | `programId` | `PublicKey` | | `launchpad` | `PublicKey` | | `owner` | `PublicKey` | ## Returns [#returns] `PublicKey` # deriveLaunchpadPDA() URL: /docs/api/launchpad/functions/deriveLaunchpadPDA # deriveLaunchpadPDA() [#derivelaunchpadpda] ```ts function deriveLaunchpadPDA( programId, baseMint, nonce): PublicKey; ``` Defined in: [launchpad/solana/lib/derive-accounts.ts:7](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/lib/derive-accounts.ts#L7) ## Parameters [#parameters] | Parameter | Type | | ----------- | ----------- | | `programId` | `PublicKey` | | `baseMint` | `PublicKey` | | `nonce` | `number` | ## Returns [#returns] `PublicKey` # deriveVaultPDA() URL: /docs/api/launchpad/functions/deriveVaultPDA # deriveVaultPDA() [#derivevaultpda] ```ts function deriveVaultPDA(programId, launchpad): PublicKey; ``` Defined in: [launchpad/solana/lib/derive-accounts.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/lib/derive-accounts.ts#L18) ## Parameters [#parameters] | Parameter | Type | | ----------- | ----------- | | `programId` | `PublicKey` | | `launchpad` | `PublicKey` | ## Returns [#returns] `PublicKey` # index URL: /docs/api/launchpad # @streamflow/launchpad v11.3.1 [#streamflowlaunchpad-v1131] ## Namespaces [#namespaces] * [constants](/docs/api/launchpad/launchpad/namespaces/constants/index) ## Classes [#classes] * [SolanaLaunchpadClient](/docs/api/launchpad/classes/SolanaLaunchpadClient) ## Interfaces [#interfaces] * [IClaimAllocatedInstant](/docs/api/launchpad/interfaces/IClaimAllocatedInstant) * [IClaimAllocatedVested](/docs/api/launchpad/interfaces/IClaimAllocatedVested) * [IClaimDeposits](/docs/api/launchpad/interfaces/IClaimDeposits) * [ICreateLaunchpad](/docs/api/launchpad/interfaces/ICreateLaunchpad) * [IDeposit](/docs/api/launchpad/interfaces/IDeposit) * [IFundLaunchpad](/docs/api/launchpad/interfaces/IFundLaunchpad) * [IInteractExt](/docs/api/launchpad/interfaces/IInteractExt) ## Type Aliases [#type-aliases] * [DepositAccount](/docs/api/launchpad/type-aliases/DepositAccount) * [Launchpad](/docs/api/launchpad/type-aliases/Launchpad) ## Functions [#functions] * [deriveDepositPDA](/docs/api/launchpad/functions/deriveDepositPDA) * [deriveLaunchpadPDA](/docs/api/launchpad/functions/deriveLaunchpadPDA) * [deriveVaultPDA](/docs/api/launchpad/functions/deriveVaultPDA) # IClaimAllocatedInstant URL: /docs/api/launchpad/interfaces/IClaimAllocatedInstant # IClaimAllocatedInstant [#iclaimallocatedinstant] Defined in: [launchpad/solana/types.ts:70](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L70) ## Extends [#extends] * `ILaunchpad`.`IOwner`.`ITokenProgram` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ------------------------------------------- | --------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | | `baseMint?` | `Address` | `ILaunchpad.baseMint` | [launchpad/solana/types.ts:19](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L19) | | `launchpad` | `Address` | `ILaunchpad.launchpad` | [launchpad/solana/types.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L18) | | `owner?` | `Address` | `IOwner.owner` | [launchpad/solana/types.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L24) | | `quoteMint?` | `Address` | `ILaunchpad.quoteMint` | [launchpad/solana/types.ts:20](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L20) | | `tokenProgramId?` | `Address` | `ITokenProgram.tokenProgramId` | [launchpad/solana/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L28) | # IClaimAllocatedVested URL: /docs/api/launchpad/interfaces/IClaimAllocatedVested # IClaimAllocatedVested [#iclaimallocatedvested] Defined in: [launchpad/solana/types.ts:68](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L68) ## Extends [#extends] * `ILaunchpad`.`IOwner`.`ITokenProgram` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ------------------------------------------- | --------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | | `baseMint?` | `Address` | `ILaunchpad.baseMint` | [launchpad/solana/types.ts:19](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L19) | | `launchpad` | `Address` | `ILaunchpad.launchpad` | [launchpad/solana/types.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L18) | | `owner?` | `Address` | `IOwner.owner` | [launchpad/solana/types.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L24) | | `quoteMint?` | `Address` | `ILaunchpad.quoteMint` | [launchpad/solana/types.ts:20](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L20) | | `tokenProgramId?` | `Address` | `ITokenProgram.tokenProgramId` | [launchpad/solana/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L28) | # IClaimDeposits URL: /docs/api/launchpad/interfaces/IClaimDeposits # IClaimDeposits [#iclaimdeposits] Defined in: [launchpad/solana/types.ts:66](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L66) ## Extends [#extends] * `ILaunchpad`.`ITokenProgram` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ------------------------------------------- | --------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | | `baseMint?` | `Address` | `ILaunchpad.baseMint` | [launchpad/solana/types.ts:19](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L19) | | `launchpad` | `Address` | `ILaunchpad.launchpad` | [launchpad/solana/types.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L18) | | `quoteMint?` | `Address` | `ILaunchpad.quoteMint` | [launchpad/solana/types.ts:20](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L20) | | `tokenProgramId?` | `Address` | `ITokenProgram.tokenProgramId` | [launchpad/solana/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L28) | # ICreateLaunchpad URL: /docs/api/launchpad/interfaces/ICreateLaunchpad # ICreateLaunchpad [#icreatelaunchpad] Defined in: [launchpad/solana/types.ts:31](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L31) ## Extends [#extends] * `ITokenProgram` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ------------------------------------------------------------ | ---------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | | `baseMint` | `Address` | - | [launchpad/solana/types.ts:32](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L32) | | `depositingEndTs` | `number` \| `BN` | - | [launchpad/solana/types.ts:42](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L42) | | `depositingStartTs` | `number` \| `BN` | - | [launchpad/solana/types.ts:41](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L41) | | `individualDepositingCap` | `BN` | - | [launchpad/solana/types.ts:39](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L39) | | `isMemoRequired` | `boolean` | - | [launchpad/solana/types.ts:53](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L53) | | `maxDepositingCap` | `BN` | - | [launchpad/solana/types.ts:40](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L40) | | `maxPercentage` | `number` | - | [launchpad/solana/types.ts:50](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L50) | | `maxPrice` | `number` | - | [launchpad/solana/types.ts:48](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L48) | | `minPercentage` | `number` | - | [launchpad/solana/types.ts:49](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L49) | | `minPrice` | `number` | - | [launchpad/solana/types.ts:47](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L47) | | `nonce` | `number` | - | [launchpad/solana/types.ts:37](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L37) | | `oracleType?` | `OracleTypeName` | - | [launchpad/solana/types.ts:46](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L46) | | `price` | `BN` | - | [launchpad/solana/types.ts:38](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L38) | | `priceOracle?` | `Address` | - | [launchpad/solana/types.ts:35](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L35) | | `quoteMint` | `Address` | - | [launchpad/solana/types.ts:33](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L33) | | `receiver?` | `Address` | - | [launchpad/solana/types.ts:34](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L34) | | `skipInitial` | `boolean` | - | [launchpad/solana/types.ts:52](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L52) | | `tickSize` | `number` | - | [launchpad/solana/types.ts:51](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L51) | | `tokenProgramId?` | `Address` | `ITokenProgram.tokenProgramId` | [launchpad/solana/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L28) | | `vestingEndTs` | `number` \| `BN` | - | [launchpad/solana/types.ts:44](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L44) | | `vestingPeriod` | `number` \| `BN` | - | [launchpad/solana/types.ts:45](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L45) | | `vestingStartTs` | `number` \| `BN` | - | [launchpad/solana/types.ts:43](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L43) | # IDeposit URL: /docs/api/launchpad/interfaces/IDeposit # IDeposit [#ideposit] Defined in: [launchpad/solana/types.ts:60](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L60) ## Extends [#extends] * `ILaunchpad`.`IOwner`.`ITokenProgram` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ------------------------------------------- | --------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | | `amount` | `BN` | - | [launchpad/solana/types.ts:61](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L61) | | `autoCap?` | `boolean` | - | [launchpad/solana/types.ts:62](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L62) | | `baseMint?` | `Address` | `ILaunchpad.baseMint` | [launchpad/solana/types.ts:19](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L19) | | `launchpad` | `Address` | `ILaunchpad.launchpad` | [launchpad/solana/types.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L18) | | `memo?` | `string` | - | [launchpad/solana/types.ts:63](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L63) | | `owner?` | `Address` | `IOwner.owner` | [launchpad/solana/types.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L24) | | `quoteMint?` | `Address` | `ILaunchpad.quoteMint` | [launchpad/solana/types.ts:20](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L20) | | `tokenProgramId?` | `Address` | `ITokenProgram.tokenProgramId` | [launchpad/solana/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L28) | # IFundLaunchpad URL: /docs/api/launchpad/interfaces/IFundLaunchpad # IFundLaunchpad [#ifundlaunchpad] Defined in: [launchpad/solana/types.ts:56](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L56) ## Extends [#extends] * `ILaunchpad`.`ITokenProgram` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ------------------------------------------- | --------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | | `amount` | `BN` | - | [launchpad/solana/types.ts:57](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L57) | | `baseMint?` | `Address` | `ILaunchpad.baseMint` | [launchpad/solana/types.ts:19](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L19) | | `launchpad` | `Address` | `ILaunchpad.launchpad` | [launchpad/solana/types.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L18) | | `quoteMint?` | `Address` | `ILaunchpad.quoteMint` | [launchpad/solana/types.ts:20](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L20) | | `tokenProgramId?` | `Address` | `ITokenProgram.tokenProgramId` | [launchpad/solana/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L28) | # IInteractExt URL: /docs/api/launchpad/interfaces/IInteractExt # IInteractExt [#iinteractext] Defined in: [launchpad/solana/types.ts:13](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L13) ## Extends [#extends] * `ITransactionExt` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | --------------------------------------- | ------------------------------------------------------ | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | | `computeLimit?` | `number` \| `ComputeLimitEstimate` \| `"autoSimulate"` | `ITransactionExt.computeLimit` | common/dist/esm/solana/index.d.ts:1015 | | `computePrice?` | `number` \| `ComputePriceEstimate` | `ITransactionExt.computePrice` | common/dist/esm/solana/index.d.ts:1014 | | `feePayer?` | `PublicKey` | `ITransactionExt.feePayer` | common/dist/esm/solana/index.d.ts:1016 | | `invoker` | `SignerWalletAdapter` \| `Keypair` | - | [launchpad/solana/types.ts:14](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L14) | # constants URL: /docs/api/launchpad/launchpad/namespaces/constants # constants [#constants] ## Variables [#variables] * [ANCHOR\_DISCRIMINATOR\_OFFSET](/docs/api/launchpad/launchpad/namespaces/constants/variables/ANCHOR_DISCRIMINATOR_OFFSET) * [DEPOSIT\_PREFIX](/docs/api/launchpad/launchpad/namespaces/constants/variables/DEPOSIT_PREFIX) * [LAUNCHPAD\_BASE\_MINT\_OFFSET](/docs/api/launchpad/launchpad/namespaces/constants/variables/LAUNCHPAD_BASE_MINT_OFFSET) * [LAUNCHPAD\_BYTE\_OFFSETS](/docs/api/launchpad/launchpad/namespaces/constants/variables/LAUNCHPAD_BYTE_OFFSETS) * [LAUNCHPAD\_PREFIX](/docs/api/launchpad/launchpad/namespaces/constants/variables/LAUNCHPAD_PREFIX) * [LAUNCHPAD\_QUOTE\_MINT\_OFFSET](/docs/api/launchpad/launchpad/namespaces/constants/variables/LAUNCHPAD_QUOTE_MINT_OFFSET) * [PROGRAM\_ID](/docs/api/launchpad/launchpad/namespaces/constants/variables/PROGRAM_ID) * [VAULT\_PREFIX](/docs/api/launchpad/launchpad/namespaces/constants/variables/VAULT_PREFIX) # ANCHOR_DISCRIMINATOR_OFFSET URL: /docs/api/launchpad/launchpad/namespaces/constants/variables/ANCHOR_DISCRIMINATOR_OFFSET # ANCHOR\_DISCRIMINATOR\_OFFSET [#anchor_discriminator_offset] ```ts const ANCHOR_DISCRIMINATOR_OFFSET: 8 = 8; ``` Defined in: [launchpad/solana/constants.ts:7](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/constants.ts#L7) # DEPOSIT_PREFIX URL: /docs/api/launchpad/launchpad/namespaces/constants/variables/DEPOSIT_PREFIX # DEPOSIT\_PREFIX [#deposit_prefix] ```ts const DEPOSIT_PREFIX: Buffer; ``` Defined in: [launchpad/solana/constants.ts:5](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/constants.ts#L5) # LAUNCHPAD_BASE_MINT_OFFSET URL: /docs/api/launchpad/launchpad/namespaces/constants/variables/LAUNCHPAD_BASE_MINT_OFFSET # LAUNCHPAD\_BASE\_MINT\_OFFSET [#launchpad_base_mint_offset] ```ts const LAUNCHPAD_BASE_MINT_OFFSET: number; ``` Defined in: [launchpad/solana/constants.ts:9](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/constants.ts#L9) # LAUNCHPAD_BYTE_OFFSETS URL: /docs/api/launchpad/launchpad/namespaces/constants/variables/LAUNCHPAD_BYTE_OFFSETS # LAUNCHPAD\_BYTE\_OFFSETS [#launchpad_byte_offsets] ```ts const LAUNCHPAD_BYTE_OFFSETS: object; ``` Defined in: [launchpad/solana/constants.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/constants.ts#L11) ## Type Declaration [#type-declaration] | Name | Type | Default value | Defined in | | ----------------------------------------- | -------- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | `baseMint` | `number` | `LAUNCHPAD_BASE_MINT_OFFSET` | [launchpad/solana/constants.ts:12](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/constants.ts#L12) | | `quoteMint` | `number` | `LAUNCHPAD_QUOTE_MINT_OFFSET` | [launchpad/solana/constants.ts:13](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/constants.ts#L13) | # LAUNCHPAD_PREFIX URL: /docs/api/launchpad/launchpad/namespaces/constants/variables/LAUNCHPAD_PREFIX # LAUNCHPAD\_PREFIX [#launchpad_prefix] ```ts const LAUNCHPAD_PREFIX: Buffer; ``` Defined in: [launchpad/solana/constants.ts:3](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/constants.ts#L3) # LAUNCHPAD_QUOTE_MINT_OFFSET URL: /docs/api/launchpad/launchpad/namespaces/constants/variables/LAUNCHPAD_QUOTE_MINT_OFFSET # LAUNCHPAD\_QUOTE\_MINT\_OFFSET [#launchpad_quote_mint_offset] ```ts const LAUNCHPAD_QUOTE_MINT_OFFSET: number; ``` Defined in: [launchpad/solana/constants.ts:10](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/constants.ts#L10) # PROGRAM_ID URL: /docs/api/launchpad/launchpad/namespaces/constants/variables/PROGRAM_ID # PROGRAM\_ID [#program_id] ```ts const PROGRAM_ID: Record; ``` Defined in: [launchpad/solana/constants.ts:16](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/constants.ts#L16) # VAULT_PREFIX URL: /docs/api/launchpad/launchpad/namespaces/constants/variables/VAULT_PREFIX # VAULT\_PREFIX [#vault_prefix] ```ts const VAULT_PREFIX: Buffer; ``` Defined in: [launchpad/solana/constants.ts:4](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/constants.ts#L4) # DepositAccount URL: /docs/api/launchpad/type-aliases/DepositAccount # DepositAccount [#depositaccount] ```ts type DepositAccount = IdlAccounts["depositAccount"]; ``` Defined in: [launchpad/solana/types.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L11) # Launchpad URL: /docs/api/launchpad/type-aliases/Launchpad # Launchpad [#launchpad] ```ts type Launchpad = IdlAccounts["launchpad"]; ``` Defined in: [launchpad/solana/types.ts:10](https://github.com/streamflow-finance/js-sdk/blob/master/packages/launchpad/solana/types.ts#L10) # RewardEntryAccumulator URL: /docs/api/staking/classes/RewardEntryAccumulator # RewardEntryAccumulator [#rewardentryaccumulator] Defined in: [staking/solana/lib/rewards.ts:10](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L10) ## Implements [#implements] * [`RewardEntry`](/docs/api/staking/type-aliases/RewardEntry) ## Constructors [#constructors] ### Constructor [#constructor] ```ts new RewardEntryAccumulator( lastAccountedTs, claimedAmount, accountedAmount, rewardPool, stakeEntry, createdTs, lastRewardAmount, lastRewardPeriod, isSponsored, buffer): RewardEntryAccumulator; ``` Defined in: [staking/solana/lib/rewards.ts:31](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L31) #### Parameters [#parameters] | Parameter | Type | | ------------------ | ----------- | | `lastAccountedTs` | `BN` | | `claimedAmount` | `BN` | | `accountedAmount` | `BN` | | `rewardPool` | `PublicKey` | | `stakeEntry` | `PublicKey` | | `createdTs` | `BN` | | `lastRewardAmount` | `BN` | | `lastRewardPeriod` | `BN` | | `isSponsored` | `boolean` | | `buffer` | `number`\[] | #### Returns [#returns] `RewardEntryAccumulator` ## Properties [#properties] | Property | Type | Defined in | | ---------------------------------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------- | | `accountedAmount` | `BN` | [staking/solana/lib/rewards.ts:15](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L15) | | `buffer` | `number`\[] | [staking/solana/lib/rewards.ts:29](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L29) | | `claimedAmount` | `BN` | [staking/solana/lib/rewards.ts:13](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L13) | | `createdTs` | `BN` | [staking/solana/lib/rewards.ts:21](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L21) | | `isSponsored` | `boolean` | [staking/solana/lib/rewards.ts:27](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L27) | | `lastAccountedTs` | `BN` | [staking/solana/lib/rewards.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L11) | | `lastRewardAmount` | `BN` | [staking/solana/lib/rewards.ts:23](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L23) | | `lastRewardPeriod` | `BN` | [staking/solana/lib/rewards.ts:25](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L25) | | `rewardPool` | `PublicKey` | [staking/solana/lib/rewards.ts:17](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L17) | | `stakeEntry` | `PublicKey` | [staking/solana/lib/rewards.ts:19](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L19) | ## Methods [#methods] ### addAccountedAmount() [#addaccountedamount] ```ts addAccountedAmount(accountedAmount): void; ``` Defined in: [staking/solana/lib/rewards.ts:109](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L109) #### Parameters [#parameters-1] | Parameter | Type | | ----------------- | ---- | | `accountedAmount` | `BN` | #### Returns [#returns-1] `void` *** ### addClaimedAmount() [#addclaimedamount] ```ts addClaimedAmount(claimedAmount): void; ``` Defined in: [staking/solana/lib/rewards.ts:114](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L114) #### Parameters [#parameters-2] | Parameter | Type | | --------------- | ---- | | `claimedAmount` | `BN` | #### Returns [#returns-2] `void` *** ### getAccountableAmount() [#getaccountableamount] ```ts getAccountableAmount( stakedTs, accountableTs, effectiveStakedAmount, rewardAmount, rewardPeriod): BN; ``` Defined in: [staking/solana/lib/rewards.ts:71](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L71) #### Parameters [#parameters-3] | Parameter | Type | | ----------------------- | ---- | | `stakedTs` | `BN` | | `accountableTs` | `BN` | | `effectiveStakedAmount` | `BN` | | `rewardAmount` | `BN` | | `rewardPeriod` | `BN` | #### Returns [#returns-3] `BN` *** ### getClaimableAmount() [#getclaimableamount] ```ts getClaimableAmount(): BN; ``` Defined in: [staking/solana/lib/rewards.ts:93](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L93) #### Returns [#returns-4] `BN` *** ### getLastAccountedTs() [#getlastaccountedts] ```ts getLastAccountedTs( stakedTs, claimableTs, rewardPeriod): BN; ``` Defined in: [staking/solana/lib/rewards.ts:100](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L100) #### Parameters [#parameters-4] | Parameter | Type | | -------------- | ---- | | `stakedTs` | `BN` | | `claimableTs` | `BN` | | `rewardPeriod` | `BN` | #### Returns [#returns-5] `BN` *** ### fromEntry() [#fromentry] ```ts static fromEntry(entry): RewardEntryAccumulator; ``` Defined in: [staking/solana/lib/rewards.ts:55](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L55) #### Parameters [#parameters-5] | Parameter | Type | | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `entry` | \{ `accountedAmount`: `BN`; `buffer`: `number`\[]; `claimedAmount`: `BN`; `createdTs`: `BN`; `isSponsored`: `boolean`; `lastAccountedTs`: `BN`; `lastRewardAmount`: `BN`; `lastRewardPeriod`: `BN`; `rewardPool`: `PublicKey`; `stakeEntry`: `PublicKey`; } | | `entry.accountedAmount` | `BN` | | `entry.buffer` | `number`\[] | | `entry.claimedAmount` | `BN` | | `entry.createdTs` | `BN` | | `entry.isSponsored` | `boolean` | | `entry.lastAccountedTs` | `BN` | | `entry.lastRewardAmount` | `BN` | | `entry.lastRewardPeriod` | `BN` | | `entry.rewardPool` | `PublicKey` | | `entry.stakeEntry` | `PublicKey` | #### Returns [#returns-6] `RewardEntryAccumulator` # SolanaStakingClient URL: /docs/api/staking/classes/SolanaStakingClient # SolanaStakingClient [#solanastakingclient] Defined in: [staking/solana/client.ts:107](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L107) ## Constructors [#constructors] ### Constructor [#constructor] ```ts new SolanaStakingClient(__namedParameters): SolanaStakingClient; ``` Defined in: [staking/solana/client.ts:118](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L118) #### Parameters [#parameters] | Parameter | Type | | ------------------- | -------------- | | `__namedParameters` | `IInitOptions` | #### Returns [#returns] `SolanaStakingClient` ## Properties [#properties] | Property | Modifier | Type | Defined in | | ---------------------------------- | ---------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------- | | `connection` | `public` | `Connection` | [staking/solana/client.ts:108](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L108) | | `programs` | `readonly` | `Programs` | [staking/solana/client.ts:116](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L116) | ## Methods [#methods] ### claimRewards() [#claimrewards] ```ts claimRewards(data, extParams): Promise; ``` Defined in: [staking/solana/client.ts:579](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L579) #### Parameters [#parameters-1] | Parameter | Type | | ----------- | --------------------------------------------------------------------------- | | `data` | [`ClaimRewardPoolArgs`](/docs/api/staking/type-aliases/ClaimRewardPoolArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-1] `Promise`\<`ITransactionResult`> *** ### clawback() [#clawback] ```ts clawback(data, extParams): Promise; ``` Defined in: [staking/solana/client.ts:686](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L686) #### Parameters [#parameters-2] | Parameter | Type | | ----------- | ------------------------------------------------------------------------------- | | `data` | [`ClawbackRewardPoolArgs`](/docs/api/staking/interfaces/ClawbackRewardPoolArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-2] `Promise`\<`ITransactionResult`> *** ### closeRewardEntry() [#closerewardentry] ```ts closeRewardEntry(data, extParams): Promise; ``` Defined in: [staking/solana/client.ts:753](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L753) #### Parameters [#parameters-3] | Parameter | Type | | ----------- | ----------------------------------------------------------------------------- | | `data` | [`CreateRewardEntryArgs`](/docs/api/staking/interfaces/CreateRewardEntryArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-3] `Promise`\<`ITransactionResult`> *** ### closeStakeEntry() [#closestakeentry] ```ts closeStakeEntry(data, extParams): Promise<{ ixs: TransactionInstruction[]; txId: string; }>; ``` Defined in: [staking/solana/client.ts:512](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L512) #### Parameters [#parameters-4] | Parameter | Type | | ----------- | --------------------------------------------------------------------------- | | `data` | [`CloseStakeEntryArgs`](/docs/api/staking/type-aliases/CloseStakeEntryArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-4] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; `txId`: `string`; }> *** ### createFundDelegate() [#createfunddelegate] ```ts createFundDelegate(data, extParams): Promise; ``` Defined in: [staking/solana/client.ts:781](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L781) #### Parameters [#parameters-5] | Parameter | Type | | ----------- | ------------------------------------------------------------------------------- | | `data` | [`CreateFundDelegateArgs`](/docs/api/staking/interfaces/CreateFundDelegateArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-5] `Promise`\<[`CreateFundDelegateResult`](/docs/api/staking/interfaces/CreateFundDelegateResult)> *** ### createRewardEntry() [#createrewardentry] ```ts createRewardEntry(data, extParams): Promise; ``` Defined in: [staking/solana/client.ts:719](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L719) #### Parameters [#parameters-6] | Parameter | Type | | ----------- | ----------------------------------------------------------------------------- | | `data` | [`CreateRewardEntryArgs`](/docs/api/staking/interfaces/CreateRewardEntryArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-6] `Promise`\<`ITransactionResult`> *** ### createRewardPool() [#createrewardpool] ```ts createRewardPool(data, extParams): Promise; ``` Defined in: [staking/solana/client.ts:537](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L537) #### Parameters [#parameters-7] | Parameter | Type | | ----------- | --------------------------------------------------------------------------- | | `data` | [`CreateRewardPoolArgs`](/docs/api/staking/interfaces/CreateRewardPoolArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-7] `Promise`\<`CreationResult`> *** ### createStakePool() [#createstakepool] ```ts createStakePool(data, extParams): Promise; ``` Defined in: [staking/solana/client.ts:237](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L237) #### Parameters [#parameters-8] | Parameter | Type | | ----------- | ------------------------------------------------------------------------- | | `data` | [`CreateStakePoolArgs`](/docs/api/staking/interfaces/CreateStakePoolArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-8] `Promise`\<`CreationResult`> *** ### decode() [#decode] ```ts decode( programKey, accountName, accInfo): DecodedAccount; ``` Defined in: [staking/solana/client.ts:845](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L845) #### Type Parameters [#type-parameters] | Type Parameter | Default type | | -------------------------------------------------------- | ----------------------------------------------------------------------- | | `ProgramName` *extends* keyof `Programs` | keyof `Programs` | | `DecodingProgram` | `Programs`\[`ProgramName`] | | `DerivedIdl` *extends* `Idl` | `DecodingProgram` *extends* `Program`\<`IDLType`> ? `IDLType` : `never` | | `AccountName` *extends* `string` \| `number` \| `symbol` | keyof `IdlAccounts`\<`DerivedIdl`> | | `DecodedAccount` | `IdlAccounts`\<`DerivedIdl`>\[`AccountName`] | #### Parameters [#parameters-9] | Parameter | Type | | ------------- | ---------------------------- | | `programKey` | `ProgramName` | | `accountName` | `AccountName` | | `accInfo` | `Buffer`\<`ArrayBufferLike`> | #### Returns [#returns-9] `DecodedAccount` *** ### execute() [#execute] ```ts execute(ixs, extParams): Promise<{ signature: string; }>; ``` Defined in: [staking/solana/client.ts:877](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L877) #### Parameters [#parameters-10] | Parameter | Type | | ----------- | ----------------------------------------------------------- | | `ixs` | `TransactionInstruction`\[] | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-10] `Promise`\<\{ `signature`: `string`; }> *** ### fundPool() [#fundpool] ```ts fundPool(data, extParams): Promise; ``` Defined in: [staking/solana/client.ts:631](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L631) #### Parameters [#parameters-11] | Parameter | Type | | ----------- | ----------------------------------------------------------- | | `data` | [`FundPoolArgs`](/docs/api/staking/interfaces/FundPoolArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-11] `Promise`\<`ITransactionResult`> *** ### getCommitment() [#getcommitment] ```ts getCommitment(): Commitment; ``` Defined in: [staking/solana/client.ts:175](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L175) #### Returns [#returns-12] `Commitment` *** ### getCurrentProgramId() [#getcurrentprogramid] ```ts getCurrentProgramId(programKey): PublicKey; ``` Defined in: [staking/solana/client.ts:169](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L169) #### Parameters [#parameters-12] | Parameter | Type | | ------------ | ---------------- | | `programKey` | keyof `Programs` | #### Returns [#returns-13] `PublicKey` *** ### getDefaultFeeValue() [#getdefaultfeevalue] ```ts getDefaultFeeValue(): Promise<{ authority: PublicKey; buffer1: number[]; buffer2: number[]; buffer3: number[]; streamflowFee: BN; }>; ``` Defined in: [staking/solana/client.ts:225](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L225) #### Returns [#returns-14] `Promise`\<\{ `authority`: `PublicKey`; `buffer1`: `number`\[]; `buffer2`: `number`\[]; `buffer3`: `number`\[]; `streamflowFee`: `BN`; }> *** ### getDiscriminator() [#getdiscriminator] ```ts getDiscriminator(programKey, accountName): number[]; ``` Defined in: [staking/solana/client.ts:861](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L861) #### Type Parameters [#type-parameters-1] | Type Parameter | Default type | | -------------------------------------------------------- | ----------------------------------------------------------------------- | | `ProgramName` *extends* keyof `Programs` | keyof `Programs` | | `DecodingProgram` | `Programs`\[`ProgramName`] | | `DerivedIdl` *extends* `Idl` | `DecodingProgram` *extends* `Program`\<`IDLType`> ? `IDLType` : `never` | | `AccountName` *extends* `string` \| `number` \| `symbol` | keyof `IdlAccounts`\<`DerivedIdl`> | #### Parameters [#parameters-13] | Parameter | Type | | ------------- | ------------- | | `programKey` | `ProgramName` | | `accountName` | `AccountName` | #### Returns [#returns-15] `number`\[] *** ### getFee() [#getfee] ```ts getFee(target): Promise< | { buffer: number[]; streamflowFee: BN; } | { authority: PublicKey; buffer1: number[]; buffer2: number[]; buffer3: number[]; streamflowFee: BN; }>; ``` Defined in: [staking/solana/client.ts:217](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L217) #### Parameters [#parameters-14] | Parameter | Type | | --------- | ----------------------- | | `target` | `string` \| `PublicKey` | #### Returns [#returns-16] `Promise`\< \| \{ `buffer`: `number`\[]; `streamflowFee`: `BN`; } \| \{ `authority`: `PublicKey`; `buffer1`: `number`\[]; `buffer2`: `number`\[]; `buffer3`: `number`\[]; `streamflowFee`: `BN`; }> *** ### getFeeValueIfExists() [#getfeevalueifexists] ```ts getFeeValueIfExists(target): Promise<{ buffer: number[]; streamflowFee: BN; }>; ``` Defined in: [staking/solana/client.ts:231](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L231) #### Parameters [#parameters-15] | Parameter | Type | | --------- | ----------------------- | | `target` | `string` \| `PublicKey` | #### Returns [#returns-17] `Promise`\<\{ `buffer`: `number`\[]; `streamflowFee`: `BN`; }> *** ### getStakeEntry() [#getstakeentry] ```ts getStakeEntry(id): Promise<{ amount: BN; authority: PublicKey; autoUnstake: boolean; buffer: number[]; closedTs: BN; createdTs: BN; duration: BN; effectiveAmount: BN; isSponsored: boolean; nonce: number; payer: PublicKey; priorTotalEffectiveStake: BN; stakePool: PublicKey; unstakeTs: BN; }>; ``` Defined in: [staking/solana/client.ts:191](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L191) #### Parameters [#parameters-16] | Parameter | Type | | --------- | ----------------------- | | `id` | `string` \| `PublicKey` | #### Returns [#returns-18] `Promise`\<\{ `amount`: `BN`; `authority`: `PublicKey`; `autoUnstake`: `boolean`; `buffer`: `number`\[]; `closedTs`: `BN`; `createdTs`: `BN`; `duration`: `BN`; `effectiveAmount`: `BN`; `isSponsored`: `boolean`; `nonce`: `number`; `payer`: `PublicKey`; `priorTotalEffectiveStake`: `BN`; `stakePool`: `PublicKey`; `unstakeTs`: `BN`; }> *** ### getStakePool() [#getstakepool] ```ts getStakePool(id): Promise<{ authority: PublicKey; autoUnstake: boolean; buffer: number[]; bump: number; creator: PublicKey; expiryTs: BN; freezeStakeMint: boolean; isTotalStakeCapped: boolean; maxDuration: BN; maxWeight: BN; minDuration: BN; mint: PublicKey; minWeight: BN; nonce: number; permissionless: boolean; remainingTotalStake: BN; stakeMint: PublicKey; totalEffectiveStake: BN; totalStake: BN; unstakePeriod: BN; vault: PublicKey; }>; ``` Defined in: [staking/solana/client.ts:179](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L179) #### Parameters [#parameters-17] | Parameter | Type | | --------- | ----------------------- | | `id` | `string` \| `PublicKey` | #### Returns [#returns-19] `Promise`\<\{ `authority`: `PublicKey`; `autoUnstake`: `boolean`; `buffer`: `number`\[]; `bump`: `number`; `creator`: `PublicKey`; `expiryTs`: `BN`; `freezeStakeMint`: `boolean`; `isTotalStakeCapped`: `boolean`; `maxDuration`: `BN`; `maxWeight`: `BN`; `minDuration`: `BN`; `mint`: `PublicKey`; `minWeight`: `BN`; `nonce`: `number`; `permissionless`: `boolean`; `remainingTotalStake`: `BN`; `stakeMint`: `PublicKey`; `totalEffectiveStake`: `BN`; `totalStake`: `BN`; `unstakePeriod`: `BN`; `vault`: `PublicKey`; }> *** ### prepareClaimRewardsInstructions() [#prepareclaimrewardsinstructions] ```ts prepareClaimRewardsInstructions(__namedParameters, extParams): Promise<{ ixs: TransactionInstruction[]; }>; ``` Defined in: [staking/solana/client.ts:589](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L589) #### Parameters [#parameters-18] | Parameter | Type | | ------------------- | --------------------------------------------------------------------------- | | `__namedParameters` | [`ClaimRewardPoolArgs`](/docs/api/staking/type-aliases/ClaimRewardPoolArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-20] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; }> *** ### prepareClawbackInstructions() [#prepareclawbackinstructions] ```ts prepareClawbackInstructions(__namedParameters, extParams): Promise<{ ixs: TransactionInstruction[]; }>; ``` Defined in: [staking/solana/client.ts:696](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L696) #### Parameters [#parameters-19] | Parameter | Type | | ------------------- | ------------------------------------------------------------------------------- | | `__namedParameters` | [`ClawbackRewardPoolArgs`](/docs/api/staking/interfaces/ClawbackRewardPoolArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-21] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; }> *** ### prepareCloseRewardEntryInstructions() [#preparecloserewardentryinstructions] ```ts prepareCloseRewardEntryInstructions(__namedParameters, extParams): Promise<{ ixs: TransactionInstruction[]; }>; ``` Defined in: [staking/solana/client.ts:763](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L763) #### Parameters [#parameters-20] | Parameter | Type | | ------------------- | ----------------------------------------------------------------------------- | | `__namedParameters` | [`CreateRewardEntryArgs`](/docs/api/staking/interfaces/CreateRewardEntryArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-22] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; }> *** ### prepareCloseStakeEntryInstructions() [#prepareclosestakeentryinstructions] ```ts prepareCloseStakeEntryInstructions(__namedParameters, extParams): Promise<{ ixs: TransactionInstruction[]; }>; ``` Defined in: [staking/solana/client.ts:522](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L522) #### Parameters [#parameters-21] | Parameter | Type | | ------------------- | --------------------------------------------------------------------------- | | `__namedParameters` | [`CloseStakeEntryArgs`](/docs/api/staking/type-aliases/CloseStakeEntryArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-23] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; }> *** ### prepareCreateFundDelegateInstructions() [#preparecreatefunddelegateinstructions] ```ts prepareCreateFundDelegateInstructions(__namedParameters, extParams): Promise; ``` Defined in: [staking/solana/client.ts:792](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L792) #### Parameters [#parameters-22] | Parameter | Type | | ------------------- | ------------------------------------------------------------------------------- | | `__namedParameters` | [`CreateFundDelegateArgs`](/docs/api/staking/interfaces/CreateFundDelegateArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-24] `Promise`\<[`CreateFundDelegatePrepareResult`](/docs/api/staking/interfaces/CreateFundDelegatePrepareResult)> *** ### prepareCreateRewardEntryInstructions() [#preparecreaterewardentryinstructions] ```ts prepareCreateRewardEntryInstructions(__namedParameters, extParams): Promise<{ ixs: TransactionInstruction[]; }>; ``` Defined in: [staking/solana/client.ts:729](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L729) #### Parameters [#parameters-23] | Parameter | Type | | ------------------- | ----------------------------------------------------------------------------- | | `__namedParameters` | [`CreateRewardEntryArgs`](/docs/api/staking/interfaces/CreateRewardEntryArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-25] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; }> *** ### prepareCreateRewardPoolInstructions() [#preparecreaterewardpoolinstructions] ```ts prepareCreateRewardPoolInstructions(__namedParameters, extParams): Promise<{ ixs: TransactionInstruction[]; publicKey: PublicKey; }>; ``` Defined in: [staking/solana/client.ts:548](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L548) #### Parameters [#parameters-24] | Parameter | Type | | ------------------- | --------------------------------------------------------------------------- | | `__namedParameters` | [`CreateRewardPoolArgs`](/docs/api/staking/interfaces/CreateRewardPoolArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-26] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; `publicKey`: `PublicKey`; }> *** ### prepareCreateStakePoolInstructions() [#preparecreatestakepoolinstructions] ```ts prepareCreateStakePoolInstructions(__namedParameters, extParams): Promise<{ ixs: TransactionInstruction[]; publicKey: PublicKey; }>; ``` Defined in: [staking/solana/client.ts:248](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L248) #### Parameters [#parameters-25] | Parameter | Type | | ------------------- | ------------------------------------------------------------------------- | | `__namedParameters` | [`CreateStakePoolArgs`](/docs/api/staking/interfaces/CreateStakePoolArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-27] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; `publicKey`: `PublicKey`; }> *** ### prepareFundPoolInstructions() [#preparefundpoolinstructions] ```ts prepareFundPoolInstructions(__namedParameters, extParams): Promise<{ ixs: TransactionInstruction[]; }>; ``` Defined in: [staking/solana/client.ts:641](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L641) #### Parameters [#parameters-26] | Parameter | Type | | ------------------- | ----------------------------------------------------------- | | `__namedParameters` | [`FundPoolArgs`](/docs/api/staking/interfaces/FundPoolArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-28] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; }> *** ### prepareStakeAndCreateEntriesInstructions() [#preparestakeandcreateentriesinstructions] ```ts prepareStakeAndCreateEntriesInstructions(data, extParams): Promise<{ ixs: TransactionInstruction[]; }>; ``` Defined in: [staking/solana/client.ts:333](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L333) #### Parameters [#parameters-27] | Parameter | Type | | ----------- | ------------------------------------------------------------------------------------- | | `data` | [`StakeAndCreateEntriesArgs`](/docs/api/staking/interfaces/StakeAndCreateEntriesArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-29] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; }> *** ### prepareStakeInstructions() [#preparestakeinstructions] ```ts prepareStakeInstructions(__namedParameters, extParams): Promise<{ ixs: TransactionInstruction[]; }>; ``` Defined in: [staking/solana/client.ts:360](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L360) #### Parameters [#parameters-28] | Parameter | Type | | ------------------- | ----------------------------------------------------------- | | `__namedParameters` | [`StakeArgs`](/docs/api/staking/interfaces/StakeArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-30] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; }> *** ### prepareUnstakeAndClaimInstructions() [#prepareunstakeandclaiminstructions] ```ts prepareUnstakeAndClaimInstructions(data, extParams): Promise<{ ixs: TransactionInstruction[]; }>; ``` Defined in: [staking/solana/client.ts:412](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L412) #### Parameters [#parameters-29] | Parameter | Type | | ----------- | ------------------------------------------------------------------------- | | `data` | [`UnstakeAndCloseArgs`](/docs/api/staking/interfaces/UnstakeAndCloseArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-31] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; }> *** ### prepareUnstakeAndCloseInstructions() [#prepareunstakeandcloseinstructions] ```ts prepareUnstakeAndCloseInstructions(data, extParams): Promise<{ ixs: TransactionInstruction[]; }>; ``` Defined in: [staking/solana/client.ts:461](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L461) #### Parameters [#parameters-30] | Parameter | Type | | ----------- | ------------------------------------------------------------------------- | | `data` | [`UnstakeAndCloseArgs`](/docs/api/staking/interfaces/UnstakeAndCloseArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-32] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; }> *** ### prepareUnstakeInstructions() [#prepareunstakeinstructions] ```ts prepareUnstakeInstructions(__namedParameters, extParams): Promise<{ ixs: TransactionInstruction[]; }>; ``` Defined in: [staking/solana/client.ts:488](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L488) #### Parameters [#parameters-31] | Parameter | Type | | ------------------- | ----------------------------------------------------------- | | `__namedParameters` | [`UnstakeArgs`](/docs/api/staking/interfaces/UnstakeArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-33] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; }> *** ### prepareUpdateRewardPoolInstructions() [#prepareupdaterewardpoolinstructions] ```ts prepareUpdateRewardPoolInstructions(__namedParameters, extParams): Promise<{ ixs: TransactionInstruction[]; }>; ``` Defined in: [staking/solana/client.ts:826](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L826) #### Parameters [#parameters-32] | Parameter | Type | | ------------------- | --------------------------------------------------------------------------- | | `__namedParameters` | [`UpdateRewardPoolArgs`](/docs/api/staking/interfaces/UpdateRewardPoolArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-34] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; }> *** ### searchRewardEntries() [#searchrewardentries] ```ts searchRewardEntries(criteria): Promise[]>; ``` Defined in: [staking/solana/client.ts:210](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L210) #### Parameters [#parameters-33] | Parameter | Type | | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `criteria` | `Partial`\<`Pick`\<[`RewardEntry`](/docs/api/staking/type-aliases/RewardEntry), keyof *typeof* [`REWARD_ENTRY_BYTE_OFFSETS`](/docs/api/staking/staking/namespaces/constants/variables/REWARD_ENTRY_BYTE_OFFSETS)>> | #### Returns [#returns-35] `Promise`\<`ProgramAccount`\<\{ `accountedAmount`: `BN`; `buffer`: `number`\[]; `claimedAmount`: `BN`; `createdTs`: `BN`; `isSponsored`: `boolean`; `lastAccountedTs`: `BN`; `lastRewardAmount`: `BN`; `lastRewardPeriod`: `BN`; `rewardPool`: `PublicKey`; `stakeEntry`: `PublicKey`; }>\[]> *** ### searchRewardPools() [#searchrewardpools] ```ts searchRewardPools(criteria?): Promise[]>; ``` Defined in: [staking/solana/client.ts:203](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L203) #### Parameters [#parameters-34] | Parameter | Type | | ---------- | --------------------------------------------------------------------------------------------------------- | | `criteria` | `Partial`\<`Pick`\<[`RewardPool`](/docs/api/staking/type-aliases/RewardPool), `"stakePool"` \| `"mint"`>> | #### Returns [#returns-36] `Promise`\<`ProgramAccount`\<\{ `authority`: `PublicKey`; `buffer`: `number`\[]; `bump`: `number`; `claimedAmount`: `BN`; `clawedBackTs`: `BN`; `createdTs`: `BN`; `creator`: `PublicKey`; `fundedAmount`: `BN`; `lastAmountUpdateTs`: `BN`; `lastClaimPeriod`: `BN`; `lastPeriodUpdateTs`: `BN`; `lastRewardAmount`: `BN`; `lastRewardPeriod`: `BN`; `mint`: `PublicKey`; `nonce`: `number`; `permissionless`: `boolean`; `rewardAmount`: `BN`; `rewardPeriod`: `BN`; `stakePool`: `PublicKey`; `vault`: `PublicKey`; }>\[]> *** ### searchStakeEntries() [#searchstakeentries] ```ts searchStakeEntries(criteria?): Promise[]>; ``` Defined in: [staking/solana/client.ts:196](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L196) #### Parameters [#parameters-35] | Parameter | Type | | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `criteria` | `Partial`\<`Pick`\<[`StakeEntry`](/docs/api/staking/type-aliases/StakeEntry), keyof *typeof* [`STAKE_ENTRY_BYTE_OFFSETS`](/docs/api/staking/staking/namespaces/constants/variables/STAKE_ENTRY_BYTE_OFFSETS)>> | #### Returns [#returns-37] `Promise`\<`ProgramAccount`\<\{ `amount`: `BN`; `authority`: `PublicKey`; `autoUnstake`: `boolean`; `buffer`: `number`\[]; `closedTs`: `BN`; `createdTs`: `BN`; `duration`: `BN`; `effectiveAmount`: `BN`; `isSponsored`: `boolean`; `nonce`: `number`; `payer`: `PublicKey`; `priorTotalEffectiveStake`: `BN`; `stakePool`: `PublicKey`; `unstakeTs`: `BN`; }>\[]> *** ### searchStakePools() [#searchstakepools] ```ts searchStakePools(criteria?): Promise[]>; ``` Defined in: [staking/solana/client.ts:184](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L184) #### Parameters [#parameters-36] | Parameter | Type | | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `criteria` | `Partial`\<`Pick`\<[`StakePool`](/docs/api/staking/type-aliases/StakePool), keyof *typeof* [`STAKE_POOL_BYTE_OFFSETS`](/docs/api/staking/staking/namespaces/constants/variables/STAKE_POOL_BYTE_OFFSETS)>> | #### Returns [#returns-38] `Promise`\<`ProgramAccount`\<\{ `authority`: `PublicKey`; `autoUnstake`: `boolean`; `buffer`: `number`\[]; `bump`: `number`; `creator`: `PublicKey`; `expiryTs`: `BN`; `freezeStakeMint`: `boolean`; `isTotalStakeCapped`: `boolean`; `maxDuration`: `BN`; `maxWeight`: `BN`; `minDuration`: `BN`; `mint`: `PublicKey`; `minWeight`: `BN`; `nonce`: `number`; `permissionless`: `boolean`; `remainingTotalStake`: `BN`; `stakeMint`: `PublicKey`; `totalEffectiveStake`: `BN`; `totalStake`: `BN`; `unstakePeriod`: `BN`; `vault`: `PublicKey`; }>\[]> *** ### stake() [#stake] ```ts stake(data, extParams): Promise; ``` Defined in: [staking/solana/client.ts:305](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L305) #### Parameters [#parameters-37] | Parameter | Type | | ----------- | ----------------------------------------------------------- | | `data` | [`StakeArgs`](/docs/api/staking/interfaces/StakeArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-39] `Promise`\<`ITransactionResult`> *** ### stakeAndCreateEntries() [#stakeandcreateentries] ```ts stakeAndCreateEntries(data, extParams): Promise; ``` Defined in: [staking/solana/client.ts:323](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L323) Stake into a Pool and creates Reward Entries to track rewards. Resulting transaction may bee too large for execution if there are too many reward pools. #### Parameters [#parameters-38] | Parameter | Type | Description | | ----------- | ------------------------------------------------------------------------------------- | --------------------------------------------------- | | `data` | [`StakeAndCreateEntriesArgs`](/docs/api/staking/interfaces/StakeAndCreateEntriesArgs) | enriched stake params with an array of reward pools | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | parameter required for transaction execution | #### Returns [#returns-40] `Promise`\<`ITransactionResult`> *** ### unstake() [#unstake] ```ts unstake(data, extParams): Promise; ``` Defined in: [staking/solana/client.ts:384](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L384) #### Parameters [#parameters-39] | Parameter | Type | | ----------- | ----------------------------------------------------------- | | `data` | [`UnstakeArgs`](/docs/api/staking/interfaces/UnstakeArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-41] `Promise`\<`ITransactionResult`> *** ### unstakeAndClaim() [#unstakeandclaim] ```ts unstakeAndClaim(data, extParams): Promise; ``` Defined in: [staking/solana/client.ts:402](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L402) Unstake from a pool, claiming all rewards prior to that. Resulting transaction may be too large for execution if there are too many reward pools. #### Parameters [#parameters-40] | Parameter | Type | Description | | ----------- | ------------------------------------------------------------------------- | -------------------------------------------- | | `data` | [`UnstakeAndCloseArgs`](/docs/api/staking/interfaces/UnstakeAndCloseArgs) | enriched unstake args with reward pools | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | parameter required for transaction execution | #### Returns [#returns-42] `Promise`\<`ITransactionResult`> *** ### unstakeAndClose() [#unstakeandclose] ```ts unstakeAndClose(data, extParams): Promise; ``` Defined in: [staking/solana/client.ts:451](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L451) Unstake from a pool, closing all related stake and reward entries. REWARDS WON'T be claimed - use this call only if user can't unstake with rewards claims, i.e. when reward pool is drained. Resulting transaction may be too large for execution if there are too many reward pools. #### Parameters [#parameters-41] | Parameter | Type | Description | | ----------- | ------------------------------------------------------------------------- | -------------------------------------------- | | `data` | [`UnstakeAndCloseArgs`](/docs/api/staking/interfaces/UnstakeAndCloseArgs) | enriched unstake args with reward pools | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | parameter required for transaction execution | #### Returns [#returns-43] `Promise`\<`ITransactionResult`> *** ### updateRewardPool() [#updaterewardpool] ```ts updateRewardPool(data, extParams): Promise<{ ixs: TransactionInstruction[]; txId: string; }>; ``` Defined in: [staking/solana/client.ts:816](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/client.ts#L816) #### Parameters [#parameters-42] | Parameter | Type | | ----------- | --------------------------------------------------------------------------- | | `data` | [`UpdateRewardPoolArgs`](/docs/api/staking/interfaces/UpdateRewardPoolArgs) | | `extParams` | [`IInteractExt`](/docs/api/staking/interfaces/IInteractExt) | #### Returns [#returns-44] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; `txId`: `string`; }> # calcRewards() URL: /docs/api/staking/functions/calcRewards # calcRewards() [#calcrewards] ```ts function calcRewards( rewardEntryAccount, stakeEntryAccount, rewardPoolAccount): BN; ``` Defined in: [staking/solana/lib/rewards.ts:137](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L137) ## Parameters [#parameters] | Parameter | Type | | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `rewardEntryAccount` | `ProgramAccount`\<\{ `accountedAmount`: `BN`; `buffer`: `number`\[]; `claimedAmount`: `BN`; `createdTs`: `BN`; `isSponsored`: `boolean`; `lastAccountedTs`: `BN`; `lastRewardAmount`: `BN`; `lastRewardPeriod`: `BN`; `rewardPool`: `PublicKey`; `stakeEntry`: `PublicKey`; }> | | `stakeEntryAccount` | `ProgramAccount`\<\{ `amount`: `BN`; `authority`: `PublicKey`; `autoUnstake`: `boolean`; `buffer`: `number`\[]; `closedTs`: `BN`; `createdTs`: `BN`; `duration`: `BN`; `effectiveAmount`: `BN`; `isSponsored`: `boolean`; `nonce`: `number`; `payer`: `PublicKey`; `priorTotalEffectiveStake`: `BN`; `stakePool`: `PublicKey`; `unstakeTs`: `BN`; }> | | `rewardPoolAccount` | `ProgramAccount`\<\{ `authority`: `PublicKey`; `buffer`: `number`\[]; `bump`: `number`; `claimedAmount`: `BN`; `clawedBackTs`: `BN`; `createdTs`: `BN`; `creator`: `PublicKey`; `fundedAmount`: `BN`; `lastAmountUpdateTs`: `BN`; `lastClaimPeriod`: `BN`; `lastPeriodUpdateTs`: `BN`; `lastRewardAmount`: `BN`; `lastRewardPeriod`: `BN`; `mint`: `PublicKey`; `nonce`: `number`; `permissionless`: `boolean`; `rewardAmount`: `BN`; `rewardPeriod`: `BN`; `stakePool`: `PublicKey`; `vault`: `PublicKey`; }> | ## Returns [#returns] `BN` # calculateAmountWithTransferFees() URL: /docs/api/staking/functions/calculateAmountWithTransferFees # calculateAmountWithTransferFees() [#calculateamountwithtransferfees] ```ts function calculateAmountWithTransferFees( connection, transferFeeConfig, transferAmount): Promise<{ feeCharged: bigint; transferAmount: bigint; }>; ``` Defined in: [staking/solana/lib/fee-amounts.ts:30](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/fee-amounts.ts#L30) ## Parameters [#parameters] | Parameter | Type | | ------------------- | ------------------- | | `connection` | `Connection` | | `transferFeeConfig` | `TransferFeeConfig` | | `transferAmount` | `bigint` | ## Returns [#returns] `Promise`\<\{ `feeCharged`: `bigint`; `transferAmount`: `bigint`; }> # calculateDecimalsShift() URL: /docs/api/staking/functions/calculateDecimalsShift # calculateDecimalsShift() [#calculatedecimalsshift] ```ts function calculateDecimalsShift(maxWeight, maxShift?): number; ``` Defined in: [staking/solana/lib/fee-amounts.ts:15](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/fee-amounts.ts#L15) ## Parameters [#parameters] | Parameter | Type | Default value | | ----------- | -------- | ------------- | | `maxWeight` | `bigint` | `undefined` | | `maxShift` | `number` | `999` | ## Returns [#returns] `number` # calculateFeeAmount() URL: /docs/api/staking/functions/calculateFeeAmount # calculateFeeAmount() [#calculatefeeamount] ```ts function calculateFeeAmount(amount, fee?): BN; ``` Defined in: [staking/solana/lib/fee-amounts.ts:8](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/fee-amounts.ts#L8) ## Parameters [#parameters] | Parameter | Type | Default value | | --------- | ---- | ---------------- | | `amount` | `BN` | `undefined` | | `fee` | `BN` | `DEFAULT_FEE_BN` | ## Returns [#returns] `BN` # calculateRewardAmountFromRate() URL: /docs/api/staking/functions/calculateRewardAmountFromRate # calculateRewardAmountFromRate() [#calculaterewardamountfromrate] ```ts function calculateRewardAmountFromRate( rewardRate, stakeTokenDecimals, rewardTokenDecimals): BN; ``` Defined in: [staking/solana/lib/rewards.ts:255](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L255) ## Parameters [#parameters] | Parameter | Type | | --------------------- | -------- | | `rewardRate` | `number` | | `stakeTokenDecimals` | `number` | | `rewardTokenDecimals` | `number` | ## Returns [#returns] `BN` # calculateRewardAmountFromValue() URL: /docs/api/staking/functions/calculateRewardAmountFromValue # calculateRewardAmountFromValue() [#calculaterewardamountfromvalue] ```ts function calculateRewardAmountFromValue(rewardTokenValue, stakeTokenDecimals): BN; ``` Defined in: [staking/solana/lib/rewards.ts:243](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L243) ## Parameters [#parameters] | Parameter | Type | | -------------------- | -------- | | `rewardTokenValue` | `BN` | | `stakeTokenDecimals` | `number` | ## Returns [#returns] `BN` # calculateRewardRateFromAmount() URL: /docs/api/staking/functions/calculateRewardRateFromAmount # calculateRewardRateFromAmount() [#calculaterewardratefromamount] ```ts function calculateRewardRateFromAmount( rewardAmount, stakeTokenDecimals, rewardTokenDecimals): number; ``` Defined in: [staking/solana/lib/rewards.ts:234](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/rewards.ts#L234) ## Parameters [#parameters] | Parameter | Type | | --------------------- | -------- | | `rewardAmount` | `BN` | | `stakeTokenDecimals` | `number` | | `rewardTokenDecimals` | `number` | ## Returns [#returns] `number` # calculateStakeWeight() URL: /docs/api/staking/functions/calculateStakeWeight # calculateStakeWeight() [#calculatestakeweight] ```ts function calculateStakeWeight( minDuration, maxDuration, maxWeight, duration): BN; ``` Defined in: [staking/solana/lib/stake-weight.ts:5](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/stake-weight.ts#L5) ## Parameters [#parameters] | Parameter | Type | | ------------- | ---- | | `minDuration` | `BN` | | `maxDuration` | `BN` | | `maxWeight` | `BN` | | `duration` | `BN` | ## Returns [#returns] `BN` # deriveConfigPDA() URL: /docs/api/staking/functions/deriveConfigPDA # deriveConfigPDA() [#deriveconfigpda] ```ts function deriveConfigPDA(programId): PublicKey; ``` Defined in: [staking/solana/lib/derive-accounts.ts:73](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/derive-accounts.ts#L73) ## Parameters [#parameters] | Parameter | Type | | ----------- | ----------- | | `programId` | `PublicKey` | ## Returns [#returns] `PublicKey` # deriveFeeValuePDA() URL: /docs/api/staking/functions/deriveFeeValuePDA # deriveFeeValuePDA() [#derivefeevaluepda] ```ts function deriveFeeValuePDA(programId, target): PublicKey; ``` Defined in: [staking/solana/lib/derive-accounts.ts:77](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/derive-accounts.ts#L77) ## Parameters [#parameters] | Parameter | Type | | ----------- | ----------- | | `programId` | `PublicKey` | | `target` | `PublicKey` | ## Returns [#returns] `PublicKey` # deriveFundDelegatePDA() URL: /docs/api/staking/functions/deriveFundDelegatePDA # deriveFundDelegatePDA() [#derivefunddelegatepda] ```ts function deriveFundDelegatePDA(programId, rewardPool): PublicKey; ``` Defined in: [staking/solana/lib/derive-accounts.ts:81](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/derive-accounts.ts#L81) ## Parameters [#parameters] | Parameter | Type | | ------------ | ----------- | | `programId` | `PublicKey` | | `rewardPool` | `PublicKey` | ## Returns [#returns] `PublicKey` # deriveRewardEntryPDA() URL: /docs/api/staking/functions/deriveRewardEntryPDA # deriveRewardEntryPDA() [#deriverewardentrypda] ```ts function deriveRewardEntryPDA( programId, rewardPool, stakeEntry): PublicKey; ``` Defined in: [staking/solana/lib/derive-accounts.ts:66](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/derive-accounts.ts#L66) ## Parameters [#parameters] | Parameter | Type | | ------------ | ----------- | | `programId` | `PublicKey` | | `rewardPool` | `PublicKey` | | `stakeEntry` | `PublicKey` | ## Returns [#returns] `PublicKey` # deriveRewardPoolPDA() URL: /docs/api/staking/functions/deriveRewardPoolPDA # deriveRewardPoolPDA() [#deriverewardpoolpda] ```ts function deriveRewardPoolPDA( programId, stakePool, mint, nonce): PublicKey; ``` Defined in: [staking/solana/lib/derive-accounts.ts:50](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/derive-accounts.ts#L50) ## Parameters [#parameters] | Parameter | Type | | ----------- | ----------- | | `programId` | `PublicKey` | | `stakePool` | `PublicKey` | | `mint` | `PublicKey` | | `nonce` | `number` | ## Returns [#returns] `PublicKey` # deriveRewardVaultPDA() URL: /docs/api/staking/functions/deriveRewardVaultPDA # deriveRewardVaultPDA() [#deriverewardvaultpda] ```ts function deriveRewardVaultPDA(programId, rewardPool): PublicKey; ``` Defined in: [staking/solana/lib/derive-accounts.ts:62](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/derive-accounts.ts#L62) ## Parameters [#parameters] | Parameter | Type | | ------------ | ----------- | | `programId` | `PublicKey` | | `rewardPool` | `PublicKey` | ## Returns [#returns] `PublicKey` # deriveStakeEntryPDA() URL: /docs/api/staking/functions/deriveStakeEntryPDA # deriveStakeEntryPDA() [#derivestakeentrypda] ```ts function deriveStakeEntryPDA( programId, stakePool, authority, nonce): PublicKey; ``` Defined in: [staking/solana/lib/derive-accounts.ts:38](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/derive-accounts.ts#L38) ## Parameters [#parameters] | Parameter | Type | | ----------- | ----------- | | `programId` | `PublicKey` | | `stakePool` | `PublicKey` | | `authority` | `PublicKey` | | `nonce` | `number` | ## Returns [#returns] `PublicKey` # deriveStakeMintPDA() URL: /docs/api/staking/functions/deriveStakeMintPDA # deriveStakeMintPDA() [#derivestakemintpda] ```ts function deriveStakeMintPDA(programId, stakePool): PublicKey; ``` Defined in: [staking/solana/lib/derive-accounts.ts:34](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/derive-accounts.ts#L34) ## Parameters [#parameters] | Parameter | Type | | ----------- | ----------- | | `programId` | `PublicKey` | | `stakePool` | `PublicKey` | ## Returns [#returns] `PublicKey` # deriveStakePoolPDA() URL: /docs/api/staking/functions/deriveStakePoolPDA # deriveStakePoolPDA() [#derivestakepoolpda] ```ts function deriveStakePoolPDA( programId, mint, authority, nonce): PublicKey; ``` Defined in: [staking/solana/lib/derive-accounts.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/derive-accounts.ts#L18) ## Parameters [#parameters] | Parameter | Type | | ----------- | ----------- | | `programId` | `PublicKey` | | `mint` | `PublicKey` | | `authority` | `PublicKey` | | `nonce` | `number` | ## Returns [#returns] `PublicKey` # deriveStakeVaultPDA() URL: /docs/api/staking/functions/deriveStakeVaultPDA # deriveStakeVaultPDA() [#derivestakevaultpda] ```ts function deriveStakeVaultPDA(programId, stakePool): PublicKey; ``` Defined in: [staking/solana/lib/derive-accounts.ts:30](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/lib/derive-accounts.ts#L30) ## Parameters [#parameters] | Parameter | Type | | ----------- | ----------- | | `programId` | `PublicKey` | | `stakePool` | `PublicKey` | ## Returns [#returns] `PublicKey` # index URL: /docs/api/staking # @streamflow/staking v11.3.1 [#streamflowstaking-v1131] ## Namespaces [#namespaces] * [constants](/docs/api/staking/staking/namespaces/constants/index) ## Classes [#classes] * [RewardEntryAccumulator](/docs/api/staking/classes/RewardEntryAccumulator) * [SolanaStakingClient](/docs/api/staking/classes/SolanaStakingClient) ## Interfaces [#interfaces] * [BaseStakePoolArgs](/docs/api/staking/interfaces/BaseStakePoolArgs) * [ClawbackRewardPoolArgs](/docs/api/staking/interfaces/ClawbackRewardPoolArgs) * [CreateFundDelegateArgs](/docs/api/staking/interfaces/CreateFundDelegateArgs) * [CreateFundDelegatePrepareResult](/docs/api/staking/interfaces/CreateFundDelegatePrepareResult) * [CreateFundDelegateResult](/docs/api/staking/interfaces/CreateFundDelegateResult) * [CreateRewardEntryArgs](/docs/api/staking/interfaces/CreateRewardEntryArgs) * [CreateRewardPoolArgs](/docs/api/staking/interfaces/CreateRewardPoolArgs) * [CreateStakePoolArgs](/docs/api/staking/interfaces/CreateStakePoolArgs) * [FundPoolArgs](/docs/api/staking/interfaces/FundPoolArgs) * [IInteractExt](/docs/api/staking/interfaces/IInteractExt) * [StakeAndCreateEntriesArgs](/docs/api/staking/interfaces/StakeAndCreateEntriesArgs) * [StakeArgs](/docs/api/staking/interfaces/StakeArgs) * [UnstakeAndCloseArgs](/docs/api/staking/interfaces/UnstakeAndCloseArgs) * [UnstakeArgs](/docs/api/staking/interfaces/UnstakeArgs) * [UpdateRewardPoolArgs](/docs/api/staking/interfaces/UpdateRewardPoolArgs) ## Type Aliases [#type-aliases] * [ClaimRewardPoolArgs](/docs/api/staking/type-aliases/ClaimRewardPoolArgs) * [CloseRewardEntryArgs](/docs/api/staking/type-aliases/CloseRewardEntryArgs) * [CloseStakeEntryArgs](/docs/api/staking/type-aliases/CloseStakeEntryArgs) * [DefaultFeeValueConfig](/docs/api/staking/type-aliases/DefaultFeeValueConfig) * [FeeValue](/docs/api/staking/type-aliases/FeeValue) * [RewardEntry](/docs/api/staking/type-aliases/RewardEntry) * [RewardPool](/docs/api/staking/type-aliases/RewardPool) * [StakeEntry](/docs/api/staking/type-aliases/StakeEntry) * [StakePool](/docs/api/staking/type-aliases/StakePool) * [UnstakeAndClaimArgs](/docs/api/staking/type-aliases/UnstakeAndClaimArgs) ## Functions [#functions] * [calcRewards](/docs/api/staking/functions/calcRewards) * [calculateAmountWithTransferFees](/docs/api/staking/functions/calculateAmountWithTransferFees) * [calculateDecimalsShift](/docs/api/staking/functions/calculateDecimalsShift) * [calculateFeeAmount](/docs/api/staking/functions/calculateFeeAmount) * [calculateRewardAmountFromRate](/docs/api/staking/functions/calculateRewardAmountFromRate) * [calculateRewardAmountFromValue](/docs/api/staking/functions/calculateRewardAmountFromValue) * [calculateRewardRateFromAmount](/docs/api/staking/functions/calculateRewardRateFromAmount) * [calculateStakeWeight](/docs/api/staking/functions/calculateStakeWeight) * [deriveConfigPDA](/docs/api/staking/functions/deriveConfigPDA) * [deriveFeeValuePDA](/docs/api/staking/functions/deriveFeeValuePDA) * [deriveFundDelegatePDA](/docs/api/staking/functions/deriveFundDelegatePDA) * [deriveRewardEntryPDA](/docs/api/staking/functions/deriveRewardEntryPDA) * [deriveRewardPoolPDA](/docs/api/staking/functions/deriveRewardPoolPDA) * [deriveRewardVaultPDA](/docs/api/staking/functions/deriveRewardVaultPDA) * [deriveStakeEntryPDA](/docs/api/staking/functions/deriveStakeEntryPDA) * [deriveStakeMintPDA](/docs/api/staking/functions/deriveStakeMintPDA) * [deriveStakePoolPDA](/docs/api/staking/functions/deriveStakePoolPDA) * [deriveStakeVaultPDA](/docs/api/staking/functions/deriveStakeVaultPDA) # BaseStakePoolArgs URL: /docs/api/staking/interfaces/BaseStakePoolArgs # BaseStakePoolArgs [#basestakepoolargs] Defined in: [staking/solana/types.ts:22](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L22) ## Extended by [#extended-by] * [`FundPoolArgs`](/docs/api/staking/interfaces/FundPoolArgs) * [`ClawbackRewardPoolArgs`](/docs/api/staking/interfaces/ClawbackRewardPoolArgs) * [`CreateRewardEntryArgs`](/docs/api/staking/interfaces/CreateRewardEntryArgs) * [`CreateRewardPoolArgs`](/docs/api/staking/interfaces/CreateRewardPoolArgs) ## Properties [#properties] | Property | Type | Defined in | | ---------------------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------- | | `stakePool` | `Address` | [staking/solana/types.ts:23](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L23) | | `stakePoolMint` | `Address` | [staking/solana/types.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L24) | # ClawbackRewardPoolArgs URL: /docs/api/staking/interfaces/ClawbackRewardPoolArgs # ClawbackRewardPoolArgs [#clawbackrewardpoolargs] Defined in: [staking/solana/types.ts:82](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L82) ## Extends [#extends] * [`BaseStakePoolArgs`](/docs/api/staking/interfaces/BaseStakePoolArgs).`TokenProgram` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ------------------------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | `nonce` | `number` | - | [staking/solana/types.ts:83](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L83) | | `rewardMint` | `Address` | - | [staking/solana/types.ts:84](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L84) | | `stakePool` | `Address` | [`BaseStakePoolArgs`](/docs/api/staking/interfaces/BaseStakePoolArgs).[`stakePool`](/docs/api/staking/interfaces/BaseStakePoolArgs#stakepool) | [staking/solana/types.ts:23](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L23) | | `stakePoolMint` | `Address` | [`BaseStakePoolArgs`](/docs/api/staking/interfaces/BaseStakePoolArgs).[`stakePoolMint`](/docs/api/staking/interfaces/BaseStakePoolArgs#stakepoolmint) | [staking/solana/types.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L24) | | `tokenProgramId?` | `Address` | `TokenProgram.tokenProgramId` | [staking/solana/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L28) | # CreateFundDelegateArgs URL: /docs/api/staking/interfaces/CreateFundDelegateArgs # CreateFundDelegateArgs [#createfunddelegateargs] Defined in: [staking/solana/types.ts:114](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L114) ## Extends [#extends] * `TokenProgram` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ------------------------------------------- | --------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | `expiryTs` | `BN` | - | [staking/solana/types.ts:118](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L118) | | `period` | `BN` | - | [staking/solana/types.ts:117](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L117) | | `rewardPool` | `Address` | - | [staking/solana/types.ts:115](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L115) | | `startTs` | `BN` | - | [staking/solana/types.ts:116](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L116) | | `tokenProgramId?` | `Address` | `TokenProgram.tokenProgramId` | [staking/solana/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L28) | # CreateFundDelegatePrepareResult URL: /docs/api/staking/interfaces/CreateFundDelegatePrepareResult # CreateFundDelegatePrepareResult [#createfunddelegateprepareresult] Defined in: [staking/solana/types.ts:121](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L121) ## Extends [#extends] * `IPrepareResult` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | -------------------------------------- | --------------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | `ixs` | `TransactionInstruction`\[] | `IPrepareResult.ixs` | common/dist/esm/solana/index.d.ts:1073 | | `tokenAccount` | `Address` | - | [staking/solana/types.ts:122](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L122) | # CreateFundDelegateResult URL: /docs/api/staking/interfaces/CreateFundDelegateResult # CreateFundDelegateResult [#createfunddelegateresult] Defined in: [staking/solana/types.ts:125](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L125) ## Extends [#extends] * `ITransactionResult` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | -------------------------------------- | --------------------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | `ixs` | `TransactionInstruction`\[] | `ITransactionResult.ixs` | common/dist/esm/solana/index.d.ts:1073 | | `tokenAccount` | `Address` | - | [staking/solana/types.ts:126](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L126) | | `txId` | `string` | `ITransactionResult.txId` | common/dist/esm/solana/index.d.ts:1076 | # CreateRewardEntryArgs URL: /docs/api/staking/interfaces/CreateRewardEntryArgs # CreateRewardEntryArgs [#createrewardentryargs] Defined in: [staking/solana/types.ts:87](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L87) ## Extends [#extends] * [`BaseStakePoolArgs`](/docs/api/staking/interfaces/BaseStakePoolArgs).`TokenProgram`.`RewardPoolProgram` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | -------------------------------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | `depositNonce` | `number` | - | [staking/solana/types.ts:88](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L88) | | `rewardMint` | `Address` | - | [staking/solana/types.ts:90](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L90) | | `rewardPoolNonce` | `number` | - | [staking/solana/types.ts:89](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L89) | | `rewardPoolType?` | `"fixed"` \| `"dynamic"` | `RewardPoolProgram.rewardPoolType` | [staking/solana/types.ts:32](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L32) | | `stakePool` | `Address` | [`BaseStakePoolArgs`](/docs/api/staking/interfaces/BaseStakePoolArgs).[`stakePool`](/docs/api/staking/interfaces/BaseStakePoolArgs#stakepool) | [staking/solana/types.ts:23](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L23) | | `stakePoolMint` | `Address` | [`BaseStakePoolArgs`](/docs/api/staking/interfaces/BaseStakePoolArgs).[`stakePoolMint`](/docs/api/staking/interfaces/BaseStakePoolArgs#stakepoolmint) | [staking/solana/types.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L24) | | `tokenProgramId?` | `Address` | `TokenProgram.tokenProgramId` | [staking/solana/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L28) | # CreateRewardPoolArgs URL: /docs/api/staking/interfaces/CreateRewardPoolArgs # CreateRewardPoolArgs [#createrewardpoolargs] Defined in: [staking/solana/types.ts:93](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L93) ## Extends [#extends] * [`BaseStakePoolArgs`](/docs/api/staking/interfaces/BaseStakePoolArgs).`TokenProgram` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | -------------------------------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | `lastClaimPeriodOpt` | `BN` | - | [staking/solana/types.ts:100](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L100) | | `nonce` | `number` | - | [staking/solana/types.ts:96](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L96) | | `permissionless` | `boolean` | - | [staking/solana/types.ts:99](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L99) | | `rewardAmount` | `BN` | - | [staking/solana/types.ts:97](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L97) | | `rewardMint` | `Address` | - | [staking/solana/types.ts:95](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L95) | | `rewardPeriod` | `BN` | - | [staking/solana/types.ts:98](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L98) | | `stakePool` | `Address` | [`BaseStakePoolArgs`](/docs/api/staking/interfaces/BaseStakePoolArgs).[`stakePool`](/docs/api/staking/interfaces/BaseStakePoolArgs#stakepool) | [staking/solana/types.ts:23](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L23) | | `stakePoolMint` | `Address` | [`BaseStakePoolArgs`](/docs/api/staking/interfaces/BaseStakePoolArgs).[`stakePoolMint`](/docs/api/staking/interfaces/BaseStakePoolArgs#stakepoolmint) | [staking/solana/types.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L24) | | `stakePoolNonce` | `number` | - | [staking/solana/types.ts:94](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L94) | | `tokenProgramId?` | `Address` | `TokenProgram.tokenProgramId` | [staking/solana/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L28) | # CreateStakePoolArgs URL: /docs/api/staking/interfaces/CreateStakePoolArgs # CreateStakePoolArgs [#createstakepoolargs] Defined in: [staking/solana/types.ts:129](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L129) ## Extends [#extends] * `TokenProgram` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ------------------------------------------------------------- | --------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | `authority?` | `Keypair` | - | [staking/solana/types.ts:141](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L141) | | `autoUnstake?` | `boolean` | - | [staking/solana/types.ts:140](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L140) | | `expiryTs?` | `BN` | - | [staking/solana/types.ts:139](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L139) | | `freezeStakeMint?` | `boolean` | - | [staking/solana/types.ts:136](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L136) | | `maxDuration` | `BN` | - | [staking/solana/types.ts:134](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L134) | | `maxTotalStakeCumulative?` | `BN` | - | [staking/solana/types.ts:138](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L138) | | `maxWeight` | `BN` | - | [staking/solana/types.ts:132](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L132) | | `minDuration` | `BN` | - | [staking/solana/types.ts:133](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L133) | | `mint` | `Address` | - | [staking/solana/types.ts:130](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L130) | | `nonce` | `number` | - | [staking/solana/types.ts:131](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L131) | | `permissionless?` | `boolean` | - | [staking/solana/types.ts:135](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L135) | | `tokenProgramId?` | `Address` | `TokenProgram.tokenProgramId` | [staking/solana/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L28) | | `unstakePeriod?` | `BN` | - | [staking/solana/types.ts:137](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L137) | # FundPoolArgs URL: /docs/api/staking/interfaces/FundPoolArgs # FundPoolArgs [#fundpoolargs] Defined in: [staking/solana/types.ts:75](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L75) ## Extends [#extends] * [`BaseStakePoolArgs`](/docs/api/staking/interfaces/BaseStakePoolArgs).`TokenProgram`.`RewardPoolProgram` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ------------------------------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | `amount` | `BN` | - | [staking/solana/types.ts:76](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L76) | | `feeValue` | `Address` | - | [staking/solana/types.ts:79](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L79) | | `nonce` | `number` | - | [staking/solana/types.ts:77](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L77) | | `rewardMint` | `Address` | - | [staking/solana/types.ts:78](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L78) | | `rewardPoolType?` | `"fixed"` \| `"dynamic"` | `RewardPoolProgram.rewardPoolType` | [staking/solana/types.ts:32](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L32) | | `stakePool` | `Address` | [`BaseStakePoolArgs`](/docs/api/staking/interfaces/BaseStakePoolArgs).[`stakePool`](/docs/api/staking/interfaces/BaseStakePoolArgs#stakepool) | [staking/solana/types.ts:23](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L23) | | `stakePoolMint` | `Address` | [`BaseStakePoolArgs`](/docs/api/staking/interfaces/BaseStakePoolArgs).[`stakePoolMint`](/docs/api/staking/interfaces/BaseStakePoolArgs#stakepoolmint) | [staking/solana/types.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L24) | | `tokenProgramId?` | `Address` | `TokenProgram.tokenProgramId` | [staking/solana/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L28) | # IInteractExt URL: /docs/api/staking/interfaces/IInteractExt # IInteractExt [#iinteractext] Defined in: [staking/solana/types.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L18) ## Extends [#extends] * `ITransactionExt` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | --------------------------------------- | ------------------------------------------------------ | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------- | | `computeLimit?` | `number` \| `ComputeLimitEstimate` \| `"autoSimulate"` | `ITransactionExt.computeLimit` | common/dist/esm/solana/index.d.ts:1015 | | `computePrice?` | `number` \| `ComputePriceEstimate` | `ITransactionExt.computePrice` | common/dist/esm/solana/index.d.ts:1014 | | `feePayer?` | `PublicKey` | `ITransactionExt.feePayer` | common/dist/esm/solana/index.d.ts:1016 | | `invoker` | `SignerWalletAdapter` \| `Keypair` | - | [staking/solana/types.ts:19](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L19) | # StakeAndCreateEntriesArgs URL: /docs/api/staking/interfaces/StakeAndCreateEntriesArgs # StakeAndCreateEntriesArgs [#stakeandcreateentriesargs] Defined in: [staking/solana/types.ts:59](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L59) ## Extends [#extends] * [`StakeArgs`](/docs/api/staking/interfaces/StakeArgs) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ------------------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | `amount` | `BN` | [`StakeArgs`](/docs/api/staking/interfaces/StakeArgs).[`amount`](/docs/api/staking/interfaces/StakeArgs#amount) | [staking/solana/types.ts:40](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L40) | | `authority?` | `Address` | [`StakeArgs`](/docs/api/staking/interfaces/StakeArgs).[`authority`](/docs/api/staking/interfaces/StakeArgs#authority) | [staking/solana/types.ts:43](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L43) | | `duration` | `BN` | [`StakeArgs`](/docs/api/staking/interfaces/StakeArgs).[`duration`](/docs/api/staking/interfaces/StakeArgs#duration) | [staking/solana/types.ts:41](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L41) | | `nonce` | `number` | [`StakeArgs`](/docs/api/staking/interfaces/StakeArgs).[`nonce`](/docs/api/staking/interfaces/StakeArgs#nonce) | [staking/solana/types.ts:36](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L36) | | `payer?` | `Keypair` | [`StakeArgs`](/docs/api/staking/interfaces/StakeArgs).[`payer`](/docs/api/staking/interfaces/StakeArgs#payer) | [staking/solana/types.ts:42](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L42) | | `rewardPools` | `RewardPoolArgs`\[] | - | [staking/solana/types.ts:60](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L60) | | `stakePool` | `Address` | [`StakeArgs`](/docs/api/staking/interfaces/StakeArgs).[`stakePool`](/docs/api/staking/interfaces/StakeArgs#stakepool) | [staking/solana/types.ts:23](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L23) | | `stakePoolMint` | `Address` | [`StakeArgs`](/docs/api/staking/interfaces/StakeArgs).[`stakePoolMint`](/docs/api/staking/interfaces/StakeArgs#stakepoolmint) | [staking/solana/types.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L24) | | `tokenProgramId?` | `Address` | [`StakeArgs`](/docs/api/staking/interfaces/StakeArgs).[`tokenProgramId`](/docs/api/staking/interfaces/StakeArgs#tokenprogramid) | [staking/solana/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L28) | # StakeArgs URL: /docs/api/staking/interfaces/StakeArgs # StakeArgs [#stakeargs] Defined in: [staking/solana/types.ts:39](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L39) ## Extends [#extends] * `StakeBaseArgs` ## Extended by [#extended-by] * [`StakeAndCreateEntriesArgs`](/docs/api/staking/interfaces/StakeAndCreateEntriesArgs) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ------------------------------------------- | --------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------- | | `amount` | `BN` | - | [staking/solana/types.ts:40](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L40) | | `authority?` | `Address` | - | [staking/solana/types.ts:43](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L43) | | `duration` | `BN` | - | [staking/solana/types.ts:41](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L41) | | `nonce` | `number` | `StakeBaseArgs.nonce` | [staking/solana/types.ts:36](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L36) | | `payer?` | `Keypair` | - | [staking/solana/types.ts:42](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L42) | | `stakePool` | `Address` | `StakeBaseArgs.stakePool` | [staking/solana/types.ts:23](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L23) | | `stakePoolMint` | `Address` | `StakeBaseArgs.stakePoolMint` | [staking/solana/types.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L24) | | `tokenProgramId?` | `Address` | `StakeBaseArgs.tokenProgramId` | [staking/solana/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L28) | # UnstakeAndCloseArgs URL: /docs/api/staking/interfaces/UnstakeAndCloseArgs # UnstakeAndCloseArgs [#unstakeandcloseargs] Defined in: [staking/solana/types.ts:67](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L67) ## Extends [#extends] * [`UnstakeArgs`](/docs/api/staking/interfaces/UnstakeArgs) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | `nonce` | `number` | [`UnstakeArgs`](/docs/api/staking/interfaces/UnstakeArgs).[`nonce`](/docs/api/staking/interfaces/UnstakeArgs#nonce) | [staking/solana/types.ts:36](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L36) | | `rewardPools` | `RewardPoolArgs` & `GovernorWithVoteArgs`\[] | - | [staking/solana/types.ts:68](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L68) | | `shouldClose?` | `boolean` | [`UnstakeArgs`](/docs/api/staking/interfaces/UnstakeArgs).[`shouldClose`](/docs/api/staking/interfaces/UnstakeArgs#shouldclose) | [staking/solana/types.ts:64](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L64) | | `stakePool` | `Address` | [`UnstakeArgs`](/docs/api/staking/interfaces/UnstakeArgs).[`stakePool`](/docs/api/staking/interfaces/UnstakeArgs#stakepool) | [staking/solana/types.ts:23](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L23) | | `stakePoolMint` | `Address` | [`UnstakeArgs`](/docs/api/staking/interfaces/UnstakeArgs).[`stakePoolMint`](/docs/api/staking/interfaces/UnstakeArgs#stakepoolmint) | [staking/solana/types.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L24) | | `tokenProgramId?` | `Address` | [`UnstakeArgs`](/docs/api/staking/interfaces/UnstakeArgs).[`tokenProgramId`](/docs/api/staking/interfaces/UnstakeArgs#tokenprogramid) | [staking/solana/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L28) | # UnstakeArgs URL: /docs/api/staking/interfaces/UnstakeArgs # UnstakeArgs [#unstakeargs] Defined in: [staking/solana/types.ts:63](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L63) ## Extends [#extends] * `StakeBaseArgs` ## Extended by [#extended-by] * [`UnstakeAndCloseArgs`](/docs/api/staking/interfaces/UnstakeAndCloseArgs) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ------------------------------------------- | --------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------- | | `nonce` | `number` | `StakeBaseArgs.nonce` | [staking/solana/types.ts:36](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L36) | | `shouldClose?` | `boolean` | - | [staking/solana/types.ts:64](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L64) | | `stakePool` | `Address` | `StakeBaseArgs.stakePool` | [staking/solana/types.ts:23](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L23) | | `stakePoolMint` | `Address` | `StakeBaseArgs.stakePoolMint` | [staking/solana/types.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L24) | | `tokenProgramId?` | `Address` | `StakeBaseArgs.tokenProgramId` | [staking/solana/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L28) | # UpdateRewardPoolArgs URL: /docs/api/staking/interfaces/UpdateRewardPoolArgs # UpdateRewardPoolArgs [#updaterewardpoolargs] Defined in: [staking/solana/types.ts:103](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L103) ## Properties [#properties] | Property | Type | Defined in | | -------------------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------- | | `rewardAmount` | `BN` | [staking/solana/types.ts:105](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L105) | | `rewardPeriod` | `BN` | [staking/solana/types.ts:106](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L106) | | `rewardPool` | `Address` | [staking/solana/types.ts:107](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L107) | | `stakePool` | `Address` | [staking/solana/types.ts:104](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L104) | # constants URL: /docs/api/staking/staking/namespaces/constants # constants [#constants] ## Variables [#variables] * [ANCHOR\_DISCRIMINATOR\_OFFSET](/docs/api/staking/staking/namespaces/constants/variables/ANCHOR_DISCRIMINATOR_OFFSET) * [CONFIG\_PREFIX](/docs/api/staking/staking/namespaces/constants/variables/CONFIG_PREFIX) * [DEFAULT\_FEE](/docs/api/staking/staking/namespaces/constants/variables/DEFAULT_FEE) * [DEFAULT\_FEE\_BN](/docs/api/staking/staking/namespaces/constants/variables/DEFAULT_FEE_BN) * [FEE\_PRECISION\_FACTOR](/docs/api/staking/staking/namespaces/constants/variables/FEE_PRECISION_FACTOR) * [FEE\_PRECISION\_FACTOR\_BN](/docs/api/staking/staking/namespaces/constants/variables/FEE_PRECISION_FACTOR_BN) * [FEE\_PROGRAM\_ID](/docs/api/staking/staking/namespaces/constants/variables/FEE_PROGRAM_ID) * [FEE\_VALUE\_PREFIX](/docs/api/staking/staking/namespaces/constants/variables/FEE_VALUE_PREFIX) * [FUND\_DELEGATE\_PREFIX](/docs/api/staking/staking/namespaces/constants/variables/FUND_DELEGATE_PREFIX) * [REWARD\_AMOUNT\_DECIMALS](/docs/api/staking/staking/namespaces/constants/variables/REWARD_AMOUNT_DECIMALS) * [REWARD\_AMOUNT\_PRECISION\_FACTOR](/docs/api/staking/staking/namespaces/constants/variables/REWARD_AMOUNT_PRECISION_FACTOR) * [REWARD\_AMOUNT\_PRECISION\_FACTOR\_BN](/docs/api/staking/staking/namespaces/constants/variables/REWARD_AMOUNT_PRECISION_FACTOR_BN) * [REWARD\_ENTRY\_BYTE\_OFFSETS](/docs/api/staking/staking/namespaces/constants/variables/REWARD_ENTRY_BYTE_OFFSETS) * [REWARD\_ENTRY\_PREFIX](/docs/api/staking/staking/namespaces/constants/variables/REWARD_ENTRY_PREFIX) * [REWARD\_ENTRY\_REWARD\_POOL\_OFFSET](/docs/api/staking/staking/namespaces/constants/variables/REWARD_ENTRY_REWARD_POOL_OFFSET) * [REWARD\_ENTRY\_STAKE\_ENTRY\_OFFSET](/docs/api/staking/staking/namespaces/constants/variables/REWARD_ENTRY_STAKE_ENTRY_OFFSET) * [REWARD\_POOL\_BYTE\_OFFSETS](/docs/api/staking/staking/namespaces/constants/variables/REWARD_POOL_BYTE_OFFSETS) * [REWARD\_POOL\_DYNAMIC\_PROGRAM\_ID](/docs/api/staking/staking/namespaces/constants/variables/REWARD_POOL_DYNAMIC_PROGRAM_ID) * [REWARD\_POOL\_MINT\_OFFSET](/docs/api/staking/staking/namespaces/constants/variables/REWARD_POOL_MINT_OFFSET) * [REWARD\_POOL\_PREFIX](/docs/api/staking/staking/namespaces/constants/variables/REWARD_POOL_PREFIX) * [REWARD\_POOL\_PROGRAM\_ID](/docs/api/staking/staking/namespaces/constants/variables/REWARD_POOL_PROGRAM_ID) * [REWARD\_POOL\_STAKE\_POOL\_OFFSET](/docs/api/staking/staking/namespaces/constants/variables/REWARD_POOL_STAKE_POOL_OFFSET) * [REWARD\_VAULT\_PREFIX](/docs/api/staking/staking/namespaces/constants/variables/REWARD_VAULT_PREFIX) * [SCALE\_PRECISION\_FACTOR](/docs/api/staking/staking/namespaces/constants/variables/SCALE_PRECISION_FACTOR) * [SCALE\_PRECISION\_FACTOR\_BN](/docs/api/staking/staking/namespaces/constants/variables/SCALE_PRECISION_FACTOR_BN) * [STAKE\_ENTRY\_BYTE\_OFFSETS](/docs/api/staking/staking/namespaces/constants/variables/STAKE_ENTRY_BYTE_OFFSETS) * [STAKE\_ENTRY\_DISCRIMINATOR](/docs/api/staking/staking/namespaces/constants/variables/STAKE_ENTRY_DISCRIMINATOR) * [STAKE\_ENTRY\_OWNER\_OFFSET](/docs/api/staking/staking/namespaces/constants/variables/STAKE_ENTRY_OWNER_OFFSET) * [STAKE\_ENTRY\_PAYER\_OFFSET](/docs/api/staking/staking/namespaces/constants/variables/STAKE_ENTRY_PAYER_OFFSET) * [STAKE\_ENTRY\_PREFIX](/docs/api/staking/staking/namespaces/constants/variables/STAKE_ENTRY_PREFIX) * [STAKE\_ENTRY\_STAKE\_POOL\_OFFSET](/docs/api/staking/staking/namespaces/constants/variables/STAKE_ENTRY_STAKE_POOL_OFFSET) * [STAKE\_MINT\_PREFIX](/docs/api/staking/staking/namespaces/constants/variables/STAKE_MINT_PREFIX) * [STAKE\_POOL\_BYTE\_OFFSETS](/docs/api/staking/staking/namespaces/constants/variables/STAKE_POOL_BYTE_OFFSETS) * [STAKE\_POOL\_CREATOR\_OFFSET](/docs/api/staking/staking/namespaces/constants/variables/STAKE_POOL_CREATOR_OFFSET) * [STAKE\_POOL\_MINT\_OFFSET](/docs/api/staking/staking/namespaces/constants/variables/STAKE_POOL_MINT_OFFSET) * [STAKE\_POOL\_PREFIX](/docs/api/staking/staking/namespaces/constants/variables/STAKE_POOL_PREFIX) * [STAKE\_POOL\_PROGRAM\_ID](/docs/api/staking/staking/namespaces/constants/variables/STAKE_POOL_PROGRAM_ID) * [STAKE\_VAULT\_PREFIX](/docs/api/staking/staking/namespaces/constants/variables/STAKE_VAULT_PREFIX) * [STREAMFLOW\_TREASURY\_PUBLIC\_KEY](/docs/api/staking/staking/namespaces/constants/variables/STREAMFLOW_TREASURY_PUBLIC_KEY) * [U64\_MAX](/docs/api/staking/staking/namespaces/constants/variables/U64_MAX) * [WORKER\_PUBLIC\_KEY](/docs/api/staking/staking/namespaces/constants/variables/WORKER_PUBLIC_KEY) # ANCHOR_DISCRIMINATOR_OFFSET URL: /docs/api/staking/staking/namespaces/constants/variables/ANCHOR_DISCRIMINATOR_OFFSET # ANCHOR\_DISCRIMINATOR\_OFFSET [#anchor_discriminator_offset] ```ts const ANCHOR_DISCRIMINATOR_OFFSET: 8 = 8; ``` Defined in: [staking/solana/constants.ts:29](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L29) # CONFIG_PREFIX URL: /docs/api/staking/staking/namespaces/constants/variables/CONFIG_PREFIX # CONFIG\_PREFIX [#config_prefix] ```ts const CONFIG_PREFIX: Buffer; ``` Defined in: [staking/solana/constants.ts:23](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L23) # DEFAULT_FEE URL: /docs/api/staking/staking/namespaces/constants/variables/DEFAULT_FEE # DEFAULT\_FEE [#default_fee] ```ts const DEFAULT_FEE: 0 = 0; ``` Defined in: [staking/solana/constants.ts:7](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L7) # DEFAULT_FEE_BN URL: /docs/api/staking/staking/namespaces/constants/variables/DEFAULT_FEE_BN # DEFAULT\_FEE\_BN [#default_fee_bn] ```ts const DEFAULT_FEE_BN: BN; ``` Defined in: [staking/solana/constants.ts:8](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L8) # FEE_PRECISION_FACTOR URL: /docs/api/staking/staking/namespaces/constants/variables/FEE_PRECISION_FACTOR # FEE\_PRECISION\_FACTOR [#fee_precision_factor] ```ts const FEE_PRECISION_FACTOR: 10000 = 10_000; ``` Defined in: [staking/solana/constants.ts:5](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L5) # FEE_PRECISION_FACTOR_BN URL: /docs/api/staking/staking/namespaces/constants/variables/FEE_PRECISION_FACTOR_BN # FEE\_PRECISION\_FACTOR\_BN [#fee_precision_factor_bn] ```ts const FEE_PRECISION_FACTOR_BN: BN; ``` Defined in: [staking/solana/constants.ts:6](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L6) # FEE_PROGRAM_ID URL: /docs/api/staking/staking/namespaces/constants/variables/FEE_PROGRAM_ID # FEE\_PROGRAM\_ID [#fee_program_id] ```ts const FEE_PROGRAM_ID: Record; ``` Defined in: [staking/solana/constants.ts:78](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L78) # FEE_VALUE_PREFIX URL: /docs/api/staking/staking/namespaces/constants/variables/FEE_VALUE_PREFIX # FEE\_VALUE\_PREFIX [#fee_value_prefix] ```ts const FEE_VALUE_PREFIX: Buffer; ``` Defined in: [staking/solana/constants.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L24) # FUND_DELEGATE_PREFIX URL: /docs/api/staking/staking/namespaces/constants/variables/FUND_DELEGATE_PREFIX # FUND\_DELEGATE\_PREFIX [#fund_delegate_prefix] ```ts const FUND_DELEGATE_PREFIX: Buffer; ``` Defined in: [staking/solana/constants.ts:25](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L25) # REWARD_AMOUNT_DECIMALS URL: /docs/api/staking/staking/namespaces/constants/variables/REWARD_AMOUNT_DECIMALS # REWARD\_AMOUNT\_DECIMALS [#reward_amount_decimals] ```ts const REWARD_AMOUNT_DECIMALS: 9 = 9; ``` Defined in: [staking/solana/constants.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L11) # REWARD_AMOUNT_PRECISION_FACTOR URL: /docs/api/staking/staking/namespaces/constants/variables/REWARD_AMOUNT_PRECISION_FACTOR # REWARD\_AMOUNT\_PRECISION\_FACTOR [#reward_amount_precision_factor] ```ts const REWARD_AMOUNT_PRECISION_FACTOR: 1000000000 = 1_000_000_000; ``` Defined in: [staking/solana/constants.ts:12](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L12) # REWARD_AMOUNT_PRECISION_FACTOR_BN URL: /docs/api/staking/staking/namespaces/constants/variables/REWARD_AMOUNT_PRECISION_FACTOR_BN # REWARD\_AMOUNT\_PRECISION\_FACTOR\_BN [#reward_amount_precision_factor_bn] ```ts const REWARD_AMOUNT_PRECISION_FACTOR_BN: BN; ``` Defined in: [staking/solana/constants.ts:13](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L13) # REWARD_ENTRY_BYTE_OFFSETS URL: /docs/api/staking/staking/namespaces/constants/variables/REWARD_ENTRY_BYTE_OFFSETS # REWARD\_ENTRY\_BYTE\_OFFSETS [#reward_entry_byte_offsets] ```ts const REWARD_ENTRY_BYTE_OFFSETS: object; ``` Defined in: [staking/solana/constants.ts:55](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L55) ## Type Declaration [#type-declaration] | Name | Type | Default value | Defined in | | ------------------------------------------- | -------- | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | `rewardPool` | `8` | `REWARD_ENTRY_REWARD_POOL_OFFSET` | [staking/solana/constants.ts:57](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L57) | | `stakeEntry` | `number` | `REWARD_ENTRY_STAKE_ENTRY_OFFSET` | [staking/solana/constants.ts:56](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L56) | # REWARD_ENTRY_PREFIX URL: /docs/api/staking/staking/namespaces/constants/variables/REWARD_ENTRY_PREFIX # REWARD\_ENTRY\_PREFIX [#reward_entry_prefix] ```ts const REWARD_ENTRY_PREFIX: Buffer; ``` Defined in: [staking/solana/constants.ts:22](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L22) # REWARD_ENTRY_REWARD_POOL_OFFSET URL: /docs/api/staking/staking/namespaces/constants/variables/REWARD_ENTRY_REWARD_POOL_OFFSET # REWARD\_ENTRY\_REWARD\_POOL\_OFFSET [#reward_entry_reward_pool_offset] ```ts const REWARD_ENTRY_REWARD_POOL_OFFSET: 8 = ANCHOR_DISCRIMINATOR_OFFSET; ``` Defined in: [staking/solana/constants.ts:53](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L53) # REWARD_ENTRY_STAKE_ENTRY_OFFSET URL: /docs/api/staking/staking/namespaces/constants/variables/REWARD_ENTRY_STAKE_ENTRY_OFFSET # REWARD\_ENTRY\_STAKE\_ENTRY\_OFFSET [#reward_entry_stake_entry_offset] ```ts const REWARD_ENTRY_STAKE_ENTRY_OFFSET: number; ``` Defined in: [staking/solana/constants.ts:54](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L54) # REWARD_POOL_BYTE_OFFSETS URL: /docs/api/staking/staking/namespaces/constants/variables/REWARD_POOL_BYTE_OFFSETS # REWARD\_POOL\_BYTE\_OFFSETS [#reward_pool_byte_offsets] ```ts const REWARD_POOL_BYTE_OFFSETS: object; ``` Defined in: [staking/solana/constants.ts:48](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L48) ## Type Declaration [#type-declaration] | Name | Type | Default value | Defined in | | ----------------------------------------- | -------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | `mint` | `number` | `REWARD_POOL_MINT_OFFSET` | [staking/solana/constants.ts:50](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L50) | | `stakePool` | `number` | `REWARD_POOL_STAKE_POOL_OFFSET` | [staking/solana/constants.ts:49](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L49) | # REWARD_POOL_DYNAMIC_PROGRAM_ID URL: /docs/api/staking/staking/namespaces/constants/variables/REWARD_POOL_DYNAMIC_PROGRAM_ID # REWARD\_POOL\_DYNAMIC\_PROGRAM\_ID [#reward_pool_dynamic_program_id] ```ts const REWARD_POOL_DYNAMIC_PROGRAM_ID: Record; ``` Defined in: [staking/solana/constants.ts:72](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L72) # REWARD_POOL_MINT_OFFSET URL: /docs/api/staking/staking/namespaces/constants/variables/REWARD_POOL_MINT_OFFSET # REWARD\_POOL\_MINT\_OFFSET [#reward_pool_mint_offset] ```ts const REWARD_POOL_MINT_OFFSET: number; ``` Defined in: [staking/solana/constants.ts:47](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L47) # REWARD_POOL_PREFIX URL: /docs/api/staking/staking/namespaces/constants/variables/REWARD_POOL_PREFIX # REWARD\_POOL\_PREFIX [#reward_pool_prefix] ```ts const REWARD_POOL_PREFIX: Buffer; ``` Defined in: [staking/solana/constants.ts:20](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L20) # REWARD_POOL_PROGRAM_ID URL: /docs/api/staking/staking/namespaces/constants/variables/REWARD_POOL_PROGRAM_ID # REWARD\_POOL\_PROGRAM\_ID [#reward_pool_program_id] ```ts const REWARD_POOL_PROGRAM_ID: Record; ``` Defined in: [staking/solana/constants.ts:66](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L66) # REWARD_POOL_STAKE_POOL_OFFSET URL: /docs/api/staking/staking/namespaces/constants/variables/REWARD_POOL_STAKE_POOL_OFFSET # REWARD\_POOL\_STAKE\_POOL\_OFFSET [#reward_pool_stake_pool_offset] ```ts const REWARD_POOL_STAKE_POOL_OFFSET: number; ``` Defined in: [staking/solana/constants.ts:46](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L46) # REWARD_VAULT_PREFIX URL: /docs/api/staking/staking/namespaces/constants/variables/REWARD_VAULT_PREFIX # REWARD\_VAULT\_PREFIX [#reward_vault_prefix] ```ts const REWARD_VAULT_PREFIX: Buffer; ``` Defined in: [staking/solana/constants.ts:21](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L21) # SCALE_PRECISION_FACTOR URL: /docs/api/staking/staking/namespaces/constants/variables/SCALE_PRECISION_FACTOR # SCALE\_PRECISION\_FACTOR [#scale_precision_factor] ```ts const SCALE_PRECISION_FACTOR: 1000000000 = 1_000_000_000; ``` Defined in: [staking/solana/constants.ts:9](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L9) # SCALE_PRECISION_FACTOR_BN URL: /docs/api/staking/staking/namespaces/constants/variables/SCALE_PRECISION_FACTOR_BN # SCALE\_PRECISION\_FACTOR\_BN [#scale_precision_factor_bn] ```ts const SCALE_PRECISION_FACTOR_BN: BN; ``` Defined in: [staking/solana/constants.ts:10](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L10) # STAKE_ENTRY_BYTE_OFFSETS URL: /docs/api/staking/staking/namespaces/constants/variables/STAKE_ENTRY_BYTE_OFFSETS # STAKE\_ENTRY\_BYTE\_OFFSETS [#stake_entry_byte_offsets] ```ts const STAKE_ENTRY_BYTE_OFFSETS: object; ``` Defined in: [staking/solana/constants.ts:33](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L33) ## Type Declaration [#type-declaration] | Name | Type | Default value | Defined in | | ----------------------------------------- | -------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | `authority` | `number` | `STAKE_ENTRY_OWNER_OFFSET` | [staking/solana/constants.ts:35](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L35) | | `payer` | `number` | `STAKE_ENTRY_PAYER_OFFSET` | [staking/solana/constants.ts:34](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L34) | | `stakePool` | `number` | `STAKE_ENTRY_STAKE_POOL_OFFSET` | [staking/solana/constants.ts:36](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L36) | # STAKE_ENTRY_DISCRIMINATOR URL: /docs/api/staking/staking/namespaces/constants/variables/STAKE_ENTRY_DISCRIMINATOR # STAKE\_ENTRY\_DISCRIMINATOR [#stake_entry_discriminator] ```ts const STAKE_ENTRY_DISCRIMINATOR: number[]; ``` Defined in: [staking/solana/constants.ts:15](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L15) # STAKE_ENTRY_OWNER_OFFSET URL: /docs/api/staking/staking/namespaces/constants/variables/STAKE_ENTRY_OWNER_OFFSET # STAKE\_ENTRY\_OWNER\_OFFSET [#stake_entry_owner_offset] ```ts const STAKE_ENTRY_OWNER_OFFSET: number; ``` Defined in: [staking/solana/constants.ts:32](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L32) # STAKE_ENTRY_PAYER_OFFSET URL: /docs/api/staking/staking/namespaces/constants/variables/STAKE_ENTRY_PAYER_OFFSET # STAKE\_ENTRY\_PAYER\_OFFSET [#stake_entry_payer_offset] ```ts const STAKE_ENTRY_PAYER_OFFSET: number; ``` Defined in: [staking/solana/constants.ts:31](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L31) # STAKE_ENTRY_PREFIX URL: /docs/api/staking/staking/namespaces/constants/variables/STAKE_ENTRY_PREFIX # STAKE\_ENTRY\_PREFIX [#stake_entry_prefix] ```ts const STAKE_ENTRY_PREFIX: Buffer; ``` Defined in: [staking/solana/constants.ts:16](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L16) # STAKE_ENTRY_STAKE_POOL_OFFSET URL: /docs/api/staking/staking/namespaces/constants/variables/STAKE_ENTRY_STAKE_POOL_OFFSET # STAKE\_ENTRY\_STAKE\_POOL\_OFFSET [#stake_entry_stake_pool_offset] ```ts const STAKE_ENTRY_STAKE_POOL_OFFSET: number; ``` Defined in: [staking/solana/constants.ts:30](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L30) # STAKE_MINT_PREFIX URL: /docs/api/staking/staking/namespaces/constants/variables/STAKE_MINT_PREFIX # STAKE\_MINT\_PREFIX [#stake_mint_prefix] ```ts const STAKE_MINT_PREFIX: Buffer; ``` Defined in: [staking/solana/constants.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L18) # STAKE_POOL_BYTE_OFFSETS URL: /docs/api/staking/staking/namespaces/constants/variables/STAKE_POOL_BYTE_OFFSETS # STAKE\_POOL\_BYTE\_OFFSETS [#stake_pool_byte_offsets] ```ts const STAKE_POOL_BYTE_OFFSETS: object; ``` Defined in: [staking/solana/constants.ts:41](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L41) ## Type Declaration [#type-declaration] | Name | Type | Default value | Defined in | | ------------------------------------- | -------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | `creator` | `number` | `STAKE_POOL_CREATOR_OFFSET` | [staking/solana/constants.ts:43](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L43) | | `mint` | `number` | `STAKE_POOL_MINT_OFFSET` | [staking/solana/constants.ts:42](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L42) | # STAKE_POOL_CREATOR_OFFSET URL: /docs/api/staking/staking/namespaces/constants/variables/STAKE_POOL_CREATOR_OFFSET # STAKE\_POOL\_CREATOR\_OFFSET [#stake_pool_creator_offset] ```ts const STAKE_POOL_CREATOR_OFFSET: number; ``` Defined in: [staking/solana/constants.ts:40](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L40) # STAKE_POOL_MINT_OFFSET URL: /docs/api/staking/staking/namespaces/constants/variables/STAKE_POOL_MINT_OFFSET # STAKE\_POOL\_MINT\_OFFSET [#stake_pool_mint_offset] ```ts const STAKE_POOL_MINT_OFFSET: number; ``` Defined in: [staking/solana/constants.ts:39](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L39) # STAKE_POOL_PREFIX URL: /docs/api/staking/staking/namespaces/constants/variables/STAKE_POOL_PREFIX # STAKE\_POOL\_PREFIX [#stake_pool_prefix] ```ts const STAKE_POOL_PREFIX: Buffer; ``` Defined in: [staking/solana/constants.ts:17](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L17) # STAKE_POOL_PROGRAM_ID URL: /docs/api/staking/staking/namespaces/constants/variables/STAKE_POOL_PROGRAM_ID # STAKE\_POOL\_PROGRAM\_ID [#stake_pool_program_id] ```ts const STAKE_POOL_PROGRAM_ID: Record; ``` Defined in: [staking/solana/constants.ts:60](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L60) # STAKE_VAULT_PREFIX URL: /docs/api/staking/staking/namespaces/constants/variables/STAKE_VAULT_PREFIX # STAKE\_VAULT\_PREFIX [#stake_vault_prefix] ```ts const STAKE_VAULT_PREFIX: Buffer; ``` Defined in: [staking/solana/constants.ts:19](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L19) # STREAMFLOW_TREASURY_PUBLIC_KEY URL: /docs/api/staking/staking/namespaces/constants/variables/STREAMFLOW_TREASURY_PUBLIC_KEY # STREAMFLOW\_TREASURY\_PUBLIC\_KEY [#streamflow_treasury_public_key] ```ts const STREAMFLOW_TREASURY_PUBLIC_KEY: PublicKey; ``` Defined in: [staking/solana/constants.ts:26](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L26) # U64_MAX URL: /docs/api/staking/staking/namespaces/constants/variables/U64_MAX # U64\_MAX [#u64_max] ```ts const U64_MAX: 18446744073709551615n = 18446744073709551615n; ``` Defined in: [staking/solana/constants.ts:14](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L14) # WORKER_PUBLIC_KEY URL: /docs/api/staking/staking/namespaces/constants/variables/WORKER_PUBLIC_KEY # WORKER\_PUBLIC\_KEY [#worker_public_key] ```ts const WORKER_PUBLIC_KEY: PublicKey; ``` Defined in: [staking/solana/constants.ts:27](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/constants.ts#L27) # ClaimRewardPoolArgs URL: /docs/api/staking/type-aliases/ClaimRewardPoolArgs # ClaimRewardPoolArgs [#claimrewardpoolargs] ```ts type ClaimRewardPoolArgs = CreateRewardEntryArgs & GovernorWithVoteArgs; ``` Defined in: [staking/solana/types.ts:110](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L110) # CloseRewardEntryArgs URL: /docs/api/staking/type-aliases/CloseRewardEntryArgs # CloseRewardEntryArgs [#closerewardentryargs] ```ts type CloseRewardEntryArgs = CreateRewardEntryArgs; ``` Defined in: [staking/solana/types.ts:112](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L112) # CloseStakeEntryArgs URL: /docs/api/staking/type-aliases/CloseStakeEntryArgs # CloseStakeEntryArgs [#closestakeentryargs] ```ts type CloseStakeEntryArgs = Omit; ``` Defined in: [staking/solana/types.ts:73](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L73) # DefaultFeeValueConfig URL: /docs/api/staking/type-aliases/DefaultFeeValueConfig # DefaultFeeValueConfig [#defaultfeevalueconfig] ```ts type DefaultFeeValueConfig = IdlAccounts["config"]; ``` Defined in: [staking/solana/types.ts:16](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L16) # FeeValue URL: /docs/api/staking/type-aliases/FeeValue # FeeValue [#feevalue] ```ts type FeeValue = IdlAccounts["feeValue"]; ``` Defined in: [staking/solana/types.ts:15](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L15) # RewardEntry URL: /docs/api/staking/type-aliases/RewardEntry # RewardEntry [#rewardentry] ```ts type RewardEntry = IdlAccounts["rewardEntry"]; ``` Defined in: [staking/solana/types.ts:13](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L13) # RewardPool URL: /docs/api/staking/type-aliases/RewardPool # RewardPool [#rewardpool] ```ts type RewardPool = IdlAccounts["rewardPool"]; ``` Defined in: [staking/solana/types.ts:14](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L14) # StakeEntry URL: /docs/api/staking/type-aliases/StakeEntry # StakeEntry [#stakeentry] ```ts type StakeEntry = IdlAccounts["stakeEntry"]; ``` Defined in: [staking/solana/types.ts:12](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L12) # StakePool URL: /docs/api/staking/type-aliases/StakePool # StakePool [#stakepool] ```ts type StakePool = IdlAccounts["stakePool"]; ``` Defined in: [staking/solana/types.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L11) # UnstakeAndClaimArgs URL: /docs/api/staking/type-aliases/UnstakeAndClaimArgs # UnstakeAndClaimArgs [#unstakeandclaimargs] ```ts type UnstakeAndClaimArgs = UnstakeAndCloseArgs; ``` Defined in: [staking/solana/types.ts:71](https://github.com/streamflow-finance/js-sdk/blob/master/packages/staking/solana/types.ts#L71) # AlignedContract URL: /docs/api/stream/classes/AlignedContract # AlignedContract [#alignedcontract] Defined in: [types.ts:625](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L625) ## Extends [#extends] * [`Contract`](/docs/api/stream/classes/Contract) ## Implements [#implements] * [`AlignedStream`](/docs/api/stream/type-aliases/AlignedStream) ## Constructors [#constructors] ### Constructor [#constructor] ```ts new AlignedContract(stream, alignedProxy): AlignedContract; ``` Defined in: [types.ts:658](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L658) #### Parameters [#parameters] | Parameter | Type | | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `stream` | [`DecodedStream`](/docs/api/stream/interfaces/DecodedStream) | | `alignedProxy` | \{ `buffer`: `number`\[]; `bump`: `number`; `endTime`: `BN`; `expiryPercentage`: `BN`; `expiryTime`: `BN`; `floorPrice`: `BN`; `initialAmountPerPeriod`: `BN`; `initialNetAmount`: `BN`; `initialPrice`: `BN`; `lastAmountUpdateTime`: `BN`; `lastPrice`: `BN`; `maxPercentage`: `BN`; `maxPrice`: `BN`; `minPercentage`: `BN`; `minPrice`: `BN`; `mint`: `PublicKey`; `period`: `BN`; `priceOracle`: `PublicKey`; `priceOracleType`: `DecodeEnum`\<\{ `kind`: `"enum"`; `variants`: \[\{ `name`: `"none"`; }, \{ `name`: `"test"`; }, \{ `name`: `"pyth"`; }, \{ `name`: `"switchboard"`; }]; }, `DecodedHelper`\<\[\{ `name`: `"changeOracleParams"`; `type`: \{ `fields`: \[\{ `name`: `"oracleType"`; `type`: \{ `defined`: \{ `name`: `"oracleType"`; }; }; }]; `kind`: `"struct"`; }; }, \{ `name`: `"contract"`; `type`: \{ `fields`: \[\{ `docs`: \[`"Bump Seed used to sign transactions"`]; `name`: `"bump"`; `type`: `"u8"`; }, \{ `docs`: \[`"Original Contract sender"`]; `name`: `"sender"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Original Contract sender tokens address"`]; `name`: `"senderTokens"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Vesting Stream address"`]; `name`: `"stream"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Type of the Oracle used to derive Token Price"`]; `name`: `"priceOracleType"`; `type`: \{ `defined`: \{ `name`: `"oracleType"`; }; }; }]; `kind`: `"struct"`; }; }, \{ `name`: `"createParams"`; `type`: \{ `fields`: \[\{ `docs`: \[`"Timestamp when the tokens start vesting"`]; `name`: `"startTime"`; `type`: `"u64"`; }, \{ `docs`: \[`"Deposited amount of tokens"`]; `name`: `"netAmountDeposited"`; `type`: `"u64"`; }, \{ `docs`: \[`"Time step (period) in seconds per which the vesting/release occurs"`]; `name`: `"period"`; `type`: `"u64"`; }, \{ `docs`: \[``"Base Amount released per period. Combined with `period`, we get a release rate."``]; `name`: `"amountPerPeriod"`; `type`: `"u64"`; }, \{ `docs`: \["Vesting contract "cliff" timestamp"]; `name`: `"cliff"`; `type`: `"u64"`; }]; `kind`: `"struct"`; }; }, \{ `name`: `"createTestOracleParams"`; `type`: \{ `fields`: \[\{ `name`: `"price"`; `type`: `"u64"`; }, \{ `name`: `"expo"`; `type`: `"i32"`; }, \{ `name`: `"conf"`; `type`: `"u64"`; }, \{ `name`: `"publishTime"`; `type`: `"i64"`; }]; `kind`: `"struct"`; }; }], `EmptyDefined`>>; `sender`: `PublicKey`; `senderTokens`: `PublicKey`; `startTime`: `BN`; `stream`: `PublicKey`; `streamCanceledTime`: `BN`; `tickSize`: `BN`; } | | `alignedProxy.buffer` | `number`\[] | | `alignedProxy.bump` | `number` | | `alignedProxy.endTime` | `BN` | | `alignedProxy.expiryPercentage` | `BN` | | `alignedProxy.expiryTime` | `BN` | | `alignedProxy.floorPrice` | `BN` | | `alignedProxy.initialAmountPerPeriod` | `BN` | | `alignedProxy.initialNetAmount` | `BN` | | `alignedProxy.initialPrice` | `BN` | | `alignedProxy.lastAmountUpdateTime` | `BN` | | `alignedProxy.lastPrice` | `BN` | | `alignedProxy.maxPercentage` | `BN` | | `alignedProxy.maxPrice` | `BN` | | `alignedProxy.minPercentage` | `BN` | | `alignedProxy.minPrice` | `BN` | | `alignedProxy.mint` | `PublicKey` | | `alignedProxy.period` | `BN` | | `alignedProxy.priceOracle` | `PublicKey` | | `alignedProxy.priceOracleType` | `DecodeEnum`\<\{ `kind`: `"enum"`; `variants`: \[\{ `name`: `"none"`; }, \{ `name`: `"test"`; }, \{ `name`: `"pyth"`; }, \{ `name`: `"switchboard"`; }]; }, `DecodedHelper`\<\[\{ `name`: `"changeOracleParams"`; `type`: \{ `fields`: \[\{ `name`: `"oracleType"`; `type`: \{ `defined`: \{ `name`: `"oracleType"`; }; }; }]; `kind`: `"struct"`; }; }, \{ `name`: `"contract"`; `type`: \{ `fields`: \[\{ `docs`: \[`"Bump Seed used to sign transactions"`]; `name`: `"bump"`; `type`: `"u8"`; }, \{ `docs`: \[`"Original Contract sender"`]; `name`: `"sender"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Original Contract sender tokens address"`]; `name`: `"senderTokens"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Vesting Stream address"`]; `name`: `"stream"`; `type`: `"pubkey"`; }, \{ `docs`: \[`"Type of the Oracle used to derive Token Price"`]; `name`: `"priceOracleType"`; `type`: \{ `defined`: \{ `name`: `"oracleType"`; }; }; }]; `kind`: `"struct"`; }; }, \{ `name`: `"createParams"`; `type`: \{ `fields`: \[\{ `docs`: \[`"Timestamp when the tokens start vesting"`]; `name`: `"startTime"`; `type`: `"u64"`; }, \{ `docs`: \[`"Deposited amount of tokens"`]; `name`: `"netAmountDeposited"`; `type`: `"u64"`; }, \{ `docs`: \[`"Time step (period) in seconds per which the vesting/release occurs"`]; `name`: `"period"`; `type`: `"u64"`; }, \{ `docs`: \[``"Base Amount released per period. Combined with `period`, we get a release rate."``]; `name`: `"amountPerPeriod"`; `type`: `"u64"`; }, \{ `docs`: \["Vesting contract "cliff" timestamp"]; `name`: `"cliff"`; `type`: `"u64"`; }]; `kind`: `"struct"`; }; }, \{ `name`: `"createTestOracleParams"`; `type`: \{ `fields`: \[\{ `name`: `"price"`; `type`: `"u64"`; }, \{ `name`: `"expo"`; `type`: `"i32"`; }, \{ `name`: `"conf"`; `type`: `"u64"`; }, \{ `name`: `"publishTime"`; `type`: `"i64"`; }]; `kind`: `"struct"`; }; }], `EmptyDefined`>> | | `alignedProxy.sender` | `PublicKey` | | `alignedProxy.senderTokens` | `PublicKey` | | `alignedProxy.startTime` | `BN` | | `alignedProxy.stream` | `PublicKey` | | `alignedProxy.streamCanceledTime` | `BN` | | `alignedProxy.tickSize` | `BN` | #### Returns [#returns] `AlignedContract` #### Overrides [#overrides] [`Contract`](/docs/api/stream/classes/Contract).[`constructor`](/docs/api/stream/classes/Contract#constructor) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ------------------------------------------------------------------------ | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | | `amountPerPeriod` | `BN` | `AlignedStream.amountPerPeriod` [`Contract`](/docs/api/stream/classes/Contract).[`amountPerPeriod`](/docs/api/stream/classes/Contract#amountperperiod) | [packages/stream/solana/types.ts:514](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L514) | | `automaticWithdrawal` | `boolean` | `AlignedStream.automaticWithdrawal` [`Contract`](/docs/api/stream/classes/Contract).[`automaticWithdrawal`](/docs/api/stream/classes/Contract#automaticwithdrawal) | [packages/stream/solana/types.ts:524](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L524) | | `bump` | `number` | `AlignedStream.bump` [`Contract`](/docs/api/stream/classes/Contract).[`bump`](/docs/api/stream/classes/Contract#bump) | [packages/stream/solana/types.ts:554](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L554) | | `cancelableByRecipient` | `boolean` | `AlignedStream.cancelableByRecipient` [`Contract`](/docs/api/stream/classes/Contract).[`cancelableByRecipient`](/docs/api/stream/classes/Contract#cancelablebyrecipient) | [packages/stream/solana/types.ts:522](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L522) | | `cancelableBySender` | `boolean` | `AlignedStream.cancelableBySender` [`Contract`](/docs/api/stream/classes/Contract).[`cancelableBySender`](/docs/api/stream/classes/Contract#cancelablebysender) | [packages/stream/solana/types.ts:520](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L520) | | `canceledAt` | `number` | `AlignedStream.canceledAt` [`Contract`](/docs/api/stream/classes/Contract).[`canceledAt`](/docs/api/stream/classes/Contract#canceledat) | [packages/stream/solana/types.ts:470](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L470) | | `canTopup` | `boolean` | `AlignedStream.canTopup` [`Contract`](/docs/api/stream/classes/Contract).[`canTopup`](/docs/api/stream/classes/Contract#cantopup) | [packages/stream/solana/types.ts:530](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L530) | | `cliff` | `number` | `AlignedStream.cliff` [`Contract`](/docs/api/stream/classes/Contract).[`cliff`](/docs/api/stream/classes/Contract#cliff) | [packages/stream/solana/types.ts:516](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L516) | | `cliffAmount` | `BN` | `AlignedStream.cliffAmount` [`Contract`](/docs/api/stream/classes/Contract).[`cliffAmount`](/docs/api/stream/classes/Contract#cliffamount) | [packages/stream/solana/types.ts:518](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L518) | | `closed` | `boolean` | `AlignedStream.closed` [`Contract`](/docs/api/stream/classes/Contract).[`closed`](/docs/api/stream/classes/Contract#closed) | [packages/stream/solana/types.ts:540](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L540) | | `createdAt` | `number` | `AlignedStream.createdAt` [`Contract`](/docs/api/stream/classes/Contract).[`createdAt`](/docs/api/stream/classes/Contract#createdat) | [packages/stream/solana/types.ts:466](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L466) | | `currentPauseStart` | `number` | `AlignedStream.currentPauseStart` [`Contract`](/docs/api/stream/classes/Contract).[`currentPauseStart`](/docs/api/stream/classes/Contract#currentpausestart) | [packages/stream/solana/types.ts:542](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L542) | | `depositedAmount` | `BN` | `AlignedStream.depositedAmount` [`Contract`](/docs/api/stream/classes/Contract).[`depositedAmount`](/docs/api/stream/classes/Contract#depositedamount) | [packages/stream/solana/types.ts:510](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L510) | | `end` | `number` | `AlignedStream.end` [`Contract`](/docs/api/stream/classes/Contract).[`end`](/docs/api/stream/classes/Contract#end) | [packages/stream/solana/types.ts:472](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L472) | | `escrowTokens` | `string` | `AlignedStream.escrowTokens` [`Contract`](/docs/api/stream/classes/Contract).[`escrowTokens`](/docs/api/stream/classes/Contract#escrowtokens) | [packages/stream/solana/types.ts:486](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L486) | | `expiryPercentage` | `number` | - | [packages/stream/solana/types.ts:654](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L654) | | `expiryTime` | `number` | - | [packages/stream/solana/types.ts:652](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L652) | | `floorPrice` | `number` | - | [packages/stream/solana/types.ts:656](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L656) | | `fundsUnlockedAtLastRateChange` | `BN` | `AlignedStream.fundsUnlockedAtLastRateChange` [`Contract`](/docs/api/stream/classes/Contract).[`fundsUnlockedAtLastRateChange`](/docs/api/stream/classes/Contract#fundsunlockedatlastratechange) | [packages/stream/solana/types.ts:548](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L548) | | `initialAmountPerPeriod` | `BN` | - | [packages/stream/solana/types.ts:642](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L642) | | `initialNetAmount` | `BN` | - | [packages/stream/solana/types.ts:650](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L650) | | `initialPrice` | `number` | - | [packages/stream/solana/types.ts:644](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L644) | | `isAligned` | `boolean` | `AlignedStream.isAligned` [`Contract`](/docs/api/stream/classes/Contract).[`isAligned`](/docs/api/stream/classes/Contract#isaligned) | [packages/stream/solana/types.ts:558](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L558) | | `isPda` | `boolean` | `AlignedStream.isPda` [`Contract`](/docs/api/stream/classes/Contract).[`isPda`](/docs/api/stream/classes/Contract#ispda) | [packages/stream/solana/types.ts:536](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L536) | | `lastAmountUpdateTime` | `number` | - | [packages/stream/solana/types.ts:648](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L648) | | `lastPrice` | `number` | - | [packages/stream/solana/types.ts:646](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L646) | | `lastRateChangeTime` | `number` | `AlignedStream.lastRateChangeTime` [`Contract`](/docs/api/stream/classes/Contract).[`lastRateChangeTime`](/docs/api/stream/classes/Contract#lastratechangetime) | [packages/stream/solana/types.ts:546](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L546) | | `lastWithdrawnAt` | `number` | `AlignedStream.lastWithdrawnAt` [`Contract`](/docs/api/stream/classes/Contract).[`lastWithdrawnAt`](/docs/api/stream/classes/Contract#lastwithdrawnat) | [packages/stream/solana/types.ts:474](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L474) | | `magic` | `number` | `AlignedStream.magic` [`Contract`](/docs/api/stream/classes/Contract).[`magic`](/docs/api/stream/classes/Contract#magic) | [packages/stream/solana/types.ts:462](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L462) | | `maxPercentage` | `number` | - | [packages/stream/solana/types.ts:632](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L632) | | `maxPrice` | `number` | - | [packages/stream/solana/types.ts:628](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L628) | | `minPercentage` | `number` | - | [packages/stream/solana/types.ts:630](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L630) | | `minPrice` | `number` | - | [packages/stream/solana/types.ts:626](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L626) | | `mint` | `string` | `AlignedStream.mint` [`Contract`](/docs/api/stream/classes/Contract).[`mint`](/docs/api/stream/classes/Contract#mint) | [packages/stream/solana/types.ts:484](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L484) | | `name` | `string` | `AlignedStream.name` [`Contract`](/docs/api/stream/classes/Contract).[`name`](/docs/api/stream/classes/Contract#name) | [packages/stream/solana/types.ts:532](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L532) | | `nonce` | `number` | `AlignedStream.nonce` [`Contract`](/docs/api/stream/classes/Contract).[`nonce`](/docs/api/stream/classes/Contract#nonce) | [packages/stream/solana/types.ts:538](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L538) | | `oldMetadata` | `PublicKey` | `AlignedStream.oldMetadata` [`Contract`](/docs/api/stream/classes/Contract).[`oldMetadata`](/docs/api/stream/classes/Contract#oldmetadata) | [packages/stream/solana/types.ts:550](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L550) | | `oracleType` | [`OracleTypeName`](/docs/api/stream/type-aliases/OracleTypeName) | - | [packages/stream/solana/types.ts:640](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L640) | | `partner` | `string` | `AlignedStream.partner` [`Contract`](/docs/api/stream/classes/Contract).[`partner`](/docs/api/stream/classes/Contract#partner) | [packages/stream/solana/types.ts:504](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L504) | | `partnerFeePercent` | `number` | `AlignedStream.partnerFeePercent` [`Contract`](/docs/api/stream/classes/Contract).[`partnerFeePercent`](/docs/api/stream/classes/Contract#partnerfeepercent) | [packages/stream/solana/types.ts:502](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L502) | | `partnerFeeTotal` | `BN` | `AlignedStream.partnerFeeTotal` [`Contract`](/docs/api/stream/classes/Contract).[`partnerFeeTotal`](/docs/api/stream/classes/Contract#partnerfeetotal) | [packages/stream/solana/types.ts:498](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L498) | | `partnerFeeWithdrawn` | `BN` | `AlignedStream.partnerFeeWithdrawn` [`Contract`](/docs/api/stream/classes/Contract).[`partnerFeeWithdrawn`](/docs/api/stream/classes/Contract#partnerfeewithdrawn) | [packages/stream/solana/types.ts:500](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L500) | | `partnerTokens` | `string` | `AlignedStream.partnerTokens` [`Contract`](/docs/api/stream/classes/Contract).[`partnerTokens`](/docs/api/stream/classes/Contract#partnertokens) | [packages/stream/solana/types.ts:506](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L506) | | `pauseCumulative` | `BN` | `AlignedStream.pauseCumulative` [`Contract`](/docs/api/stream/classes/Contract).[`pauseCumulative`](/docs/api/stream/classes/Contract#pausecumulative) | [packages/stream/solana/types.ts:544](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L544) | | `payer` | `string` | `AlignedStream.payer` [`Contract`](/docs/api/stream/classes/Contract).[`payer`](/docs/api/stream/classes/Contract#payer) | [packages/stream/solana/types.ts:552](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L552) | | `period` | `number` | `AlignedStream.period` [`Contract`](/docs/api/stream/classes/Contract).[`period`](/docs/api/stream/classes/Contract#period) | [packages/stream/solana/types.ts:512](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L512) | | `priceOracle` | `string` | - | [packages/stream/solana/types.ts:638](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L638) | | `proxyAddress` | `string` | - | [packages/stream/solana/types.ts:636](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L636) | | `recipient` | `string` | `AlignedStream.recipient` [`Contract`](/docs/api/stream/classes/Contract).[`recipient`](/docs/api/stream/classes/Contract#recipient) | [packages/stream/solana/types.ts:480](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L480) | | `recipientTokens` | `string` | `AlignedStream.recipientTokens` [`Contract`](/docs/api/stream/classes/Contract).[`recipientTokens`](/docs/api/stream/classes/Contract#recipienttokens) | [packages/stream/solana/types.ts:482](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L482) | | `sender` | `string` | `AlignedStream.sender` [`Contract`](/docs/api/stream/classes/Contract).[`sender`](/docs/api/stream/classes/Contract#sender) | [packages/stream/solana/types.ts:476](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L476) | | `senderTokens` | `string` | `AlignedStream.senderTokens` [`Contract`](/docs/api/stream/classes/Contract).[`senderTokens`](/docs/api/stream/classes/Contract#sendertokens) | [packages/stream/solana/types.ts:478](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L478) | | `start` | `number` | `AlignedStream.start` [`Contract`](/docs/api/stream/classes/Contract).[`start`](/docs/api/stream/classes/Contract#start) | [packages/stream/solana/types.ts:508](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L508) | | `streamflowFeePercent` | `number` | `AlignedStream.streamflowFeePercent` [`Contract`](/docs/api/stream/classes/Contract).[`streamflowFeePercent`](/docs/api/stream/classes/Contract#streamflowfeepercent) | [packages/stream/solana/types.ts:496](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L496) | | `streamflowFeeTotal` | `BN` | `AlignedStream.streamflowFeeTotal` [`Contract`](/docs/api/stream/classes/Contract).[`streamflowFeeTotal`](/docs/api/stream/classes/Contract#streamflowfeetotal) | [packages/stream/solana/types.ts:492](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L492) | | `streamflowFeeWithdrawn` | `BN` | `AlignedStream.streamflowFeeWithdrawn` [`Contract`](/docs/api/stream/classes/Contract).[`streamflowFeeWithdrawn`](/docs/api/stream/classes/Contract#streamflowfeewithdrawn) | [packages/stream/solana/types.ts:494](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L494) | | `streamflowTreasury` | `string` | `AlignedStream.streamflowTreasury` [`Contract`](/docs/api/stream/classes/Contract).[`streamflowTreasury`](/docs/api/stream/classes/Contract#streamflowtreasury) | [packages/stream/solana/types.ts:488](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L488) | | `streamflowTreasuryTokens` | `string` | `AlignedStream.streamflowTreasuryTokens` [`Contract`](/docs/api/stream/classes/Contract).[`streamflowTreasuryTokens`](/docs/api/stream/classes/Contract#streamflowtreasurytokens) | [packages/stream/solana/types.ts:490](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L490) | | `tickSize` | `number` | - | [packages/stream/solana/types.ts:634](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L634) | | `transferableByRecipient` | `boolean` | `AlignedStream.transferableByRecipient` [`Contract`](/docs/api/stream/classes/Contract).[`transferableByRecipient`](/docs/api/stream/classes/Contract#transferablebyrecipient) | [packages/stream/solana/types.ts:528](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L528) | | `transferableBySender` | `boolean` | `AlignedStream.transferableBySender` [`Contract`](/docs/api/stream/classes/Contract).[`transferableBySender`](/docs/api/stream/classes/Contract#transferablebysender) | [packages/stream/solana/types.ts:526](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L526) | | `type` | [`StreamType`](/docs/api/stream/enumerations/StreamType) | `AlignedStream.type` [`Contract`](/docs/api/stream/classes/Contract).[`type`](/docs/api/stream/classes/Contract#type) | [packages/stream/solana/types.ts:556](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L556) | | `version` | `number` | `AlignedStream.version` [`Contract`](/docs/api/stream/classes/Contract).[`version`](/docs/api/stream/classes/Contract#version) | [packages/stream/solana/types.ts:464](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L464) | | `withdrawalFrequency` | `number` | `AlignedStream.withdrawalFrequency` [`Contract`](/docs/api/stream/classes/Contract).[`withdrawalFrequency`](/docs/api/stream/classes/Contract#withdrawalfrequency) | [packages/stream/solana/types.ts:534](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L534) | | `withdrawnAmount` | `BN` | `AlignedStream.withdrawnAmount` [`Contract`](/docs/api/stream/classes/Contract).[`withdrawnAmount`](/docs/api/stream/classes/Contract#withdrawnamount) | [packages/stream/solana/types.ts:468](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L468) | ## Methods [#methods] ### remaining() [#remaining] ```ts remaining(decimals): number; ``` Defined in: [types.ts:620](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L620) #### Parameters [#parameters-1] | Parameter | Type | | ---------- | -------- | | `decimals` | `number` | #### Returns [#returns-1] `number` #### Implementation of [#implementation-of] ```ts AlignedStream.remaining ``` #### Inherited from [#inherited-from] [`Contract`](/docs/api/stream/classes/Contract).[`remaining`](/docs/api/stream/classes/Contract#remaining) *** ### unlocked() [#unlocked] ```ts unlocked(currentTimestamp): BN; ``` Defined in: [types.ts:613](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L613) #### Parameters [#parameters-2] | Parameter | Type | | ------------------ | -------- | | `currentTimestamp` | `number` | #### Returns [#returns-2] `BN` #### Implementation of [#implementation-of-1] ```ts AlignedStream.unlocked ``` #### Inherited from [#inherited-from-1] [`Contract`](/docs/api/stream/classes/Contract).[`unlocked`](/docs/api/stream/classes/Contract#unlocked) # Contract URL: /docs/api/stream/classes/Contract # Contract [#contract] Defined in: [types.ts:461](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L461) ## Extended by [#extended-by] * [`AlignedContract`](/docs/api/stream/classes/AlignedContract) ## Implements [#implements] * [`LinearStream`](/docs/api/stream/interfaces/LinearStream) ## Constructors [#constructors] ### Constructor [#constructor] ```ts new Contract(stream): Contract; ``` Defined in: [types.ts:560](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L560) #### Parameters [#parameters] | Parameter | Type | | --------- | ------------------------------------------------------------ | | `stream` | [`DecodedStream`](/docs/api/stream/interfaces/DecodedStream) | #### Returns [#returns] `Contract` ## Properties [#properties] | Property | Type | Defined in | | ------------------------------------------------------------------------ | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `amountPerPeriod` | `BN` | [packages/stream/solana/types.ts:514](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L514) | | `automaticWithdrawal` | `boolean` | [packages/stream/solana/types.ts:524](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L524) | | `bump` | `number` | [packages/stream/solana/types.ts:554](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L554) | | `cancelableByRecipient` | `boolean` | [packages/stream/solana/types.ts:522](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L522) | | `cancelableBySender` | `boolean` | [packages/stream/solana/types.ts:520](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L520) | | `canceledAt` | `number` | [packages/stream/solana/types.ts:470](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L470) | | `canTopup` | `boolean` | [packages/stream/solana/types.ts:530](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L530) | | `cliff` | `number` | [packages/stream/solana/types.ts:516](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L516) | | `cliffAmount` | `BN` | [packages/stream/solana/types.ts:518](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L518) | | `closed` | `boolean` | [packages/stream/solana/types.ts:540](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L540) | | `createdAt` | `number` | [packages/stream/solana/types.ts:466](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L466) | | `currentPauseStart` | `number` | [packages/stream/solana/types.ts:542](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L542) | | `depositedAmount` | `BN` | [packages/stream/solana/types.ts:510](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L510) | | `end` | `number` | [packages/stream/solana/types.ts:472](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L472) | | `escrowTokens` | `string` | [packages/stream/solana/types.ts:486](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L486) | | `fundsUnlockedAtLastRateChange` | `BN` | [packages/stream/solana/types.ts:548](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L548) | | `isAligned` | `boolean` | [packages/stream/solana/types.ts:558](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L558) | | `isPda` | `boolean` | [packages/stream/solana/types.ts:536](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L536) | | `lastRateChangeTime` | `number` | [packages/stream/solana/types.ts:546](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L546) | | `lastWithdrawnAt` | `number` | [packages/stream/solana/types.ts:474](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L474) | | `magic` | `number` | [packages/stream/solana/types.ts:462](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L462) | | `mint` | `string` | [packages/stream/solana/types.ts:484](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L484) | | `name` | `string` | [packages/stream/solana/types.ts:532](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L532) | | `nonce` | `number` | [packages/stream/solana/types.ts:538](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L538) | | `oldMetadata` | `PublicKey` | [packages/stream/solana/types.ts:550](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L550) | | `partner` | `string` | [packages/stream/solana/types.ts:504](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L504) | | `partnerFeePercent` | `number` | [packages/stream/solana/types.ts:502](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L502) | | `partnerFeeTotal` | `BN` | [packages/stream/solana/types.ts:498](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L498) | | `partnerFeeWithdrawn` | `BN` | [packages/stream/solana/types.ts:500](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L500) | | `partnerTokens` | `string` | [packages/stream/solana/types.ts:506](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L506) | | `pauseCumulative` | `BN` | [packages/stream/solana/types.ts:544](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L544) | | `payer` | `string` | [packages/stream/solana/types.ts:552](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L552) | | `period` | `number` | [packages/stream/solana/types.ts:512](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L512) | | `recipient` | `string` | [packages/stream/solana/types.ts:480](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L480) | | `recipientTokens` | `string` | [packages/stream/solana/types.ts:482](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L482) | | `sender` | `string` | [packages/stream/solana/types.ts:476](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L476) | | `senderTokens` | `string` | [packages/stream/solana/types.ts:478](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L478) | | `start` | `number` | [packages/stream/solana/types.ts:508](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L508) | | `streamflowFeePercent` | `number` | [packages/stream/solana/types.ts:496](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L496) | | `streamflowFeeTotal` | `BN` | [packages/stream/solana/types.ts:492](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L492) | | `streamflowFeeWithdrawn` | `BN` | [packages/stream/solana/types.ts:494](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L494) | | `streamflowTreasury` | `string` | [packages/stream/solana/types.ts:488](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L488) | | `streamflowTreasuryTokens` | `string` | [packages/stream/solana/types.ts:490](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L490) | | `transferableByRecipient` | `boolean` | [packages/stream/solana/types.ts:528](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L528) | | `transferableBySender` | `boolean` | [packages/stream/solana/types.ts:526](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L526) | | `type` | [`StreamType`](/docs/api/stream/enumerations/StreamType) | [packages/stream/solana/types.ts:556](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L556) | | `version` | `number` | [packages/stream/solana/types.ts:464](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L464) | | `withdrawalFrequency` | `number` | [packages/stream/solana/types.ts:534](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L534) | | `withdrawnAmount` | `BN` | [packages/stream/solana/types.ts:468](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L468) | ## Methods [#methods] ### remaining() [#remaining] ```ts remaining(decimals): number; ``` Defined in: [types.ts:620](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L620) #### Parameters [#parameters-1] | Parameter | Type | | ---------- | -------- | | `decimals` | `number` | #### Returns [#returns-1] `number` #### Implementation of [#implementation-of] [`LinearStream`](/docs/api/stream/interfaces/LinearStream).[`remaining`](/docs/api/stream/interfaces/LinearStream#remaining) *** ### unlocked() [#unlocked] ```ts unlocked(currentTimestamp): BN; ``` Defined in: [types.ts:613](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L613) #### Parameters [#parameters-2] | Parameter | Type | | ------------------ | -------- | | `currentTimestamp` | `number` | #### Returns [#returns-2] `BN` #### Implementation of [#implementation-of-1] [`LinearStream`](/docs/api/stream/interfaces/LinearStream).[`unlocked`](/docs/api/stream/interfaces/LinearStream#unlocked) # ContractError URL: /docs/api/stream/classes/ContractError # ContractError [#contracterror] Defined in: packages/common/dist/esm/solana/index.d.ts:1094 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: packages/common/dist/esm/solana/index.d.ts:1102 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/dist/esm/solana/index.d.ts:1095 | | `description` | `public` | `string` | - | - | packages/common/dist/esm/solana/index.d.ts:1096 | | `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 ``` # SolanaStreamClient URL: /docs/api/stream/classes/SolanaStreamClient # SolanaStreamClient [#solanastreamclient] Defined in: [StreamClient.ts:147](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L147) ## Constructors [#constructors] ### Constructor [#constructor] ```ts new SolanaStreamClient( clusterUrl, cluster?, commitment?, programId?, sendRate?, sendThrottler?): SolanaStreamClient; ``` Defined in: [StreamClient.ts:167](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L167) Create Stream instance with flat arguments #### Parameters [#parameters] | Parameter | Type | | ---------------- | ---------------------------------------------------- | | `clusterUrl` | `string` | | `cluster?` | [`ICluster`](/docs/api/stream/enumerations/ICluster) | | `commitment?` | `Commitment` \| `ConnectionConfig` | | `programId?` | `string` | | `sendRate?` | `number` | | `sendThrottler?` | `PQueue` | #### Returns [#returns] `SolanaStreamClient` ### Constructor [#constructor-1] ```ts new SolanaStreamClient(options): SolanaStreamClient; ``` Defined in: [StreamClient.ts:179](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L179) Create Stream instance with options #### Parameters [#parameters-1] | Parameter | Type | | --------- | ---------------------------------------------------------------------------- | | `options` | [`ClientCreationOptions`](/docs/api/stream/interfaces/ClientCreationOptions) | #### Returns [#returns-1] `SolanaStreamClient` ## Properties [#properties] | Property | Modifier | Type | Defined in | | ---------------------------------------------------- | ---------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | | `alignedProxyProgram` | `readonly` | `Program`\<`StreamflowAlignedUnlocks`> | [packages/stream/solana/StreamClient.ts:158](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L158) | ## Methods [#methods] ### buildCreateMultipleTransactionInstructions() [#buildcreatemultipletransactioninstructions] ```ts buildCreateMultipleTransactionInstructions( data, extParams, applyCustomAfterInstructions?): Promise<{ instructionsBatch: object[]; metadatas: string[]; metadataToRecipient: MetadataRecipientHashMap; prepareInstructions: TransactionInstruction[]; }>; ``` Defined in: [StreamClient.ts:839](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L839) Builds transaction instructions for creating multiple stream/vesting contracts without creating transactions. All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee). #### Parameters [#parameters-2] | Parameter | Type | Default value | Description | | ------------------------------ | -------------------------------------------------------------------------------------- | ------------- | ----------------------------------------------------------------------------------------------------- | | `data` | [`ICreateMultipleStreamData`](/docs/api/stream/type-aliases/ICreateMultipleStreamData) | `undefined` | Stream base parameters and array of recipients with individual amounts and settings | | `extParams` | [`IPrepareCreateStreamExt`](/docs/api/stream/interfaces/IPrepareCreateStreamExt) | `undefined` | Transaction configuration including sender public key, native token handling, and custom instructions | | `applyCustomAfterInstructions` | `boolean` | `true` | - | #### Returns [#returns-2] `Promise`\<\{ `instructionsBatch`: `object`\[]; `metadatas`: `string`\[]; `metadataToRecipient`: [`MetadataRecipientHashMap`](/docs/api/stream/interfaces/MetadataRecipientHashMap); `prepareInstructions`: `TransactionInstruction`\[]; }> Create multiple transaction instructions *** ### buildCreateMultipleTransactions() [#buildcreatemultipletransactions] ```ts buildCreateMultipleTransactions( data, extParams, applyCustomAfterInstructions?): Promise<{ context: any; hash: Readonly<{ blockhash: string; lastValidBlockHeight: number; }>; metadatas: string[]; metadataToRecipient: MetadataRecipientHashMap; prepareTx?: VersionedTransaction; transactions: BatchItem[]; }>; ``` Defined in: [StreamClient.ts:942](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L942) Builds multiple transactions for creating stream/vesting contracts without signing or executing them. All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee). IMPORTANT: When using native SOL (isNative: true), you MUST execute the prepareTx FIRST and wait for confirmation before executing the stream creation transactions. Otherwise, stream creation will fail with "InvalidAccountData". #### Parameters [#parameters-3] | Parameter | Type | Default value | Description | | ------------------------------ | -------------------------------------------------------------------------------------- | ------------- | ----------------------------------------------------------------------------------------------------- | | `data` | [`ICreateMultipleStreamData`](/docs/api/stream/type-aliases/ICreateMultipleStreamData) | `undefined` | Stream base parameters and array of recipients with individual amounts and settings | | `extParams` | [`IPrepareCreateStreamExt`](/docs/api/stream/interfaces/IPrepareCreateStreamExt) | `undefined` | Transaction configuration including sender public key, native token handling, and custom instructions | | `applyCustomAfterInstructions` | `boolean` | `true` | - | #### Returns [#returns-3] `Promise`\<\{ `context`: `any`; `hash`: `Readonly`\<\{ `blockhash`: `string`; `lastValidBlockHeight`: `number`; }>; `metadatas`: `string`\[]; `metadataToRecipient`: [`MetadataRecipientHashMap`](/docs/api/stream/interfaces/MetadataRecipientHashMap); `prepareTx?`: `VersionedTransaction`; `transactions`: [`BatchItem`](/docs/api/stream/interfaces/BatchItem)\[]; }> Multiple transaction information #### Example [#example] ```typescript const result = await streamClient.buildCreateMultipleTransactions(data, { isNative: true, senderPublicKey }); // CRITICAL: Execute prepareTx first if it exists if (result.prepareTx) { await connection.sendAndConfirmTransaction(result.prepareTx, [signer]); } // Only then execute stream creation transactions for (const item of result.transactions) { await connection.sendAndConfirmTransaction(item.tx, [signer]); } ``` *** ### buildCreateTransaction() [#buildcreatetransaction] ```ts buildCreateTransaction(data, extParams): Promise<{ context: any; hash: string; metadata?: Keypair; metadataId: string; tx: VersionedTransaction; }>; ``` Defined in: [StreamClient.ts:349](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L349) Builds a transaction for creating a new stream/vesting contract without signing or executing it. All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee). For native SOL (isNative: true), SOL wrapping instructions are automatically included in the correct order (before stream creation) to ensure the WSOL account exists when the stream creation instruction executes. #### Parameters [#parameters-4] | Parameter | Type | Description | | ----------- | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | | `data` | [`ICreateStreamData`](/docs/api/stream/type-aliases/ICreateStreamData) | Stream parameters including recipient, token, amount, schedule, and permissions | | `extParams` | [`IPrepareCreateStreamExt`](/docs/api/stream/interfaces/IPrepareCreateStreamExt) | Transaction configuration including sender public key, native token handling, and custom instructions | #### Returns [#returns-4] `Promise`\<\{ `context`: `any`; `hash`: `string`; `metadata?`: `Keypair`; `metadataId`: `string`; `tx`: `VersionedTransaction`; }> Transaction and metadata information *** ### buildCreateTransactionInstructions() [#buildcreatetransactioninstructions] ```ts buildCreateTransactionInstructions(data, extParams): Promise<{ ixs: TransactionInstruction[]; metadata?: Keypair; metadataId: string; }>; ``` Defined in: [StreamClient.ts:284](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L284) Builds transaction instructions for creating a new stream/vesting contract without creating a transaction. All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee). For native SOL (isNative: true), SOL wrapping instructions are automatically included in the correct order (before stream creation) to ensure the WSOL account exists when the stream creation instruction executes. #### Parameters [#parameters-5] | Parameter | Type | Description | | ----------- | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | | `data` | [`ICreateStreamData`](/docs/api/stream/type-aliases/ICreateStreamData) | Stream parameters including recipient, token, amount, schedule, and permissions | | `extParams` | [`IPrepareCreateStreamExt`](/docs/api/stream/interfaces/IPrepareCreateStreamExt) | Transaction configuration including sender public key, native token handling, and custom instructions | #### Returns [#returns-5] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; `metadata?`: `Keypair`; `metadataId`: `string`; }> Transaction instructions and metadata ID *** ### cancel() [#cancel] ```ts cancel(cancelData, extParams): Promise; ``` Defined in: [StreamClient.ts:1248](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1248) Attempts canceling the specified stream. #### Parameters [#parameters-6] | Parameter | Type | Description | | ------------ | ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | `cancelData` | [`IInteractData`](/docs/api/stream/interfaces/IInteractData) | Cancellation parameters including stream ID | | `extParams` | [`IInteractStreamExt`](/docs/api/stream/interfaces/IInteractStreamExt) | Transaction configuration including invoker wallet, token account validation, and compute settings | #### Returns [#returns-6] `Promise`\<[`ITransactionResult`](/docs/api/stream/interfaces/ITransactionResult)> Transaction result *** ### create() [#create] ```ts create(data, extParams): Promise; ``` Defined in: [StreamClient.ts:383](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L383) Creates a new stream/vesting contract. All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee). #### Parameters [#parameters-7] | Parameter | Type | Description | | ----------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `data` | [`ICreateStreamData`](/docs/api/stream/type-aliases/ICreateStreamData) | Stream parameters including recipient, token, amount, schedule, and permissions | | `extParams` | [`ICreateStreamExt`](/docs/api/stream/interfaces/ICreateStreamExt) | Transaction configuration including sender wallet, native token handling, and compute settings | #### Returns [#returns-7] `Promise`\<[`ICreateResult`](/docs/api/stream/interfaces/ICreateResult)> Create result *** ### createMultiple() [#createmultiple] ```ts createMultiple(data, extParams): Promise; ``` Defined in: [StreamClient.ts:988](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L988) Creates multiple stream/vesting contracts. All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee). #### Parameters [#parameters-8] | Parameter | Type | Description | | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `data` | \| [`ICreateMultipleStreamData`](/docs/api/stream/type-aliases/ICreateMultipleStreamData) \| [`ICreateMultipleStreamData`](/docs/api/stream/type-aliases/ICreateMultipleStreamData)\[] | Stream base parameters and array of recipients with individual amounts and settings | | `extParams` | [`ICreateStreamExt`](/docs/api/stream/interfaces/ICreateStreamExt) | Transaction configuration including sender wallet, metadata keys, and compute settings | #### Returns [#returns-8] `Promise`\<[`IMultiTransactionResult`](/docs/api/stream/interfaces/IMultiTransactionResult)> Multiple transaction information *** ### createMultipleSequential() [#createmultiplesequential] ```ts createMultipleSequential(data, extParams): Promise; ``` Defined in: [StreamClient.ts:1074](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1074) Creates multiple stream/vesting contracts, and send all transactions sequentially. All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee). In most cases, createMultiple should be used instead. #### Parameters [#parameters-9] | Parameter | Type | Description | | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `data` | \| [`ICreateMultipleStreamData`](/docs/api/stream/type-aliases/ICreateMultipleStreamData) \| [`ICreateMultipleStreamData`](/docs/api/stream/type-aliases/ICreateMultipleStreamData)\[] | Stream base parameters and array of recipients with individual amounts and settings | | `extParams` | [`ICreateStreamExt`](/docs/api/stream/interfaces/ICreateStreamExt) | Transaction configuration including sender wallet, metadata keys, and compute settings | #### Returns [#returns-9] `Promise`\<[`IMultiTransactionResult`](/docs/api/stream/interfaces/IMultiTransactionResult)> Multiple transaction information *** ### createUnchecked() [#createunchecked] ```ts createUnchecked(data, extParams): Promise; ``` Defined in: [StreamClient.ts:684](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L684) Creates a new stream/vesting contract using unchecked instruction. Unchecked instruction differs from the regular in: * does not check for initialized associated token account (wallets with no control over their ATA should not be used as sender/recipient/partner or there are risks of funds being locked in the contract) * initialized contract PDA off chain If you are not sure if you should use create or create\_unchecked, go for create to be safer. #### Parameters [#parameters-10] | Parameter | Type | Description | | ----------- | ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `data` | [`ICreateStreamData`](/docs/api/stream/type-aliases/ICreateStreamData) | Stream parameters including recipient, token, amount, schedule, and permissions | | `extParams` | [`ICreateStreamExt`](/docs/api/stream/interfaces/ICreateStreamExt) | Transaction configuration including sender wallet, metadata keys, and compute settings | #### Returns [#returns-10] `Promise`\<[`ICreateResult`](/docs/api/stream/interfaces/ICreateResult)> Create result *** ### extractErrorCode() [#extracterrorcode] ```ts extractErrorCode(err): string; ``` Defined in: [StreamClient.ts:1947](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1947) Extracts error code from an error #### Parameters [#parameters-11] | Parameter | Type | Description | | --------- | ------- | ----------- | | `err` | `Error` | Error | #### Returns [#returns-11] `string` Error code *** ### get() [#get] ```ts get(getData): Promise<[string, Stream][]>; ``` Defined in: [StreamClient.ts:1663](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1663) Fetch streams/contracts by providing direction. Streams are sorted by start time in ascending order. #### Parameters [#parameters-12] | Parameter | Type | Description | | --------- | -------------------------------------------------------- | ---------------------------------------------------------------------------- | | `getData` | [`IGetAllData`](/docs/api/stream/interfaces/IGetAllData) | Query parameters including address, stream type filter, and direction filter | #### Returns [#returns-12] `Promise`\<\[`string`, [`Stream`](/docs/api/stream/type-aliases/Stream)]\[]> Record of stream data *** ### getAlignedProxyProgramId() [#getalignedproxyprogramid] ```ts getAlignedProxyProgramId(): string; ``` Defined in: [StreamClient.ts:269](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L269) #### Returns [#returns-13] `string` *** ### getClosedStreams() [#getclosedstreams] ```ts getClosedStreams(owner, direction?): Promise>; ``` Defined in: [StreamClient.ts:1988](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1988) Gets closed streams for a given owner and direction #### Parameters [#parameters-13] | Parameter | Type | Default value | Description | | ----------- | ------------------------------------------------------------------ | --------------------- | ---------------- | | `owner` | `string` | `undefined` | Owner address | | `direction` | [`StreamDirection`](/docs/api/stream/enumerations/StreamDirection) | `StreamDirection.All` | Stream direction | #### Returns [#returns-14] `Promise`\<`Record`\<`string`, [`Stream`](/docs/api/stream/type-aliases/Stream)>> Record of closed streams *** ### getCommitment() [#getcommitment] ```ts getCommitment(): Commitment; ``` Defined in: [StreamClient.ts:261](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L261) #### Returns [#returns-15] `Commitment` *** ### getConnection() [#getconnection] ```ts getConnection(): Connection; ``` Defined in: [StreamClient.ts:257](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L257) #### Returns [#returns-16] `Connection` *** ### getDefaultFees() [#getdefaultfees] ```ts getDefaultFees(): Promise; ``` Defined in: [StreamClient.ts:1917](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1917) Get all defaults fees applied by the protocol. Protocol will use fees set for WITHDRAWOR as default if they are set. #### Returns [#returns-17] `Promise`\<[`IFees`](/docs/api/stream/interfaces/IFees)> *** ### getDefaultStreamflowFee() [#getdefaultstreamflowfee] ```ts getDefaultStreamflowFee(): Promise; ``` Defined in: [StreamClient.ts:1908](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1908) Gets default streamflow fee #### Returns [#returns-18] `Promise`\<`number`> Default streamflow fee *** ### getFees() [#getfees] ```ts getFees(getData): Promise; ``` Defined in: [StreamClient.ts:1882](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1882) Gets fees for a given address #### Parameters [#parameters-14] | Parameter | Type | Description | | --------- | ---------------------------------------------------------- | ------------------------------------------------------------------------ | | `getData` | [`IGetFeesData`](/docs/api/stream/interfaces/IGetFeesData) | Query parameters containing the partner address to check for custom fees | #### Returns [#returns-19] `Promise`\<[`IFees`](/docs/api/stream/interfaces/IFees)> Fees *** ### getOne() [#getone] ```ts getOne(getData): Promise; ``` Defined in: [StreamClient.ts:1556](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1556) Fetch stream data by its id (address). #### Parameters [#parameters-15] | Parameter | Type | Description | | --------- | ------------------------------------------------------------ | -------------------------------------------------- | | `getData` | [`IInteractData`](/docs/api/stream/interfaces/IInteractData) | Query parameters containing the stream ID to fetch | #### Returns [#returns-20] `Promise`\<[`Stream`](/docs/api/stream/type-aliases/Stream)> Stream data *** ### getProgramId() [#getprogramid] ```ts getProgramId(): string; ``` Defined in: [StreamClient.ts:265](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L265) #### Returns [#returns-21] `string` *** ### getTotalFee() [#gettotalfee] ```ts getTotalFee(getFeesData): Promise; ``` Defined in: [StreamClient.ts:1934](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1934) Returns total fee percent, streamflow fees + partner fees #### Parameters [#parameters-16] | Parameter | Type | Description | | ------------- | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `getFeesData` | [`IGetFeesData`](/docs/api/stream/interfaces/IGetFeesData) | structure with address for which we need to derive fee, either sender or partner usually | #### Returns [#returns-22] `Promise`\<`number`> fee as floating number, so if fee is 0.99%, it will return 0.99 *** ### isAlignedUnlock() [#isalignedunlock] ```ts isAlignedUnlock(streamPublicKey, senderPublicKey): boolean; ``` Defined in: [StreamClient.ts:1956](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1956) Utility function that checks whether the associated stream address is an aligned unlock contract, indicated by whether the sender/creator is a PDA. For migrated streams, the PDA was derived from the old metadata key. #### Parameters [#parameters-17] | Parameter | Type | | ----------------- | ----------- | | `streamPublicKey` | `PublicKey` | | `senderPublicKey` | `PublicKey` | #### Returns [#returns-23] `boolean` *** ### prepareCancelAlignedUnlockInstructions() [#preparecancelalignedunlockinstructions] ```ts prepareCancelAlignedUnlockInstructions(cancelData, extParams): Promise; ``` Defined in: [StreamClient.ts:1297](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1297) Creates Transaction Instructions for cancel #### Parameters [#parameters-18] | Parameter | Type | Description | | ------------ | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | `cancelData` | [`IInteractData`](/docs/api/stream/interfaces/IInteractData) | Cancellation parameters including stream ID | | `extParams` | [`IPrepareStreamExt`](/docs/api/stream/interfaces/IPrepareStreamExt) | Transaction configuration including invoker wallet, token account validation, and compute settings | #### Returns [#returns-24] `Promise`\<`TransactionInstruction`\[]> Transaction instructions *** ### prepareCancelInstructions() [#preparecancelinstructions] ```ts prepareCancelInstructions(cancelData, extParams): Promise; ``` Defined in: [StreamClient.ts:1272](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1272) Creates Transaction Instructions for cancel #### Parameters [#parameters-19] | Parameter | Type | Description | | ------------ | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | `cancelData` | [`IInteractData`](/docs/api/stream/interfaces/IInteractData) | Cancellation parameters including stream ID | | `extParams` | [`IPrepareStreamExt`](/docs/api/stream/interfaces/IPrepareStreamExt) | Transaction configuration including invoker wallet address, token account validation, and compute settings | #### Returns [#returns-25] `Promise`\<`TransactionInstruction`\[]> Transaction instructions *** ### prepareCancelLinearStream() [#preparecancellinearstream] ```ts prepareCancelLinearStream(cancelData, extParams): Promise; ``` Defined in: [StreamClient.ts:1349](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1349) Creates Transaction Instructions for cancel #### Parameters [#parameters-20] | Parameter | Type | Description | | ------------ | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | `cancelData` | [`IInteractData`](/docs/api/stream/interfaces/IInteractData) | Cancellation parameters including stream ID | | `extParams` | [`IPrepareStreamExt`](/docs/api/stream/interfaces/IPrepareStreamExt) | Transaction configuration including invoker wallet, token account validation, and compute settings | #### Returns [#returns-26] `Promise`\<`TransactionInstruction`\[]> Transaction instructions *** ### prepareCreateAlignedUnlockInstructions() [#preparecreatealignedunlockinstructions] ```ts prepareCreateAlignedUnlockInstructions(streamParams, extParams): Promise; ``` Defined in: [StreamClient.ts:423](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L423) #### Parameters [#parameters-21] | Parameter | Type | | -------------- | ------------------------------------------------------------------------------------ | | `streamParams` | [`ICreateAlignedStreamData`](/docs/api/stream/type-aliases/ICreateAlignedStreamData) | | `extParams` | [`IPrepareCreateStreamExt`](/docs/api/stream/interfaces/IPrepareCreateStreamExt) | #### Returns [#returns-27] `Promise`\<[`ICreateStreamInstructions`](/docs/api/stream/interfaces/ICreateStreamInstructions)> *** ### prepareCreateInstructions() [#preparecreateinstructions] ```ts prepareCreateInstructions(streamParams, extParams): Promise; ``` Defined in: [StreamClient.ts:412](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L412) #### Parameters [#parameters-22] | Parameter | Type | | -------------- | -------------------------------------------------------------------------------- | | `streamParams` | [`ICreateStreamData`](/docs/api/stream/type-aliases/ICreateStreamData) | | `extParams` | [`IPrepareCreateStreamExt`](/docs/api/stream/interfaces/IPrepareCreateStreamExt) | #### Returns [#returns-28] `Promise`\<[`ICreateStreamInstructions`](/docs/api/stream/interfaces/ICreateStreamInstructions)> *** ### prepareCreateLinearStreamInstructions() [#preparecreatelinearstreaminstructions] ```ts prepareCreateLinearStreamInstructions(data, extParams): Promise; ``` Defined in: [StreamClient.ts:561](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L561) Creates a new stream/vesting contract. All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee). #### Parameters [#parameters-23] | Parameter | Type | Description | | ----------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `data` | [`ICreateStreamData`](/docs/api/stream/type-aliases/ICreateStreamData) | Stream parameters including recipient, token, amount, schedule, and permissions | | `extParams` | [`IPrepareCreateStreamExt`](/docs/api/stream/interfaces/IPrepareCreateStreamExt) | Transaction configuration including sender wallet, metadata keys, and compute settings | #### Returns [#returns-29] `Promise`\<[`ICreateStreamInstructions`](/docs/api/stream/interfaces/ICreateStreamInstructions)> Create stream instructions *** ### prepareCreateUncheckedInstructions() [#preparecreateuncheckedinstructions] ```ts prepareCreateUncheckedInstructions(__namedParameters, __namedParameters): Promise<{ ixs: TransactionInstruction[]; metadata: Keypair; metadataPubKey: PublicKey; }>; ``` Defined in: [StreamClient.ts:711](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L711) Create Transaction instructions for `createUnchecked` #### Parameters [#parameters-24] | Parameter | Type | | ------------------- | -------------------------------------------------------------------------------- | | `__namedParameters` | [`ICreateStreamData`](/docs/api/stream/type-aliases/ICreateStreamData) | | `__namedParameters` | [`IPrepareCreateStreamExt`](/docs/api/stream/interfaces/IPrepareCreateStreamExt) | #### Returns [#returns-30] `Promise`\<\{ `ixs`: `TransactionInstruction`\[]; `metadata`: `Keypair`; `metadataPubKey`: `PublicKey`; }> *** ### prepareTopupInstructions() [#preparetopupinstructions] ```ts prepareTopupInstructions(topupData, extParams): Promise; ``` Defined in: [StreamClient.ts:1504](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1504) Create Transaction instructions for topup #### Parameters [#parameters-25] | Parameter | Type | Description | | ----------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | `topupData` | [`ITopUpData`](/docs/api/stream/interfaces/ITopUpData) | Top-up parameters including stream ID and amount to add | | `extParams` | [`ITopUpStreamExt`](/docs/api/stream/interfaces/ITopUpStreamExt) | Transaction configuration including invoker wallet, native token handling, and compute settings | #### Returns [#returns-31] `Promise`\<`TransactionInstruction`\[]> Transaction instructions *** ### prepareTransferInstructions() [#preparetransferinstructions] ```ts prepareTransferInstructions(transferData, extParams): Promise; ``` Defined in: [StreamClient.ts:1436](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1436) Attempts changing the stream/vesting contract's recipient (effectively transferring the stream/vesting contract). Potential associated token account rent fee (to make it rent-exempt) is paid by the transaction initiator. #### Parameters [#parameters-26] | Parameter | Type | Description | | -------------- | -------------------------------------------------------------------- | ----------------------------------------------------------------------- | | `transferData` | [`ITransferData`](/docs/api/stream/interfaces/ITransferData) | Transfer parameters including stream ID and new recipient address | | `extParams` | [`IPrepareStreamExt`](/docs/api/stream/interfaces/IPrepareStreamExt) | Transaction configuration including invoker wallet and compute settings | #### Returns [#returns-32] `Promise`\<`TransactionInstruction`\[]> Transaction instructions *** ### prepareUpdateInstructions() [#prepareupdateinstructions] ```ts prepareUpdateInstructions(data, extParams): Promise; ``` Defined in: [StreamClient.ts:1833](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1833) Create Transaction instructions for update #### Parameters [#parameters-27] | Parameter | Type | Description | | ----------- | -------------------------------------------------------------------- | ----------------------------------------------------------------------- | | `data` | [`IUpdateData`](/docs/api/stream/interfaces/IUpdateData) | Update parameters including stream ID and new settings | | `extParams` | [`IPrepareStreamExt`](/docs/api/stream/interfaces/IPrepareStreamExt) | Transaction configuration including invoker wallet and compute settings | #### Returns [#returns-33] `Promise`\<`TransactionInstruction`\[]> Transaction instructions *** ### prepareWithdrawInstructions() [#preparewithdrawinstructions] ```ts prepareWithdrawInstructions(withdrawData, extParams): Promise; ``` Defined in: [StreamClient.ts:1193](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1193) Creates Transaction Instructions for withdrawal #### Parameters [#parameters-28] | Parameter | Type | Description | | -------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | `withdrawData` | [`IWithdrawData`](/docs/api/stream/interfaces/IWithdrawData) | Withdrawal parameters including stream ID and amount to withdraw | | `extParams` | [`IPrepareStreamExt`](/docs/api/stream/interfaces/IPrepareStreamExt) | Transaction configuration including invoker wallet address, token account validation, and compute settings | #### Returns [#returns-34] `Promise`\<`TransactionInstruction`\[]> Transaction instructions *** ### searchStreams() [#searchstreams] ```ts searchStreams(data): Promise[]>; ``` Defined in: [StreamClient.ts:1735](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1735) Searches for streams/contracts by providing filters. #### Parameters [#parameters-29] | Parameter | Type | Description | | --------- | -------------------------------------------------------------- | -------------------------------------------------- | | `data` | [`ISearchStreams`](/docs/api/stream/interfaces/ISearchStreams) | Search by mint, sender, recipient or closed status | #### Returns [#returns-35] `Promise`\<`IProgramAccount`\<[`Stream`](/docs/api/stream/type-aliases/Stream)>\[]> Record of stream data *** ### topup() [#topup] ```ts topup(topupData, extParams): Promise; ``` Defined in: [StreamClient.ts:1480](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1480) Tops up stream account with specified amount. #### Parameters [#parameters-30] | Parameter | Type | Description | | ----------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | `topupData` | [`ITopUpData`](/docs/api/stream/interfaces/ITopUpData) | Top-up parameters including stream ID and amount to add | | `extParams` | [`ITopUpStreamExt`](/docs/api/stream/interfaces/ITopUpStreamExt) | Transaction configuration including invoker wallet, native token handling, and compute settings | #### Returns [#returns-36] `Promise`\<[`ITransactionResult`](/docs/api/stream/interfaces/ITransactionResult)> Transaction result *** ### transfer() [#transfer] ```ts transfer(transferData, extParams): Promise; ``` Defined in: [StreamClient.ts:1408](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1408) Attempts changing the stream/vesting contract's recipient (effectively transferring the stream/vesting contract). Potential associated token account rent fee (to make it rent-exempt) is paid by the transaction initiator. #### Parameters [#parameters-31] | Parameter | Type | Description | | -------------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- | | `transferData` | [`ITransferData`](/docs/api/stream/interfaces/ITransferData) | Transfer parameters including stream ID and new recipient address | | `extParams` | [`IInteractStreamExt`](/docs/api/stream/interfaces/IInteractStreamExt) | Transaction configuration including invoker wallet and compute settings | #### Returns [#returns-37] `Promise`\<[`ITransactionResult`](/docs/api/stream/interfaces/ITransactionResult)> Transaction result *** ### update() [#update] ```ts update(data, extParams): Promise; ``` Defined in: [StreamClient.ts:1803](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1803) Attempts updating the stream auto withdrawal params and amount per period #### Parameters [#parameters-32] | Parameter | Type | Description | | ----------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- | | `data` | [`IUpdateData`](/docs/api/stream/interfaces/IUpdateData) | Update parameters including stream ID and new settings | | `extParams` | [`IInteractStreamExt`](/docs/api/stream/interfaces/IInteractStreamExt) | Transaction configuration including invoker wallet and compute settings | #### Returns [#returns-38] `Promise`\<[`ITransactionResult`](/docs/api/stream/interfaces/ITransactionResult)> Transaction result *** ### withdraw() [#withdraw] ```ts withdraw(withdrawData, extParams): Promise; ``` Defined in: [StreamClient.ts:1158](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L1158) Attempts withdrawing from the specified stream. #### Parameters [#parameters-33] | Parameter | Type | Description | | -------------- | ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | `withdrawData` | [`IWithdrawData`](/docs/api/stream/interfaces/IWithdrawData) | Withdrawal parameters including stream ID and amount to withdraw | | `extParams` | [`IInteractStreamExt`](/docs/api/stream/interfaces/IInteractStreamExt) | Transaction configuration including invoker wallet, token account validation, and compute settings | #### Returns [#returns-39] `Promise`\<[`ITransactionResult`](/docs/api/stream/interfaces/ITransactionResult)> Transaction result # AlignedProxyErrorCode URL: /docs/api/stream/enumerations/AlignedProxyErrorCode # AlignedProxyErrorCode [#alignedproxyerrorcode] Defined in: [types.ts:308](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L308) ## Enumeration Members [#enumeration-members] | Enumeration Member | Value | Description | Defined in | | --------------------------------------------------------------------------------------- | ------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `AllFundsUnlocked` | `"AllFundsUnlocked"` | All funds are already unlocked | [packages/stream/solana/types.ts:346](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L346) | | `AmountAlreadyUpdated` | `"AmountAlreadyUpdated"` | Release amount has already been updated in this period | [packages/stream/solana/types.ts:343](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L343) | | `ArithmeticError` | `"ArithmeticError"` | Arithmetic error | [packages/stream/solana/types.ts:313](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L313) | | `InvalidOracleAccount` | `"InvalidOracleAccount"` | Invalid oracle account | [packages/stream/solana/types.ts:334](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L334) | | `InvalidOraclePrice` | `"InvalidOraclePrice"` | Invalid oracle price | [packages/stream/solana/types.ts:337](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L337) | | `InvalidPercentageBoundaries` | `"InvalidPercentageBoundaries"` | Provided percentage bounds are invalid | [packages/stream/solana/types.ts:325](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L325) | | `InvalidPriceBoundaries` | `"InvalidPriceBoundaries"` | Provided price bounds are invalid | [packages/stream/solana/types.ts:328](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L328) | | `InvalidStreamMetadata` | `"InvalidStreamMetadata"` | Invalid Stream Metadata | [packages/stream/solana/types.ts:340](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L340) | | `InvalidTickSize` | `"InvalidTickSize"` | Provided percentage tick size is invalid | [packages/stream/solana/types.ts:322](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L322) | | `PeriodTooShort` | `"PeriodTooShort"` | Provided period is too short, should be equal or more than 30 seconds | [packages/stream/solana/types.ts:319](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L319) | | `Unauthorized` | `"Unauthorized"` | Authority does not have permission for this action | [packages/stream/solana/types.ts:310](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L310) | | `UnsupportedOracle` | `"UnsupportedOracle"` | Unsupported price oracle | [packages/stream/solana/types.ts:331](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L331) | | `UnsupportedTokenExtensions` | `"UnsupportedTokenExtensions"` | Mint has unsupported Token Extensions | [packages/stream/solana/types.ts:316](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L316) | # ContractErrorCode URL: /docs/api/stream/enumerations/ContractErrorCode # ContractErrorCode [#contracterrorcode] Defined in: [types.ts:259](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L259) Error codes raised by Solana protocol specifically ## Enumeration Members [#enumeration-members] | Enumeration Member | Value | Description | Defined in | | --------------------------------------------------------------------------------------- | ------------------------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `AccountsNotWritable` | `"AccountsNotWritable"` | Accounts not writable | [packages/stream/solana/types.ts:261](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L261) | | `AlreadyPaused` | `"AlreadyPaused"` | Contract is already paused | [packages/stream/solana/types.ts:301](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L301) | | `AmountAvailableIsZero` | `"AmountAvailableIsZero"` | Amount currently available is zero | [packages/stream/solana/types.ts:289](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L289) | | `AmountIsZero` | `"AmountIsZero"` | Amount cannot be zero | [packages/stream/solana/types.ts:285](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L285) | | `AmountMoreThanAvailable` | `"AmountMoreThanAvailable"` | Amount requested is larger than available | [packages/stream/solana/types.ts:287](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L287) | | `ArithmeticError` | `"ArithmeticError"` | Arithmetic error | [packages/stream/solana/types.ts:291](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L291) | | `ContractClosed` | `"ContractClosed"` | Contract closed | [packages/stream/solana/types.ts:277](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L277) | | `InvalidDepositConfiguration` | `"InvalidDepositConfiguration"` | Invalid deposit configuration | [packages/stream/solana/types.ts:283](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L283) | | `InvalidEscrowAccount` | `"InvalidEscrowAccount"` | Invalid escrow account | [packages/stream/solana/types.ts:269](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L269) | | `InvalidMetadata` | `"InvalidMetadata"` | Invalid Metadata | [packages/stream/solana/types.ts:263](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L263) | | `InvalidMetadataAccount` | `"InvalidMetadataAccount"` | Invalid metadata account | [packages/stream/solana/types.ts:265](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L265) | | `InvalidMetadataSize` | `"InvalidMetadataSize"` | Metadata account data must be 1104 bytes long | [packages/stream/solana/types.ts:293](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L293) | | `InvalidTimestamps` | `"InvalidTimestamps"` | Given timestamps are invalid | [packages/stream/solana/types.ts:281](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L281) | | `InvalidTreasury` | `"InvalidTreasury"` | Invalid Streamflow Treasury accounts supplied | [packages/stream/solana/types.ts:279](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L279) | | `MetadataAccountMismatch` | `"MetadataAccountMismatch"` | Provided accounts don't match the ones in contract | [packages/stream/solana/types.ts:267](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L267) | | `MetadataNotRentExempt` | `"MetadataNotRentExempt"` | Meta account is not rent exempt | [packages/stream/solana/types.ts:305](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L305) | | `MintMismatch` | `"MintMismatch"` | Sender mint does not match accounts mint | [packages/stream/solana/types.ts:273](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L273) | | `NotAssociated` | `"NotAssociated"` | Provided account(s) is/are not valid associated token accounts | [packages/stream/solana/types.ts:271](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L271) | | `NotPaused` | `"NotPaused"` | Contract is not paused | [packages/stream/solana/types.ts:303](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L303) | | `SelfTransfer` | `"SelfTransfer"` | Contract is not transferable to the original recipient | [packages/stream/solana/types.ts:299](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L299) | | `TransferNotAllowed` | `"TransferNotAllowed"` | Recipient not transferable for account | [packages/stream/solana/types.ts:275](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L275) | | `Unauthorized` | `"Unauthorized"` | Authority does not have permission for this action | [packages/stream/solana/types.ts:297](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L297) | | `UninitializedMetadata` | `"UninitializedMetadata"` | Metadata state account must be initialized | [packages/stream/solana/types.ts:295](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L295) | # ICluster URL: /docs/api/stream/enumerations/ICluster # ICluster [#icluster] Defined in: packages/common/dist/esm/solana/index.d.ts:1078 ## Enumeration Members [#enumeration-members] | Enumeration Member | Value | Defined in | | ----------------------------------------------- | ----------- | ----------------------------------------------- | | `Devnet` | `"devnet"` | packages/common/dist/esm/solana/index.d.ts:1080 | | `Local` | `"local"` | packages/common/dist/esm/solana/index.d.ts:1082 | | `Mainnet` | `"mainnet"` | packages/common/dist/esm/solana/index.d.ts:1079 | | `Testnet` | `"testnet"` | packages/common/dist/esm/solana/index.d.ts:1081 | # StreamDirection URL: /docs/api/stream/enumerations/StreamDirection # StreamDirection [#streamdirection] Defined in: [types.ts:164](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L164) ## Enumeration Members [#enumeration-members] | Enumeration Member | Value | Defined in | | ------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------ | | `All` | `"all"` | [packages/stream/solana/types.ts:167](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L167) | | `Incoming` | `"incoming"` | [packages/stream/solana/types.ts:166](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L166) | | `Outgoing` | `"outgoing"` | [packages/stream/solana/types.ts:165](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L165) | # StreamType URL: /docs/api/stream/enumerations/StreamType # StreamType [#streamtype] Defined in: [types.ts:170](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L170) ## Enumeration Members [#enumeration-members] | Enumeration Member | Value | Defined in | | ----------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `All` | `"all"` | [packages/stream/solana/types.ts:171](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L171) | | `Lock` | `"lock"` | [packages/stream/solana/types.ts:173](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L173) | | `Vesting` | `"vesting"` | [packages/stream/solana/types.ts:172](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L172) | # buildLockBatchParams() URL: /docs/api/stream/functions/buildLockBatchParams # buildLockBatchParams() [#buildlockbatchparams] ```ts function buildLockBatchParams(params): ICreateMultipleLinearStreamData; ``` Defined in: [create-lock-batch.ts:23](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock-batch.ts#L23) ## Parameters [#parameters] | Parameter | Type | | --------- | ------------------------------------------------------------------------------ | | `params` | [`ICreateLockBatchParams`](/docs/api/stream/interfaces/ICreateLockBatchParams) | ## Returns [#returns] [`ICreateMultipleLinearStreamData`](/docs/api/stream/type-aliases/ICreateMultipleLinearStreamData) # buildLockParams() URL: /docs/api/stream/functions/buildLockParams # buildLockParams() [#buildlockparams] ```ts function buildLockParams(params): ICreateLinearStreamData; ``` Defined in: [create-lock.ts:19](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock.ts#L19) ## Parameters [#parameters] | Parameter | Type | | --------- | -------------------------------------------------------------------- | | `params` | [`ICreateLockParams`](/docs/api/stream/interfaces/ICreateLockParams) | ## Returns [#returns] [`ICreateLinearStreamData`](/docs/api/stream/type-aliases/ICreateLinearStreamData) # buildStreamType() URL: /docs/api/stream/functions/buildStreamType # buildStreamType() [#buildstreamtype] ```ts function buildStreamType(streamData): StreamType; ``` Defined in: [contractUtils.ts:129](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/contractUtils.ts#L129) ## Parameters [#parameters] | Parameter | Type | | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `streamData` | \{ `automaticWithdrawal`: `boolean`; `cancelableByRecipient`: `boolean`; `cancelableBySender`: `boolean`; `canTopup`: `boolean`; `cliff?`: `number`; `cliffAmount`: `BN`; `depositedAmount`: `BN`; `end?`: `number`; `maxPercentage?`: `number`; `maxPrice?`: `number`; `minPercentage?`: `number`; `minPrice?`: `number`; `transferableByRecipient`: `boolean`; `transferableBySender`: `boolean`; } | | `streamData.automaticWithdrawal` | `boolean` | | `streamData.cancelableByRecipient` | `boolean` | | `streamData.cancelableBySender` | `boolean` | | `streamData.canTopup` | `boolean` | | `streamData.cliff?` | `number` | | `streamData.cliffAmount` | `BN` | | `streamData.depositedAmount` | `BN` | | `streamData.end?` | `number` | | `streamData.maxPercentage?` | `number` | | `streamData.maxPrice?` | `number` | | `streamData.minPercentage?` | `number` | | `streamData.minPrice?` | `number` | | `streamData.transferableByRecipient` | `boolean` | | `streamData.transferableBySender` | `boolean` | ## Returns [#returns] [`StreamType`](/docs/api/stream/enumerations/StreamType) # buildTransaction() URL: /docs/api/stream/functions/buildTransaction # buildTransaction() [#buildtransaction] ```ts function buildTransaction( instructions, options, env): Promise; ``` Defined in: [build-transaction.ts:7](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/build-transaction.ts#L7) ## Parameters [#parameters] | Parameter | Type | | -------------- | -------------------------------------------------------------------------------- | | `instructions` | `TransactionInstruction`\[] | | `options` | [`BuildTransactionOptions`](/docs/api/stream/interfaces/BuildTransactionOptions) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) | ## Returns [#returns] `Promise`\<[`BuiltTransaction`](/docs/api/stream/interfaces/BuiltTransaction)> # buildVestingBatchParams() URL: /docs/api/stream/functions/buildVestingBatchParams # buildVestingBatchParams() [#buildvestingbatchparams] ```ts function buildVestingBatchParams(params): ICreateMultipleLinearStreamData; ``` Defined in: [create-vesting-batch.ts:33](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L33) ## Parameters [#parameters] | Parameter | Type | | --------- | ------------------------------------------------------------------------------------ | | `params` | [`ICreateVestingBatchParams`](/docs/api/stream/interfaces/ICreateVestingBatchParams) | ## Returns [#returns] [`ICreateMultipleLinearStreamData`](/docs/api/stream/type-aliases/ICreateMultipleLinearStreamData) # buildVestingParams() URL: /docs/api/stream/functions/buildVestingParams # buildVestingParams() [#buildvestingparams] ```ts function buildVestingParams(params): ICreateLinearStreamData; ``` Defined in: [create-vesting.ts:66](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L66) ## Parameters [#parameters] | Parameter | Type | | --------- | -------------------------------------------------------------------------- | | `params` | [`ICreateVestingParams`](/docs/api/stream/interfaces/ICreateVestingParams) | ## Returns [#returns] [`ICreateLinearStreamData`](/docs/api/stream/type-aliases/ICreateLinearStreamData) # calculateTotalAmountToDeposit() URL: /docs/api/stream/functions/calculateTotalAmountToDeposit # calculateTotalAmountToDeposit() [#calculatetotalamounttodeposit] ```ts function calculateTotalAmountToDeposit(depositedAmount, totalFee): BN; ``` Defined in: [utils.ts:47](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/lib/utils.ts#L47) Calculate total amount of a Contract including all fees. * first we convert fee floating to a BN with up to 4 decimals precision * then we reverse the fee with `FEE_MULTIPLIER` to safely multiply it by depositedAmount to receive a total number and not percentage of depositedAmount ## Parameters [#parameters] | Parameter | Type | Description | | ----------------- | -------- | --------------------------------------------------------------------------------------- | | `depositedAmount` | `BN` | deposited raw tokens | | `totalFee` | `number` | sum of all fees in percentage as floating number, e.g. 0.99% should be supplied as 0.99 | ## Returns [#returns] `BN` total tokens amount that Contract will retrieve from the Sender # calculateUnlockedAmount() URL: /docs/api/stream/functions/calculateUnlockedAmount # calculateUnlockedAmount() [#calculateunlockedamount] ```ts function calculateUnlockedAmount(__namedParameters): BN; ``` Defined in: [contractUtils.ts:26](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/contractUtils.ts#L26) ## Parameters [#parameters] | Parameter | Type | | ------------------- | -------------------------- | | `__namedParameters` | `ICalculateUnlockedAmount` | ## Returns [#returns] `BN` # cancel() URL: /docs/api/stream/functions/cancel # cancel() [#cancel] ```ts function cancel( params, invoker, env): Promise; ``` Defined in: [cancel.ts:5](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/cancel.ts#L5) ## Parameters [#parameters] | Parameter | Type | | --------- | ------------------------------------------------------------ | | `params` | [`IInteractData`](/docs/api/stream/interfaces/IInteractData) | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) | ## Returns [#returns] `Promise`\<[`InstructionResult`](/docs/api/stream/interfaces/InstructionResult)> # cancelStreamInstruction() URL: /docs/api/stream/functions/cancelStreamInstruction # cancelStreamInstruction() [#cancelstreaminstruction] ```ts function cancelStreamInstruction(programId, __namedParameters): Promise; ``` Defined in: [instructions.ts:546](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/instructions.ts#L546) ## Parameters [#parameters] | Parameter | Type | | ------------------- | ---------------- | | `programId` | `PublicKey` | | `__namedParameters` | `CancelAccounts` | ## Returns [#returns] `Promise`\<`TransactionInstruction`> # computeAmountPerPeriod() URL: /docs/api/stream/functions/computeAmountPerPeriod # computeAmountPerPeriod() [#computeamountperperiod] ```ts function computeAmountPerPeriod( amount, cliffAmount, duration, period): BN; ``` Defined in: [create-vesting.ts:50](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L50) ## Parameters [#parameters] | Parameter | Type | | ------------- | -------- | | `amount` | `BN` | | `cliffAmount` | `BN` | | `duration` | `number` | | `period` | `number` | ## Returns [#returns] `BN` # create() URL: /docs/api/stream/functions/create # create() [#create] ```ts function create( params, invoker, env): Promise; ``` Defined in: [create.ts:7](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create.ts#L7) ## Parameters [#parameters] | Parameter | Type | | --------- | --------------------------------------------------------------------------------------------------------- | | `params` | [`ICreateStreamData`](/docs/api/stream/type-aliases/ICreateStreamData) | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) & [`NativeOptions`](/docs/api/stream/interfaces/NativeOptions) | ## Returns [#returns] `Promise`\<[`CreateInstructionResult`](/docs/api/stream/interfaces/CreateInstructionResult)> # createBatch() URL: /docs/api/stream/functions/createBatch # createBatch() [#createbatch] ```ts function createBatch( params, invoker, env): Promise; ``` Defined in: [create-batch.ts:7](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-batch.ts#L7) ## Parameters [#parameters] | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `params` | \| [`ICreateMultipleLinearStreamData`](/docs/api/stream/type-aliases/ICreateMultipleLinearStreamData) \| [`ICreateMultipleAlignedStreamData`](/docs/api/stream/type-aliases/ICreateMultipleAlignedStreamData) | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) & [`NativeOptions`](/docs/api/stream/interfaces/NativeOptions) | ## Returns [#returns] `Promise`\<[`BatchInstructionResult`](/docs/api/stream/interfaces/BatchInstructionResult)> # createClient() URL: /docs/api/stream/functions/createClient # createClient() [#createclient] ```ts function createClient(options?): ApiClient; ``` Defined in: [client.ts:22](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/client.ts#L22) ## Parameters [#parameters] | Parameter | Type | | ---------- | ------------------------------------------------------------------ | | `options?` | [`ApiClientOptions`](/docs/api/stream/interfaces/ApiClientOptions) | ## Returns [#returns] [`ApiClient`](/docs/api/stream/interfaces/ApiClient) # createClientFromEnv() URL: /docs/api/stream/functions/createClientFromEnv # createClientFromEnv() [#createclientfromenv] ```ts function createClientFromEnv(env): SolanaStreamClient; ``` Defined in: [types.ts:149](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L149) ## Parameters [#parameters] | Parameter | Type | | --------- | ------------------------------------------ | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) | ## Returns [#returns] [`SolanaStreamClient`](/docs/api/stream/classes/SolanaStreamClient) # createLock() URL: /docs/api/stream/functions/createLock # createLock() [#createlock] ```ts function createLock( params, invoker, env): Promise; ``` Defined in: [create-lock.ts:46](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock.ts#L46) ## Parameters [#parameters] | Parameter | Type | | --------- | --------------------------------------------------------------------------------------------------------- | | `params` | [`ICreateLockParams`](/docs/api/stream/interfaces/ICreateLockParams) | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) & [`NativeOptions`](/docs/api/stream/interfaces/NativeOptions) | ## Returns [#returns] `Promise`\<[`CreateInstructionResult`](/docs/api/stream/interfaces/CreateInstructionResult)> # createLockBatch() URL: /docs/api/stream/functions/createLockBatch # createLockBatch() [#createlockbatch] ```ts function createLockBatch( params, invoker, env): Promise; ``` Defined in: [create-lock-batch.ts:50](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock-batch.ts#L50) ## Parameters [#parameters] | Parameter | Type | | --------- | --------------------------------------------------------------------------------------------------------- | | `params` | [`ICreateLockBatchParams`](/docs/api/stream/interfaces/ICreateLockBatchParams) | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) & [`NativeOptions`](/docs/api/stream/interfaces/NativeOptions) | ## Returns [#returns] `Promise`\<[`BatchInstructionResult`](/docs/api/stream/interfaces/BatchInstructionResult)> # createStreamInstruction() URL: /docs/api/stream/functions/createStreamInstruction # createStreamInstruction() [#createstreaminstruction] ```ts function createStreamInstruction( data, programId, accounts): Promise; ``` Defined in: [instructions.ts:57](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/instructions.ts#L57) ## Parameters [#parameters] | Parameter | Type | | ----------- | ---------------------- | | `data` | `CreateStreamData` | | `programId` | `PublicKey` | | `accounts` | `CreateStreamAccounts` | ## Returns [#returns] `Promise`\<`TransactionInstruction`> # createStreamV2Instruction() URL: /docs/api/stream/functions/createStreamV2Instruction # createStreamV2Instruction() [#createstreamv2instruction] ```ts function createStreamV2Instruction( data, programId, accounts): Promise; ``` Defined in: [instructions.ts:257](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/instructions.ts#L257) ## Parameters [#parameters] | Parameter | Type | | ----------- | ---------------------- | | `data` | `CreateStreamV2Data` | | `programId` | `PublicKey` | | `accounts` | `CreateStreamAccounts` | ## Returns [#returns] `Promise`\<`TransactionInstruction`> # createUncheckedStreamInstruction() URL: /docs/api/stream/functions/createUncheckedStreamInstruction # createUncheckedStreamInstruction() [#createuncheckedstreaminstruction] ```ts function createUncheckedStreamInstruction( data, programId, accounts): Promise; ``` Defined in: [instructions.ts:171](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/instructions.ts#L171) ## Parameters [#parameters] | Parameter | Type | | ----------- | ------------------------------- | | `data` | `CreateUncheckedStreamData` | | `programId` | `PublicKey` | | `accounts` | `CreateUncheckedStreamAccounts` | ## Returns [#returns] `Promise`\<`TransactionInstruction`> # createUncheckedStreamV2Instruction() URL: /docs/api/stream/functions/createUncheckedStreamV2Instruction # createUncheckedStreamV2Instruction() [#createuncheckedstreamv2instruction] ```ts function createUncheckedStreamV2Instruction( data, programId, accounts): Promise; ``` Defined in: [instructions.ts:359](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/instructions.ts#L359) ## Parameters [#parameters] | Parameter | Type | | ----------- | ------------------------------- | | `data` | `CreateUncheckedStreamV2Data` | | `programId` | `PublicKey` | | `accounts` | `CreateUncheckedStreamAccounts` | ## Returns [#returns] `Promise`\<`TransactionInstruction`> # createVesting() URL: /docs/api/stream/functions/createVesting # createVesting() [#createvesting] ## Call Signature [#call-signature] ```ts function createVesting( params, invoker, env): Promise; ``` Defined in: [create-vesting.ts:93](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L93) ### Parameters [#parameters] | Parameter | Type | | --------- | --------------------------------------------------------------------------------------------------------- | | `params` | [`ICreateVestingParams`](/docs/api/stream/interfaces/ICreateVestingParams) & `object` | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) & [`NativeOptions`](/docs/api/stream/interfaces/NativeOptions) | ### Returns [#returns] `Promise`\<[`CreateInstructionResult`](/docs/api/stream/interfaces/CreateInstructionResult)> ## Call Signature [#call-signature-1] ```ts function createVesting( params, invoker, env): Promise; ``` Defined in: [create-vesting.ts:99](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L99) ### Parameters [#parameters-1] | Parameter | Type | | --------- | --------------------------------------------------------------------------------------------------------- | | `params` | [`ICreateVestingParams`](/docs/api/stream/interfaces/ICreateVestingParams) & `object` | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) & [`NativeOptions`](/docs/api/stream/interfaces/NativeOptions) | ### Returns [#returns-1] `Promise`\<[`BatchInstructionResult`](/docs/api/stream/interfaces/BatchInstructionResult)> # createVestingBatch() URL: /docs/api/stream/functions/createVestingBatch # createVestingBatch() [#createvestingbatch] ```ts function createVestingBatch( params, invoker, env): Promise; ``` Defined in: [create-vesting-batch.ts:63](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L63) ## Parameters [#parameters] | Parameter | Type | | --------- | --------------------------------------------------------------------------------------------------------- | | `params` | [`ICreateVestingBatchParams`](/docs/api/stream/interfaces/ICreateVestingBatchParams) | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) & [`NativeOptions`](/docs/api/stream/interfaces/NativeOptions) | ## Returns [#returns] `Promise`\<[`BatchInstructionResult`](/docs/api/stream/interfaces/BatchInstructionResult)> # decodeEndTime() URL: /docs/api/stream/functions/decodeEndTime # decodeEndTime() [#decodeendtime] ```ts function decodeEndTime(endTime): number; ``` Defined in: [contractUtils.ts:152](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/contractUtils.ts#L152) ## Parameters [#parameters] | Parameter | Type | | --------- | ---- | | `endTime` | `BN` | ## Returns [#returns] `number` # decodeStream() URL: /docs/api/stream/functions/decodeStream # decodeStream() [#decodestream] ```ts function decodeStream(buf): DecodedStream; ``` Defined in: [utils.ts:52](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/lib/utils.ts#L52) ## Parameters [#parameters] | Parameter | Type | | --------- | -------- | | `buf` | `Buffer` | ## Returns [#returns] [`DecodedStream`](/docs/api/stream/interfaces/DecodedStream) # deriveContractPDA() URL: /docs/api/stream/functions/deriveContractPDA # deriveContractPDA() [#derivecontractpda] ```ts function deriveContractPDA(programId, streamMetadata): PublicKey; ``` Defined in: [derive-accounts.ts:13](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/lib/derive-accounts.ts#L13) ## Parameters [#parameters] | Parameter | Type | | ---------------- | ----------- | | `programId` | `PublicKey` | | `streamMetadata` | `PublicKey` | ## Returns [#returns] `PublicKey` # deriveEscrowPDA() URL: /docs/api/stream/functions/deriveEscrowPDA # deriveEscrowPDA() [#deriveescrowpda] ```ts function deriveEscrowPDA(programId, streamMetadata): PublicKey; ``` Defined in: [derive-accounts.ts:17](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/lib/derive-accounts.ts#L17) ## Parameters [#parameters] | Parameter | Type | | ---------------- | ----------- | | `programId` | `PublicKey` | | `streamMetadata` | `PublicKey` | ## Returns [#returns] `PublicKey` # deriveRepopulatedMetadataPDA() URL: /docs/api/stream/functions/deriveRepopulatedMetadataPDA # deriveRepopulatedMetadataPDA() [#deriverepopulatedmetadatapda] ```ts function deriveRepopulatedMetadataPDA(programId, streamMetadata): PublicKey; ``` Defined in: [derive-accounts.ts:37](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/lib/derive-accounts.ts#L37) ## Parameters [#parameters] | Parameter | Type | | ---------------- | ----------- | | `programId` | `PublicKey` | | `streamMetadata` | `PublicKey` | ## Returns [#returns] `PublicKey` # deriveStreamMetadataPDA() URL: /docs/api/stream/functions/deriveStreamMetadataPDA # deriveStreamMetadataPDA() [#derivestreammetadatapda] ```ts function deriveStreamMetadataPDA( programId, mint, sender, nonce): PublicKey; ``` Defined in: [derive-accounts.ts:25](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/lib/derive-accounts.ts#L25) ## Parameters [#parameters] | Parameter | Type | | ----------- | ----------- | | `programId` | `PublicKey` | | `mint` | `PublicKey` | | `sender` | `PublicKey` | | `nonce` | `number` | ## Returns [#returns] `PublicKey` # deriveTestOraclePDA() URL: /docs/api/stream/functions/deriveTestOraclePDA # deriveTestOraclePDA() [#derivetestoraclepda] ```ts function deriveTestOraclePDA( programId, mint, creator): PublicKey; ``` Defined in: [derive-accounts.ts:21](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/lib/derive-accounts.ts#L21) ## Parameters [#parameters] | Parameter | Type | | ----------- | ----------- | | `programId` | `PublicKey` | | `mint` | `PublicKey` | | `creator` | `PublicKey` | ## Returns [#returns] `PublicKey` # execute() URL: /docs/api/stream/functions/execute # execute() [#execute] ```ts function execute(builtTx, env): Promise; ``` Defined in: [execute.ts:6](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/execute.ts#L6) ## Parameters [#parameters] | Parameter | Type | | --------- | ------------------------------------------------------------------ | | `builtTx` | [`BuiltTransaction`](/docs/api/stream/interfaces/BuiltTransaction) | | `env` | [`ExecutionEnv`](/docs/api/stream/type-aliases/ExecutionEnv) | ## Returns [#returns] `Promise`\<`string`> # executeBatch() URL: /docs/api/stream/functions/executeBatch # executeBatch() [#executebatch] ```ts function executeBatch(builtTransactions, env): Promise; ``` Defined in: [execute.ts:25](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/execute.ts#L25) ## Parameters [#parameters] | Parameter | Type | | ------------------- | --------------------------------------------------------------------- | | `builtTransactions` | [`BuiltTransaction`](/docs/api/stream/interfaces/BuiltTransaction)\[] | | `env` | [`ExecutionEnv`](/docs/api/stream/type-aliases/ExecutionEnv) | ## Returns [#returns] `Promise`\<[`BatchExecuteResult`](/docs/api/stream/interfaces/BatchExecuteResult)> # executeBatchSequential() URL: /docs/api/stream/functions/executeBatchSequential # executeBatchSequential() [#executebatchsequential] ```ts function executeBatchSequential(builtTransactions, env): Promise; ``` Defined in: [execute.ts:59](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/execute.ts#L59) ## Parameters [#parameters] | Parameter | Type | | ------------------- | --------------------------------------------------------------------- | | `builtTransactions` | [`BuiltTransaction`](/docs/api/stream/interfaces/BuiltTransaction)\[] | | `env` | [`ExecutionEnv`](/docs/api/stream/type-aliases/ExecutionEnv) | ## Returns [#returns] `Promise`\<[`BatchExecuteResult`](/docs/api/stream/interfaces/BatchExecuteResult)> # extractSolanaErrorCode() URL: /docs/api/stream/functions/extractSolanaErrorCode # extractSolanaErrorCode() [#extractsolanaerrorcode] ```ts function extractSolanaErrorCode(errorText, logs?): string; ``` Defined in: [utils.ts:185](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/lib/utils.ts#L185) ## Parameters [#parameters] | Parameter | Type | | ----------- | ----------- | | `errorText` | `string` | | `logs?` | `string`\[] | ## Returns [#returns] `string` # getMetadataKey() URL: /docs/api/stream/functions/getMetadataKey # getMetadataKey() [#getmetadatakey] ```ts function getMetadataKey(streamPubkey, oldMetadata): PublicKey; ``` Defined in: [utils.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/lib/utils.ts#L24) Returns the key that should be used for PDA derivation. For migrated streams, the aligned proxy PDA was derived from the original (old) metadata key, so we need to use that instead of the current stream pubkey. ## Parameters [#parameters] | Parameter | Type | | -------------- | ----------- | | `streamPubkey` | `PublicKey` | | `oldMetadata` | `PublicKey` | ## Returns [#returns] `PublicKey` # handleContractError() URL: /docs/api/stream/functions/handleContractError # handleContractError() [#handlecontracterror] ```ts function handleContractError(func, callback?): Promise; ``` Defined in: [utils.ts:168](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/lib/utils.ts#L168) 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`> # isAligned() URL: /docs/api/stream/functions/isAligned # isAligned() [#isaligned] ```ts function isAligned(stream): stream is AlignedStream; ``` Defined in: [contractUtils.ts:70](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/contractUtils.ts#L70) ## Parameters [#parameters] | Parameter | Type | | --------- | ------------------------------------------------ | | `stream` | [`Stream`](/docs/api/stream/type-aliases/Stream) | ## Returns [#returns] `stream is AlignedStream` # isCliffCloseToDepositedAmount() URL: /docs/api/stream/functions/isCliffCloseToDepositedAmount # isCliffCloseToDepositedAmount() [#iscliffclosetodepositedamount] ```ts function isCliffCloseToDepositedAmount(streamData): boolean; ``` Defined in: [contractUtils.ts:52](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/contractUtils.ts#L52) ## Parameters [#parameters] | Parameter | Type | | ---------------------------- | -------------------------------------------------- | | `streamData` | \{ `cliffAmount`: `BN`; `depositedAmount`: `BN`; } | | `streamData.cliffAmount` | `BN` | | `streamData.depositedAmount` | `BN` | ## Returns [#returns] `boolean` # isCreateAlignedStreamData() URL: /docs/api/stream/functions/isCreateAlignedStreamData # isCreateAlignedStreamData() [#iscreatealignedstreamdata] ```ts function isCreateAlignedStreamData(obj): obj is ICreateAlignedStreamData; ``` Defined in: [contractUtils.ts:74](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/contractUtils.ts#L74) ## Parameters [#parameters] | Parameter | Type | | --------- | ---------------------------------------------------------------------- | | `obj` | [`ICreateStreamData`](/docs/api/stream/type-aliases/ICreateStreamData) | ## Returns [#returns] `obj is ICreateAlignedStreamData` # isDynamicLock() URL: /docs/api/stream/functions/isDynamicLock # isDynamicLock() [#isdynamiclock] ```ts function isDynamicLock( minPrice?, maxPrice?, minPercentage?, maxPercentage?): boolean; ``` Defined in: [contractUtils.ts:78](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/contractUtils.ts#L78) ## Parameters [#parameters] | Parameter | Type | | ---------------- | -------- | | `minPrice?` | `number` | | `maxPrice?` | `number` | | `minPercentage?` | `number` | | `maxPercentage?` | `number` | ## Returns [#returns] `boolean` # isTokenLock() URL: /docs/api/stream/functions/isTokenLock # isTokenLock() [#istokenlock] ```ts function isTokenLock(streamData): boolean; ``` Defined in: [contractUtils.ts:89](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/contractUtils.ts#L89) ## Parameters [#parameters] | Parameter | Type | | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `streamData` | \{ `automaticWithdrawal`: `boolean`; `cancelableByRecipient`: `boolean`; `cancelableBySender`: `boolean`; `canTopup`: `boolean`; `cliff?`: `number`; `cliffAmount`: `BN`; `depositedAmount`: `BN`; `end?`: `number`; `maxPercentage?`: `number`; `maxPrice?`: `number`; `minPercentage?`: `number`; `minPrice?`: `number`; `transferableByRecipient`: `boolean`; `transferableBySender`: `boolean`; } | | `streamData.automaticWithdrawal` | `boolean` | | `streamData.cancelableByRecipient` | `boolean` | | `streamData.cancelableBySender` | `boolean` | | `streamData.canTopup` | `boolean` | | `streamData.cliff?` | `number` | | `streamData.cliffAmount` | `BN` | | `streamData.depositedAmount` | `BN` | | `streamData.end?` | `number` | | `streamData.maxPercentage?` | `number` | | `streamData.maxPrice?` | `number` | | `streamData.minPercentage?` | `number` | | `streamData.minPrice?` | `number` | | `streamData.transferableByRecipient` | `boolean` | | `streamData.transferableBySender` | `boolean` | ## Returns [#returns] `boolean` # isVesting() URL: /docs/api/stream/functions/isVesting # isVesting() [#isvesting] ```ts function isVesting(streamData): boolean; ``` Defined in: [contractUtils.ts:56](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/contractUtils.ts#L56) ## Parameters [#parameters] | Parameter | Type | | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | | `streamData` | \{ `cliffAmount`: `BN`; `depositedAmount`: `BN`; `maxPercentage?`: `number`; `maxPrice?`: `number`; `minPercentage?`: `number`; `minPrice?`: `number`; } | | `streamData.cliffAmount` | `BN` | | `streamData.depositedAmount` | `BN` | | `streamData.maxPercentage?` | `number` | | `streamData.maxPrice?` | `number` | | `streamData.minPercentage?` | `number` | | `streamData.minPrice?` | `number` | ## Returns [#returns] `boolean` # resolveConnection() URL: /docs/api/stream/functions/resolveConnection # resolveConnection() [#resolveconnection] ```ts function resolveConnection(env): Connection; ``` Defined in: [types.ts:140](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L140) ## Parameters [#parameters] | Parameter | Type | | --------- | ------------------------------------------ | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) | ## Returns [#returns] `Connection` # resolveDuration() URL: /docs/api/stream/functions/resolveDuration # resolveDuration() [#resolveduration] ```ts function resolveDuration(params): number; ``` Defined in: [create-vesting.ts:33](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L33) ## Parameters [#parameters] | Parameter | Type | | --------- | ----------------------------------------------------------------------------------------------------------------------------- | | `params` | `Pick`\<[`ICreateVestingParams`](/docs/api/stream/interfaces/ICreateVestingParams), `"start"` \| `"endDate"` \| `"duration"`> | ## Returns [#returns] `number` # sendAndConfirmStreamRawTransaction() URL: /docs/api/stream/functions/sendAndConfirmStreamRawTransaction # sendAndConfirmStreamRawTransaction() [#sendandconfirmstreamrawtransaction] ```ts function sendAndConfirmStreamRawTransaction( connection, batchItem, confirmationParams, throttleParams): Promise; ``` Defined in: [utils.ts:144](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/lib/utils.ts#L144) Sign passed BatchItems with wallet request or KeyPair ## Parameters [#parameters] | Parameter | Type | Description | | -------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------------- | | `connection` | `Connection` | Solana web3 connection object. | | `batchItem` | [`BatchItem`](/docs/api/stream/interfaces/BatchItem) | Signed transaction ready to be send. | | `confirmationParams` | `ConfirmationParams` | Confirmation Params that will be used for execution | | `throttleParams` | `ThrottleParams` | rate or throttler instance to throttle TX sending - to not spam the blockchain too much | ## Returns [#returns] `Promise`\<[`BatchItemResult`](/docs/api/stream/type-aliases/BatchItemResult)> * Returns settled transaction item # sign() URL: /docs/api/stream/functions/sign # sign() [#sign] ```ts function sign(transaction, signers): Promise; ``` Defined in: [sign.ts:14](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/sign.ts#L14) ## Parameters [#parameters] | Parameter | Type | | ------------- | ---------------------- | | `transaction` | `VersionedTransaction` | | `signers` | `SignerInput`\[] | ## Returns [#returns] `Promise`\<`VersionedTransaction`> # signAllTransactionWithRecipients() URL: /docs/api/stream/functions/signAllTransactionWithRecipients # signAllTransactionWithRecipients() [#signalltransactionwithrecipients] ```ts function signAllTransactionWithRecipients(sender, items): Promise; ``` Defined in: [utils.ts:112](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/lib/utils.ts#L112) Sign passed BatchItems with wallet request or KeyPair ## Parameters [#parameters] | Parameter | Type | Description | | --------- | ------------------------------------------------------- | ------------------------------------------------------ | | `sender` | `Keypair` \| `SignerWalletAdapter` | Wallet or Keypair of sendin account | | `items` | [`BatchItem`](/docs/api/stream/interfaces/BatchItem)\[] | Multiple recipient contracts split into separate items | ## Returns [#returns] `Promise`\<[`BatchItem`](/docs/api/stream/interfaces/BatchItem)\[]> * Returns items with signatures. # topup() URL: /docs/api/stream/functions/topup # topup() [#topup] ```ts function topup( params, invoker, env): Promise; ``` Defined in: [topup.ts:8](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/topup.ts#L8) ## Parameters [#parameters] | Parameter | Type | | --------- | --------------------------------------------------------------------------------------------------------- | | `params` | [`ITopUpData`](/docs/api/stream/interfaces/ITopUpData) | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) & [`NativeOptions`](/docs/api/stream/interfaces/NativeOptions) | ## Returns [#returns] `Promise`\<[`InstructionResult`](/docs/api/stream/interfaces/InstructionResult)> # topupStreamInstruction() URL: /docs/api/stream/functions/topupStreamInstruction # topupStreamInstruction() [#topupstreaminstruction] ```ts function topupStreamInstruction( amount, programId, __namedParameters): Promise; ``` Defined in: [instructions.ts:658](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/instructions.ts#L658) ## Parameters [#parameters] | Parameter | Type | | ------------------- | --------------- | | `amount` | `BN` | | `programId` | `PublicKey` | | `__namedParameters` | `TopupAccounts` | ## Returns [#returns] `Promise`\<`TransactionInstruction`> # transfer() URL: /docs/api/stream/functions/transfer # transfer() [#transfer] ```ts function transfer( params, invoker, env): Promise; ``` Defined in: [transfer.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/transfer.ts#L11) Prepare transfer instructions. Note: prepareTransferInstructions embeds ComputeBudgetProgram.setComputeUnitLimit (computeLimit defaults to 100001). Callers using buildTransaction() should leave computeLimit undefined to avoid duplicating compute budget instructions. ## Parameters [#parameters] | Parameter | Type | | --------- | ------------------------------------------------------------ | | `params` | [`ITransferData`](/docs/api/stream/interfaces/ITransferData) | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) | ## Returns [#returns] `Promise`\<[`InstructionResult`](/docs/api/stream/interfaces/InstructionResult)> # transferStreamInstruction() URL: /docs/api/stream/functions/transferStreamInstruction # transferStreamInstruction() [#transferstreaminstruction] ```ts function transferStreamInstruction(programId, __namedParameters): Promise; ``` Defined in: [instructions.ts:605](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/instructions.ts#L605) ## Parameters [#parameters] | Parameter | Type | | ------------------- | ------------------ | | `programId` | `PublicKey` | | `__namedParameters` | `TransferAccounts` | ## Returns [#returns] `Promise`\<`TransactionInstruction`> # transformContract() URL: /docs/api/stream/functions/transformContract # transformContract() [#transformcontract] ```ts function transformContract(schema): Promise; ``` Defined in: [transform.ts:120](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/transform.ts#L120) ## Parameters [#parameters] | Parameter | Type | | --------- | -------------------------------------------------------------- | | `schema` | [`ContractSchema`](/docs/api/stream/interfaces/ContractSchema) | ## Returns [#returns] `Promise`\<[`Stream`](/docs/api/stream/type-aliases/Stream)> # update() URL: /docs/api/stream/functions/update # update() [#update] ```ts function update( params, invoker, env): Promise; ``` Defined in: [update.ts:5](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/update.ts#L5) ## Parameters [#parameters] | Parameter | Type | | --------- | -------------------------------------------------------- | | `params` | [`IUpdateData`](/docs/api/stream/interfaces/IUpdateData) | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) | ## Returns [#returns] `Promise`\<[`InstructionResult`](/docs/api/stream/interfaces/InstructionResult)> # updateStreamInstruction() URL: /docs/api/stream/functions/updateStreamInstruction # updateStreamInstruction() [#updatestreaminstruction] ```ts function updateStreamInstruction( params, programId, __namedParameters): Promise; ``` Defined in: [instructions.ts:498](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/instructions.ts#L498) ## Parameters [#parameters] | Parameter | Type | | ------------------- | -------------------------------------------------------- | | `params` | [`IUpdateData`](/docs/api/stream/interfaces/IUpdateData) | | `programId` | `PublicKey` | | `__namedParameters` | `UpdateAccounts` | ## Returns [#returns] `Promise`\<`TransactionInstruction`> # withdraw() URL: /docs/api/stream/functions/withdraw # withdraw() [#withdraw] ```ts function withdraw( params, invoker, env): Promise; ``` Defined in: [withdraw.ts:5](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/withdraw.ts#L5) ## Parameters [#parameters] | Parameter | Type | | --------- | ------------------------------------------------------------ | | `params` | [`IWithdrawData`](/docs/api/stream/interfaces/IWithdrawData) | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) | ## Returns [#returns] `Promise`\<[`InstructionResult`](/docs/api/stream/interfaces/InstructionResult)> # withdrawStreamInstruction() URL: /docs/api/stream/functions/withdrawStreamInstruction # withdrawStreamInstruction() [#withdrawstreaminstruction] ```ts function withdrawStreamInstruction( amount, programId, __namedParameters): Promise; ``` Defined in: [instructions.ts:443](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/instructions.ts#L443) ## Parameters [#parameters] | Parameter | Type | | ------------------- | ------------------ | | `amount` | `BN` | | `programId` | `PublicKey` | | `__namedParameters` | `WithdrawAccounts` | ## Returns [#returns] `Promise`\<`TransactionInstruction`> # index URL: /docs/api/stream # @streamflow/stream v11.3.1 [#streamflowstream-v1131] ## Classes [#classes] * [AlignedContract](/docs/api/stream/classes/AlignedContract) * [Contract](/docs/api/stream/classes/Contract) * [ContractError](/docs/api/stream/classes/ContractError) * [SolanaStreamClient](/docs/api/stream/classes/SolanaStreamClient) ## Enumerations [#enumerations] * [AlignedProxyErrorCode](/docs/api/stream/enumerations/AlignedProxyErrorCode) * [ContractErrorCode](/docs/api/stream/enumerations/ContractErrorCode) * [ICluster](/docs/api/stream/enumerations/ICluster) * [StreamDirection](/docs/api/stream/enumerations/StreamDirection) * [StreamType](/docs/api/stream/enumerations/StreamType) ## Interfaces [#interfaces] * [Account](/docs/api/stream/interfaces/Account) * [ApiClient](/docs/api/stream/interfaces/ApiClient) * [ApiClientOptions](/docs/api/stream/interfaces/ApiClientOptions) * [BatchCreationItem](/docs/api/stream/interfaces/BatchCreationItem) * [BatchExecuteResult](/docs/api/stream/interfaces/BatchExecuteResult) * [BatchInstructionResult](/docs/api/stream/interfaces/BatchInstructionResult) * [BatchItem](/docs/api/stream/interfaces/BatchItem) * [BatchItemError](/docs/api/stream/interfaces/BatchItemError) * [BatchItemSuccess](/docs/api/stream/interfaces/BatchItemSuccess) * [BuildTransactionOptions](/docs/api/stream/interfaces/BuildTransactionOptions) * [BuiltTransaction](/docs/api/stream/interfaces/BuiltTransaction) * [ClientCreationOptions](/docs/api/stream/interfaces/ClientCreationOptions) * [ContractSchema](/docs/api/stream/interfaces/ContractSchema) * [CreateInstructionResult](/docs/api/stream/interfaces/CreateInstructionResult) * [DecodedStream](/docs/api/stream/interfaces/DecodedStream) * [DynamicContractSchema](/docs/api/stream/interfaces/DynamicContractSchema) * [GetContractsOptions](/docs/api/stream/interfaces/GetContractsOptions) * [IBaseStreamConfig](/docs/api/stream/interfaces/IBaseStreamConfig) * [ICreateExt](/docs/api/stream/interfaces/ICreateExt) * [ICreateLockBatchParams](/docs/api/stream/interfaces/ICreateLockBatchParams) * [ICreateLockParams](/docs/api/stream/interfaces/ICreateLockParams) * [ICreateMultiError](/docs/api/stream/interfaces/ICreateMultiError) * [ICreateResult](/docs/api/stream/interfaces/ICreateResult) * [ICreateStreamExt](/docs/api/stream/interfaces/ICreateStreamExt) * [ICreateStreamInstructions](/docs/api/stream/interfaces/ICreateStreamInstructions) * [ICreateVestingBatchParams](/docs/api/stream/interfaces/ICreateVestingBatchParams) * [ICreateVestingParams](/docs/api/stream/interfaces/ICreateVestingParams) * [IFees](/docs/api/stream/interfaces/IFees) * [IGetAllData](/docs/api/stream/interfaces/IGetAllData) * [IGetFeesData](/docs/api/stream/interfaces/IGetFeesData) * [IInteractData](/docs/api/stream/interfaces/IInteractData) * [IInteractStreamExt](/docs/api/stream/interfaces/IInteractStreamExt) * [ILockBatchRecipient](/docs/api/stream/interfaces/ILockBatchRecipient) * [IMultiTransactionResult](/docs/api/stream/interfaces/IMultiTransactionResult) * [InstructionResult](/docs/api/stream/interfaces/InstructionResult) * [IPrepareCreateStreamExt](/docs/api/stream/interfaces/IPrepareCreateStreamExt) * [IPrepareStreamExt](/docs/api/stream/interfaces/IPrepareStreamExt) * [IRecipient](/docs/api/stream/interfaces/IRecipient) * [ISearchStreams](/docs/api/stream/interfaces/ISearchStreams) * [ITopUpData](/docs/api/stream/interfaces/ITopUpData) * [ITopUpStreamExt](/docs/api/stream/interfaces/ITopUpStreamExt) * [ITransactionExtWithInstructions](/docs/api/stream/interfaces/ITransactionExtWithInstructions) * [ITransactionResult](/docs/api/stream/interfaces/ITransactionResult) * [ITransferData](/docs/api/stream/interfaces/ITransferData) * [IUpdateData](/docs/api/stream/interfaces/IUpdateData) * [IVestingBatchRecipient](/docs/api/stream/interfaces/IVestingBatchRecipient) * [IWithdrawData](/docs/api/stream/interfaces/IWithdrawData) * [LinearStream](/docs/api/stream/interfaces/LinearStream) * [MetadataRecipientHashMap](/docs/api/stream/interfaces/MetadataRecipientHashMap) * [NativeOptions](/docs/api/stream/interfaces/NativeOptions) * [StreamClientOptions](/docs/api/stream/interfaces/StreamClientOptions) * [StreamClientOptionsWithConnection](/docs/api/stream/interfaces/StreamClientOptionsWithConnection) * [TabulariumContract](/docs/api/stream/interfaces/TabulariumContract) * [TransactionSchedulingOptions](/docs/api/stream/interfaces/TransactionSchedulingOptions) ## Type Aliases [#type-aliases] * [AlignedStream](/docs/api/stream/type-aliases/AlignedStream) * [AlignedStreamData](/docs/api/stream/type-aliases/AlignedStreamData) * [AlignedUnlocksContract](/docs/api/stream/type-aliases/AlignedUnlocksContract) * [BatchItemResult](/docs/api/stream/type-aliases/BatchItemResult) * [BuildTransactionFn](/docs/api/stream/type-aliases/BuildTransactionFn) * [CancelFn](/docs/api/stream/type-aliases/CancelFn) * [Chain](/docs/api/stream/type-aliases/Chain) * [ChangeOracleParams](/docs/api/stream/type-aliases/ChangeOracleParams) * [ContractType](/docs/api/stream/type-aliases/ContractType) * [CreateBatchFn](/docs/api/stream/type-aliases/CreateBatchFn) * [CreateFn](/docs/api/stream/type-aliases/CreateFn) * [CreateParams](/docs/api/stream/type-aliases/CreateParams) * [CreateTestOracleParams](/docs/api/stream/type-aliases/CreateTestOracleParams) * [Env](/docs/api/stream/type-aliases/Env) * [ExecuteBatchFn](/docs/api/stream/type-aliases/ExecuteBatchFn) * [ExecuteBatchSequentialFn](/docs/api/stream/type-aliases/ExecuteBatchSequentialFn) * [ExecuteFn](/docs/api/stream/type-aliases/ExecuteFn) * [ExecutionEnv](/docs/api/stream/type-aliases/ExecutionEnv) * [IAlignedStreamConfig](/docs/api/stream/type-aliases/IAlignedStreamConfig) * [ICancelData](/docs/api/stream/type-aliases/ICancelData) * [ICreateAlignedStreamData](/docs/api/stream/type-aliases/ICreateAlignedStreamData) * [ICreateLinearStreamData](/docs/api/stream/type-aliases/ICreateLinearStreamData) * [ICreateMultipleAlignedStreamData](/docs/api/stream/type-aliases/ICreateMultipleAlignedStreamData) * [ICreateMultipleLinearStreamData](/docs/api/stream/type-aliases/ICreateMultipleLinearStreamData) * [ICreateMultipleStreamData](/docs/api/stream/type-aliases/ICreateMultipleStreamData) * [ICreateStreamData](/docs/api/stream/type-aliases/ICreateStreamData) * [IGetOneData](/docs/api/stream/type-aliases/IGetOneData) * [InstructionGenerator](/docs/api/stream/type-aliases/InstructionGenerator) * [Invoker](/docs/api/stream/type-aliases/Invoker) * [OracleType](/docs/api/stream/type-aliases/OracleType) * [OracleTypeName](/docs/api/stream/type-aliases/OracleTypeName) * [PriceOracleType](/docs/api/stream/type-aliases/PriceOracleType) * [SignFn](/docs/api/stream/type-aliases/SignFn) * [Stream](/docs/api/stream/type-aliases/Stream) * [TestOracle](/docs/api/stream/type-aliases/TestOracle) * [TopupFn](/docs/api/stream/type-aliases/TopupFn) * [TransferFn](/docs/api/stream/type-aliases/TransferFn) * [UpdateFn](/docs/api/stream/type-aliases/UpdateFn) * [UpdateTestOracleParams](/docs/api/stream/type-aliases/UpdateTestOracleParams) * [WithdrawFn](/docs/api/stream/type-aliases/WithdrawFn) ## Variables [#variables] * [AIRDROP\_AMOUNT](/docs/api/stream/variables/AIRDROP_AMOUNT) * [AIRDROP\_TEST\_TOKEN](/docs/api/stream/variables/AIRDROP_TEST_TOKEN) * [ALIGNED\_COMPUTE\_LIMIT](/docs/api/stream/variables/ALIGNED_COMPUTE_LIMIT) * [ALIGNED\_PRECISION\_FACTOR\_POW](/docs/api/stream/variables/ALIGNED_PRECISION_FACTOR_POW) * [ALIGNED\_UNLOCKS\_PROGRAM\_ID](/docs/api/stream/variables/ALIGNED_UNLOCKS_PROGRAM_ID) * [CONTRACT\_DISCRIMINATOR](/docs/api/stream/variables/CONTRACT_DISCRIMINATOR) * [CONTRACT\_SEED](/docs/api/stream/variables/CONTRACT_SEED) * [CREATE\_PARAMS\_PADDING](/docs/api/stream/variables/CREATE_PARAMS_PADDING) * [DEFAULT\_AUTO\_CLAIM\_FEE\_SOL](/docs/api/stream/variables/DEFAULT_AUTO_CLAIM_FEE_SOL) * [DEFAULT\_CREATION\_FEE\_SOL](/docs/api/stream/variables/DEFAULT_CREATION_FEE_SOL) * [DEFAULT\_STREAMFLOW\_FEE](/docs/api/stream/variables/DEFAULT_STREAMFLOW_FEE) * [ESCROW\_SEED](/docs/api/stream/variables/ESCROW_SEED) * [FEE\_ORACLE\_PUBLIC\_KEY](/docs/api/stream/variables/FEE_ORACLE_PUBLIC_KEY) * [FEES\_METADATA\_SEED](/docs/api/stream/variables/FEES_METADATA_SEED) * [getBN](/docs/api/stream/variables/getBN) * [getNumberFromBN](/docs/api/stream/variables/getNumberFromBN) * [MAX\_SAFE\_UNIX\_TIME\_VALUE](/docs/api/stream/variables/MAX_SAFE_UNIX_TIME_VALUE) * [METADATA\_SEED](/docs/api/stream/variables/METADATA_SEED) * [ORIGINAL\_CONTRACT\_SENDER\_OFFSET](/docs/api/stream/variables/ORIGINAL_CONTRACT_SENDER_OFFSET) * [PARTNER\_ORACLE\_PROGRAM\_ID](/docs/api/stream/variables/PARTNER_ORACLE_PROGRAM_ID) * [PARTNER\_SCHEMA](/docs/api/stream/variables/PARTNER_SCHEMA) * [PARTNERS\_SCHEMA](/docs/api/stream/variables/PARTNERS_SCHEMA) * [PROGRAM\_ID](/docs/api/stream/variables/PROGRAM_ID) * [REPOPULATED\_METADATA\_SEED](/docs/api/stream/variables/REPOPULATED_METADATA_SEED) * [SOLANA\_ERROR\_MAP](/docs/api/stream/variables/SOLANA_ERROR_MAP) * [SOLANA\_ERROR\_MATCH\_REGEX](/docs/api/stream/variables/SOLANA_ERROR_MATCH_REGEX) * [STREAM\_STRUCT\_OFFSET\_CLOSED](/docs/api/stream/variables/STREAM_STRUCT_OFFSET_CLOSED) * [STREAM\_STRUCT\_OFFSET\_MINT](/docs/api/stream/variables/STREAM_STRUCT_OFFSET_MINT) * [STREAM\_STRUCT\_OFFSET\_OLD\_METADATA\_KEY](/docs/api/stream/variables/STREAM_STRUCT_OFFSET_OLD_METADATA_KEY) * [STREAM\_STRUCT\_OFFSET\_RECIPIENT](/docs/api/stream/variables/STREAM_STRUCT_OFFSET_RECIPIENT) * [STREAM\_STRUCT\_OFFSET\_SENDER](/docs/api/stream/variables/STREAM_STRUCT_OFFSET_SENDER) * [STREAM\_STRUCT\_OFFSETS](/docs/api/stream/variables/STREAM_STRUCT_OFFSETS) * [STREAMFLOW\_TREASURY\_PUBLIC\_KEY](/docs/api/stream/variables/STREAMFLOW_TREASURY_PUBLIC_KEY) * [TEST\_ORACLE\_DISCRIMINATOR](/docs/api/stream/variables/TEST_ORACLE_DISCRIMINATOR) * [TEST\_ORACLE\_SEED](/docs/api/stream/variables/TEST_ORACLE_SEED) * [timelockIDL](/docs/api/stream/variables/timelockIDL) * [TX\_FINALITY\_CONFIRMED](/docs/api/stream/variables/TX_FINALITY_CONFIRMED) * [WITHDRAW\_AVAILABLE\_AMOUNT](/docs/api/stream/variables/WITHDRAW_AVAILABLE_AMOUNT) * [WITHDRAWOR](/docs/api/stream/variables/WITHDRAWOR) * [WITHDRAWOR\_PUBLIC\_KEY](/docs/api/stream/variables/WITHDRAWOR_PUBLIC_KEY) ## Functions [#functions] * [buildLockBatchParams](/docs/api/stream/functions/buildLockBatchParams) * [buildLockParams](/docs/api/stream/functions/buildLockParams) * [buildStreamType](/docs/api/stream/functions/buildStreamType) * [buildTransaction](/docs/api/stream/functions/buildTransaction) * [buildVestingBatchParams](/docs/api/stream/functions/buildVestingBatchParams) * [buildVestingParams](/docs/api/stream/functions/buildVestingParams) * [calculateTotalAmountToDeposit](/docs/api/stream/functions/calculateTotalAmountToDeposit) * [calculateUnlockedAmount](/docs/api/stream/functions/calculateUnlockedAmount) * [cancel](/docs/api/stream/functions/cancel) * [cancelStreamInstruction](/docs/api/stream/functions/cancelStreamInstruction) * [computeAmountPerPeriod](/docs/api/stream/functions/computeAmountPerPeriod) * [create](/docs/api/stream/functions/create) * [createBatch](/docs/api/stream/functions/createBatch) * [createClient](/docs/api/stream/functions/createClient) * [createClientFromEnv](/docs/api/stream/functions/createClientFromEnv) * [createLock](/docs/api/stream/functions/createLock) * [createLockBatch](/docs/api/stream/functions/createLockBatch) * [createStreamInstruction](/docs/api/stream/functions/createStreamInstruction) * [createStreamV2Instruction](/docs/api/stream/functions/createStreamV2Instruction) * [createUncheckedStreamInstruction](/docs/api/stream/functions/createUncheckedStreamInstruction) * [createUncheckedStreamV2Instruction](/docs/api/stream/functions/createUncheckedStreamV2Instruction) * [createVesting](/docs/api/stream/functions/createVesting) * [createVestingBatch](/docs/api/stream/functions/createVestingBatch) * [decodeEndTime](/docs/api/stream/functions/decodeEndTime) * [decodeStream](/docs/api/stream/functions/decodeStream) * [deriveContractPDA](/docs/api/stream/functions/deriveContractPDA) * [deriveEscrowPDA](/docs/api/stream/functions/deriveEscrowPDA) * [deriveRepopulatedMetadataPDA](/docs/api/stream/functions/deriveRepopulatedMetadataPDA) * [deriveStreamMetadataPDA](/docs/api/stream/functions/deriveStreamMetadataPDA) * [deriveTestOraclePDA](/docs/api/stream/functions/deriveTestOraclePDA) * [execute](/docs/api/stream/functions/execute) * [executeBatch](/docs/api/stream/functions/executeBatch) * [executeBatchSequential](/docs/api/stream/functions/executeBatchSequential) * [extractSolanaErrorCode](/docs/api/stream/functions/extractSolanaErrorCode) * [getMetadataKey](/docs/api/stream/functions/getMetadataKey) * [handleContractError](/docs/api/stream/functions/handleContractError) * [isAligned](/docs/api/stream/functions/isAligned) * [isCliffCloseToDepositedAmount](/docs/api/stream/functions/isCliffCloseToDepositedAmount) * [isCreateAlignedStreamData](/docs/api/stream/functions/isCreateAlignedStreamData) * [isDynamicLock](/docs/api/stream/functions/isDynamicLock) * [isTokenLock](/docs/api/stream/functions/isTokenLock) * [isVesting](/docs/api/stream/functions/isVesting) * [resolveConnection](/docs/api/stream/functions/resolveConnection) * [resolveDuration](/docs/api/stream/functions/resolveDuration) * [sendAndConfirmStreamRawTransaction](/docs/api/stream/functions/sendAndConfirmStreamRawTransaction) * [sign](/docs/api/stream/functions/sign) * [signAllTransactionWithRecipients](/docs/api/stream/functions/signAllTransactionWithRecipients) * [topup](/docs/api/stream/functions/topup) * [topupStreamInstruction](/docs/api/stream/functions/topupStreamInstruction) * [transfer](/docs/api/stream/functions/transfer) * [transferStreamInstruction](/docs/api/stream/functions/transferStreamInstruction) * [transformContract](/docs/api/stream/functions/transformContract) * [update](/docs/api/stream/functions/update) * [updateStreamInstruction](/docs/api/stream/functions/updateStreamInstruction) * [withdraw](/docs/api/stream/functions/withdraw) * [withdrawStreamInstruction](/docs/api/stream/functions/withdrawStreamInstruction) # Account URL: /docs/api/stream/interfaces/Account # Account [#account] Defined in: [types.ts:411](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L411) ## Properties [#properties] | Property | Type | Defined in | | ---------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `account` | `AccountInfo`\<`Buffer`\<`ArrayBufferLike`>> | [packages/stream/solana/types.ts:413](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L413) | | `pubkey` | `PublicKey` | [packages/stream/solana/types.ts:412](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L412) | # ApiClient URL: /docs/api/stream/interfaces/ApiClient # ApiClient [#apiclient] Defined in: [client.ts:14](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/client.ts#L14) ## Properties [#properties] | Property | Type | Defined in | | -------------------------------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | `getContract` | (`address`) => `Promise`\<[`ContractSchema`](/docs/api/stream/interfaces/ContractSchema)> | [packages/stream/solana/api-public/client.ts:16](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/client.ts#L16) | | `getContracts` | (`opts?`) => `Promise`\<[`ContractSchema`](/docs/api/stream/interfaces/ContractSchema)\[]> | [packages/stream/solana/api-public/client.ts:15](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/client.ts#L15) | # ApiClientOptions URL: /docs/api/stream/interfaces/ApiClientOptions # ApiClientOptions [#apiclientoptions] Defined in: [client.ts:3](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/client.ts#L3) ## Properties [#properties] | Property | Type | Defined in | | ----------------------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | | `apiUrl?` | `string` | [packages/stream/solana/api-public/client.ts:4](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/client.ts#L4) | | `cluster?` | `"mainnet"` \| `"devnet"` | [packages/stream/solana/api-public/client.ts:5](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/client.ts#L5) | | `fetchFn?` | (`input`, `init?`) => `Promise`\<`Response`> | [packages/stream/solana/api-public/client.ts:6](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/client.ts#L6) | # BatchCreationItem URL: /docs/api/stream/interfaces/BatchCreationItem # BatchCreationItem [#batchcreationitem] Defined in: [types.ts:56](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L56) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------------------ | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `instructions` | `TransactionInstruction`\[] | [packages/stream/solana/api/types.ts:57](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L57) | | `metadataPubKey` | `PublicKey` | [packages/stream/solana/api/types.ts:60](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L60) | | `recipient` | `string` | [packages/stream/solana/api/types.ts:59](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L59) | | `signers?` | `Keypair`\[] | [packages/stream/solana/api/types.ts:58](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L58) | # BatchExecuteResult URL: /docs/api/stream/interfaces/BatchExecuteResult # BatchExecuteResult [#batchexecuteresult] Defined in: [types.ts:84](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L84) ## Properties [#properties] | Property | Type | Defined in | | ---------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `errors` | `Error`\[] | [packages/stream/solana/api/types.ts:86](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L86) | | `signatures` | `string`\[] | [packages/stream/solana/api/types.ts:85](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L85) | # BatchInstructionResult URL: /docs/api/stream/interfaces/BatchInstructionResult # BatchInstructionResult [#batchinstructionresult] Defined in: [types.ts:63](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L63) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------------------------ | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `creationBatches` | [`BatchCreationItem`](/docs/api/stream/interfaces/BatchCreationItem)\[] | [packages/stream/solana/api/types.ts:65](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L65) | | `setupInstructions` | `TransactionInstruction`\[] | [packages/stream/solana/api/types.ts:64](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L64) | # BatchItem URL: /docs/api/stream/interfaces/BatchItem # BatchItem [#batchitem] Defined in: [types.ts:738](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L738) ## Extended by [#extended-by] * [`BatchItemSuccess`](/docs/api/stream/interfaces/BatchItemSuccess) * [`BatchItemError`](/docs/api/stream/interfaces/BatchItemError) ## Properties [#properties] | Property | Type | Defined in | | -------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `recipient` | `string` | [packages/stream/solana/types.ts:739](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L739) | | `tx` | `VersionedTransaction` | [packages/stream/solana/types.ts:740](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L740) | # BatchItemError URL: /docs/api/stream/interfaces/BatchItemError # BatchItemError [#batchitemerror] Defined in: [types.ts:747](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L747) ## Extends [#extends] * [`BatchItem`](/docs/api/stream/interfaces/BatchItem) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | -------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `error` | `string` | - | [packages/stream/solana/types.ts:748](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L748) | | `recipient` | `string` | [`BatchItem`](/docs/api/stream/interfaces/BatchItem).[`recipient`](/docs/api/stream/interfaces/BatchItem#recipient) | [packages/stream/solana/types.ts:739](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L739) | | `tx` | `VersionedTransaction` | [`BatchItem`](/docs/api/stream/interfaces/BatchItem).[`tx`](/docs/api/stream/interfaces/BatchItem#tx) | [packages/stream/solana/types.ts:740](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L740) | # BatchItemSuccess URL: /docs/api/stream/interfaces/BatchItemSuccess # BatchItemSuccess [#batchitemsuccess] Defined in: [types.ts:743](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L743) ## Extends [#extends] * [`BatchItem`](/docs/api/stream/interfaces/BatchItem) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | -------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `recipient` | `string` | [`BatchItem`](/docs/api/stream/interfaces/BatchItem).[`recipient`](/docs/api/stream/interfaces/BatchItem#recipient) | [packages/stream/solana/types.ts:739](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L739) | | `signature` | `string` | - | [packages/stream/solana/types.ts:744](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L744) | | `tx` | `VersionedTransaction` | [`BatchItem`](/docs/api/stream/interfaces/BatchItem).[`tx`](/docs/api/stream/interfaces/BatchItem#tx) | [packages/stream/solana/types.ts:740](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L740) | # BuildTransactionOptions URL: /docs/api/stream/interfaces/BuildTransactionOptions # BuildTransactionOptions [#buildtransactionoptions] Defined in: [types.ts:68](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L68) ## Properties [#properties] | Property | Type | Defined in | | --------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | | `computeLimit?` | `number` \| `ComputeLimitEstimate` \| `"autoSimulate"` | [packages/stream/solana/api/types.ts:70](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L70) | | `computePrice?` | `number` \| `ComputePriceEstimate` | [packages/stream/solana/api/types.ts:71](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L71) | | `feePayer?` | `PublicKey` | [packages/stream/solana/api/types.ts:69](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L69) | # BuiltTransaction URL: /docs/api/stream/interfaces/BuiltTransaction # BuiltTransaction [#builttransaction] Defined in: [types.ts:78](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L78) ## Properties [#properties] | Property | Type | Defined in | | -------------------------------------------------------------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `blockhashWithExpiryBlockHeight` | `BlockhashWithExpiryBlockHeight` | [packages/stream/solana/api/types.ts:80](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L80) | | `context` | `Context` | [packages/stream/solana/api/types.ts:81](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L81) | | `transaction` | `VersionedTransaction` | [packages/stream/solana/api/types.ts:79](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L79) | # ClientCreationOptions URL: /docs/api/stream/interfaces/ClientCreationOptions # ClientCreationOptions [#clientcreationoptions] Defined in: [StreamClient.ts:143](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/StreamClient.ts#L143) Solana Client creation options ## Properties [#properties] | Property | Type | Description | Defined in | | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `cluster?` | [`ICluster`](/docs/api/stream/enumerations/ICluster) | [ICluster](/docs/api/stream/enumerations/ICluster) cluster type | [packages/stream/solana/types.ts:372](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L372) | | `programId?` | `string` | - | [packages/stream/solana/types.ts:373](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L373) | | `sendScheduler?` | \| `PQueue`\<`PriorityQueue`, `QueueAddOptions`> \| [`TransactionSchedulingOptions`](/docs/api/stream/interfaces/TransactionSchedulingOptions) | - | [packages/stream/solana/types.ts:377](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L377) | # ContractSchema URL: /docs/api/stream/interfaces/ContractSchema # ContractSchema [#contractschema] Defined in: [types.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L24) Contract schema matching OpenAPI specification Used for API responses ## Properties [#properties] | Property | Type | Defined in | | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | | `address` | `string` | [packages/stream/solana/api-public/types.ts:27](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L27) | | `amount` | `string` | [packages/stream/solana/api-public/types.ts:36](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L36) | | `amountPerPeriod` | `string` | [packages/stream/solana/api-public/types.ts:38](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L38) | | `amountUnlockedAtLastRateUpdate` | `string` | [packages/stream/solana/api-public/types.ts:40](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L40) | | `autoClaimFee` | `number` | [packages/stream/solana/api-public/types.ts:70](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L70) | | `autoClaimFeeClaimed` | `boolean` | [packages/stream/solana/api-public/types.ts:71](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L71) | | `autoClaimPeriod` | `number` | [packages/stream/solana/api-public/types.ts:42](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L42) | | `bump` | `number` | [packages/stream/solana/api-public/types.ts:76](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L76) | | `canceledDt` | `string` | [packages/stream/solana/api-public/types.ts:46](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L46) | | `canTopup` | `boolean` | [packages/stream/solana/api-public/types.ts:53](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L53) | | `canUpdateRate` | `boolean` | [packages/stream/solana/api-public/types.ts:59](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L59) | | `chain` | [`Chain`](/docs/api/stream/type-aliases/Chain) | [packages/stream/solana/api-public/types.ts:25](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L25) | | `claimedAmount` | `string` | [packages/stream/solana/api-public/types.ts:39](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L39) | | `cliffAmount` | `string` | [packages/stream/solana/api-public/types.ts:37](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L37) | | `contractType` | [`ContractType`](/docs/api/stream/type-aliases/ContractType) | [packages/stream/solana/api-public/types.ts:30](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L30) | | `createdDt` | `string` | [packages/stream/solana/api-public/types.ts:43](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L43) | | `creationFee` | `number` | [packages/stream/solana/api-public/types.ts:68](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L68) | | `creationFeeClaimed` | `boolean` | [packages/stream/solana/api-public/types.ts:69](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L69) | | `dynamicContract` | [`DynamicContractSchema`](/docs/api/stream/interfaces/DynamicContractSchema) | [packages/stream/solana/api-public/types.ts:77](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L77) | | `endDt` | `string` | [packages/stream/solana/api-public/types.ts:45](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L45) | | `escrow` | `string` | [packages/stream/solana/api-public/types.ts:35](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L35) | | `hasAutoClaim` | `boolean` | [packages/stream/solana/api-public/types.ts:54](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L54) | | `isCancelableByRecipient` | `boolean` | [packages/stream/solana/api-public/types.ts:56](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L56) | | `isCancelableBySender` | `boolean` | [packages/stream/solana/api-public/types.ts:55](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L55) | | `isClosed` | `boolean` | [packages/stream/solana/api-public/types.ts:50](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L50) | | `isFucked` | `boolean` | [packages/stream/solana/api-public/types.ts:51](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L51) | | `isPausable` | `boolean` | [packages/stream/solana/api-public/types.ts:52](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L52) | | `isPda` | `boolean` | [packages/stream/solana/api-public/types.ts:73](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L73) | | `isTransferableByRecipient` | `boolean` | [packages/stream/solana/api-public/types.ts:58](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L58) | | `isTransferableBySender` | `boolean` | [packages/stream/solana/api-public/types.ts:57](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L57) | | `lastClaimedDt` | `string` | [packages/stream/solana/api-public/types.ts:48](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L48) | | `lastRateUpdateDt` | `string` | [packages/stream/solana/api-public/types.ts:49](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L49) | | `lastUpdateSlot` | `number` | [packages/stream/solana/api-public/types.ts:72](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L72) | | `mint` | `string` | [packages/stream/solana/api-public/types.ts:34](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L34) | | `name` | `string` | [packages/stream/solana/api-public/types.ts:29](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L29) | | `nonce` | `number` | [packages/stream/solana/api-public/types.ts:74](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L74) | | `oldAddress` | `string` | [packages/stream/solana/api-public/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L28) | | `partner` | `string` | [packages/stream/solana/api-public/types.ts:33](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L33) | | `partnerFee` | `string` | [packages/stream/solana/api-public/types.ts:63](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L63) | | `partnerFeePercentage` | `string` | [packages/stream/solana/api-public/types.ts:65](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L65) | | `partnerFeeWithdrawn` | `string` | [packages/stream/solana/api-public/types.ts:64](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L64) | | `pauseCumulative` | `number` | [packages/stream/solana/api-public/types.ts:67](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L67) | | `pausedDt` | `string` | [packages/stream/solana/api-public/types.ts:47](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L47) | | `payer` | `string` | [packages/stream/solana/api-public/types.ts:75](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L75) | | `period` | `number` | [packages/stream/solana/api-public/types.ts:41](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L41) | | `programId` | `string` | [packages/stream/solana/api-public/types.ts:26](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L26) | | `recipient` | `string` | [packages/stream/solana/api-public/types.ts:32](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L32) | | `sender` | `string` | [packages/stream/solana/api-public/types.ts:31](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L31) | | `startDt` | `string` | [packages/stream/solana/api-public/types.ts:44](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L44) | | `streamflowFee` | `string` | [packages/stream/solana/api-public/types.ts:60](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L60) | | `streamflowFeePercentage` | `string` | [packages/stream/solana/api-public/types.ts:62](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L62) | | `streamflowFeeWithdrawn` | `string` | [packages/stream/solana/api-public/types.ts:61](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L61) | | `txFee` | `string` | [packages/stream/solana/api-public/types.ts:66](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L66) | # CreateInstructionResult URL: /docs/api/stream/interfaces/CreateInstructionResult # CreateInstructionResult [#createinstructionresult] Defined in: [types.ts:52](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L52) ## Extends [#extends] * [`InstructionResult`](/docs/api/stream/interfaces/InstructionResult) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ------------------------------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `instructions` | `TransactionInstruction`\[] | [`InstructionResult`](/docs/api/stream/interfaces/InstructionResult).[`instructions`](/docs/api/stream/interfaces/InstructionResult#instructions) | [packages/stream/solana/api/types.ts:47](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L47) | | `metadata?` | `Keypair` | - | [packages/stream/solana/api/types.ts:53](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L53) | | `metadataPubKey?` | `PublicKey` | [`InstructionResult`](/docs/api/stream/interfaces/InstructionResult).[`metadataPubKey`](/docs/api/stream/interfaces/InstructionResult#metadatapubkey) | [packages/stream/solana/api/types.ts:49](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L49) | | `signers?` | `Keypair`\[] | [`InstructionResult`](/docs/api/stream/interfaces/InstructionResult).[`signers`](/docs/api/stream/interfaces/InstructionResult#signers) | [packages/stream/solana/api/types.ts:48](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L48) | # DecodedStream URL: /docs/api/stream/interfaces/DecodedStream # DecodedStream [#decodedstream] Defined in: [types.ts:684](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L684) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------------------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `amountPerPeriod` | `BN` | [packages/stream/solana/types.ts:711](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L711) | | `automaticWithdrawal` | `boolean` | [packages/stream/solana/types.ts:716](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L716) | | `bump` | `number` | [packages/stream/solana/types.ts:731](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L731) | | `cancelableByRecipient` | `boolean` | [packages/stream/solana/types.ts:715](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L715) | | `cancelableBySender` | `boolean` | [packages/stream/solana/types.ts:714](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L714) | | `canceledAt` | `BN` | [packages/stream/solana/types.ts:689](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L689) | | `canTopup` | `boolean` | [packages/stream/solana/types.ts:719](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L719) | | `cliff` | `BN` | [packages/stream/solana/types.ts:712](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L712) | | `cliffAmount` | `BN` | [packages/stream/solana/types.ts:713](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L713) | | `closed` | `boolean` | [packages/stream/solana/types.ts:724](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L724) | | `createdAt` | `BN` | [packages/stream/solana/types.ts:687](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L687) | | `currentPauseStart` | `BN` | [packages/stream/solana/types.ts:725](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L725) | | `depositedAmount` | `BN` | [packages/stream/solana/types.ts:709](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L709) | | `end` | `BN` | [packages/stream/solana/types.ts:690](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L690) | | `escrowTokens` | `PublicKey` | [packages/stream/solana/types.ts:697](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L697) | | `fundsUnlockedAtLastRateChange` | `BN` | [packages/stream/solana/types.ts:728](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L728) | | `isPda` | `boolean` | [packages/stream/solana/types.ts:722](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L722) | | `lastRateChangeTime` | `BN` | [packages/stream/solana/types.ts:727](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L727) | | `lastWithdrawnAt` | `BN` | [packages/stream/solana/types.ts:691](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L691) | | `magic` | `BN` | [packages/stream/solana/types.ts:685](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L685) | | `mint` | `PublicKey` | [packages/stream/solana/types.ts:696](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L696) | | `name` | `string` | [packages/stream/solana/types.ts:720](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L720) | | `nonce` | `number` | [packages/stream/solana/types.ts:723](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L723) | | `oldMetadata` | `PublicKey` | [packages/stream/solana/types.ts:729](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L729) | | `partner` | `PublicKey` | [packages/stream/solana/types.ts:706](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L706) | | `partnerFeePercent` | `number` | [packages/stream/solana/types.ts:705](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L705) | | `partnerFeeTotal` | `BN` | [packages/stream/solana/types.ts:703](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L703) | | `partnerFeeWithdrawn` | `BN` | [packages/stream/solana/types.ts:704](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L704) | | `partnerTokens` | `PublicKey` | [packages/stream/solana/types.ts:707](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L707) | | `pauseCumulative` | `BN` | [packages/stream/solana/types.ts:726](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L726) | | `payer` | `PublicKey` | [packages/stream/solana/types.ts:730](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L730) | | `period` | `BN` | [packages/stream/solana/types.ts:710](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L710) | | `recipient` | `PublicKey` | [packages/stream/solana/types.ts:694](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L694) | | `recipientTokens` | `PublicKey` | [packages/stream/solana/types.ts:695](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L695) | | `sender` | `PublicKey` | [packages/stream/solana/types.ts:692](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L692) | | `senderTokens` | `PublicKey` | [packages/stream/solana/types.ts:693](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L693) | | `start` | `BN` | [packages/stream/solana/types.ts:708](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L708) | | `streamflowFeePercent` | `number` | [packages/stream/solana/types.ts:702](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L702) | | `streamflowFeeTotal` | `BN` | [packages/stream/solana/types.ts:700](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L700) | | `streamflowFeeWithdrawn` | `BN` | [packages/stream/solana/types.ts:701](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L701) | | `streamflowTreasury` | `PublicKey` | [packages/stream/solana/types.ts:698](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L698) | | `streamflowTreasuryTokens` | `PublicKey` | [packages/stream/solana/types.ts:699](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L699) | | `transferableByRecipient` | `boolean` | [packages/stream/solana/types.ts:718](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L718) | | `transferableBySender` | `boolean` | [packages/stream/solana/types.ts:717](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L717) | | `version` | `BN` | [packages/stream/solana/types.ts:686](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L686) | | `withdrawFrequency` | `BN` | [packages/stream/solana/types.ts:721](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L721) | | `withdrawnAmount` | `BN` | [packages/stream/solana/types.ts:688](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L688) | # DynamicContractSchema URL: /docs/api/stream/interfaces/DynamicContractSchema # DynamicContractSchema [#dynamiccontractschema] Defined in: [types.ts:84](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L84) Dynamic contract schema for aligned stream data Used for API responses with price-based streams ## Properties [#properties] | Property | Type | Defined in | | ---------------------------------------------------------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | `address` | `string` | [packages/stream/solana/api-public/types.ts:87](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L87) | | `chain` | [`Chain`](/docs/api/stream/type-aliases/Chain) | [packages/stream/solana/api-public/types.ts:85](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L85) | | `contractAddress` | `string` | [packages/stream/solana/api-public/types.ts:88](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L88) | | `expiryDt` | `string` | [packages/stream/solana/api-public/types.ts:97](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L97) | | `expiryPercentage` | `string` | [packages/stream/solana/api-public/types.ts:98](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L98) | | `floorPrice` | `string` | [packages/stream/solana/api-public/types.ts:99](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L99) | | `initialAmount` | `string` | [packages/stream/solana/api-public/types.ts:103](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L103) | | `initialAmountPerPeriod` | `string` | [packages/stream/solana/api-public/types.ts:101](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L101) | | `initialPrice` | `string` | [packages/stream/solana/api-public/types.ts:102](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L102) | | `lastPrice` | `string` | [packages/stream/solana/api-public/types.ts:100](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L100) | | `lastUpdateSlot` | `number` | [packages/stream/solana/api-public/types.ts:104](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L104) | | `maxPercentage` | `string` | [packages/stream/solana/api-public/types.ts:95](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L95) | | `maxPrice` | `string` | [packages/stream/solana/api-public/types.ts:93](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L93) | | `minPercentage` | `string` | [packages/stream/solana/api-public/types.ts:94](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L94) | | `minPrice` | `string` | [packages/stream/solana/api-public/types.ts:92](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L92) | | `priceOracleAddress` | `string` | [packages/stream/solana/api-public/types.ts:91](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L91) | | `priceOracleType` | [`PriceOracleType`](/docs/api/stream/type-aliases/PriceOracleType) | [packages/stream/solana/api-public/types.ts:90](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L90) | | `programId` | `string` | [packages/stream/solana/api-public/types.ts:86](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L86) | | `sender` | `string` | [packages/stream/solana/api-public/types.ts:89](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L89) | | `streamCanceledTime` | `string` \| `number` | [packages/stream/solana/api-public/types.ts:105](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L105) | | `tickSize` | `string` | [packages/stream/solana/api-public/types.ts:96](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L96) | # GetContractsOptions URL: /docs/api/stream/interfaces/GetContractsOptions # GetContractsOptions [#getcontractsoptions] Defined in: [client.ts:9](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/client.ts#L9) ## Properties [#properties] | Property | Type | Defined in | | --------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | `recipient?` | `string` | [packages/stream/solana/api-public/client.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/client.ts#L11) | | `sender?` | `string` | [packages/stream/solana/api-public/client.ts:10](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/client.ts#L10) | # IBaseStreamConfig URL: /docs/api/stream/interfaces/IBaseStreamConfig # IBaseStreamConfig [#ibasestreamconfig] Defined in: [types.ts:34](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L34) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------------------------------------ | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `automaticWithdrawal?` | `boolean` | [packages/stream/solana/types.ts:43](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L43) | | `cancelableByRecipient` | `boolean` | [packages/stream/solana/types.ts:39](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L39) | | `cancelableBySender` | `boolean` | [packages/stream/solana/types.ts:38](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L38) | | `canPause?` | `boolean` | [packages/stream/solana/types.ts:46](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L46) | | `canTopup` | `boolean` | [packages/stream/solana/types.ts:42](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L42) | | `canUpdateRate?` | `boolean` | [packages/stream/solana/types.ts:47](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L47) | | `cliff` | `number` | [packages/stream/solana/types.ts:37](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L37) | | `partner?` | `string` | [packages/stream/solana/types.ts:48](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L48) | | `period` | `number` | [packages/stream/solana/types.ts:35](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L35) | | `start` | `number` | [packages/stream/solana/types.ts:36](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L36) | | `tokenId` | `string` | [packages/stream/solana/types.ts:45](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L45) | | `tokenProgramId?` | `string` \| `PublicKey` | [packages/stream/solana/types.ts:49](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L49) | | `transferableByRecipient` | `boolean` | [packages/stream/solana/types.ts:41](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L41) | | `transferableBySender` | `boolean` | [packages/stream/solana/types.ts:40](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L40) | | `withdrawalFrequency?` | `number` | [packages/stream/solana/types.ts:44](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L44) | # ICreateExt URL: /docs/api/stream/interfaces/ICreateExt # ICreateExt [#icreateext] Defined in: [types.ts:416](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L416) ## Extended by [#extended-by] * [`ICreateStreamExt`](/docs/api/stream/interfaces/ICreateStreamExt) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `isNative?` | `boolean` | [packages/stream/solana/types.ts:418](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L418) | | `sender` | `Keypair` \| `SignerWalletAdapter` | [packages/stream/solana/types.ts:417](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L417) | # ICreateLockBatchParams URL: /docs/api/stream/interfaces/ICreateLockBatchParams # ICreateLockBatchParams [#icreatelockbatchparams] Defined in: [create-lock-batch.ts:14](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock-batch.ts#L14) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `partner?` | `string` | [packages/stream/solana/api/create-lock-batch.ts:19](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock-batch.ts#L19) | | `recipients` | [`ILockBatchRecipient`](/docs/api/stream/interfaces/ILockBatchRecipient)\[] | [packages/stream/solana/api/create-lock-batch.ts:15](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock-batch.ts#L15) | | `tokenId` | `string` | [packages/stream/solana/api/create-lock-batch.ts:16](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock-batch.ts#L16) | | `tokenProgramId?` | `string` \| `PublicKey` | [packages/stream/solana/api/create-lock-batch.ts:20](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock-batch.ts#L20) | | `transferableByRecipient?` | `boolean` | [packages/stream/solana/api/create-lock-batch.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock-batch.ts#L18) | | `unlockDate` | `number` | [packages/stream/solana/api/create-lock-batch.ts:17](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock-batch.ts#L17) | # ICreateLockParams URL: /docs/api/stream/interfaces/ICreateLockParams # ICreateLockParams [#icreatelockparams] Defined in: [create-lock.ts:8](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock.ts#L8) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | `amount` | `BN` | [packages/stream/solana/api/create-lock.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock.ts#L11) | | `name` | `string` | [packages/stream/solana/api/create-lock.ts:13](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock.ts#L13) | | `partner?` | `string` | [packages/stream/solana/api/create-lock.ts:15](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock.ts#L15) | | `recipient` | `string` | [packages/stream/solana/api/create-lock.ts:9](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock.ts#L9) | | `tokenId` | `string` | [packages/stream/solana/api/create-lock.ts:10](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock.ts#L10) | | `tokenProgramId?` | `string` \| `PublicKey` | [packages/stream/solana/api/create-lock.ts:16](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock.ts#L16) | | `transferableByRecipient?` | `boolean` | [packages/stream/solana/api/create-lock.ts:14](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock.ts#L14) | | `unlockDate` | `number` | [packages/stream/solana/api/create-lock.ts:12](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock.ts#L12) | # ICreateMultiError URL: /docs/api/stream/interfaces/ICreateMultiError # ICreateMultiError [#icreatemultierror] Defined in: [types.ts:124](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L124) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `contractErrorCode?` | `string` | [packages/stream/solana/types.ts:127](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L127) | | `error` | `string` | [packages/stream/solana/types.ts:126](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L126) | | `recipient` | `string` | [packages/stream/solana/types.ts:125](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L125) | # ICreateResult URL: /docs/api/stream/interfaces/ICreateResult # ICreateResult [#icreateresult] Defined in: [types.ts:151](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L151) ## Extends [#extends] * [`ITransactionResult`](/docs/api/stream/interfaces/ITransactionResult) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ---------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | | `ixs` | `TransactionInstruction`\[] | [`ITransactionResult`](/docs/api/stream/interfaces/ITransactionResult).[`ixs`](/docs/api/stream/interfaces/ITransactionResult#ixs) | [packages/stream/solana/types.ts:133](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L133) | | `metadataId` | `string` | - | [packages/stream/solana/types.ts:152](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L152) | | `txId` | `string` | [`ITransactionResult`](/docs/api/stream/interfaces/ITransactionResult).[`txId`](/docs/api/stream/interfaces/ITransactionResult#txid) | [packages/stream/solana/types.ts:134](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L134) | # ICreateStreamExt URL: /docs/api/stream/interfaces/ICreateStreamExt # ICreateStreamExt [#icreatestreamext] Defined in: [types.ts:427](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L427) ## Extends [#extends] * [`ICreateExt`](/docs/api/stream/interfaces/ICreateExt).[`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | --------------------------------------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `computeLimit?` | `number` \| `ComputeLimitEstimate` \| `"autoSimulate"` | [`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions).[`computeLimit`](/docs/api/stream/interfaces/ITransactionExtWithInstructions#computelimit) | packages/common/dist/esm/solana/index.d.ts:1015 | | `computePrice?` | `number` \| `ComputePriceEstimate` | [`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions).[`computePrice`](/docs/api/stream/interfaces/ITransactionExtWithInstructions#computeprice) | packages/common/dist/esm/solana/index.d.ts:1014 | | `customInstructions?` | `object` | [`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions).[`customInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions#custominstructions) | [packages/stream/solana/types.ts:422](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L422) | | `customInstructions.after?` | [`InstructionGenerator`](/docs/api/stream/type-aliases/InstructionGenerator) | - | [packages/stream/solana/types.ts:423](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L423) | | `feePayer?` | `PublicKey` | [`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions).[`feePayer`](/docs/api/stream/interfaces/ITransactionExtWithInstructions#feepayer) | packages/common/dist/esm/solana/index.d.ts:1016 | | `isNative?` | `boolean` | [`ICreateExt`](/docs/api/stream/interfaces/ICreateExt).[`isNative`](/docs/api/stream/interfaces/ICreateExt#isnative) | [packages/stream/solana/types.ts:418](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L418) | | `metadataPubKeys?` | `PublicKey`\[] | - | [packages/stream/solana/types.ts:429](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L429) | | `partner?` | `string` | - | [packages/stream/solana/types.ts:430](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L430) | | `sender` | `Keypair` \| `SignerWalletAdapter` | [`ICreateExt`](/docs/api/stream/interfaces/ICreateExt).[`sender`](/docs/api/stream/interfaces/ICreateExt#sender) | [packages/stream/solana/types.ts:417](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L417) | # ICreateStreamInstructions URL: /docs/api/stream/interfaces/ICreateStreamInstructions # ICreateStreamInstructions [#icreatestreaminstructions] Defined in: [types.ts:455](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L455) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------------------ | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `ixs` | `TransactionInstruction`\[] | [packages/stream/solana/types.ts:456](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L456) | | `metadata` | `Keypair` | [packages/stream/solana/types.ts:457](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L457) | | `metadataPubKey` | `PublicKey` | [packages/stream/solana/types.ts:458](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L458) | # ICreateVestingBatchParams URL: /docs/api/stream/interfaces/ICreateVestingBatchParams # ICreateVestingBatchParams [#icreatevestingbatchparams] Defined in: [create-vesting-batch.ts:17](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L17) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `automaticWithdrawal?` | `boolean` | [packages/stream/solana/api/create-vesting-batch.ts:25](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L25) | | `cancelableBySender?` | `boolean` | [packages/stream/solana/api/create-vesting-batch.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L24) | | `duration?` | `number` | [packages/stream/solana/api/create-vesting-batch.ts:23](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L23) | | `endDate?` | `number` | [packages/stream/solana/api/create-vesting-batch.ts:22](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L22) | | `partner?` | `string` | [packages/stream/solana/api/create-vesting-batch.ts:29](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L29) | | `period` | `number` | [packages/stream/solana/api/create-vesting-batch.ts:21](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L21) | | `recipients` | [`IVestingBatchRecipient`](/docs/api/stream/interfaces/IVestingBatchRecipient)\[] | [packages/stream/solana/api/create-vesting-batch.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L18) | | `start` | `number` | [packages/stream/solana/api/create-vesting-batch.ts:20](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L20) | | `tokenId` | `string` | [packages/stream/solana/api/create-vesting-batch.ts:19](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L19) | | `tokenProgramId?` | `string` \| `PublicKey` | [packages/stream/solana/api/create-vesting-batch.ts:30](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L30) | | `transferableByRecipient?` | `boolean` | [packages/stream/solana/api/create-vesting-batch.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L28) | | `transferableBySender?` | `boolean` | [packages/stream/solana/api/create-vesting-batch.ts:27](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L27) | | `withdrawalFrequency?` | `number` | [packages/stream/solana/api/create-vesting-batch.ts:26](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L26) | # ICreateVestingParams URL: /docs/api/stream/interfaces/ICreateVestingParams # ICreateVestingParams [#icreatevestingparams] Defined in: [create-vesting.ts:9](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L9) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `amount` | `BN` | [packages/stream/solana/api/create-vesting.ts:12](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L12) | | `amountPerPeriod?` | `BN` | [packages/stream/solana/api/create-vesting.ts:19](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L19) | | `automaticWithdrawal?` | `boolean` | [packages/stream/solana/api/create-vesting.ts:22](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L22) | | `cancelableBySender?` | `boolean` | [packages/stream/solana/api/create-vesting.ts:20](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L20) | | `canTopup?` | `boolean` | [packages/stream/solana/api/create-vesting.ts:21](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L21) | | `cliffAmount?` | `BN` | [packages/stream/solana/api/create-vesting.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L18) | | `duration?` | `number` | [packages/stream/solana/api/create-vesting.ts:17](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L17) | | `endDate?` | `number` | [packages/stream/solana/api/create-vesting.ts:16](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L16) | | `initialAllocation?` | `object` | [packages/stream/solana/api/create-vesting.ts:26](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L26) | | `initialAllocation.amount` | `BN` | [packages/stream/solana/api/create-vesting.ts:27](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L27) | | `name` | `string` | [packages/stream/solana/api/create-vesting.ts:15](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L15) | | `partner?` | `string` | [packages/stream/solana/api/create-vesting.ts:29](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L29) | | `period` | `number` | [packages/stream/solana/api/create-vesting.ts:14](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L14) | | `recipient` | `string` | [packages/stream/solana/api/create-vesting.ts:10](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L10) | | `start` | `number` | [packages/stream/solana/api/create-vesting.ts:13](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L13) | | `tokenId` | `string` | [packages/stream/solana/api/create-vesting.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L11) | | `tokenProgramId?` | `string` \| `PublicKey` | [packages/stream/solana/api/create-vesting.ts:30](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L30) | | `transferableByRecipient?` | `boolean` | [packages/stream/solana/api/create-vesting.ts:25](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L25) | | `transferableBySender?` | `boolean` | [packages/stream/solana/api/create-vesting.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L24) | | `withdrawalFrequency?` | `number` | [packages/stream/solana/api/create-vesting.ts:23](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting.ts#L23) | # IFees URL: /docs/api/stream/interfaces/IFees # IFees [#ifees] Defined in: [types.ts:140](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L140) Schema outlining vesting protocol fees. ## Properties [#properties] | Property | Type | Defined in | | --------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `autoClaimFeeSol?` | `number` | [packages/stream/solana/types.ts:144](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L144) | | `creationFeeSol?` | `number` | [packages/stream/solana/types.ts:142](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L142) | | `partnerFee` | `number` | [packages/stream/solana/types.ts:148](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L148) | | `streamflowFee` | `number` | [packages/stream/solana/types.ts:146](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L146) | # IGetAllData URL: /docs/api/stream/interfaces/IGetAllData # IGetAllData [#igetalldata] Defined in: [types.ts:115](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L115) ## Properties [#properties] | Property | Type | Defined in | | --------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | | `address` | `string` | [packages/stream/solana/types.ts:116](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L116) | | `direction?` | [`StreamDirection`](/docs/api/stream/enumerations/StreamDirection) | [packages/stream/solana/types.ts:118](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L118) | | `filters?` | `object` | [packages/stream/solana/types.ts:119](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L119) | | `filters.closed?` | `boolean` | [packages/stream/solana/types.ts:120](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L120) | | `type?` | [`StreamType`](/docs/api/stream/enumerations/StreamType) | [packages/stream/solana/types.ts:117](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L117) | # IGetFeesData URL: /docs/api/stream/interfaces/IGetFeesData # IGetFeesData [#igetfeesdata] Defined in: [types.ts:111](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L111) ## Properties [#properties] | Property | Type | Defined in | | ---------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `address` | `string` | [packages/stream/solana/types.ts:112](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L112) | # IInteractData URL: /docs/api/stream/interfaces/IInteractData # IInteractData [#iinteractdata] Defined in: [types.ts:80](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L80) ## Extended by [#extended-by] * [`IWithdrawData`](/docs/api/stream/interfaces/IWithdrawData) * [`IUpdateData`](/docs/api/stream/interfaces/IUpdateData) * [`ITransferData`](/docs/api/stream/interfaces/ITransferData) * [`ITopUpData`](/docs/api/stream/interfaces/ITopUpData) ## Properties [#properties] | Property | Type | Defined in | | ------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `id` | `string` | [packages/stream/solana/types.ts:81](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L81) | # IInteractStreamExt URL: /docs/api/stream/interfaces/IInteractStreamExt # IInteractStreamExt [#iinteractstreamext] Defined in: [types.ts:439](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L439) ## Extends [#extends] * [`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | --------------------------------------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `checkTokenAccounts?` | `boolean` | - | [packages/stream/solana/types.ts:441](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L441) | | `computeLimit?` | `number` \| `ComputeLimitEstimate` \| `"autoSimulate"` | [`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions).[`computeLimit`](/docs/api/stream/interfaces/ITransactionExtWithInstructions#computelimit) | packages/common/dist/esm/solana/index.d.ts:1015 | | `computePrice?` | `number` \| `ComputePriceEstimate` | [`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions).[`computePrice`](/docs/api/stream/interfaces/ITransactionExtWithInstructions#computeprice) | packages/common/dist/esm/solana/index.d.ts:1014 | | `customInstructions?` | `object` | [`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions).[`customInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions#custominstructions) | [packages/stream/solana/types.ts:422](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L422) | | `customInstructions.after?` | [`InstructionGenerator`](/docs/api/stream/type-aliases/InstructionGenerator) | - | [packages/stream/solana/types.ts:423](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L423) | | `feePayer?` | `PublicKey` | [`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions).[`feePayer`](/docs/api/stream/interfaces/ITransactionExtWithInstructions#feepayer) | packages/common/dist/esm/solana/index.d.ts:1016 | | `invoker` | `Keypair` \| `SignerWalletAdapter` | - | [packages/stream/solana/types.ts:440](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L440) | # ILockBatchRecipient URL: /docs/api/stream/interfaces/ILockBatchRecipient # ILockBatchRecipient [#ilockbatchrecipient] Defined in: [create-lock-batch.ts:8](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock-batch.ts#L8) ## Properties [#properties] | Property | Type | Defined in | | -------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `amount` | `BN` | [packages/stream/solana/api/create-lock-batch.ts:10](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock-batch.ts#L10) | | `name` | `string` | [packages/stream/solana/api/create-lock-batch.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock-batch.ts#L11) | | `recipient` | `string` | [packages/stream/solana/api/create-lock-batch.ts:9](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-lock-batch.ts#L9) | # IMultiTransactionResult URL: /docs/api/stream/interfaces/IMultiTransactionResult # IMultiTransactionResult [#imultitransactionresult] Defined in: [types.ts:155](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L155) ## Properties [#properties] | Property | Type | Defined in | | ---------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `errors` | [`ICreateMultiError`](/docs/api/stream/interfaces/ICreateMultiError)\[] | [packages/stream/solana/types.ts:159](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L159) | | `metadatas` | `string`\[] | [packages/stream/solana/types.ts:157](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L157) | | `metadataToRecipient` | `Record`\<`MetadataId`, [`IRecipient`](/docs/api/stream/interfaces/IRecipient)> | [packages/stream/solana/types.ts:158](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L158) | | `txs` | `string`\[] | [packages/stream/solana/types.ts:156](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L156) | # IPrepareCreateStreamExt URL: /docs/api/stream/interfaces/IPrepareCreateStreamExt # IPrepareCreateStreamExt [#ipreparecreatestreamext] Defined in: [types.ts:433](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L433) ## Extends [#extends] * `Omit`\<[`ICreateStreamExt`](/docs/api/stream/interfaces/ICreateStreamExt), `"sender"`> ## Properties [#properties] | Property | Type | Inherited from | Defined in | | --------------------------------------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `computeLimit?` | `number` \| `ComputeLimitEstimate` \| `"autoSimulate"` | [`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions).[`computeLimit`](/docs/api/stream/interfaces/ITransactionExtWithInstructions#computelimit) | packages/common/dist/esm/solana/index.d.ts:1015 | | `computePrice?` | `number` \| `ComputePriceEstimate` | [`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions).[`computePrice`](/docs/api/stream/interfaces/ITransactionExtWithInstructions#computeprice) | packages/common/dist/esm/solana/index.d.ts:1014 | | `customInstructions?` | `object` | [`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions).[`customInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions#custominstructions) | [packages/stream/solana/types.ts:422](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L422) | | `customInstructions.after?` | [`InstructionGenerator`](/docs/api/stream/type-aliases/InstructionGenerator) | - | [packages/stream/solana/types.ts:423](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L423) | | `feePayer?` | `PublicKey` | [`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions).[`feePayer`](/docs/api/stream/interfaces/ITransactionExtWithInstructions#feepayer) | packages/common/dist/esm/solana/index.d.ts:1016 | | `isNative?` | `boolean` | [`ICreateExt`](/docs/api/stream/interfaces/ICreateExt).[`isNative`](/docs/api/stream/interfaces/ICreateExt#isnative) | [packages/stream/solana/types.ts:418](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L418) | | `metadataPubKeys?` | `PublicKey`\[] | [`ICreateStreamExt`](/docs/api/stream/interfaces/ICreateStreamExt).[`metadataPubKeys`](/docs/api/stream/interfaces/ICreateStreamExt#metadatapubkeys) | [packages/stream/solana/types.ts:429](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L429) | | `partner?` | `string` | [`ICreateStreamExt`](/docs/api/stream/interfaces/ICreateStreamExt).[`partner`](/docs/api/stream/interfaces/ICreateStreamExt#partner) | [packages/stream/solana/types.ts:430](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L430) | | `sender` | `object` | - | [packages/stream/solana/types.ts:434](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L434) | | `sender.publicKey` | `PublicKey` | - | [packages/stream/solana/types.ts:435](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L435) | # IPrepareStreamExt URL: /docs/api/stream/interfaces/IPrepareStreamExt # IPrepareStreamExt [#ipreparestreamext] Defined in: [types.ts:444](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L444) ## Extends [#extends] * `Omit`\<[`IInteractStreamExt`](/docs/api/stream/interfaces/IInteractStreamExt), `"invoker"`> ## Properties [#properties] | Property | Type | Inherited from | Defined in | | --------------------------------------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `checkTokenAccounts?` | `boolean` | [`IInteractStreamExt`](/docs/api/stream/interfaces/IInteractStreamExt).[`checkTokenAccounts`](/docs/api/stream/interfaces/IInteractStreamExt#checktokenaccounts) | [packages/stream/solana/types.ts:441](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L441) | | `computeLimit?` | `number` \| `ComputeLimitEstimate` \| `"autoSimulate"` | [`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions).[`computeLimit`](/docs/api/stream/interfaces/ITransactionExtWithInstructions#computelimit) | packages/common/dist/esm/solana/index.d.ts:1015 | | `computePrice?` | `number` \| `ComputePriceEstimate` | [`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions).[`computePrice`](/docs/api/stream/interfaces/ITransactionExtWithInstructions#computeprice) | packages/common/dist/esm/solana/index.d.ts:1014 | | `customInstructions?` | `object` | [`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions).[`customInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions#custominstructions) | [packages/stream/solana/types.ts:422](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L422) | | `customInstructions.after?` | [`InstructionGenerator`](/docs/api/stream/type-aliases/InstructionGenerator) | - | [packages/stream/solana/types.ts:423](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L423) | | `feePayer?` | `PublicKey` | [`ITransactionExtWithInstructions`](/docs/api/stream/interfaces/ITransactionExtWithInstructions).[`feePayer`](/docs/api/stream/interfaces/ITransactionExtWithInstructions#feepayer) | packages/common/dist/esm/solana/index.d.ts:1016 | | `invoker` | `object` | - | [packages/stream/solana/types.ts:445](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L445) | | `invoker.publicKey` | `PublicKey` | - | [packages/stream/solana/types.ts:446](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L446) | # IRecipient URL: /docs/api/stream/interfaces/IRecipient # IRecipient [#irecipient] Defined in: [types.ts:25](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L25) ## Properties [#properties] | Property | Type | Defined in | | -------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `amount` | `BN` | [packages/stream/solana/types.ts:27](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L27) | | `amountPerPeriod` | `BN` | [packages/stream/solana/types.ts:30](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L30) | | `cliffAmount` | `BN` | [packages/stream/solana/types.ts:29](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L29) | | `name` | `string` | [packages/stream/solana/types.ts:28](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L28) | | `nonce?` | `number` | [packages/stream/solana/types.ts:31](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L31) | | `recipient` | `string` | [packages/stream/solana/types.ts:26](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L26) | # ISearchStreams URL: /docs/api/stream/interfaces/ISearchStreams # ISearchStreams [#isearchstreams] Defined in: [types.ts:404](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L404) ## Properties [#properties] | Property | Type | Defined in | | --------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `closed?` | `boolean` | [packages/stream/solana/types.ts:408](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L408) | | `mint?` | `string` | [packages/stream/solana/types.ts:405](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L405) | | `recipient?` | `string` | [packages/stream/solana/types.ts:407](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L407) | | `sender?` | `string` | [packages/stream/solana/types.ts:406](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L406) | # ITopUpData URL: /docs/api/stream/interfaces/ITopUpData # ITopUpData [#itopupdata] Defined in: [types.ts:105](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L105) ## Extends [#extends] * [`IInteractData`](/docs/api/stream/interfaces/IInteractData) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | -------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `amount` | `BN` | - | [packages/stream/solana/types.ts:106](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L106) | | `id` | `string` | [`IInteractData`](/docs/api/stream/interfaces/IInteractData).[`id`](/docs/api/stream/interfaces/IInteractData#id) | [packages/stream/solana/types.ts:81](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L81) | # ITopUpStreamExt URL: /docs/api/stream/interfaces/ITopUpStreamExt # ITopUpStreamExt [#itopupstreamext] Defined in: [types.ts:450](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L450) ## Extends [#extends] * `ITransactionExt` ## Properties [#properties] | Property | Type | Inherited from | Defined in | | --------------------------------------- | ------------------------------------------------------ | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | | `computeLimit?` | `number` \| `ComputeLimitEstimate` \| `"autoSimulate"` | `ITransactionExt.computeLimit` | packages/common/dist/esm/solana/index.d.ts:1015 | | `computePrice?` | `number` \| `ComputePriceEstimate` | `ITransactionExt.computePrice` | packages/common/dist/esm/solana/index.d.ts:1014 | | `feePayer?` | `PublicKey` | `ITransactionExt.feePayer` | packages/common/dist/esm/solana/index.d.ts:1016 | | `invoker` | `Keypair` \| `SignerWalletAdapter` | - | [packages/stream/solana/types.ts:451](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L451) | | `isNative?` | `boolean` | - | [packages/stream/solana/types.ts:452](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L452) | # ITransactionExtWithInstructions URL: /docs/api/stream/interfaces/ITransactionExtWithInstructions # ITransactionExtWithInstructions [#itransactionextwithinstructions] Defined in: [types.ts:421](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L421) ## Extends [#extends] * `ITransactionExt` ## Extended by [#extended-by] * [`ICreateStreamExt`](/docs/api/stream/interfaces/ICreateStreamExt) * [`IInteractStreamExt`](/docs/api/stream/interfaces/IInteractStreamExt) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | --------------------------------------------------- | ---------------------------------------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | | `computeLimit?` | `number` \| `ComputeLimitEstimate` \| `"autoSimulate"` | `ITransactionExt.computeLimit` | packages/common/dist/esm/solana/index.d.ts:1015 | | `computePrice?` | `number` \| `ComputePriceEstimate` | `ITransactionExt.computePrice` | packages/common/dist/esm/solana/index.d.ts:1014 | | `customInstructions?` | `object` | - | [packages/stream/solana/types.ts:422](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L422) | | `customInstructions.after?` | [`InstructionGenerator`](/docs/api/stream/type-aliases/InstructionGenerator) | - | [packages/stream/solana/types.ts:423](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L423) | | `feePayer?` | `PublicKey` | `ITransactionExt.feePayer` | packages/common/dist/esm/solana/index.d.ts:1016 | # ITransactionResult URL: /docs/api/stream/interfaces/ITransactionResult # ITransactionResult [#itransactionresult] Defined in: [types.ts:132](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L132) ## Extended by [#extended-by] * [`ICreateResult`](/docs/api/stream/interfaces/ICreateResult) ## Properties [#properties] | Property | Type | Defined in | | ---------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `ixs` | `TransactionInstruction`\[] | [packages/stream/solana/types.ts:133](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L133) | | `txId` | `string` | [packages/stream/solana/types.ts:134](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L134) | # ITransferData URL: /docs/api/stream/interfaces/ITransferData # ITransferData [#itransferdata] Defined in: [types.ts:101](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L101) ## Extends [#extends] * [`IInteractData`](/docs/api/stream/interfaces/IInteractData) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | -------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `id` | `string` | [`IInteractData`](/docs/api/stream/interfaces/IInteractData).[`id`](/docs/api/stream/interfaces/IInteractData#id) | [packages/stream/solana/types.ts:81](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L81) | | `newRecipient` | `string` | - | [packages/stream/solana/types.ts:102](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L102) | # IUpdateData URL: /docs/api/stream/interfaces/IUpdateData # IUpdateData [#iupdatedata] Defined in: [types.ts:88](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L88) ## Extends [#extends] * [`IInteractData`](/docs/api/stream/interfaces/IInteractData) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | ----------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `amountPerPeriod?` | `BN` | - | [packages/stream/solana/types.ts:91](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L91) | | `cancelableBySender?` | `boolean` | - | [packages/stream/solana/types.ts:96](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L96) | | `enableAutomaticWithdrawal?` | `boolean` | - | [packages/stream/solana/types.ts:89](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L89) | | `id` | `string` | [`IInteractData`](/docs/api/stream/interfaces/IInteractData).[`id`](/docs/api/stream/interfaces/IInteractData#id) | [packages/stream/solana/types.ts:81](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L81) | | `transferableByRecipient?` | `boolean` | - | [packages/stream/solana/types.ts:95](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L95) | | `transferableBySender?` | `boolean` | - | [packages/stream/solana/types.ts:94](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L94) | | `withdrawFrequency?` | `BN` | - | [packages/stream/solana/types.ts:90](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L90) | # IVestingBatchRecipient URL: /docs/api/stream/interfaces/IVestingBatchRecipient # IVestingBatchRecipient [#ivestingbatchrecipient] Defined in: [create-vesting-batch.ts:9](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L9) ## Properties [#properties] | Property | Type | Defined in | | --------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `amount` | `BN` | [packages/stream/solana/api/create-vesting-batch.ts:11](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L11) | | `amountPerPeriod?` | `BN` | [packages/stream/solana/api/create-vesting-batch.ts:14](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L14) | | `cliffAmount?` | `BN` | [packages/stream/solana/api/create-vesting-batch.ts:13](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L13) | | `name` | `string` | [packages/stream/solana/api/create-vesting-batch.ts:12](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L12) | | `recipient` | `string` | [packages/stream/solana/api/create-vesting-batch.ts:10](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/create-vesting-batch.ts#L10) | # IWithdrawData URL: /docs/api/stream/interfaces/IWithdrawData # IWithdrawData [#iwithdrawdata] Defined in: [types.ts:84](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L84) ## Extends [#extends] * [`IInteractData`](/docs/api/stream/interfaces/IInteractData) ## Properties [#properties] | Property | Type | Inherited from | Defined in | | --------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `amount?` | `BN` | - | [packages/stream/solana/types.ts:85](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L85) | | `id` | `string` | [`IInteractData`](/docs/api/stream/interfaces/IInteractData).[`id`](/docs/api/stream/interfaces/IInteractData#id) | [packages/stream/solana/types.ts:81](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L81) | # InstructionResult URL: /docs/api/stream/interfaces/InstructionResult # InstructionResult [#instructionresult] Defined in: [types.ts:46](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L46) ## Extended by [#extended-by] * [`CreateInstructionResult`](/docs/api/stream/interfaces/CreateInstructionResult) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `instructions` | `TransactionInstruction`\[] | [packages/stream/solana/api/types.ts:47](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L47) | | `metadataPubKey?` | `PublicKey` | [packages/stream/solana/api/types.ts:49](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L49) | | `signers?` | `Keypair`\[] | [packages/stream/solana/api/types.ts:48](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L48) | # LinearStream URL: /docs/api/stream/interfaces/LinearStream # LinearStream [#linearstream] Defined in: [types.ts:177](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L177) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------------------------------------------------ | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `amountPerPeriod` | `BN` | [packages/stream/solana/types.ts:205](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L205) | | `automaticWithdrawal` | `boolean` | [packages/stream/solana/types.ts:210](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L210) | | `bump` | `number` | [packages/stream/solana/types.ts:225](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L225) | | `cancelableByRecipient` | `boolean` | [packages/stream/solana/types.ts:209](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L209) | | `cancelableBySender` | `boolean` | [packages/stream/solana/types.ts:208](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L208) | | `canceledAt` | `number` | [packages/stream/solana/types.ts:183](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L183) | | `canTopup` | `boolean` | [packages/stream/solana/types.ts:213](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L213) | | `cliff` | `number` | [packages/stream/solana/types.ts:206](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L206) | | `cliffAmount` | `BN` | [packages/stream/solana/types.ts:207](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L207) | | `closed` | `boolean` | [packages/stream/solana/types.ts:218](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L218) | | `createdAt` | `number` | [packages/stream/solana/types.ts:181](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L181) | | `currentPauseStart` | `number` | [packages/stream/solana/types.ts:219](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L219) | | `depositedAmount` | `BN` | [packages/stream/solana/types.ts:203](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L203) | | `end` | `number` | [packages/stream/solana/types.ts:184](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L184) | | `escrowTokens` | `string` | [packages/stream/solana/types.ts:191](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L191) | | `fundsUnlockedAtLastRateChange` | `BN` | [packages/stream/solana/types.ts:222](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L222) | | `isAligned` | `boolean` | [packages/stream/solana/types.ts:178](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L178) | | `isPda` | `boolean` | [packages/stream/solana/types.ts:216](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L216) | | `lastRateChangeTime` | `number` | [packages/stream/solana/types.ts:221](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L221) | | `lastWithdrawnAt` | `number` | [packages/stream/solana/types.ts:185](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L185) | | `magic` | `number` | [packages/stream/solana/types.ts:179](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L179) | | `mint` | `string` | [packages/stream/solana/types.ts:190](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L190) | | `name` | `string` | [packages/stream/solana/types.ts:214](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L214) | | `nonce` | `number` | [packages/stream/solana/types.ts:217](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L217) | | `oldMetadata` | `PublicKey` | [packages/stream/solana/types.ts:223](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L223) | | `partner` | `string` | [packages/stream/solana/types.ts:200](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L200) | | `partnerFeePercent` | `number` | [packages/stream/solana/types.ts:199](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L199) | | `partnerFeeTotal` | `BN` | [packages/stream/solana/types.ts:197](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L197) | | `partnerFeeWithdrawn` | `BN` | [packages/stream/solana/types.ts:198](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L198) | | `partnerTokens` | `string` | [packages/stream/solana/types.ts:201](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L201) | | `pauseCumulative` | `BN` | [packages/stream/solana/types.ts:220](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L220) | | `payer` | `string` | [packages/stream/solana/types.ts:224](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L224) | | `period` | `number` | [packages/stream/solana/types.ts:204](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L204) | | `recipient` | `string` | [packages/stream/solana/types.ts:188](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L188) | | `recipientTokens` | `string` | [packages/stream/solana/types.ts:189](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L189) | | `sender` | `string` | [packages/stream/solana/types.ts:186](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L186) | | `senderTokens` | `string` | [packages/stream/solana/types.ts:187](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L187) | | `start` | `number` | [packages/stream/solana/types.ts:202](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L202) | | `streamflowFeePercent` | `number` | [packages/stream/solana/types.ts:196](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L196) | | `streamflowFeeTotal` | `BN` | [packages/stream/solana/types.ts:194](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L194) | | `streamflowFeeWithdrawn` | `BN` | [packages/stream/solana/types.ts:195](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L195) | | `streamflowTreasury` | `string` | [packages/stream/solana/types.ts:192](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L192) | | `streamflowTreasuryTokens` | `string` | [packages/stream/solana/types.ts:193](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L193) | | `transferableByRecipient` | `boolean` | [packages/stream/solana/types.ts:212](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L212) | | `transferableBySender` | `boolean` | [packages/stream/solana/types.ts:211](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L211) | | `type` | [`StreamType`](/docs/api/stream/enumerations/StreamType) | [packages/stream/solana/types.ts:227](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L227) | | `version` | `number` | [packages/stream/solana/types.ts:180](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L180) | | `withdrawalFrequency` | `number` | [packages/stream/solana/types.ts:215](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L215) | | `withdrawnAmount` | `BN` | [packages/stream/solana/types.ts:182](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L182) | ## Methods [#methods] ### remaining() [#remaining] ```ts remaining(decimals): number; ``` Defined in: [types.ts:231](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L231) #### Parameters [#parameters] | Parameter | Type | | ---------- | -------- | | `decimals` | `number` | #### Returns [#returns] `number` *** ### unlocked() [#unlocked] ```ts unlocked(currentTimestamp): BN; ``` Defined in: [types.ts:229](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L229) #### Parameters [#parameters-1] | Parameter | Type | | ------------------ | -------- | | `currentTimestamp` | `number` | #### Returns [#returns-1] `BN` # MetadataRecipientHashMap URL: /docs/api/stream/interfaces/MetadataRecipientHashMap # MetadataRecipientHashMap [#metadatarecipienthashmap] Defined in: [types.ts:734](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L734) ## Indexable [#indexable] ```ts [metadataPubKey: string]: IRecipient ``` # NativeOptions URL: /docs/api/stream/interfaces/NativeOptions # NativeOptions [#nativeoptions] Defined in: [types.ts:74](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L74) ## Properties [#properties] | Property | Type | Defined in | | ------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `isNative?` | `boolean` | [packages/stream/solana/api/types.ts:75](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L75) | # StreamClientOptions URL: /docs/api/stream/interfaces/StreamClientOptions # StreamClientOptions [#streamclientoptions] Defined in: [types.ts:370](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L370) ## Properties [#properties] | Property | Type | Defined in | | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `cluster?` | [`ICluster`](/docs/api/stream/enumerations/ICluster) | [packages/stream/solana/types.ts:372](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L372) | | `clusterUrl` | `string` | [packages/stream/solana/types.ts:371](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L371) | | `commitment?` | `Commitment` \| `ConnectionConfig` | [packages/stream/solana/types.ts:374](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L374) | | `programId?` | `string` | [packages/stream/solana/types.ts:373](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L373) | | `sendRate?` | `number` | [packages/stream/solana/types.ts:375](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L375) | | `sendScheduler?` | \| `PQueue`\<`PriorityQueue`, `QueueAddOptions`> \| [`TransactionSchedulingOptions`](/docs/api/stream/interfaces/TransactionSchedulingOptions) | [packages/stream/solana/types.ts:377](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L377) | | `sendThrottler?` | `PQueue` | [packages/stream/solana/types.ts:376](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L376) | # StreamClientOptionsWithConnection URL: /docs/api/stream/interfaces/StreamClientOptionsWithConnection # StreamClientOptionsWithConnection [#streamclientoptionswithconnection] Defined in: [types.ts:385](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L385) StreamClient options that accept a pre-existing Connection instance. Useful when you already have a connection (e.g. shared across multiple clients) and want to avoid creating a duplicate one internally. ## Properties [#properties] | Property | Type | Defined in | | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `cluster` | [`ICluster`](/docs/api/stream/enumerations/ICluster) | [packages/stream/solana/types.ts:387](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L387) | | `connection` | `Connection` | [packages/stream/solana/types.ts:386](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L386) | | `programId?` | `string` | [packages/stream/solana/types.ts:388](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L388) | | `sendScheduler?` | \| `PQueue`\<`PriorityQueue`, `QueueAddOptions`> \| [`TransactionSchedulingOptions`](/docs/api/stream/interfaces/TransactionSchedulingOptions) | [packages/stream/solana/types.ts:389](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L389) | # TabulariumContract URL: /docs/api/stream/interfaces/TabulariumContract # TabulariumContract [#tabulariumcontract] Defined in: [types.ts:113](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L113) TabulariumContract interface Mirrors LinearStream with primitive types for API/public usage All addresses are strings, timestamps are numbers, amounts are BN ## Properties [#properties] | Property | Type | Defined in | | ------------------------------------------------------------------------ | -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | `address` | `string` | [packages/stream/solana/api-public/types.ts:115](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L115) | | `amountPerPeriod` | `BN` | [packages/stream/solana/api-public/types.ts:133](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L133) | | `automaticWithdrawal` | `boolean` | [packages/stream/solana/api-public/types.ts:161](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L161) | | `cancelableByRecipient` | `boolean` | [packages/stream/solana/api-public/types.ts:157](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L157) | | `cancelableBySender` | `boolean` | [packages/stream/solana/api-public/types.ts:156](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L156) | | `canceledAt` | `number` | [packages/stream/solana/api-public/types.ts:145](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L145) | | `canTopup` | `boolean` | [packages/stream/solana/api-public/types.ts:160](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L160) | | `cliff` | `number` | [packages/stream/solana/api-public/types.ts:143](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L143) | | `cliffAmount` | `BN` | [packages/stream/solana/api-public/types.ts:132](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L132) | | `closed` | `boolean` | [packages/stream/solana/api-public/types.ts:162](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L162) | | `createdAt` | `number` | [packages/stream/solana/api-public/types.ts:144](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L144) | | `currentPauseStart` | `number` | [packages/stream/solana/api-public/types.ts:148](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L148) | | `depositedAmount` | `BN` | [packages/stream/solana/api-public/types.ts:130](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L130) | | `end` | `number` | [packages/stream/solana/api-public/types.ts:142](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L142) | | `escrowTokens` | `string` | [packages/stream/solana/api-public/types.ts:125](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L125) | | `fundsUnlockedAtLastRateChange` | `BN` | [packages/stream/solana/api-public/types.ts:139](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L139) | | `isAligned` | `boolean` | [packages/stream/solana/api-public/types.ts:166](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L166) | | `lastRateChangeTime` | `number` | [packages/stream/solana/api-public/types.ts:147](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L147) | | `lastWithdrawnAt` | `number` | [packages/stream/solana/api-public/types.ts:146](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L146) | | `magic` | `number` | [packages/stream/solana/api-public/types.ts:168](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L168) | | `mint` | `string` | [packages/stream/solana/api-public/types.ts:124](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L124) | | `name` | `string` | [packages/stream/solana/api-public/types.ts:164](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L164) | | `oldMetadata` | `string` | [packages/stream/solana/api-public/types.ts:170](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L170) | | `partner` | `string` | [packages/stream/solana/api-public/types.ts:121](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L121) | | `partnerFeePercent` | `number` | [packages/stream/solana/api-public/types.ts:154](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L154) | | `partnerFeeTotal` | `BN` | [packages/stream/solana/api-public/types.ts:136](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L136) | | `partnerFeeWithdrawn` | `BN` | [packages/stream/solana/api-public/types.ts:137](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L137) | | `partnerTokens` | `string` | [packages/stream/solana/api-public/types.ts:122](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L122) | | `pauseCumulative` | `BN` | [packages/stream/solana/api-public/types.ts:138](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L138) | | `period` | `number` | [packages/stream/solana/api-public/types.ts:150](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L150) | | `recipient` | `string` | [packages/stream/solana/api-public/types.ts:119](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L119) | | `recipientTokens` | `string` | [packages/stream/solana/api-public/types.ts:120](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L120) | | `sender` | `string` | [packages/stream/solana/api-public/types.ts:117](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L117) | | `senderTokens` | `string` | [packages/stream/solana/api-public/types.ts:118](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L118) | | `start` | `number` | [packages/stream/solana/api-public/types.ts:141](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L141) | | `streamflowFeePercent` | `number` | [packages/stream/solana/api-public/types.ts:153](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L153) | | `streamflowFeeTotal` | `BN` | [packages/stream/solana/api-public/types.ts:134](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L134) | | `streamflowFeeWithdrawn` | `BN` | [packages/stream/solana/api-public/types.ts:135](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L135) | | `streamflowTreasury` | `string` | [packages/stream/solana/api-public/types.ts:127](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L127) | | `streamflowTreasuryTokens` | `string` | [packages/stream/solana/api-public/types.ts:128](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L128) | | `transferableByRecipient` | `boolean` | [packages/stream/solana/api-public/types.ts:159](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L159) | | `transferableBySender` | `boolean` | [packages/stream/solana/api-public/types.ts:158](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L158) | | `type` | [`StreamType`](/docs/api/stream/enumerations/StreamType) | [packages/stream/solana/api-public/types.ts:165](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L165) | | `version` | `number` | [packages/stream/solana/api-public/types.ts:169](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L169) | | `withdrawalFrequency` | `number` | [packages/stream/solana/api-public/types.ts:151](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L151) | | `withdrawnAmount` | `BN` | [packages/stream/solana/api-public/types.ts:131](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L131) | # TransactionSchedulingOptions URL: /docs/api/stream/interfaces/TransactionSchedulingOptions # TransactionSchedulingOptions [#transactionschedulingoptions] Defined in: [types.ts:352](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L352) ## Properties [#properties] | Property | Type | Description | Defined in | | ------------------------------------------------------- | -------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `sendInterval?` | `number` | time interval between consecutive sends | [packages/stream/solana/types.ts:360](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L360) | | `sendRate` | `number` | concurrency rate for scheduling | [packages/stream/solana/types.ts:356](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L356) | | `waitBeforeConfirming?` | `number` | time interval before confirming the transaction | [packages/stream/solana/types.ts:364](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L364) | # AlignedStream URL: /docs/api/stream/type-aliases/AlignedStream # AlignedStream [#alignedstream] ```ts type AlignedStream = LinearStream & AlignedStreamData; ``` Defined in: [types.ts:252](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L252) # AlignedStreamData URL: /docs/api/stream/type-aliases/AlignedStreamData # AlignedStreamData [#alignedstreamdata] ```ts type AlignedStreamData = object; ``` Defined in: [types.ts:234](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L234) ## Properties [#properties] | Property | Type | Defined in | | ---------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | `expiryPercentage` | `number` | [packages/stream/solana/types.ts:248](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L248) | | `expiryTime` | `number` | [packages/stream/solana/types.ts:247](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L247) | | `floorPrice` | `number` | [packages/stream/solana/types.ts:249](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L249) | | `initialAmountPerPeriod` | `BN` | [packages/stream/solana/types.ts:242](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L242) | | `initialNetAmount` | `BN` | [packages/stream/solana/types.ts:246](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L246) | | `initialPrice` | `number` | [packages/stream/solana/types.ts:243](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L243) | | `lastAmountUpdateTime` | `number` | [packages/stream/solana/types.ts:245](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L245) | | `lastPrice` | `number` | [packages/stream/solana/types.ts:244](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L244) | | `maxPercentage` | `number` | [packages/stream/solana/types.ts:238](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L238) | | `maxPrice` | `number` | [packages/stream/solana/types.ts:236](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L236) | | `minPercentage` | `number` | [packages/stream/solana/types.ts:237](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L237) | | `minPrice` | `number` | [packages/stream/solana/types.ts:235](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L235) | | `oracleType` | [`OracleTypeName`](/docs/api/stream/type-aliases/OracleTypeName) | [packages/stream/solana/types.ts:239](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L239) | | `priceOracle` | `string` \| `undefined` | [packages/stream/solana/types.ts:240](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L240) | | `tickSize` | `number` | [packages/stream/solana/types.ts:241](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L241) | # AlignedUnlocksContract URL: /docs/api/stream/type-aliases/AlignedUnlocksContract # AlignedUnlocksContract [#alignedunlockscontract] ```ts type AlignedUnlocksContract = AlignedUnlocksAccounts["contract"]; ``` Defined in: [types.ts:395](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L395) # BatchItemResult URL: /docs/api/stream/type-aliases/BatchItemResult # BatchItemResult [#batchitemresult] ```ts type BatchItemResult = | BatchItemSuccess | BatchItemError; ``` Defined in: [types.ts:751](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L751) # BuildTransactionFn URL: /docs/api/stream/type-aliases/BuildTransactionFn # BuildTransactionFn [#buildtransactionfn] ```ts type BuildTransactionFn = (instructions, options, env) => Promise; ``` Defined in: [types.ts:113](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L113) ## Parameters [#parameters] | Parameter | Type | | -------------- | -------------------------------------------------------------------------------- | | `instructions` | `TransactionInstruction`\[] | | `options` | [`BuildTransactionOptions`](/docs/api/stream/interfaces/BuildTransactionOptions) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) | ## Returns [#returns] `Promise`\<[`BuiltTransaction`](/docs/api/stream/interfaces/BuiltTransaction)> # CancelFn URL: /docs/api/stream/type-aliases/CancelFn # CancelFn [#cancelfn] ```ts type CancelFn = (params, invoker, env) => Promise; ``` Defined in: [types.ts:101](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L101) ## Parameters [#parameters] | Parameter | Type | | ----------- | -------------------------------------------------- | | `params` | \{ `id`: `string`; } | | `params.id` | `string` | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) | ## Returns [#returns] `Promise`\<[`InstructionResult`](/docs/api/stream/interfaces/InstructionResult)> # Chain URL: /docs/api/stream/type-aliases/Chain # Chain [#chain] ```ts type Chain = "SOLANA" | "APTOS" | "ETHEREUM" | "BNB" | "POLYGON" | "SUI"; ``` Defined in: [types.ts:8](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L8) Chain identifiers supported by Streamflow protocol # ChangeOracleParams URL: /docs/api/stream/type-aliases/ChangeOracleParams # ChangeOracleParams [#changeoracleparams] ```ts type ChangeOracleParams = AlignedUnlocksTypes["changeOracleParams"]; ``` Defined in: [types.ts:400](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L400) # ContractType URL: /docs/api/stream/type-aliases/ContractType # ContractType [#contracttype] ```ts type ContractType = | "VESTING" | "PAYMENT" | "TOKEN_LOCK" | "DYNAMIC_VESTING" | "DYNAMIC_LOCK"; ``` Defined in: [types.ts:13](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L13) Contract types supported by Streamflow protocol # CreateBatchFn URL: /docs/api/stream/type-aliases/CreateBatchFn # CreateBatchFn [#createbatchfn] ```ts type CreateBatchFn = (params, invoker, env) => Promise; ``` Defined in: [types.ts:107](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L107) ## Parameters [#parameters] | Parameter | Type | | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `params` | \| [`ICreateMultipleLinearStreamData`](/docs/api/stream/type-aliases/ICreateMultipleLinearStreamData) \| [`ICreateMultipleAlignedStreamData`](/docs/api/stream/type-aliases/ICreateMultipleAlignedStreamData) | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) & [`NativeOptions`](/docs/api/stream/interfaces/NativeOptions) | ## Returns [#returns] `Promise`\<[`BatchInstructionResult`](/docs/api/stream/interfaces/BatchInstructionResult)> # CreateFn URL: /docs/api/stream/type-aliases/CreateFn # CreateFn [#createfn] ```ts type CreateFn = (params, invoker, env) => Promise; ``` Defined in: [types.ts:91](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L91) ## Parameters [#parameters] | Parameter | Type | | --------- | --------------------------------------------------------------------------------------------------------- | | `params` | [`ICreateStreamData`](/docs/api/stream/type-aliases/ICreateStreamData) | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) & [`NativeOptions`](/docs/api/stream/interfaces/NativeOptions) | ## Returns [#returns] `Promise`\<[`CreateInstructionResult`](/docs/api/stream/interfaces/CreateInstructionResult)> # CreateParams URL: /docs/api/stream/type-aliases/CreateParams # CreateParams [#createparams] ```ts type CreateParams = AlignedUnlocksTypes["createParams"]; ``` Defined in: [types.ts:399](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L399) # CreateTestOracleParams URL: /docs/api/stream/type-aliases/CreateTestOracleParams # CreateTestOracleParams [#createtestoracleparams] ```ts type CreateTestOracleParams = AlignedUnlocksTypes["createTestOracleParams"]; ``` Defined in: [types.ts:401](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L401) # Env URL: /docs/api/stream/type-aliases/Env # Env [#env] ```ts type Env = EnvWithConnection | EnvWithRpcUrl; ``` Defined in: [types.ts:37](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L37) # ExecuteBatchFn URL: /docs/api/stream/type-aliases/ExecuteBatchFn # ExecuteBatchFn [#executebatchfn] ```ts type ExecuteBatchFn = (builtTransactions, env) => Promise; ``` Defined in: [types.ts:126](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L126) ## Parameters [#parameters] | Parameter | Type | | ------------------- | --------------------------------------------------------------------- | | `builtTransactions` | [`BuiltTransaction`](/docs/api/stream/interfaces/BuiltTransaction)\[] | | `env` | [`ExecutionEnv`](/docs/api/stream/type-aliases/ExecutionEnv) | ## Returns [#returns] `Promise`\<[`BatchExecuteResult`](/docs/api/stream/interfaces/BatchExecuteResult)> # ExecuteBatchSequentialFn URL: /docs/api/stream/type-aliases/ExecuteBatchSequentialFn # ExecuteBatchSequentialFn [#executebatchsequentialfn] ```ts type ExecuteBatchSequentialFn = (builtTransactions, env) => Promise; ``` Defined in: [types.ts:128](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L128) ## Parameters [#parameters] | Parameter | Type | | ------------------- | --------------------------------------------------------------------- | | `builtTransactions` | [`BuiltTransaction`](/docs/api/stream/interfaces/BuiltTransaction)\[] | | `env` | [`ExecutionEnv`](/docs/api/stream/type-aliases/ExecutionEnv) | ## Returns [#returns] `Promise`\<[`BatchExecuteResult`](/docs/api/stream/interfaces/BatchExecuteResult)> # ExecuteFn URL: /docs/api/stream/type-aliases/ExecuteFn # ExecuteFn [#executefn] ```ts type ExecuteFn = (builtTx, env) => Promise; ``` Defined in: [types.ts:124](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L124) ## Parameters [#parameters] | Parameter | Type | | --------- | ------------------------------------------------------------------ | | `builtTx` | [`BuiltTransaction`](/docs/api/stream/interfaces/BuiltTransaction) | | `env` | [`ExecutionEnv`](/docs/api/stream/type-aliases/ExecutionEnv) | ## Returns [#returns] `Promise`\<`TransactionSignature`> # ExecutionEnv URL: /docs/api/stream/type-aliases/ExecutionEnv # ExecutionEnv [#executionenv] ```ts type ExecutionEnv = Env & object; ``` Defined in: [types.ts:39](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L39) ## Type Declaration [#type-declaration] | Name | Type | Defined in | | ---------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `queue?` | `PQueue` | [packages/stream/solana/api/types.ts:40](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L40) | | `sendRate?` | `number` | [packages/stream/solana/api/types.ts:41](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L41) | | `skipPreflight?` | `boolean` | [packages/stream/solana/api/types.ts:43](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L43) | | `throttler?` | `PQueue` | [packages/stream/solana/api/types.ts:42](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L42) | # IAlignedStreamConfig URL: /docs/api/stream/type-aliases/IAlignedStreamConfig # IAlignedStreamConfig [#ialignedstreamconfig] ```ts type IAlignedStreamConfig = object; ``` Defined in: [types.ts:52](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L52) ## Properties [#properties] | Property | Type | Defined in | | ----------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `expiryPercentage?` | `number` \| `BN` | [packages/stream/solana/types.ts:62](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L62) | | `expiryTime?` | `number` | [packages/stream/solana/types.ts:61](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L61) | | `floorPrice?` | `number` \| `BN` | [packages/stream/solana/types.ts:63](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L63) | | `maxPercentage` | `number` \| `BN` | [packages/stream/solana/types.ts:56](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L56) | | `maxPrice` | `number` \| `BN` | [packages/stream/solana/types.ts:54](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L54) | | `minPercentage` | `number` \| `BN` | [packages/stream/solana/types.ts:55](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L55) | | `minPrice` | `number` \| `BN` | [packages/stream/solana/types.ts:53](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L53) | | `oracleType?` | [`OracleTypeName`](/docs/api/stream/type-aliases/OracleTypeName) | [packages/stream/solana/types.ts:57](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L57) | | `priceOracle?` | `Address` | [packages/stream/solana/types.ts:58](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L58) | | `skipInitial?` | `boolean` | [packages/stream/solana/types.ts:59](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L59) | | `tickSize?` | `number` | [packages/stream/solana/types.ts:60](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L60) | # ICancelData URL: /docs/api/stream/type-aliases/ICancelData # ICancelData [#icanceldata] ```ts type ICancelData = IInteractData; ``` Defined in: [types.ts:99](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L99) # ICreateAlignedStreamData URL: /docs/api/stream/type-aliases/ICreateAlignedStreamData # ICreateAlignedStreamData [#icreatealignedstreamdata] ```ts type ICreateAlignedStreamData = ICreateLinearStreamData & IAlignedStreamConfig; ``` Defined in: [types.ts:68](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L68) # ICreateLinearStreamData URL: /docs/api/stream/type-aliases/ICreateLinearStreamData # ICreateLinearStreamData [#icreatelinearstreamdata] ```ts type ICreateLinearStreamData = IBaseStreamConfig & IRecipient; ``` Defined in: [types.ts:66](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L66) # ICreateMultipleAlignedStreamData URL: /docs/api/stream/type-aliases/ICreateMultipleAlignedStreamData # ICreateMultipleAlignedStreamData [#icreatemultiplealignedstreamdata] ```ts type ICreateMultipleAlignedStreamData = ICreateMultipleLinearStreamData & IAlignedStreamConfig; ``` Defined in: [types.ts:76](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L76) # ICreateMultipleLinearStreamData URL: /docs/api/stream/type-aliases/ICreateMultipleLinearStreamData # ICreateMultipleLinearStreamData [#icreatemultiplelinearstreamdata] ```ts type ICreateMultipleLinearStreamData = IBaseStreamConfig & object; ``` Defined in: [types.ts:72](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L72) ## Type Declaration [#type-declaration] | Name | Type | Defined in | | ------------ | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `recipients` | [`IRecipient`](/docs/api/stream/interfaces/IRecipient)\[] | [packages/stream/solana/types.ts:73](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L73) | # ICreateMultipleStreamData URL: /docs/api/stream/type-aliases/ICreateMultipleStreamData # ICreateMultipleStreamData [#icreatemultiplestreamdata] ```ts type ICreateMultipleStreamData = | ICreateMultipleLinearStreamData | ICreateMultipleAlignedStreamData; ``` Defined in: [types.ts:78](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L78) # ICreateStreamData URL: /docs/api/stream/type-aliases/ICreateStreamData # ICreateStreamData [#icreatestreamdata] ```ts type ICreateStreamData = | ICreateLinearStreamData | ICreateAlignedStreamData; ``` Defined in: [types.ts:70](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L70) # IGetOneData URL: /docs/api/stream/type-aliases/IGetOneData # IGetOneData [#igetonedata] ```ts type IGetOneData = IInteractData; ``` Defined in: [types.ts:109](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L109) # InstructionGenerator URL: /docs/api/stream/type-aliases/InstructionGenerator # InstructionGenerator [#instructiongenerator] ```ts type InstructionGenerator = | TransactionInstruction[] | ((params) => TransactionInstruction[] | Promise); ``` Defined in: [types.ts:753](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L753) # Invoker URL: /docs/api/stream/type-aliases/Invoker # Invoker [#invoker] ```ts type Invoker = | Keypair | SignerWalletAdapter | { publicKey: PublicKey; }; ``` Defined in: [types.ts:89](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L89) # OracleType URL: /docs/api/stream/type-aliases/OracleType # OracleType [#oracletype] ```ts type OracleType = IdlTypes["oracleType"]; ``` Defined in: [types.ts:396](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L396) # OracleTypeName URL: /docs/api/stream/type-aliases/OracleTypeName # OracleTypeName [#oracletypename] ```ts type OracleTypeName = "none" | "pyth" | "switchboard" | "test"; ``` Defined in: [types.ts:162](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L162) # PriceOracleType URL: /docs/api/stream/type-aliases/PriceOracleType # PriceOracleType [#priceoracletype] ```ts type PriceOracleType = "TEST" | "SWITCHBOARD" | "PYTH"; ``` Defined in: [types.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api-public/types.ts#L18) Price oracle types for dynamic contracts # SignFn URL: /docs/api/stream/type-aliases/SignFn # SignFn [#signfn] ```ts type SignFn = (transaction, signers) => Promise; ``` Defined in: [types.ts:119](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L119) ## Parameters [#parameters] | Parameter | Type | | ------------- | ----------------------------------------------------------------------------- | | `transaction` | `VersionedTransaction` | | `signers` | ( \| `SignerWalletAdapter` \| `Keypair` \| \{ `publicKey`: `PublicKey`; })\[] | ## Returns [#returns] `Promise`\<`VersionedTransaction`> # Stream URL: /docs/api/stream/type-aliases/Stream # Stream [#stream] ```ts type Stream = | LinearStream | AlignedStream; ``` Defined in: [types.ts:254](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L254) # TestOracle URL: /docs/api/stream/type-aliases/TestOracle # TestOracle [#testoracle] ```ts type TestOracle = AlignedUnlocksAccounts["testOracle"]; ``` Defined in: [types.ts:397](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L397) # TopupFn URL: /docs/api/stream/type-aliases/TopupFn # TopupFn [#topupfn] ```ts type TopupFn = (params, invoker, env) => Promise; ``` Defined in: [types.ts:99](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L99) ## Parameters [#parameters] | Parameter | Type | | --------- | --------------------------------------------------------------------------------------------------------- | | `params` | [`ITopUpData`](/docs/api/stream/interfaces/ITopUpData) | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) & [`NativeOptions`](/docs/api/stream/interfaces/NativeOptions) | ## Returns [#returns] `Promise`\<[`InstructionResult`](/docs/api/stream/interfaces/InstructionResult)> # TransferFn URL: /docs/api/stream/type-aliases/TransferFn # TransferFn [#transferfn] ```ts type TransferFn = (params, invoker, env) => Promise; ``` Defined in: [types.ts:103](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L103) ## Parameters [#parameters] | Parameter | Type | | --------- | ------------------------------------------------------------ | | `params` | [`ITransferData`](/docs/api/stream/interfaces/ITransferData) | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) | ## Returns [#returns] `Promise`\<[`InstructionResult`](/docs/api/stream/interfaces/InstructionResult)> # UpdateFn URL: /docs/api/stream/type-aliases/UpdateFn # UpdateFn [#updatefn] ```ts type UpdateFn = (params, invoker, env) => Promise; ``` Defined in: [types.ts:105](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L105) ## Parameters [#parameters] | Parameter | Type | | --------- | -------------------------------------------------------- | | `params` | [`IUpdateData`](/docs/api/stream/interfaces/IUpdateData) | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) | ## Returns [#returns] `Promise`\<[`InstructionResult`](/docs/api/stream/interfaces/InstructionResult)> # UpdateTestOracleParams URL: /docs/api/stream/type-aliases/UpdateTestOracleParams # UpdateTestOracleParams [#updatetestoracleparams] ```ts type UpdateTestOracleParams = AlignedUnlocksTypes["updateTestOracleParams"]; ``` Defined in: [types.ts:402](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/types.ts#L402) # WithdrawFn URL: /docs/api/stream/type-aliases/WithdrawFn # WithdrawFn [#withdrawfn] ```ts type WithdrawFn = (params, invoker, env) => Promise; ``` Defined in: [types.ts:97](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/api/types.ts#L97) ## Parameters [#parameters] | Parameter | Type | | --------- | ------------------------------------------------------------ | | `params` | [`IWithdrawData`](/docs/api/stream/interfaces/IWithdrawData) | | `invoker` | [`Invoker`](/docs/api/stream/type-aliases/Invoker) | | `env` | [`Env`](/docs/api/stream/type-aliases/Env) | ## Returns [#returns] `Promise`\<[`InstructionResult`](/docs/api/stream/interfaces/InstructionResult)> # AIRDROP_AMOUNT URL: /docs/api/stream/variables/AIRDROP_AMOUNT # AIRDROP\_AMOUNT [#airdrop_amount] ```ts const AIRDROP_AMOUNT: 1 = 1; ``` Defined in: [constants.ts:96](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L96) # AIRDROP_TEST_TOKEN URL: /docs/api/stream/variables/AIRDROP_TEST_TOKEN # AIRDROP\_TEST\_TOKEN [#airdrop_test_token] ```ts const AIRDROP_TEST_TOKEN: "Gssm3vfi8s65R31SBdmQRq6cKeYojGgup7whkw4VCiQj" = "Gssm3vfi8s65R31SBdmQRq6cKeYojGgup7whkw4VCiQj"; ``` Defined in: [constants.ts:83](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L83) # ALIGNED_COMPUTE_LIMIT URL: /docs/api/stream/variables/ALIGNED_COMPUTE_LIMIT # ALIGNED\_COMPUTE\_LIMIT [#aligned_compute_limit] ```ts const ALIGNED_COMPUTE_LIMIT: 300000 = 300000; ``` Defined in: [constants.ts:67](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L67) # ALIGNED_PRECISION_FACTOR_POW URL: /docs/api/stream/variables/ALIGNED_PRECISION_FACTOR_POW # ALIGNED\_PRECISION\_FACTOR\_POW [#aligned_precision_factor_pow] ```ts const ALIGNED_PRECISION_FACTOR_POW: 9 = 9; ``` Defined in: [constants.ts:22](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L22) # ALIGNED_UNLOCKS_PROGRAM_ID URL: /docs/api/stream/variables/ALIGNED_UNLOCKS_PROGRAM_ID # ALIGNED\_UNLOCKS\_PROGRAM\_ID [#aligned_unlocks_program_id] ```ts const ALIGNED_UNLOCKS_PROGRAM_ID: object; ``` Defined in: [constants.ts:41](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L41) ## Type Declaration [#type-declaration] | Name | Type | Default value | Defined in | | ------------------------------------- | -------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `devnet` | `string` | `"aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH"` | [packages/stream/solana/constants.ts:42](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L42) | | `local` | `string` | `"aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH"` | [packages/stream/solana/constants.ts:45](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L45) | | `mainnet` | `string` | `"aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH"` | [packages/stream/solana/constants.ts:43](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L43) | | `testnet` | `string` | `"aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH"` | [packages/stream/solana/constants.ts:44](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L44) | # CONTRACT_DISCRIMINATOR URL: /docs/api/stream/variables/CONTRACT_DISCRIMINATOR # CONTRACT\_DISCRIMINATOR [#contract_discriminator] ```ts const CONTRACT_DISCRIMINATOR: number[]; ``` Defined in: [constants.ts:69](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L69) # CONTRACT_SEED URL: /docs/api/stream/variables/CONTRACT_SEED # CONTRACT\_SEED [#contract_seed] ```ts const CONTRACT_SEED: Buffer; ``` Defined in: [constants.ts:71](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L71) # CREATE_PARAMS_PADDING URL: /docs/api/stream/variables/CREATE_PARAMS_PADDING # CREATE\_PARAMS\_PADDING [#create_params_padding] ```ts const CREATE_PARAMS_PADDING: 121 = 121; ``` Defined in: [constants.ts:32](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L32) # DEFAULT_AUTO_CLAIM_FEE_SOL URL: /docs/api/stream/variables/DEFAULT_AUTO_CLAIM_FEE_SOL # DEFAULT\_AUTO\_CLAIM\_FEE\_SOL [#default_auto_claim_fee_sol] ```ts const DEFAULT_AUTO_CLAIM_FEE_SOL: 190000000 = 190_000_000; ``` Defined in: [constants.ts:91](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L91) # DEFAULT_CREATION_FEE_SOL URL: /docs/api/stream/variables/DEFAULT_CREATION_FEE_SOL # DEFAULT\_CREATION\_FEE\_SOL [#default_creation_fee_sol] ```ts const DEFAULT_CREATION_FEE_SOL: 90000000 = 90_000_000; ``` Defined in: [constants.ts:88](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L88) # DEFAULT_STREAMFLOW_FEE URL: /docs/api/stream/variables/DEFAULT_STREAMFLOW_FEE # DEFAULT\_STREAMFLOW\_FEE [#default_streamflow_fee] ```ts const DEFAULT_STREAMFLOW_FEE: 0.19 = 0.19; ``` Defined in: [constants.ts:94](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L94) # ESCROW_SEED URL: /docs/api/stream/variables/ESCROW_SEED # ESCROW\_SEED [#escrow_seed] ```ts const ESCROW_SEED: Buffer; ``` Defined in: [constants.ts:72](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L72) # FEES_METADATA_SEED URL: /docs/api/stream/variables/FEES_METADATA_SEED # FEES\_METADATA\_SEED [#fees_metadata_seed] ```ts const FEES_METADATA_SEED: Buffer; ``` Defined in: [constants.ts:85](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L85) # FEE_ORACLE_PUBLIC_KEY URL: /docs/api/stream/variables/FEE_ORACLE_PUBLIC_KEY # FEE\_ORACLE\_PUBLIC\_KEY [#fee_oracle_public_key] ```ts const FEE_ORACLE_PUBLIC_KEY: object; ``` Defined in: [constants.ts:59](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L59) ## Type Declaration [#type-declaration] | Name | Type | Default value | Defined in | | ------------------------------------- | -------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | | `devnet` | `string` | `"Aa2JJfFzUN3V54DXUHRBJowFw416xfZHpPk9DaNy3iYs"` | [packages/stream/solana/constants.ts:60](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L60) | | `local` | `string` | `"Aa2JJfFzUN3V54DXUHRBJowFw416xfZHpPk9DaNy3iYs"` | [packages/stream/solana/constants.ts:63](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L63) | | `mainnet` | `string` | `"B743wFVk2pCYhV91cn287e1xY7f1vt4gdY48hhNiuQmT"` | [packages/stream/solana/constants.ts:61](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L61) | | `testnet` | `string` | `"Aa2JJfFzUN3V54DXUHRBJowFw416xfZHpPk9DaNy3iYs"` | [packages/stream/solana/constants.ts:62](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L62) | # MAX_SAFE_UNIX_TIME_VALUE URL: /docs/api/stream/variables/MAX_SAFE_UNIX_TIME_VALUE # MAX\_SAFE\_UNIX\_TIME\_VALUE [#max_safe_unix_time_value] ```ts const MAX_SAFE_UNIX_TIME_VALUE: 8640000000000 = 8640000000000; ``` Defined in: [constants.ts:18](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L18) # METADATA_SEED URL: /docs/api/stream/variables/METADATA_SEED # METADATA\_SEED [#metadata_seed] ```ts const METADATA_SEED: Buffer; ``` Defined in: [constants.ts:74](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L74) # ORIGINAL_CONTRACT_SENDER_OFFSET URL: /docs/api/stream/variables/ORIGINAL_CONTRACT_SENDER_OFFSET # ORIGINAL\_CONTRACT\_SENDER\_OFFSET [#original_contract_sender_offset] ```ts const ORIGINAL_CONTRACT_SENDER_OFFSET: 9 = 9; ``` Defined in: [constants.ts:10](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L10) # PARTNERS_SCHEMA URL: /docs/api/stream/variables/PARTNERS_SCHEMA # PARTNERS\_SCHEMA [#partners_schema] ```ts const PARTNERS_SCHEMA: object; ``` Defined in: [constants.ts:107](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L107) ## Type Declaration [#type-declaration] | Name | Type | Default value | Defined in | | ------------------------------------- | -------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `array` | `object` | - | [packages/stream/solana/constants.ts:107](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L107) | | `array.type` | `object` | `PARTNER_SCHEMA` | [packages/stream/solana/constants.ts:107](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L107) | | `array.type.struct` | `object` | - | [packages/stream/solana/constants.ts:99](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L99) | | `array.type.struct.auto_claim_fee` | `string` | `"u32"` | [packages/stream/solana/constants.ts:102](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L102) | | `array.type.struct.buffer` | `object` | - | [packages/stream/solana/constants.ts:104](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L104) | | `array.type.struct.buffer.array` | `object` | - | [packages/stream/solana/constants.ts:104](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L104) | | `array.type.struct.buffer.array.len` | `number` | `16` | [packages/stream/solana/constants.ts:104](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L104) | | `array.type.struct.buffer.array.type` | `string` | `"u8"` | [packages/stream/solana/constants.ts:104](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L104) | | `array.type.struct.creation_fee` | `string` | `"u32"` | [packages/stream/solana/constants.ts:101](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L101) | | `array.type.struct.pubkey` | `object` | - | [packages/stream/solana/constants.ts:100](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L100) | | `array.type.struct.pubkey.array` | `object` | - | [packages/stream/solana/constants.ts:100](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L100) | | `array.type.struct.pubkey.array.len` | `number` | `32` | [packages/stream/solana/constants.ts:100](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L100) | | `array.type.struct.pubkey.array.type` | `string` | `"u8"` | [packages/stream/solana/constants.ts:100](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L100) | | `array.type.struct.token_fee_percent` | `string` | `"f32"` | [packages/stream/solana/constants.ts:103](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L103) | # PARTNER_ORACLE_PROGRAM_ID URL: /docs/api/stream/variables/PARTNER_ORACLE_PROGRAM_ID # PARTNER\_ORACLE\_PROGRAM\_ID [#partner_oracle_program_id] ```ts const PARTNER_ORACLE_PROGRAM_ID: object; ``` Defined in: [constants.ts:48](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L48) ## Type Declaration [#type-declaration] | Name | Type | Default value | Defined in | | ------------------------------------- | -------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | `devnet` | `string` | `"pardoTarcc6HKsPcbXkVycxsJsoN9QEzrdHgVdHAGY3"` | [packages/stream/solana/constants.ts:49](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L49) | | `local` | `string` | `"pardoTarcc6HKsPcbXkVycxsJsoN9QEzrdHgVdHAGY3"` | [packages/stream/solana/constants.ts:52](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L52) | | `mainnet` | `string` | `"pardpVtPjC8nLj1Dwncew62mUzfChdCX1EaoZe8oCAa"` | [packages/stream/solana/constants.ts:50](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L50) | | `testnet` | `string` | `"pardoTarcc6HKsPcbXkVycxsJsoN9QEzrdHgVdHAGY3"` | [packages/stream/solana/constants.ts:51](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L51) | # PARTNER_SCHEMA URL: /docs/api/stream/variables/PARTNER_SCHEMA # PARTNER\_SCHEMA [#partner_schema] ```ts const PARTNER_SCHEMA: object; ``` Defined in: [constants.ts:98](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L98) ## Type Declaration [#type-declaration] | Name | Type | Default value | Defined in | | ----------------------------------- | -------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `struct` | `object` | - | [packages/stream/solana/constants.ts:99](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L99) | | `struct.auto_claim_fee` | `string` | `"u32"` | [packages/stream/solana/constants.ts:102](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L102) | | `struct.buffer` | `object` | - | [packages/stream/solana/constants.ts:104](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L104) | | `struct.buffer.array` | `object` | - | [packages/stream/solana/constants.ts:104](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L104) | | `struct.buffer.array.len` | `number` | `16` | [packages/stream/solana/constants.ts:104](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L104) | | `struct.buffer.array.type` | `string` | `"u8"` | [packages/stream/solana/constants.ts:104](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L104) | | `struct.creation_fee` | `string` | `"u32"` | [packages/stream/solana/constants.ts:101](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L101) | | `struct.pubkey` | `object` | - | [packages/stream/solana/constants.ts:100](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L100) | | `struct.pubkey.array` | `object` | - | [packages/stream/solana/constants.ts:100](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L100) | | `struct.pubkey.array.len` | `number` | `32` | [packages/stream/solana/constants.ts:100](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L100) | | `struct.pubkey.array.type` | `string` | `"u8"` | [packages/stream/solana/constants.ts:100](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L100) | | `struct.token_fee_percent` | `string` | `"f32"` | [packages/stream/solana/constants.ts:103](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L103) | # PROGRAM_ID URL: /docs/api/stream/variables/PROGRAM_ID # PROGRAM\_ID [#program_id] ```ts const PROGRAM_ID: object; ``` Defined in: [constants.ts:34](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L34) ## Type Declaration [#type-declaration] | Name | Type | Default value | Defined in | | ------------------------------------- | -------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | | `devnet` | `string` | `"HqDGZjaVRXJ9MGRQEw7qDc2rAr6iH1n1kAQdCZaCMfMZ"` | [packages/stream/solana/constants.ts:35](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L35) | | `local` | `string` | `"HqDGZjaVRXJ9MGRQEw7qDc2rAr6iH1n1kAQdCZaCMfMZ"` | [packages/stream/solana/constants.ts:38](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L38) | | `mainnet` | `string` | `"strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m"` | [packages/stream/solana/constants.ts:36](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L36) | | `testnet` | `string` | `"HqDGZjaVRXJ9MGRQEw7qDc2rAr6iH1n1kAQdCZaCMfMZ"` | [packages/stream/solana/constants.ts:37](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L37) | # REPOPULATED_METADATA_SEED URL: /docs/api/stream/variables/REPOPULATED_METADATA_SEED # REPOPULATED\_METADATA\_SEED [#repopulated_metadata_seed] ```ts const REPOPULATED_METADATA_SEED: Buffer; ``` Defined in: [constants.ts:75](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L75) # SOLANA_ERROR_MAP URL: /docs/api/stream/variables/SOLANA_ERROR_MAP # SOLANA\_ERROR\_MAP [#solana_error_map] ```ts const SOLANA_ERROR_MAP: object; ``` Defined in: [constants.ts:111](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L111) ## Index Signature [#index-signature] ```ts [key: number]: string ``` # SOLANA_ERROR_MATCH_REGEX URL: /docs/api/stream/variables/SOLANA_ERROR_MATCH_REGEX # SOLANA\_ERROR\_MATCH\_REGEX [#solana_error_match_regex] ```ts const SOLANA_ERROR_MATCH_REGEX: RegExp; ``` Defined in: [constants.ts:109](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L109) # STREAMFLOW_TREASURY_PUBLIC_KEY URL: /docs/api/stream/variables/STREAMFLOW_TREASURY_PUBLIC_KEY # STREAMFLOW\_TREASURY\_PUBLIC\_KEY [#streamflow_treasury_public_key] ```ts const STREAMFLOW_TREASURY_PUBLIC_KEY: PublicKey; ``` Defined in: [constants.ts:77](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L77) # STREAM_STRUCT_OFFSETS URL: /docs/api/stream/variables/STREAM_STRUCT_OFFSETS # STREAM\_STRUCT\_OFFSETS [#stream_struct_offsets] ```ts const STREAM_STRUCT_OFFSETS: Record; ``` Defined in: [constants.ts:24](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L24) # STREAM_STRUCT_OFFSET_CLOSED URL: /docs/api/stream/variables/STREAM_STRUCT_OFFSET_CLOSED # STREAM\_STRUCT\_OFFSET\_CLOSED [#stream_struct_offset_closed] ```ts const STREAM_STRUCT_OFFSET_CLOSED: 671 = 671; ``` Defined in: [constants.ts:15](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L15) # STREAM_STRUCT_OFFSET_MINT URL: /docs/api/stream/variables/STREAM_STRUCT_OFFSET_MINT # STREAM\_STRUCT\_OFFSET\_MINT [#stream_struct_offset_mint] ```ts const STREAM_STRUCT_OFFSET_MINT: 177 = 177; ``` Defined in: [constants.ts:14](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L14) # STREAM_STRUCT_OFFSET_OLD_METADATA_KEY URL: /docs/api/stream/variables/STREAM_STRUCT_OFFSET_OLD_METADATA_KEY # STREAM\_STRUCT\_OFFSET\_OLD\_METADATA\_KEY [#stream_struct_offset_old_metadata_key] ```ts const STREAM_STRUCT_OFFSET_OLD_METADATA_KEY: 714 = 714; ``` Defined in: [constants.ts:16](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L16) # STREAM_STRUCT_OFFSET_RECIPIENT URL: /docs/api/stream/variables/STREAM_STRUCT_OFFSET_RECIPIENT # STREAM\_STRUCT\_OFFSET\_RECIPIENT [#stream_struct_offset_recipient] ```ts const STREAM_STRUCT_OFFSET_RECIPIENT: 113 = 113; ``` Defined in: [constants.ts:13](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L13) # STREAM_STRUCT_OFFSET_SENDER URL: /docs/api/stream/variables/STREAM_STRUCT_OFFSET_SENDER # STREAM\_STRUCT\_OFFSET\_SENDER [#stream_struct_offset_sender] ```ts const STREAM_STRUCT_OFFSET_SENDER: 49 = 49; ``` Defined in: [constants.ts:12](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L12) # TEST_ORACLE_DISCRIMINATOR URL: /docs/api/stream/variables/TEST_ORACLE_DISCRIMINATOR # TEST\_ORACLE\_DISCRIMINATOR [#test_oracle_discriminator] ```ts const TEST_ORACLE_DISCRIMINATOR: number[]; ``` Defined in: [constants.ts:70](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L70) # TEST_ORACLE_SEED URL: /docs/api/stream/variables/TEST_ORACLE_SEED # TEST\_ORACLE\_SEED [#test_oracle_seed] ```ts const TEST_ORACLE_SEED: Buffer; ``` Defined in: [constants.ts:73](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L73) # TX_FINALITY_CONFIRMED URL: /docs/api/stream/variables/TX_FINALITY_CONFIRMED # TX\_FINALITY\_CONFIRMED [#tx_finality_confirmed] ```ts const TX_FINALITY_CONFIRMED: "confirmed" = "confirmed"; ``` Defined in: [constants.ts:8](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L8) # WITHDRAWOR URL: /docs/api/stream/variables/WITHDRAWOR # WITHDRAWOR [#withdrawor] ```ts const WITHDRAWOR: "wdrwhnCv4pzW8beKsbPa4S2UDZrXenjg16KJdKSpb5u" = "wdrwhnCv4pzW8beKsbPa4S2UDZrXenjg16KJdKSpb5u"; ``` Defined in: [constants.ts:79](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L79) # WITHDRAWOR_PUBLIC_KEY URL: /docs/api/stream/variables/WITHDRAWOR_PUBLIC_KEY # WITHDRAWOR\_PUBLIC\_KEY [#withdrawor_public_key] ```ts const WITHDRAWOR_PUBLIC_KEY: PublicKey; ``` Defined in: [constants.ts:81](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L81) # WITHDRAW_AVAILABLE_AMOUNT URL: /docs/api/stream/variables/WITHDRAW_AVAILABLE_AMOUNT # WITHDRAW\_AVAILABLE\_AMOUNT [#withdraw_available_amount] ```ts const WITHDRAW_AVAILABLE_AMOUNT: BN; ``` Defined in: [constants.ts:20](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/constants.ts#L20) # getBN URL: /docs/api/stream/variables/getBN # getBN [#getbn] ```ts const getBN: (value, decimals) => BN; ``` Defined in: packages/common/dist/esm/index.d.ts:25 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` # getNumberFromBN URL: /docs/api/stream/variables/getNumberFromBN # getNumberFromBN [#getnumberfrombn] ```ts const getNumberFromBN: (value, decimals) => number; ``` Defined in: packages/common/dist/esm/index.d.ts:32 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` # timelockIDL URL: /docs/api/stream/variables/timelockIDL # timelockIDL [#timelockidl] ```ts timelockIDL: object; ``` Defined in: [timelockIDL.ts:1](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/timelockIDL.ts#L1) ## Type Declaration [#type-declaration] | Name | Type | Default value | Defined in | | ----------------------------------------------- | ----------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `instructions` | `object`\[] | - | [packages/stream/solana/timelockIDL.ts:4](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/timelockIDL.ts#L4) | | `name` | `string` | `"timelock"` | [packages/stream/solana/timelockIDL.ts:3](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/timelockIDL.ts#L3) | | `version` | `string` | `"0.1.0"` | [packages/stream/solana/timelockIDL.ts:2](https://github.com/streamflow-finance/js-sdk/blob/master/packages/stream/solana/timelockIDL.ts#L2) | # buildTransaction / sign / execute URL: /docs/composable-apis/build-sign-execute ## `buildTransaction` [#buildtransaction] ```ts async function buildTransaction( instructions: TransactionInstruction[], options: BuildTransactionOptions, env: Env, ): Promise ``` Fetches the latest blockhash, prepends compute budget instructions, and assembles a `VersionedTransaction`. ### `BuildTransactionOptions` [#buildtransactionoptions] | Field | Type | Description | | -------------- | -------------------------------------------------- | --------------------------------------------------------------------------- | | `feePayer` | `PublicKey` | Transaction fee payer. **Required** - `buildTransaction` throws if omitted. | | `computeLimit` | `number \| ComputeLimitEstimate \| "autoSimulate"` | Compute unit limit | | `computePrice` | `number \| ComputePriceEstimate` | Priority fee in microlamports | ### `BuiltTransaction` [#builttransaction] | Field | Type | Description | | -------------------------------- | -------------------------------- | ----------------------------------- | | `transaction` | `VersionedTransaction` | The assembled, unsigned transaction | | `blockhashWithExpiryBlockHeight` | `BlockhashWithExpiryBlockHeight` | For blockhash expiry tracking | | `context` | `Context` | Slot context at time of fetch | *** ## `sign` [#sign] ```ts async function sign( transaction: VersionedTransaction, signers: (SignerWalletAdapter | Keypair | { publicKey: PublicKey })[], ): Promise ``` Signs the transaction with all provided signers in order. Returns the same transaction reference - always use the return value to be safe with wallet adapters. **Always spread `result.signers`** alongside the invoker for creation transactions - it holds the metadata keypair that the protocol requires as a co-signer: ```ts await sign(built.transaction, [invoker, ...(result.signers ?? [])]); ``` *** ## `execute` [#execute] ```ts async function execute( builtTx: BuiltTransaction, env: ExecutionEnv, ): Promise ``` Submits the signed transaction and waits for confirmation. Returns the transaction signature. ### `ExecutionEnv` [#executionenv] Extends `Env` with optional execution controls: | Field | Type | Description | | --------------- | --------- | -------------------------- | | `queue` | `PQueue` | Custom rate-limiting queue | | `sendRate` | `number` | Max sends per second | | `throttler` | `PQueue` | Throttling queue | | `skipPreflight` | `boolean` | Skip preflight simulation | *** ## `executeBatch` [#executebatch] ```ts async function executeBatch( builtTransactions: BuiltTransaction[], env: ExecutionEnv, ): Promise ``` Executes multiple transactions in parallel. Returns `{ signatures: string[], errors: Error[] }`. Errors are collected - a failed transaction does not stop the others. *** ## `executeBatchSequential` [#executebatchsequential] ```ts async function executeBatchSequential( builtTransactions: BuiltTransaction[], env: ExecutionEnv, ): Promise ``` Executes transactions one at a time in order. Use when order matters (e.g. setup → creation batches) and `executeBatch` parallel execution is not appropriate. *** ## Full example [#full-example] ```ts import { buildTransaction, sign, execute } from "@streamflow/stream/solana/api"; // After getting result from createLock / createVesting / etc. const built = await buildTransaction( result.instructions, { feePayer: invoker.publicKey, computeLimit: 200_000, computePrice: 1_000, // 1000 microlamports priority fee }, env, ); await sign(built.transaction, [invoker, ...(result.signers ?? [])]); const signature = await execute(built, env); ``` # createLock / createLockBatch URL: /docs/composable-apis/create-lock ## `createLock` [#createlock] ```ts async function createLock( params: ICreateLockParams, invoker: Invoker, env: Env & NativeOptions, ): Promise ``` ### `ICreateLockParams` [#icreatelockparams] | Field | Type | Required | Description | | ------------------------- | --------------------- | -------- | --------------------------------- | | `recipient` | `string` | ✓ | Recipient wallet address | | `tokenId` | `string` | ✓ | Token mint address | | `amount` | `BN` | ✓ | Total amount - must be `> 1` | | `unlockDate` | `number` | ✓ | Unix timestamp when tokens unlock | | `name` | `string` | ✓ | Stream display name | | `transferableByRecipient` | `boolean` | - | Defaults `false` | | `partner` | `string` | - | Custom fee oracle address | | `tokenProgramId` | `string \| PublicKey` | - | For Token-2022 mints | ### What `buildLockParams()` auto-sets [#what-buildlockparams-auto-sets] These values are hardcoded and cannot be overridden via `ICreateLockParams`: | Field | Value | Why | | ----------------------- | -------------- | ----------------------------------------------------- | | `period` | `1` | Synthetic minimal period | | `cliff` | `= unlockDate` | Cliff equals start (one release point) | | `cliffAmount` | `amount - 1` | Entire amount at cliff | | `amountPerPeriod` | `BN(1)` | Dust, avoids zero-release classification | | `canTopup` | `false` | Required for lock classification | | `cancelableBySender` | `false` | Required for lock classification | | `cancelableByRecipient` | `false` | Required for lock classification | | `transferableBySender` | `false` | Required for lock classification | | `automaticWithdrawal` | `false` | Required for lock classification | | `withdrawalFrequency` | `0` | No auto-withdrawal; frequency is irrelevant for locks | ## `createLockBatch` [#createlockbatch] ```ts async function createLockBatch( params: ICreateLockBatchParams, invoker: Invoker, env: Env & NativeOptions, ): Promise ``` ### `ICreateLockBatchParams` [#icreatelockbatchparams] | Field | Type | Required | Description | | ------------------------- | ----------------------- | -------- | ------------------------- | | `recipients` | `ILockBatchRecipient[]` | ✓ | Per-recipient config | | `tokenId` | `string` | ✓ | Token mint address | | `unlockDate` | `number` | ✓ | Shared unlock timestamp | | `transferableByRecipient` | `boolean` | - | Defaults `false` (shared) | | `partner` | `string` | - | Custom fee oracle | | `tokenProgramId` | `string \| PublicKey` | - | For Token-2022 | ### `ILockBatchRecipient` [#ilockbatchrecipient] | Field | Type | Required | Description | | ----------- | -------- | -------- | ---------------------- | | `recipient` | `string` | ✓ | Wallet address | | `amount` | `BN` | ✓ | Amount - must be `> 1` | | `name` | `string` | ✓ | Display name | Returns `BatchInstructionResult: { setupInstructions, creationBatches }`. See [Batch Creation](/docs/core-concepts/batch) for the execution pattern. ## Builder variants [#builder-variants] Use these to get the raw `ICreateLinearStreamData` / `ICreateMultipleLinearStreamData` without executing: ```ts import { buildLockParams, buildLockBatchParams } from "@streamflow/stream/solana/api"; const data = buildLockParams({ recipient, tokenId, amount, unlockDate, name }); const batchData = buildLockBatchParams({ tokenId, unlockDate, recipients }); ``` # createVesting / createVestingBatch URL: /docs/composable-apis/create-vesting ## `createVesting` [#createvesting] The return type is overloaded based on whether `initialAllocation` is provided: ```ts // Without initialAllocation → CreateInstructionResult function createVesting( params: ICreateVestingParams & { initialAllocation?: undefined }, invoker: Invoker, env: Env & NativeOptions, ): Promise // With initialAllocation → BatchInstructionResult (2 streams) function createVesting( params: ICreateVestingParams & { initialAllocation: { amount: BN } }, invoker: Invoker, env: Env & NativeOptions, ): Promise ``` ### `ICreateVestingParams` [#icreatevestingparams] | Field | Type | Required | Description | | ------------------------- | --------------------- | --------------- | -------------------------------------------- | | `recipient` | `string` | ✓ | Recipient wallet | | `tokenId` | `string` | ✓ | Token mint | | `amount` | `BN` | ✓ | Total amount to vest | | `start` | `number` | ✓ | Unix timestamp when vesting begins | | `period` | `number` | ✓ | Seconds per release interval | | `name` | `string` | ✓ | Display name | | `duration` | `number` | ✓ or `endDate` | Total duration in seconds | | `endDate` | `number` | ✓ or `duration` | End Unix timestamp | | `cliffAmount` | `BN` | - | Defaults `BN(0)` | | `amountPerPeriod` | `BN` | - | Auto-computed if omitted | | `cancelableBySender` | `boolean` | - | Defaults `false` | | `canTopup` | `boolean` | - | Defaults `false` | | `automaticWithdrawal` | `boolean` | - | Defaults `false` | | `withdrawalFrequency` | `number` | - | Defaults to `period` when auto-withdrawal on | | `transferableBySender` | `boolean` | - | Defaults `false` | | `transferableByRecipient` | `boolean` | - | Defaults `false` | | `initialAllocation` | `{ amount: BN }` | - | Changes return type | | `partner` | `string` | - | Custom fee oracle | | `tokenProgramId` | `string \| PublicKey` | - | For Token-2022 | ### Duration resolution [#duration-resolution] Exactly ONE of `duration` or `endDate` must be provided. `resolveDuration()` throws if both or neither are given: ``` duration = endDate - start (if endDate provided) duration = duration (if duration provided) ``` ### `amountPerPeriod` auto-compute (divCeil) [#amountperperiod-auto-compute-divceil] If `amountPerPeriod` is omitted, `computeAmountPerPeriod()` computes it via ceiling division: ``` remaining = amount - cliffAmount periods = floor(duration / period) result = ceil(remaining / periods) // = (remaining + periods - 1) / periods ``` If `cliffAmount >= amount - 1` and all lock flags are `false`, the stream silently reclassifies as a Lock on-chain with a different fee tier. Keep `cliffAmount` well below the total. See [Stream Classification](/docs/core-concepts/streams#stream-classification) for the full criteria. ### `initialAllocation` pattern [#initialallocation-pattern] When `initialAllocation` is provided, `createVesting` calls `buildCreateTransactionInstructions` twice (in parallel), then combines them into one `BatchInstructionResult`: * `setupInstructions` - ATA creation + WSOL wrap for both streams * `creationBatches[0]` - main vesting stream * `creationBatches[1]` - allocation stream (lock-like, `amountPerPeriod=BN(2)`, avoids lock classification) ## `createVestingBatch` [#createvestingbatch] ```ts async function createVestingBatch( params: ICreateVestingBatchParams, invoker: Invoker, env: Env & NativeOptions, ): Promise ``` Per-recipient fields: `recipient`, `amount`, `name`, `cliffAmount?`, `amountPerPeriod?`. Shared fields: `tokenId`, `start`, `period`, `duration`/`endDate`, plus all optional flags. `amountPerPeriod` is computed independently per recipient. Provide explicit `r.amountPerPeriod` to skip auto-compute for a specific recipient. `createVestingBatch` does **not** support `initialAllocation`. Use `createVesting` with `initialAllocation` for a single recipient with upfront allocation. ## Builder variants [#builder-variants] ```ts import { buildVestingParams, buildVestingBatchParams, resolveDuration, computeAmountPerPeriod } from "@streamflow/stream/solana/api"; // Get raw ICreateLinearStreamData without executing const data = buildVestingParams(params); const batchData = buildVestingBatchParams(params); // Helpers used internally const duration = resolveDuration({ start, endDate }); // or { start, duration } const amountPerPeriod = computeAmountPerPeriod(amount, cliffAmount, duration, period); ``` # create / createBatch URL: /docs/composable-apis/create `create` and `createBatch` are the lowest-level composable API functions - they accept the raw `ICreateStreamData` / `ICreateMultipleLinearStreamData` params directly without any defaults. For most use cases, prefer `createLock` / `createVesting` / their batch variants - they pre-fill all required flags and enforce protocol constraints automatically. ## `create` [#create] ```ts import { create } from "@streamflow/stream/solana/api"; import type { ICreateStreamData } from "@streamflow/stream"; async function create( params: ICreateStreamData, invoker: Invoker, env: Env & NativeOptions, ): Promise ``` ### When to use [#when-to-use] * You need precise control over `amountPerPeriod`, `cliffAmount`, or `period` without the wrappers computing them. * You need `canUpdateRate: true` or `canPause: true` - neither is exposed in `ICreateVestingParams` or `ICreateLockParams`. * You're creating a price-based (aligned) stream - pass `ICreateAlignedStreamData` with the oracle fields. ### Example [#example] ```ts import { create } from "@streamflow/stream/solana/api"; import BN from "bn.js"; const result = await create( { recipient: "RecipientWallet...", tokenId: "TokenMint...", start: Math.floor(Date.now() / 1000) + 10, period: 86400, cliff: Math.floor(Date.now() / 1000) + 10, cliffAmount: new BN(0), amountPerPeriod: new BN(1_000_000), amount: new BN(365_000_000), name: "Custom Stream", canTopup: false, cancelableBySender: true, cancelableByRecipient: false, transferableBySender: false, transferableByRecipient: false, automaticWithdrawal: false, withdrawalFrequency: 0, }, invoker, { ...env, isNative: false }, ); ``` ## `createBatch` [#createbatch] ```ts import { createBatch } from "@streamflow/stream/solana/api"; import type { ICreateMultipleLinearStreamData, ICreateMultipleAlignedStreamData } from "@streamflow/stream"; async function createBatch( params: ICreateMultipleLinearStreamData | ICreateMultipleAlignedStreamData, invoker: Invoker, env: Env & NativeOptions, ): Promise ``` Like `create` but for multiple recipients. Shared params at the top level, per-recipient params (`recipient`, `amount`, `name`, `cliffAmount`, `amountPerPeriod`) in the `recipients` array. Returns `BatchInstructionResult: { setupInstructions, creationBatches }` - same execution pattern as `createLockBatch` and `createVestingBatch`. # Composable APIs URL: /docs/composable-apis The composable API is a set of TypeScript functions that wrap `SolanaStreamClient` with intent-specific defaults and a clean 3-phase transaction model. ```ts import { createLock, createLockBatch, createVesting, createVestingBatch, withdraw, topup, transfer, cancel, update, buildTransaction, sign, execute, executeBatch, executeBatchSequential, } from "@streamflow/stream/solana/api"; ``` ## The 3-Phase Transaction Model [#the-3-phase-transaction-model] ### Phase 1 - Get instructions [#phase-1---get-instructions] Call a creation or lifecycle function. It returns an `InstructionResult` with the raw `TransactionInstruction[]`. Nothing is sent on-chain yet. ```ts const result = await createLock(params, invoker, env); // result: { instructions, signers?, metadataPubKey? } ``` ### Phase 2 - Build transaction [#phase-2---build-transaction] Assemble a versioned transaction with a fresh blockhash and compute budget instructions. ```ts const built = await buildTransaction( result.instructions, { feePayer: invoker.publicKey, computeLimit: 200_000 }, env, ); // built: { transaction, blockhashWithExpiryBlockHeight, context } ``` ### Phase 3 - Sign and execute [#phase-3---sign-and-execute] Sign the transaction, then submit it to the network. ```ts await sign(built.transaction, [invoker, ...(result.signers ?? [])]); const signature = await execute(built, env); ``` ## Why composable? [#why-composable] * **Custom fee payer** - pass any wallet as `feePayer` in `buildTransaction` * **Custom compute budget** - tune `computeLimit` and `computePrice` * **Multi-sig** - collect signatures from multiple parties before executing * **Inspect first** - examine instructions before committing to an on-chain action * **Batch execution** - build multiple transactions, then send with `executeBatch()` or `executeBatchSequential()` ## Quick reference [#quick-reference] The **Type** column shows each function's return type. All functions are async and return a Promise of the listed type. # Lifecycle Operations URL: /docs/composable-apis/lifecycle-ops All lifecycle functions return `InstructionResult: { instructions }`. Use the same 3-phase pattern as creation. ```ts import { withdraw, topup, transfer, cancel, update } from "@streamflow/stream/solana/api"; ``` ## Operations [#operations] ### withdraw [#withdraw] Withdraw tokens that have vested. Available on any active stream - no creation-time flag required. ```ts async function withdraw( params: IWithdrawData, // { id: string, amount?: BN } invoker: Invoker, // must be the stream's recipient env: Env, ): Promise ``` ```ts // Withdraw all available tokens (omit amount) const result = await withdraw({ id: streamId }, recipientInvoker, env); // Withdraw a specific amount const result = await withdraw({ id: streamId, amount: new BN(100) }, recipientInvoker, env); ``` **Notes:** * For locks: only works after `unlockDate` has passed * The invoker must be the stream's current recipient on-chain ### topup [#topup] Add tokens to extend a stream's duration. Requires `canTopup: true` at creation. ```ts async function topup( params: ITopUpData, // { id: string, amount: BN } invoker: Invoker, // must be the stream's sender env: Env & NativeOptions, ): Promise ``` ```ts const result = await topup( { id: streamId, amount: new BN(500) }, senderInvoker, { ...env, isNative: false }, // isNative must match the token used at creation ); ``` **Notes:** * `isNative` in `env` must match whether the stream was created with native SOL * Lock streams have `canTopup: false` hardcoded - topup will fail on locks ### transfer [#transfer] Change the stream's recipient to a new wallet. Requires `transferableBySender: true` at creation. ```ts async function transfer( params: ITransferData, // { id: string, newRecipient: string } invoker: Invoker, // must be the stream's sender env: Env, ): Promise ``` ```ts const result = await transfer( { id: streamId, newRecipient: "NewWalletAddress..." }, senderInvoker, env, ); ``` `transfer()` embeds its own `ComputeBudgetProgram` instruction. Do **not** pass `computeLimit` to `buildTransaction` - it would create a duplicate compute budget instruction. ### cancel [#cancel] Terminate the stream early. Returns unvested tokens to the sender. Requires `cancelableBySender: true` at creation. ```ts async function cancel( params: { id: string }, invoker: Invoker, // must be the stream's sender env: Env, ): Promise ``` ```ts const result = await cancel({ id: streamId }, senderInvoker, env); ``` **Notes:** * Must be the last operation - all other lifecycle operations fail after cancellation * Lock streams have `cancelableBySender: false` hardcoded ### update [#update] Update the stream's release rate and/or permission flags. Requires `canUpdateRate: true` on the stream. ```ts async function update( params: IUpdateData, // { id, amountPerPeriod?, enableAutomaticWithdrawal?, withdrawFrequency?: BN, transferableBySender?, transferableByRecipient?, cancelableBySender? } invoker: Invoker, env: Env, ): Promise ``` ```ts const result = await update( { id: streamId, amountPerPeriod: new BN(200) }, senderInvoker, env, ); ``` `canUpdateRate` is **not exposed** in `ICreateVestingParams`. Streams created via `createVesting` don't support `update` unless you use `SolanaStreamClient.create()` directly with `canUpdateRate: true`. # Public API Client URL: /docs/composable-apis/public-api-client ## Overview [#overview] The public API client queries the Streamflow REST API to fetch stream contract data without needing an on-chain RPC call. ```ts import { createClient } from "@streamflow/stream"; ``` ## `createClient` [#createclient] ```ts function createClient(options?: ApiClientOptions): ApiClient ``` ### `ApiClientOptions` [#apiclientoptions] | Field | Type | Default | Description | | --------- | ----------------------- | ------- | ---------------------------------------------------------- | | `cluster` | `"mainnet" \| "devnet"` | - | Determines the API endpoint. Devnet URL used when omitted. | | `apiUrl` | `string` | - | Override the default API URL | | `fetchFn` | `typeof fetch` | `fetch` | Custom fetch implementation | Default API URLs: * Mainnet: `https://api-public.streamflow.finance` * Devnet: `https://staging-api-public.streamflow.finance` ## `getContracts` [#getcontracts] Fetch all streams for a given sender and/or recipient: ```ts const client = createClient({ cluster: "mainnet" }); // Fetch by sender const bySender = await client.getContracts({ sender: "SenderWallet..." }); // Fetch by recipient const byRecipient = await client.getContracts({ recipient: "RecipientWallet..." }); // Fetch by both const byBoth = await client.getContracts({ sender: "SenderWallet...", recipient: "RecipientWallet...", }); ``` Returns `ContractSchema[]`. ## `getContract` [#getcontract] Fetch a single stream by its address (stream ID): ```ts const contract = await client.getContract("StreamId..."); ``` Returns `ContractSchema`. ## Full example [#full-example] ```ts import { createClient } from "@streamflow/stream"; const client = createClient({ cluster: "mainnet" }); // List all streams sent by a wallet const sent = await client.getContracts({ sender: "MyWallet..." }); console.log(`Found ${sent.length} streams`); // Fetch a specific stream const stream = await client.getContract("StreamId..."); console.log("Stream status:", stream.status); ``` # Guide: Batch Locks & Vesting URL: /docs/core-concepts/batch/guide-batch ## Lock batch [#lock-batch] ### Phase 1 - Get instructions [#phase-1---get-instructions] ```ts import { Connection, Keypair } from "@solana/web3.js"; import BN from "bn.js"; import { buildTransaction, createLockBatch, execute, sign } from "@streamflow/stream/solana/api"; import { pk } from "@streamflow/common"; import fs from "node:fs"; const connection = new Connection("https://api.devnet.solana.com", "confirmed"); const env = { connection, programId: pk("HqDGZjaVRXJ9MGRQEw7qDc2rAr6iH1n1kAQdCZaCMfMZ") }; const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); const result = await createLockBatch( { tokenId: "TokenMintAddress...", unlockDate: Math.floor(Date.now() / 1000) + 86400, // 24 hours recipients: [ { recipient: "Wallet1Address...", amount: new BN(2), name: "Lock - Alice" }, { recipient: "Wallet2Address...", amount: new BN(2), name: "Lock - Bob" }, { recipient: "Wallet3Address...", amount: new BN(2), name: "Lock - Carol" }, ], }, invoker, { ...env, isNative: false }, ); ``` ### Send setup transaction [#send-setup-transaction] ```ts if (result.setupInstructions.length > 0) { const setupBuilt = await buildTransaction( result.setupInstructions, { feePayer: invoker.publicKey }, env, ); await sign(setupBuilt.transaction, [invoker]); await execute(setupBuilt, env); } ``` ### Send one transaction per recipient [#send-one-transaction-per-recipient] ```ts for (const batch of result.creationBatches) { const batchBuilt = await buildTransaction( batch.instructions, { feePayer: invoker.publicKey }, env, ); await sign(batchBuilt.transaction, [invoker, ...(batch.signers ?? [])]); const sig = await execute(batchBuilt, env); console.log(`Lock for ${batch.recipient.slice(0, 8)}...: ${batch.metadataPubKey.toBase58()} (tx: ${sig})`); } ``` *** ## Vesting batch [#vesting-batch] ### Phase 1 - Get instructions [#phase-1---get-instructions-1] ```ts import { createVestingBatch } from "@streamflow/stream/solana/api"; const start = Math.floor(Date.now() / 1000) + 10; const result = await createVestingBatch( { tokenId: "TokenMintAddress...", start, period: 86400, // daily release duration: 365 * 86400, // 1 year cancelableBySender: true, recipients: [ { recipient: "Wallet1Address...", amount: new BN(3_650_000_000), // 3650 tokens at 6 decimals - 10/day name: "Vest - Alice", // amountPerPeriod auto-computed: ceil(3650000000 / 365) = 10000001 }, { recipient: "Wallet2Address...", amount: new BN(7_300_000_000), // 7300 tokens - 20/day cliffAmount: new BN(730_000_000), // 10% upfront at start name: "Vest - Bob", }, ], }, invoker, { ...env, isNative: false }, ); ``` ### Send setup transaction [#send-setup-transaction-1] ```ts if (result.setupInstructions.length > 0) { const setupBuilt = await buildTransaction( result.setupInstructions, { feePayer: invoker.publicKey }, env, ); await sign(setupBuilt.transaction, [invoker]); await execute(setupBuilt, env); } ``` ### Send one transaction per recipient [#send-one-transaction-per-recipient-1] ```ts for (const batch of result.creationBatches) { const batchBuilt = await buildTransaction( batch.instructions, { feePayer: invoker.publicKey }, env, ); await sign(batchBuilt.transaction, [invoker, ...(batch.signers ?? [])]); const sig = await execute(batchBuilt, env); console.log(`Vesting for ${batch.recipient.slice(0, 8)}...: ${batch.metadataPubKey.toBase58()} (tx: ${sig})`); } ``` `SolanaStreamClient.create()` in a loop covers most batch use cases. For large batches, use `executeBatch` from the composable API after building all transactions to send them in parallel. ## Lock batch [#lock-batch-1] ```ts import { SolanaStreamClient, ICluster } from "@streamflow/stream"; import { buildLockParams } from "@streamflow/stream/solana/api"; import { Keypair } from "@solana/web3.js"; import BN from "bn.js"; import fs from "node:fs"; const client = new SolanaStreamClient({ clusterUrl: "https://api.devnet.solana.com", cluster: ICluster.Devnet, }); const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); const unlockDate = Math.floor(Date.now() / 1000) + 86400; const recipients = [ { address: "Wallet1Address...", amount: new BN(2), name: "Lock - Alice" }, { address: "Wallet2Address...", amount: new BN(2), name: "Lock - Bob" }, { address: "Wallet3Address...", amount: new BN(2), name: "Lock - Carol" }, ]; const streamIds: string[] = []; for (const r of recipients) { const { txId, metadataId } = await client.create( buildLockParams({ recipient: r.address, tokenId: "TokenMintAddress...", amount: r.amount, unlockDate, name: r.name, }), { sender: invoker, isNative: false }, ); streamIds.push(metadataId); console.log(`Lock for ${r.address.slice(0, 8)}...: ${metadataId}`); } ``` *** ## Vesting batch [#vesting-batch-1] ```ts import { buildVestingParams } from "@streamflow/stream/solana/api"; const start = Math.floor(Date.now() / 1000) + 10; const recipients = [ { address: "Wallet1Address...", amount: new BN(3_650_000_000), name: "Vest - Alice", }, { address: "Wallet2Address...", amount: new BN(7_300_000_000), cliffAmount: new BN(730_000_000), name: "Vest - Bob", }, ]; const streamIds: string[] = []; for (const r of recipients) { const { txId, metadataId } = await client.create( buildVestingParams({ recipient: r.address, tokenId: "TokenMintAddress...", amount: r.amount, start, period: 86400, duration: 365 * 86400, cliffAmount: r.cliffAmount, name: r.name, cancelableBySender: true, }), { sender: invoker, isNative: false }, ); streamIds.push(metadataId); console.log(`Vesting for ${r.address.slice(0, 8)}...: ${metadataId}`); } ``` For large batches where you need parallel execution, use `prepareCreateInstructions()` to collect all instructions first, then send them with the composable `executeBatch()`. # Batch Creation URL: /docs/core-concepts/batch Batch functions create streams for multiple recipients in one operation. They always return `BatchInstructionResult` with: * `setupInstructions` - ATA creation and WSOL wrapping, sent in one transaction before the batches * `creationBatches` - one per recipient, each sent as a separate transaction ## Lock batch [#lock-batch] `createLockBatch` creates a time-based lock for each recipient. Shared config (token, unlock date) goes at the top level; per-recipient fields (wallet, amount, name) go in the `recipients` array. ```ts import { createLockBatch } from "@streamflow/stream/solana/api"; const result = await createLockBatch( { tokenId: "TokenMintAddress...", unlockDate: Math.floor(Date.now() / 1000) + 3600, recipients: [ { recipient: "Wallet1...", amount: new BN(1000), name: "Lock A" }, { recipient: "Wallet2...", amount: new BN(2000), name: "Lock B" }, ], }, invoker, { ...env, isNative: false }, ); ``` ## Vesting batch [#vesting-batch] `createVestingBatch` creates vesting streams for multiple recipients. Per-recipient params include `amount`, `name`, and optionally `cliffAmount` and `amountPerPeriod`. If `amountPerPeriod` is omitted for a recipient, it's auto-computed from their individual amount. ```ts import { createVestingBatch } from "@streamflow/stream/solana/api"; const result = await createVestingBatch( { tokenId: "TokenMintAddress...", start: Math.floor(Date.now() / 1000) + 10, period: 86400, // daily duration: 365 * 86400, // 1 year cancelableBySender: true, recipients: [ { recipient: "Wallet1...", amount: new BN(365_000), name: "Vest A" }, { recipient: "Wallet2...", amount: new BN(730_000), cliffAmount: new BN(100), name: "Vest B" }, ], }, invoker, { ...env, isNative: false }, ); ``` `createVestingBatch` does **not** support `initialAllocation`. For vesting with an upfront allocation use `createVesting` with `initialAllocation` (single recipient). ## Executing batch results [#executing-batch-results] Both functions return `BatchInstructionResult`. Send setup first, then each creation batch: ```ts // 1. Setup (ATAs, WSOL) if (result.setupInstructions.length > 0) { const setupBuilt = await buildTransaction(result.setupInstructions, { feePayer: invoker.publicKey }, env); await sign(setupBuilt.transaction, [invoker]); await execute(setupBuilt, env); } // 2. One tx per recipient for (const batch of result.creationBatches) { const batchBuilt = await buildTransaction(batch.instructions, { feePayer: invoker.publicKey }, env); await sign(batchBuilt.transaction, [invoker, ...(batch.signers ?? [])]); await execute(batchBuilt, env); } ``` # Guide: Full Lifecycle URL: /docs/core-concepts/lifecycle/guide-lifecycle The stream must be created with `cancelableBySender: true`, `canTopup: true`, and `transferableBySender: true` to allow all operations. Locks only support `withdraw`. ### Create the stream [#create-the-stream] ```ts import { Connection, Keypair } from "@solana/web3.js"; import BN from "bn.js"; import { buildTransaction, cancel, createVesting, execute, sign, topup, transfer, withdraw, } from "@streamflow/stream/solana/api"; import { pk } from "@streamflow/common"; import fs from "node:fs"; const connection = new Connection("https://api.devnet.solana.com", "confirmed"); const env = { connection, programId: pk("HqDGZjaVRXJ9MGRQEw7qDc2rAr6iH1n1kAQdCZaCMfMZ") }; const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); const start = Math.floor(Date.now() / 1000) + 10; const created = await createVesting( { recipient: invoker.publicKey.toBase58(), // self, so same keypair can withdraw tokenId: "TokenMintAddress...", amount: new BN(3_600_000_000), start, period: 1, // 1-second periods for quick testing duration: 3600, cliffAmount: new BN(1_000_000), // small upfront amount name: "Lifecycle Test", cancelableBySender: true, canTopup: true, transferableBySender: true, }, invoker, { ...env, isNative: false }, ); const streamId = created.metadataPubKey!.toBase58(); const createBuilt = await buildTransaction(created.instructions, { feePayer: invoker.publicKey }, env); await sign(createBuilt.transaction, [invoker, ...(created.signers ?? [])]); await execute(createBuilt, env); console.log("Created stream:", streamId); ``` ### Helper - run any lifecycle op [#helper---run-any-lifecycle-op] All lifecycle functions return `InstructionResult: { instructions }` and follow the same 3-phase pattern: ```ts import type { TransactionInstruction } from "@solana/web3.js"; import type { Env } from "@streamflow/stream/solana/api"; async function runOp( result: { instructions: TransactionInstruction[] }, invoker: Keypair, ): Promise { const built = await buildTransaction(result.instructions, { feePayer: invoker.publicKey }, env); await sign(built.transaction, [invoker]); return execute(built, env); } ``` ### Withdraw [#withdraw] ```ts // Wait for some tokens to vest await new Promise((r) => setTimeout(r, 15_000)); const sig = await runOp(await withdraw({ id: streamId }, invoker, env), invoker); console.log("Withdraw:", sig); ``` ### Topup [#topup] ```ts const sig = await runOp( await topup({ id: streamId, amount: new BN(100_000_000) }, invoker, { ...env, isNative: false }), invoker, ); console.log("Topup:", sig); ``` ### Transfer [#transfer] Do **not** pass `computeLimit` to `buildTransaction` for `transfer()` - it embeds its own compute budget instruction. ```ts const transferResult = await transfer( { id: streamId, newRecipient: "NewRecipientWallet..." }, invoker, env, ); const built = await buildTransaction(transferResult.instructions, { feePayer: invoker.publicKey }, env); await sign(built.transaction, [invoker]); const sig = await execute(built, env); console.log("Transfer:", sig); ``` ### Cancel [#cancel] Cancel must be the last operation - all others fail after cancellation. Remaining tokens return to the sender. ```ts const sig = await runOp(await cancel({ id: streamId }, invoker, env), invoker); console.log("Cancel:", sig); ``` The class-based API has high-level methods (`client.withdraw()`, `client.cancel()`, etc.) that sign and submit in one call, and `prepare*Instructions()` methods for manual transaction control. ### Initialize client and create stream [#initialize-client-and-create-stream] ```ts import { SolanaStreamClient, ICluster } from "@streamflow/stream"; import { buildVestingParams } from "@streamflow/stream/solana/api"; import { Keypair } from "@solana/web3.js"; import BN from "bn.js"; import fs from "node:fs"; const client = new SolanaStreamClient({ clusterUrl: "https://api.devnet.solana.com", cluster: ICluster.Devnet, }); const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); const start = Math.floor(Date.now() / 1000) + 10; const { txId, metadataId: streamId } = await client.create( buildVestingParams({ recipient: invoker.publicKey.toBase58(), tokenId: "TokenMintAddress...", amount: new BN(3_600_000_000), start, period: 1, duration: 3600, cliffAmount: new BN(1_000_000), name: "Lifecycle Test", cancelableBySender: true, canTopup: true, transferableBySender: true, }), { sender: invoker, isNative: false }, ); console.log("Created stream:", streamId, "Tx:", txId); ``` ### Withdraw [#withdraw-1] ```ts await new Promise((r) => setTimeout(r, 15_000)); const { txId } = await client.withdraw( { id: streamId }, { invoker }, ); console.log("Withdraw:", txId); ``` ### Topup [#topup-1] ```ts const { txId } = await client.topup( { id: streamId, amount: new BN(100_000_000) }, { invoker, isNative: false }, ); console.log("Topup:", txId); ``` ### Transfer [#transfer-1] ```ts const { txId } = await client.transfer( { id: streamId, newRecipient: "NewRecipientWallet..." }, { invoker }, ); console.log("Transfer:", txId); ``` ### Cancel [#cancel-1] ```ts const { txId } = await client.cancel( { id: streamId }, { invoker }, ); console.log("Cancel:", txId); ``` ### Fine-grained: prepare instructions without submitting [#fine-grained-prepare-instructions-without-submitting] For multi-sig, custom fee payers, or batching multiple operations: ```ts // Returns TransactionInstruction[] only - no signing or submission const withdrawIxs = await client.prepareWithdrawInstructions( { id: streamId }, { invoker: { publicKey: invoker.publicKey } }, ); const cancelIxs = await client.prepareCancelInstructions( { id: streamId }, { invoker: { publicKey: invoker.publicKey } }, ); // Compose into your own transaction with @solana/web3.js ``` # Lifecycle Operations URL: /docs/core-concepts/lifecycle After a stream is created, five operations are available. Each returns `InstructionResult: { instructions }`. Unlike creation, there is no metadata keypair - sign with just the invoker. ## Operations overview [#operations-overview] | Operation | Gated by | Who calls | Params | | ---------- | ---------------------------- | --------- | ---------------------- | | `withdraw` | Always available | Recipient | `{ id, amount? }` | | `topup` | `canTopup: true` | Sender | `{ id, amount }` | | `transfer` | `transferableBySender: true` | Sender | `{ id, newRecipient }` | | `cancel` | `cancelableBySender: true` | Sender | `{ id }` | | `update` | `canUpdateRate: true` | Sender | `{ id, ... }` | ### withdraw [#withdraw] Withdraw tokens that have vested. Omit `amount` to withdraw everything available. ```ts import { withdraw, buildTransaction, sign, execute } from "@streamflow/stream/solana/api"; const result = await withdraw({ id: streamId }, recipientInvoker, env); const built = await buildTransaction(result.instructions, { feePayer: recipientInvoker.publicKey }, env); await sign(built.transaction, [recipientInvoker]); await execute(built, env); ``` ```ts const { txId } = await client.withdraw({ id: streamId }, { invoker: recipientKeypair }); ``` For locks: only works after `unlockDate` has passed. ### topup [#topup] Add tokens to extend the stream's duration. Requires `canTopup: true` at creation. ```ts import { topup } from "@streamflow/stream/solana/api"; const result = await topup( { id: streamId, amount: new BN(1_000_000) }, senderInvoker, { ...env, isNative: false }, // isNative must match the token used at creation ); const built = await buildTransaction(result.instructions, { feePayer: senderInvoker.publicKey }, env); await sign(built.transaction, [senderInvoker]); await execute(built, env); ``` ```ts const { txId } = await client.topup( { id: streamId, amount: new BN(1_000_000) }, { invoker: senderKeypair, isNative: false }, ); ``` ### transfer [#transfer] Change the recipient wallet. Requires `transferableBySender: true` at creation. `transfer()` embeds its own `ComputeBudgetProgram` instruction. Do **not** pass `computeLimit` to `buildTransaction` - it would duplicate the compute budget instruction. ```ts import { transfer } from "@streamflow/stream/solana/api"; const result = await transfer({ id: streamId, newRecipient: "NewWalletAddress..." }, senderInvoker, env); // Note: no computeLimit in buildTransaction options const built = await buildTransaction(result.instructions, { feePayer: senderInvoker.publicKey }, env); await sign(built.transaction, [senderInvoker]); await execute(built, env); ``` ```ts const { txId } = await client.transfer( { id: streamId, newRecipient: "NewWalletAddress..." }, { invoker: senderKeypair }, ); ``` ### cancel [#cancel] Terminate the stream early. Returns unvested tokens to the sender. Requires `cancelableBySender: true` at creation. ```ts import { cancel } from "@streamflow/stream/solana/api"; const result = await cancel({ id: streamId }, senderInvoker, env); const built = await buildTransaction(result.instructions, { feePayer: senderInvoker.publicKey }, env); await sign(built.transaction, [senderInvoker]); await execute(built, env); ``` ```ts const { txId } = await client.cancel({ id: streamId }, { invoker: senderKeypair }); ``` Cancel must be the last operation - all other operations fail after a stream is cancelled. ### update [#update] Change the stream's release rate or permission flags. Requires `canUpdateRate: true` on the stream. `canUpdateRate` is **not exposed** in `ICreateVestingParams`. Streams created via `createVesting` don't support `update` unless you use `SolanaStreamClient.create()` directly with `canUpdateRate: true` in the raw params. ```ts import { update } from "@streamflow/stream/solana/api"; const result = await update( { id: streamId, amountPerPeriod: new BN(200_000) }, senderInvoker, env, ); const built = await buildTransaction(result.instructions, { feePayer: senderInvoker.publicKey }, env); await sign(built.transaction, [senderInvoker]); await execute(built, env); ``` ```ts const { txId } = await client.update( { id: streamId, amountPerPeriod: new BN(200_000), // other updatable fields: // transferableBySender, transferableByRecipient, cancelableBySender // enableAutomaticWithdrawal, withdrawFrequency }, { invoker: senderKeypair }, ); ``` ## Querying stream state [#querying-stream-state] Use `SolanaStreamClient` to read current stream data: ```ts import { SolanaStreamClient, ICluster, StreamDirection, StreamType } from "@streamflow/stream"; const client = new SolanaStreamClient({ clusterUrl: "https://api.mainnet-beta.solana.com", cluster: ICluster.Mainnet, }); // Fetch a single stream const stream = await client.getOne({ id: streamId }); console.log("Recipient:", stream.recipient); console.log("Deposited:", stream.depositedAmount.toString()); console.log("Withdrawn:", stream.withdrawnAmount.toString()); console.log("Is cancelled:", stream.closed); // List all streams for a wallet (returns [streamId, Stream][] tuples) const streams = await client.get({ address: walletAddress, direction: StreamDirection.Outgoing, type: StreamType.Vesting, }); ``` # Guide: Create a Lock URL: /docs/core-concepts/locks/guide-create-lock The composable API returns instructions you build, sign, and execute yourself - ideal when you need a custom fee payer, multi-sig, or wallet adapter. ### Import and set up [#import-and-set-up] ```ts import { Connection, Keypair } from "@solana/web3.js"; import BN from "bn.js"; import { buildTransaction, createLock, execute, sign } from "@streamflow/stream/solana/api"; import { pk } from "@streamflow/common"; import fs from "node:fs"; const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); const connection = new Connection("https://api.devnet.solana.com", "confirmed"); const env = { connection, programId: pk("HqDGZjaVRXJ9MGRQEw7qDc2rAr6iH1n1kAQdCZaCMfMZ"), // devnet }; ``` ### Phase 1 - Get instructions [#phase-1---get-instructions] ```ts // amount must be > 1 in the token's smallest unit const amount = new BN(2); const unlockDate = Math.floor(Date.now() / 1000) + 3600; // 1 hour from now const result = await createLock( { recipient: "RecipientWalletAddress...", tokenId: "TokenMintAddress...", amount, unlockDate, name: "Team Lock Q1", transferableByRecipient: false, // only configurable flag on locks }, invoker, { ...env, isNative: false }, ); const streamId = result.metadataPubKey!.toBase58(); console.log("Stream ID:", streamId); ``` `result.metadataPubKey` is the on-chain stream ID. Save it - you need it to call `withdraw` after `unlockDate` passes. ### Phase 2 - Build transaction [#phase-2---build-transaction] ```ts const built = await buildTransaction( result.instructions, { feePayer: invoker.publicKey }, env, ); ``` ### Phase 3 - Sign and execute [#phase-3---sign-and-execute] ```ts // Always spread result.signers - it contains the metadata keypair required by the protocol await sign(built.transaction, [invoker, ...(result.signers ?? [])]); const signature = await execute(built, env); console.log("Transaction:", signature); ``` `SolanaStreamClient.create()` handles building, signing, and submitting in one call - the pattern used in server-side integrations. ### Import and initialize [#import-and-initialize] ```ts import { SolanaStreamClient, ICluster } from "@streamflow/stream"; import { Keypair } from "@solana/web3.js"; import BN from "bn.js"; import fs from "node:fs"; const client = new SolanaStreamClient({ clusterUrl: "https://api.devnet.solana.com", cluster: ICluster.Devnet, }); const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); ``` ### Create the lock [#create-the-lock] `buildLockParams` from the composable API constructs the raw params that `SolanaStreamClient` expects - all lock-specific flags are auto-set. ```ts import { buildLockParams } from "@streamflow/stream/solana/api"; const unlockDate = Math.floor(Date.now() / 1000) + 3600; // 1 hour from now const { txId, metadataId } = await client.create( buildLockParams({ recipient: "RecipientWalletAddress...", tokenId: "TokenMintAddress...", amount: new BN(2), // must be > 1 unlockDate, name: "Team Lock Q1", transferableByRecipient: false, }), { sender: invoker, isNative: false, }, ); console.log("Stream ID:", metadataId); console.log("Transaction:", txId); ``` ### Fine-grained control (optional) [#fine-grained-control-optional] Use `prepareCreateInstructions()` if you need to inspect, compose, or sign the transaction yourself: ```ts const { ixs, metadata, metadataPubKey } = await client.prepareCreateInstructions( buildLockParams({ recipient: "RecipientWalletAddress...", tokenId: "TokenMintAddress...", amount: new BN(2), unlockDate, name: "Team Lock Q1", }), { sender: { publicKey: invoker.publicKey }, isNative: false, }, ); // ixs: TransactionInstruction[] - add to any transaction // metadata: Keypair | undefined - must co-sign if present // metadataPubKey: PublicKey - the stream ID (call .toBase58() to get the string) ``` ## What's next [#whats-next] After `unlockDate` passes, the recipient withdraws with: ```ts // Composable API import { withdraw, buildTransaction, sign, execute } from "@streamflow/stream/solana/api"; const result = await withdraw({ id: streamId }, recipientInvoker, env); const built = await buildTransaction(result.instructions, { feePayer: recipientInvoker.publicKey }, env); await sign(built.transaction, [recipientInvoker]); await execute(built, env); // SolanaStreamClient await client.withdraw({ id: streamId }, { invoker: recipientInvoker }); ``` See [Lifecycle Operations](/docs/core-concepts/lifecycle) for full details. # Locks URL: /docs/core-concepts/locks A lock holds tokens in escrow until a trigger condition is met, then releases the entire amount at once to the recipient. ## Types [#types] | Type | Trigger | Composable API | | ---------------------------------------------------- | ----------------------------- | ------------------------------- | | [Time-based](/docs/core-concepts/locks/time-based) | Unix timestamp (`unlockDate`) | `createLock`, `createLockBatch` | | [Price-based](/docs/core-concepts/locks/price-based) | Oracle price condition | `SolanaStreamClient` directly | ## Immutable constraints [#immutable-constraints] These flags are hardcoded by `buildLockParams()` and cannot be overridden: | Flag | Value | Reason | | ----------------------- | ------- | -------------------------------- | | `canTopup` | `false` | Required for lock classification | | `cancelableBySender` | `false` | Required for lock classification | | `cancelableByRecipient` | `false` | Required for lock classification | | `transferableBySender` | `false` | Required for lock classification | | `automaticWithdrawal` | `false` | Required for lock classification | The only configurable flag is `transferableByRecipient` - the recipient can optionally transfer the lock to another wallet. ## Minimum amount [#minimum-amount] Lock amount must be `> 1` in the token's smallest unit. This is enforced by `buildLockParams()` which throws if `amount.lten(1)`. The reason: the protocol needs `amountPerPeriod = BN(1)` as a dust release, so the actual claimable amount is `amount - 1`. ## Available lifecycle operations [#available-lifecycle-operations] After creation, only **withdraw** is available. All other operations (topup, transfer, cancel) are disabled by the hardcoded flags above. Withdraw only works after `unlockDate` has passed - the tokens are locked until that timestamp. # Price-Based Locks URL: /docs/core-concepts/locks/price-based A price-based lock releases all tokens when an oracle reports that the token price has reached a specified threshold (`maxPrice`). Instead of a time-based `unlockDate`, the protocol polls an on-chain oracle continuously. Price-based locks require `SolanaStreamClient` directly. The `createLock` and `createLockBatch` composable wrappers only support time-based locks. ## How it works [#how-it-works] The protocol classifies a stream as a price-based lock when these fields satisfy the `isDynamicLock()` criteria: `minPrice > 0`, `maxPrice - minPrice <= 1`, `minPercentage === 0`, and `maxPercentage === 100`. You must set all of them explicitly - the SDK does not default any of them. | Parameter | Required value | Purpose | | --------------- | --------------------------- | ----------------------------------------------------- | | `minPrice` | `maxPrice - 1` | Creates a step function - nothing releases below this | | `maxPrice` | target price | Full unlock triggers when oracle price reaches this | | `minPercentage` | `0` | 0% releases below `minPrice` | | `maxPercentage` | `100` | 100% releases at `maxPrice` | | `oracleType` | `"pyth"` or `"switchboard"` | Which oracle program to use | | `priceOracle` | oracle account public key | Price feed for the token pair | When the oracle reports `currentPrice >= maxPrice`, the entire amount becomes claimable. ## Parameters [#parameters] | Parameter | Type | Required | Description | | ---------------- | ------------------------- | -------- | ---------------------------------------------------- | | `recipient` | `string` | ✓ | Recipient wallet address | | `tokenId` | `string` | ✓ | Token mint address | | `amount` | `BN` | ✓ | Amount to lock | | `maxPrice` | `number` | ✓ | Price at which full unlock triggers (USD) | | `oracleType` | `"pyth" \| "switchboard"` | ✓ | On-chain oracle program to use | | `priceOracle` | `string` | ✓ | Oracle account public key for the token's price feed | | `name` | `string` | ✓ | Display name | | `start` | `number` | ✓ | Unix timestamp when the lock begins | | `cliff` | `number` | - | Same as `start` for a lock | | `partner` | `string` | - | Partner address for custom fee rates | | `tokenProgramId` | `string` | - | For Token-2022 mints | ## Code example [#code-example] ```ts title="create-price-lock.ts" import { SolanaStreamClient, ICluster } from "@streamflow/stream"; import { Keypair } from "@solana/web3.js"; import BN from "bn.js"; import fs from "node:fs"; const client = new SolanaStreamClient({ clusterUrl: "https://api.mainnet-beta.solana.com", cluster: ICluster.Mainnet, }); const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); const start = Math.floor(Date.now() / 1000); const { txId, metadataId } = await client.create( { recipient: "RecipientWalletAddress...", tokenId: "TokenMintAddress...", amount: new BN(1_000_000_000), // 1000 tokens at 6 decimals // Schedule - price-based lock uses a single synthetic period start, cliff: start, period: 1, cliffAmount: new BN(1_000_000_000).subn(1), // amount - 1 amountPerPeriod: new BN(1), // dust amount // Lock flags - all hardcoded false for locks canTopup: false, cancelableBySender: false, cancelableByRecipient: false, transferableBySender: false, transferableByRecipient: false, automaticWithdrawal: false, withdrawalFrequency: 0, name: "Price Lock - Unlock at $5", // Price oracle configuration - all four fields required for lock classification maxPrice: 5, // unlock when oracle price >= $5 minPrice: 4, // must be maxPrice - 1 minPercentage: 0, // must be 0 for lock classification maxPercentage: 100, // must be 100 for lock classification oracleType: "pyth", // or "switchboard" // Pyth SOL/USD feed on mainnet: priceOracle: "H6ARHf6YXhGYeQfUzQNGk6rDNnLBQKrenN712K4AQJEG", }, { sender: invoker, isNative: false, }, ); console.log("Price lock stream ID:", metadataId); console.log("Transaction:", txId); ``` `priceOracle` must be the specific oracle feed account for your token pair, not the oracle program ID. For Pyth, find the correct feed address at [pyth.network/price-feeds](https://pyth.network/price-feeds). For Switchboard, use [app.switchboard.xyz](https://app.switchboard.xyz). ## Querying a price-based lock [#querying-a-price-based-lock] After creation, use `client.getOne()` to read stream state. `stream.isAligned === true` indicates it's a price-based variant. Use the `isAligned()` type guard to access price-specific fields: ```ts import { StreamType, isAligned } from "@streamflow/stream"; const stream = await client.getOne({ id: metadataId }); console.log("Is lock:", stream.type === StreamType.Lock); // true console.log("Is price-based:", stream.isAligned); // true if (isAligned(stream)) { // AlignedStream - price fields are now available console.log("Max price:", stream.maxPrice); // 5 console.log("Oracle type:", stream.oracleType); // "pyth" console.log("Oracle:", stream.priceOracle); } ``` # Time-Based Locks URL: /docs/core-concepts/locks/time-based A time-based lock holds tokens in escrow until a specific Unix timestamp (`unlockDate`). Once that timestamp has passed, the recipient can call `withdraw()` to receive the tokens. ## Parameters [#parameters] | Parameter | Type | Required | Description | | ------------------------- | --------------------- | -------- | ------------------------------------------- | | `recipient` | `string` | ✓ | Recipient wallet address | | `tokenId` | `string` | ✓ | Token mint address | | `amount` | `BN` | ✓ | Amount in smallest units - must be `> 1` | | `unlockDate` | `number` | ✓ | Unix timestamp (seconds) when tokens unlock | | `name` | `string` | ✓ | Display name for the stream | | `transferableByRecipient` | `boolean` | - | Defaults `false` | | `partner` | `string` | - | Partner address for custom fee rates | | `tokenProgramId` | `string \| PublicKey` | - | For Token-2022 mints | `amount` must be greater than 1 in the token's smallest unit. `buildLockParams()` sets `cliffAmount = amount - 1`, so `amount <= 1` would produce a zero or negative cliff amount. ## Code example [#code-example] ```ts title="create-lock.ts" import { Connection, Keypair } from "@solana/web3.js"; import BN from "bn.js"; import { buildTransaction, createLock, execute, sign } from "@streamflow/stream/solana/api"; import { pk } from "@streamflow/common"; import fs from "node:fs"; const connection = new Connection("https://api.devnet.solana.com", "confirmed"); const env = { connection, programId: pk("HqDGZjaVRXJ9MGRQEw7qDc2rAr6iH1n1kAQdCZaCMfMZ"), // devnet }; const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); // Phase 1 - get instructions const result = await createLock( { recipient: "RecipientWalletAddress...", tokenId: "TokenMintAddress...", amount: new BN(2), // must be > 1 unlockDate: Math.floor(Date.now() / 1000) + 86400, // 24 hours name: "Team Lock", transferableByRecipient: false, }, invoker, { ...env, isNative: false }, ); const streamId = result.metadataPubKey!.toBase58(); // Phase 2 - build transaction const built = await buildTransaction( result.instructions, { feePayer: invoker.publicKey }, env, ); // Phase 3 - sign and execute await sign(built.transaction, [invoker, ...(result.signers ?? [])]); const signature = await execute(built, env); console.log("Stream ID:", streamId); console.log("Transaction:", signature); ``` ```ts title="create-lock.ts" import { SolanaStreamClient, ICluster } from "@streamflow/stream"; import { buildLockParams } from "@streamflow/stream/solana/api"; import { Keypair } from "@solana/web3.js"; import BN from "bn.js"; import fs from "node:fs"; const client = new SolanaStreamClient({ clusterUrl: "https://api.devnet.solana.com", cluster: ICluster.Devnet, }); const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); const { txId, metadataId } = await client.create( buildLockParams({ recipient: "RecipientWalletAddress...", tokenId: "TokenMintAddress...", amount: new BN(2), unlockDate: Math.floor(Date.now() / 1000) + 86400, // 24 hours name: "Team Lock", transferableByRecipient: false, }), { sender: invoker, isNative: false, }, ); console.log("Stream ID:", metadataId); console.log("Transaction:", txId); ``` ## After creation [#after-creation] The stream ID (`metadataPubKey` / `metadataId`) is used for all subsequent operations. For locks, only `withdraw` is available - and only after `unlockDate` has passed. See [Guide: Create a Lock](/docs/core-concepts/locks/guide-create-lock) for the full end-to-end walkthrough with setup steps. # Streams URL: /docs/core-concepts/streams ## On-chain structure [#on-chain-structure] A Streamflow stream is a pair of on-chain accounts: a **metadata account** that holds stream parameters, and an **escrow token account** that holds the locked tokens. The metadata account's public key is the stream ID - save it after creation. ## Two stream types [#two-stream-types] | Type | Release pattern | Functions | | ----------- | --------------------------- | ------------------------------------- | | **Lock** | All-at-once at `unlockDate` | `createLock`, `createLockBatch` | | **Vesting** | Gradual per-period release | `createVesting`, `createVestingBatch` | Both types use the same underlying on-chain account structure. The difference is in how the protocol parameters are set - specifically `cliffAmount`, `amountPerPeriod`, and `period`. ## Lock internals [#lock-internals] The on-chain protocol has only one stream account type - there is no separate "lock" account. A lock is a vesting stream configured so that all tokens become claimable at a single point in time (`unlockDate`), with no gradual release. `buildLockParams()` achieves this by setting three synthetic parameters: * `cliffAmount = total - 1` - releases nearly the entire amount at the cliff date (`unlockDate`), so the recipient can claim everything at once * `amountPerPeriod = BN(1)` - the protocol requires a non-zero periodic amount; this dust value makes the remaining 1 unit available immediately after the cliff (given `period = 1`) * `period = 1` - the shortest possible period, so the dust release resolves immediately after the cliff The result: `unlockDate` is the cliff, the cliff releases `total - 1` tokens, and the remaining 1 unit becomes available right after. To the recipient, this is indistinguishable from a full all-at-once unlock. ## Stream classification [#stream-classification] The protocol does not store a stream type field on-chain. Instead, it derives the type at runtime using `isTokenLock()`. **A stream is classified as a Lock when ALL of the following are true:** * All mutability flags are `false`: `canTopup`, `automaticWithdrawal`, `cancelableBySender`, `cancelableByRecipient`, `transferableBySender` * `cliffAmount >= depositedAmount - 1` **A stream is classified as Vesting when any of the above conditions are not met** - at least one flag is `true`, or the cliff amount is meaningfully below the total deposited. The cliff condition is the easy one to accidentally trigger. A vesting stream with a very large `cliffAmount` (within 1 of the total) will silently reclassify as a Lock if all flags are `false`, and be charged lock fee rates instead of vesting rates. Keep `cliffAmount` well below the total, or set at least one flag to `true`. # Guide: Create a Vesting Stream URL: /docs/core-concepts/vesting/guide-create-vesting ### Import and set up [#import-and-set-up] ```ts import { Connection, Keypair } from "@solana/web3.js"; import BN from "bn.js"; import { buildTransaction, createVesting, execute, sign } from "@streamflow/stream/solana/api"; import { pk } from "@streamflow/common"; import fs from "node:fs"; const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); const connection = new Connection("https://api.devnet.solana.com", "confirmed"); const env = { connection, programId: pk("HqDGZjaVRXJ9MGRQEw7qDc2rAr6iH1n1kAQdCZaCMfMZ"), }; ``` ### Phase 1 - Get instructions [#phase-1---get-instructions] ```ts const start = Math.floor(Date.now() / 1000) + 10; // 10 seconds from now const result = await createVesting( { recipient: "RecipientWalletAddress...", tokenId: "TokenMintAddress...", amount: new BN(3_600_000_000), // 3600 tokens at 6 decimals start, period: 86400, // release daily duration: 365 * 86400, // over 1 year cliffAmount: new BN(0), // no upfront release name: "Employee Vesting", cancelableBySender: true, canTopup: true, transferableBySender: true, }, invoker, { ...env, isNative: false }, ); const streamId = result.metadataPubKey!.toBase58(); ``` ### Phases 2 and 3 - Build, sign, and execute [#phases-2-and-3---build-sign-and-execute] ```ts const built = await buildTransaction( result.instructions, { feePayer: invoker.publicKey }, env, ); await sign(built.transaction, [invoker, ...(result.signers ?? [])]); const signature = await execute(built, env); console.log("Stream ID:", streamId); console.log("Transaction:", signature); ``` Providing `initialAllocation` creates **two streams atomically**: the main vesting stream and a separate stream for the upfront allocation. The return type changes to `BatchInstructionResult`, and you must send a setup transaction followed by one transaction per stream. The allocation stream uses internal parameters specifically chosen to avoid on-chain lock classification. These are set automatically - you only need to provide the `amount`. ### Phase 1 - Get instructions (returns BatchInstructionResult) [#phase-1---get-instructions-returns-batchinstructionresult] ```ts const start = Math.floor(Date.now() / 1000) + 10; const result = await createVesting( { recipient: "RecipientWalletAddress...", tokenId: "TokenMintAddress...", amount: new BN(3_600_000_000), // 3600 tokens at 6 decimals start, period: 86400, duration: 365 * 86400, name: "Vest + Allocation", cancelableBySender: true, initialAllocation: { amount: new BN(360_000_000) }, // 10% upfront }, invoker, { ...env, isNative: false }, ); // result: { setupInstructions, creationBatches } // creationBatches[0] - main vesting stream // creationBatches[1] - allocation stream ``` ### Send setup transaction first [#send-setup-transaction-first] Setup creates associated token accounts and wraps SOL if needed. It must confirm before the creation batches are sent. ```ts if (result.setupInstructions.length > 0) { const setupBuilt = await buildTransaction( result.setupInstructions, { feePayer: invoker.publicKey }, env, ); await sign(setupBuilt.transaction, [invoker]); await execute(setupBuilt, env); } ``` ### Send one transaction per creation batch [#send-one-transaction-per-creation-batch] Each batch has its own metadata keypair and must be submitted as a separate transaction. ```ts for (const batch of result.creationBatches) { const batchBuilt = await buildTransaction( batch.instructions, { feePayer: invoker.publicKey }, env, ); await sign(batchBuilt.transaction, [invoker, ...(batch.signers ?? [])]); const sig = await execute(batchBuilt, env); console.log("Stream:", batch.metadataPubKey.toBase58(), "Tx:", sig); } ``` `client.create()` handles building, signing, and submission in a single call. For the `initialAllocation` pattern, use the composable API instead - it returns a `BatchInstructionResult` giving you control over each transaction in the sequence. ### Import and initialize [#import-and-initialize] ```ts import { SolanaStreamClient, ICluster } from "@streamflow/stream"; import { buildVestingParams } from "@streamflow/stream/solana/api"; import { Keypair } from "@solana/web3.js"; import BN from "bn.js"; import fs from "node:fs"; const client = new SolanaStreamClient({ clusterUrl: "https://api.devnet.solana.com", cluster: ICluster.Devnet, }); const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); ``` ### Create the vesting stream [#create-the-vesting-stream] `buildVestingParams` resolves `duration` or `endDate`, computes `amountPerPeriod` via ceiling division, and fills in protocol defaults before passing to the client. ```ts const start = Math.floor(Date.now() / 1000) + 10; const { txId, metadataId } = await client.create( buildVestingParams({ recipient: "RecipientWalletAddress...", tokenId: "TokenMintAddress...", amount: new BN(3_600_000_000), // 3600 tokens at 6 decimals start, period: 86400, // daily release duration: 365 * 86400, // 1 year cliffAmount: new BN(0), // no cliff name: "Employee Vesting", cancelableBySender: true, canTopup: true, transferableBySender: true, }), { sender: invoker, isNative: false, }, ); console.log("Stream ID:", metadataId); console.log("Transaction:", txId); ``` ### Fine-grained control (optional) [#fine-grained-control-optional] Use `prepareCreateInstructions()` to get the raw instructions without submitting: ```ts const { ixs, metadata, metadataPubKey } = await client.prepareCreateInstructions( buildVestingParams({ recipient: "RecipientWalletAddress...", tokenId: "TokenMintAddress...", amount: new BN(3_600_000_000), start, period: 86400, duration: 365 * 86400, name: "Employee Vesting", }), { sender: { publicKey: invoker.publicKey }, isNative: false, }, ); // ixs: TransactionInstruction[] - compose into your own transaction // metadata: Keypair | undefined - co-sign if present // metadataPubKey: PublicKey - the stream ID (call .toBase58() to get the string) ``` ### Query stream state [#query-stream-state] After creation, use `getOne()` to read stream state, or `get()` to list all streams for a wallet: ```ts import { StreamDirection, StreamType } from "@streamflow/stream"; // Fetch a single stream const stream = await client.getOne({ id: metadataId }); console.log("Recipient:", stream.recipient); console.log("Deposited:", stream.depositedAmount.toString()); console.log("Withdrawn:", stream.withdrawnAmount.toString()); // List all outgoing vesting streams for a sender const streams = await client.get({ address: invoker.publicKey.toBase58(), direction: StreamDirection.Outgoing, type: StreamType.Vesting, }); for (const [id, stream] of streams) { console.log(id, "->", stream.recipient, stream.depositedAmount.toString()); } ``` # Vesting URL: /docs/core-concepts/vesting A vesting stream releases tokens gradually over time according to a period-based schedule. The recipient can withdraw earned tokens at any time, or optionally have them pushed automatically via `automaticWithdrawal`. ## Types [#types] | Type | Trigger | Composable API | | ------------------------------------------------------ | ------------------------------ | ------------------------------------- | | [Time-based](/docs/core-concepts/vesting/time-based) | Clock-driven, period intervals | `createVesting`, `createVestingBatch` | | [Price-based](/docs/core-concepts/vesting/price-based) | Oracle price thresholds | `SolanaStreamClient` directly | ## Key parameters [#key-parameters] | Parameter | Description | | ----------------------- | ------------------------------------------------------- | | `start` | Unix timestamp when vesting begins | | `period` | Seconds between each release (e.g. `86400` = daily) | | `duration` OR `endDate` | Total vesting window - provide exactly one | | `amount` | Total tokens to vest | | `cliffAmount` | Amount released at `start` (optional, defaults `BN(0)`) | ## Amount per period (auto-computed) [#amount-per-period-auto-computed] If you omit `amountPerPeriod`, it's computed via ceiling division: ``` remaining = amount - cliffAmount periods = floor(duration / period) result = ceil(remaining / periods) ``` This ensures all tokens are released by the end of the schedule, with the last period potentially getting slightly less. If `cliffAmount >= amount - 1` **and** all of `canTopup`, `automaticWithdrawal`, `cancelableBySender`, `cancelableByRecipient`, `transferableBySender` are `false`, the stream reclassifies as a Lock on-chain and is charged lock fee rates. Keep cliff amounts well below the total, or set at least one of those flags to `true`. ## Initial allocation [#initial-allocation] `createVesting` with `initialAllocation` creates two streams atomically: the main vesting stream and a separate stream for the initial allocation amount. The return type changes to `BatchInstructionResult`. See [Guide: Create a Vesting Stream](/docs/core-concepts/vesting/guide-create-vesting) for the full pattern. # Price-Based Vesting URL: /docs/core-concepts/vesting/price-based Price-based vesting scales the per-period release amount based on an oracle-reported price. As the price rises toward `maxPrice`, the release per period increases proportionally from `minPercentage` toward 100%. Price-based vesting requires `SolanaStreamClient` directly. The `createVesting` and `createVestingBatch` composable wrappers only support linear (time-based) vesting. ## How it works [#how-it-works] Each period, the oracle price is checked against the range `[minPrice, maxPrice]`. The release fraction scales linearly: * At `currentPrice <= minPrice`: releases `minPercentage`% of the base `amountPerPeriod` * At `currentPrice >= maxPrice`: releases 100% of the base `amountPerPeriod` * In between: linear interpolation `minPercentage` is computed as `(releasesAtMin / releasesAtMax) * 100`. For example, if at min price you want 20% and at max price 100%, set `minPercentage = 20`. ## Parameters [#parameters] | Parameter | Type | Required | Description | | -------------------- | ------------------------- | -------- | ---------------------------------------------------- | | `recipient` | `string` | ✓ | Recipient wallet address | | `tokenId` | `string` | ✓ | Token mint address | | `amount` | `BN` | ✓ | Total amount to vest | | `start` | `number` | ✓ | Unix timestamp when vesting begins | | `period` | `number` | ✓ | Seconds per release interval | | `amountPerPeriod` | `BN` | ✓ | Max release per period (at `maxPrice`) | | `minPrice` | `number` | ✓ | Price at which `minPercentage` is released | | `maxPrice` | `number` | ✓ | Price at which 100% of `amountPerPeriod` is released | | `minPercentage` | `number` | ✓ | Percentage released at `minPrice` (0-100) | | `oracleType` | `"pyth" \| "switchboard"` | ✓ | On-chain oracle program | | `priceOracle` | `string` | ✓ | Oracle feed account public key | | `name` | `string` | ✓ | Display name | | `cliff` | `number` | - | Cliff timestamp - defaults to `start` | | `cliffAmount` | `BN` | - | Amount released at cliff | | `cancelableBySender` | `boolean` | - | Defaults `false` | | `canTopup` | `boolean` | - | Defaults `false` | | `partner` | `string` | - | Partner address for custom fee rates | ## Code example [#code-example] ```ts title="create-price-vesting.ts" import { SolanaStreamClient, ICluster } from "@streamflow/stream"; import { Keypair } from "@solana/web3.js"; import BN from "bn.js"; import fs from "node:fs"; const client = new SolanaStreamClient({ clusterUrl: "https://api.mainnet-beta.solana.com", cluster: ICluster.Mainnet, }); const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); const start = Math.floor(Date.now() / 1000); // Example: vest 36,500 tokens over 365 days (100/day at max price) // At min price ($1), release 20% = 20 tokens/day // At max price ($5), release 100% = 100 tokens/day const amountPerPeriod = new BN(100_000_000); // 100 tokens at 6 decimals per day const totalPeriods = 365; const { txId, metadataId } = await client.create( { recipient: "RecipientWalletAddress...", tokenId: "TokenMintAddress...", amount: amountPerPeriod.muln(totalPeriods), // 36,500 tokens total // Schedule start, cliff: start, period: 86400, // daily cliffAmount: new BN(0), // no upfront release amountPerPeriod, // max per day (at maxPrice) // Price oracle configuration minPrice: 1, // $1 - 20% per period maxPrice: 5, // $5 - 100% per period minPercentage: 20, // 20% at minPrice maxPercentage: 100, // 100% at maxPrice (required) oracleType: "pyth", // Pyth SOL/USD feed on mainnet: priceOracle: "H6ARHf6YXhGYeQfUzQNGk6rDNnLBQKrenN712K4AQJEG", // Flags canTopup: false, cancelableBySender: true, cancelableByRecipient: false, transferableBySender: false, transferableByRecipient: false, automaticWithdrawal: false, withdrawalFrequency: 0, name: "Price-Based Vesting", }, { sender: invoker, isNative: false, }, ); console.log("Stream ID:", metadataId); console.log("Transaction:", txId); ``` `priceOracle` must be the feed account for your specific token pair, not the oracle program ID. Find Pyth feed addresses at [pyth.network/price-feeds](https://pyth.network/price-feeds) and Switchboard feeds at [app.switchboard.xyz](https://app.switchboard.xyz). ## Querying the stream [#querying-the-stream] ```ts import { isAligned } from "@streamflow/stream"; const stream = await client.getOne({ id: metadataId }); console.log("Is aligned (price-based):", stream.isAligned); // true if (isAligned(stream)) { // AlignedStream - price fields are now available console.log("Min price:", stream.minPrice); console.log("Max price:", stream.maxPrice); console.log("Min percentage:", stream.minPercentage); console.log("Oracle type:", stream.oracleType); } ``` # Time-Based Vesting URL: /docs/core-concepts/vesting/time-based Time-based vesting releases tokens at regular intervals (`period`). Each period, `amountPerPeriod` tokens become claimable by the recipient. If omitted, `amountPerPeriod` is computed as `ceil((amount - cliffAmount) / (duration / period))`. ## Parameters [#parameters] | Parameter | Type | Required | Description | | ------------------------- | --------------------- | --------------- | ------------------------------------------------------------------- | | `recipient` | `string` | ✓ | Recipient wallet address | | `tokenId` | `string` | ✓ | Token mint address | | `amount` | `BN` | ✓ | Total amount to vest in smallest units | | `start` | `number` | ✓ | Unix timestamp when vesting begins | | `period` | `number` | ✓ | Seconds per release interval (e.g. `86400` = daily) | | `name` | `string` | ✓ | Display name | | `duration` | `number` | ✓ or `endDate` | Total seconds of vesting | | `endDate` | `number` | ✓ or `duration` | Unix timestamp when vesting ends | | `cliffAmount` | `BN` | - | Defaults `BN(0)` - amount released immediately at `start` | | `amountPerPeriod` | `BN` | - | Auto-computed if omitted | | `cancelableBySender` | `boolean` | - | Defaults `false` | | `canTopup` | `boolean` | - | Defaults `false` | | `automaticWithdrawal` | `boolean` | - | Defaults `false` - protocol pushes tokens each period automatically | | `withdrawalFrequency` | `number` | - | Defaults to `period` when `automaticWithdrawal: true` | | `transferableBySender` | `boolean` | - | Defaults `false` | | `transferableByRecipient` | `boolean` | - | Defaults `false` | | `partner` | `string` | - | Partner address for custom fee rates | | `tokenProgramId` | `string \| PublicKey` | - | For Token-2022 mints | | `initialAllocation` | `{ amount: BN }` | - | Creates a second stream for upfront release - changes return type | Provide exactly **one** of `duration` or `endDate`. Providing both or neither throws an error. ## Code example [#code-example] ```ts title="create-vesting.ts" import { Connection, Keypair } from "@solana/web3.js"; import BN from "bn.js"; import { buildTransaction, createVesting, execute, sign } from "@streamflow/stream/solana/api"; import { pk } from "@streamflow/common"; import fs from "node:fs"; const connection = new Connection("https://api.devnet.solana.com", "confirmed"); const env = { connection, programId: pk("HqDGZjaVRXJ9MGRQEw7qDc2rAr6iH1n1kAQdCZaCMfMZ"), // devnet }; const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); const start = Math.floor(Date.now() / 1000) + 10; // Phase 1 - get instructions const result = await createVesting( { recipient: "RecipientWalletAddress...", tokenId: "TokenMintAddress...", amount: new BN(3_600_000_000), // 3600 tokens at 6 decimals start, period: 86400, // daily release duration: 365 * 86400, // 1 year vesting cliffAmount: new BN(0), // no upfront release name: "Employee Vesting", cancelableBySender: true, canTopup: false, automaticWithdrawal: false, }, invoker, { ...env, isNative: false }, ); const streamId = result.metadataPubKey!.toBase58(); // Phase 2 - build transaction, Phase 3 - sign and execute const built = await buildTransaction(result.instructions, { feePayer: invoker.publicKey }, env); await sign(built.transaction, [invoker, ...(result.signers ?? [])]); const signature = await execute(built, env); console.log("Stream ID:", streamId); console.log("Transaction:", signature); ``` ```ts title="create-vesting.ts" import { SolanaStreamClient, ICluster } from "@streamflow/stream"; import { buildVestingParams } from "@streamflow/stream/solana/api"; import { Keypair } from "@solana/web3.js"; import BN from "bn.js"; import fs from "node:fs"; const client = new SolanaStreamClient({ clusterUrl: "https://api.devnet.solana.com", cluster: ICluster.Devnet, }); const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); const start = Math.floor(Date.now() / 1000) + 10; const { txId, metadataId } = await client.create( buildVestingParams({ recipient: "RecipientWalletAddress...", tokenId: "TokenMintAddress...", amount: new BN(3_600_000_000), // 3600 tokens at 6 decimals start, period: 86400, // daily release duration: 365 * 86400, // 1 year vesting cliffAmount: new BN(0), // no upfront release name: "Employee Vesting", cancelableBySender: true, canTopup: false, }), { sender: invoker, isNative: false, }, ); console.log("Stream ID:", metadataId); console.log("Transaction:", txId); ``` After creation, fetch stream state with `client.getOne({ id: metadataId })` or list all streams for a wallet with `client.get({ address, direction, type })`. ## With initial allocation [#with-initial-allocation] Providing `initialAllocation` creates two streams atomically and returns `BatchInstructionResult` instead of `CreateInstructionResult`. See [Guide: Create a Vesting Stream](/docs/core-concepts/vesting/guide-create-vesting) for the full pattern. # Authentication & Wallet Setup URL: /docs/getting-started/authentication Every composable API function takes an `invoker` as its second argument. The invoker is the signer - it authorizes stream creation and lifecycle operations. ## The `Invoker` type [#the-invoker-type] ```ts type Invoker = Keypair | SignerWalletAdapter | { publicKey: PublicKey }; ``` The SDK accepts any of these three shapes and normalizes the invoker internally before signing. ## Creating an invoker [#creating-an-invoker] ### Backend (Node.js) - Keypair [#backend-nodejs---keypair] ```ts import { Keypair } from "@solana/web3.js"; import fs from "node:fs"; const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); ``` ```ts import { Keypair } from "@solana/web3.js"; const secret = JSON.parse(process.env.KEYPAIR_JSON!); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); ``` Never commit private keys or keypair files. Use environment variables or a secrets manager in production. ### Frontend (browser) - Wallet adapter [#frontend-browser---wallet-adapter] ```ts import { useWallet } from "@solana/wallet-adapter-react"; const { wallet } = useWallet(); const invoker = wallet?.adapter; // SignerWalletAdapter ``` Pass the adapter directly as the invoker. The `sign()` function will call `adapter.signTransaction()` when executing. ## Signature in `sign()` [#signature-in-sign] ```ts import { sign } from "@streamflow/stream/solana/api"; // With a Keypair (backend): await sign(built.transaction, [invoker, ...(result.signers ?? [])]); // With a wallet adapter (frontend): await sign(built.transaction, [walletAdapter]); ``` `result.signers` contains the metadata keypair required by stream creation transactions. Always spread it alongside the invoker. ## Roles [#roles] The invoker acts as the **stream sender** - it funds the escrow and has authority to cancel or topup (if those flags were set at creation). The recipient is a separate wallet address provided in the stream params. # Token Amounts & BN Conversions URL: /docs/getting-started/basics/bn-conversions Solana stores token amounts as unsigned 64-bit integers (u64) - values up to `2^64 - 1 ≈ 1.8 × 10^19`. JavaScript's `number` type is a 64-bit float with only 53 bits of integer precision (`Number.MAX_SAFE_INTEGER = 2^53 - 1 ≈ 9 × 10^15`). A token with 9 decimals and a supply of just 10 billion would be `10^19` raw units - beyond what JS can represent exactly. `BN` (big number from `bn.js`) handles arbitrary-precision integer arithmetic, eliminating the risk of silent precision loss. Never pass raw JavaScript numbers to amount fields. Always use `getBN()` or construct a `BN` directly from the smallest-unit integer value. ## `getBN` - human amount → BN [#getbn---human-amount--bn] ```ts import { getBN } from "@streamflow/common"; // 1 SOL (9 decimals) → BN(1_000_000_000) const oneSol = getBN(1, 9); // 50 USDC (6 decimals) → BN(50_000_000) const fiftyUsdc = getBN(50, 6); // 1.5 tokens (6 decimals) → BN(1_500_000) const onePointFive = getBN(1.5, 6); ``` ## `getNumberFromBN` - BN → human amount [#getnumberfrombn---bn--human-amount] ```ts import { getNumberFromBN } from "@streamflow/common"; import BN from "bn.js"; const bn = new BN(1_000_000_000); // → 1 (SOL with 9 decimals) const sol = getNumberFromBN(bn, 9); // → 1000 (USDC with 6 decimals) const usdc = getNumberFromBN(bn, 6); ``` ## Using BN directly [#using-bn-directly] When you already know the raw smallest-unit amount, construct `BN` directly: ```ts import BN from "bn.js"; // 2 raw units (e.g. for minimal lock amount) const minLockAmount = new BN(2); // 3601 raw units const rawAmount = new BN(3601); ``` ## Finding token decimals [#finding-token-decimals] Token decimals are stored in the mint account. Use `getAccount` or `getMint` from `@solana/spl-token`: ```ts import { getMint } from "@solana/spl-token"; import { Connection, PublicKey } from "@solana/web3.js"; const connection = new Connection("https://api.mainnet-beta.solana.com"); const mint = await getMint(connection, new PublicKey("TokenMintAddress...")); const decimals = mint.decimals; // e.g. 6 for USDC, 9 for SOL ``` # Fee System URL: /docs/getting-started/basics/fee-system Streamflow charges small protocol fees on stream operations. Fees are taken in the streamed token (or SOL for native SOL streams). Lock streams and vesting streams have separate fee tiers - the SDK classifies your stream automatically, so there's nothing extra to configure. Current fee rates are shown in the Streamflow app as a fee breakdown on the review step before confirming any transaction. ## Referral partner [#referral-partner] Each creation function accepts an optional `partner` field. When provided, the on-chain partner program applies the fee schedule negotiated for that address rather than the default rates. ```ts await createLock( { recipient, tokenId, amount, unlockDate, name: "Team Lock", partner: "PartnerPublicKeyHere", // optional }, invoker, env, ); ``` The `partner` field is available on `createVesting`, `createLockBatch`, and `createVestingBatch` as well. If you are building on top of Streamflow and would like a custom fee arrangement, feel free to reach out to the team. # prepare* / execute Pattern URL: /docs/getting-started/basics/prepare-execute-pattern Every write operation in every `@streamflow/*` client follows the same two-step pattern: 1. **`prepare*Instructions()`** - builds `TransactionInstruction[]` without touching the network 2. **`execute()`** - submits those instructions to the chain This is the core composability primitive across the entire SDK. It applies to `SolanaStreamClient`, `SolanaStakingClient`, `SolanaDistributorClient`, and `SolanaAlignedDistributorClient` equally. ## Why split prepare from execute? [#why-split-prepare-from-execute] Separating instruction building from execution lets you: * **Inspect** instructions before sending * **Combine** instructions from multiple protocol operations into one transaction * **Use a custom fee payer** - someone other than the signer * **Collect multi-sig** - gather signatures from multiple parties before submitting * **Test without broadcasting** - simulate with RPC without spending SOL ## Pattern across all clients [#pattern-across-all-clients] ### `@streamflow/stream` - SolanaStreamClient [#streamflowstream---solanastreamclient] `client.create()`, `client.withdraw()`, `client.cancel()` etc. sign and submit in one call: ```ts import { SolanaStreamClient, ICluster } from "@streamflow/stream"; import { buildVestingParams } from "@streamflow/stream/solana/api"; import { Keypair } from "@solana/web3.js"; import BN from "bn.js"; import fs from "node:fs"; const client = new SolanaStreamClient({ clusterUrl: "https://api.mainnet-beta.solana.com", cluster: ICluster.Mainnet, }); const invoker = Keypair.fromSecretKey( Uint8Array.from(JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8"))), ); // One call: builds, signs, submits const { txId, metadataId } = await client.create( buildVestingParams({ recipient: "RecipientWalletAddress...", tokenId: "TokenMintAddress...", amount: new BN(3_600_000_000), start: Math.floor(Date.now() / 1000) + 10, period: 86400, duration: 365 * 86400, name: "Employee Vesting", cancelableBySender: true, }), { sender: invoker, isNative: false }, ); console.log("Stream ID:", metadataId); // Lifecycle operations follow the same pattern (invoker = sender or recipient depending on operation) const { txId: withdrawTxId } = await client.withdraw({ id: metadataId }, { invoker }); const { txId: topupTxId } = await client.topup({ id: metadataId, amount: new BN(1_000_000) }, { invoker, isNative: false }); const { txId: cancelTxId } = await client.cancel({ id: metadataId }, { invoker }); console.log("Withdraw:", withdrawTxId); console.log("Topup:", topupTxId); console.log("Cancel:", cancelTxId); ``` `prepareCreateInstructions()` returns raw instructions. You control signing and submission: ```ts import { SolanaStreamClient, ICluster } from "@streamflow/stream"; import { buildVestingParams } from "@streamflow/stream/solana/api"; import { Keypair } from "@solana/web3.js"; import BN from "bn.js"; import fs from "node:fs"; const client = new SolanaStreamClient({ clusterUrl: "https://api.mainnet-beta.solana.com", cluster: ICluster.Mainnet, }); const invoker = Keypair.fromSecretKey( Uint8Array.from(JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8"))), ); // Step 1: prepare - returns instructions only, no network call // metadataPubKey is PublicKey - call .toBase58() to get the stream ID string const { ixs, metadata, metadataPubKey } = await client.prepareCreateInstructions( buildVestingParams({ recipient: "RecipientWalletAddress...", tokenId: "TokenMintAddress...", amount: new BN(3_600_000_000), start: Math.floor(Date.now() / 1000) + 10, period: 86400, duration: 365 * 86400, name: "Employee Vesting", }), { sender: { publicKey: invoker.publicKey }, // prepare* methods require { publicKey }, not Keypair isNative: false, }, ); // ixs: TransactionInstruction[] - inspect, compose, or add to another tx // metadata: Keypair | undefined - must co-sign if present (it's the stream's metadata account) // metadataPubKey: PublicKey - call .toBase58() to get the stream ID string const streamId = metadataPubKey.toBase58(); // Step 2: build, sign, and submit yourself const connection = client.getConnection(); const { blockhash } = await connection.getLatestBlockhash(); // ... build VersionedTransaction from ixs, sign with invoker + metadata, submit // Lifecycle operations have matching prepare*Instructions methods: // Note: prepare*Instructions use { publicKey } shape for invoker (not Keypair directly) const withdrawIxs = await client.prepareWithdrawInstructions( { id: streamId }, { invoker: { publicKey: invoker.publicKey } }, ); const cancelIxs = await client.prepareCancelInstructions( { id: streamId }, { invoker: { publicKey: invoker.publicKey } }, ); const topupIxs = await client.prepareTopupInstructions( { id: streamId, amount: new BN(1_000_000) }, { invoker, isNative: false }, // prepareTopupInstructions requires a full Keypair or WalletAdapter, not { publicKey } ); ``` Full `prepare*Instructions` pairs available on `SolanaStreamClient`: | Prepare method | Purpose | | ------------------------------- | ------------------------------- | | `prepareCreateInstructions()` | Create a vesting stream or lock | | `prepareWithdrawInstructions()` | Withdraw vested tokens | | `prepareCancelInstructions()` | Terminate a stream early | | `prepareTopupInstructions()` | Add tokens to extend a stream | | `prepareTransferInstructions()` | Change the stream recipient | | `prepareUpdateInstructions()` | Update release rate or flags | `prepareTopupInstructions` requires a full `Keypair` or `SignerWalletAdapter` as the `invoker` - not a bare `{ publicKey }` object. This is different from all other `prepare*Instructions` methods, which accept `{ publicKey }`. The stricter requirement exists because topup may need to wrap SOL. ### `@streamflow/staking` - SolanaStakingClient [#streamflowstaking---solanastakingclient] ```ts import { SolanaStakingClient } from "@streamflow/staking"; import { ICluster } from "@streamflow/common"; const client = new SolanaStakingClient({ clusterUrl: "https://api.mainnet-beta.solana.com", cluster: ICluster.Mainnet, }); // High-level: stake + create reward entries atomically const { txId } = await client.stakeAndCreateEntries(params, invoker); // Or: unstake and claim rewards in one operation const { txId } = await client.unstakeAndClaim(params, invoker); ``` Key write operations: | Method | Purpose | | ------------------------------------------------------- | ------------------------------------------------ | | `stake()` / `stakeAndCreateEntries()` | Stake tokens, optionally creating reward entries | | `unstake()` / `unstakeAndClaim()` / `unstakeAndClose()` | Exit a staking position | | `createRewardPool()` / `fundPool()` | Create or fund a reward pool | | `claimRewards()` | Claim accrued rewards | | `clawback()` | Recover undistributed funds from a reward pool | | `updateRewardPool()` | Modify reward pool parameters | ### `@streamflow/distributor` - SolanaDistributorClient [#streamflowdistributor---solanadistributorclient] ```ts import { StreamflowDistributorSolana } from "@streamflow/distributor"; import { ICluster } from "@streamflow/common"; const client = new StreamflowDistributorSolana.SolanaDistributorClient({ clusterUrl: "https://api.mainnet-beta.solana.com", // Solana RPC endpoint cluster: ICluster.Mainnet, apiUrl: "https://api-public.streamflow.finance", // Streamflow REST API }); // prepare only - get instructions without submitting const ixs = await client.prepareClaimInstructions(params, invoker); // Or convenience method: prepare + execute together const { txId } = await client.claim(params, invoker); ``` Key write operations: | Prepare | Convenience | Purpose | | --------------------------------- | -------------- | ----------------------------------------------- | | `prepareCreateInstructions()` | `create()` | Create a Merkle distributor | | `prepareClaimInstructions()` | `claim()` | Claim tokens (standard, aligned, or compressed) | | `prepareClawbackInstructions()` | `clawback()` | Recover unclaimed tokens after deadline | | `prepareCloseClaimInstructions()` | `closeClaim()` | Close a claim account and reclaim rent | `SolanaAlignedDistributorClient` extends the base client to support price-gated airdrop claims - unlock amounts per period are adjusted according to an on-chain oracle price rather than a fixed schedule. ## Composable API - 3-phase model (stream only) [#composable-api---3-phase-model-stream-only] `@streamflow/stream/solana/api` provides standalone functions that return instructions and make the 3-phase flow completely explicit. This is the recommended path when you need custom fee payers, wallet adapters, or fine-grained transaction control. ```ts import { createVesting, buildTransaction, sign, execute } from "@streamflow/stream/solana/api"; // Phase 1: get instructions const result = await createVesting(params, invoker, env); // Phase 2: build transaction (adds compute budget, fetches blockhash) const built = await buildTransaction(result.instructions, { feePayer: invoker.publicKey }, env); // Phase 3: sign + execute await sign(built.transaction, [invoker, ...(result.signers ?? [])]); const signature = await execute(built, env); ``` See [Composable APIs](/docs/composable-apis) for the full reference. # Stream Lifecycle URL: /docs/getting-started/basics/stream-lifecycle ## State transitions [#state-transitions] ``` Created → Active → [Withdraw / Topup / Transfer / Update] → Cancelled / Completed ``` Once created, a stream moves through its lifecycle based on time and the operations permitted by its creation-time flags. ## Vesting stream flags [#vesting-stream-flags] Vesting streams are configured with behavioral flags at creation. All default to `false` - opt in to what you need. | Flag | What it enables | Fixable after creation? | | ------------------------- | --------------------------------------------------- | ----------------------------- | | `canTopup` | Sender can add more tokens to extend the stream | Yes - must be set at creation | | `cancelableBySender` | Sender can cancel and reclaim unvested tokens | Can be toggled via `update()` | | `transferableBySender` | Sender can move the stream to a new recipient | Can be toggled via `update()` | | `transferableByRecipient` | Recipient can transfer their vesting position | Can be toggled via `update()` | | `automaticWithdrawal` | A keeper pushes tokens to the recipient each period | Yes - must be set at creation | `canTopup` and `automaticWithdrawal` must be decided at creation - they cannot be changed afterwards. The cancel and transfer flags can be toggled later via `update()`, but only if the stream was originally created with `canUpdateRate: true`. **For locks:** `buildLockParams()` hardcodes all flags to `false`. Topup, cancel, and transfer are not available on locks - only `withdraw` after `unlockDate`. ## Available operations [#available-operations] | Operation | Available when | | ---------- | ---------------------------------------------------------- | | `withdraw` | Always - any time tokens have vested | | `topup` | `canTopup: true` was set at creation (vesting only) | | `transfer` | `transferableBySender: true` at creation or via `update()` | | `cancel` | `cancelableBySender: true` at creation or via `update()` | ## Completion [#completion] A stream completes naturally when all tokens have been withdrawn. A stream can also be cancelled early (if `cancelableBySender: true`), which returns the unvested remainder to the sender. # Getting Started URL: /docs/getting-started This section walks you through everything needed to go from zero to your first on-chain stream. # Installation URL: /docs/getting-started/installation Install `@streamflow/stream` using your preferred package manager. ```bash npm install @streamflow/stream ``` ```bash pnpm add @streamflow/stream ``` ```bash yarn add @streamflow/stream ``` ```bash bun add @streamflow/stream ``` ## Browser Polyfills [#browser-polyfills] The SDK uses Node.js built-in modules (e.g., `node:crypto`). For browser runtimes, you may need polyfills: * **Vite** - [vite-plugin-node-polyfills](https://www.npmjs.com/package/vite-plugin-node-polyfills) * **Webpack** - [node-polyfill-webpack-plugin](https://www.npmjs.com/package/node-polyfill-webpack-plugin) * **Rsbuild** - [rsbuild-plugin-node-polyfill](https://github.com/rspack-contrib/rsbuild-plugin-node-polyfill) Transitive dependencies may import bare module names (e.g. `crypto`) or `node:`-prefixed names (e.g. `node:crypto`) - ensure the polyfill covers both forms. ## TypeScript configuration [#typescript-configuration] The SDK uses `NodeNext` module resolution internally. If you're using TypeScript, your `tsconfig.json` must use `"moduleResolution": "NodeNext"` (or `"bundler"` for Vite/Webpack projects) - `"node"` will fail to resolve subpath exports like `@streamflow/stream/solana/api`. ```json title="tsconfig.json" { "compilerOptions": { "moduleResolution": "NodeNext", "module": "NodeNext" } } ``` For bundler-based projects (Vite, Webpack, Rsbuild): ```json title="tsconfig.json" { "compilerOptions": { "module": "ESNext", "moduleResolution": "bundler" } } ``` # Quick Setup URL: /docs/getting-started/quick-setup The SDK exposes two distinct approaches. Pick one and stick with it - they interoperate but don't need to be mixed. | | Composable API | SolanaStreamClient | | ----------- | --------------------------------------------- | --------------------------------------------------------------- | | Import path | `@streamflow/stream/solana/api` | `@streamflow/stream` | | Returns | Instructions only - you build, sign, execute | Signs and submits in one call, or `prepare*()` for full control | | Best for | Custom fee payers, multi-sig, wallet adapters | Server-side scripts, backend services, direct integration | ## Install dependencies [#install-dependencies] ```bash pnpm add @streamflow/stream @solana/web3.js ``` ## Create a Solana Connection [#create-a-solana-connection] ```ts import { Connection } from "@solana/web3.js"; const connection = new Connection("https://api.devnet.solana.com", "confirmed"); ``` Pass any RPC endpoint. For production, use a private RPC provider. ## Build the `env` object [#build-the-env-object] Every composable API function takes an `env` object containing the program ID and either a `Connection` instance or an `rpcUrl` string. `programId` is always required. ```ts import { pk } from "@streamflow/common"; // With an existing Connection (recommended) const env = { connection, programId: pk("strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m"), // mainnet }; ``` Alternatively, provide just an RPC URL and a `Connection` is created internally: ```ts const env = { rpcUrl: "https://api.mainnet-beta.solana.com", programId: pk("strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m"), }; ``` See [Program IDs](/docs/resources/program-ids) for a full table of mainnet and devnet program addresses. ## Load a keypair or wallet [#load-a-keypair-or-wallet] ```ts import { Keypair } from "@solana/web3.js"; import fs from "node:fs"; // Backend: load from file const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); // Frontend: pass wallet adapter directly (SignerWalletAdapter) // import { useWallet } from "@solana/wallet-adapter-react"; // const { wallet } = useWallet(); // const invoker = wallet.adapter; ``` ## Complete example [#complete-example] ```ts title="setup.ts" import { Connection, Keypair } from "@solana/web3.js"; import { pk } from "@streamflow/common"; import fs from "node:fs"; const connection = new Connection("https://api.devnet.solana.com", "confirmed"); const env = { connection, programId: pk("HqDGZjaVRXJ9MGRQEw7qDc2rAr6iH1n1kAQdCZaCMfMZ"), // devnet }; const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); // Pass env and invoker to any composable API function: // createLock(params, invoker, { ...env, isNative: false }) // createVesting(params, invoker, { ...env, isNative: false }) ``` This example targets **devnet**. For mainnet, use a private RPC (Helius, QuickNode, Triton) and the mainnet program ID from [Program IDs](/docs/resources/program-ids). ## Install dependencies [#install-dependencies-1] ```bash pnpm add @streamflow/stream @solana/web3.js ``` ## Initialize the client [#initialize-the-client] ```ts import { SolanaStreamClient, ICluster } from "@streamflow/stream"; // Recommended: object options const client = new SolanaStreamClient({ clusterUrl: "https://api.devnet.solana.com", cluster: ICluster.Devnet, }); ``` Two alternative forms are also accepted: ```ts // Positional args (legacy style) const client = new SolanaStreamClient("https://api.devnet.solana.com", ICluster.Devnet); // Pass an existing Connection import { Connection } from "@solana/web3.js"; const connection = new Connection("https://api.devnet.solana.com", "confirmed"); const client = new SolanaStreamClient({ connection, cluster: ICluster.Devnet }); ``` `cluster` drives program address resolution. `clusterUrl` is the RPC endpoint. ## Load a keypair [#load-a-keypair] ```ts import { Keypair } from "@solana/web3.js"; import fs from "node:fs"; const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); ``` ## Complete example [#complete-example-1] ```ts title="setup.ts" import { SolanaStreamClient, ICluster } from "@streamflow/stream"; import { Keypair } from "@solana/web3.js"; import fs from "node:fs"; const client = new SolanaStreamClient({ clusterUrl: "https://api.devnet.solana.com", cluster: ICluster.Devnet, }); const secret = JSON.parse(fs.readFileSync(process.env.KEYPAIR_PATH!, "utf-8")); const invoker = Keypair.fromSecretKey(Uint8Array.from(secret)); // High-level: signs and submits in one call // const { txId, metadataId } = await client.create(params, { sender: invoker }); // Fine-grained: prepare instructions, sign and send yourself // const { ixs, metadata } = await client.prepareCreateInstructions(params, { sender: { publicKey: invoker.publicKey } }); ``` The client instance is reusable across all operations. Create it once and pass it around. For mainnet, replace `ICluster.Devnet` with `ICluster.Mainnet` and update `clusterUrl` to your private RPC endpoint. # Streamflow JS SDK URL: /docs The Streamflow JS SDK (`@streamflow/stream`) lets you create and manage on-chain token streams - vesting schedules, time locks, and streaming payments - on Solana. ## Where to start [#where-to-start] # Architecture URL: /docs/overview/architecture ## Packages [#packages] The Streamflow JS SDK is a pnpm monorepo that publishes 5 Solana protocol packages on npm. Each package targets a specific on-chain protocol. | Package | Role | | ------------------------- | ---------------------------------------------------------------------------------------- | | `@streamflow/common` | Foundation - shared types, BN utilities, Solana transaction pipeline, compute estimation | | `@streamflow/stream` | Core vesting and lock protocol - `SolanaStreamClient` + composable API | | `@streamflow/staking` | Staking pools and reward distribution - `SolanaStakingClient` | | `@streamflow/distributor` | Merkle airdrop protocol - `SolanaDistributorClient`, `SolanaAlignedDistributorClient` | | `@streamflow/launchpad` | Token launchpad with dynamic vesting - `SolanaLaunchpadClient` | ## Dependency graph [#dependency-graph] `@streamflow/common` is the foundation every other package builds on. `@streamflow/launchpad` is the only cross-protocol dependency - it depends on both `common` and `stream`. ``` @streamflow/common ├── @streamflow/stream │ └── @streamflow/launchpad ├── @streamflow/staking └── @streamflow/distributor ``` `@streamflow/common` is declared as a direct dependency of each package and is resolved automatically - no explicit installation required. ## Package details [#package-details] The foundation package. All other packages depend on it. Contains no protocol-specific logic. **Key exports:** | Export | Description | | -------------------------------------------------------------------------------- | --------------------------------------------------------------- | | `getBN(value, decimals)` / `getNumberFromBN(bn, decimals)` | Canonical BN/decimal conversion used across all packages | | `pk(key)` | Normalises `string \| PublicKey` → `PublicKey` | | `prepareTransaction`, `signAndExecuteTransaction`, `executeMultipleTransactions` | Full Solana transaction lifecycle helpers | | `createAndEstimateTransaction()` | Builds a transaction and estimates compute units via simulation | | `checkOrCreateAtaBatch()`, `ata()` | Associated token account helpers | | `buildSendThrottler()` | PQueue-based throttler for rate-limited RPC environments | | `ICluster`, `ContractError`, `ITransactionResult`, `ComputePriceEstimate` | Shared types used across all packages | **Subpath exports:** * `@streamflow/common` - main barrel (types, BN utilities, transaction helpers, ATA) * `@streamflow/common/rpc` - priority fee estimation and compute limit estimation The core protocol package - manages vesting schedules and token locks on-chain. The most feature-complete package in the SDK. `@streamflow/stream` exposes two interfaces via separate import paths: | Interface | Import path | Use case | | ---------------------------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------- | | Class-based (`SolanaStreamClient`) | `@streamflow/stream` | Full parameter control, price-triggered streams, `prepare*Instructions()` pairs | | Composable functions | `@streamflow/stream/solana/api` | Intent-specific wrappers with sensible defaults - `createLock`, `createVesting`, lifecycle operations | **`SolanaStreamClient` methods:** | Group | Methods | | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Create | `create()`, `createMultiple()`, `createUnchecked()` | | Lifecycle | `withdraw()`, `cancel()`, `topup()`, `transfer()`, `update()` | | Prepare (instruction-only) | `prepareCreateInstructions()`, `prepareWithdrawInstructions()`, `prepareCancelInstructions()`, `prepareTopupInstructions()`, `prepareTransferInstructions()`, `prepareUpdateInstructions()` | | Query | `getOne()`, `get()`, `searchStreams()` | | Fees | `getFees()`, `getDefaultFees()` | **Subpath exports:** * `@streamflow/stream` - `SolanaStreamClient` and all types * `@streamflow/stream/solana/api` - composable 3-phase functions (`createLock`, `createVesting`, `buildTransaction`, `sign`, `execute`, and lifecycle operations) Manages staking pools and reward distribution. Wraps 5 Anchor programs: `stakePool`, `rewardPool`, `rewardPoolDynamic`, `feeManager`, and `governor`. **Two reward pool variants:** | Variant | Program | Behaviour | | ----------- | -------------------------- | --------------------------------------------------------------------------------------------------- | | Fixed APR | `rewardPoolProgram` | Constant reward rate set at pool creation | | Dynamic APR | `rewardPoolDynamicProgram` | Rate adjusts based on pool participation; `createFundDelegate()` enables automated periodic top-ups | **`SolanaStakingClient` methods:** | Group | Methods | | ------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | Stake Pool | `createStakePool()`, `getStakePool()`, `searchStakePools()` | | Staking | `stake()`, `stakeAndCreateEntries()` | | Unstaking | `unstake()`, `unstakeAndClaim()`, `unstakeAndClose()`, `closeStakeEntry()` | | Reward Pool | `createRewardPool()`, `fundPool()`, `claimRewards()`, `clawback()`, `createRewardEntry()`, `closeRewardEntry()`, `updateRewardPool()` | | Fund Delegate | `createFundDelegate()` | | Query | `searchStakeEntries()`, `searchRewardPools()`, `searchRewardEntries()` | | Fees | `getFee()`, `getDefaultFeeValue()` | **Key library helpers:** * `deriveStakePoolPDA()`, `deriveStakeEntryPDA()`, `deriveRewardPoolPDA()` - PDA derivation * `RewardEntryAccumulator`, `calcRewards()`, `calculateRewardAmountFromRate()` - reward math * `getStakeWeightAmounts()`, `getFeeAmounts()` - fee and weight utilities Merkle tree-based token airdrop protocol. Two client classes sharing a common abstract base. **Two client variants:** | Client | Airdrop type | | -------------------------------- | ------------------------------------------------------------------------ | | `SolanaDistributorClient` | Standard - instant or vested token drops via Merkle proof | | `SolanaAlignedDistributorClient` | Aligned - price-based claim unlocks (oracle-adjusted amounts per period) | `@streamflow/distributor` uses a **namespace export** - the only package in the SDK that does this. Import as: ```ts import { StreamflowDistributorSolana } from "@streamflow/distributor"; const client = new StreamflowDistributorSolana.SolanaDistributorClient({ ... }); ``` **Methods (shared via `BaseDistributorClient`):** | Group | Methods | | -------- | -------------------------------------------------------------------------------------------------------- | | Create | `create()`, `prepareCreateInstructions()` | | Claim | `claim()`, `prepareClaimInstructions()` - 3 overloads: standard, aligned (with price update), compressed | | Clawback | `clawback()`, `prepareClawbackInstructions()` | | Close | `closeClaim()`, `prepareCloseClaimInstructions()` | | Query | `getClaim()`, `getClaims()`, `getDistributors()`, `searchDistributors()` | | Fees | `getFees()`, `getDefaultFees()`, `getFeeConfig()` | **Subpath exports:** * `@streamflow/distributor` - namespace export * `@streamflow/distributor/solana` - named exports of both clients Token launchpad with dynamic vesting curves. The only package with a cross-protocol dependency on `@streamflow/stream` - launchpad vesting reuses the stream protocol on-chain. Supports token IDO launches with configurable pricing curves, vesting caps, and release schedules - combining distributor-style claiming with stream-protocol vesting. ## API pattern [#api-pattern] Every write operation across all packages pairs a `prepare*Instructions()` method with an `execute()` call. See [prepare\* / execute Pattern](/docs/getting-started/basics/prepare-execute-pattern) for a full explanation. ## Runtime requirements [#runtime-requirements] * **Node.js >= 18** required across all packages. * **Peer dependencies** - `@solana/web3.js` and `bn.js` are declared as peer dependencies and must be installed alongside any `@streamflow/*` package. * **Browser** - requires polyfills for Node.js built-ins. See [Installation](/docs/getting-started/installation) for bundler-specific setup. # What is Streamflow? URL: /docs/overview/what-is-streamflow ## Overview [#overview] [Streamflow](https://streamflow.finance) is a DeFi protocol on Solana for managing token distribution. It provides on-chain, trustless infrastructure across several core primitives: | Product | Description | | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | **Token Locks** | Hold tokens in escrow until a specific date or price condition. Used for team allocations, liquidity locks, and investor cliffs. | | **Vesting Streams** | Release tokens gradually on a schedule with optional cliffs, auto-withdrawal, and upfront initial allocations. | | **Airdrops** | Merkle-based token distribution with optional vesting schedules. Supports standard, aligned (price-based), and compressed claim flows. | | **Staking** | Flexible staking pools with configurable reward pools, reward rates, and lock-up periods. | | **Escrow** | Peer-to-peer token trades with on-chain settlement - no intermediary. | This documentation covers `@streamflow/stream` - the package for **Token Locks** and **Vesting Streams**. Documentation for the other products is coming soon. ## Why use Streamflow? [#why-use-streamflow] **On-chain and trustless.** All stream state lives in Solana accounts - no custodian, no off-chain scheduler. The protocol enforces every constraint (unlock dates, vesting schedules, cancelability) at the program level. **Battle-tested.** Streamflow has secured and distributed hundreds of millions of dollars in tokens across the Solana ecosystem. Dozens of teams - from early-stage projects to established protocols - rely on Streamflow to manage their token vesting, locks, and distribution operations. **Audited.** Protocol programs are immutable on mainnet. See [Security Audits](/docs/resources/security-audits) for audit reports. ## Application [#application] The Streamflow app at [app.streamflow.finance](https://app.streamflow.finance) provides a UI for all protocol features. The JS SDK gives you programmatic access to the same on-chain programs. # Best Practices URL: /docs/resources/best-practices `pk()` from `@streamflow/common` normalizes any `string | PublicKey` to a `PublicKey`. Use it everywhere - never write custom conversion helpers. ```ts import { pk } from "@streamflow/common"; const programId = pk("strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m"); const mint = pk(tokenIdString); // safe even if already a PublicKey ``` **Why:** `PublicKey` construction throws on invalid strings. `pk()` is the canonical, tested wrapper used throughout every `@streamflow/*` package - roll-your-own alternatives diverge silently. Never scale token amounts manually. These utilities from `@streamflow/common` handle all decimal conversions correctly and are the only approved conversion path in the SDK. ```ts import { getBN, getNumberFromBN } from "@streamflow/common"; // ✓ correct const amount = getBN(50, 6); // 50 USDC → BN(50_000_000) const human = getNumberFromBN(bn, 9); // BN → human-readable SOL // ✗ avoid - manual scaling is fragile and error-prone const amount = new BN(50 * 1_000_000); ``` **Why:** Token decimals vary (6 for USDC, 9 for SOL, 0-18 for SPL tokens). Manual arithmetic breaks on large values due to JS number precision limits. Creation functions return a `CreateInstructionResult` with an optional `signers` array containing the metadata keypair (required by the V1 protocol). Always include it in `sign()`. ```ts // Non-batch createVesting / createLock const result = await createVesting(params, invoker, env); const built = await buildTransaction(result.instructions, { feePayer: invoker.publicKey }, env); await sign(built.transaction, [invoker, ...(result.signers ?? [])]); await execute(built, env); ``` The `?? []` guard also makes this pattern safe for lifecycle operations (withdraw, cancel, topup) that return `undefined` signers. When calling `createVesting` with an `initialAllocation`, the return type changes to `BatchInstructionResult` - which has a different shape: `setupInstructions` and `creationBatches[].signers`. The pattern above does not apply to that overload. **Why:** Omitting `result.signers` causes the transaction to fail at the RPC with a missing required signer error. The on-chain program classifies a stream as a **Lock** (not Vesting) when the cliff condition is met AND all lock flags are unset (`canTopup`, `cancelableBySender`, `automaticWithdrawal`, etc. are all `false`). The cliff condition is: ``` cliffAmount >= depositedAmount - 1 ``` If classification triggers, it silently changes the on-chain stream type and cannot be undone after creation. ```ts // ✗ dangerous - may reclassify as Lock on-chain createVesting({ amount: getBN(1000, 6), cliffAmount: getBN(999, 6), ... }); // ✓ safe - well below the threshold createVesting({ amount: getBN(1000, 6), cliffAmount: getBN(100, 6), ... }); ``` `depositedAmount` is the on-chain value after protocol fees are added, so it is slightly **higher** than your `amount`. Keep `cliffAmount` meaningfully below `amount` to stay safe. There is no client-side warning - verify cliff amounts before creating production streams. **Source:** `isCliffCloseToDepositedAmount` and `isTokenLock` in `packages/stream/solana/contractUtils.ts`. `transfer()` calls `prepareTransferInstructions` internally, which embeds a `ComputeBudgetProgram.setComputeUnitLimit` instruction (default: 100001). Passing `computeLimit` to `buildTransaction` would add a duplicate compute budget instruction and cause the transaction to fail. ```ts // ✓ correct - omit computeLimit for transfer const result = await transfer({ id: streamId, newRecipient: pk(recipient) }, invoker, env); const built = await buildTransaction(result.instructions, { feePayer: invoker.publicKey }, env); // ✗ wrong - duplicate compute budget instruction const built = await buildTransaction(result.instructions, { feePayer: invoker.publicKey, computeLimit: 200_000 }, env); ``` **Source:** JSDoc on `prepareTransferInstructions` in `packages/stream/solana/api/transfer.ts`. The composable wrappers enforce protocol constraints, compute `amountPerPeriod` via `computeAmountPerPeriod()`, apply correct lock flags, and validate inputs before sending any RPC request. ```ts // ✓ preferred - constraints and math handled for you import { createLock, createVesting } from "@streamflow/stream/solana/api"; // ✗ avoid - must manually set all fields correctly import { create } from "@streamflow/stream/solana/api"; ``` **Why:** `create()` is a low-level passthrough - passing wrong flag combinations (e.g., `canTopup: true` on a lock) or an incorrect `amountPerPeriod` produces broken on-chain state with no validation error. Use the `cause` option when wrapping errors. This preserves the original error object and full stack trace through the chain. ```ts // ✓ correct - original error and stack preserved throw new Error("Failed to create stream", { cause: originalError }); // ✗ avoid - loses original stack, often prints [object Object] throw new Error(`Failed to create stream: ${originalError}`); ``` When catching SDK errors, check for `ContractError` first. `ContractError` is defined in `@streamflow/common` and re-exported from `@streamflow/stream` for convenience. ```ts import { ContractError } from "@streamflow/common"; try { await execute(built, env); } catch (err) { if (err instanceof ContractError) { console.error("Error code:", err.contractErrorCode); // e.g. "Unauthorized" console.error("Description:", err.description); // human-readable string, if mapped console.error("Cause:", err.cause); // original Error with stack trace } else { throw new Error("Unexpected failure", { cause: err }); } } ``` # Changelog URL: /docs/resources/changelog All packages in the monorepo are versioned together - a single version applies to all `@streamflow/*` packages. Full history: [GitHub Releases](https://github.com/streamflow-finance/js-sdk/releases) · [npm](https://www.npmjs.com/package/@streamflow/stream?activeTab=versions) {/* RELEASES_START */} ## v12.1.0 — Latest May 5, 2026 [#v1210--latest-may-5-2026] * feat: update Contract state, add feePartner (that was used for fee derivation) and cancelRequestTime; * feat: expose requestCancel/withdrawCancelRequest instructions; ## v12.0.0 May 4, 2026 [#v1200-may-4-2026] * feat: bump distributor IDLs, expose feePartner; * feat: pass partnerLink in remaining accounts for custom fee derivation; * feat: export clawbackRequest by feePartner; * feat!: rename `admin` -> `authority` in clawback since the authority can differ from`admin`; the change does not break previous versions of the sdk since accounts are passed as vectors, it just changes how the account should be referred when calling with the anchor client; {/* RELEASES_END */} ## Earlier versions [#earlier-versions] See [GitHub Releases](https://github.com/streamflow-finance/js-sdk/releases) for the full history. # Error Codes URL: /docs/resources/error-codes When a Streamflow transaction fails on-chain, the SDK wraps the error in a `ContractError`. The `.contractErrorCode` property contains the SDK-defined string name mapped from the raw hex program error in the transaction log. These codes are defined in `@streamflow/stream` - `ContractErrorCode` for the core Vesting & Locks program and `AlignedProxyErrorCode` for price-based (Aligned) streams. ## Catching errors [#catching-errors] ```ts import { ContractError, ContractErrorCode } from "@streamflow/stream"; try { const result = await withdraw({ id: streamId }, invoker, env); } catch (err) { if (err instanceof ContractError) { console.error("Code:", err.contractErrorCode); // e.g. "Unauthorized" console.error("Description:", err.description); // human-readable description if available console.error("Message:", err.message); console.error("Cause:", err.cause); // original on-chain error } } ``` ## Error code reference [#error-code-reference] Errors from the core Vesting & Locks program. The SDK matches these by detecting `custom program error: 0xNN` in transaction logs and resolving via `SOLANA_ERROR_MAP`. | Hex | Decimal | `contractErrorCode` | When it happens | | ------ | ------- | ----------------------------- | ------------------------------------------------------------------------- | | `0x60` | 96 | `AccountsNotWritable` | One or more required accounts was not passed as writable | | `0x61` | 97 | `InvalidMetadata` | Stream parameters are invalid - check amounts, timestamps, and recipient | | `0x62` | 98 | `InvalidMetadataAccount` | The metadata account address doesn't match what the program expects | | `0x63` | 99 | `MetadataAccountMismatch` | Provided accounts don't match the ones stored in the contract | | `0x64` | 100 | `InvalidEscrowAccount` | The escrow token account address is invalid | | `0x65` | 101 | `NotAssociated` | Provided account is not a valid associated token account | | `0x66` | 102 | `MintMismatch` | Sender mint does not match the mint stored in the contract | | `0x67` | 103 | `TransferNotAllowed` | `transfer()` called on a contract where the recipient is not transferable | | `0x68` | 104 | `ContractClosed` | Operation attempted on a stream that has already been closed or cancelled | | `0x69` | 105 | `InvalidTreasury` | Invalid Streamflow treasury accounts supplied | | `0x70` | 112 | `InvalidTimestamps` | Start, cliff, or end timestamps are invalid or out of order | | `0x71` | 113 | `InvalidDepositConfiguration` | Lock or vesting configuration is invalid (e.g. cliff exceeds amount) | | `0x72` | 114 | `AmountIsZero` | Amount must be greater than zero | | `0x73` | 115 | `AmountMoreThanAvailable` | Requested withdrawal amount exceeds what has unlocked | | `0x74` | 116 | `AmountAvailableIsZero` | Nothing has vested yet - no tokens are available to withdraw | | `0x80` | 128 | `ArithmeticError` | Integer overflow or underflow in on-chain calculation | | `0x81` | 129 | `InvalidMetadataSize` | Metadata account data is not the expected 1104 bytes | | `0x82` | 130 | `UninitializedMetadata` | Metadata state account has not been initialized | | `0x83` | 131 | `Unauthorized` | Invoker doesn't have authority for this operation | | `0x84` | 132 | `SelfTransfer` | Attempting to transfer a contract back to its original recipient | | `0x85` | 133 | `AlreadyPaused` | Contract is already paused | | `0x86` | 134 | `NotPaused` | Contract is not paused - cannot unpause | | `0x87` | 135 | `MetadataNotRentExempt` | Metadata account does not have enough SOL to be rent-exempt | Errors from the Aligned Proxy program, which handles price-based vesting and locks. These fire when using `SolanaStreamClient` with oracle-driven streams. | Hex | Decimal | `contractErrorCode` | When it happens | | -------- | ------- | ----------------------------- | ----------------------------------------------------------- | | `0x1770` | 6000 | `Unauthorized` | Invoker doesn't have authority for this operation | | `0x1771` | 6001 | `ArithmeticError` | Integer overflow or underflow in calculation | | `0x1772` | 6002 | `UnsupportedTokenExtensions` | Token mint uses Token Extensions that are not supported | | `0x1773` | 6003 | `PeriodTooShort` | Period must be at least 30 seconds | | `0x1774` | 6004 | `InvalidTickSize` | Percentage tick size is invalid | | `0x1775` | 6005 | `InvalidPercentageBoundaries` | Percentage unlock boundaries are invalid | | `0x1776` | 6006 | `InvalidPriceBoundaries` | Price boundaries (min/max) are invalid | | `0x1777` | 6007 | `UnsupportedOracle` | The specified oracle type is not supported | | `0x1778` | 6008 | `InvalidOracleAccount` | Oracle account address is invalid | | `0x1779` | 6009 | `InvalidOraclePrice` | Oracle returned an invalid or stale price | | `0x177a` | 6010 | `InvalidStreamMetadata` | Stream metadata is invalid for this aligned proxy operation | | `0x177b` | 6011 | `AmountAlreadyUpdated` | Release amount has already been updated this period | | `0x177c` | 6012 | `AllFundsUnlocked` | All funds are already unlocked - nothing left to release | The SDK's `extractSolanaErrorCode` regex currently only parses 2-digit hex program errors (`0x60`-`0x99`). Aligned Proxy errors (`0x1770`+) in transaction logs will not be resolved to a named code automatically - check the raw transaction log for the hex code and map it using the table above. ## Source [#source] These codes are defined in `packages/stream/solana/types.ts` (`ContractErrorCode`, `AlignedProxyErrorCode`) and mapped in `packages/stream/solana/constants.ts` (`SOLANA_ERROR_MAP`). See the [SDK Reference](/docs/api/stream) for the full type documentation. # FAQ URL: /docs/resources/faq A **Lock** releases all tokens at once at a specific date (`unlockDate`). A **Vesting** stream releases tokens gradually over time, period by period. Technically both use the same on-chain account structure. The difference is in the params: locks set `cliffAmount = amount - 1` and `amountPerPeriod = 1`, so the entire balance is released at the cliff (which equals `start`). It depends on the flag: | Flag | Mutable after creation? | | ------------------------- | -------------------------- | | `cancelableBySender` | Yes - via `update()` | | `transferableBySender` | Yes - via `update()` | | `transferableByRecipient` | Yes - via `update()` | | `canTopup` | No - immutable at creation | | `automaticWithdrawal` | No - immutable at creation | `update()` also accepts `amountPerPeriod` (BN), `enableAutomaticWithdrawal` (boolean toggle), and `withdrawFrequency` (BN). Changing the rate or frequency requires `canUpdateRate: true` to have been set at creation time - this is enforced on-chain. The flag changes (`cancelableBySender`, `transferableBySender`, `transferableByRecipient`) are not gated by `canUpdateRate`. When you provide `initialAllocation: { amount: BN }`, the SDK atomically creates **two streams**: the main vesting stream and a separate lock-like stream that releases the allocation amount immediately at start. This lets you do "10% upfront, 90% vested over 12 months" in one flow. See [Guide: Create a Vesting Stream](/docs/core-concepts/vesting/guide-create-vesting). `isTokenLock()` runs a two-step check. First, if **any** of these flags are `true`, it immediately returns `false` (not a lock): * `canTopup` * `automaticWithdrawal` * `cancelableBySender` * `cancelableByRecipient` * `transferableBySender` Only if all five are `false` does it then check the cliff: if `cliffAmount >= depositedAmount - 1`, it classifies as a lock. So an accidental lock classification happens when you set a large cliff **and** all five flags are `false`. Keep `cliffAmount` well below `amount`, or set at least one of the flags to `true` if you intend a vesting stream. See [Stream Classification](/docs/core-concepts/streams). Lock params set `amountPerPeriod = BN(1)` (a dust release required by the protocol) and `cliffAmount = amount - 1`. If `amount <= 1`, the cliffAmount would be zero or negative, which is invalid. Use `SolanaStreamClient.getOne()`: ```ts import { SolanaStreamClient, ICluster } from "@streamflow/stream"; const client = new SolanaStreamClient({ clusterUrl: "https://api.mainnet-beta.solana.com", cluster: ICluster.Mainnet, }); const stream = await client.getOne({ id: streamPublicKey }); ``` `getOne` first tries the on-chain account. If the stream is closed or archived, it automatically falls back to the Tabularium API, so it works for both active and historical streams on mainnet. Use `SolanaStreamClient.get()`: ```ts import { SolanaStreamClient, ICluster, StreamType, StreamDirection } from "@streamflow/stream"; const client = new SolanaStreamClient({ clusterUrl: "https://api.mainnet-beta.solana.com", cluster: ICluster.Mainnet, }); const streams = await client.get({ address: walletPublicKey, type: StreamType.All, // or StreamType.Vesting / StreamType.Lock direction: StreamDirection.All, // or Incoming / Outgoing }); // returns [string, Stream][] - pairs of [streamId, streamData] ``` Use the **composable API** (`@streamflow/stream/solana/api`) when: * You need a custom fee payer (someone other than the signer pays gas) * You're using a wallet adapter in a browser app * You need multi-sig - collect signatures before submitting * You want to compose multiple protocol operations into one transaction Use **SolanaStreamClient** directly when: * You're building a backend service or script and want one-call simplicity * You need price-based locks or vesting (composable wrappers only support time-based) * You need `getOne()` / `get()` to query stream state * You need `getFees()` to fetch current fee rates Both approaches use the same on-chain program. `SolanaStreamClient.create()` and `createVesting()` produce identical on-chain results. Each stream has a metadata account on-chain whose public key becomes the stream ID. This account is initialized in one of two ways: * **Random keypair** - a fresh keypair is generated; its public key is the stream ID and the keypair must co-sign the creation transaction to initialize the account. * **Derived address (PDA)** - the address is computed deterministically from on-chain inputs; no keypair is required. `result.signers` contains the keypair when the random keypair path is used. The composable API (`createLock`, `createVesting`) always takes the keypair path, so you should always spread `result.signers` into the `sign()` call alongside your invoker. If the array is empty (derived address path), spreading it has no effect. Yes. The `Invoker` type accepts `Keypair | SignerWalletAdapter | { publicKey: PublicKey }`. Pass your wallet adapter's `adapter` object directly. The `sign()` function calls `adapter.signTransaction()` for you. For production (mainnet), use a private RPC provider such as Helius, QuickNode, or Triton. The public endpoint `api.mainnet-beta.solana.com` has strict rate limits that will cause failures under any real load. For devnet testing, `https://api.devnet.solana.com` is fine. It's `result.metadataPubKey.toBase58()` from the creation result. Save it - you need it for all lifecycle operations (`withdraw`, `topup`, `transfer`, `cancel`). For batch creations, each item in `result.creationBatches` has its own `metadataPubKey`. # Legal & Branding URL: /docs/resources/legal Streamflow's privacy policy covering data collection, usage, and your rights. [Open Privacy Policy](https://streamflow.notion.site/Privacy-policy-b06dd12759f342cda35db95889ee9fb1) Terms and conditions with important disclaimers for the Streamflow protocol and app. [Open Terms and Conditions](https://streamflow.notion.site/Terms-of-Use-Important-Disclaimers-2273f390766d49a1a32d04c0ae496943) Logos, color palette, typography, and usage guidelines for the Streamflow brand. [Open Brand Assets](https://streamflow.notion.site/Streamflow-brand-33d10001711f8074a93cfbdc344189ea) # Program IDs URL: /docs/resources/program-ids The core on-chain program for token locks, vesting schedules, and streaming payments. | Name | Program ID | | ---------------------- | ---------------------------------------------- | | Main Program (mainnet) | `strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m` | | Devnet | `HqDGZjaVRXJ9MGRQEw7qDc2rAr6iH1n1kAQdCZaCMfMZ` | [Program IDL on Solscan](https://solscan.io/account/strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m#anchorProgramIdl) **Community & Partner Programs** Separate deployments of the core Vesting & Locks program for specific partners or with different authority configurations. | Name | Program ID | | ------------------- | ---------------------------------------------- | | Immutable Program | `strmdbLr6w7QNmsiEXyFwWg3VSfg1GiELgU27P8aCGw` | | Genopets Program | `DKAxZuf1gggv26Hb7jfnvmUt2ztzmX96bZ1eoDJDsuuD` | | Community Program 1 | `3RDjfNqCyetQ7GcXKkMko1qh6BZiuDxrHeo69F9kdgPD` | | Community Program 2 | `8e72pYCDaxu3GqMfeQ5r8wFgoZSYk6oua1Qo9XpsZjX` | **Non-Linear Vesting** A proxy protocol that acts as the sender in the Vesting program. Enables vesting schedules where the unlock amount per period changes dynamically rather than being fixed at creation. | Name | Program ID | | --------------- | ---------------------------------------------- | | Current Program | `strn1sS2qKxs7SgJ1xx4trPKSWdqxFim6HFG9ETXiCL` | | Legacy Program | `9qWEUss4PnL8kTPrnG96BpMqWZTrRo38RsqKapuSsmJK` | **Price-Based Vesting Unlocks** A proxy protocol that acts as the sender in the Vesting program. Unlock amounts per period are adjusted according to token market performance rather than a fixed schedule. | Name | Program ID | | --------------------------- | --------------------------------------------- | | Price-Based Vesting Unlocks | `aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH` | **Tradable Contracts (Escrow)** A proxy protocol that acts as the recipient in the Vesting program. Allows recipients to list and sell their vesting contracts at a specified price denominated in any token. | Name | Program ID | | ------------------ | --------------------------------------------- | | Tradable Contracts | `strmTRD9k8gA3vCgADVR6rg4h9KyTY5fsjvbT8R3vnP` | Instant or vested token distribution to any number of recipients via Merkle proofs. The same program is deployed on mainnet and devnet. | Name | Program ID | | --------------- | --------------------------------------------- | | Airdrop Program | `MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N` | [Program IDL on Solscan](https://solscan.io/account/MErKy6nZVoVAkryxAejJz2juifQ4ArgLgHmaJCQkU7N#anchorProgramIdl) **Price-Based Airdrop Unlocks** A proxy protocol that acts as the sender in the Airdrop program. Enables airdrops with non-linear vesting where unlock amounts per period are driven by token market performance. | Name | Program ID | | --------------------------- | --------------------------------------------- | | Price-Based Airdrop Unlocks | `aMERKpFAWoChCi5oZwPvgsSCoGpZKBiU7fi76bdZjt2` | SPL token staking with fixed or dynamic APR reward pools and optional on-chain governance via stake-weighted voting. | Name | Program ID | | ------------------------- | ---------------------------------------------- | | Stake Pool | `STAKEvGqQTtzJZH6BWDcbpzXXn2BBerPAgQ3EGLN2GH` | | Reward Pool (Fixed APR) | `RWRDdfRbi3339VgKxTAXg4cjyniF7cbhNbMxZWiSKmj` | | Reward Pool (Dynamic APR) | `RWRDyfZa6Rk9UYi85yjYYfGmoUqffLqjo6vZdFawEez` | | Fee Manager | `FEELzfBhsWXTNJX53zZcDVfRNoFYZQ6cZA3jLiGVL16V` | | Governor | `GVERNASJFxi8vjjJtwCKYQTeN51XsV1y2B1ap1GtKrKR` | ## Usage in code [#usage-in-code] When using the composable API, pass the program ID in your `env` object: ```ts import { pk } from "@streamflow/common"; // Mainnet const env = { connection, programId: pk("strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m"), }; // Devnet const env = { connection, programId: pk("HqDGZjaVRXJ9MGRQEw7qDc2rAr6iH1n1kAQdCZaCMfMZ"), }; ``` `SolanaStreamClient` resolves the program ID from the `cluster` argument automatically - you only need to pass `programId` explicitly when using a non-standard program deployment. # Security & Audits URL: /docs/resources/security-audits ## Audits [#audits] The Streamflow protocol has undergone multiple independent security audits across its different services, conducted by various reputable security firms at different points in time. Full details of each engagement are available for review: [View audit reports](https://www.notion.so/streamflow/Streamflow-Security-Audits-3250070c0b3a4a0690385d96316d645c) ## Vulnerability disclosure [#vulnerability-disclosure] If you identify a security vulnerability in the Streamflow protocol or SDK, please contact the team directly and confidentially before any public disclosure. This ensures the issue can be properly assessed and remediated without unnecessary exposure.