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.
- package/dist/index.d.mts +345 -0
- package/dist/index.d.ts +345 -0
- package/dist/index.js +548 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +516 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +55 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
AccountsModule: () => AccountsModule,
|
|
24
|
+
CheatcodesModule: () => CheatcodesModule,
|
|
25
|
+
NetworkModule: () => NetworkModule,
|
|
26
|
+
ScanModule: () => ScanModule,
|
|
27
|
+
Surfman: () => Surfman,
|
|
28
|
+
SurfmanClient: () => SurfmanClient
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(index_exports);
|
|
31
|
+
|
|
32
|
+
// src/client/SurfmanClient.ts
|
|
33
|
+
var SurfmanClient = class {
|
|
34
|
+
url;
|
|
35
|
+
timeout;
|
|
36
|
+
headers;
|
|
37
|
+
requestId = 0;
|
|
38
|
+
constructor(config) {
|
|
39
|
+
if (typeof config === "string") {
|
|
40
|
+
this.url = config;
|
|
41
|
+
this.timeout = 3e4;
|
|
42
|
+
this.headers = { "Content-Type": "application/json" };
|
|
43
|
+
} else {
|
|
44
|
+
this.url = config.url;
|
|
45
|
+
this.timeout = config.timeout ?? 3e4;
|
|
46
|
+
this.headers = {
|
|
47
|
+
"Content-Type": "application/json",
|
|
48
|
+
...config.headers
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
async request(method, params) {
|
|
53
|
+
const id = ++this.requestId;
|
|
54
|
+
const body = {
|
|
55
|
+
jsonrpc: "2.0",
|
|
56
|
+
id,
|
|
57
|
+
method,
|
|
58
|
+
params
|
|
59
|
+
};
|
|
60
|
+
const controller = new AbortController();
|
|
61
|
+
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
62
|
+
try {
|
|
63
|
+
const response = await fetch(this.url, {
|
|
64
|
+
method: "POST",
|
|
65
|
+
headers: this.headers,
|
|
66
|
+
body: JSON.stringify(body),
|
|
67
|
+
signal: controller.signal
|
|
68
|
+
});
|
|
69
|
+
clearTimeout(timeoutId);
|
|
70
|
+
if (!response.ok) {
|
|
71
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
72
|
+
}
|
|
73
|
+
const result = await response.json();
|
|
74
|
+
if (result.error) {
|
|
75
|
+
throw new Error(
|
|
76
|
+
`RPC error [${result.error.code}]: ${result.error.message}`
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
return result.result;
|
|
80
|
+
} catch (error) {
|
|
81
|
+
clearTimeout(timeoutId);
|
|
82
|
+
if (error instanceof Error) {
|
|
83
|
+
if (error.name === "AbortError") {
|
|
84
|
+
throw new Error(`Request timeout after ${this.timeout}ms`);
|
|
85
|
+
}
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
throw new Error("Unknown error occurred");
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
setUrl(url) {
|
|
92
|
+
this.url = url;
|
|
93
|
+
}
|
|
94
|
+
getUrl() {
|
|
95
|
+
return this.url;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// src/modules/cheatcodes/timeTravel.ts
|
|
100
|
+
async function timeTravel(client, config) {
|
|
101
|
+
return client.request(
|
|
102
|
+
"surfnet_timeTravel",
|
|
103
|
+
[config]
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// src/modules/cheatcodes/setAccount.ts
|
|
108
|
+
async function setAccount(client, pubkey, update) {
|
|
109
|
+
return client.request(
|
|
110
|
+
"surfnet_setAccount",
|
|
111
|
+
[pubkey, update]
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// src/modules/cheatcodes/setProgramAuthority.ts
|
|
116
|
+
async function setProgramAuthority(client, programId, newAuthority) {
|
|
117
|
+
return client.request(
|
|
118
|
+
"surfnet_setProgramAuthority",
|
|
119
|
+
[programId, newAuthority]
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// src/modules/cheatcodes/pauseClock.ts
|
|
124
|
+
async function pauseClock(client) {
|
|
125
|
+
return client.request("surfnet_pauseClock", []);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// src/modules/cheatcodes/resumeClock.ts
|
|
129
|
+
async function resumeClock(client) {
|
|
130
|
+
return client.request("surfnet_resumeClock", []);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// src/modules/cheatcodes/getLocalSignatures.ts
|
|
134
|
+
async function getLocalSignatures(client, limit) {
|
|
135
|
+
return client.request(
|
|
136
|
+
"surfnet_getLocalSignatures",
|
|
137
|
+
[limit]
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// src/modules/cheatcodes/setTokenAccount.ts
|
|
142
|
+
async function setTokenAccount(client, owner, mint, update, tokenProgram) {
|
|
143
|
+
return client.request(
|
|
144
|
+
"surfnet_setTokenAccount",
|
|
145
|
+
[owner, mint, update, tokenProgram]
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// src/modules/cheatcodes/resetAccount.ts
|
|
150
|
+
async function resetAccount(client, pubkey, config) {
|
|
151
|
+
return client.request(
|
|
152
|
+
"surfnet_resetAccount",
|
|
153
|
+
[pubkey, config]
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// src/modules/cheatcodes/resetNetwork.ts
|
|
158
|
+
async function resetNetwork(client) {
|
|
159
|
+
return client.request("surfnet_resetNetwork", []);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// src/modules/cheatcodes/index.ts
|
|
163
|
+
var CheatcodesModule = class {
|
|
164
|
+
constructor(client) {
|
|
165
|
+
this.client = client;
|
|
166
|
+
}
|
|
167
|
+
async timeTravel(config) {
|
|
168
|
+
return timeTravel(this.client, config);
|
|
169
|
+
}
|
|
170
|
+
async setAccount(pubkey, update) {
|
|
171
|
+
return setAccount(this.client, pubkey, update);
|
|
172
|
+
}
|
|
173
|
+
async setProgramAuthority(programId, newAuthority) {
|
|
174
|
+
return setProgramAuthority(this.client, programId, newAuthority);
|
|
175
|
+
}
|
|
176
|
+
async pauseClock() {
|
|
177
|
+
return pauseClock(this.client);
|
|
178
|
+
}
|
|
179
|
+
async resumeClock() {
|
|
180
|
+
return resumeClock(this.client);
|
|
181
|
+
}
|
|
182
|
+
async getLocalSignatures(limit) {
|
|
183
|
+
return getLocalSignatures(this.client, limit);
|
|
184
|
+
}
|
|
185
|
+
async setTokenAccount(owner, mint, update, tokenProgram) {
|
|
186
|
+
return setTokenAccount(this.client, owner, mint, update, tokenProgram);
|
|
187
|
+
}
|
|
188
|
+
async resetAccount(pubkey, config) {
|
|
189
|
+
return resetAccount(this.client, pubkey, config);
|
|
190
|
+
}
|
|
191
|
+
async resetNetwork() {
|
|
192
|
+
return resetNetwork(this.client);
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
// src/modules/network/getLatestBlockhash.ts
|
|
197
|
+
async function getLatestBlockhash(client, config) {
|
|
198
|
+
return client.request(
|
|
199
|
+
"getLatestBlockhash",
|
|
200
|
+
config ? [config] : []
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// src/modules/network/getBlock.ts
|
|
205
|
+
async function getBlock(client, slot, config) {
|
|
206
|
+
return client.request(
|
|
207
|
+
"getBlock",
|
|
208
|
+
config ? [slot, config] : [slot]
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// src/modules/network/getBlockTime.ts
|
|
213
|
+
async function getBlockTime(client, slot) {
|
|
214
|
+
return client.request("getBlockTime", [slot]);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// src/modules/network/getFirstAvailableBlock.ts
|
|
218
|
+
async function getFirstAvailableBlock(client) {
|
|
219
|
+
return client.request("getFirstAvailableBlock", []);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// src/modules/network/minimumLedgerSlot.ts
|
|
223
|
+
async function minimumLedgerSlot(client) {
|
|
224
|
+
return client.request("minimumLedgerSlot", []);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// src/modules/network/getTransaction.ts
|
|
228
|
+
async function getTransaction(client, signature, config) {
|
|
229
|
+
return client.request(
|
|
230
|
+
"getTransaction",
|
|
231
|
+
config ? [signature, config] : [signature]
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// src/modules/network/getSignatureStatuses.ts
|
|
236
|
+
async function getSignatureStatuses(client, signatures, config) {
|
|
237
|
+
return client.request(
|
|
238
|
+
"getSignatureStatuses",
|
|
239
|
+
config ? [signatures, config] : [signatures]
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// src/modules/network/sendTransaction.ts
|
|
244
|
+
async function sendTransaction(client, transaction, config) {
|
|
245
|
+
return client.request(
|
|
246
|
+
"sendTransaction",
|
|
247
|
+
config ? [transaction, config] : [transaction]
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// src/modules/network/simulateTransaction.ts
|
|
252
|
+
async function simulateTransaction(client, transaction, config) {
|
|
253
|
+
return client.request("simulateTransaction", config ? [transaction, config] : [transaction]);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// src/modules/network/getClusterNodes.ts
|
|
257
|
+
async function getClusterNodes(client) {
|
|
258
|
+
return client.request("getClusterNodes", []);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// src/modules/network/getRecentPerformanceSamples.ts
|
|
262
|
+
async function getRecentPerformanceSamples(client, limit) {
|
|
263
|
+
return client.request(
|
|
264
|
+
"getRecentPerformanceSamples",
|
|
265
|
+
limit !== void 0 ? [limit] : []
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// src/modules/network/requestAirdrop.ts
|
|
270
|
+
async function requestAirdrop(client, pubkey, lamports, config) {
|
|
271
|
+
return client.request(
|
|
272
|
+
"requestAirdrop",
|
|
273
|
+
config ? [pubkey, lamports, config] : [pubkey, lamports]
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// src/modules/network/getBlocks.ts
|
|
278
|
+
async function getBlocks(client, startSlot, endSlot, config) {
|
|
279
|
+
return client.request(
|
|
280
|
+
"getBlocks",
|
|
281
|
+
endSlot !== void 0 ? config ? [startSlot, endSlot, config] : [startSlot, endSlot] : [startSlot]
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// src/modules/network/getBlocksWithLimit.ts
|
|
286
|
+
async function getBlocksWithLimit(client, startSlot, limit, config) {
|
|
287
|
+
return client.request(
|
|
288
|
+
"getBlocksWithLimit",
|
|
289
|
+
config ? [startSlot, limit, config] : [startSlot, limit]
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// src/modules/network/getSignaturesForAddress.ts
|
|
294
|
+
async function getSignaturesForAddress(client, address, config) {
|
|
295
|
+
return client.request(
|
|
296
|
+
"getSignaturesForAddress",
|
|
297
|
+
config ? [address, config] : [address]
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// src/modules/network/isBlockhashValid.ts
|
|
302
|
+
async function isBlockhashValid(client, blockhash, config) {
|
|
303
|
+
return client.request(
|
|
304
|
+
"isBlockhashValid",
|
|
305
|
+
config ? [blockhash, config] : [blockhash]
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// src/modules/network/getFeeForMessage.ts
|
|
310
|
+
async function getFeeForMessage(client, message, config) {
|
|
311
|
+
return client.request(
|
|
312
|
+
"getFeeForMessage",
|
|
313
|
+
config ? [message, config] : [message]
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// src/modules/network/getRecentPrioritizationFees.ts
|
|
318
|
+
async function getRecentPrioritizationFees(client, addresses) {
|
|
319
|
+
return client.request(
|
|
320
|
+
"getRecentPrioritizationFees",
|
|
321
|
+
addresses ? [addresses] : []
|
|
322
|
+
);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// src/modules/network/index.ts
|
|
326
|
+
var NetworkModule = class {
|
|
327
|
+
constructor(client) {
|
|
328
|
+
this.client = client;
|
|
329
|
+
}
|
|
330
|
+
async getLatestBlockhash(config) {
|
|
331
|
+
return getLatestBlockhash(this.client, config);
|
|
332
|
+
}
|
|
333
|
+
async getBlock(slot, config) {
|
|
334
|
+
return getBlock(this.client, slot, config);
|
|
335
|
+
}
|
|
336
|
+
async getBlockTime(slot) {
|
|
337
|
+
return getBlockTime(this.client, slot);
|
|
338
|
+
}
|
|
339
|
+
async getFirstAvailableBlock() {
|
|
340
|
+
return getFirstAvailableBlock(this.client);
|
|
341
|
+
}
|
|
342
|
+
async minimumLedgerSlot() {
|
|
343
|
+
return minimumLedgerSlot(this.client);
|
|
344
|
+
}
|
|
345
|
+
async getTransaction(signature, config) {
|
|
346
|
+
return getTransaction(this.client, signature, config);
|
|
347
|
+
}
|
|
348
|
+
async getSignatureStatuses(signatures, config) {
|
|
349
|
+
return getSignatureStatuses(this.client, signatures, config);
|
|
350
|
+
}
|
|
351
|
+
async sendTransaction(transaction, config) {
|
|
352
|
+
return sendTransaction(this.client, transaction, config);
|
|
353
|
+
}
|
|
354
|
+
async simulateTransaction(transaction, config) {
|
|
355
|
+
return simulateTransaction(this.client, transaction, config);
|
|
356
|
+
}
|
|
357
|
+
async getClusterNodes() {
|
|
358
|
+
return getClusterNodes(this.client);
|
|
359
|
+
}
|
|
360
|
+
async getRecentPerformanceSamples(limit) {
|
|
361
|
+
return getRecentPerformanceSamples(this.client, limit);
|
|
362
|
+
}
|
|
363
|
+
async requestAirdrop(pubkey, lamports, config) {
|
|
364
|
+
return requestAirdrop(this.client, pubkey, lamports, config);
|
|
365
|
+
}
|
|
366
|
+
async getBlocks(startSlot, endSlot, config) {
|
|
367
|
+
return getBlocks(this.client, startSlot, endSlot, config);
|
|
368
|
+
}
|
|
369
|
+
async getBlocksWithLimit(startSlot, limit, config) {
|
|
370
|
+
return getBlocksWithLimit(this.client, startSlot, limit, config);
|
|
371
|
+
}
|
|
372
|
+
async getSignaturesForAddress(address, config) {
|
|
373
|
+
return getSignaturesForAddress(this.client, address, config);
|
|
374
|
+
}
|
|
375
|
+
async isBlockhashValid(blockhash, config) {
|
|
376
|
+
return isBlockhashValid(this.client, blockhash, config);
|
|
377
|
+
}
|
|
378
|
+
async getFeeForMessage(message, config) {
|
|
379
|
+
return getFeeForMessage(this.client, message, config);
|
|
380
|
+
}
|
|
381
|
+
async getRecentPrioritizationFees(addresses) {
|
|
382
|
+
return getRecentPrioritizationFees(this.client, addresses);
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
// src/modules/accounts/getAccountInfo.ts
|
|
387
|
+
async function getAccountInfo(client, pubkey, config) {
|
|
388
|
+
return client.request(
|
|
389
|
+
"getAccountInfo",
|
|
390
|
+
config ? [pubkey, config] : [pubkey]
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// src/modules/accounts/getMultipleAccounts.ts
|
|
395
|
+
async function getMultipleAccounts(client, pubkeys, config) {
|
|
396
|
+
return client.request(
|
|
397
|
+
"getMultipleAccounts",
|
|
398
|
+
config ? [pubkeys, config] : [pubkeys]
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// src/modules/accounts/getBlockCommitment.ts
|
|
403
|
+
async function getBlockCommitment(client, slot) {
|
|
404
|
+
return client.request("getBlockCommitment", [
|
|
405
|
+
slot
|
|
406
|
+
]);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// src/modules/accounts/getTokenAccountBalance.ts
|
|
410
|
+
async function getTokenAccountBalance(client, pubkey, config) {
|
|
411
|
+
return client.request(
|
|
412
|
+
"getTokenAccountBalance",
|
|
413
|
+
config ? [pubkey, config] : [pubkey]
|
|
414
|
+
);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
// src/modules/accounts/getTokenSupply.ts
|
|
418
|
+
async function getTokenSupply(client, mint, config) {
|
|
419
|
+
return client.request(
|
|
420
|
+
"getTokenSupply",
|
|
421
|
+
config ? [mint, config] : [mint]
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// src/modules/accounts/index.ts
|
|
426
|
+
var AccountsModule = class {
|
|
427
|
+
constructor(client) {
|
|
428
|
+
this.client = client;
|
|
429
|
+
}
|
|
430
|
+
async getAccountInfo(pubkey, config) {
|
|
431
|
+
return getAccountInfo(this.client, pubkey, config);
|
|
432
|
+
}
|
|
433
|
+
async getMultipleAccounts(pubkeys, config) {
|
|
434
|
+
return getMultipleAccounts(this.client, pubkeys, config);
|
|
435
|
+
}
|
|
436
|
+
async getBlockCommitment(slot) {
|
|
437
|
+
return getBlockCommitment(this.client, slot);
|
|
438
|
+
}
|
|
439
|
+
async getTokenAccountBalance(pubkey, config) {
|
|
440
|
+
return getTokenAccountBalance(this.client, pubkey, config);
|
|
441
|
+
}
|
|
442
|
+
async getTokenSupply(mint, config) {
|
|
443
|
+
return getTokenSupply(this.client, mint, config);
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
// src/modules/scan/getProgramAccounts.ts
|
|
448
|
+
async function getProgramAccounts(client, programId, config) {
|
|
449
|
+
const result = await client.request("getProgramAccounts", config ? [programId, config] : [programId]);
|
|
450
|
+
if (result && typeof result === "object" && "value" in result) {
|
|
451
|
+
return result.value;
|
|
452
|
+
}
|
|
453
|
+
return result;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
// src/modules/scan/getLargestAccounts.ts
|
|
457
|
+
async function getLargestAccounts(client, config) {
|
|
458
|
+
return client.request(
|
|
459
|
+
"getLargestAccounts",
|
|
460
|
+
config ? [config] : []
|
|
461
|
+
);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
// src/modules/scan/getSupply.ts
|
|
465
|
+
async function getSupply(client, config) {
|
|
466
|
+
return client.request(
|
|
467
|
+
"getSupply",
|
|
468
|
+
config ? [config] : []
|
|
469
|
+
);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
// src/modules/scan/getTokenLargestAccounts.ts
|
|
473
|
+
async function getTokenLargestAccounts(client, mint, config) {
|
|
474
|
+
return client.request(
|
|
475
|
+
"getTokenLargestAccounts",
|
|
476
|
+
config ? [mint, config] : [mint]
|
|
477
|
+
);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
// src/modules/scan/getTokenAccountsByOwner.ts
|
|
481
|
+
async function getTokenAccountsByOwner(client, owner, filter, config) {
|
|
482
|
+
return client.request(
|
|
483
|
+
"getTokenAccountsByOwner",
|
|
484
|
+
config ? [owner, filter, config] : [owner, filter]
|
|
485
|
+
);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
// src/modules/scan/getTokenAccountsByDelegate.ts
|
|
489
|
+
async function getTokenAccountsByDelegate(client, delegate, filter, config) {
|
|
490
|
+
return client.request(
|
|
491
|
+
"getTokenAccountsByDelegate",
|
|
492
|
+
config ? [delegate, filter, config] : [delegate, filter]
|
|
493
|
+
);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
// src/modules/scan/index.ts
|
|
497
|
+
var ScanModule = class {
|
|
498
|
+
constructor(client) {
|
|
499
|
+
this.client = client;
|
|
500
|
+
}
|
|
501
|
+
async getProgramAccounts(programId, config) {
|
|
502
|
+
return getProgramAccounts(this.client, programId, config);
|
|
503
|
+
}
|
|
504
|
+
async getLargestAccounts(config) {
|
|
505
|
+
return getLargestAccounts(this.client, config);
|
|
506
|
+
}
|
|
507
|
+
async getSupply(config) {
|
|
508
|
+
return getSupply(this.client, config);
|
|
509
|
+
}
|
|
510
|
+
async getTokenLargestAccounts(mint, config) {
|
|
511
|
+
return getTokenLargestAccounts(this.client, mint, config);
|
|
512
|
+
}
|
|
513
|
+
async getTokenAccountsByOwner(owner, filter, config) {
|
|
514
|
+
return getTokenAccountsByOwner(this.client, owner, filter, config);
|
|
515
|
+
}
|
|
516
|
+
async getTokenAccountsByDelegate(delegate, filter, config) {
|
|
517
|
+
return getTokenAccountsByDelegate(this.client, delegate, filter, config);
|
|
518
|
+
}
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
// src/index.ts
|
|
522
|
+
var Surfman = class {
|
|
523
|
+
cheatcodes;
|
|
524
|
+
network;
|
|
525
|
+
accounts;
|
|
526
|
+
scan;
|
|
527
|
+
client;
|
|
528
|
+
constructor(config) {
|
|
529
|
+
this.client = new SurfmanClient(config);
|
|
530
|
+
this.cheatcodes = new CheatcodesModule(this.client);
|
|
531
|
+
this.network = new NetworkModule(this.client);
|
|
532
|
+
this.accounts = new AccountsModule(this.client);
|
|
533
|
+
this.scan = new ScanModule(this.client);
|
|
534
|
+
}
|
|
535
|
+
getClient() {
|
|
536
|
+
return this.client;
|
|
537
|
+
}
|
|
538
|
+
};
|
|
539
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
540
|
+
0 && (module.exports = {
|
|
541
|
+
AccountsModule,
|
|
542
|
+
CheatcodesModule,
|
|
543
|
+
NetworkModule,
|
|
544
|
+
ScanModule,
|
|
545
|
+
Surfman,
|
|
546
|
+
SurfmanClient
|
|
547
|
+
});
|
|
548
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/client/SurfmanClient.ts","../src/modules/cheatcodes/timeTravel.ts","../src/modules/cheatcodes/setAccount.ts","../src/modules/cheatcodes/setProgramAuthority.ts","../src/modules/cheatcodes/pauseClock.ts","../src/modules/cheatcodes/resumeClock.ts","../src/modules/cheatcodes/getLocalSignatures.ts","../src/modules/cheatcodes/setTokenAccount.ts","../src/modules/cheatcodes/resetAccount.ts","../src/modules/cheatcodes/resetNetwork.ts","../src/modules/cheatcodes/index.ts","../src/modules/network/getLatestBlockhash.ts","../src/modules/network/getBlock.ts","../src/modules/network/getBlockTime.ts","../src/modules/network/getFirstAvailableBlock.ts","../src/modules/network/minimumLedgerSlot.ts","../src/modules/network/getTransaction.ts","../src/modules/network/getSignatureStatuses.ts","../src/modules/network/sendTransaction.ts","../src/modules/network/simulateTransaction.ts","../src/modules/network/getClusterNodes.ts","../src/modules/network/getRecentPerformanceSamples.ts","../src/modules/network/requestAirdrop.ts","../src/modules/network/getBlocks.ts","../src/modules/network/getBlocksWithLimit.ts","../src/modules/network/getSignaturesForAddress.ts","../src/modules/network/isBlockhashValid.ts","../src/modules/network/getFeeForMessage.ts","../src/modules/network/getRecentPrioritizationFees.ts","../src/modules/network/index.ts","../src/modules/accounts/getAccountInfo.ts","../src/modules/accounts/getMultipleAccounts.ts","../src/modules/accounts/getBlockCommitment.ts","../src/modules/accounts/getTokenAccountBalance.ts","../src/modules/accounts/getTokenSupply.ts","../src/modules/accounts/index.ts","../src/modules/scan/getProgramAccounts.ts","../src/modules/scan/getLargestAccounts.ts","../src/modules/scan/getSupply.ts","../src/modules/scan/getTokenLargestAccounts.ts","../src/modules/scan/getTokenAccountsByOwner.ts","../src/modules/scan/getTokenAccountsByDelegate.ts","../src/modules/scan/index.ts"],"sourcesContent":["import { SurfmanClient } from './client/SurfmanClient';\nimport { CheatcodesModule } from './modules/cheatcodes';\nimport { NetworkModule } from './modules/network';\nimport { AccountsModule } from './modules/accounts';\nimport { ScanModule } from './modules/scan';\nimport type { RpcClientConfig } from './types';\n\nexport class Surfman {\n public cheatcodes: CheatcodesModule;\n public network: NetworkModule;\n public accounts: AccountsModule;\n public scan: ScanModule;\n\n private client: SurfmanClient;\n\n constructor(config: string | RpcClientConfig) {\n this.client = new SurfmanClient(config);\n this.cheatcodes = new CheatcodesModule(this.client);\n this.network = new NetworkModule(this.client);\n this.accounts = new AccountsModule(this.client);\n this.scan = new ScanModule(this.client);\n }\n\n getClient(): SurfmanClient {\n return this.client;\n }\n}\n\nexport { SurfmanClient } from './client/SurfmanClient';\nexport * from './types';\nexport * from './modules';\n","import type { JsonRpcRequest, JsonRpcResponse, RpcClientConfig } from '../types';\n\nexport class SurfmanClient {\n private url: string;\n private timeout: number;\n private headers: Record<string, string>;\n private requestId = 0;\n\n constructor(config: string | RpcClientConfig) {\n if (typeof config === 'string') {\n this.url = config;\n this.timeout = 30000;\n this.headers = { 'Content-Type': 'application/json' };\n } else {\n this.url = config.url;\n this.timeout = config.timeout ?? 30000;\n this.headers = {\n 'Content-Type': 'application/json',\n ...config.headers,\n };\n }\n }\n\n async request<TParams = any, TResult = any>(\n method: string,\n params: TParams\n ): Promise<TResult> {\n const id = ++this.requestId;\n const body: JsonRpcRequest<TParams> = {\n jsonrpc: '2.0',\n id,\n method,\n params,\n };\n\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), this.timeout);\n\n try {\n const response = await fetch(this.url, {\n method: 'POST',\n headers: this.headers,\n body: JSON.stringify(body),\n signal: controller.signal,\n });\n\n clearTimeout(timeoutId);\n\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n\n const result = await response.json() as JsonRpcResponse<TResult>;\n\n if (result.error) {\n throw new Error(\n `RPC error [${result.error.code}]: ${result.error.message}`\n );\n }\n\n return result.result as TResult;\n } catch (error) {\n clearTimeout(timeoutId);\n if (error instanceof Error) {\n if (error.name === 'AbortError') {\n throw new Error(`Request timeout after ${this.timeout}ms`);\n }\n throw error;\n }\n throw new Error('Unknown error occurred');\n }\n }\n\n setUrl(url: string): void {\n this.url = url;\n }\n\n getUrl(): string {\n return this.url;\n }\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { TimeTravelConfig, TimeTravelResult } from '../../types';\n\nexport async function timeTravel(\n client: SurfmanClient,\n config: TimeTravelConfig\n): Promise<TimeTravelResult> {\n return client.request<[TimeTravelConfig], TimeTravelResult>(\n 'surfnet_timeTravel',\n [config]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { SetAccountUpdate } from '../../types';\n\nexport async function setAccount(\n client: SurfmanClient,\n pubkey: string,\n update: SetAccountUpdate\n): Promise<void> {\n return client.request<[string, SetAccountUpdate], void>(\n 'surfnet_setAccount',\n [pubkey, update]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\n\nexport async function setProgramAuthority(\n client: SurfmanClient,\n programId: string,\n newAuthority: string | null\n): Promise<void> {\n return client.request<[string, string | null], void>(\n 'surfnet_setProgramAuthority',\n [programId, newAuthority]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { TimeTravelResult } from '../../types';\n\nexport async function pauseClock(\n client: SurfmanClient\n): Promise<TimeTravelResult> {\n return client.request<[], TimeTravelResult>('surfnet_pauseClock', []);\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { TimeTravelResult } from '../../types';\n\nexport async function resumeClock(\n client: SurfmanClient\n): Promise<TimeTravelResult> {\n return client.request<[], TimeTravelResult>('surfnet_resumeClock', []);\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { RpcLogsResponse } from '../../types';\n\nexport async function getLocalSignatures(\n client: SurfmanClient,\n limit?: number\n): Promise<RpcLogsResponse[]> {\n return client.request<[number?], RpcLogsResponse[]>(\n 'surfnet_getLocalSignatures',\n [limit]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { TokenAccountUpdate } from '../../types';\n\nexport async function setTokenAccount(\n client: SurfmanClient,\n owner: string,\n mint: string,\n update: TokenAccountUpdate,\n tokenProgram?: string\n): Promise<void> {\n return client.request<[string, string, TokenAccountUpdate, string?], void>(\n 'surfnet_setTokenAccount',\n [owner, mint, update, tokenProgram]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { ResetAccountConfig } from '../../types';\n\nexport async function resetAccount(\n client: SurfmanClient,\n pubkey: string,\n config?: ResetAccountConfig\n): Promise<void> {\n return client.request<[string, ResetAccountConfig?], void>(\n 'surfnet_resetAccount',\n [pubkey, config]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\n\nexport async function resetNetwork(client: SurfmanClient): Promise<void> {\n return client.request<[], void>('surfnet_resetNetwork', []);\n}\n","import { SurfmanClient } from '../../client/SurfmanClient';\nimport { timeTravel } from './timeTravel';\nimport { setAccount } from './setAccount';\nimport { setProgramAuthority } from './setProgramAuthority';\nimport { pauseClock } from './pauseClock';\nimport { resumeClock } from './resumeClock';\nimport { getLocalSignatures } from './getLocalSignatures';\nimport { setTokenAccount } from './setTokenAccount';\nimport { resetAccount } from './resetAccount';\nimport { resetNetwork } from './resetNetwork';\nimport type {\n TimeTravelConfig,\n TimeTravelResult,\n SetAccountUpdate,\n TokenAccountUpdate,\n ResetAccountConfig,\n RpcLogsResponse,\n} from '../../types';\n\nexport class CheatcodesModule {\n constructor(private client: SurfmanClient) {}\n\n async timeTravel(config: TimeTravelConfig): Promise<TimeTravelResult> {\n return timeTravel(this.client, config);\n }\n\n async setAccount(pubkey: string, update: SetAccountUpdate): Promise<void> {\n return setAccount(this.client, pubkey, update);\n }\n\n async setProgramAuthority(\n programId: string,\n newAuthority: string | null\n ): Promise<void> {\n return setProgramAuthority(this.client, programId, newAuthority);\n }\n\n async pauseClock(): Promise<TimeTravelResult> {\n return pauseClock(this.client);\n }\n\n async resumeClock(): Promise<TimeTravelResult> {\n return resumeClock(this.client);\n }\n\n async getLocalSignatures(limit?: number): Promise<RpcLogsResponse[]> {\n return getLocalSignatures(this.client, limit);\n }\n\n async setTokenAccount(\n owner: string,\n mint: string,\n update: TokenAccountUpdate,\n tokenProgram?: string\n ): Promise<void> {\n return setTokenAccount(this.client, owner, mint, update, tokenProgram);\n }\n\n async resetAccount(\n pubkey: string,\n config?: ResetAccountConfig\n ): Promise<void> {\n return resetAccount(this.client, pubkey, config);\n }\n\n async resetNetwork(): Promise<void> {\n return resetNetwork(this.client);\n }\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { BlockhashResult } from '../../types';\n\nexport async function getLatestBlockhash(\n client: SurfmanClient,\n config?: { commitment?: string; minContextSlot?: number }\n): Promise<BlockhashResult> {\n return client.request<[any?], BlockhashResult>(\n 'getLatestBlockhash',\n config ? [config] : []\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { Block, BlockConfig } from '../../types';\n\nexport async function getBlock(\n client: SurfmanClient,\n slot: number,\n config?: BlockConfig\n): Promise<Block | null> {\n return client.request<[number, BlockConfig?], Block | null>(\n 'getBlock',\n config ? [slot, config] : [slot]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\n\nexport async function getBlockTime(\n client: SurfmanClient,\n slot: number\n): Promise<number | null> {\n return client.request<[number], number | null>('getBlockTime', [slot]);\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\n\nexport async function getFirstAvailableBlock(\n client: SurfmanClient\n): Promise<number> {\n return client.request<[], number>('getFirstAvailableBlock', []);\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\n\nexport async function minimumLedgerSlot(\n client: SurfmanClient\n): Promise<number> {\n return client.request<[], number>('minimumLedgerSlot', []);\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { TransactionResult, TransactionConfig } from '../../types';\n\nexport async function getTransaction(\n client: SurfmanClient,\n signature: string,\n config?: TransactionConfig\n): Promise<TransactionResult | null> {\n return client.request<[string, TransactionConfig?], TransactionResult | null>(\n 'getTransaction',\n config ? [signature, config] : [signature]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { SignatureStatus } from '../../types';\n\nexport async function getSignatureStatuses(\n client: SurfmanClient,\n signatures: string[],\n config?: { searchTransactionHistory?: boolean }\n): Promise<(SignatureStatus | null)[]> {\n return client.request<[string[], any?], (SignatureStatus | null)[]>(\n 'getSignatureStatuses',\n config ? [signatures, config] : [signatures]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { SendTransactionConfig } from '../../types';\n\nexport async function sendTransaction(\n client: SurfmanClient,\n transaction: string,\n config?: SendTransactionConfig\n): Promise<string> {\n return client.request<[string, SendTransactionConfig?], string>(\n 'sendTransaction',\n config ? [transaction, config] : [transaction]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type {\n SimulateTransactionConfig,\n SimulateTransactionResult,\n} from '../../types';\n\nexport async function simulateTransaction(\n client: SurfmanClient,\n transaction: string,\n config?: SimulateTransactionConfig\n): Promise<SimulateTransactionResult> {\n return client.request<\n [string, SimulateTransactionConfig?],\n SimulateTransactionResult\n >('simulateTransaction', config ? [transaction, config] : [transaction]);\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { ClusterNode } from '../../types';\n\nexport async function getClusterNodes(\n client: SurfmanClient\n): Promise<ClusterNode[]> {\n return client.request<[], ClusterNode[]>('getClusterNodes', []);\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { PerformanceSample } from '../../types';\n\nexport async function getRecentPerformanceSamples(\n client: SurfmanClient,\n limit?: number\n): Promise<PerformanceSample[]> {\n return client.request<[number?], PerformanceSample[]>(\n 'getRecentPerformanceSamples',\n limit !== undefined ? [limit] : []\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\n\nexport async function requestAirdrop(\n client: SurfmanClient,\n pubkey: string,\n lamports: number,\n config?: { commitment?: string }\n): Promise<string> {\n return client.request<[string, number, any?], string>(\n 'requestAirdrop',\n config ? [pubkey, lamports, config] : [pubkey, lamports]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\n\nexport async function getBlocks(\n client: SurfmanClient,\n startSlot: number,\n endSlot?: number,\n config?: { commitment?: string }\n): Promise<number[]> {\n return client.request<[number, number?, any?], number[]>(\n 'getBlocks',\n endSlot !== undefined\n ? config\n ? [startSlot, endSlot, config]\n : [startSlot, endSlot]\n : [startSlot]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\n\nexport async function getBlocksWithLimit(\n client: SurfmanClient,\n startSlot: number,\n limit: number,\n config?: { commitment?: string }\n): Promise<number[]> {\n return client.request<[number, number, any?], number[]>(\n 'getBlocksWithLimit',\n config ? [startSlot, limit, config] : [startSlot, limit]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\n\nexport interface SignatureForAddress {\n signature: string;\n slot: number;\n err: any | null;\n memo: string | null;\n blockTime?: number | null;\n}\n\nexport interface SignaturesForAddressConfig {\n limit?: number;\n before?: string;\n until?: string;\n commitment?: string;\n}\n\nexport async function getSignaturesForAddress(\n client: SurfmanClient,\n address: string,\n config?: SignaturesForAddressConfig\n): Promise<SignatureForAddress[]> {\n return client.request<[string, SignaturesForAddressConfig?], SignatureForAddress[]>(\n 'getSignaturesForAddress',\n config ? [address, config] : [address]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\n\nexport async function isBlockhashValid(\n client: SurfmanClient,\n blockhash: string,\n config?: { commitment?: string; minContextSlot?: number }\n): Promise<boolean> {\n return client.request<[string, any?], boolean>(\n 'isBlockhashValid',\n config ? [blockhash, config] : [blockhash]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\n\nexport async function getFeeForMessage(\n client: SurfmanClient,\n message: string,\n config?: { commitment?: string }\n): Promise<number | null> {\n return client.request<[string, any?], number | null>(\n 'getFeeForMessage',\n config ? [message, config] : [message]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\n\nexport interface PrioritizationFee {\n slot: number;\n prioritizationFee: number;\n}\n\nexport async function getRecentPrioritizationFees(\n client: SurfmanClient,\n addresses?: string[]\n): Promise<PrioritizationFee[]> {\n return client.request<[string[]?], PrioritizationFee[]>(\n 'getRecentPrioritizationFees',\n addresses ? [addresses] : []\n );\n}\n","import { SurfmanClient } from '../../client/SurfmanClient';\nimport { getLatestBlockhash } from './getLatestBlockhash';\nimport { getBlock } from './getBlock';\nimport { getBlockTime } from './getBlockTime';\nimport { getFirstAvailableBlock } from './getFirstAvailableBlock';\nimport { minimumLedgerSlot } from './minimumLedgerSlot';\nimport { getTransaction } from './getTransaction';\nimport { getSignatureStatuses } from './getSignatureStatuses';\nimport { sendTransaction } from './sendTransaction';\nimport { simulateTransaction } from './simulateTransaction';\nimport { getClusterNodes } from './getClusterNodes';\nimport { getRecentPerformanceSamples } from './getRecentPerformanceSamples';\nimport { requestAirdrop } from './requestAirdrop';\nimport { getBlocks } from './getBlocks';\nimport { getBlocksWithLimit } from './getBlocksWithLimit';\nimport {\n getSignaturesForAddress,\n type SignatureForAddress,\n type SignaturesForAddressConfig,\n} from './getSignaturesForAddress';\nimport { isBlockhashValid } from './isBlockhashValid';\nimport { getFeeForMessage } from './getFeeForMessage';\nimport {\n getRecentPrioritizationFees,\n type PrioritizationFee,\n} from './getRecentPrioritizationFees';\nimport type {\n BlockhashResult,\n Block,\n BlockConfig,\n TransactionResult,\n TransactionConfig,\n SignatureStatus,\n SendTransactionConfig,\n SimulateTransactionConfig,\n SimulateTransactionResult,\n ClusterNode,\n PerformanceSample,\n} from '../../types';\n\nexport class NetworkModule {\n constructor(private client: SurfmanClient) {}\n\n async getLatestBlockhash(config?: {\n commitment?: string;\n minContextSlot?: number;\n }): Promise<BlockhashResult> {\n return getLatestBlockhash(this.client, config);\n }\n\n async getBlock(\n slot: number,\n config?: BlockConfig\n ): Promise<Block | null> {\n return getBlock(this.client, slot, config);\n }\n\n async getBlockTime(slot: number): Promise<number | null> {\n return getBlockTime(this.client, slot);\n }\n\n async getFirstAvailableBlock(): Promise<number> {\n return getFirstAvailableBlock(this.client);\n }\n\n async minimumLedgerSlot(): Promise<number> {\n return minimumLedgerSlot(this.client);\n }\n\n async getTransaction(\n signature: string,\n config?: TransactionConfig\n ): Promise<TransactionResult | null> {\n return getTransaction(this.client, signature, config);\n }\n\n async getSignatureStatuses(\n signatures: string[],\n config?: { searchTransactionHistory?: boolean }\n ): Promise<(SignatureStatus | null)[]> {\n return getSignatureStatuses(this.client, signatures, config);\n }\n\n async sendTransaction(\n transaction: string,\n config?: SendTransactionConfig\n ): Promise<string> {\n return sendTransaction(this.client, transaction, config);\n }\n\n async simulateTransaction(\n transaction: string,\n config?: SimulateTransactionConfig\n ): Promise<SimulateTransactionResult> {\n return simulateTransaction(this.client, transaction, config);\n }\n\n async getClusterNodes(): Promise<ClusterNode[]> {\n return getClusterNodes(this.client);\n }\n\n async getRecentPerformanceSamples(\n limit?: number\n ): Promise<PerformanceSample[]> {\n return getRecentPerformanceSamples(this.client, limit);\n }\n\n async requestAirdrop(\n pubkey: string,\n lamports: number,\n config?: { commitment?: string }\n ): Promise<string> {\n return requestAirdrop(this.client, pubkey, lamports, config);\n }\n\n async getBlocks(\n startSlot: number,\n endSlot?: number,\n config?: { commitment?: string }\n ): Promise<number[]> {\n return getBlocks(this.client, startSlot, endSlot, config);\n }\n\n async getBlocksWithLimit(\n startSlot: number,\n limit: number,\n config?: { commitment?: string }\n ): Promise<number[]> {\n return getBlocksWithLimit(this.client, startSlot, limit, config);\n }\n\n async getSignaturesForAddress(\n address: string,\n config?: SignaturesForAddressConfig\n ): Promise<SignatureForAddress[]> {\n return getSignaturesForAddress(this.client, address, config);\n }\n\n async isBlockhashValid(\n blockhash: string,\n config?: { commitment?: string; minContextSlot?: number }\n ): Promise<boolean> {\n return isBlockhashValid(this.client, blockhash, config);\n }\n\n async getFeeForMessage(\n message: string,\n config?: { commitment?: string }\n ): Promise<number | null> {\n return getFeeForMessage(this.client, message, config);\n }\n\n async getRecentPrioritizationFees(\n addresses?: string[]\n ): Promise<PrioritizationFee[]> {\n return getRecentPrioritizationFees(this.client, addresses);\n }\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { AccountInfo, AccountInfoConfig } from '../../types';\n\nexport async function getAccountInfo(\n client: SurfmanClient,\n pubkey: string,\n config?: AccountInfoConfig\n): Promise<AccountInfo | null> {\n return client.request<[string, AccountInfoConfig?], AccountInfo | null>(\n 'getAccountInfo',\n config ? [pubkey, config] : [pubkey]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { AccountInfo, AccountInfoConfig } from '../../types';\n\nexport async function getMultipleAccounts(\n client: SurfmanClient,\n pubkeys: string[],\n config?: AccountInfoConfig\n): Promise<(AccountInfo | null)[]> {\n return client.request<[string[], AccountInfoConfig?], (AccountInfo | null)[]>(\n 'getMultipleAccounts',\n config ? [pubkeys, config] : [pubkeys]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { BlockCommitment } from '../../types';\n\nexport async function getBlockCommitment(\n client: SurfmanClient,\n slot: number\n): Promise<BlockCommitment> {\n return client.request<[number], BlockCommitment>('getBlockCommitment', [\n slot,\n ]);\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { TokenAmount } from '../../types';\n\nexport async function getTokenAccountBalance(\n client: SurfmanClient,\n pubkey: string,\n config?: { commitment?: string }\n): Promise<TokenAmount | null> {\n return client.request<[string, any?], TokenAmount | null>(\n 'getTokenAccountBalance',\n config ? [pubkey, config] : [pubkey]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { TokenAmount } from '../../types';\n\nexport async function getTokenSupply(\n client: SurfmanClient,\n mint: string,\n config?: { commitment?: string }\n): Promise<TokenAmount> {\n return client.request<[string, any?], TokenAmount>(\n 'getTokenSupply',\n config ? [mint, config] : [mint]\n );\n}\n","import { SurfmanClient } from '../../client/SurfmanClient';\nimport { getAccountInfo } from './getAccountInfo';\nimport { getMultipleAccounts } from './getMultipleAccounts';\nimport { getBlockCommitment } from './getBlockCommitment';\nimport { getTokenAccountBalance } from './getTokenAccountBalance';\nimport { getTokenSupply } from './getTokenSupply';\nimport type {\n AccountInfo,\n AccountInfoConfig,\n BlockCommitment,\n TokenAmount,\n} from '../../types';\n\nexport class AccountsModule {\n constructor(private client: SurfmanClient) {}\n\n async getAccountInfo(\n pubkey: string,\n config?: AccountInfoConfig\n ): Promise<AccountInfo | null> {\n return getAccountInfo(this.client, pubkey, config);\n }\n\n async getMultipleAccounts(\n pubkeys: string[],\n config?: AccountInfoConfig\n ): Promise<(AccountInfo | null)[]> {\n return getMultipleAccounts(this.client, pubkeys, config);\n }\n\n async getBlockCommitment(slot: number): Promise<BlockCommitment> {\n return getBlockCommitment(this.client, slot);\n }\n\n async getTokenAccountBalance(\n pubkey: string,\n config?: { commitment?: string }\n ): Promise<TokenAmount | null> {\n return getTokenAccountBalance(this.client, pubkey, config);\n }\n\n async getTokenSupply(\n mint: string,\n config?: { commitment?: string }\n ): Promise<TokenAmount> {\n return getTokenSupply(this.client, mint, config);\n }\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { KeyedAccount, ProgramAccountsConfig } from '../../types';\n\nexport async function getProgramAccounts(\n client: SurfmanClient,\n programId: string,\n config?: ProgramAccountsConfig\n): Promise<KeyedAccount[]> {\n const result = await client.request<\n [string, ProgramAccountsConfig?],\n KeyedAccount[] | { context: any; value: KeyedAccount[] }\n >('getProgramAccounts', config ? [programId, config] : [programId]);\n\n if (result && typeof result === 'object' && 'value' in result) {\n return result.value;\n }\n return result as KeyedAccount[];\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { AccountBalance } from '../../types';\n\nexport interface LargestAccountsConfig {\n commitment?: string;\n filter?: 'circulating' | 'nonCirculating';\n}\n\nexport async function getLargestAccounts(\n client: SurfmanClient,\n config?: LargestAccountsConfig\n): Promise<AccountBalance[]> {\n return client.request<[LargestAccountsConfig?], AccountBalance[]>(\n 'getLargestAccounts',\n config ? [config] : []\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { Supply, SupplyConfig } from '../../types';\n\nexport async function getSupply(\n client: SurfmanClient,\n config?: SupplyConfig\n): Promise<Supply> {\n return client.request<[SupplyConfig?], Supply>(\n 'getSupply',\n config ? [config] : []\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { TokenAccountBalance } from '../../types';\n\nexport async function getTokenLargestAccounts(\n client: SurfmanClient,\n mint: string,\n config?: { commitment?: string }\n): Promise<TokenAccountBalance[]> {\n return client.request<[string, any?], TokenAccountBalance[]>(\n 'getTokenLargestAccounts',\n config ? [mint, config] : [mint]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { KeyedAccount, TokenAccountsFilter, AccountInfoConfig } from '../../types';\n\nexport async function getTokenAccountsByOwner(\n client: SurfmanClient,\n owner: string,\n filter: TokenAccountsFilter,\n config?: AccountInfoConfig\n): Promise<KeyedAccount[]> {\n return client.request<[string, TokenAccountsFilter, AccountInfoConfig?], KeyedAccount[]>(\n 'getTokenAccountsByOwner',\n config ? [owner, filter, config] : [owner, filter]\n );\n}\n","import type { SurfmanClient } from '../../client/SurfmanClient';\nimport type { KeyedAccount, TokenAccountsFilter, AccountInfoConfig } from '../../types';\n\nexport async function getTokenAccountsByDelegate(\n client: SurfmanClient,\n delegate: string,\n filter: TokenAccountsFilter,\n config?: AccountInfoConfig\n): Promise<KeyedAccount[]> {\n return client.request<[string, TokenAccountsFilter, AccountInfoConfig?], KeyedAccount[]>(\n 'getTokenAccountsByDelegate',\n config ? [delegate, filter, config] : [delegate, filter]\n );\n}\n","import { SurfmanClient } from '../../client/SurfmanClient';\nimport { getProgramAccounts } from './getProgramAccounts';\nimport { getLargestAccounts, type LargestAccountsConfig } from './getLargestAccounts';\nimport { getSupply } from './getSupply';\nimport { getTokenLargestAccounts } from './getTokenLargestAccounts';\nimport { getTokenAccountsByOwner } from './getTokenAccountsByOwner';\nimport { getTokenAccountsByDelegate } from './getTokenAccountsByDelegate';\nimport type {\n KeyedAccount,\n ProgramAccountsConfig,\n AccountBalance,\n Supply,\n SupplyConfig,\n TokenAccountBalance,\n TokenAccountsFilter,\n AccountInfoConfig,\n} from '../../types';\n\nexport class ScanModule {\n constructor(private client: SurfmanClient) {}\n\n async getProgramAccounts(\n programId: string,\n config?: ProgramAccountsConfig\n ): Promise<KeyedAccount[]> {\n return getProgramAccounts(this.client, programId, config);\n }\n\n async getLargestAccounts(\n config?: LargestAccountsConfig\n ): Promise<AccountBalance[]> {\n return getLargestAccounts(this.client, config);\n }\n\n async getSupply(config?: SupplyConfig): Promise<Supply> {\n return getSupply(this.client, config);\n }\n\n async getTokenLargestAccounts(\n mint: string,\n config?: { commitment?: string }\n ): Promise<TokenAccountBalance[]> {\n return getTokenLargestAccounts(this.client, mint, config);\n }\n\n async getTokenAccountsByOwner(\n owner: string,\n filter: TokenAccountsFilter,\n config?: AccountInfoConfig\n ): Promise<KeyedAccount[]> {\n return getTokenAccountsByOwner(this.client, owner, filter, config);\n }\n\n async getTokenAccountsByDelegate(\n delegate: string,\n filter: TokenAccountsFilter,\n config?: AccountInfoConfig\n ): Promise<KeyedAccount[]> {\n return getTokenAccountsByDelegate(this.client, delegate, filter, config);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;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