@secretkeylabs/stacks-tools 0.8.0-44889a2 → 0.8.0-907b20e

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.cjs CHANGED
@@ -1138,8 +1138,51 @@ var pox = {
1138
1138
  poxDetails
1139
1139
  };
1140
1140
 
1141
+ // src/stacks-rpc-api/accounts/info.ts
1142
+ var info2 = async (args) => {
1143
+ const search = new URLSearchParams();
1144
+ if (args.proof === 0) search.append("proof", "0");
1145
+ if (args.tip) search.append("tip", args.tip);
1146
+ const init = {};
1147
+ if (args.apiKeyConfig) {
1148
+ init.headers = {
1149
+ [args.apiKeyConfig.header]: args.apiKeyConfig.key
1150
+ };
1151
+ }
1152
+ init.method = "GET";
1153
+ const endpoint = `${args.baseUrl}/v2/accounts/${args.principal}?${search}`;
1154
+ const res = await fetch(endpoint, init);
1155
+ if (!res.ok)
1156
+ return error({
1157
+ name: "InfoFetchError",
1158
+ message: "Failed to fetch info.",
1159
+ data: {
1160
+ init,
1161
+ status: res.status,
1162
+ statusText: res.statusText,
1163
+ endpoint,
1164
+ body: await safeExtractResponseBody(res)
1165
+ }
1166
+ });
1167
+ const [jsonError, data] = await safePromise(res.json());
1168
+ if (jsonError) {
1169
+ return error({
1170
+ name: "ParseBodyError",
1171
+ message: "Failed to parse response body as JSON.",
1172
+ data: jsonError
1173
+ });
1174
+ }
1175
+ return success(data);
1176
+ };
1177
+
1178
+ // src/stacks-rpc-api/accounts/index.ts
1179
+ var accounts2 = {
1180
+ info: info2
1181
+ };
1182
+
1141
1183
  // src/stacks-rpc-api/index.ts
1142
1184
  var stacksRpcApi = {
1185
+ accounts: accounts2,
1143
1186
  pox,
1144
1187
  smartContracts
1145
1188
  };
package/dist/index.d.cts CHANGED
@@ -18,7 +18,7 @@ type ProofAndTip = {
18
18
  /**
19
19
  * Returns object without the proof field when set to 0.
20
20
  */
21
- proof?: number;
21
+ proof?: 0 | 1;
22
22
  tip?: "latest" | string;
23
23
  };
24
24
  type ApiPaginationOptions = {
@@ -55,18 +55,18 @@ declare function flatResults<T>(results: Array<Result$1<T>>): Result$1<Array<T>>
55
55
  */
56
56
  declare function safeExtractResponseBody(response: Response): Promise<unknown>;
57
57
 
58
- type Args$n = {
58
+ type Args$o = {
59
59
  transactionId: string;
60
60
  } & ApiRequestOptions;
61
61
  type Response$9 = OperationResponse["get_raw_transaction_by_id"];
62
- declare function getRawTransaction(args: Args$n): Promise<Result$1<Response$9>>;
62
+ declare function getRawTransaction(args: Args$o): Promise<Result$1<Response$9>>;
63
63
 
64
64
  declare const getRawTransaction$1_getRawTransaction: typeof getRawTransaction;
65
65
  declare namespace getRawTransaction$1 {
66
- export { type Args$n as Args, type Response$9 as Response, getRawTransaction$1_getRawTransaction as getRawTransaction };
66
+ export { type Args$o as Args, type Response$9 as Response, getRawTransaction$1_getRawTransaction as getRawTransaction };
67
67
  }
68
68
 
69
- type Args$m = {
69
+ type Args$n = {
70
70
  /**
71
71
  * Filter to only return transactions with this sender address.
72
72
  */
@@ -91,7 +91,7 @@ type Args$m = {
91
91
  order?: "asc" | "desc";
92
92
  } & ApiRequestOptions & ApiPaginationOptions;
93
93
  type MempoolTransactionsResponse = OperationResponse["/extended/v1/tx/mempool"];
94
- declare function mempoolTransactions(args: Args$m): Promise<Result$1<MempoolTransactionsResponse, SafeError<"FetchMempoolTransactionsError" | "ParseBodyError" | "ValidateDataError">>>;
94
+ declare function mempoolTransactions(args: Args$n): Promise<Result$1<MempoolTransactionsResponse, SafeError<"FetchMempoolTransactionsError" | "ParseBodyError" | "ValidateDataError">>>;
95
95
 
96
96
  type mempoolTransactions$1_MempoolTransactionsResponse = MempoolTransactionsResponse;
97
97
  declare const mempoolTransactions$1_mempoolTransactions: typeof mempoolTransactions;
@@ -99,34 +99,34 @@ declare namespace mempoolTransactions$1 {
99
99
  export { type mempoolTransactions$1_MempoolTransactionsResponse as MempoolTransactionsResponse, mempoolTransactions$1_mempoolTransactions as mempoolTransactions };
100
100
  }
101
101
 
102
- type Args$l = {
102
+ type Args$m = {
103
103
  transactionId: string;
104
104
  } & ApiRequestOptions;
105
105
  type Response$8 = OperationResponse["get_transaction_by_id"];
106
- declare function getTransaction(args: Args$l): Promise<Result$1<Response$8>>;
106
+ declare function getTransaction(args: Args$m): Promise<Result$1<Response$8>>;
107
107
 
108
108
  declare const getTransaction$1_getTransaction: typeof getTransaction;
109
109
  declare namespace getTransaction$1 {
110
110
  export { getTransaction$1_getTransaction as getTransaction };
111
111
  }
112
112
 
113
- type Args$k = {
113
+ type Args$l = {
114
114
  address: string;
115
115
  transactionId: string;
116
116
  } & ApiRequestOptions & ApiPaginationOptions;
117
117
  type Response$7 = OperationResponse["/extended/v2/addresses/{address}/transactions/{tx_id}/events"];
118
- declare function eventsForAnAddressTransaction(args: Args$k): Promise<Result$1<Response$7>>;
118
+ declare function eventsForAnAddressTransaction(args: Args$l): Promise<Result$1<Response$7>>;
119
119
 
120
120
  declare const eventsForAnAddressTransaction$1_eventsForAnAddressTransaction: typeof eventsForAnAddressTransaction;
121
121
  declare namespace eventsForAnAddressTransaction$1 {
122
122
  export { eventsForAnAddressTransaction$1_eventsForAnAddressTransaction as eventsForAnAddressTransaction };
123
123
  }
124
124
 
125
- type Args$j = {
125
+ type Args$k = {
126
126
  address: string;
127
127
  } & ApiRequestOptions & ApiPaginationOptions;
128
128
  type Result = OperationResponse["/extended/v2/addresses/{address}/transactions"];
129
- declare function addressTransactions(args: Args$j): Promise<Result$1<Result, SafeError<"FetchAddressTransactionsError" | "ParseBodyError" | "ValidateDataError">>>;
129
+ declare function addressTransactions(args: Args$k): Promise<Result$1<Result, SafeError<"FetchAddressTransactionsError" | "ParseBodyError" | "ValidateDataError">>>;
130
130
 
131
131
  type addressTransactions$1_Result = Result;
132
132
  declare const addressTransactions$1_addressTransactions: typeof addressTransactions;
@@ -134,7 +134,7 @@ declare namespace addressTransactions$1 {
134
134
  export { type addressTransactions$1_Result as Result, addressTransactions$1_addressTransactions as addressTransactions };
135
135
  }
136
136
 
137
- type Args$i = {
137
+ type Args$j = {
138
138
  poolPrincipal: string;
139
139
  afterBlock?: string | number | bigint;
140
140
  unanchored?: boolean;
@@ -142,26 +142,26 @@ type Args$i = {
142
142
  offset?: number;
143
143
  } & ApiRequestOptions & ApiPaginationOptions;
144
144
  type Response$6 = OperationResponse["get_pool_delegations"];
145
- declare function members(args: Args$i): Promise<Result$1<Response$6>>;
145
+ declare function members(args: Args$j): Promise<Result$1<Response$6>>;
146
146
 
147
147
  declare const members$1_members: typeof members;
148
148
  declare namespace members$1 {
149
- export { type Args$i as Args, type Response$6 as Response, members$1_members as members };
149
+ export { type Args$j as Args, type Response$6 as Response, members$1_members as members };
150
150
  }
151
151
 
152
- type Args$h = {
152
+ type Args$i = {
153
153
  cycleNumber: string | number | bigint;
154
154
  signerPublicKey: string;
155
155
  } & ApiRequestOptions & ApiPaginationOptions;
156
156
  type Response$5 = OperationResponse["get_pox_cycle_signer_stackers"];
157
- declare function stackersForSignerInCycle(opts: Args$h): Promise<Result$1<Response$5, SafeError<"FetchStackersForSignerInCycleError" | "ParseBodyError">>>;
157
+ declare function stackersForSignerInCycle(opts: Args$i): Promise<Result$1<Response$5, SafeError<"FetchStackersForSignerInCycleError" | "ParseBodyError">>>;
158
158
 
159
159
  declare const stackersForSignerInCycle$1_stackersForSignerInCycle: typeof stackersForSignerInCycle;
160
160
  declare namespace stackersForSignerInCycle$1 {
161
- export { type Args$h as Args, type Response$5 as Response, stackersForSignerInCycle$1_stackersForSignerInCycle as stackersForSignerInCycle };
161
+ export { type Args$i as Args, type Response$5 as Response, stackersForSignerInCycle$1_stackersForSignerInCycle as stackersForSignerInCycle };
162
162
  }
163
163
 
164
- type Args$g = {
164
+ type Args$h = {
165
165
  cycleNumber: number;
166
166
  } & ApiRequestOptions & ApiPaginationOptions;
167
167
  declare const signerSchema: v.ObjectSchema<{
@@ -202,7 +202,7 @@ declare const signersResponseSchema: v.ObjectSchema<{
202
202
  readonly total: v.NumberSchema<undefined>;
203
203
  }, undefined>;
204
204
  type SignersResponse = v.InferOutput<typeof signersResponseSchema>;
205
- declare function signersInCycle(args: Args$g): Promise<Result$1<SignersResponse, SafeError<"FetchSignersError" | "ParseBodyError" | "ValidateDataError">>>;
205
+ declare function signersInCycle(args: Args$h): Promise<Result$1<SignersResponse, SafeError<"FetchSignersError" | "ParseBodyError" | "ValidateDataError">>>;
206
206
 
207
207
  type signersInCycle$1_Signer = Signer;
208
208
  type signersInCycle$1_SignersResponse = SignersResponse;
@@ -210,10 +210,10 @@ declare const signersInCycle$1_signerSchema: typeof signerSchema;
210
210
  declare const signersInCycle$1_signersInCycle: typeof signersInCycle;
211
211
  declare const signersInCycle$1_signersResponseSchema: typeof signersResponseSchema;
212
212
  declare namespace signersInCycle$1 {
213
- export { type Args$g as Args, type Results$1 as Results, type signersInCycle$1_Signer as Signer, type signersInCycle$1_SignersResponse as SignersResponse, resultsSchema$1 as resultsSchema, signersInCycle$1_signerSchema as signerSchema, signersInCycle$1_signersInCycle as signersInCycle, signersInCycle$1_signersResponseSchema as signersResponseSchema };
213
+ export { type Args$h as Args, type Results$1 as Results, type signersInCycle$1_Signer as Signer, type signersInCycle$1_SignersResponse as SignersResponse, resultsSchema$1 as resultsSchema, signersInCycle$1_signerSchema as signerSchema, signersInCycle$1_signersInCycle as signersInCycle, signersInCycle$1_signersResponseSchema as signersResponseSchema };
214
214
  }
215
215
 
216
- type Args$f = {
216
+ type Args$g = {
217
217
  /**
218
218
  * The signers public key as a hex string, with or without a '0x' prefix.
219
219
  */
@@ -231,16 +231,16 @@ declare const signerInCycleResponseSchema: v.ObjectSchema<{
231
231
  readonly pooled_stacker_count: v.NumberSchema<undefined>;
232
232
  }, undefined>;
233
233
  type SignerInCycleResponse = v.InferOutput<typeof signerInCycleResponseSchema>;
234
- declare function signerInCycle(args: Args$f): Promise<Result$1<SignerInCycleResponse>>;
234
+ declare function signerInCycle(args: Args$g): Promise<Result$1<SignerInCycleResponse>>;
235
235
 
236
236
  type signerInCycle$1_SignerInCycleResponse = SignerInCycleResponse;
237
237
  declare const signerInCycle$1_signerInCycle: typeof signerInCycle;
238
238
  declare const signerInCycle$1_signerInCycleResponseSchema: typeof signerInCycleResponseSchema;
239
239
  declare namespace signerInCycle$1 {
240
- export { type Args$f as Args, type signerInCycle$1_SignerInCycleResponse as SignerInCycleResponse, signerInCycle$1_signerInCycle as signerInCycle, signerInCycle$1_signerInCycleResponseSchema as signerInCycleResponseSchema };
240
+ export { type Args$g as Args, type signerInCycle$1_SignerInCycleResponse as SignerInCycleResponse, signerInCycle$1_signerInCycle as signerInCycle, signerInCycle$1_signerInCycleResponseSchema as signerInCycleResponseSchema };
241
241
  }
242
242
 
243
- type Args$e = ApiRequestOptions & ApiPaginationOptions;
243
+ type Args$f = ApiRequestOptions & ApiPaginationOptions;
244
244
  declare const cycleInfoSchema: v.ObjectSchema<{
245
245
  readonly block_height: v.NumberSchema<undefined>;
246
246
  readonly index_block_hash: v.StringSchema<undefined>;
@@ -273,7 +273,7 @@ declare const cyclesResponseSchema: v.ObjectSchema<{
273
273
  readonly total: v.NumberSchema<undefined>;
274
274
  }, undefined>;
275
275
  type CyclesResponse = v.InferOutput<typeof cyclesResponseSchema>;
276
- declare function cycles(args: Args$e): Promise<Result$1<CyclesResponse>>;
276
+ declare function cycles(args: Args$f): Promise<Result$1<CyclesResponse>>;
277
277
 
278
278
  type cycles$1_CycleInfo = CycleInfo;
279
279
  type cycles$1_CyclesResponse = CyclesResponse;
@@ -283,10 +283,10 @@ declare const cycles$1_cycles: typeof cycles;
283
283
  declare const cycles$1_cyclesResponseSchema: typeof cyclesResponseSchema;
284
284
  declare const cycles$1_resultsSchema: typeof resultsSchema;
285
285
  declare namespace cycles$1 {
286
- export { type Args$e as Args, type cycles$1_CycleInfo as CycleInfo, type cycles$1_CyclesResponse as CyclesResponse, type cycles$1_Results as Results, cycles$1_cycleInfoSchema as cycleInfoSchema, cycles$1_cycles as cycles, cycles$1_cyclesResponseSchema as cyclesResponseSchema, cycles$1_resultsSchema as resultsSchema };
286
+ export { type Args$f as Args, type cycles$1_CycleInfo as CycleInfo, type cycles$1_CyclesResponse as CyclesResponse, type cycles$1_Results as Results, cycles$1_cycleInfoSchema as cycleInfoSchema, cycles$1_cycles as cycles, cycles$1_cyclesResponseSchema as cyclesResponseSchema, cycles$1_resultsSchema as resultsSchema };
287
287
  }
288
288
 
289
- type Args$d = {
289
+ type Args$e = {
290
290
  cycleNumber: number;
291
291
  } & ApiRequestOptions;
292
292
  declare const responseSchema$1: v.ObjectSchema<{
@@ -298,11 +298,11 @@ declare const responseSchema$1: v.ObjectSchema<{
298
298
  readonly total_signers: v.NumberSchema<undefined>;
299
299
  }, undefined>;
300
300
  type Response$4 = v.InferOutput<typeof responseSchema$1>;
301
- declare function cycle(opts: Args$d): Promise<Result$1<Response$4, SafeError<"FetchCycleError" | "ParseBodyError" | "ValidateDataError">>>;
301
+ declare function cycle(opts: Args$e): Promise<Result$1<Response$4, SafeError<"FetchCycleError" | "ParseBodyError" | "ValidateDataError">>>;
302
302
 
303
303
  declare const cycle$1_cycle: typeof cycle;
304
304
  declare namespace cycle$1 {
305
- export { type Args$d as Args, type Response$4 as Response, cycle$1_cycle as cycle, responseSchema$1 as responseSchema };
305
+ export { type Args$e as Args, type Response$4 as Response, cycle$1_cycle as cycle, responseSchema$1 as responseSchema };
306
306
  }
307
307
 
308
308
  type FeePrioritiesResponse = {
@@ -364,40 +364,40 @@ declare namespace coreApi$1 {
364
364
  export { type coreApi$1_CoreApiResponse as CoreApiResponse, coreApi$1_coreApi as coreApi };
365
365
  }
366
366
 
367
- type Args$c = {
367
+ type Args$d = {
368
368
  address: string;
369
369
  stacking?: boolean;
370
370
  } & ApiRequestOptions;
371
- declare function stx(opts: Args$c): Promise<Result$1<any>>;
371
+ declare function stx(opts: Args$d): Promise<Result$1<any>>;
372
372
 
373
373
  declare const stx$1_stx: typeof stx;
374
374
  declare namespace stx$1 {
375
- export { type Args$c as Args, stx$1_stx as stx };
375
+ export { type Args$d as Args, stx$1_stx as stx };
376
376
  }
377
377
 
378
- type Args$b = {
378
+ type Args$c = {
379
379
  heightOrHash: string | number | bigint;
380
380
  } & ApiRequestOptions;
381
381
  type Response$3 = OperationResponse["get_burn_block"];
382
- declare function getBurnBlock(args: Args$b): Promise<Result$1<Response$3>>;
382
+ declare function getBurnBlock(args: Args$c): Promise<Result$1<Response$3>>;
383
383
 
384
384
  declare const getBurnBlock$1_getBurnBlock: typeof getBurnBlock;
385
385
  declare namespace getBurnBlock$1 {
386
- export { type Args$b as Args, type Response$3 as Response, getBurnBlock$1_getBurnBlock as getBurnBlock };
386
+ export { type Args$c as Args, type Response$3 as Response, getBurnBlock$1_getBurnBlock as getBurnBlock };
387
387
  }
388
388
 
389
- type Args$a = {
389
+ type Args$b = {
390
390
  heightOrHash: string | number;
391
391
  } & ApiRequestOptions;
392
392
  type Response$2 = OperationResponse["get_block"];
393
- declare function getBlock(opts: Args$a): Promise<Result$1<Response$2>>;
393
+ declare function getBlock(opts: Args$b): Promise<Result$1<Response$2>>;
394
394
 
395
395
  declare const getBlock$1_getBlock: typeof getBlock;
396
396
  declare namespace getBlock$1 {
397
- export { type Args$a as Args, type Response$2 as Response, getBlock$1_getBlock as getBlock };
397
+ export { type Args$b as Args, type Response$2 as Response, getBlock$1_getBlock as getBlock };
398
398
  }
399
399
 
400
- type Args$9 = {
400
+ type Args$a = {
401
401
  principal: string;
402
402
  } & ApiRequestOptions;
403
403
  declare const responseSchema: v.ObjectSchema<{
@@ -408,70 +408,68 @@ declare const responseSchema: v.ObjectSchema<{
408
408
  readonly detected_mempool_nonces: v.ArraySchema<v.NumberSchema<undefined>, undefined>;
409
409
  }, undefined>;
410
410
  type Response$1 = v.InferOutput<typeof responseSchema>;
411
- declare function latestNonce(opts: Args$9): Promise<Result$1<Response$1, SafeError<"FetchLatestNonceError" | "ParseBodyError" | "ValidateDataError">>>;
411
+ declare function latestNonce(opts: Args$a): Promise<Result$1<Response$1, SafeError<"FetchLatestNonceError" | "ParseBodyError" | "ValidateDataError">>>;
412
412
 
413
413
  declare const latestNonce$1_latestNonce: typeof latestNonce;
414
414
  declare const latestNonce$1_responseSchema: typeof responseSchema;
415
415
  declare namespace latestNonce$1 {
416
- export { type Args$9 as Args, type Response$1 as Response, latestNonce$1_latestNonce as latestNonce, latestNonce$1_responseSchema as responseSchema };
416
+ export { type Args$a as Args, type Response$1 as Response, latestNonce$1_latestNonce as latestNonce, latestNonce$1_responseSchema as responseSchema };
417
417
  }
418
418
 
419
- type Args$8 = {
419
+ type Args$9 = {
420
420
  principal: string;
421
421
  unanchored?: boolean;
422
422
  untilBlock?: number;
423
423
  } & ApiRequestOptions;
424
- declare function balances(opts: Args$8): Promise<Result$1<OperationResponse["get_account_balance"], SafeError<"FetchBalancesError" | "ParseBodyError" | "ValidateDataError">>>;
424
+ declare function balances(opts: Args$9): Promise<Result$1<OperationResponse["get_account_balance"], SafeError<"FetchBalancesError" | "ParseBodyError" | "ValidateDataError">>>;
425
425
 
426
426
  declare const balances$1_balances: typeof balances;
427
427
  declare namespace balances$1 {
428
- export { type Args$8 as Args, balances$1_balances as balances };
428
+ export { type Args$9 as Args, balances$1_balances as balances };
429
429
  }
430
430
 
431
- declare const accounts: {
431
+ declare const accounts$1: {
432
432
  balances: typeof balances;
433
433
  latestNonce: typeof latestNonce;
434
434
  };
435
435
 
436
- declare const index$f_accounts: typeof accounts;
437
- declare namespace index$f {
438
- export { balances$1 as Balances, latestNonce$1 as LatestNonce, index$f_accounts as accounts };
436
+ declare namespace index$g {
437
+ export { balances$1 as Balances, latestNonce$1 as LatestNonce, accounts$1 as accounts };
439
438
  }
440
439
 
441
440
  declare const blocks: {
442
441
  getBlock: typeof getBlock;
443
442
  };
444
443
 
445
- declare const index$e_blocks: typeof blocks;
446
- declare namespace index$e {
447
- export { getBlock$1 as GetBlock, index$e_blocks as blocks };
444
+ declare const index$f_blocks: typeof blocks;
445
+ declare namespace index$f {
446
+ export { getBlock$1 as GetBlock, index$f_blocks as blocks };
448
447
  }
449
448
 
450
449
  declare const burnBlocks: {
451
450
  getBurnBlock: typeof getBurnBlock;
452
451
  };
453
452
 
454
- declare const index$d_burnBlocks: typeof burnBlocks;
455
- declare namespace index$d {
456
- export { getBurnBlock$1 as GetBurnBlock, index$d_burnBlocks as burnBlocks };
453
+ declare const index$e_burnBlocks: typeof burnBlocks;
454
+ declare namespace index$e {
455
+ export { getBurnBlock$1 as GetBurnBlock, index$e_burnBlocks as burnBlocks };
457
456
  }
458
457
 
459
458
  declare const faucets: {
460
459
  stx: typeof stx;
461
460
  };
462
461
 
463
- declare const index$c_faucets: typeof faucets;
464
- declare namespace index$c {
465
- export { stx$1 as Stx, index$c_faucets as faucets };
462
+ declare const index$d_faucets: typeof faucets;
463
+ declare namespace index$d {
464
+ export { stx$1 as Stx, index$d_faucets as faucets };
466
465
  }
467
466
 
468
- declare const info: {
467
+ declare const info$2: {
469
468
  coreApi: typeof coreApi;
470
469
  };
471
470
 
472
- declare const index$b_info: typeof info;
473
- declare namespace index$b {
474
- export { coreApi$1 as CoreApi, index$b_info as info };
471
+ declare namespace index$c {
472
+ export { coreApi$1 as CoreApi, info$2 as info };
475
473
  }
476
474
 
477
475
  declare const proofOfTransfer: {
@@ -482,18 +480,18 @@ declare const proofOfTransfer: {
482
480
  stackersForSignerInCycle: typeof stackersForSignerInCycle;
483
481
  };
484
482
 
485
- declare const index$a_proofOfTransfer: typeof proofOfTransfer;
486
- declare namespace index$a {
487
- export { cycle$1 as Cycle, cycles$1 as Cycles, signerInCycle$1 as SignerInCycle, signersInCycle$1 as SignersInCycle, stackersForSignerInCycle$1 as StackersForSignerInCycle, index$a_proofOfTransfer as proofOfTransfer };
483
+ declare const index$b_proofOfTransfer: typeof proofOfTransfer;
484
+ declare namespace index$b {
485
+ export { cycle$1 as Cycle, cycles$1 as Cycles, signerInCycle$1 as SignerInCycle, signersInCycle$1 as SignersInCycle, stackersForSignerInCycle$1 as StackersForSignerInCycle, index$b_proofOfTransfer as proofOfTransfer };
488
486
  }
489
487
 
490
488
  declare const stackingPool: {
491
489
  members: typeof members;
492
490
  };
493
491
 
494
- declare const index$9_stackingPool: typeof stackingPool;
495
- declare namespace index$9 {
496
- export { members$1 as Members, index$9_stackingPool as stackingPool };
492
+ declare const index$a_stackingPool: typeof stackingPool;
493
+ declare namespace index$a {
494
+ export { members$1 as Members, index$a_stackingPool as stackingPool };
497
495
  }
498
496
 
499
497
  declare const transactions: {
@@ -504,18 +502,18 @@ declare const transactions: {
504
502
  getRawTransaction: typeof getRawTransaction;
505
503
  };
506
504
 
507
- declare const index$8_transactions: typeof transactions;
508
- declare namespace index$8 {
509
- export { addressTransactions$1 as AddressTransactions, eventsForAnAddressTransaction$1 as EventsForAnAddressTransaction, getRawTransaction$1 as GetRawTransaction, getTransaction$1 as GetTransaction, mempoolTransactions$1 as MempoolTransactions, index$8_transactions as transactions };
505
+ declare const index$9_transactions: typeof transactions;
506
+ declare namespace index$9 {
507
+ export { addressTransactions$1 as AddressTransactions, eventsForAnAddressTransaction$1 as EventsForAnAddressTransaction, getRawTransaction$1 as GetRawTransaction, getTransaction$1 as GetTransaction, mempoolTransactions$1 as MempoolTransactions, index$9_transactions as transactions };
510
508
  }
511
509
 
512
510
  declare const mempool: {
513
511
  transactionFeePriorities: typeof transactionFeePriorities;
514
512
  };
515
513
 
516
- declare const index$7_mempool: typeof mempool;
517
- declare namespace index$7 {
518
- export { transactionFeePriorities$1 as TransactionFeePriorities, index$7_mempool as mempool };
514
+ declare const index$8_mempool: typeof mempool;
515
+ declare namespace index$8 {
516
+ export { transactionFeePriorities$1 as TransactionFeePriorities, index$8_mempool as mempool };
519
517
  }
520
518
 
521
519
  declare const stacksApi: {
@@ -557,12 +555,12 @@ declare const stacksApi: {
557
555
  };
558
556
  };
559
557
 
560
- declare const index$6_stacksApi: typeof stacksApi;
561
- declare namespace index$6 {
562
- export { index$f as Accounts, index$e as Blocks, index$d as BurnBlocks, index$c as Faucets, index$b as Info, index$7 as Mempool, index$a as ProofOfTransfer, index$9 as StackingPool, index$8 as Transactions, index$6_stacksApi as stacksApi };
558
+ declare const index$7_stacksApi: typeof stacksApi;
559
+ declare namespace index$7 {
560
+ export { index$g as Accounts, index$f as Blocks, index$e as BurnBlocks, index$d as Faucets, index$c as Info, index$8 as Mempool, index$b as ProofOfTransfer, index$a as StackingPool, index$9 as Transactions, index$7_stacksApi as stacksApi };
563
561
  }
564
562
 
565
- type Args$7 = {
563
+ type Args$8 = {
566
564
  sender: string;
567
565
  arguments: string[];
568
566
  contractAddress: string;
@@ -579,15 +577,15 @@ interface ReadOnlyContractCallFailResponse {
579
577
  }
580
578
  type ReadOnlyContractCallResponse = ReadOnlyContractCallSuccessResponse | ReadOnlyContractCallFailResponse;
581
579
  type ReadOnlyResponse = ReadOnlyContractCallResponse;
582
- declare function readOnly$1(args: Args$7): Promise<Result$1<ReadOnlyResponse>>;
580
+ declare function readOnly$1(args: Args$8): Promise<Result$1<ReadOnlyResponse>>;
583
581
 
584
582
  type readOnly$2_ReadOnlyContractCallResponse = ReadOnlyContractCallResponse;
585
583
  type readOnly$2_ReadOnlyResponse = ReadOnlyResponse;
586
584
  declare namespace readOnly$2 {
587
- export { type Args$7 as Args, type readOnly$2_ReadOnlyContractCallResponse as ReadOnlyContractCallResponse, type readOnly$2_ReadOnlyResponse as ReadOnlyResponse, readOnly$1 as readOnly };
585
+ export { type Args$8 as Args, type readOnly$2_ReadOnlyContractCallResponse as ReadOnlyContractCallResponse, type readOnly$2_ReadOnlyResponse as ReadOnlyResponse, readOnly$1 as readOnly };
588
586
  }
589
587
 
590
- type Args$6 = {
588
+ type Args$7 = {
591
589
  contractAddress: string;
592
590
  contractName: string;
593
591
  mapName: string;
@@ -607,28 +605,28 @@ declare const mapEntryResponseSchema: v.ObjectSchema<{
607
605
  readonly proof: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
608
606
  }, undefined>;
609
607
  type MapEntryResponse = v.InferOutput<typeof mapEntryResponseSchema>;
610
- declare function mapEntry(args: Args$6): Promise<Result$1<MapEntryResponse>>;
608
+ declare function mapEntry(args: Args$7): Promise<Result$1<MapEntryResponse>>;
611
609
 
612
610
  type mapEntry$1_MapEntryResponse = MapEntryResponse;
613
611
  declare const mapEntry$1_mapEntry: typeof mapEntry;
614
612
  declare namespace mapEntry$1 {
615
- export { type Args$6 as Args, type mapEntry$1_MapEntryResponse as MapEntryResponse, mapEntry$1_mapEntry as mapEntry };
613
+ export { type Args$7 as Args, type mapEntry$1_MapEntryResponse as MapEntryResponse, mapEntry$1_mapEntry as mapEntry };
616
614
  }
617
615
 
618
- type Args$5 = {
616
+ type Args$6 = {
619
617
  contractAddress: string;
620
618
  contractName: string;
621
619
  } & ApiRequestOptions & ProofAndTip;
622
620
  type InterfaceResponse = ClarityAbi;
623
- declare function contractInterface(args: Args$5): Promise<Result$1<InterfaceResponse>>;
621
+ declare function contractInterface(args: Args$6): Promise<Result$1<InterfaceResponse>>;
624
622
 
625
623
  type _interface_InterfaceResponse = InterfaceResponse;
626
624
  declare const _interface_contractInterface: typeof contractInterface;
627
625
  declare namespace _interface {
628
- export { type Args$5 as Args, type _interface_InterfaceResponse as InterfaceResponse, _interface_contractInterface as contractInterface };
626
+ export { type Args$6 as Args, type _interface_InterfaceResponse as InterfaceResponse, _interface_contractInterface as contractInterface };
629
627
  }
630
628
 
631
- type Args$4 = ApiRequestOptions;
629
+ type Args$5 = ApiRequestOptions;
632
630
  /**
633
631
  * Get Proof of Transfer (PoX) information
634
632
  */
@@ -773,7 +771,7 @@ interface CoreNodePoxResponse {
773
771
  }[];
774
772
  }
775
773
  type PoxDetailsResponse = CoreNodePoxResponse;
776
- declare function poxDetails(args: Args$4): Promise<Result$1<PoxDetailsResponse>>;
774
+ declare function poxDetails(args: Args$5): Promise<Result$1<PoxDetailsResponse>>;
777
775
 
778
776
  type poxDetails$1_CoreNodePoxResponse = CoreNodePoxResponse;
779
777
  type poxDetails$1_PoxDetailsResponse = PoxDetailsResponse;
@@ -782,27 +780,105 @@ declare namespace poxDetails$1 {
782
780
  export { type poxDetails$1_CoreNodePoxResponse as CoreNodePoxResponse, type poxDetails$1_PoxDetailsResponse as PoxDetailsResponse, poxDetails$1_poxDetails as poxDetails };
783
781
  }
784
782
 
783
+ type Args$4 = {
784
+ /** Stacks principal. */
785
+ principal: string;
786
+ } & ApiRequestOptions & ProofAndTip;
787
+ type InfoResponse = {
788
+ /** Micro-STX as a hex-encoded string. */
789
+ balance: string;
790
+ /** Micro-STX as a hex-encoded string. */
791
+ locked: string;
792
+ unlock_height: number;
793
+ nonce: number;
794
+ balance_proof: string;
795
+ nonce_proof: string;
796
+ };
797
+ type InfoReturn = Promise<InfoResponse>;
798
+ declare const info: (args: Args$4) => Promise<[null, unknown] | [{
799
+ readonly name: "InfoFetchError";
800
+ readonly message: "Failed to fetch info.";
801
+ readonly data: {
802
+ readonly init: RequestInit;
803
+ readonly status: number;
804
+ readonly statusText: string;
805
+ readonly endpoint: string;
806
+ readonly body: unknown;
807
+ };
808
+ }, null] | [{
809
+ readonly name: "ParseBodyError";
810
+ readonly message: "Failed to parse response body as JSON.";
811
+ readonly data: SafeError<"SafeError", unknown>;
812
+ }, null]>;
813
+
814
+ type info$1_InfoResponse = InfoResponse;
815
+ type info$1_InfoReturn = InfoReturn;
816
+ declare const info$1_info: typeof info;
817
+ declare namespace info$1 {
818
+ export { type Args$4 as Args, type info$1_InfoResponse as InfoResponse, type info$1_InfoReturn as InfoReturn, info$1_info as info };
819
+ }
820
+
785
821
  declare const smartContracts: {
786
822
  contractInterface: typeof contractInterface;
787
823
  mapEntry: typeof mapEntry;
788
824
  readOnly: typeof readOnly$1;
789
825
  };
790
826
 
791
- declare const index$5_smartContracts: typeof smartContracts;
792
- declare namespace index$5 {
793
- export { _interface as ContractInterface, mapEntry$1 as MapEntry, readOnly$2 as ReadOnly, index$5_smartContracts as smartContracts };
827
+ declare const index$6_smartContracts: typeof smartContracts;
828
+ declare namespace index$6 {
829
+ export { _interface as ContractInterface, mapEntry$1 as MapEntry, readOnly$2 as ReadOnly, index$6_smartContracts as smartContracts };
794
830
  }
795
831
 
796
832
  declare const pox: {
797
833
  poxDetails: typeof poxDetails;
798
834
  };
799
835
 
800
- declare const index$4_pox: typeof pox;
836
+ declare const index$5_pox: typeof pox;
837
+ declare namespace index$5 {
838
+ export { poxDetails$1 as PoxDetails, index$5_pox as pox };
839
+ }
840
+
841
+ declare const accounts: {
842
+ info: (args: Args$4) => Promise<[null, unknown] | [{
843
+ readonly name: "InfoFetchError";
844
+ readonly message: "Failed to fetch info.";
845
+ readonly data: {
846
+ readonly init: RequestInit;
847
+ readonly status: number;
848
+ readonly statusText: string;
849
+ readonly endpoint: string;
850
+ readonly body: unknown;
851
+ };
852
+ }, null] | [{
853
+ readonly name: "ParseBodyError";
854
+ readonly message: "Failed to parse response body as JSON.";
855
+ readonly data: SafeError<"SafeError", unknown>;
856
+ }, null]>;
857
+ };
858
+
859
+ declare const index$4_accounts: typeof accounts;
801
860
  declare namespace index$4 {
802
- export { poxDetails$1 as PoxDetails, index$4_pox as pox };
861
+ export { info$1 as Info, index$4_accounts as accounts };
803
862
  }
804
863
 
805
864
  declare const stacksRpcApi: {
865
+ accounts: {
866
+ info: (args: Args$4) => Promise<[null, unknown] | [{
867
+ readonly name: "InfoFetchError";
868
+ readonly message: "Failed to fetch info.";
869
+ readonly data: {
870
+ readonly init: RequestInit;
871
+ readonly status: number;
872
+ readonly statusText: string;
873
+ readonly endpoint: string;
874
+ readonly body: unknown;
875
+ };
876
+ }, null] | [{
877
+ readonly name: "ParseBodyError";
878
+ readonly message: "Failed to parse response body as JSON.";
879
+ readonly data: SafeError<"SafeError", unknown>;
880
+ }, null]>;
881
+ };
806
882
  pox: {
807
883
  poxDetails: typeof poxDetails;
808
884
  };
@@ -815,7 +891,7 @@ declare const stacksRpcApi: {
815
891
 
816
892
  declare const index$3_stacksRpcApi: typeof stacksRpcApi;
817
893
  declare namespace index$3 {
818
- export { index$4 as Pox, index$5 as SmartContracts, index$3_stacksRpcApi as stacksRpcApi };
894
+ export { index$4 as Accounts, index$5 as Pox, index$6 as SmartContracts, index$3_stacksRpcApi as stacksRpcApi };
819
895
  }
820
896
 
821
897
  type Identifier = {
@@ -954,4 +1030,4 @@ declare namespace index {
954
1030
  export { index$2 as Maps, index$1 as ReadOnly, index_pox4Api as pox4Api };
955
1031
  }
956
1032
 
957
- export { index as Pox4Api, type Result$1 as Result, type SafeError, index$6 as StacksApi, index$3 as StacksRpcApi, callRateLimitedApi, error, flatResults, pox4Api, queries, safeBackOff, safeCall, safeCallRateLimitedApi, safeExtractResponseBody, safePromise, stacksApi, stacksRpcApi, success };
1033
+ export { index as Pox4Api, type Result$1 as Result, type SafeError, index$7 as StacksApi, index$3 as StacksRpcApi, callRateLimitedApi, error, flatResults, pox4Api, queries, safeBackOff, safeCall, safeCallRateLimitedApi, safeExtractResponseBody, safePromise, stacksApi, stacksRpcApi, success };
package/dist/index.d.ts CHANGED
@@ -18,7 +18,7 @@ type ProofAndTip = {
18
18
  /**
19
19
  * Returns object without the proof field when set to 0.
20
20
  */
21
- proof?: number;
21
+ proof?: 0 | 1;
22
22
  tip?: "latest" | string;
23
23
  };
24
24
  type ApiPaginationOptions = {
@@ -55,18 +55,18 @@ declare function flatResults<T>(results: Array<Result$1<T>>): Result$1<Array<T>>
55
55
  */
56
56
  declare function safeExtractResponseBody(response: Response): Promise<unknown>;
57
57
 
58
- type Args$n = {
58
+ type Args$o = {
59
59
  transactionId: string;
60
60
  } & ApiRequestOptions;
61
61
  type Response$9 = OperationResponse["get_raw_transaction_by_id"];
62
- declare function getRawTransaction(args: Args$n): Promise<Result$1<Response$9>>;
62
+ declare function getRawTransaction(args: Args$o): Promise<Result$1<Response$9>>;
63
63
 
64
64
  declare const getRawTransaction$1_getRawTransaction: typeof getRawTransaction;
65
65
  declare namespace getRawTransaction$1 {
66
- export { type Args$n as Args, type Response$9 as Response, getRawTransaction$1_getRawTransaction as getRawTransaction };
66
+ export { type Args$o as Args, type Response$9 as Response, getRawTransaction$1_getRawTransaction as getRawTransaction };
67
67
  }
68
68
 
69
- type Args$m = {
69
+ type Args$n = {
70
70
  /**
71
71
  * Filter to only return transactions with this sender address.
72
72
  */
@@ -91,7 +91,7 @@ type Args$m = {
91
91
  order?: "asc" | "desc";
92
92
  } & ApiRequestOptions & ApiPaginationOptions;
93
93
  type MempoolTransactionsResponse = OperationResponse["/extended/v1/tx/mempool"];
94
- declare function mempoolTransactions(args: Args$m): Promise<Result$1<MempoolTransactionsResponse, SafeError<"FetchMempoolTransactionsError" | "ParseBodyError" | "ValidateDataError">>>;
94
+ declare function mempoolTransactions(args: Args$n): Promise<Result$1<MempoolTransactionsResponse, SafeError<"FetchMempoolTransactionsError" | "ParseBodyError" | "ValidateDataError">>>;
95
95
 
96
96
  type mempoolTransactions$1_MempoolTransactionsResponse = MempoolTransactionsResponse;
97
97
  declare const mempoolTransactions$1_mempoolTransactions: typeof mempoolTransactions;
@@ -99,34 +99,34 @@ declare namespace mempoolTransactions$1 {
99
99
  export { type mempoolTransactions$1_MempoolTransactionsResponse as MempoolTransactionsResponse, mempoolTransactions$1_mempoolTransactions as mempoolTransactions };
100
100
  }
101
101
 
102
- type Args$l = {
102
+ type Args$m = {
103
103
  transactionId: string;
104
104
  } & ApiRequestOptions;
105
105
  type Response$8 = OperationResponse["get_transaction_by_id"];
106
- declare function getTransaction(args: Args$l): Promise<Result$1<Response$8>>;
106
+ declare function getTransaction(args: Args$m): Promise<Result$1<Response$8>>;
107
107
 
108
108
  declare const getTransaction$1_getTransaction: typeof getTransaction;
109
109
  declare namespace getTransaction$1 {
110
110
  export { getTransaction$1_getTransaction as getTransaction };
111
111
  }
112
112
 
113
- type Args$k = {
113
+ type Args$l = {
114
114
  address: string;
115
115
  transactionId: string;
116
116
  } & ApiRequestOptions & ApiPaginationOptions;
117
117
  type Response$7 = OperationResponse["/extended/v2/addresses/{address}/transactions/{tx_id}/events"];
118
- declare function eventsForAnAddressTransaction(args: Args$k): Promise<Result$1<Response$7>>;
118
+ declare function eventsForAnAddressTransaction(args: Args$l): Promise<Result$1<Response$7>>;
119
119
 
120
120
  declare const eventsForAnAddressTransaction$1_eventsForAnAddressTransaction: typeof eventsForAnAddressTransaction;
121
121
  declare namespace eventsForAnAddressTransaction$1 {
122
122
  export { eventsForAnAddressTransaction$1_eventsForAnAddressTransaction as eventsForAnAddressTransaction };
123
123
  }
124
124
 
125
- type Args$j = {
125
+ type Args$k = {
126
126
  address: string;
127
127
  } & ApiRequestOptions & ApiPaginationOptions;
128
128
  type Result = OperationResponse["/extended/v2/addresses/{address}/transactions"];
129
- declare function addressTransactions(args: Args$j): Promise<Result$1<Result, SafeError<"FetchAddressTransactionsError" | "ParseBodyError" | "ValidateDataError">>>;
129
+ declare function addressTransactions(args: Args$k): Promise<Result$1<Result, SafeError<"FetchAddressTransactionsError" | "ParseBodyError" | "ValidateDataError">>>;
130
130
 
131
131
  type addressTransactions$1_Result = Result;
132
132
  declare const addressTransactions$1_addressTransactions: typeof addressTransactions;
@@ -134,7 +134,7 @@ declare namespace addressTransactions$1 {
134
134
  export { type addressTransactions$1_Result as Result, addressTransactions$1_addressTransactions as addressTransactions };
135
135
  }
136
136
 
137
- type Args$i = {
137
+ type Args$j = {
138
138
  poolPrincipal: string;
139
139
  afterBlock?: string | number | bigint;
140
140
  unanchored?: boolean;
@@ -142,26 +142,26 @@ type Args$i = {
142
142
  offset?: number;
143
143
  } & ApiRequestOptions & ApiPaginationOptions;
144
144
  type Response$6 = OperationResponse["get_pool_delegations"];
145
- declare function members(args: Args$i): Promise<Result$1<Response$6>>;
145
+ declare function members(args: Args$j): Promise<Result$1<Response$6>>;
146
146
 
147
147
  declare const members$1_members: typeof members;
148
148
  declare namespace members$1 {
149
- export { type Args$i as Args, type Response$6 as Response, members$1_members as members };
149
+ export { type Args$j as Args, type Response$6 as Response, members$1_members as members };
150
150
  }
151
151
 
152
- type Args$h = {
152
+ type Args$i = {
153
153
  cycleNumber: string | number | bigint;
154
154
  signerPublicKey: string;
155
155
  } & ApiRequestOptions & ApiPaginationOptions;
156
156
  type Response$5 = OperationResponse["get_pox_cycle_signer_stackers"];
157
- declare function stackersForSignerInCycle(opts: Args$h): Promise<Result$1<Response$5, SafeError<"FetchStackersForSignerInCycleError" | "ParseBodyError">>>;
157
+ declare function stackersForSignerInCycle(opts: Args$i): Promise<Result$1<Response$5, SafeError<"FetchStackersForSignerInCycleError" | "ParseBodyError">>>;
158
158
 
159
159
  declare const stackersForSignerInCycle$1_stackersForSignerInCycle: typeof stackersForSignerInCycle;
160
160
  declare namespace stackersForSignerInCycle$1 {
161
- export { type Args$h as Args, type Response$5 as Response, stackersForSignerInCycle$1_stackersForSignerInCycle as stackersForSignerInCycle };
161
+ export { type Args$i as Args, type Response$5 as Response, stackersForSignerInCycle$1_stackersForSignerInCycle as stackersForSignerInCycle };
162
162
  }
163
163
 
164
- type Args$g = {
164
+ type Args$h = {
165
165
  cycleNumber: number;
166
166
  } & ApiRequestOptions & ApiPaginationOptions;
167
167
  declare const signerSchema: v.ObjectSchema<{
@@ -202,7 +202,7 @@ declare const signersResponseSchema: v.ObjectSchema<{
202
202
  readonly total: v.NumberSchema<undefined>;
203
203
  }, undefined>;
204
204
  type SignersResponse = v.InferOutput<typeof signersResponseSchema>;
205
- declare function signersInCycle(args: Args$g): Promise<Result$1<SignersResponse, SafeError<"FetchSignersError" | "ParseBodyError" | "ValidateDataError">>>;
205
+ declare function signersInCycle(args: Args$h): Promise<Result$1<SignersResponse, SafeError<"FetchSignersError" | "ParseBodyError" | "ValidateDataError">>>;
206
206
 
207
207
  type signersInCycle$1_Signer = Signer;
208
208
  type signersInCycle$1_SignersResponse = SignersResponse;
@@ -210,10 +210,10 @@ declare const signersInCycle$1_signerSchema: typeof signerSchema;
210
210
  declare const signersInCycle$1_signersInCycle: typeof signersInCycle;
211
211
  declare const signersInCycle$1_signersResponseSchema: typeof signersResponseSchema;
212
212
  declare namespace signersInCycle$1 {
213
- export { type Args$g as Args, type Results$1 as Results, type signersInCycle$1_Signer as Signer, type signersInCycle$1_SignersResponse as SignersResponse, resultsSchema$1 as resultsSchema, signersInCycle$1_signerSchema as signerSchema, signersInCycle$1_signersInCycle as signersInCycle, signersInCycle$1_signersResponseSchema as signersResponseSchema };
213
+ export { type Args$h as Args, type Results$1 as Results, type signersInCycle$1_Signer as Signer, type signersInCycle$1_SignersResponse as SignersResponse, resultsSchema$1 as resultsSchema, signersInCycle$1_signerSchema as signerSchema, signersInCycle$1_signersInCycle as signersInCycle, signersInCycle$1_signersResponseSchema as signersResponseSchema };
214
214
  }
215
215
 
216
- type Args$f = {
216
+ type Args$g = {
217
217
  /**
218
218
  * The signers public key as a hex string, with or without a '0x' prefix.
219
219
  */
@@ -231,16 +231,16 @@ declare const signerInCycleResponseSchema: v.ObjectSchema<{
231
231
  readonly pooled_stacker_count: v.NumberSchema<undefined>;
232
232
  }, undefined>;
233
233
  type SignerInCycleResponse = v.InferOutput<typeof signerInCycleResponseSchema>;
234
- declare function signerInCycle(args: Args$f): Promise<Result$1<SignerInCycleResponse>>;
234
+ declare function signerInCycle(args: Args$g): Promise<Result$1<SignerInCycleResponse>>;
235
235
 
236
236
  type signerInCycle$1_SignerInCycleResponse = SignerInCycleResponse;
237
237
  declare const signerInCycle$1_signerInCycle: typeof signerInCycle;
238
238
  declare const signerInCycle$1_signerInCycleResponseSchema: typeof signerInCycleResponseSchema;
239
239
  declare namespace signerInCycle$1 {
240
- export { type Args$f as Args, type signerInCycle$1_SignerInCycleResponse as SignerInCycleResponse, signerInCycle$1_signerInCycle as signerInCycle, signerInCycle$1_signerInCycleResponseSchema as signerInCycleResponseSchema };
240
+ export { type Args$g as Args, type signerInCycle$1_SignerInCycleResponse as SignerInCycleResponse, signerInCycle$1_signerInCycle as signerInCycle, signerInCycle$1_signerInCycleResponseSchema as signerInCycleResponseSchema };
241
241
  }
242
242
 
243
- type Args$e = ApiRequestOptions & ApiPaginationOptions;
243
+ type Args$f = ApiRequestOptions & ApiPaginationOptions;
244
244
  declare const cycleInfoSchema: v.ObjectSchema<{
245
245
  readonly block_height: v.NumberSchema<undefined>;
246
246
  readonly index_block_hash: v.StringSchema<undefined>;
@@ -273,7 +273,7 @@ declare const cyclesResponseSchema: v.ObjectSchema<{
273
273
  readonly total: v.NumberSchema<undefined>;
274
274
  }, undefined>;
275
275
  type CyclesResponse = v.InferOutput<typeof cyclesResponseSchema>;
276
- declare function cycles(args: Args$e): Promise<Result$1<CyclesResponse>>;
276
+ declare function cycles(args: Args$f): Promise<Result$1<CyclesResponse>>;
277
277
 
278
278
  type cycles$1_CycleInfo = CycleInfo;
279
279
  type cycles$1_CyclesResponse = CyclesResponse;
@@ -283,10 +283,10 @@ declare const cycles$1_cycles: typeof cycles;
283
283
  declare const cycles$1_cyclesResponseSchema: typeof cyclesResponseSchema;
284
284
  declare const cycles$1_resultsSchema: typeof resultsSchema;
285
285
  declare namespace cycles$1 {
286
- export { type Args$e as Args, type cycles$1_CycleInfo as CycleInfo, type cycles$1_CyclesResponse as CyclesResponse, type cycles$1_Results as Results, cycles$1_cycleInfoSchema as cycleInfoSchema, cycles$1_cycles as cycles, cycles$1_cyclesResponseSchema as cyclesResponseSchema, cycles$1_resultsSchema as resultsSchema };
286
+ export { type Args$f as Args, type cycles$1_CycleInfo as CycleInfo, type cycles$1_CyclesResponse as CyclesResponse, type cycles$1_Results as Results, cycles$1_cycleInfoSchema as cycleInfoSchema, cycles$1_cycles as cycles, cycles$1_cyclesResponseSchema as cyclesResponseSchema, cycles$1_resultsSchema as resultsSchema };
287
287
  }
288
288
 
289
- type Args$d = {
289
+ type Args$e = {
290
290
  cycleNumber: number;
291
291
  } & ApiRequestOptions;
292
292
  declare const responseSchema$1: v.ObjectSchema<{
@@ -298,11 +298,11 @@ declare const responseSchema$1: v.ObjectSchema<{
298
298
  readonly total_signers: v.NumberSchema<undefined>;
299
299
  }, undefined>;
300
300
  type Response$4 = v.InferOutput<typeof responseSchema$1>;
301
- declare function cycle(opts: Args$d): Promise<Result$1<Response$4, SafeError<"FetchCycleError" | "ParseBodyError" | "ValidateDataError">>>;
301
+ declare function cycle(opts: Args$e): Promise<Result$1<Response$4, SafeError<"FetchCycleError" | "ParseBodyError" | "ValidateDataError">>>;
302
302
 
303
303
  declare const cycle$1_cycle: typeof cycle;
304
304
  declare namespace cycle$1 {
305
- export { type Args$d as Args, type Response$4 as Response, cycle$1_cycle as cycle, responseSchema$1 as responseSchema };
305
+ export { type Args$e as Args, type Response$4 as Response, cycle$1_cycle as cycle, responseSchema$1 as responseSchema };
306
306
  }
307
307
 
308
308
  type FeePrioritiesResponse = {
@@ -364,40 +364,40 @@ declare namespace coreApi$1 {
364
364
  export { type coreApi$1_CoreApiResponse as CoreApiResponse, coreApi$1_coreApi as coreApi };
365
365
  }
366
366
 
367
- type Args$c = {
367
+ type Args$d = {
368
368
  address: string;
369
369
  stacking?: boolean;
370
370
  } & ApiRequestOptions;
371
- declare function stx(opts: Args$c): Promise<Result$1<any>>;
371
+ declare function stx(opts: Args$d): Promise<Result$1<any>>;
372
372
 
373
373
  declare const stx$1_stx: typeof stx;
374
374
  declare namespace stx$1 {
375
- export { type Args$c as Args, stx$1_stx as stx };
375
+ export { type Args$d as Args, stx$1_stx as stx };
376
376
  }
377
377
 
378
- type Args$b = {
378
+ type Args$c = {
379
379
  heightOrHash: string | number | bigint;
380
380
  } & ApiRequestOptions;
381
381
  type Response$3 = OperationResponse["get_burn_block"];
382
- declare function getBurnBlock(args: Args$b): Promise<Result$1<Response$3>>;
382
+ declare function getBurnBlock(args: Args$c): Promise<Result$1<Response$3>>;
383
383
 
384
384
  declare const getBurnBlock$1_getBurnBlock: typeof getBurnBlock;
385
385
  declare namespace getBurnBlock$1 {
386
- export { type Args$b as Args, type Response$3 as Response, getBurnBlock$1_getBurnBlock as getBurnBlock };
386
+ export { type Args$c as Args, type Response$3 as Response, getBurnBlock$1_getBurnBlock as getBurnBlock };
387
387
  }
388
388
 
389
- type Args$a = {
389
+ type Args$b = {
390
390
  heightOrHash: string | number;
391
391
  } & ApiRequestOptions;
392
392
  type Response$2 = OperationResponse["get_block"];
393
- declare function getBlock(opts: Args$a): Promise<Result$1<Response$2>>;
393
+ declare function getBlock(opts: Args$b): Promise<Result$1<Response$2>>;
394
394
 
395
395
  declare const getBlock$1_getBlock: typeof getBlock;
396
396
  declare namespace getBlock$1 {
397
- export { type Args$a as Args, type Response$2 as Response, getBlock$1_getBlock as getBlock };
397
+ export { type Args$b as Args, type Response$2 as Response, getBlock$1_getBlock as getBlock };
398
398
  }
399
399
 
400
- type Args$9 = {
400
+ type Args$a = {
401
401
  principal: string;
402
402
  } & ApiRequestOptions;
403
403
  declare const responseSchema: v.ObjectSchema<{
@@ -408,70 +408,68 @@ declare const responseSchema: v.ObjectSchema<{
408
408
  readonly detected_mempool_nonces: v.ArraySchema<v.NumberSchema<undefined>, undefined>;
409
409
  }, undefined>;
410
410
  type Response$1 = v.InferOutput<typeof responseSchema>;
411
- declare function latestNonce(opts: Args$9): Promise<Result$1<Response$1, SafeError<"FetchLatestNonceError" | "ParseBodyError" | "ValidateDataError">>>;
411
+ declare function latestNonce(opts: Args$a): Promise<Result$1<Response$1, SafeError<"FetchLatestNonceError" | "ParseBodyError" | "ValidateDataError">>>;
412
412
 
413
413
  declare const latestNonce$1_latestNonce: typeof latestNonce;
414
414
  declare const latestNonce$1_responseSchema: typeof responseSchema;
415
415
  declare namespace latestNonce$1 {
416
- export { type Args$9 as Args, type Response$1 as Response, latestNonce$1_latestNonce as latestNonce, latestNonce$1_responseSchema as responseSchema };
416
+ export { type Args$a as Args, type Response$1 as Response, latestNonce$1_latestNonce as latestNonce, latestNonce$1_responseSchema as responseSchema };
417
417
  }
418
418
 
419
- type Args$8 = {
419
+ type Args$9 = {
420
420
  principal: string;
421
421
  unanchored?: boolean;
422
422
  untilBlock?: number;
423
423
  } & ApiRequestOptions;
424
- declare function balances(opts: Args$8): Promise<Result$1<OperationResponse["get_account_balance"], SafeError<"FetchBalancesError" | "ParseBodyError" | "ValidateDataError">>>;
424
+ declare function balances(opts: Args$9): Promise<Result$1<OperationResponse["get_account_balance"], SafeError<"FetchBalancesError" | "ParseBodyError" | "ValidateDataError">>>;
425
425
 
426
426
  declare const balances$1_balances: typeof balances;
427
427
  declare namespace balances$1 {
428
- export { type Args$8 as Args, balances$1_balances as balances };
428
+ export { type Args$9 as Args, balances$1_balances as balances };
429
429
  }
430
430
 
431
- declare const accounts: {
431
+ declare const accounts$1: {
432
432
  balances: typeof balances;
433
433
  latestNonce: typeof latestNonce;
434
434
  };
435
435
 
436
- declare const index$f_accounts: typeof accounts;
437
- declare namespace index$f {
438
- export { balances$1 as Balances, latestNonce$1 as LatestNonce, index$f_accounts as accounts };
436
+ declare namespace index$g {
437
+ export { balances$1 as Balances, latestNonce$1 as LatestNonce, accounts$1 as accounts };
439
438
  }
440
439
 
441
440
  declare const blocks: {
442
441
  getBlock: typeof getBlock;
443
442
  };
444
443
 
445
- declare const index$e_blocks: typeof blocks;
446
- declare namespace index$e {
447
- export { getBlock$1 as GetBlock, index$e_blocks as blocks };
444
+ declare const index$f_blocks: typeof blocks;
445
+ declare namespace index$f {
446
+ export { getBlock$1 as GetBlock, index$f_blocks as blocks };
448
447
  }
449
448
 
450
449
  declare const burnBlocks: {
451
450
  getBurnBlock: typeof getBurnBlock;
452
451
  };
453
452
 
454
- declare const index$d_burnBlocks: typeof burnBlocks;
455
- declare namespace index$d {
456
- export { getBurnBlock$1 as GetBurnBlock, index$d_burnBlocks as burnBlocks };
453
+ declare const index$e_burnBlocks: typeof burnBlocks;
454
+ declare namespace index$e {
455
+ export { getBurnBlock$1 as GetBurnBlock, index$e_burnBlocks as burnBlocks };
457
456
  }
458
457
 
459
458
  declare const faucets: {
460
459
  stx: typeof stx;
461
460
  };
462
461
 
463
- declare const index$c_faucets: typeof faucets;
464
- declare namespace index$c {
465
- export { stx$1 as Stx, index$c_faucets as faucets };
462
+ declare const index$d_faucets: typeof faucets;
463
+ declare namespace index$d {
464
+ export { stx$1 as Stx, index$d_faucets as faucets };
466
465
  }
467
466
 
468
- declare const info: {
467
+ declare const info$2: {
469
468
  coreApi: typeof coreApi;
470
469
  };
471
470
 
472
- declare const index$b_info: typeof info;
473
- declare namespace index$b {
474
- export { coreApi$1 as CoreApi, index$b_info as info };
471
+ declare namespace index$c {
472
+ export { coreApi$1 as CoreApi, info$2 as info };
475
473
  }
476
474
 
477
475
  declare const proofOfTransfer: {
@@ -482,18 +480,18 @@ declare const proofOfTransfer: {
482
480
  stackersForSignerInCycle: typeof stackersForSignerInCycle;
483
481
  };
484
482
 
485
- declare const index$a_proofOfTransfer: typeof proofOfTransfer;
486
- declare namespace index$a {
487
- export { cycle$1 as Cycle, cycles$1 as Cycles, signerInCycle$1 as SignerInCycle, signersInCycle$1 as SignersInCycle, stackersForSignerInCycle$1 as StackersForSignerInCycle, index$a_proofOfTransfer as proofOfTransfer };
483
+ declare const index$b_proofOfTransfer: typeof proofOfTransfer;
484
+ declare namespace index$b {
485
+ export { cycle$1 as Cycle, cycles$1 as Cycles, signerInCycle$1 as SignerInCycle, signersInCycle$1 as SignersInCycle, stackersForSignerInCycle$1 as StackersForSignerInCycle, index$b_proofOfTransfer as proofOfTransfer };
488
486
  }
489
487
 
490
488
  declare const stackingPool: {
491
489
  members: typeof members;
492
490
  };
493
491
 
494
- declare const index$9_stackingPool: typeof stackingPool;
495
- declare namespace index$9 {
496
- export { members$1 as Members, index$9_stackingPool as stackingPool };
492
+ declare const index$a_stackingPool: typeof stackingPool;
493
+ declare namespace index$a {
494
+ export { members$1 as Members, index$a_stackingPool as stackingPool };
497
495
  }
498
496
 
499
497
  declare const transactions: {
@@ -504,18 +502,18 @@ declare const transactions: {
504
502
  getRawTransaction: typeof getRawTransaction;
505
503
  };
506
504
 
507
- declare const index$8_transactions: typeof transactions;
508
- declare namespace index$8 {
509
- export { addressTransactions$1 as AddressTransactions, eventsForAnAddressTransaction$1 as EventsForAnAddressTransaction, getRawTransaction$1 as GetRawTransaction, getTransaction$1 as GetTransaction, mempoolTransactions$1 as MempoolTransactions, index$8_transactions as transactions };
505
+ declare const index$9_transactions: typeof transactions;
506
+ declare namespace index$9 {
507
+ export { addressTransactions$1 as AddressTransactions, eventsForAnAddressTransaction$1 as EventsForAnAddressTransaction, getRawTransaction$1 as GetRawTransaction, getTransaction$1 as GetTransaction, mempoolTransactions$1 as MempoolTransactions, index$9_transactions as transactions };
510
508
  }
511
509
 
512
510
  declare const mempool: {
513
511
  transactionFeePriorities: typeof transactionFeePriorities;
514
512
  };
515
513
 
516
- declare const index$7_mempool: typeof mempool;
517
- declare namespace index$7 {
518
- export { transactionFeePriorities$1 as TransactionFeePriorities, index$7_mempool as mempool };
514
+ declare const index$8_mempool: typeof mempool;
515
+ declare namespace index$8 {
516
+ export { transactionFeePriorities$1 as TransactionFeePriorities, index$8_mempool as mempool };
519
517
  }
520
518
 
521
519
  declare const stacksApi: {
@@ -557,12 +555,12 @@ declare const stacksApi: {
557
555
  };
558
556
  };
559
557
 
560
- declare const index$6_stacksApi: typeof stacksApi;
561
- declare namespace index$6 {
562
- export { index$f as Accounts, index$e as Blocks, index$d as BurnBlocks, index$c as Faucets, index$b as Info, index$7 as Mempool, index$a as ProofOfTransfer, index$9 as StackingPool, index$8 as Transactions, index$6_stacksApi as stacksApi };
558
+ declare const index$7_stacksApi: typeof stacksApi;
559
+ declare namespace index$7 {
560
+ export { index$g as Accounts, index$f as Blocks, index$e as BurnBlocks, index$d as Faucets, index$c as Info, index$8 as Mempool, index$b as ProofOfTransfer, index$a as StackingPool, index$9 as Transactions, index$7_stacksApi as stacksApi };
563
561
  }
564
562
 
565
- type Args$7 = {
563
+ type Args$8 = {
566
564
  sender: string;
567
565
  arguments: string[];
568
566
  contractAddress: string;
@@ -579,15 +577,15 @@ interface ReadOnlyContractCallFailResponse {
579
577
  }
580
578
  type ReadOnlyContractCallResponse = ReadOnlyContractCallSuccessResponse | ReadOnlyContractCallFailResponse;
581
579
  type ReadOnlyResponse = ReadOnlyContractCallResponse;
582
- declare function readOnly$1(args: Args$7): Promise<Result$1<ReadOnlyResponse>>;
580
+ declare function readOnly$1(args: Args$8): Promise<Result$1<ReadOnlyResponse>>;
583
581
 
584
582
  type readOnly$2_ReadOnlyContractCallResponse = ReadOnlyContractCallResponse;
585
583
  type readOnly$2_ReadOnlyResponse = ReadOnlyResponse;
586
584
  declare namespace readOnly$2 {
587
- export { type Args$7 as Args, type readOnly$2_ReadOnlyContractCallResponse as ReadOnlyContractCallResponse, type readOnly$2_ReadOnlyResponse as ReadOnlyResponse, readOnly$1 as readOnly };
585
+ export { type Args$8 as Args, type readOnly$2_ReadOnlyContractCallResponse as ReadOnlyContractCallResponse, type readOnly$2_ReadOnlyResponse as ReadOnlyResponse, readOnly$1 as readOnly };
588
586
  }
589
587
 
590
- type Args$6 = {
588
+ type Args$7 = {
591
589
  contractAddress: string;
592
590
  contractName: string;
593
591
  mapName: string;
@@ -607,28 +605,28 @@ declare const mapEntryResponseSchema: v.ObjectSchema<{
607
605
  readonly proof: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
608
606
  }, undefined>;
609
607
  type MapEntryResponse = v.InferOutput<typeof mapEntryResponseSchema>;
610
- declare function mapEntry(args: Args$6): Promise<Result$1<MapEntryResponse>>;
608
+ declare function mapEntry(args: Args$7): Promise<Result$1<MapEntryResponse>>;
611
609
 
612
610
  type mapEntry$1_MapEntryResponse = MapEntryResponse;
613
611
  declare const mapEntry$1_mapEntry: typeof mapEntry;
614
612
  declare namespace mapEntry$1 {
615
- export { type Args$6 as Args, type mapEntry$1_MapEntryResponse as MapEntryResponse, mapEntry$1_mapEntry as mapEntry };
613
+ export { type Args$7 as Args, type mapEntry$1_MapEntryResponse as MapEntryResponse, mapEntry$1_mapEntry as mapEntry };
616
614
  }
617
615
 
618
- type Args$5 = {
616
+ type Args$6 = {
619
617
  contractAddress: string;
620
618
  contractName: string;
621
619
  } & ApiRequestOptions & ProofAndTip;
622
620
  type InterfaceResponse = ClarityAbi;
623
- declare function contractInterface(args: Args$5): Promise<Result$1<InterfaceResponse>>;
621
+ declare function contractInterface(args: Args$6): Promise<Result$1<InterfaceResponse>>;
624
622
 
625
623
  type _interface_InterfaceResponse = InterfaceResponse;
626
624
  declare const _interface_contractInterface: typeof contractInterface;
627
625
  declare namespace _interface {
628
- export { type Args$5 as Args, type _interface_InterfaceResponse as InterfaceResponse, _interface_contractInterface as contractInterface };
626
+ export { type Args$6 as Args, type _interface_InterfaceResponse as InterfaceResponse, _interface_contractInterface as contractInterface };
629
627
  }
630
628
 
631
- type Args$4 = ApiRequestOptions;
629
+ type Args$5 = ApiRequestOptions;
632
630
  /**
633
631
  * Get Proof of Transfer (PoX) information
634
632
  */
@@ -773,7 +771,7 @@ interface CoreNodePoxResponse {
773
771
  }[];
774
772
  }
775
773
  type PoxDetailsResponse = CoreNodePoxResponse;
776
- declare function poxDetails(args: Args$4): Promise<Result$1<PoxDetailsResponse>>;
774
+ declare function poxDetails(args: Args$5): Promise<Result$1<PoxDetailsResponse>>;
777
775
 
778
776
  type poxDetails$1_CoreNodePoxResponse = CoreNodePoxResponse;
779
777
  type poxDetails$1_PoxDetailsResponse = PoxDetailsResponse;
@@ -782,27 +780,105 @@ declare namespace poxDetails$1 {
782
780
  export { type poxDetails$1_CoreNodePoxResponse as CoreNodePoxResponse, type poxDetails$1_PoxDetailsResponse as PoxDetailsResponse, poxDetails$1_poxDetails as poxDetails };
783
781
  }
784
782
 
783
+ type Args$4 = {
784
+ /** Stacks principal. */
785
+ principal: string;
786
+ } & ApiRequestOptions & ProofAndTip;
787
+ type InfoResponse = {
788
+ /** Micro-STX as a hex-encoded string. */
789
+ balance: string;
790
+ /** Micro-STX as a hex-encoded string. */
791
+ locked: string;
792
+ unlock_height: number;
793
+ nonce: number;
794
+ balance_proof: string;
795
+ nonce_proof: string;
796
+ };
797
+ type InfoReturn = Promise<InfoResponse>;
798
+ declare const info: (args: Args$4) => Promise<[null, unknown] | [{
799
+ readonly name: "InfoFetchError";
800
+ readonly message: "Failed to fetch info.";
801
+ readonly data: {
802
+ readonly init: RequestInit;
803
+ readonly status: number;
804
+ readonly statusText: string;
805
+ readonly endpoint: string;
806
+ readonly body: unknown;
807
+ };
808
+ }, null] | [{
809
+ readonly name: "ParseBodyError";
810
+ readonly message: "Failed to parse response body as JSON.";
811
+ readonly data: SafeError<"SafeError", unknown>;
812
+ }, null]>;
813
+
814
+ type info$1_InfoResponse = InfoResponse;
815
+ type info$1_InfoReturn = InfoReturn;
816
+ declare const info$1_info: typeof info;
817
+ declare namespace info$1 {
818
+ export { type Args$4 as Args, type info$1_InfoResponse as InfoResponse, type info$1_InfoReturn as InfoReturn, info$1_info as info };
819
+ }
820
+
785
821
  declare const smartContracts: {
786
822
  contractInterface: typeof contractInterface;
787
823
  mapEntry: typeof mapEntry;
788
824
  readOnly: typeof readOnly$1;
789
825
  };
790
826
 
791
- declare const index$5_smartContracts: typeof smartContracts;
792
- declare namespace index$5 {
793
- export { _interface as ContractInterface, mapEntry$1 as MapEntry, readOnly$2 as ReadOnly, index$5_smartContracts as smartContracts };
827
+ declare const index$6_smartContracts: typeof smartContracts;
828
+ declare namespace index$6 {
829
+ export { _interface as ContractInterface, mapEntry$1 as MapEntry, readOnly$2 as ReadOnly, index$6_smartContracts as smartContracts };
794
830
  }
795
831
 
796
832
  declare const pox: {
797
833
  poxDetails: typeof poxDetails;
798
834
  };
799
835
 
800
- declare const index$4_pox: typeof pox;
836
+ declare const index$5_pox: typeof pox;
837
+ declare namespace index$5 {
838
+ export { poxDetails$1 as PoxDetails, index$5_pox as pox };
839
+ }
840
+
841
+ declare const accounts: {
842
+ info: (args: Args$4) => Promise<[null, unknown] | [{
843
+ readonly name: "InfoFetchError";
844
+ readonly message: "Failed to fetch info.";
845
+ readonly data: {
846
+ readonly init: RequestInit;
847
+ readonly status: number;
848
+ readonly statusText: string;
849
+ readonly endpoint: string;
850
+ readonly body: unknown;
851
+ };
852
+ }, null] | [{
853
+ readonly name: "ParseBodyError";
854
+ readonly message: "Failed to parse response body as JSON.";
855
+ readonly data: SafeError<"SafeError", unknown>;
856
+ }, null]>;
857
+ };
858
+
859
+ declare const index$4_accounts: typeof accounts;
801
860
  declare namespace index$4 {
802
- export { poxDetails$1 as PoxDetails, index$4_pox as pox };
861
+ export { info$1 as Info, index$4_accounts as accounts };
803
862
  }
804
863
 
805
864
  declare const stacksRpcApi: {
865
+ accounts: {
866
+ info: (args: Args$4) => Promise<[null, unknown] | [{
867
+ readonly name: "InfoFetchError";
868
+ readonly message: "Failed to fetch info.";
869
+ readonly data: {
870
+ readonly init: RequestInit;
871
+ readonly status: number;
872
+ readonly statusText: string;
873
+ readonly endpoint: string;
874
+ readonly body: unknown;
875
+ };
876
+ }, null] | [{
877
+ readonly name: "ParseBodyError";
878
+ readonly message: "Failed to parse response body as JSON.";
879
+ readonly data: SafeError<"SafeError", unknown>;
880
+ }, null]>;
881
+ };
806
882
  pox: {
807
883
  poxDetails: typeof poxDetails;
808
884
  };
@@ -815,7 +891,7 @@ declare const stacksRpcApi: {
815
891
 
816
892
  declare const index$3_stacksRpcApi: typeof stacksRpcApi;
817
893
  declare namespace index$3 {
818
- export { index$4 as Pox, index$5 as SmartContracts, index$3_stacksRpcApi as stacksRpcApi };
894
+ export { index$4 as Accounts, index$5 as Pox, index$6 as SmartContracts, index$3_stacksRpcApi as stacksRpcApi };
819
895
  }
820
896
 
821
897
  type Identifier = {
@@ -954,4 +1030,4 @@ declare namespace index {
954
1030
  export { index$2 as Maps, index$1 as ReadOnly, index_pox4Api as pox4Api };
955
1031
  }
956
1032
 
957
- export { index as Pox4Api, type Result$1 as Result, type SafeError, index$6 as StacksApi, index$3 as StacksRpcApi, callRateLimitedApi, error, flatResults, pox4Api, queries, safeBackOff, safeCall, safeCallRateLimitedApi, safeExtractResponseBody, safePromise, stacksApi, stacksRpcApi, success };
1033
+ export { index as Pox4Api, type Result$1 as Result, type SafeError, index$7 as StacksApi, index$3 as StacksRpcApi, callRateLimitedApi, error, flatResults, pox4Api, queries, safeBackOff, safeCall, safeCallRateLimitedApi, safeExtractResponseBody, safePromise, stacksApi, stacksRpcApi, success };
package/dist/index.js CHANGED
@@ -1090,8 +1090,51 @@ var pox = {
1090
1090
  poxDetails
1091
1091
  };
1092
1092
 
1093
+ // src/stacks-rpc-api/accounts/info.ts
1094
+ var info2 = async (args) => {
1095
+ const search = new URLSearchParams();
1096
+ if (args.proof === 0) search.append("proof", "0");
1097
+ if (args.tip) search.append("tip", args.tip);
1098
+ const init = {};
1099
+ if (args.apiKeyConfig) {
1100
+ init.headers = {
1101
+ [args.apiKeyConfig.header]: args.apiKeyConfig.key
1102
+ };
1103
+ }
1104
+ init.method = "GET";
1105
+ const endpoint = `${args.baseUrl}/v2/accounts/${args.principal}?${search}`;
1106
+ const res = await fetch(endpoint, init);
1107
+ if (!res.ok)
1108
+ return error({
1109
+ name: "InfoFetchError",
1110
+ message: "Failed to fetch info.",
1111
+ data: {
1112
+ init,
1113
+ status: res.status,
1114
+ statusText: res.statusText,
1115
+ endpoint,
1116
+ body: await safeExtractResponseBody(res)
1117
+ }
1118
+ });
1119
+ const [jsonError, data] = await safePromise(res.json());
1120
+ if (jsonError) {
1121
+ return error({
1122
+ name: "ParseBodyError",
1123
+ message: "Failed to parse response body as JSON.",
1124
+ data: jsonError
1125
+ });
1126
+ }
1127
+ return success(data);
1128
+ };
1129
+
1130
+ // src/stacks-rpc-api/accounts/index.ts
1131
+ var accounts2 = {
1132
+ info: info2
1133
+ };
1134
+
1093
1135
  // src/stacks-rpc-api/index.ts
1094
1136
  var stacksRpcApi = {
1137
+ accounts: accounts2,
1095
1138
  pox,
1096
1139
  smartContracts
1097
1140
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@secretkeylabs/stacks-tools",
3
- "version": "0.8.0-44889a2",
3
+ "version": "0.8.0-907b20e",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"