@lifi/sdk-provider-solana 4.0.2 → 4.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/SolanaProvider.d.ts +0 -1
  3. package/dist/cjs/actions/getSolanaBalance.d.ts +0 -1
  4. package/dist/cjs/actions/sendAndConfirmBundle.d.ts +7 -8
  5. package/dist/cjs/actions/sendAndConfirmTransaction.d.ts +6 -7
  6. package/dist/cjs/core/SolanaStepExecutor.d.ts +0 -1
  7. package/dist/cjs/core/tasks/SolanaJitoWaitForTransactionTask.d.ts +0 -1
  8. package/dist/cjs/core/tasks/SolanaSignAndExecuteTask.d.ts +0 -1
  9. package/dist/cjs/core/tasks/SolanaStandardWaitForTransactionTask.d.ts +0 -1
  10. package/dist/cjs/core/tasks/SolanaWaitForTransactionTask.d.ts +0 -1
  11. package/dist/cjs/errors/parseSolanaErrors.d.ts +0 -1
  12. package/dist/cjs/rpc/jito/api/getBundleStatuses.d.ts +3 -4
  13. package/dist/cjs/rpc/jito/api/getTipAccounts.d.ts +4 -5
  14. package/dist/cjs/rpc/jito/api/sendBundle.d.ts +10 -11
  15. package/dist/cjs/rpc/jito/api/simulateBundle.d.ts +12 -8
  16. package/dist/cjs/rpc/jito/createJitoRpc.d.ts +0 -1
  17. package/dist/cjs/rpc/jito/types.d.ts +2 -2
  18. package/dist/cjs/rpc/registry.d.ts +8 -9
  19. package/dist/cjs/rpc/types.d.ts +0 -1
  20. package/dist/cjs/rpc/utils.d.ts +53 -54
  21. package/dist/cjs/types.d.ts +0 -1
  22. package/dist/cjs/utils/KeypairWalletAdapter.d.ts +6 -7
  23. package/dist/cjs/utils/getWalletFeature.d.ts +15 -16
  24. package/dist/cjs/utils/shouldUseJitoBundle.d.ts +0 -1
  25. package/dist/cjs/utils/solanaErrorCause.d.ts +4 -4
  26. package/dist/cjs/version.d.ts +1 -1
  27. package/dist/cjs/version.js +1 -1
  28. package/dist/cjs/version.js.map +1 -1
  29. package/dist/esm/SolanaProvider.d.ts +0 -1
  30. package/dist/esm/SolanaProvider.d.ts.map +1 -1
  31. package/dist/esm/actions/getSNSAddress.d.ts.map +1 -1
  32. package/dist/esm/actions/getSolanaBalance.d.ts +0 -1
  33. package/dist/esm/actions/getSolanaBalance.d.ts.map +1 -1
  34. package/dist/esm/actions/resolveSolanaAddress.d.ts.map +1 -1
  35. package/dist/esm/actions/sendAndConfirmBundle.d.ts +7 -8
  36. package/dist/esm/actions/sendAndConfirmBundle.d.ts.map +1 -1
  37. package/dist/esm/actions/sendAndConfirmTransaction.d.ts +6 -7
  38. package/dist/esm/actions/sendAndConfirmTransaction.d.ts.map +1 -1
  39. package/dist/esm/core/SolanaStepExecutor.d.ts +0 -1
  40. package/dist/esm/core/SolanaStepExecutor.d.ts.map +1 -1
  41. package/dist/esm/core/tasks/SolanaJitoWaitForTransactionTask.d.ts +0 -1
  42. package/dist/esm/core/tasks/SolanaJitoWaitForTransactionTask.d.ts.map +1 -1
  43. package/dist/esm/core/tasks/SolanaSignAndExecuteTask.d.ts +0 -1
  44. package/dist/esm/core/tasks/SolanaSignAndExecuteTask.d.ts.map +1 -1
  45. package/dist/esm/core/tasks/SolanaStandardWaitForTransactionTask.d.ts +0 -1
  46. package/dist/esm/core/tasks/SolanaStandardWaitForTransactionTask.d.ts.map +1 -1
  47. package/dist/esm/core/tasks/SolanaWaitForTransactionTask.d.ts +0 -1
  48. package/dist/esm/core/tasks/SolanaWaitForTransactionTask.d.ts.map +1 -1
  49. package/dist/esm/errors/parseSolanaErrors.d.ts +0 -1
  50. package/dist/esm/errors/parseSolanaErrors.d.ts.map +1 -1
  51. package/dist/esm/rpc/jito/api/getBundleStatuses.d.ts +3 -4
  52. package/dist/esm/rpc/jito/api/getBundleStatuses.d.ts.map +1 -1
  53. package/dist/esm/rpc/jito/api/getTipAccounts.d.ts +4 -5
  54. package/dist/esm/rpc/jito/api/getTipAccounts.d.ts.map +1 -1
  55. package/dist/esm/rpc/jito/api/sendBundle.d.ts +10 -11
  56. package/dist/esm/rpc/jito/api/sendBundle.d.ts.map +1 -1
  57. package/dist/esm/rpc/jito/api/simulateBundle.d.ts +12 -8
  58. package/dist/esm/rpc/jito/api/simulateBundle.d.ts.map +1 -1
  59. package/dist/esm/rpc/jito/createJitoRpc.d.ts +0 -1
  60. package/dist/esm/rpc/jito/createJitoRpc.d.ts.map +1 -1
  61. package/dist/esm/rpc/jito/types.d.ts +2 -2
  62. package/dist/esm/rpc/jito/types.d.ts.map +1 -1
  63. package/dist/esm/rpc/registry.d.ts +8 -9
  64. package/dist/esm/rpc/registry.d.ts.map +1 -1
  65. package/dist/esm/rpc/types.d.ts +0 -1
  66. package/dist/esm/rpc/types.d.ts.map +1 -1
  67. package/dist/esm/rpc/utils.d.ts +53 -54
  68. package/dist/esm/rpc/utils.d.ts.map +1 -1
  69. package/dist/esm/types.d.ts +0 -1
  70. package/dist/esm/types.d.ts.map +1 -1
  71. package/dist/esm/utils/KeypairWallet.unit.helpers.d.ts.map +1 -1
  72. package/dist/esm/utils/KeypairWalletAdapter.d.ts +6 -7
  73. package/dist/esm/utils/KeypairWalletAdapter.d.ts.map +1 -1
  74. package/dist/esm/utils/base64ToUint8Array.d.ts.map +1 -1
  75. package/dist/esm/utils/getWalletFeature.d.ts +15 -16
  76. package/dist/esm/utils/getWalletFeature.d.ts.map +1 -1
  77. package/dist/esm/utils/shouldUseJitoBundle.d.ts +0 -1
  78. package/dist/esm/utils/shouldUseJitoBundle.d.ts.map +1 -1
  79. package/dist/esm/utils/solanaErrorCause.d.ts +4 -4
  80. package/dist/esm/utils/solanaErrorCause.d.ts.map +1 -1
  81. package/dist/esm/version.d.ts +1 -1
  82. package/dist/esm/version.d.ts.map +1 -1
  83. package/dist/esm/version.js +1 -1
  84. package/dist/esm/version.js.map +1 -1
  85. package/package.json +3 -3
  86. package/src/version.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @lifi/sdk-provider-solana
2
2
 
3
+ ## 4.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`0990a5d`](https://github.com/lifinance/sdk/commit/0990a5d2dcb148c113e41aeeab38eb1bcc5c684e)]:
8
+ - @lifi/sdk@4.2.0
9
+
10
+ ## 4.0.3
11
+
12
+ ### Patch Changes
13
+
14
+ - [#422](https://github.com/lifinance/sdk/pull/422) [`e7f2f97`](https://github.com/lifinance/sdk/commit/e7f2f975031cd43f3e39c03dd6bb16b661d4bf0b) Thanks [@chybisov](https://github.com/chybisov)! - Bump runtime dependencies: viem to 2.54.6 and @solana/kit to 7.0.0.
15
+
3
16
  ## 4.0.2
4
17
 
5
18
  ### Patch Changes
@@ -1,5 +1,4 @@
1
1
  import { SolanaProviderOptions, SolanaSDKProvider } from "./types.js";
2
-
3
2
  //#region src/SolanaProvider.d.ts
4
3
  declare function SolanaProvider(options?: SolanaProviderOptions): SolanaSDKProvider;
5
4
  //#endregion
@@ -1,5 +1,4 @@
1
1
  import { SDKClient, Token, TokenAmount } from "@lifi/sdk";
2
-
3
2
  //#region src/actions/getSolanaBalance.d.ts
4
3
  declare const getSolanaBalance: (client: SDKClient, walletAddress: string, tokens: Token[]) => Promise<TokenAmount[]>;
5
4
  //#endregion
@@ -1,6 +1,5 @@
1
1
  import { SDKClient } from "@lifi/sdk";
2
2
  import { Commitment, Signature, Transaction, TransactionError } from "@solana/kit";
3
-
4
3
  //#region src/actions/sendAndConfirmBundle.d.ts
5
4
  type SignatureStatus = {
6
5
  slot: bigint;
@@ -19,13 +18,13 @@ type BundleResult = {
19
18
  signatureResults: (SignatureStatus | null)[];
20
19
  };
21
20
  /**
22
- * Send and confirm a bundle of transactions using Jito.
23
- * Automatically selects a Jito-enabled RPC connection and polls for confirmation
24
- * across multiple Jito RPCs in parallel.
25
- * @param client - The SDK client.
26
- * @param signedTransactions - Array of signed transactions to bundle.
27
- * @returns BundleResult containing Bundle ID, transaction signatures, and confirmation results.
28
- */
21
+ * Send and confirm a bundle of transactions using Jito.
22
+ * Automatically selects a Jito-enabled RPC connection and polls for confirmation
23
+ * across multiple Jito RPCs in parallel.
24
+ * @param client - The SDK client.
25
+ * @param signedTransactions - Array of signed transactions to bundle.
26
+ * @returns BundleResult containing Bundle ID, transaction signatures, and confirmation results.
27
+ */
29
28
  declare function sendAndConfirmBundle(client: SDKClient, signedTransactions: Transaction[]): Promise<BundleResult>;
30
29
  //#endregion
31
30
  export { BundleResult, sendAndConfirmBundle };
@@ -1,6 +1,5 @@
1
1
  import { SDKClient } from "@lifi/sdk";
2
2
  import { Commitment, Transaction, TransactionError } from "@solana/kit";
3
-
4
3
  //#region src/actions/sendAndConfirmTransaction.d.ts
5
4
  type SignatureStatus = {
6
5
  slot: bigint;
@@ -18,12 +17,12 @@ type ConfirmedTransactionResult = {
18
17
  txSignature: string;
19
18
  };
20
19
  /**
21
- * Sends a Solana transaction to multiple RPC endpoints and returns the confirmation
22
- * as soon as any of them confirm the transaction.
23
- * @param client - The SDK client.
24
- * @param signedTransaction - The signed transaction to send.
25
- * @returns - The confirmation result of the transaction.
26
- */
20
+ * Sends a Solana transaction to multiple RPC endpoints and returns the confirmation
21
+ * as soon as any of them confirm the transaction.
22
+ * @param client - The SDK client.
23
+ * @param signedTransaction - The signed transaction to send.
24
+ * @returns - The confirmation result of the transaction.
25
+ */
27
26
  declare function sendAndConfirmTransaction(client: SDKClient, signedTransaction: Transaction): Promise<ConfirmedTransactionResult>;
28
27
  //#endregion
29
28
  export { sendAndConfirmTransaction };
@@ -1,7 +1,6 @@
1
1
  import { SolanaStepExecutorContext, SolanaStepExecutorOptions } from "../types.js";
2
2
  import { BaseStepExecutor, ExecutionAction, LiFiStepExtended, SDKError, StepExecutorBaseContext, TaskPipeline } from "@lifi/sdk";
3
3
  import { WalletAccount } from "@wallet-standard/base";
4
-
5
4
  //#region src/core/SolanaStepExecutor.d.ts
6
5
  declare class SolanaStepExecutor extends BaseStepExecutor {
7
6
  private wallet;
@@ -1,6 +1,5 @@
1
1
  import { SolanaStepExecutorContext } from "../../types.js";
2
2
  import { BaseStepExecutionTask, TaskResult } from "@lifi/sdk";
3
-
4
3
  //#region src/core/tasks/SolanaJitoWaitForTransactionTask.d.ts
5
4
  declare class SolanaJitoWaitForTransactionTask extends BaseStepExecutionTask {
6
5
  run(context: SolanaStepExecutorContext): Promise<TaskResult>;
@@ -1,6 +1,5 @@
1
1
  import { SolanaStepExecutorContext } from "../../types.js";
2
2
  import { BaseStepExecutionTask, TaskResult } from "@lifi/sdk";
3
-
4
3
  //#region src/core/tasks/SolanaSignAndExecuteTask.d.ts
5
4
  declare class SolanaSignAndExecuteTask extends BaseStepExecutionTask {
6
5
  run(context: SolanaStepExecutorContext): Promise<TaskResult>;
@@ -1,6 +1,5 @@
1
1
  import { SolanaStepExecutorContext } from "../../types.js";
2
2
  import { BaseStepExecutionTask, TaskResult } from "@lifi/sdk";
3
-
4
3
  //#region src/core/tasks/SolanaStandardWaitForTransactionTask.d.ts
5
4
  declare class SolanaStandardWaitForTransactionTask extends BaseStepExecutionTask {
6
5
  run(context: SolanaStepExecutorContext): Promise<TaskResult>;
@@ -1,6 +1,5 @@
1
1
  import { SolanaStepExecutorContext } from "../../types.js";
2
2
  import { BaseStepExecutionTask, TaskResult } from "@lifi/sdk";
3
-
4
3
  //#region src/core/tasks/SolanaWaitForTransactionTask.d.ts
5
4
  declare class SolanaWaitForTransactionTask extends BaseStepExecutionTask {
6
5
  run(context: SolanaStepExecutorContext): Promise<TaskResult>;
@@ -1,5 +1,4 @@
1
1
  import { ExecutionAction, LiFiStep, SDKError } from "@lifi/sdk";
2
-
3
2
  //#region src/errors/parseSolanaErrors.d.ts
4
3
  declare const parseSolanaErrors: (e: Error, step?: LiFiStep, action?: ExecutionAction) => Promise<SDKError>;
5
4
  //#endregion
@@ -1,6 +1,5 @@
1
1
  import { JitoRegion } from "../types.js";
2
2
  import { Signature } from "@solana/kit";
3
-
4
3
  //#region src/rpc/jito/api/getBundleStatuses.d.ts
5
4
  type BundleStatus = {
6
5
  bundle_id: string;
@@ -17,9 +16,9 @@ type GetBundleStatusesResponse = {
17
16
  };
18
17
  type GetBundleStatusesApi = {
19
18
  /**
20
- * Returns the status of submitted bundle(s).
21
- * @see https://www.quicknode.com/docs/solana/getBundleStatuses
22
- */
19
+ * Returns the status of submitted bundle(s).
20
+ * @see https://www.quicknode.com/docs/solana/getBundleStatuses
21
+ */
23
22
  getBundleStatuses(bundleIds: string[], region?: JitoRegion): GetBundleStatusesResponse;
24
23
  };
25
24
  //#endregion
@@ -1,14 +1,13 @@
1
1
  import { JitoRegion } from "../types.js";
2
-
3
2
  //#region src/rpc/jito/api/getTipAccounts.d.ts
4
3
  /** Array of tip account addresses (Solana public keys) */
5
4
  type GetTipAccountsResponse = string[];
6
5
  type GetTipAccountsApi = {
7
6
  /**
8
- * Fetches the tip accounts designated for tip payments for bundles.
9
- * Returns an array of 8 tip account addresses that can receive tips for transaction prioritization.
10
- * @see https://www.quicknode.com/docs/solana/getTipAccounts
11
- */
7
+ * Fetches the tip accounts designated for tip payments for bundles.
8
+ * Returns an array of 8 tip account addresses that can receive tips for transaction prioritization.
9
+ * @see https://www.quicknode.com/docs/solana/getTipAccounts
10
+ */
12
11
  getTipAccounts(region?: JitoRegion): GetTipAccountsResponse;
13
12
  };
14
13
  //#endregion
@@ -1,21 +1,20 @@
1
1
  import { JitoRegion } from "../types.js";
2
2
  import { Base64EncodedWireTransaction } from "@solana/kit";
3
-
4
3
  //#region src/rpc/jito/api/sendBundle.d.ts
5
4
  /** Bundle ID returned on successful submission */
6
5
  type SendBundleResponse = string;
7
6
  type SendBundleApi = {
8
7
  /**
9
- * Submits a bundle of signed transactions (base-64 encoded) to the cluster for atomic processing.
10
- * If any transaction fails, the entire bundle is rejected.
11
- * This method relays the bundle to the leader without modifications.
12
- * If the bundle expires after the next Jito-Solana leader, it returns a success response with a bundle_id,
13
- * indicating receipt but not guaranteeing processing or on-chain landing.
14
- * Check the bundle status with getBundleStatuses using the bundle_id.
15
- *
16
- * Note: A tip is required for the bundle to be considered. The tip must transfer SOL to one of the 8 tip accounts.
17
- * @see https://www.quicknode.com/docs/solana/sendBundle
18
- */
8
+ * Submits a bundle of signed transactions (base-64 encoded) to the cluster for atomic processing.
9
+ * If any transaction fails, the entire bundle is rejected.
10
+ * This method relays the bundle to the leader without modifications.
11
+ * If the bundle expires after the next Jito-Solana leader, it returns a success response with a bundle_id,
12
+ * indicating receipt but not guaranteeing processing or on-chain landing.
13
+ * Check the bundle status with getBundleStatuses using the bundle_id.
14
+ *
15
+ * Note: A tip is required for the bundle to be considered. The tip must transfer SOL to one of the 8 tip accounts.
16
+ * @see https://www.quicknode.com/docs/solana/sendBundle
17
+ */
19
18
  sendBundle(transactions: Array<Base64EncodedWireTransaction>, region?: JitoRegion): SendBundleResponse;
20
19
  };
21
20
  //#endregion
@@ -1,5 +1,4 @@
1
1
  import { Base64EncodedWireTransaction } from "@solana/kit";
2
-
3
2
  //#region src/rpc/jito/api/simulateBundle.d.ts
4
3
  type AccountConfig = {
5
4
  accountIndex: number;
@@ -39,16 +38,21 @@ type SimulateBundleResponse = {
39
38
  };
40
39
  type SimulateBundleApi = {
41
40
  /**
42
- * Simulates a Jito bundle - runs simulation on the bundle to check if it will succeed
43
- * @see https://www.quicknode.com/docs/solana/simulateBundle
44
- */
41
+ * Simulates a Jito bundle - runs simulation on the bundle to check if it will succeed
42
+ * @see https://www.quicknode.com/docs/solana/simulateBundle
43
+ */
45
44
  simulateBundle(params: Readonly<{
46
45
  encodedTransactions: Array<Base64EncodedWireTransaction>;
47
46
  }>, config?: Readonly<{
48
- /** Specifies the bank state for simulation */simulationBank?: string; /** Skips signature verification during simulation */
49
- skipSigVerify?: boolean; /** Replaces the recent blockhash in transactions */
50
- replaceRecentBlockhash?: boolean; /** Specifies accounts to inspect before execution */
51
- preExecutionAccountsConfigs?: AccountConfig[]; /** Specifies accounts to inspect after execution */
47
+ /** Specifies the bank state for simulation */
48
+ simulationBank?: string;
49
+ /** Skips signature verification during simulation */
50
+ skipSigVerify?: boolean;
51
+ /** Replaces the recent blockhash in transactions */
52
+ replaceRecentBlockhash?: boolean;
53
+ /** Specifies accounts to inspect before execution */
54
+ preExecutionAccountsConfigs?: AccountConfig[];
55
+ /** Specifies accounts to inspect after execution */
52
56
  postExecutionAccountsConfigs?: AccountConfig[];
53
57
  }>): SimulateBundleResponse;
54
58
  };
@@ -3,7 +3,6 @@ import { GetTipAccountsApi } from "./api/getTipAccounts.js";
3
3
  import { SendBundleApi } from "./api/sendBundle.js";
4
4
  import { SimulateBundleApi } from "./api/simulateBundle.js";
5
5
  import { ClusterUrl, Rpc, RpcTransport, SolanaRpcApi, createDefaultRpcTransport } from "@solana/kit";
6
-
7
6
  //#region src/rpc/jito/createJitoRpc.d.ts
8
7
  type JitoBundleApi = GetBundleStatusesApi & GetTipAccountsApi & SendBundleApi & SimulateBundleApi;
9
8
  type JitoRpcApi = JitoBundleApi & SolanaRpcApi;
@@ -1,7 +1,7 @@
1
1
  //#region src/rpc/jito/types.d.ts
2
2
  /**
3
- * Available Jito regions for routing requests.
4
- */
3
+ * Available Jito regions for routing requests.
4
+ */
5
5
  type JitoRegion = "mainnet" | "amsterdam" | "frankfurt" | "ny" | "tokyo" | "slc" | "london" | "singapore";
6
6
  //#endregion
7
7
  export { JitoRegion };
@@ -1,20 +1,19 @@
1
1
  import { JitoRpcType, SolanaRpcType } from "./types.js";
2
2
  import { SDKClient } from "@lifi/sdk";
3
-
4
3
  //#region src/rpc/registry.d.ts
5
4
  /**
6
- * Checks if an RPC URL supports Jito methods by calling getTipAccounts.
7
- */
5
+ * Checks if an RPC URL supports Jito methods by calling getTipAccounts.
6
+ */
8
7
  declare const isJitoRpc: (rpcUrl: string) => Promise<boolean>;
9
8
  /**
10
- * Wrapper around getting the Solana RPCs
11
- * @returns - Solana RPCs
12
- */
9
+ * Wrapper around getting the Solana RPCs
10
+ * @returns - Solana RPCs
11
+ */
13
12
  declare const getSolanaRpcs: (client: SDKClient) => Promise<SolanaRpcType[]>;
14
13
  /**
15
- * Wrapper around getting the Jito RPCs
16
- * @returns - Jito RPCs
17
- */
14
+ * Wrapper around getting the Jito RPCs
15
+ * @returns - Jito RPCs
16
+ */
18
17
  declare const getJitoRpcs: (client: SDKClient) => Promise<JitoRpcType[]>;
19
18
  //#endregion
20
19
  export { getJitoRpcs, getSolanaRpcs, isJitoRpc };
@@ -1,6 +1,5 @@
1
1
  import { JitoRpcApi } from "./jito/createJitoRpc.js";
2
2
  import { Rpc, createSolanaRpc } from "@solana/kit";
3
-
4
3
  //#region src/rpc/types.d.ts
5
4
  type SolanaRpcType = ReturnType<typeof createSolanaRpc>;
6
5
  type JitoRpcType = Rpc<JitoRpcApi>;
@@ -1,66 +1,65 @@
1
1
  import { JitoRpcType, SolanaRpcType } from "./types.js";
2
2
  import { SDKClient } from "@lifi/sdk";
3
-
4
3
  //#region src/rpc/utils.d.ts
5
4
  type RetryFn<Rpc> = <R>(client: SDKClient, fn: (rpc: Rpc) => Promise<R>) => Promise<R>;
6
5
  /**
7
- * Calls a function on RPC instances with retry logic.
8
- * Tries each RPC in sequence until one succeeds.
9
- *
10
- * @typeParam T - The type of the RPC instance.
11
- * @typeParam R - The return type of the function.
12
- * @param rpcs - An array of RPC instances to try.
13
- * @param fn - The async function to execute on each RPC until one succeeds.
14
- * @returns The result from the first successful RPC call.
15
- * @throws {Error} If no RPCs are available.
16
- * @throws {AggregateError} If all RPCs fail, containing all individual errors.
17
- *
18
- * @example
19
- * ```ts
20
- * const rpcs = await getSolanaRpcs(client)
21
- * const result = await callWithRetry(rpcs, (rpc) =>
22
- * rpc.getBalance(address).send()
23
- * )
24
- * ```
25
- */
6
+ * Calls a function on RPC instances with retry logic.
7
+ * Tries each RPC in sequence until one succeeds.
8
+ *
9
+ * @typeParam T - The type of the RPC instance.
10
+ * @typeParam R - The return type of the function.
11
+ * @param rpcs - An array of RPC instances to try.
12
+ * @param fn - The async function to execute on each RPC until one succeeds.
13
+ * @returns The result from the first successful RPC call.
14
+ * @throws {Error} If no RPCs are available.
15
+ * @throws {AggregateError} If all RPCs fail, containing all individual errors.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const rpcs = await getSolanaRpcs(client)
20
+ * const result = await callWithRetry(rpcs, (rpc) =>
21
+ * rpc.getBalance(address).send()
22
+ * )
23
+ * ```
24
+ */
26
25
  declare function callWithRetry<T, R>(rpcs: T[], fn: (rpc: T) => Promise<R>): Promise<R>;
27
26
  /**
28
- * Calls a function on Solana RPC instances with retry logic.
29
- * Automatically fetches available Solana RPCs and tries each in sequence.
30
- *
31
- * @typeParam R - The return type of the function.
32
- * @param client - The SDK client used to fetch RPC URLs.
33
- * @param fn - The async function to execute on each RPC until one succeeds.
34
- * @returns The result from the first successful RPC call.
35
- * @throws {Error} If no Solana RPCs are available.
36
- * @throws {AggregateError} If all RPCs fail.
37
- *
38
- * @example
39
- * ```ts
40
- * const balance = await callSolanaRpcsWithRetry(client, (rpc) =>
41
- * rpc.getBalance(address).send()
42
- * )
43
- * ```
44
- */
27
+ * Calls a function on Solana RPC instances with retry logic.
28
+ * Automatically fetches available Solana RPCs and tries each in sequence.
29
+ *
30
+ * @typeParam R - The return type of the function.
31
+ * @param client - The SDK client used to fetch RPC URLs.
32
+ * @param fn - The async function to execute on each RPC until one succeeds.
33
+ * @returns The result from the first successful RPC call.
34
+ * @throws {Error} If no Solana RPCs are available.
35
+ * @throws {AggregateError} If all RPCs fail.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const balance = await callSolanaRpcsWithRetry(client, (rpc) =>
40
+ * rpc.getBalance(address).send()
41
+ * )
42
+ * ```
43
+ */
45
44
  declare const callSolanaRpcsWithRetry: RetryFn<SolanaRpcType>;
46
45
  /**
47
- * Calls a function on Jito RPC instances with retry logic.
48
- * Automatically fetches available Jito RPCs and tries each in sequence.
49
- *
50
- * @typeParam R - The return type of the function.
51
- * @param client - The SDK client used to fetch RPC URLs.
52
- * @param fn - The async function to execute on each RPC until one succeeds.
53
- * @returns The result from the first successful RPC call.
54
- * @throws {Error} If no Jito RPCs are available.
55
- * @throws {AggregateError} If all RPCs fail.
56
- *
57
- * @example
58
- * ```ts
59
- * const tipAccounts = await callJitoRpcsWithRetry(client, (rpc) =>
60
- * rpc.getTipAccounts().send()
61
- * )
62
- * ```
63
- */
46
+ * Calls a function on Jito RPC instances with retry logic.
47
+ * Automatically fetches available Jito RPCs and tries each in sequence.
48
+ *
49
+ * @typeParam R - The return type of the function.
50
+ * @param client - The SDK client used to fetch RPC URLs.
51
+ * @param fn - The async function to execute on each RPC until one succeeds.
52
+ * @returns The result from the first successful RPC call.
53
+ * @throws {Error} If no Jito RPCs are available.
54
+ * @throws {AggregateError} If all RPCs fail.
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * const tipAccounts = await callJitoRpcsWithRetry(client, (rpc) =>
59
+ * rpc.getTipAccounts().send()
60
+ * )
61
+ * ```
62
+ */
64
63
  declare const callJitoRpcsWithRetry: RetryFn<JitoRpcType>;
65
64
  //#endregion
66
65
  export { callJitoRpcsWithRetry, callSolanaRpcsWithRetry, callWithRetry };
@@ -1,7 +1,6 @@
1
1
  import { SDKProvider, StepExecutorContext, StepExecutorOptions } from "@lifi/sdk";
2
2
  import { Transaction } from "@solana/kit";
3
3
  import { Wallet, WalletAccount } from "@wallet-standard/base";
4
-
5
4
  //#region src/types.d.ts
6
5
  interface SolanaProviderOptions {
7
6
  getWallet?: () => Promise<Wallet>;
@@ -1,16 +1,15 @@
1
1
  import { Wallet, WalletAccount } from "@wallet-standard/base";
2
2
  import { SolanaSignTransactionFeature } from "@solana/wallet-standard-features";
3
-
4
3
  //#region src/utils/KeypairWalletAdapter.d.ts
5
4
  /**
6
- * This keypair wallet adapter is unsafe to use on the frontend and is only included to provide an easy way for applications to test
7
- * Wallet Adapter without using a third-party wallet.
8
- */
5
+ * This keypair wallet adapter is unsafe to use on the frontend and is only included to provide an easy way for applications to test
6
+ * Wallet Adapter without using a third-party wallet.
7
+ */
9
8
  declare class KeypairWalletAdapter implements Wallet {
10
9
  /**
11
- * Storing a keypair locally like this is not safe because any application using this adapter could retrieve the
12
- * secret key, and because the keypair will be lost any time the wallet is disconnected or the window is refreshed.
13
- */
10
+ * Storing a keypair locally like this is not safe because any application using this adapter could retrieve the
11
+ * secret key, and because the keypair will be lost any time the wallet is disconnected or the window is refreshed.
12
+ */
14
13
  private _signer;
15
14
  private _account;
16
15
  private readonly _secretKeyBytes;
@@ -1,6 +1,5 @@
1
1
  import { Wallet } from "@wallet-standard/base";
2
2
  import { SolanaSignAndSendTransaction, SolanaSignAndSendTransactionFeature, SolanaSignIn, SolanaSignInFeature, SolanaSignMessage, SolanaSignMessageFeature, SolanaSignTransaction, SolanaSignTransactionFeature } from "@solana/wallet-standard-features";
3
-
4
3
  //#region src/utils/getWalletFeature.d.ts
5
4
  type FeatureMap = {
6
5
  [SolanaSignTransaction]: SolanaSignTransactionFeature[typeof SolanaSignTransaction];
@@ -9,21 +8,21 @@ type FeatureMap = {
9
8
  [SolanaSignIn]: SolanaSignInFeature[typeof SolanaSignIn];
10
9
  };
11
10
  /**
12
- * Helper function to safely extract a feature's properties from a wallet.
13
- *
14
- * This handles the TypeScript union type issue where wallet.features is typed as a union
15
- * but at runtime is actually a record containing multiple features.
16
- *
17
- * @param wallet - The wallet instance
18
- * @param featureName - The feature identifier constant
19
- * @returns The feature's properties object
20
- * @throws Error if the wallet doesn't support the requested feature
21
- *
22
- * @example
23
- * import { SolanaSignTransaction } from '@solana/wallet-standard-features'
24
- *
25
- * const { signTransaction } = getWalletFeature(wallet, SolanaSignTransaction)
26
- */
11
+ * Helper function to safely extract a feature's properties from a wallet.
12
+ *
13
+ * This handles the TypeScript union type issue where wallet.features is typed as a union
14
+ * but at runtime is actually a record containing multiple features.
15
+ *
16
+ * @param wallet - The wallet instance
17
+ * @param featureName - The feature identifier constant
18
+ * @returns The feature's properties object
19
+ * @throws Error if the wallet doesn't support the requested feature
20
+ *
21
+ * @example
22
+ * import { SolanaSignTransaction } from '@solana/wallet-standard-features'
23
+ *
24
+ * const { signTransaction } = getWalletFeature(wallet, SolanaSignTransaction)
25
+ */
27
26
  declare function getWalletFeature<K extends keyof FeatureMap>(wallet: Wallet, featureName: K): FeatureMap[K];
28
27
  //#endregion
29
28
  export { getWalletFeature };
@@ -1,6 +1,5 @@
1
1
  import { RouteOptions } from "@lifi/sdk";
2
2
  import { Transaction } from "@solana/kit";
3
-
4
3
  //#region src/utils/shouldUseJitoBundle.d.ts
5
4
  declare const shouldUseJitoBundle: (routeOptions: RouteOptions | undefined, transactions: Transaction[]) => boolean;
6
5
  //#endregion
@@ -1,10 +1,10 @@
1
1
  //#region src/utils/solanaErrorCause.d.ts
2
2
  declare const safeStringifyBigInt: (value: unknown) => string;
3
3
  /**
4
- * Carries the structured payload of a failed Solana RPC simulation or
5
- * confirmation so consumers can inspect `err` and `logs` directly from
6
- * the thrown `TransactionError`'s `cause`, without re-simulating.
7
- */
4
+ * Carries the structured payload of a failed Solana RPC simulation or
5
+ * confirmation so consumers can inspect `err` and `logs` directly from
6
+ * the thrown `TransactionError`'s `cause`, without re-simulating.
7
+ */
8
8
  declare class SolanaTransactionDetailsError extends Error {
9
9
  readonly err: unknown;
10
10
  readonly logs: readonly string[] | null;
@@ -1,6 +1,6 @@
1
1
  //#region src/version.d.ts
2
2
  declare const name = "@lifi/sdk-provider-solana";
3
- declare const version = "4.0.2";
3
+ declare const version = "4.0.4";
4
4
  //#endregion
5
5
  export { name, version };
6
6
  //# sourceMappingURL=version.d.ts.map
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region src/version.ts
3
3
  const name = "@lifi/sdk-provider-solana";
4
- const version = "4.0.2";
4
+ const version = "4.0.4";
5
5
  //#endregion
6
6
  exports.name = name;
7
7
  exports.version = version;
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","names":[],"sources":["../../src/version.ts"],"sourcesContent":["export const name = '@lifi/sdk-provider-solana'\nexport const version = '4.0.2'\n"],"mappings":";;AAAA,MAAa,OAAO;AACpB,MAAa,UAAU"}
1
+ {"version":3,"file":"version.js","names":[],"sources":["../../src/version.ts"],"sourcesContent":["export const name = '@lifi/sdk-provider-solana'\nexport const version = '4.0.4'\n"],"mappings":";;AAAA,MAAa,OAAO;AACpB,MAAa,UAAU"}
@@ -1,5 +1,4 @@
1
1
  import { SolanaProviderOptions, SolanaSDKProvider } from "./types.js";
2
-
3
2
  //#region src/SolanaProvider.d.ts
4
3
  declare function SolanaProvider(options?: SolanaProviderOptions): SolanaSDKProvider;
5
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"SolanaProvider.d.ts","names":[],"sources":["../../src/SolanaProvider.ts"],"mappings":";;;iBAYgB,cAAA,CACd,OAAA,GAAU,qBAAA,GACT,iBAAA"}
1
+ {"version":3,"file":"SolanaProvider.d.ts","names":[],"sources":["../../src/SolanaProvider.ts"],"mappings":";;iBAYgB,eACd,UAAU,wBACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"getSNSAddress.d.ts","names":[],"sources":["../../../src/actions/getSNSAddress.ts"],"mappings":";cASa,aAAA,GACX,IAAA,aACC,OAAA"}
1
+ {"version":3,"file":"getSNSAddress.d.ts","names":[],"sources":["../../../src/actions/getSNSAddress.ts"],"mappings":";cASa,gBACX,iBACC"}
@@ -1,5 +1,4 @@
1
1
  import { SDKClient, Token, TokenAmount } from "@lifi/sdk";
2
-
3
2
  //#region src/actions/getSolanaBalance.d.ts
4
3
  declare const getSolanaBalance: (client: SDKClient, walletAddress: string, tokens: Token[]) => Promise<TokenAmount[]>;
5
4
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"getSolanaBalance.d.ts","names":[],"sources":["../../../src/actions/getSolanaBalance.ts"],"mappings":";;;cAea,gBAAA,GACX,MAAA,EAAQ,SAAA,EACR,aAAA,UACA,MAAA,EAAQ,KAAA,OACP,OAAA,CAAQ,WAAA"}
1
+ {"version":3,"file":"getSolanaBalance.d.ts","names":[],"sources":["../../../src/actions/getSolanaBalance.ts"],"mappings":";;cAea,mBACX,QAAQ,WACR,uBACA,QAAQ,YACP,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolveSolanaAddress.d.ts","names":[],"sources":["../../../src/actions/resolveSolanaAddress.ts"],"mappings":";iBAEsB,oBAAA,CACpB,IAAA,WACC,OAAA"}
1
+ {"version":3,"file":"resolveSolanaAddress.d.ts","names":[],"sources":["../../../src/actions/resolveSolanaAddress.ts"],"mappings":";iBAEsB,qBACpB,eACC"}
@@ -1,6 +1,5 @@
1
1
  import { SDKClient } from "@lifi/sdk";
2
2
  import { Commitment, Signature, Transaction, TransactionError as TransactionError$1 } from "@solana/kit";
3
-
4
3
  //#region src/actions/sendAndConfirmBundle.d.ts
5
4
  type SignatureStatus = {
6
5
  slot: bigint;
@@ -19,13 +18,13 @@ type BundleResult = {
19
18
  signatureResults: (SignatureStatus | null)[];
20
19
  };
21
20
  /**
22
- * Send and confirm a bundle of transactions using Jito.
23
- * Automatically selects a Jito-enabled RPC connection and polls for confirmation
24
- * across multiple Jito RPCs in parallel.
25
- * @param client - The SDK client.
26
- * @param signedTransactions - Array of signed transactions to bundle.
27
- * @returns BundleResult containing Bundle ID, transaction signatures, and confirmation results.
28
- */
21
+ * Send and confirm a bundle of transactions using Jito.
22
+ * Automatically selects a Jito-enabled RPC connection and polls for confirmation
23
+ * across multiple Jito RPCs in parallel.
24
+ * @param client - The SDK client.
25
+ * @param signedTransactions - Array of signed transactions to bundle.
26
+ * @returns BundleResult containing Bundle ID, transaction signatures, and confirmation results.
27
+ */
29
28
  declare function sendAndConfirmBundle(client: SDKClient, signedTransactions: Transaction[]): Promise<BundleResult>;
30
29
  //#endregion
31
30
  export { BundleResult, sendAndConfirmBundle };
@@ -1 +1 @@
1
- {"version":3,"file":"sendAndConfirmBundle.d.ts","names":[],"sources":["../../../src/actions/sendAndConfirmBundle.ts"],"mappings":";;;;KAWK,eAAA;EACH,IAAA;EACA,aAAA;EACA,GAAA,EAAK,kBAAA;EACL,kBAAA,EAAoB,UAAA;EACpB,MAAA,EAAQ,QAAA;IAAW,GAAA,EAAK,kBAAA;EAAA,KAAsB,QAAA;IAAW,EAAA;EAAA;AAAA;AAAA,KAG/C,YAAA;EACV,QAAA;EACA,YAAA,EAAc,SAAA;EACd,gBAAA,GAAmB,eAAA;AAAA;;;;;;;;;iBAaC,oBAAA,CACpB,MAAA,EAAQ,SAAA,EACR,kBAAA,EAAoB,WAAA,KACnB,OAAA,CAAQ,YAAA"}
1
+ {"version":3,"file":"sendAndConfirmBundle.d.ts","names":[],"sources":["../../../src/actions/sendAndConfirmBundle.ts"],"mappings":";;;KAWK;EACH;EACA;EACA,KAAK;EACL,oBAAoB;EACpB,QAAQ;IAAW,KAAK;OAAsB;IAAW;;;KAG/C;EACV;EACA,cAAc;EACd,mBAAmB;;;;;;;;;;iBAaC,qBACpB,QAAQ,WACR,oBAAoB,gBACnB,QAAQ"}