surfman-sdk 0.1.0

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.
@@ -0,0 +1,345 @@
1
+ interface JsonRpcRequest<T = any> {
2
+ jsonrpc: '2.0';
3
+ id: number | string;
4
+ method: string;
5
+ params: T;
6
+ }
7
+ interface JsonRpcResponse<T = any> {
8
+ jsonrpc: '2.0';
9
+ id: number | string;
10
+ result?: T;
11
+ error?: JsonRpcError;
12
+ }
13
+ interface JsonRpcError {
14
+ code: number;
15
+ message: string;
16
+ data?: any;
17
+ }
18
+ interface RpcClientConfig {
19
+ url: string;
20
+ timeout?: number;
21
+ headers?: Record<string, string>;
22
+ }
23
+
24
+ interface TimeTravelConfig {
25
+ absoluteEpoch?: number;
26
+ absoluteSlot?: number;
27
+ absoluteTimestamp?: number;
28
+ }
29
+ interface TimeTravelResult {
30
+ absoluteSlot: number;
31
+ blockHeight: number | null;
32
+ epoch: number;
33
+ slotIndex: number;
34
+ slotsInEpoch: number;
35
+ transactionCount: number | null;
36
+ }
37
+ interface SetAccountUpdate {
38
+ data?: string;
39
+ executable?: boolean;
40
+ lamports?: number;
41
+ owner?: string;
42
+ rentEpoch?: number;
43
+ }
44
+ interface SetProgramAuthorityParams {
45
+ programId: string;
46
+ newAuthority: string | null;
47
+ }
48
+ interface TokenAccountUpdate {
49
+ amount?: number;
50
+ delegate?: SetSomeAccount;
51
+ state?: string;
52
+ delegatedAmount?: number;
53
+ closeAuthority?: SetSomeAccount;
54
+ }
55
+ interface SetSomeAccount {
56
+ Account?: string;
57
+ NoAccount?: boolean;
58
+ }
59
+ interface ResetAccountConfig {
60
+ includeOwnedAccounts?: boolean;
61
+ }
62
+ interface RpcLogsResponse {
63
+ signature: string;
64
+ err: any | null;
65
+ slot: number;
66
+ logs?: string[];
67
+ }
68
+
69
+ interface BlockhashResult {
70
+ blockhash: string;
71
+ lastValidBlockHeight: number;
72
+ }
73
+ interface BlockConfig {
74
+ encoding?: 'json' | 'jsonParsed' | 'base58' | 'base64';
75
+ transactionDetails?: 'full' | 'signatures' | 'none';
76
+ rewards?: boolean;
77
+ commitment?: string;
78
+ maxSupportedTransactionVersion?: number;
79
+ }
80
+ interface Block {
81
+ blockhash: string;
82
+ previousBlockhash: string;
83
+ parentSlot: number;
84
+ transactions?: any[];
85
+ signatures?: string[];
86
+ rewards?: any[];
87
+ blockTime?: number | null;
88
+ blockHeight?: number | null;
89
+ }
90
+ interface TransactionConfig {
91
+ encoding?: 'json' | 'jsonParsed' | 'base58' | 'base64';
92
+ commitment?: string;
93
+ maxSupportedTransactionVersion?: number;
94
+ }
95
+ interface TransactionResult {
96
+ slot: number;
97
+ transaction: any;
98
+ blockTime?: number | null;
99
+ meta?: any;
100
+ }
101
+ interface SignatureStatus {
102
+ slot: number;
103
+ confirmations: number | null;
104
+ err: any | null;
105
+ confirmationStatus?: 'processed' | 'confirmed' | 'finalized';
106
+ }
107
+ interface PerformanceSample {
108
+ slot: number;
109
+ numTransactions: number;
110
+ numSlots: number;
111
+ samplePeriodSecs: number;
112
+ numNonVoteTransactions?: number;
113
+ }
114
+ interface ClusterNode {
115
+ pubkey: string;
116
+ gossip?: string | null;
117
+ tpu?: string | null;
118
+ rpc?: string | null;
119
+ version?: string | null;
120
+ featureSet?: number | null;
121
+ shredVersion?: number | null;
122
+ }
123
+ interface SendTransactionConfig {
124
+ skipPreflight?: boolean;
125
+ preflightCommitment?: string;
126
+ encoding?: 'base58' | 'base64';
127
+ maxRetries?: number;
128
+ minContextSlot?: number;
129
+ }
130
+ interface SimulateTransactionConfig {
131
+ commitment?: string;
132
+ sigVerify?: boolean;
133
+ replaceRecentBlockhash?: boolean;
134
+ minContextSlot?: number;
135
+ encoding?: 'base58' | 'base64';
136
+ accounts?: {
137
+ encoding: string;
138
+ addresses: string[];
139
+ };
140
+ }
141
+ interface SimulateTransactionResult {
142
+ err: any | null;
143
+ logs: string[] | null;
144
+ accounts?: any[] | null;
145
+ unitsConsumed?: number;
146
+ returnData?: any | null;
147
+ }
148
+ interface AccountInfo {
149
+ lamports: number;
150
+ owner: string;
151
+ data: any;
152
+ executable: boolean;
153
+ rentEpoch: number;
154
+ space?: number;
155
+ }
156
+ interface AccountInfoConfig {
157
+ encoding?: 'base58' | 'base64' | 'base64+zstd' | 'jsonParsed';
158
+ dataSlice?: {
159
+ offset: number;
160
+ length: number;
161
+ };
162
+ commitment?: string;
163
+ minContextSlot?: number;
164
+ }
165
+ interface BlockCommitment {
166
+ commitment: number[] | null;
167
+ totalStake: number;
168
+ }
169
+ interface TokenAmount {
170
+ amount: string;
171
+ decimals: number;
172
+ uiAmount: number | null;
173
+ uiAmountString: string;
174
+ }
175
+ interface ProgramAccountsConfig {
176
+ filters?: Array<{
177
+ dataSize: number;
178
+ } | {
179
+ memcmp: {
180
+ offset: number;
181
+ bytes: string;
182
+ };
183
+ }>;
184
+ encoding?: 'base58' | 'base64' | 'base64+zstd' | 'jsonParsed';
185
+ withContext?: boolean;
186
+ commitment?: string;
187
+ minContextSlot?: number;
188
+ }
189
+ interface KeyedAccount {
190
+ pubkey: string;
191
+ account: AccountInfo;
192
+ }
193
+ interface AccountBalance {
194
+ address: string;
195
+ lamports: number;
196
+ }
197
+ interface SupplyConfig {
198
+ commitment?: string;
199
+ excludeNonCirculatingAccountsList?: boolean;
200
+ }
201
+ interface Supply {
202
+ total: number;
203
+ circulating: number;
204
+ nonCirculating: number;
205
+ nonCirculatingAccounts: string[];
206
+ }
207
+ interface TokenAccountBalance {
208
+ address: string;
209
+ amount: string;
210
+ decimals: number;
211
+ uiAmount: number | null;
212
+ uiAmountString: string;
213
+ }
214
+ type TokenAccountsFilter = {
215
+ mint: string;
216
+ } | {
217
+ programId: string;
218
+ };
219
+
220
+ declare class SurfmanClient {
221
+ private url;
222
+ private timeout;
223
+ private headers;
224
+ private requestId;
225
+ constructor(config: string | RpcClientConfig);
226
+ request<TParams = any, TResult = any>(method: string, params: TParams): Promise<TResult>;
227
+ setUrl(url: string): void;
228
+ getUrl(): string;
229
+ }
230
+
231
+ declare class CheatcodesModule {
232
+ private client;
233
+ constructor(client: SurfmanClient);
234
+ timeTravel(config: TimeTravelConfig): Promise<TimeTravelResult>;
235
+ setAccount(pubkey: string, update: SetAccountUpdate): Promise<void>;
236
+ setProgramAuthority(programId: string, newAuthority: string | null): Promise<void>;
237
+ pauseClock(): Promise<TimeTravelResult>;
238
+ resumeClock(): Promise<TimeTravelResult>;
239
+ getLocalSignatures(limit?: number): Promise<RpcLogsResponse[]>;
240
+ setTokenAccount(owner: string, mint: string, update: TokenAccountUpdate, tokenProgram?: string): Promise<void>;
241
+ resetAccount(pubkey: string, config?: ResetAccountConfig): Promise<void>;
242
+ resetNetwork(): Promise<void>;
243
+ }
244
+
245
+ interface SignatureForAddress {
246
+ signature: string;
247
+ slot: number;
248
+ err: any | null;
249
+ memo: string | null;
250
+ blockTime?: number | null;
251
+ }
252
+ interface SignaturesForAddressConfig {
253
+ limit?: number;
254
+ before?: string;
255
+ until?: string;
256
+ commitment?: string;
257
+ }
258
+
259
+ interface PrioritizationFee {
260
+ slot: number;
261
+ prioritizationFee: number;
262
+ }
263
+
264
+ declare class NetworkModule {
265
+ private client;
266
+ constructor(client: SurfmanClient);
267
+ getLatestBlockhash(config?: {
268
+ commitment?: string;
269
+ minContextSlot?: number;
270
+ }): Promise<BlockhashResult>;
271
+ getBlock(slot: number, config?: BlockConfig): Promise<Block | null>;
272
+ getBlockTime(slot: number): Promise<number | null>;
273
+ getFirstAvailableBlock(): Promise<number>;
274
+ minimumLedgerSlot(): Promise<number>;
275
+ getTransaction(signature: string, config?: TransactionConfig): Promise<TransactionResult | null>;
276
+ getSignatureStatuses(signatures: string[], config?: {
277
+ searchTransactionHistory?: boolean;
278
+ }): Promise<(SignatureStatus | null)[]>;
279
+ sendTransaction(transaction: string, config?: SendTransactionConfig): Promise<string>;
280
+ simulateTransaction(transaction: string, config?: SimulateTransactionConfig): Promise<SimulateTransactionResult>;
281
+ getClusterNodes(): Promise<ClusterNode[]>;
282
+ getRecentPerformanceSamples(limit?: number): Promise<PerformanceSample[]>;
283
+ requestAirdrop(pubkey: string, lamports: number, config?: {
284
+ commitment?: string;
285
+ }): Promise<string>;
286
+ getBlocks(startSlot: number, endSlot?: number, config?: {
287
+ commitment?: string;
288
+ }): Promise<number[]>;
289
+ getBlocksWithLimit(startSlot: number, limit: number, config?: {
290
+ commitment?: string;
291
+ }): Promise<number[]>;
292
+ getSignaturesForAddress(address: string, config?: SignaturesForAddressConfig): Promise<SignatureForAddress[]>;
293
+ isBlockhashValid(blockhash: string, config?: {
294
+ commitment?: string;
295
+ minContextSlot?: number;
296
+ }): Promise<boolean>;
297
+ getFeeForMessage(message: string, config?: {
298
+ commitment?: string;
299
+ }): Promise<number | null>;
300
+ getRecentPrioritizationFees(addresses?: string[]): Promise<PrioritizationFee[]>;
301
+ }
302
+
303
+ declare class AccountsModule {
304
+ private client;
305
+ constructor(client: SurfmanClient);
306
+ getAccountInfo(pubkey: string, config?: AccountInfoConfig): Promise<AccountInfo | null>;
307
+ getMultipleAccounts(pubkeys: string[], config?: AccountInfoConfig): Promise<(AccountInfo | null)[]>;
308
+ getBlockCommitment(slot: number): Promise<BlockCommitment>;
309
+ getTokenAccountBalance(pubkey: string, config?: {
310
+ commitment?: string;
311
+ }): Promise<TokenAmount | null>;
312
+ getTokenSupply(mint: string, config?: {
313
+ commitment?: string;
314
+ }): Promise<TokenAmount>;
315
+ }
316
+
317
+ interface LargestAccountsConfig {
318
+ commitment?: string;
319
+ filter?: 'circulating' | 'nonCirculating';
320
+ }
321
+
322
+ declare class ScanModule {
323
+ private client;
324
+ constructor(client: SurfmanClient);
325
+ getProgramAccounts(programId: string, config?: ProgramAccountsConfig): Promise<KeyedAccount[]>;
326
+ getLargestAccounts(config?: LargestAccountsConfig): Promise<AccountBalance[]>;
327
+ getSupply(config?: SupplyConfig): Promise<Supply>;
328
+ getTokenLargestAccounts(mint: string, config?: {
329
+ commitment?: string;
330
+ }): Promise<TokenAccountBalance[]>;
331
+ getTokenAccountsByOwner(owner: string, filter: TokenAccountsFilter, config?: AccountInfoConfig): Promise<KeyedAccount[]>;
332
+ getTokenAccountsByDelegate(delegate: string, filter: TokenAccountsFilter, config?: AccountInfoConfig): Promise<KeyedAccount[]>;
333
+ }
334
+
335
+ declare class Surfman {
336
+ cheatcodes: CheatcodesModule;
337
+ network: NetworkModule;
338
+ accounts: AccountsModule;
339
+ scan: ScanModule;
340
+ private client;
341
+ constructor(config: string | RpcClientConfig);
342
+ getClient(): SurfmanClient;
343
+ }
344
+
345
+ export { type AccountBalance, type AccountInfo, type AccountInfoConfig, AccountsModule, type Block, type BlockCommitment, type BlockConfig, type BlockhashResult, CheatcodesModule, type ClusterNode, type JsonRpcError, type JsonRpcRequest, type JsonRpcResponse, type KeyedAccount, NetworkModule, type PerformanceSample, type ProgramAccountsConfig, type ResetAccountConfig, type RpcClientConfig, type RpcLogsResponse, ScanModule, type SendTransactionConfig, type SetAccountUpdate, type SetProgramAuthorityParams, type SetSomeAccount, type SignatureStatus, type SimulateTransactionConfig, type SimulateTransactionResult, type Supply, type SupplyConfig, Surfman, SurfmanClient, type TimeTravelConfig, type TimeTravelResult, type TokenAccountBalance, type TokenAccountUpdate, type TokenAccountsFilter, type TokenAmount, type TransactionConfig, type TransactionResult };
@@ -0,0 +1,345 @@
1
+ interface JsonRpcRequest<T = any> {
2
+ jsonrpc: '2.0';
3
+ id: number | string;
4
+ method: string;
5
+ params: T;
6
+ }
7
+ interface JsonRpcResponse<T = any> {
8
+ jsonrpc: '2.0';
9
+ id: number | string;
10
+ result?: T;
11
+ error?: JsonRpcError;
12
+ }
13
+ interface JsonRpcError {
14
+ code: number;
15
+ message: string;
16
+ data?: any;
17
+ }
18
+ interface RpcClientConfig {
19
+ url: string;
20
+ timeout?: number;
21
+ headers?: Record<string, string>;
22
+ }
23
+
24
+ interface TimeTravelConfig {
25
+ absoluteEpoch?: number;
26
+ absoluteSlot?: number;
27
+ absoluteTimestamp?: number;
28
+ }
29
+ interface TimeTravelResult {
30
+ absoluteSlot: number;
31
+ blockHeight: number | null;
32
+ epoch: number;
33
+ slotIndex: number;
34
+ slotsInEpoch: number;
35
+ transactionCount: number | null;
36
+ }
37
+ interface SetAccountUpdate {
38
+ data?: string;
39
+ executable?: boolean;
40
+ lamports?: number;
41
+ owner?: string;
42
+ rentEpoch?: number;
43
+ }
44
+ interface SetProgramAuthorityParams {
45
+ programId: string;
46
+ newAuthority: string | null;
47
+ }
48
+ interface TokenAccountUpdate {
49
+ amount?: number;
50
+ delegate?: SetSomeAccount;
51
+ state?: string;
52
+ delegatedAmount?: number;
53
+ closeAuthority?: SetSomeAccount;
54
+ }
55
+ interface SetSomeAccount {
56
+ Account?: string;
57
+ NoAccount?: boolean;
58
+ }
59
+ interface ResetAccountConfig {
60
+ includeOwnedAccounts?: boolean;
61
+ }
62
+ interface RpcLogsResponse {
63
+ signature: string;
64
+ err: any | null;
65
+ slot: number;
66
+ logs?: string[];
67
+ }
68
+
69
+ interface BlockhashResult {
70
+ blockhash: string;
71
+ lastValidBlockHeight: number;
72
+ }
73
+ interface BlockConfig {
74
+ encoding?: 'json' | 'jsonParsed' | 'base58' | 'base64';
75
+ transactionDetails?: 'full' | 'signatures' | 'none';
76
+ rewards?: boolean;
77
+ commitment?: string;
78
+ maxSupportedTransactionVersion?: number;
79
+ }
80
+ interface Block {
81
+ blockhash: string;
82
+ previousBlockhash: string;
83
+ parentSlot: number;
84
+ transactions?: any[];
85
+ signatures?: string[];
86
+ rewards?: any[];
87
+ blockTime?: number | null;
88
+ blockHeight?: number | null;
89
+ }
90
+ interface TransactionConfig {
91
+ encoding?: 'json' | 'jsonParsed' | 'base58' | 'base64';
92
+ commitment?: string;
93
+ maxSupportedTransactionVersion?: number;
94
+ }
95
+ interface TransactionResult {
96
+ slot: number;
97
+ transaction: any;
98
+ blockTime?: number | null;
99
+ meta?: any;
100
+ }
101
+ interface SignatureStatus {
102
+ slot: number;
103
+ confirmations: number | null;
104
+ err: any | null;
105
+ confirmationStatus?: 'processed' | 'confirmed' | 'finalized';
106
+ }
107
+ interface PerformanceSample {
108
+ slot: number;
109
+ numTransactions: number;
110
+ numSlots: number;
111
+ samplePeriodSecs: number;
112
+ numNonVoteTransactions?: number;
113
+ }
114
+ interface ClusterNode {
115
+ pubkey: string;
116
+ gossip?: string | null;
117
+ tpu?: string | null;
118
+ rpc?: string | null;
119
+ version?: string | null;
120
+ featureSet?: number | null;
121
+ shredVersion?: number | null;
122
+ }
123
+ interface SendTransactionConfig {
124
+ skipPreflight?: boolean;
125
+ preflightCommitment?: string;
126
+ encoding?: 'base58' | 'base64';
127
+ maxRetries?: number;
128
+ minContextSlot?: number;
129
+ }
130
+ interface SimulateTransactionConfig {
131
+ commitment?: string;
132
+ sigVerify?: boolean;
133
+ replaceRecentBlockhash?: boolean;
134
+ minContextSlot?: number;
135
+ encoding?: 'base58' | 'base64';
136
+ accounts?: {
137
+ encoding: string;
138
+ addresses: string[];
139
+ };
140
+ }
141
+ interface SimulateTransactionResult {
142
+ err: any | null;
143
+ logs: string[] | null;
144
+ accounts?: any[] | null;
145
+ unitsConsumed?: number;
146
+ returnData?: any | null;
147
+ }
148
+ interface AccountInfo {
149
+ lamports: number;
150
+ owner: string;
151
+ data: any;
152
+ executable: boolean;
153
+ rentEpoch: number;
154
+ space?: number;
155
+ }
156
+ interface AccountInfoConfig {
157
+ encoding?: 'base58' | 'base64' | 'base64+zstd' | 'jsonParsed';
158
+ dataSlice?: {
159
+ offset: number;
160
+ length: number;
161
+ };
162
+ commitment?: string;
163
+ minContextSlot?: number;
164
+ }
165
+ interface BlockCommitment {
166
+ commitment: number[] | null;
167
+ totalStake: number;
168
+ }
169
+ interface TokenAmount {
170
+ amount: string;
171
+ decimals: number;
172
+ uiAmount: number | null;
173
+ uiAmountString: string;
174
+ }
175
+ interface ProgramAccountsConfig {
176
+ filters?: Array<{
177
+ dataSize: number;
178
+ } | {
179
+ memcmp: {
180
+ offset: number;
181
+ bytes: string;
182
+ };
183
+ }>;
184
+ encoding?: 'base58' | 'base64' | 'base64+zstd' | 'jsonParsed';
185
+ withContext?: boolean;
186
+ commitment?: string;
187
+ minContextSlot?: number;
188
+ }
189
+ interface KeyedAccount {
190
+ pubkey: string;
191
+ account: AccountInfo;
192
+ }
193
+ interface AccountBalance {
194
+ address: string;
195
+ lamports: number;
196
+ }
197
+ interface SupplyConfig {
198
+ commitment?: string;
199
+ excludeNonCirculatingAccountsList?: boolean;
200
+ }
201
+ interface Supply {
202
+ total: number;
203
+ circulating: number;
204
+ nonCirculating: number;
205
+ nonCirculatingAccounts: string[];
206
+ }
207
+ interface TokenAccountBalance {
208
+ address: string;
209
+ amount: string;
210
+ decimals: number;
211
+ uiAmount: number | null;
212
+ uiAmountString: string;
213
+ }
214
+ type TokenAccountsFilter = {
215
+ mint: string;
216
+ } | {
217
+ programId: string;
218
+ };
219
+
220
+ declare class SurfmanClient {
221
+ private url;
222
+ private timeout;
223
+ private headers;
224
+ private requestId;
225
+ constructor(config: string | RpcClientConfig);
226
+ request<TParams = any, TResult = any>(method: string, params: TParams): Promise<TResult>;
227
+ setUrl(url: string): void;
228
+ getUrl(): string;
229
+ }
230
+
231
+ declare class CheatcodesModule {
232
+ private client;
233
+ constructor(client: SurfmanClient);
234
+ timeTravel(config: TimeTravelConfig): Promise<TimeTravelResult>;
235
+ setAccount(pubkey: string, update: SetAccountUpdate): Promise<void>;
236
+ setProgramAuthority(programId: string, newAuthority: string | null): Promise<void>;
237
+ pauseClock(): Promise<TimeTravelResult>;
238
+ resumeClock(): Promise<TimeTravelResult>;
239
+ getLocalSignatures(limit?: number): Promise<RpcLogsResponse[]>;
240
+ setTokenAccount(owner: string, mint: string, update: TokenAccountUpdate, tokenProgram?: string): Promise<void>;
241
+ resetAccount(pubkey: string, config?: ResetAccountConfig): Promise<void>;
242
+ resetNetwork(): Promise<void>;
243
+ }
244
+
245
+ interface SignatureForAddress {
246
+ signature: string;
247
+ slot: number;
248
+ err: any | null;
249
+ memo: string | null;
250
+ blockTime?: number | null;
251
+ }
252
+ interface SignaturesForAddressConfig {
253
+ limit?: number;
254
+ before?: string;
255
+ until?: string;
256
+ commitment?: string;
257
+ }
258
+
259
+ interface PrioritizationFee {
260
+ slot: number;
261
+ prioritizationFee: number;
262
+ }
263
+
264
+ declare class NetworkModule {
265
+ private client;
266
+ constructor(client: SurfmanClient);
267
+ getLatestBlockhash(config?: {
268
+ commitment?: string;
269
+ minContextSlot?: number;
270
+ }): Promise<BlockhashResult>;
271
+ getBlock(slot: number, config?: BlockConfig): Promise<Block | null>;
272
+ getBlockTime(slot: number): Promise<number | null>;
273
+ getFirstAvailableBlock(): Promise<number>;
274
+ minimumLedgerSlot(): Promise<number>;
275
+ getTransaction(signature: string, config?: TransactionConfig): Promise<TransactionResult | null>;
276
+ getSignatureStatuses(signatures: string[], config?: {
277
+ searchTransactionHistory?: boolean;
278
+ }): Promise<(SignatureStatus | null)[]>;
279
+ sendTransaction(transaction: string, config?: SendTransactionConfig): Promise<string>;
280
+ simulateTransaction(transaction: string, config?: SimulateTransactionConfig): Promise<SimulateTransactionResult>;
281
+ getClusterNodes(): Promise<ClusterNode[]>;
282
+ getRecentPerformanceSamples(limit?: number): Promise<PerformanceSample[]>;
283
+ requestAirdrop(pubkey: string, lamports: number, config?: {
284
+ commitment?: string;
285
+ }): Promise<string>;
286
+ getBlocks(startSlot: number, endSlot?: number, config?: {
287
+ commitment?: string;
288
+ }): Promise<number[]>;
289
+ getBlocksWithLimit(startSlot: number, limit: number, config?: {
290
+ commitment?: string;
291
+ }): Promise<number[]>;
292
+ getSignaturesForAddress(address: string, config?: SignaturesForAddressConfig): Promise<SignatureForAddress[]>;
293
+ isBlockhashValid(blockhash: string, config?: {
294
+ commitment?: string;
295
+ minContextSlot?: number;
296
+ }): Promise<boolean>;
297
+ getFeeForMessage(message: string, config?: {
298
+ commitment?: string;
299
+ }): Promise<number | null>;
300
+ getRecentPrioritizationFees(addresses?: string[]): Promise<PrioritizationFee[]>;
301
+ }
302
+
303
+ declare class AccountsModule {
304
+ private client;
305
+ constructor(client: SurfmanClient);
306
+ getAccountInfo(pubkey: string, config?: AccountInfoConfig): Promise<AccountInfo | null>;
307
+ getMultipleAccounts(pubkeys: string[], config?: AccountInfoConfig): Promise<(AccountInfo | null)[]>;
308
+ getBlockCommitment(slot: number): Promise<BlockCommitment>;
309
+ getTokenAccountBalance(pubkey: string, config?: {
310
+ commitment?: string;
311
+ }): Promise<TokenAmount | null>;
312
+ getTokenSupply(mint: string, config?: {
313
+ commitment?: string;
314
+ }): Promise<TokenAmount>;
315
+ }
316
+
317
+ interface LargestAccountsConfig {
318
+ commitment?: string;
319
+ filter?: 'circulating' | 'nonCirculating';
320
+ }
321
+
322
+ declare class ScanModule {
323
+ private client;
324
+ constructor(client: SurfmanClient);
325
+ getProgramAccounts(programId: string, config?: ProgramAccountsConfig): Promise<KeyedAccount[]>;
326
+ getLargestAccounts(config?: LargestAccountsConfig): Promise<AccountBalance[]>;
327
+ getSupply(config?: SupplyConfig): Promise<Supply>;
328
+ getTokenLargestAccounts(mint: string, config?: {
329
+ commitment?: string;
330
+ }): Promise<TokenAccountBalance[]>;
331
+ getTokenAccountsByOwner(owner: string, filter: TokenAccountsFilter, config?: AccountInfoConfig): Promise<KeyedAccount[]>;
332
+ getTokenAccountsByDelegate(delegate: string, filter: TokenAccountsFilter, config?: AccountInfoConfig): Promise<KeyedAccount[]>;
333
+ }
334
+
335
+ declare class Surfman {
336
+ cheatcodes: CheatcodesModule;
337
+ network: NetworkModule;
338
+ accounts: AccountsModule;
339
+ scan: ScanModule;
340
+ private client;
341
+ constructor(config: string | RpcClientConfig);
342
+ getClient(): SurfmanClient;
343
+ }
344
+
345
+ export { type AccountBalance, type AccountInfo, type AccountInfoConfig, AccountsModule, type Block, type BlockCommitment, type BlockConfig, type BlockhashResult, CheatcodesModule, type ClusterNode, type JsonRpcError, type JsonRpcRequest, type JsonRpcResponse, type KeyedAccount, NetworkModule, type PerformanceSample, type ProgramAccountsConfig, type ResetAccountConfig, type RpcClientConfig, type RpcLogsResponse, ScanModule, type SendTransactionConfig, type SetAccountUpdate, type SetProgramAuthorityParams, type SetSomeAccount, type SignatureStatus, type SimulateTransactionConfig, type SimulateTransactionResult, type Supply, type SupplyConfig, Surfman, SurfmanClient, type TimeTravelConfig, type TimeTravelResult, type TokenAccountBalance, type TokenAccountUpdate, type TokenAccountsFilter, type TokenAmount, type TransactionConfig, type TransactionResult };