@lifi/sdk-provider-solana 4.0.3 → 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.
- package/CHANGELOG.md +7 -0
- package/dist/cjs/SolanaProvider.d.ts +0 -1
- package/dist/cjs/actions/getSolanaBalance.d.ts +0 -1
- package/dist/cjs/actions/sendAndConfirmBundle.d.ts +7 -8
- package/dist/cjs/actions/sendAndConfirmTransaction.d.ts +6 -7
- package/dist/cjs/core/SolanaStepExecutor.d.ts +0 -1
- package/dist/cjs/core/tasks/SolanaJitoWaitForTransactionTask.d.ts +0 -1
- package/dist/cjs/core/tasks/SolanaSignAndExecuteTask.d.ts +0 -1
- package/dist/cjs/core/tasks/SolanaStandardWaitForTransactionTask.d.ts +0 -1
- package/dist/cjs/core/tasks/SolanaWaitForTransactionTask.d.ts +0 -1
- package/dist/cjs/errors/parseSolanaErrors.d.ts +0 -1
- package/dist/cjs/rpc/jito/api/getBundleStatuses.d.ts +3 -4
- package/dist/cjs/rpc/jito/api/getTipAccounts.d.ts +4 -5
- package/dist/cjs/rpc/jito/api/sendBundle.d.ts +10 -11
- package/dist/cjs/rpc/jito/api/simulateBundle.d.ts +12 -8
- package/dist/cjs/rpc/jito/createJitoRpc.d.ts +0 -1
- package/dist/cjs/rpc/jito/types.d.ts +2 -2
- package/dist/cjs/rpc/registry.d.ts +8 -9
- package/dist/cjs/rpc/types.d.ts +0 -1
- package/dist/cjs/rpc/utils.d.ts +53 -54
- package/dist/cjs/types.d.ts +0 -1
- package/dist/cjs/utils/KeypairWalletAdapter.d.ts +6 -7
- package/dist/cjs/utils/getWalletFeature.d.ts +15 -16
- package/dist/cjs/utils/shouldUseJitoBundle.d.ts +0 -1
- package/dist/cjs/utils/solanaErrorCause.d.ts +4 -4
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/SolanaProvider.d.ts +0 -1
- package/dist/esm/SolanaProvider.d.ts.map +1 -1
- package/dist/esm/actions/getSNSAddress.d.ts.map +1 -1
- package/dist/esm/actions/getSolanaBalance.d.ts +0 -1
- package/dist/esm/actions/getSolanaBalance.d.ts.map +1 -1
- package/dist/esm/actions/resolveSolanaAddress.d.ts.map +1 -1
- package/dist/esm/actions/sendAndConfirmBundle.d.ts +7 -8
- package/dist/esm/actions/sendAndConfirmBundle.d.ts.map +1 -1
- package/dist/esm/actions/sendAndConfirmTransaction.d.ts +6 -7
- package/dist/esm/actions/sendAndConfirmTransaction.d.ts.map +1 -1
- package/dist/esm/core/SolanaStepExecutor.d.ts +0 -1
- package/dist/esm/core/SolanaStepExecutor.d.ts.map +1 -1
- package/dist/esm/core/tasks/SolanaJitoWaitForTransactionTask.d.ts +0 -1
- package/dist/esm/core/tasks/SolanaJitoWaitForTransactionTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/SolanaSignAndExecuteTask.d.ts +0 -1
- package/dist/esm/core/tasks/SolanaSignAndExecuteTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/SolanaStandardWaitForTransactionTask.d.ts +0 -1
- package/dist/esm/core/tasks/SolanaStandardWaitForTransactionTask.d.ts.map +1 -1
- package/dist/esm/core/tasks/SolanaWaitForTransactionTask.d.ts +0 -1
- package/dist/esm/core/tasks/SolanaWaitForTransactionTask.d.ts.map +1 -1
- package/dist/esm/errors/parseSolanaErrors.d.ts +0 -1
- package/dist/esm/errors/parseSolanaErrors.d.ts.map +1 -1
- package/dist/esm/rpc/jito/api/getBundleStatuses.d.ts +3 -4
- package/dist/esm/rpc/jito/api/getBundleStatuses.d.ts.map +1 -1
- package/dist/esm/rpc/jito/api/getTipAccounts.d.ts +4 -5
- package/dist/esm/rpc/jito/api/getTipAccounts.d.ts.map +1 -1
- package/dist/esm/rpc/jito/api/sendBundle.d.ts +10 -11
- package/dist/esm/rpc/jito/api/sendBundle.d.ts.map +1 -1
- package/dist/esm/rpc/jito/api/simulateBundle.d.ts +12 -8
- package/dist/esm/rpc/jito/api/simulateBundle.d.ts.map +1 -1
- package/dist/esm/rpc/jito/createJitoRpc.d.ts +0 -1
- package/dist/esm/rpc/jito/createJitoRpc.d.ts.map +1 -1
- package/dist/esm/rpc/jito/types.d.ts +2 -2
- package/dist/esm/rpc/jito/types.d.ts.map +1 -1
- package/dist/esm/rpc/registry.d.ts +8 -9
- package/dist/esm/rpc/registry.d.ts.map +1 -1
- package/dist/esm/rpc/types.d.ts +0 -1
- package/dist/esm/rpc/types.d.ts.map +1 -1
- package/dist/esm/rpc/utils.d.ts +53 -54
- package/dist/esm/rpc/utils.d.ts.map +1 -1
- package/dist/esm/types.d.ts +0 -1
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/esm/utils/KeypairWallet.unit.helpers.d.ts.map +1 -1
- package/dist/esm/utils/KeypairWalletAdapter.d.ts +6 -7
- package/dist/esm/utils/KeypairWalletAdapter.d.ts.map +1 -1
- package/dist/esm/utils/base64ToUint8Array.d.ts.map +1 -1
- package/dist/esm/utils/getWalletFeature.d.ts +15 -16
- package/dist/esm/utils/getWalletFeature.d.ts.map +1 -1
- package/dist/esm/utils/shouldUseJitoBundle.d.ts +0 -1
- package/dist/esm/utils/shouldUseJitoBundle.d.ts.map +1 -1
- package/dist/esm/utils/solanaErrorCause.d.ts +4 -4
- package/dist/esm/utils/solanaErrorCause.d.ts.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.d.ts.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/package.json +2 -2
- package/src/version.ts +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SDKClient } from "@lifi/sdk";
|
|
2
2
|
import { Commitment, Transaction, TransactionError as TransactionError$1 } 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendAndConfirmTransaction.d.ts","names":[],"sources":["../../../src/actions/sendAndConfirmTransaction.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"sendAndConfirmTransaction.d.ts","names":[],"sources":["../../../src/actions/sendAndConfirmTransaction.ts"],"mappings":";;;KAUK;EACH;EACA;EACA,KAAK;EACL,oBAAoB;EACpB,QAAQ;IAAW,KAAK;OAAsB;IAAW;;;KAGtD;EACH,iBAAiB;EACjB;;;;;;;;;iBAcoB,0BACpB,QAAQ,WACR,mBAAmB,cAClB,QAAQ"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolanaStepExecutor.d.ts","names":[],"sources":["../../../src/core/SolanaStepExecutor.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SolanaStepExecutor.d.ts","names":[],"sources":["../../../src/core/SolanaStepExecutor.ts"],"mappings":";;;;cAsBa,2BAA2B;UAC9B;UACA;EAER,YAAY,SAAS;EAMrB,mBAAoB,MAAM,qBAAmB;WAepC,cACP,OAAO,OACP,OAAO,kBACP,SAAS,oBACR,QAAQ;WAEF,gBACP,aAAa,4BACZ,QAAQ;WAaF,iBACP,SAAS,8BACR"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolanaJitoWaitForTransactionTask.d.ts","names":[],"sources":["../../../../src/core/tasks/SolanaJitoWaitForTransactionTask.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SolanaJitoWaitForTransactionTask.d.ts","names":[],"sources":["../../../../src/core/tasks/SolanaJitoWaitForTransactionTask.ts"],"mappings":";;;cAUa,yCAAyC;EACpD,IAAU,SAAS,4BAA4B,QAAQ"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolanaSignAndExecuteTask.d.ts","names":[],"sources":["../../../../src/core/tasks/SolanaSignAndExecuteTask.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SolanaSignAndExecuteTask.d.ts","names":[],"sources":["../../../../src/core/tasks/SolanaSignAndExecuteTask.ts"],"mappings":";;;cAca,iCAAiC;EAC5C,IAAU,SAAS,4BAA4B,QAAQ"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolanaStandardWaitForTransactionTask.d.ts","names":[],"sources":["../../../../src/core/tasks/SolanaStandardWaitForTransactionTask.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SolanaStandardWaitForTransactionTask.d.ts","names":[],"sources":["../../../../src/core/tasks/SolanaStandardWaitForTransactionTask.ts"],"mappings":";;;cAYa,6CAA6C;EACxD,IAAU,SAAS,4BAA4B,QAAQ"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolanaWaitForTransactionTask.d.ts","names":[],"sources":["../../../../src/core/tasks/SolanaWaitForTransactionTask.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SolanaWaitForTransactionTask.d.ts","names":[],"sources":["../../../../src/core/tasks/SolanaWaitForTransactionTask.ts"],"mappings":";;;cAMa,qCAAqC;EAChD,IAAU,SAAS,4BAA4B,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseSolanaErrors.d.ts","names":[],"sources":["../../../src/errors/parseSolanaErrors.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"parseSolanaErrors.d.ts","names":[],"sources":["../../../src/errors/parseSolanaErrors.ts"],"mappings":";;cAWa,oBACX,GAAG,OACH,OAAO,UACP,SAAS,oBACR,QAAQ"}
|
|
@@ -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
|
-
|
|
21
|
-
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBundleStatuses.d.ts","names":[],"sources":["../../../../../src/rpc/jito/api/getBundleStatuses.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getBundleStatuses.d.ts","names":[],"sources":["../../../../../src/rpc/jito/api/getBundleStatuses.ts"],"mappings":";;;KAIK;EACH;EACA,cAAc;EACd;EACA;EACA;;KAGG;EACH;IACE;;EAEF,OAAO;;KAGG;;;;;EAKV,kBAEE,qBAEA,SAAS,aACR"}
|
|
@@ -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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTipAccounts.d.ts","names":[],"sources":["../../../../../src/rpc/jito/api/getTipAccounts.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getTipAccounts.d.ts","names":[],"sources":["../../../../../src/rpc/jito/api/getTipAccounts.ts"],"mappings":";;;KAGK;KAEO;;;;;;EAMV,eAEE,SAAS,aACR"}
|
|
@@ -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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendBundle.d.ts","names":[],"sources":["../../../../../src/rpc/jito/api/sendBundle.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"sendBundle.d.ts","names":[],"sources":["../../../../../src/rpc/jito/api/sendBundle.ts"],"mappings":";;;;KAKK;KAEO;;;;;;;;;;;;EAYV,WAEE,cAAc,MAAM,+BAEpB,SAAS,aACR"}
|
|
@@ -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
|
-
|
|
43
|
-
|
|
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 */
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simulateBundle.d.ts","names":[],"sources":["../../../../../src/rpc/jito/api/simulateBundle.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"simulateBundle.d.ts","names":[],"sources":["../../../../../src/rpc/jito/api/simulateBundle.ts"],"mappings":";;KAEK;EACH;EACA;;KAGG;EACH;EACA;EACA;EACA;EACA;;KAGG;EACH;IACE;IACA;;EAEF;IACE;MAAyB;QAAU;QAAgB;;;IACnD,oBAAoB;MAClB;MACA;MACA;MACA;QACE;QACA;;MAEF,sBAAsB;MACtB,uBAAuB;;;;KAKjB;;;;;EAKV,eACE,QAAQ;IACN,qBAAqB,MAAM;MAE7B,SAAS;;IAEP;;IAEA;;IAEA;;IAEA,8BAA8B;;IAE9B,+BAA+B;OAEhC"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createJitoRpc.d.ts","names":[],"sources":["../../../../src/rpc/jito/createJitoRpc.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"createJitoRpc.d.ts","names":[],"sources":["../../../../src/rpc/jito/createJitoRpc.ts"],"mappings":";;;;;;KAeY,gBAAgB,uBAC1B,oBACA,gBACA;KAGU,aAAa,gBAAgB;iBAQzB,2BAA2B,mBAAmB,cAC5D,WAAW,aACV,IAAI;iBAQS,cAAc,oBAAoB,YAChD,YAAY,aACZ,SAAS,KACP,kBAAkB,0BAA0B,2BAG7C,IAAI"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/rpc/jito/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/rpc/jito/types.ts"],"mappings":";;;;KAGY"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","names":[],"sources":["../../../src/rpc/registry.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","names":[],"sources":["../../../src/rpc/registry.ts"],"mappings":";;;;;;cAWa,YAAmB,mBAAiB;;;;;cA0CpC,gBACX,QAAQ,cACP,QAAQ;;;;;cAWE,cACX,QAAQ,cACP,QAAQ"}
|
package/dist/esm/rpc/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/rpc/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/rpc/types.ts"],"mappings":";;;KAGY,gBAAgB,kBAAkB;KAClC,cAAc,IAAI"}
|
package/dist/esm/rpc/utils.d.ts
CHANGED
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","names":[],"sources":["../../../src/rpc/utils.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","names":[],"sources":["../../../src/rpc/utils.ts"],"mappings":";;;KAIK,QAAQ,QAAQ,GACnB,QAAQ,WACR,KAAK,KAAK,QAAQ,QAAQ,OACvB,QAAQ;;;;;;;;;;;;;;;;;;;;;iBAsBS,cAAc,GAAG,GACrC,MAAM,KACN,KAAK,KAAK,MAAM,QAAQ,KACvB,QAAQ;;;;;;;;;;;;;;;;;;;cA8CE,yBAAyB,QAAQ;;;;;;;;;;;;;;;;;;;cAqBjC,uBAAuB,QAAQ"}
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -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>;
|
package/dist/esm/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/types.ts"],"mappings":";;;;UASiB;EACf,kBAAkB,QAAQ;EAC1B;;UAGe;EACf,qBAAqB;;UAGN,kCACP,qBACN;EACF,QAAQ;EACR,eAAe;EACf;;UAGe,0BAA0B;EACzC,WAAW,SAAS;;iBAGN,iBACd,UAAU,cACT,YAAY;UAIE,kCAAkC;EACjD,QAAQ;EACR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeypairWallet.unit.helpers.d.ts","names":[],"sources":["../../../src/utils/KeypairWallet.unit.helpers.ts"],"mappings":";cAKa,
|
|
1
|
+
{"version":3,"file":"KeypairWallet.unit.helpers.d.ts","names":[],"sources":["../../../src/utils/KeypairWallet.unit.helpers.ts"],"mappings":";cAKa,2BAAgC;EAC3C;EACA,WAAW"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { SolanaSignTransactionFeature } from "@solana/wallet-standard-features";
|
|
2
2
|
import { Wallet, WalletAccount } from "@wallet-standard/base";
|
|
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
|
-
|
|
12
|
-
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeypairWalletAdapter.d.ts","names":[],"sources":["../../../src/utils/KeypairWalletAdapter.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"KeypairWalletAdapter.d.ts","names":[],"sources":["../../../src/utils/KeypairWalletAdapter.ts"],"mappings":";;;;;;;cAuBa,gCAAgC;;;;;UAKnC;UACA;mBACS;WAER;WACA;WACA;EAGT,YAAY;MAqBR;MAIA,qBAAqB;MAIrB,YAAY;EAUhB,WAAiB;EAejB,cAAoB;UAMN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base64ToUint8Array.d.ts","names":[],"sources":["../../../src/utils/base64ToUint8Array.ts"],"mappings":";iBAAgB,
|
|
1
|
+
{"version":3,"file":"base64ToUint8Array.d.ts","names":[],"sources":["../../../src/utils/base64ToUint8Array.ts"],"mappings":";iBAAgB,mBAAmB,uBAAuB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SolanaSignAndSendTransaction, SolanaSignAndSendTransactionFeature, SolanaSignIn, SolanaSignInFeature, SolanaSignMessage, SolanaSignMessageFeature, SolanaSignTransaction, SolanaSignTransactionFeature } from "@solana/wallet-standard-features";
|
|
2
2
|
import { Wallet } from "@wallet-standard/base";
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getWalletFeature.d.ts","names":[],"sources":["../../../src/utils/getWalletFeature.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getWalletFeature.d.ts","names":[],"sources":["../../../src/utils/getWalletFeature.ts"],"mappings":";;;KAaK;GACF,wBAAwB,oCAAoC;GAC5D,oBAAoB,gCAAgC;GACpD,+BAA+B,2CAA2C;GAC1E,eAAe,2BAA2B;;;;;;;;;;;;;;;;;;iBAmB7B,iBAAiB,gBAAgB,YAC/C,QAAQ,QACR,aAAa,IACZ,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shouldUseJitoBundle.d.ts","names":[],"sources":["../../../src/utils/shouldUseJitoBundle.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"shouldUseJitoBundle.d.ts","names":[],"sources":["../../../src/utils/shouldUseJitoBundle.ts"],"mappings":";;;cAGa,sBACX,cAAc,0BACd,cAAc"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solanaErrorCause.d.ts","names":[],"sources":["../../../src/utils/solanaErrorCause.ts"],"mappings":";cAAa,
|
|
1
|
+
{"version":3,"file":"solanaErrorCause.d.ts","names":[],"sources":["../../../src/utils/solanaErrorCause.ts"],"mappings":";cAAa,sBAAuB;;;;;;cAavB,sCAAsC;WACxC;WACA;EAET,YAAY,cAAc"}
|
package/dist/esm/version.d.ts
CHANGED