tx-indexer 0.5.1 → 0.5.2
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/dist/{client-iLW2_DnL.d.ts → client-DdzTiKZ4.d.ts} +25 -9
- package/dist/client.d.ts +1 -1
- package/dist/client.js +448 -85
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +448 -85
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -32,11 +32,27 @@ declare function parseAddress(addr: string): Address;
|
|
|
32
32
|
*/
|
|
33
33
|
declare function parseSignature(sig: string): Signature;
|
|
34
34
|
|
|
35
|
+
interface RetryConfig {
|
|
36
|
+
maxAttempts?: number;
|
|
37
|
+
baseDelayMs?: number;
|
|
38
|
+
maxDelayMs?: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
35
41
|
interface FetchTransactionsConfig {
|
|
36
42
|
limit?: number;
|
|
37
43
|
before?: Signature;
|
|
38
44
|
until?: Signature;
|
|
39
45
|
}
|
|
46
|
+
interface FetchTransactionOptions {
|
|
47
|
+
commitment?: "confirmed" | "finalized";
|
|
48
|
+
retry?: RetryConfig;
|
|
49
|
+
}
|
|
50
|
+
interface FetchBatchOptions {
|
|
51
|
+
commitment?: "confirmed" | "finalized";
|
|
52
|
+
concurrency?: number;
|
|
53
|
+
retry?: RetryConfig;
|
|
54
|
+
onFetchError?: (signature: Signature, error: Error) => void;
|
|
55
|
+
}
|
|
40
56
|
/**
|
|
41
57
|
* Fetches transaction signatures for a wallet address.
|
|
42
58
|
*
|
|
@@ -51,19 +67,19 @@ declare function fetchWalletSignatures(rpc: Rpc<GetSignaturesForAddressApi>, wal
|
|
|
51
67
|
*
|
|
52
68
|
* @param rpc - Solana RPC client
|
|
53
69
|
* @param signature - Transaction signature
|
|
54
|
-
* @param
|
|
55
|
-
* @returns Full raw transaction with program IDs
|
|
70
|
+
* @param options - Fetch options including commitment level and retry config
|
|
71
|
+
* @returns Full raw transaction with program IDs, or null if not found
|
|
56
72
|
*/
|
|
57
|
-
declare function fetchTransaction(rpc: Rpc<GetTransactionApi>, signature: Signature,
|
|
73
|
+
declare function fetchTransaction(rpc: Rpc<GetTransactionApi>, signature: Signature, options?: FetchTransactionOptions): Promise<RawTransaction | null>;
|
|
58
74
|
/**
|
|
59
|
-
* Fetches multiple transactions
|
|
75
|
+
* Fetches multiple transactions with controlled concurrency.
|
|
60
76
|
*
|
|
61
77
|
* @param rpc - Solana RPC client
|
|
62
|
-
* @param signatures - Array of transaction signatures
|
|
63
|
-
* @param
|
|
64
|
-
* @returns Array of
|
|
78
|
+
* @param signatures - Array of transaction signatures to fetch
|
|
79
|
+
* @param options - Fetch options including commitment level, concurrency limit, and retry config
|
|
80
|
+
* @returns Array of successfully fetched transactions (nulls and errors filtered out)
|
|
65
81
|
*/
|
|
66
|
-
declare function fetchTransactionsBatch(rpc: Rpc<GetTransactionApi>, signatures: Signature[],
|
|
82
|
+
declare function fetchTransactionsBatch(rpc: Rpc<GetTransactionApi>, signatures: Signature[], options?: FetchBatchOptions): Promise<RawTransaction[]>;
|
|
67
83
|
|
|
68
84
|
/**
|
|
69
85
|
* Converts a raw Solana transaction into a double-entry accounting ledger.
|
|
@@ -215,4 +231,4 @@ interface TxIndexer {
|
|
|
215
231
|
}
|
|
216
232
|
declare function createIndexer(options: TxIndexerOptions): TxIndexer;
|
|
217
233
|
|
|
218
|
-
export { type ClassifiedTransaction as C, type FetchTransactionsConfig as F, type GetTransactionsOptions as G, type IndexerRpcApi as I, type NftMetadata as N, type SolanaClient as S, type TxIndexer as T, type WalletBalance as W, type TxIndexerOptions as a, type GetTransactionOptions as b, createIndexer as c, createSolanaClient as d, parseSignature as e, fetchWalletBalance as f, type TokenAccountBalance as g, fetchWalletSignatures as h, fetchTransaction as i, fetchTransactionsBatch as j,
|
|
234
|
+
export { type ClassifiedTransaction as C, type FetchTransactionsConfig as F, type GetTransactionsOptions as G, type IndexerRpcApi as I, type NftMetadata as N, type RetryConfig as R, type SolanaClient as S, type TxIndexer as T, type WalletBalance as W, type TxIndexerOptions as a, type GetTransactionOptions as b, createIndexer as c, createSolanaClient as d, parseSignature as e, fetchWalletBalance as f, type TokenAccountBalance as g, fetchWalletSignatures as h, fetchTransaction as i, fetchTransactionsBatch as j, type FetchBatchOptions as k, type FetchTransactionOptions as l, isSpamTransaction as m, filterSpamTransactions as n, type SpamFilterConfig as o, parseAddress as p, fetchNftMetadata as q, fetchNftMetadataBatch as r, transactionToLegs as t };
|
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@solana/kit';
|
|
2
|
-
export { C as ClassifiedTransaction, F as FetchTransactionsConfig, b as GetTransactionOptions, G as GetTransactionsOptions, T as TxIndexer, a as TxIndexerOptions, c as createIndexer } from './client-
|
|
2
|
+
export { C as ClassifiedTransaction, F as FetchTransactionsConfig, b as GetTransactionOptions, G as GetTransactionsOptions, T as TxIndexer, a as TxIndexerOptions, c as createIndexer } from './client-DdzTiKZ4.js';
|
|
3
3
|
import './classification.types-Cn9IGtEC.js';
|
|
4
4
|
import 'zod';
|