@secretkeylabs/stacks-tools 0.3.0 → 0.4.0-425a956

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.cts CHANGED
@@ -5,7 +5,11 @@ type SafeError<TName extends string = string, TData = unknown> = {
5
5
  readonly message: string;
6
6
  readonly data?: TData;
7
7
  };
8
- type Result<TData = unknown, E extends SafeError = SafeError> = [E, null] | [null, TData];
8
+ type Result$1<TData = unknown, E extends SafeError = SafeError> = [E, null] | [null, TData];
9
+ declare function success<D>(data: D): Result$1<D, never>;
10
+ declare function error<const E extends SafeError>(error: E): Result$1<never, E>;
11
+ declare function safePromise<TData>(promise: Promise<TData>): Promise<Result$1<TData, SafeError<"SafePromiseError">>>;
12
+ declare function safeCall<Return>(fn: () => Return): Result$1<Return, SafeError<"SafeCallError">>;
9
13
 
10
14
  type ApiKeyConfig = {
11
15
  key: string;
@@ -26,6 +30,188 @@ type ApiPaginationOptions = {
26
30
  offset?: number;
27
31
  };
28
32
 
33
+ declare const baseTransactionSchema: v.ObjectSchema<{
34
+ readonly tx_id: v.StringSchema<undefined>;
35
+ readonly nonce: v.NumberSchema<undefined>;
36
+ readonly fee_rate: v.StringSchema<undefined>;
37
+ readonly sender_address: v.StringSchema<undefined>;
38
+ readonly sponsored: v.BooleanSchema<undefined>;
39
+ readonly post_condition_mode: v.StringSchema<undefined>;
40
+ readonly post_conditions: v.ArraySchema<v.UnknownSchema, undefined>;
41
+ readonly anchor_mode: v.StringSchema<undefined>;
42
+ readonly is_unanchored: v.BooleanSchema<undefined>;
43
+ readonly block_hash: v.StringSchema<undefined>;
44
+ readonly parent_block_hash: v.StringSchema<undefined>;
45
+ readonly block_height: v.NumberSchema<undefined>;
46
+ readonly block_time: v.NumberSchema<undefined>;
47
+ readonly block_time_iso: v.StringSchema<undefined>;
48
+ readonly burn_block_height: v.NumberSchema<undefined>;
49
+ readonly burn_block_time: v.NumberSchema<undefined>;
50
+ readonly burn_block_time_iso: v.StringSchema<undefined>;
51
+ readonly parent_burn_block_time: v.NumberSchema<undefined>;
52
+ readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
53
+ readonly canonical: v.BooleanSchema<undefined>;
54
+ readonly tx_index: v.NumberSchema<undefined>;
55
+ readonly tx_status: v.UnionSchema<[v.LiteralSchema<"success", undefined>, v.LiteralSchema<"abort_by_response", undefined>, v.LiteralSchema<"abort_by_post_condition", undefined>], undefined>;
56
+ readonly tx_result: v.ObjectSchema<{
57
+ readonly hex: v.StringSchema<undefined>;
58
+ readonly repr: v.StringSchema<undefined>;
59
+ }, undefined>;
60
+ readonly microblock_hash: v.StringSchema<undefined>;
61
+ readonly microblock_sequence: v.NumberSchema<undefined>;
62
+ readonly microblock_canonical: v.BooleanSchema<undefined>;
63
+ readonly event_count: v.NumberSchema<undefined>;
64
+ readonly events: v.ArraySchema<v.UnknownSchema, undefined>;
65
+ readonly execution_cost_read_count: v.NumberSchema<undefined>;
66
+ readonly execution_cost_read_length: v.NumberSchema<undefined>;
67
+ readonly execution_cost_runtime: v.NumberSchema<undefined>;
68
+ readonly execution_cost_write_count: v.NumberSchema<undefined>;
69
+ readonly execution_cost_write_length: v.NumberSchema<undefined>;
70
+ }, undefined>;
71
+ declare const contractCallTransactionSchema: v.ObjectSchema<{
72
+ readonly tx_id: v.StringSchema<undefined>;
73
+ readonly nonce: v.NumberSchema<undefined>;
74
+ readonly fee_rate: v.StringSchema<undefined>;
75
+ readonly sender_address: v.StringSchema<undefined>;
76
+ readonly sponsored: v.BooleanSchema<undefined>;
77
+ readonly post_condition_mode: v.StringSchema<undefined>;
78
+ readonly post_conditions: v.ArraySchema<v.UnknownSchema, undefined>;
79
+ readonly anchor_mode: v.StringSchema<undefined>;
80
+ readonly is_unanchored: v.BooleanSchema<undefined>;
81
+ readonly block_hash: v.StringSchema<undefined>;
82
+ readonly parent_block_hash: v.StringSchema<undefined>;
83
+ readonly block_height: v.NumberSchema<undefined>;
84
+ readonly block_time: v.NumberSchema<undefined>;
85
+ readonly block_time_iso: v.StringSchema<undefined>;
86
+ readonly burn_block_height: v.NumberSchema<undefined>;
87
+ readonly burn_block_time: v.NumberSchema<undefined>;
88
+ readonly burn_block_time_iso: v.StringSchema<undefined>;
89
+ readonly parent_burn_block_time: v.NumberSchema<undefined>;
90
+ readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
91
+ readonly canonical: v.BooleanSchema<undefined>;
92
+ readonly tx_index: v.NumberSchema<undefined>;
93
+ readonly tx_status: v.UnionSchema<[v.LiteralSchema<"success", undefined>, v.LiteralSchema<"abort_by_response", undefined>, v.LiteralSchema<"abort_by_post_condition", undefined>], undefined>;
94
+ readonly tx_result: v.ObjectSchema<{
95
+ readonly hex: v.StringSchema<undefined>;
96
+ readonly repr: v.StringSchema<undefined>;
97
+ }, undefined>;
98
+ readonly microblock_hash: v.StringSchema<undefined>;
99
+ readonly microblock_sequence: v.NumberSchema<undefined>;
100
+ readonly microblock_canonical: v.BooleanSchema<undefined>;
101
+ readonly event_count: v.NumberSchema<undefined>;
102
+ readonly events: v.ArraySchema<v.UnknownSchema, undefined>;
103
+ readonly execution_cost_read_count: v.NumberSchema<undefined>;
104
+ readonly execution_cost_read_length: v.NumberSchema<undefined>;
105
+ readonly execution_cost_runtime: v.NumberSchema<undefined>;
106
+ readonly execution_cost_write_count: v.NumberSchema<undefined>;
107
+ readonly execution_cost_write_length: v.NumberSchema<undefined>;
108
+ readonly tx_type: v.LiteralSchema<"contract_call", undefined>;
109
+ readonly contract_call: v.ObjectSchema<{
110
+ readonly contract_id: v.StringSchema<undefined>;
111
+ readonly function_name: v.StringSchema<undefined>;
112
+ readonly function_signature: v.StringSchema<undefined>;
113
+ readonly function_args: v.ArraySchema<v.ObjectSchema<{
114
+ readonly hex: v.StringSchema<undefined>;
115
+ readonly repr: v.StringSchema<undefined>;
116
+ readonly name: v.StringSchema<undefined>;
117
+ readonly type: v.StringSchema<undefined>;
118
+ }, undefined>, undefined>;
119
+ }, undefined>;
120
+ }, undefined>;
121
+ type ContractCallTransaction = v.InferOutput<typeof contractCallTransactionSchema>;
122
+ declare const smartContractTransactionSchema: v.ObjectSchema<{
123
+ readonly tx_id: v.StringSchema<undefined>;
124
+ readonly nonce: v.NumberSchema<undefined>;
125
+ readonly fee_rate: v.StringSchema<undefined>;
126
+ readonly sender_address: v.StringSchema<undefined>;
127
+ readonly sponsored: v.BooleanSchema<undefined>;
128
+ readonly post_condition_mode: v.StringSchema<undefined>;
129
+ readonly post_conditions: v.ArraySchema<v.UnknownSchema, undefined>;
130
+ readonly anchor_mode: v.StringSchema<undefined>;
131
+ readonly is_unanchored: v.BooleanSchema<undefined>;
132
+ readonly block_hash: v.StringSchema<undefined>;
133
+ readonly parent_block_hash: v.StringSchema<undefined>;
134
+ readonly block_height: v.NumberSchema<undefined>;
135
+ readonly block_time: v.NumberSchema<undefined>;
136
+ readonly block_time_iso: v.StringSchema<undefined>;
137
+ readonly burn_block_height: v.NumberSchema<undefined>;
138
+ readonly burn_block_time: v.NumberSchema<undefined>;
139
+ readonly burn_block_time_iso: v.StringSchema<undefined>;
140
+ readonly parent_burn_block_time: v.NumberSchema<undefined>;
141
+ readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
142
+ readonly canonical: v.BooleanSchema<undefined>;
143
+ readonly tx_index: v.NumberSchema<undefined>;
144
+ readonly tx_status: v.UnionSchema<[v.LiteralSchema<"success", undefined>, v.LiteralSchema<"abort_by_response", undefined>, v.LiteralSchema<"abort_by_post_condition", undefined>], undefined>;
145
+ readonly tx_result: v.ObjectSchema<{
146
+ readonly hex: v.StringSchema<undefined>;
147
+ readonly repr: v.StringSchema<undefined>;
148
+ }, undefined>;
149
+ readonly microblock_hash: v.StringSchema<undefined>;
150
+ readonly microblock_sequence: v.NumberSchema<undefined>;
151
+ readonly microblock_canonical: v.BooleanSchema<undefined>;
152
+ readonly event_count: v.NumberSchema<undefined>;
153
+ readonly events: v.ArraySchema<v.UnknownSchema, undefined>;
154
+ readonly execution_cost_read_count: v.NumberSchema<undefined>;
155
+ readonly execution_cost_read_length: v.NumberSchema<undefined>;
156
+ readonly execution_cost_runtime: v.NumberSchema<undefined>;
157
+ readonly execution_cost_write_count: v.NumberSchema<undefined>;
158
+ readonly execution_cost_write_length: v.NumberSchema<undefined>;
159
+ readonly tx_type: v.LiteralSchema<"smart_contract", undefined>;
160
+ readonly smart_contract: v.ObjectSchema<{
161
+ /**
162
+ * NOTE: The types may be wrong, not sure what type of value is used when
163
+ * the version is not `null`.
164
+ */
165
+ readonly clarity_version: v.UnionSchema<[v.NullSchema<undefined>, v.NumberSchema<undefined>], undefined>;
166
+ readonly contract_id: v.StringSchema<undefined>;
167
+ readonly source_code: v.StringSchema<undefined>;
168
+ }, undefined>;
169
+ }, undefined>;
170
+ type SmartContractTransaction = v.InferOutput<typeof smartContractTransactionSchema>;
171
+ declare const tokenTransferSchema: v.ObjectSchema<{
172
+ readonly tx_id: v.StringSchema<undefined>;
173
+ readonly nonce: v.NumberSchema<undefined>;
174
+ readonly fee_rate: v.StringSchema<undefined>;
175
+ readonly sender_address: v.StringSchema<undefined>;
176
+ readonly sponsored: v.BooleanSchema<undefined>;
177
+ readonly post_condition_mode: v.StringSchema<undefined>;
178
+ readonly post_conditions: v.ArraySchema<v.UnknownSchema, undefined>;
179
+ readonly anchor_mode: v.StringSchema<undefined>;
180
+ readonly is_unanchored: v.BooleanSchema<undefined>;
181
+ readonly block_hash: v.StringSchema<undefined>;
182
+ readonly parent_block_hash: v.StringSchema<undefined>;
183
+ readonly block_height: v.NumberSchema<undefined>;
184
+ readonly block_time: v.NumberSchema<undefined>;
185
+ readonly block_time_iso: v.StringSchema<undefined>;
186
+ readonly burn_block_height: v.NumberSchema<undefined>;
187
+ readonly burn_block_time: v.NumberSchema<undefined>;
188
+ readonly burn_block_time_iso: v.StringSchema<undefined>;
189
+ readonly parent_burn_block_time: v.NumberSchema<undefined>;
190
+ readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
191
+ readonly canonical: v.BooleanSchema<undefined>;
192
+ readonly tx_index: v.NumberSchema<undefined>;
193
+ readonly tx_status: v.UnionSchema<[v.LiteralSchema<"success", undefined>, v.LiteralSchema<"abort_by_response", undefined>, v.LiteralSchema<"abort_by_post_condition", undefined>], undefined>;
194
+ readonly tx_result: v.ObjectSchema<{
195
+ readonly hex: v.StringSchema<undefined>;
196
+ readonly repr: v.StringSchema<undefined>;
197
+ }, undefined>;
198
+ readonly microblock_hash: v.StringSchema<undefined>;
199
+ readonly microblock_sequence: v.NumberSchema<undefined>;
200
+ readonly microblock_canonical: v.BooleanSchema<undefined>;
201
+ readonly event_count: v.NumberSchema<undefined>;
202
+ readonly events: v.ArraySchema<v.UnknownSchema, undefined>;
203
+ readonly execution_cost_read_count: v.NumberSchema<undefined>;
204
+ readonly execution_cost_read_length: v.NumberSchema<undefined>;
205
+ readonly execution_cost_runtime: v.NumberSchema<undefined>;
206
+ readonly execution_cost_write_count: v.NumberSchema<undefined>;
207
+ readonly execution_cost_write_length: v.NumberSchema<undefined>;
208
+ readonly tx_type: v.LiteralSchema<"token_transfer", undefined>;
209
+ readonly token_transfer: v.ObjectSchema<{
210
+ readonly recipient_address: v.StringSchema<undefined>;
211
+ readonly amount: v.StringSchema<undefined>;
212
+ readonly memo: v.StringSchema<undefined>;
213
+ }, undefined>;
214
+ }, undefined>;
29
215
  /**
30
216
  * Incomplete schema of some transaction types.
31
217
  */
@@ -51,7 +237,7 @@ declare const transactionSchema: v.VariantSchema<"tx_type", [v.ObjectSchema<{
51
237
  readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
52
238
  readonly canonical: v.BooleanSchema<undefined>;
53
239
  readonly tx_index: v.NumberSchema<undefined>;
54
- readonly tx_status: v.StringSchema<undefined>;
240
+ readonly tx_status: v.UnionSchema<[v.LiteralSchema<"success", undefined>, v.LiteralSchema<"abort_by_response", undefined>, v.LiteralSchema<"abort_by_post_condition", undefined>], undefined>;
55
241
  readonly tx_result: v.ObjectSchema<{
56
242
  readonly hex: v.StringSchema<undefined>;
57
243
  readonly repr: v.StringSchema<undefined>;
@@ -100,7 +286,7 @@ declare const transactionSchema: v.VariantSchema<"tx_type", [v.ObjectSchema<{
100
286
  readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
101
287
  readonly canonical: v.BooleanSchema<undefined>;
102
288
  readonly tx_index: v.NumberSchema<undefined>;
103
- readonly tx_status: v.StringSchema<undefined>;
289
+ readonly tx_status: v.UnionSchema<[v.LiteralSchema<"success", undefined>, v.LiteralSchema<"abort_by_response", undefined>, v.LiteralSchema<"abort_by_post_condition", undefined>], undefined>;
104
290
  readonly tx_result: v.ObjectSchema<{
105
291
  readonly hex: v.StringSchema<undefined>;
106
292
  readonly repr: v.StringSchema<undefined>;
@@ -147,7 +333,7 @@ declare const transactionSchema: v.VariantSchema<"tx_type", [v.ObjectSchema<{
147
333
  readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
148
334
  readonly canonical: v.BooleanSchema<undefined>;
149
335
  readonly tx_index: v.NumberSchema<undefined>;
150
- readonly tx_status: v.StringSchema<undefined>;
336
+ readonly tx_status: v.UnionSchema<[v.LiteralSchema<"success", undefined>, v.LiteralSchema<"abort_by_response", undefined>, v.LiteralSchema<"abort_by_post_condition", undefined>], undefined>;
151
337
  readonly tx_result: v.ObjectSchema<{
152
338
  readonly hex: v.StringSchema<undefined>;
153
339
  readonly repr: v.StringSchema<undefined>;
@@ -171,14 +357,347 @@ declare const transactionSchema: v.VariantSchema<"tx_type", [v.ObjectSchema<{
171
357
  }, undefined>], undefined>;
172
358
  type Transaction = v.InferOutput<typeof transactionSchema>;
173
359
 
360
+ type schemas_ContractCallTransaction = ContractCallTransaction;
361
+ type schemas_SmartContractTransaction = SmartContractTransaction;
362
+ type schemas_Transaction = Transaction;
363
+ declare const schemas_baseTransactionSchema: typeof baseTransactionSchema;
364
+ declare const schemas_contractCallTransactionSchema: typeof contractCallTransactionSchema;
365
+ declare const schemas_smartContractTransactionSchema: typeof smartContractTransactionSchema;
366
+ declare const schemas_tokenTransferSchema: typeof tokenTransferSchema;
367
+ declare const schemas_transactionSchema: typeof transactionSchema;
368
+ declare namespace schemas {
369
+ export { type schemas_ContractCallTransaction as ContractCallTransaction, type schemas_SmartContractTransaction as SmartContractTransaction, type schemas_Transaction as Transaction, schemas_baseTransactionSchema as baseTransactionSchema, schemas_contractCallTransactionSchema as contractCallTransactionSchema, schemas_smartContractTransactionSchema as smartContractTransactionSchema, schemas_tokenTransferSchema as tokenTransferSchema, schemas_transactionSchema as transactionSchema };
370
+ }
371
+
174
372
  type Args$a = {
175
373
  transactionId: string;
176
374
  } & ApiRequestOptions;
177
- declare function getTransaction(args: Args$a): Promise<Result<Transaction>>;
375
+ declare function getTransaction(args: Args$a): Promise<Result$1<Transaction>>;
376
+
377
+ declare const getTransaction$1_getTransaction: typeof getTransaction;
378
+ declare namespace getTransaction$1 {
379
+ export { getTransaction$1_getTransaction as getTransaction };
380
+ }
178
381
 
179
382
  type Args$9 = {
180
383
  address: string;
181
384
  } & ApiRequestOptions & ApiPaginationOptions;
385
+ declare const resultSchema: v.ObjectSchema<{
386
+ readonly tx: v.VariantSchema<"tx_type", [v.ObjectSchema<{
387
+ readonly tx_id: v.StringSchema<undefined>;
388
+ readonly nonce: v.NumberSchema<undefined>;
389
+ readonly fee_rate: v.StringSchema<undefined>;
390
+ readonly sender_address: v.StringSchema<undefined>;
391
+ readonly sponsored: v.BooleanSchema<undefined>;
392
+ readonly post_condition_mode: v.StringSchema<undefined>;
393
+ readonly post_conditions: v.ArraySchema<v.UnknownSchema, undefined>;
394
+ readonly anchor_mode: v.StringSchema<undefined>;
395
+ readonly is_unanchored: v.BooleanSchema<undefined>;
396
+ readonly block_hash: v.StringSchema<undefined>;
397
+ readonly parent_block_hash: v.StringSchema<undefined>;
398
+ readonly block_height: v.NumberSchema<undefined>;
399
+ readonly block_time: v.NumberSchema<undefined>;
400
+ readonly block_time_iso: v.StringSchema<undefined>;
401
+ readonly burn_block_height: v.NumberSchema<undefined>;
402
+ readonly burn_block_time: v.NumberSchema<undefined>;
403
+ readonly burn_block_time_iso: v.StringSchema<undefined>;
404
+ readonly parent_burn_block_time: v.NumberSchema<undefined>;
405
+ readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
406
+ readonly canonical: v.BooleanSchema<undefined>;
407
+ readonly tx_index: v.NumberSchema<undefined>;
408
+ readonly tx_status: v.UnionSchema<[v.LiteralSchema<"success", undefined>, v.LiteralSchema<"abort_by_response", undefined>, v.LiteralSchema<"abort_by_post_condition", undefined>], undefined>;
409
+ readonly tx_result: v.ObjectSchema<{
410
+ readonly hex: v.StringSchema<undefined>;
411
+ readonly repr: v.StringSchema<undefined>;
412
+ }, undefined>;
413
+ readonly microblock_hash: v.StringSchema<undefined>;
414
+ readonly microblock_sequence: v.NumberSchema<undefined>;
415
+ readonly microblock_canonical: v.BooleanSchema<undefined>;
416
+ readonly event_count: v.NumberSchema<undefined>;
417
+ readonly events: v.ArraySchema<v.UnknownSchema, undefined>;
418
+ readonly execution_cost_read_count: v.NumberSchema<undefined>;
419
+ readonly execution_cost_read_length: v.NumberSchema<undefined>;
420
+ readonly execution_cost_runtime: v.NumberSchema<undefined>;
421
+ readonly execution_cost_write_count: v.NumberSchema<undefined>;
422
+ readonly execution_cost_write_length: v.NumberSchema<undefined>;
423
+ readonly tx_type: v.LiteralSchema<"contract_call", undefined>;
424
+ readonly contract_call: v.ObjectSchema<{
425
+ readonly contract_id: v.StringSchema<undefined>;
426
+ readonly function_name: v.StringSchema<undefined>;
427
+ readonly function_signature: v.StringSchema<undefined>;
428
+ readonly function_args: v.ArraySchema<v.ObjectSchema<{
429
+ readonly hex: v.StringSchema<undefined>;
430
+ readonly repr: v.StringSchema<undefined>;
431
+ readonly name: v.StringSchema<undefined>;
432
+ readonly type: v.StringSchema<undefined>;
433
+ }, undefined>, undefined>;
434
+ }, undefined>;
435
+ }, undefined>, v.ObjectSchema<{
436
+ readonly tx_id: v.StringSchema<undefined>;
437
+ readonly nonce: v.NumberSchema<undefined>;
438
+ readonly fee_rate: v.StringSchema<undefined>;
439
+ readonly sender_address: v.StringSchema<undefined>;
440
+ readonly sponsored: v.BooleanSchema<undefined>;
441
+ readonly post_condition_mode: v.StringSchema<undefined>;
442
+ readonly post_conditions: v.ArraySchema<v.UnknownSchema, undefined>;
443
+ readonly anchor_mode: v.StringSchema<undefined>;
444
+ readonly is_unanchored: v.BooleanSchema<undefined>;
445
+ readonly block_hash: v.StringSchema<undefined>;
446
+ readonly parent_block_hash: v.StringSchema<undefined>;
447
+ readonly block_height: v.NumberSchema<undefined>;
448
+ readonly block_time: v.NumberSchema<undefined>;
449
+ readonly block_time_iso: v.StringSchema<undefined>;
450
+ readonly burn_block_height: v.NumberSchema<undefined>;
451
+ readonly burn_block_time: v.NumberSchema<undefined>;
452
+ readonly burn_block_time_iso: v.StringSchema<undefined>;
453
+ readonly parent_burn_block_time: v.NumberSchema<undefined>;
454
+ readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
455
+ readonly canonical: v.BooleanSchema<undefined>;
456
+ readonly tx_index: v.NumberSchema<undefined>;
457
+ readonly tx_status: v.UnionSchema<[v.LiteralSchema<"success", undefined>, v.LiteralSchema<"abort_by_response", undefined>, v.LiteralSchema<"abort_by_post_condition", undefined>], undefined>;
458
+ readonly tx_result: v.ObjectSchema<{
459
+ readonly hex: v.StringSchema<undefined>;
460
+ readonly repr: v.StringSchema<undefined>;
461
+ }, undefined>;
462
+ readonly microblock_hash: v.StringSchema<undefined>;
463
+ readonly microblock_sequence: v.NumberSchema<undefined>;
464
+ readonly microblock_canonical: v.BooleanSchema<undefined>;
465
+ readonly event_count: v.NumberSchema<undefined>;
466
+ readonly events: v.ArraySchema<v.UnknownSchema, undefined>;
467
+ readonly execution_cost_read_count: v.NumberSchema<undefined>;
468
+ readonly execution_cost_read_length: v.NumberSchema<undefined>;
469
+ readonly execution_cost_runtime: v.NumberSchema<undefined>;
470
+ readonly execution_cost_write_count: v.NumberSchema<undefined>;
471
+ readonly execution_cost_write_length: v.NumberSchema<undefined>;
472
+ readonly tx_type: v.LiteralSchema<"smart_contract", undefined>;
473
+ readonly smart_contract: v.ObjectSchema<{
474
+ readonly clarity_version: v.UnionSchema<[v.NullSchema<undefined>, v.NumberSchema<undefined>], undefined>;
475
+ readonly contract_id: v.StringSchema<undefined>;
476
+ readonly source_code: v.StringSchema<undefined>;
477
+ }, undefined>;
478
+ }, undefined>, v.ObjectSchema<{
479
+ readonly tx_id: v.StringSchema<undefined>;
480
+ readonly nonce: v.NumberSchema<undefined>;
481
+ readonly fee_rate: v.StringSchema<undefined>;
482
+ readonly sender_address: v.StringSchema<undefined>;
483
+ readonly sponsored: v.BooleanSchema<undefined>;
484
+ readonly post_condition_mode: v.StringSchema<undefined>;
485
+ readonly post_conditions: v.ArraySchema<v.UnknownSchema, undefined>;
486
+ readonly anchor_mode: v.StringSchema<undefined>;
487
+ readonly is_unanchored: v.BooleanSchema<undefined>;
488
+ readonly block_hash: v.StringSchema<undefined>;
489
+ readonly parent_block_hash: v.StringSchema<undefined>;
490
+ readonly block_height: v.NumberSchema<undefined>;
491
+ readonly block_time: v.NumberSchema<undefined>;
492
+ readonly block_time_iso: v.StringSchema<undefined>;
493
+ readonly burn_block_height: v.NumberSchema<undefined>;
494
+ readonly burn_block_time: v.NumberSchema<undefined>;
495
+ readonly burn_block_time_iso: v.StringSchema<undefined>;
496
+ readonly parent_burn_block_time: v.NumberSchema<undefined>;
497
+ readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
498
+ readonly canonical: v.BooleanSchema<undefined>;
499
+ readonly tx_index: v.NumberSchema<undefined>;
500
+ readonly tx_status: v.UnionSchema<[v.LiteralSchema<"success", undefined>, v.LiteralSchema<"abort_by_response", undefined>, v.LiteralSchema<"abort_by_post_condition", undefined>], undefined>;
501
+ readonly tx_result: v.ObjectSchema<{
502
+ readonly hex: v.StringSchema<undefined>;
503
+ readonly repr: v.StringSchema<undefined>;
504
+ }, undefined>;
505
+ readonly microblock_hash: v.StringSchema<undefined>;
506
+ readonly microblock_sequence: v.NumberSchema<undefined>;
507
+ readonly microblock_canonical: v.BooleanSchema<undefined>;
508
+ readonly event_count: v.NumberSchema<undefined>;
509
+ readonly events: v.ArraySchema<v.UnknownSchema, undefined>;
510
+ readonly execution_cost_read_count: v.NumberSchema<undefined>;
511
+ readonly execution_cost_read_length: v.NumberSchema<undefined>;
512
+ readonly execution_cost_runtime: v.NumberSchema<undefined>;
513
+ readonly execution_cost_write_count: v.NumberSchema<undefined>;
514
+ readonly execution_cost_write_length: v.NumberSchema<undefined>;
515
+ readonly tx_type: v.LiteralSchema<"token_transfer", undefined>;
516
+ readonly token_transfer: v.ObjectSchema<{
517
+ readonly recipient_address: v.StringSchema<undefined>;
518
+ readonly amount: v.StringSchema<undefined>;
519
+ readonly memo: v.StringSchema<undefined>;
520
+ }, undefined>;
521
+ }, undefined>], undefined>;
522
+ readonly stx_sent: v.StringSchema<undefined>;
523
+ readonly stx_received: v.StringSchema<undefined>;
524
+ readonly events: v.ObjectSchema<{
525
+ readonly stx: v.ObjectSchema<{
526
+ readonly transfer: v.NumberSchema<undefined>;
527
+ readonly mint: v.NumberSchema<undefined>;
528
+ readonly burn: v.NumberSchema<undefined>;
529
+ }, undefined>;
530
+ readonly ft: v.ObjectSchema<{
531
+ readonly transfer: v.NumberSchema<undefined>;
532
+ readonly mint: v.NumberSchema<undefined>;
533
+ readonly burn: v.NumberSchema<undefined>;
534
+ }, undefined>;
535
+ readonly nft: v.ObjectSchema<{
536
+ readonly transfer: v.NumberSchema<undefined>;
537
+ readonly mint: v.NumberSchema<undefined>;
538
+ readonly burn: v.NumberSchema<undefined>;
539
+ }, undefined>;
540
+ }, undefined>;
541
+ }, undefined>;
542
+ type Result = v.InferOutput<typeof resultSchema>;
543
+ declare const resultsSchema$3: v.ArraySchema<v.ObjectSchema<{
544
+ readonly tx: v.VariantSchema<"tx_type", [v.ObjectSchema<{
545
+ readonly tx_id: v.StringSchema<undefined>;
546
+ readonly nonce: v.NumberSchema<undefined>;
547
+ readonly fee_rate: v.StringSchema<undefined>;
548
+ readonly sender_address: v.StringSchema<undefined>;
549
+ readonly sponsored: v.BooleanSchema<undefined>;
550
+ readonly post_condition_mode: v.StringSchema<undefined>;
551
+ readonly post_conditions: v.ArraySchema<v.UnknownSchema, undefined>;
552
+ readonly anchor_mode: v.StringSchema<undefined>;
553
+ readonly is_unanchored: v.BooleanSchema<undefined>;
554
+ readonly block_hash: v.StringSchema<undefined>;
555
+ readonly parent_block_hash: v.StringSchema<undefined>;
556
+ readonly block_height: v.NumberSchema<undefined>;
557
+ readonly block_time: v.NumberSchema<undefined>;
558
+ readonly block_time_iso: v.StringSchema<undefined>;
559
+ readonly burn_block_height: v.NumberSchema<undefined>;
560
+ readonly burn_block_time: v.NumberSchema<undefined>;
561
+ readonly burn_block_time_iso: v.StringSchema<undefined>;
562
+ readonly parent_burn_block_time: v.NumberSchema<undefined>;
563
+ readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
564
+ readonly canonical: v.BooleanSchema<undefined>;
565
+ readonly tx_index: v.NumberSchema<undefined>;
566
+ readonly tx_status: v.UnionSchema<[v.LiteralSchema<"success", undefined>, v.LiteralSchema<"abort_by_response", undefined>, v.LiteralSchema<"abort_by_post_condition", undefined>], undefined>;
567
+ readonly tx_result: v.ObjectSchema<{
568
+ readonly hex: v.StringSchema<undefined>;
569
+ readonly repr: v.StringSchema<undefined>;
570
+ }, undefined>;
571
+ readonly microblock_hash: v.StringSchema<undefined>;
572
+ readonly microblock_sequence: v.NumberSchema<undefined>;
573
+ readonly microblock_canonical: v.BooleanSchema<undefined>;
574
+ readonly event_count: v.NumberSchema<undefined>;
575
+ readonly events: v.ArraySchema<v.UnknownSchema, undefined>;
576
+ readonly execution_cost_read_count: v.NumberSchema<undefined>;
577
+ readonly execution_cost_read_length: v.NumberSchema<undefined>;
578
+ readonly execution_cost_runtime: v.NumberSchema<undefined>;
579
+ readonly execution_cost_write_count: v.NumberSchema<undefined>;
580
+ readonly execution_cost_write_length: v.NumberSchema<undefined>;
581
+ readonly tx_type: v.LiteralSchema<"contract_call", undefined>;
582
+ readonly contract_call: v.ObjectSchema<{
583
+ readonly contract_id: v.StringSchema<undefined>;
584
+ readonly function_name: v.StringSchema<undefined>;
585
+ readonly function_signature: v.StringSchema<undefined>;
586
+ readonly function_args: v.ArraySchema<v.ObjectSchema<{
587
+ readonly hex: v.StringSchema<undefined>;
588
+ readonly repr: v.StringSchema<undefined>;
589
+ readonly name: v.StringSchema<undefined>;
590
+ readonly type: v.StringSchema<undefined>;
591
+ }, undefined>, undefined>;
592
+ }, undefined>;
593
+ }, undefined>, v.ObjectSchema<{
594
+ readonly tx_id: v.StringSchema<undefined>;
595
+ readonly nonce: v.NumberSchema<undefined>;
596
+ readonly fee_rate: v.StringSchema<undefined>;
597
+ readonly sender_address: v.StringSchema<undefined>;
598
+ readonly sponsored: v.BooleanSchema<undefined>;
599
+ readonly post_condition_mode: v.StringSchema<undefined>;
600
+ readonly post_conditions: v.ArraySchema<v.UnknownSchema, undefined>;
601
+ readonly anchor_mode: v.StringSchema<undefined>;
602
+ readonly is_unanchored: v.BooleanSchema<undefined>;
603
+ readonly block_hash: v.StringSchema<undefined>;
604
+ readonly parent_block_hash: v.StringSchema<undefined>;
605
+ readonly block_height: v.NumberSchema<undefined>;
606
+ readonly block_time: v.NumberSchema<undefined>;
607
+ readonly block_time_iso: v.StringSchema<undefined>;
608
+ readonly burn_block_height: v.NumberSchema<undefined>;
609
+ readonly burn_block_time: v.NumberSchema<undefined>;
610
+ readonly burn_block_time_iso: v.StringSchema<undefined>;
611
+ readonly parent_burn_block_time: v.NumberSchema<undefined>;
612
+ readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
613
+ readonly canonical: v.BooleanSchema<undefined>;
614
+ readonly tx_index: v.NumberSchema<undefined>;
615
+ readonly tx_status: v.UnionSchema<[v.LiteralSchema<"success", undefined>, v.LiteralSchema<"abort_by_response", undefined>, v.LiteralSchema<"abort_by_post_condition", undefined>], undefined>;
616
+ readonly tx_result: v.ObjectSchema<{
617
+ readonly hex: v.StringSchema<undefined>;
618
+ readonly repr: v.StringSchema<undefined>;
619
+ }, undefined>;
620
+ readonly microblock_hash: v.StringSchema<undefined>;
621
+ readonly microblock_sequence: v.NumberSchema<undefined>;
622
+ readonly microblock_canonical: v.BooleanSchema<undefined>;
623
+ readonly event_count: v.NumberSchema<undefined>;
624
+ readonly events: v.ArraySchema<v.UnknownSchema, undefined>;
625
+ readonly execution_cost_read_count: v.NumberSchema<undefined>;
626
+ readonly execution_cost_read_length: v.NumberSchema<undefined>;
627
+ readonly execution_cost_runtime: v.NumberSchema<undefined>;
628
+ readonly execution_cost_write_count: v.NumberSchema<undefined>;
629
+ readonly execution_cost_write_length: v.NumberSchema<undefined>;
630
+ readonly tx_type: v.LiteralSchema<"smart_contract", undefined>;
631
+ readonly smart_contract: v.ObjectSchema<{
632
+ readonly clarity_version: v.UnionSchema<[v.NullSchema<undefined>, v.NumberSchema<undefined>], undefined>;
633
+ readonly contract_id: v.StringSchema<undefined>;
634
+ readonly source_code: v.StringSchema<undefined>;
635
+ }, undefined>;
636
+ }, undefined>, v.ObjectSchema<{
637
+ readonly tx_id: v.StringSchema<undefined>;
638
+ readonly nonce: v.NumberSchema<undefined>;
639
+ readonly fee_rate: v.StringSchema<undefined>;
640
+ readonly sender_address: v.StringSchema<undefined>;
641
+ readonly sponsored: v.BooleanSchema<undefined>;
642
+ readonly post_condition_mode: v.StringSchema<undefined>;
643
+ readonly post_conditions: v.ArraySchema<v.UnknownSchema, undefined>;
644
+ readonly anchor_mode: v.StringSchema<undefined>;
645
+ readonly is_unanchored: v.BooleanSchema<undefined>;
646
+ readonly block_hash: v.StringSchema<undefined>;
647
+ readonly parent_block_hash: v.StringSchema<undefined>;
648
+ readonly block_height: v.NumberSchema<undefined>;
649
+ readonly block_time: v.NumberSchema<undefined>;
650
+ readonly block_time_iso: v.StringSchema<undefined>;
651
+ readonly burn_block_height: v.NumberSchema<undefined>;
652
+ readonly burn_block_time: v.NumberSchema<undefined>;
653
+ readonly burn_block_time_iso: v.StringSchema<undefined>;
654
+ readonly parent_burn_block_time: v.NumberSchema<undefined>;
655
+ readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
656
+ readonly canonical: v.BooleanSchema<undefined>;
657
+ readonly tx_index: v.NumberSchema<undefined>;
658
+ readonly tx_status: v.UnionSchema<[v.LiteralSchema<"success", undefined>, v.LiteralSchema<"abort_by_response", undefined>, v.LiteralSchema<"abort_by_post_condition", undefined>], undefined>;
659
+ readonly tx_result: v.ObjectSchema<{
660
+ readonly hex: v.StringSchema<undefined>;
661
+ readonly repr: v.StringSchema<undefined>;
662
+ }, undefined>;
663
+ readonly microblock_hash: v.StringSchema<undefined>;
664
+ readonly microblock_sequence: v.NumberSchema<undefined>;
665
+ readonly microblock_canonical: v.BooleanSchema<undefined>;
666
+ readonly event_count: v.NumberSchema<undefined>;
667
+ readonly events: v.ArraySchema<v.UnknownSchema, undefined>;
668
+ readonly execution_cost_read_count: v.NumberSchema<undefined>;
669
+ readonly execution_cost_read_length: v.NumberSchema<undefined>;
670
+ readonly execution_cost_runtime: v.NumberSchema<undefined>;
671
+ readonly execution_cost_write_count: v.NumberSchema<undefined>;
672
+ readonly execution_cost_write_length: v.NumberSchema<undefined>;
673
+ readonly tx_type: v.LiteralSchema<"token_transfer", undefined>;
674
+ readonly token_transfer: v.ObjectSchema<{
675
+ readonly recipient_address: v.StringSchema<undefined>;
676
+ readonly amount: v.StringSchema<undefined>;
677
+ readonly memo: v.StringSchema<undefined>;
678
+ }, undefined>;
679
+ }, undefined>], undefined>;
680
+ readonly stx_sent: v.StringSchema<undefined>;
681
+ readonly stx_received: v.StringSchema<undefined>;
682
+ readonly events: v.ObjectSchema<{
683
+ readonly stx: v.ObjectSchema<{
684
+ readonly transfer: v.NumberSchema<undefined>;
685
+ readonly mint: v.NumberSchema<undefined>;
686
+ readonly burn: v.NumberSchema<undefined>;
687
+ }, undefined>;
688
+ readonly ft: v.ObjectSchema<{
689
+ readonly transfer: v.NumberSchema<undefined>;
690
+ readonly mint: v.NumberSchema<undefined>;
691
+ readonly burn: v.NumberSchema<undefined>;
692
+ }, undefined>;
693
+ readonly nft: v.ObjectSchema<{
694
+ readonly transfer: v.NumberSchema<undefined>;
695
+ readonly mint: v.NumberSchema<undefined>;
696
+ readonly burn: v.NumberSchema<undefined>;
697
+ }, undefined>;
698
+ }, undefined>;
699
+ }, undefined>, undefined>;
700
+ type Results$3 = v.InferOutput<typeof resultsSchema$3>;
182
701
  declare const addressTransactionsResponseSchema: v.ObjectSchema<{
183
702
  readonly results: v.ArraySchema<v.ObjectSchema<{
184
703
  readonly tx: v.VariantSchema<"tx_type", [v.ObjectSchema<{
@@ -203,7 +722,7 @@ declare const addressTransactionsResponseSchema: v.ObjectSchema<{
203
722
  readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
204
723
  readonly canonical: v.BooleanSchema<undefined>;
205
724
  readonly tx_index: v.NumberSchema<undefined>;
206
- readonly tx_status: v.StringSchema<undefined>;
725
+ readonly tx_status: v.UnionSchema<[v.LiteralSchema<"success", undefined>, v.LiteralSchema<"abort_by_response", undefined>, v.LiteralSchema<"abort_by_post_condition", undefined>], undefined>;
207
726
  readonly tx_result: v.ObjectSchema<{
208
727
  readonly hex: v.StringSchema<undefined>;
209
728
  readonly repr: v.StringSchema<undefined>;
@@ -252,7 +771,7 @@ declare const addressTransactionsResponseSchema: v.ObjectSchema<{
252
771
  readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
253
772
  readonly canonical: v.BooleanSchema<undefined>;
254
773
  readonly tx_index: v.NumberSchema<undefined>;
255
- readonly tx_status: v.StringSchema<undefined>;
774
+ readonly tx_status: v.UnionSchema<[v.LiteralSchema<"success", undefined>, v.LiteralSchema<"abort_by_response", undefined>, v.LiteralSchema<"abort_by_post_condition", undefined>], undefined>;
256
775
  readonly tx_result: v.ObjectSchema<{
257
776
  readonly hex: v.StringSchema<undefined>;
258
777
  readonly repr: v.StringSchema<undefined>;
@@ -295,7 +814,7 @@ declare const addressTransactionsResponseSchema: v.ObjectSchema<{
295
814
  readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
296
815
  readonly canonical: v.BooleanSchema<undefined>;
297
816
  readonly tx_index: v.NumberSchema<undefined>;
298
- readonly tx_status: v.StringSchema<undefined>;
817
+ readonly tx_status: v.UnionSchema<[v.LiteralSchema<"success", undefined>, v.LiteralSchema<"abort_by_response", undefined>, v.LiteralSchema<"abort_by_post_condition", undefined>], undefined>;
299
818
  readonly tx_result: v.ObjectSchema<{
300
819
  readonly hex: v.StringSchema<undefined>;
301
820
  readonly repr: v.StringSchema<undefined>;
@@ -342,7 +861,14 @@ declare const addressTransactionsResponseSchema: v.ObjectSchema<{
342
861
  readonly total: v.NumberSchema<undefined>;
343
862
  }, undefined>;
344
863
  type AddressTransactionsResponse = v.InferOutput<typeof addressTransactionsResponseSchema>;
345
- declare function addressTransactions(args: Args$9): Promise<Result<AddressTransactionsResponse, SafeError<"FetchAddressTransactionsError" | "ParseBodyError" | "ValidateDataError">>>;
864
+ declare function addressTransactions(args: Args$9): Promise<Result$1<AddressTransactionsResponse, SafeError<"FetchAddressTransactionsError" | "ParseBodyError" | "ValidateDataError">>>;
865
+
866
+ type addressTransactions$1_AddressTransactionsResponse = AddressTransactionsResponse;
867
+ type addressTransactions$1_Result = Result;
868
+ declare const addressTransactions$1_addressTransactions: typeof addressTransactions;
869
+ declare namespace addressTransactions$1 {
870
+ export { type addressTransactions$1_AddressTransactionsResponse as AddressTransactionsResponse, type addressTransactions$1_Result as Result, type Results$3 as Results, addressTransactions$1_addressTransactions as addressTransactions };
871
+ }
346
872
 
347
873
  type Options$1 = {
348
874
  poolPrincipal: string;
@@ -351,6 +877,15 @@ type Options$1 = {
351
877
  limit?: number;
352
878
  offset?: number;
353
879
  };
880
+ declare const memberSchema: v.ObjectSchema<{
881
+ readonly stacker: v.StringSchema<undefined>;
882
+ readonly pox_addr: v.OptionalSchema<v.StringSchema<undefined>, never>;
883
+ readonly amount_ustx: v.StringSchema<undefined>;
884
+ readonly burn_block_unlock_height: v.OptionalSchema<v.NumberSchema<undefined>, never>;
885
+ readonly block_height: v.NumberSchema<undefined>;
886
+ readonly tx_id: v.StringSchema<undefined>;
887
+ }, undefined>;
888
+ type Member = v.InferOutput<typeof memberSchema>;
354
889
  declare const membersResponseSchema: v.ObjectSchema<{
355
890
  readonly limit: v.NumberSchema<undefined>;
356
891
  readonly offset: v.NumberSchema<undefined>;
@@ -365,15 +900,24 @@ declare const membersResponseSchema: v.ObjectSchema<{
365
900
  }, undefined>, undefined>;
366
901
  }, undefined>;
367
902
  type MembersResponse = v.InferOutput<typeof membersResponseSchema>;
368
- declare function members(opts: Options$1, apiOpts: ApiRequestOptions): Promise<Result<MembersResponse>>;
903
+ declare function members(opts: Options$1, apiOpts: ApiRequestOptions): Promise<Result$1<MembersResponse>>;
369
904
 
370
- type Options = {
905
+ type members$1_Member = Member;
906
+ type members$1_MembersResponse = MembersResponse;
907
+ declare const members$1_memberSchema: typeof memberSchema;
908
+ declare const members$1_members: typeof members;
909
+ declare const members$1_membersResponseSchema: typeof membersResponseSchema;
910
+ declare namespace members$1 {
911
+ export { type members$1_Member as Member, type members$1_MembersResponse as MembersResponse, type Options$1 as Options, members$1_memberSchema as memberSchema, members$1_members as members, members$1_membersResponseSchema as membersResponseSchema };
912
+ }
913
+
914
+ type Args$8 = {
371
915
  sender: string;
372
916
  arguments: string[];
373
917
  contractAddress: string;
374
918
  contractName: string;
375
919
  functionName: string;
376
- };
920
+ } & ApiRequestOptions;
377
921
  declare const readOnlyResponseSchema: v.VariantSchema<"okay", [v.ObjectSchema<{
378
922
  readonly okay: v.LiteralSchema<true, undefined>;
379
923
  readonly result: v.StringSchema<undefined>;
@@ -382,12 +926,33 @@ declare const readOnlyResponseSchema: v.VariantSchema<"okay", [v.ObjectSchema<{
382
926
  readonly cause: v.UnknownSchema;
383
927
  }, undefined>], undefined>;
384
928
  type ReadOnlyResponse = v.InferOutput<typeof readOnlyResponseSchema>;
385
- declare function readOnly(opts: Options, apiOpts: ApiRequestOptions): Promise<Result<ReadOnlyResponse>>;
929
+ declare function readOnly(args: Args$8): Promise<Result$1<ReadOnlyResponse>>;
386
930
 
387
- type Args$8 = {
931
+ type readOnly$1_ReadOnlyResponse = ReadOnlyResponse;
932
+ declare const readOnly$1_readOnly: typeof readOnly;
933
+ declare const readOnly$1_readOnlyResponseSchema: typeof readOnlyResponseSchema;
934
+ declare namespace readOnly$1 {
935
+ export { type Args$8 as Args, type readOnly$1_ReadOnlyResponse as ReadOnlyResponse, readOnly$1_readOnly as readOnly, readOnly$1_readOnlyResponseSchema as readOnlyResponseSchema };
936
+ }
937
+
938
+ type Args$7 = {
388
939
  cycleNumber: number;
389
940
  signerPublicKey: string;
390
941
  } & ApiRequestOptions & ApiPaginationOptions;
942
+ declare const stackerInfoSchema: v.ObjectSchema<{
943
+ readonly stacker_address: v.StringSchema<undefined>;
944
+ readonly stacked_amount: v.StringSchema<undefined>;
945
+ readonly pox_address: v.StringSchema<undefined>;
946
+ readonly stacker_type: v.UnionSchema<[v.LiteralSchema<"pooled", undefined>, v.LiteralSchema<"solo", undefined>], undefined>;
947
+ }, undefined>;
948
+ type StackerInfo = v.InferOutput<typeof stackerInfoSchema>;
949
+ declare const resultsSchema$2: v.ArraySchema<v.ObjectSchema<{
950
+ readonly stacker_address: v.StringSchema<undefined>;
951
+ readonly stacked_amount: v.StringSchema<undefined>;
952
+ readonly pox_address: v.StringSchema<undefined>;
953
+ readonly stacker_type: v.UnionSchema<[v.LiteralSchema<"pooled", undefined>, v.LiteralSchema<"solo", undefined>], undefined>;
954
+ }, undefined>, undefined>;
955
+ type Results$2 = v.InferOutput<typeof resultsSchema$2>;
391
956
  declare const stackersForSignerInCycleResponseSchema: v.ObjectSchema<{
392
957
  readonly results: v.ArraySchema<v.ObjectSchema<{
393
958
  readonly stacker_address: v.StringSchema<undefined>;
@@ -400,11 +965,42 @@ declare const stackersForSignerInCycleResponseSchema: v.ObjectSchema<{
400
965
  readonly total: v.NumberSchema<undefined>;
401
966
  }, undefined>;
402
967
  type StackersForSignerInCycleResponse = v.InferOutput<typeof stackersForSignerInCycleResponseSchema>;
403
- declare function stackersForSignerInCycle(opts: Args$8): Promise<Result<StackersForSignerInCycleResponse, SafeError<"FetchStackersForSignerInCycleError" | "ParseBodyError" | "ValidateDataError">>>;
968
+ declare function stackersForSignerInCycle(opts: Args$7): Promise<Result$1<StackersForSignerInCycleResponse, SafeError<"FetchStackersForSignerInCycleError" | "ParseBodyError" | "ValidateDataError">>>;
404
969
 
405
- type Args$7 = {
970
+ type stackersForSignerInCycle$1_StackerInfo = StackerInfo;
971
+ type stackersForSignerInCycle$1_StackersForSignerInCycleResponse = StackersForSignerInCycleResponse;
972
+ declare const stackersForSignerInCycle$1_stackerInfoSchema: typeof stackerInfoSchema;
973
+ declare const stackersForSignerInCycle$1_stackersForSignerInCycle: typeof stackersForSignerInCycle;
974
+ declare const stackersForSignerInCycle$1_stackersForSignerInCycleResponseSchema: typeof stackersForSignerInCycleResponseSchema;
975
+ declare namespace stackersForSignerInCycle$1 {
976
+ export { type Args$7 as Args, type Results$2 as Results, type stackersForSignerInCycle$1_StackerInfo as StackerInfo, type stackersForSignerInCycle$1_StackersForSignerInCycleResponse as StackersForSignerInCycleResponse, resultsSchema$2 as resultsSchema, stackersForSignerInCycle$1_stackerInfoSchema as stackerInfoSchema, stackersForSignerInCycle$1_stackersForSignerInCycle as stackersForSignerInCycle, stackersForSignerInCycle$1_stackersForSignerInCycleResponseSchema as stackersForSignerInCycleResponseSchema };
977
+ }
978
+
979
+ type Args$6 = {
406
980
  cycleNumber: number;
407
981
  } & ApiRequestOptions & ApiPaginationOptions;
982
+ declare const signerSchema: v.ObjectSchema<{
983
+ readonly signing_key: v.StringSchema<undefined>;
984
+ readonly signer_address: v.StringSchema<undefined>;
985
+ readonly weight: v.NumberSchema<undefined>;
986
+ readonly stacked_amount: v.StringSchema<undefined>;
987
+ readonly weight_percent: v.NumberSchema<undefined>;
988
+ readonly stacked_amount_percent: v.NumberSchema<undefined>;
989
+ readonly pooled_stacker_count: v.NumberSchema<undefined>;
990
+ readonly solo_stacker_count: v.NumberSchema<undefined>;
991
+ }, undefined>;
992
+ type Signer = v.InferOutput<typeof signerSchema>;
993
+ declare const resultsSchema$1: v.ArraySchema<v.ObjectSchema<{
994
+ readonly signing_key: v.StringSchema<undefined>;
995
+ readonly signer_address: v.StringSchema<undefined>;
996
+ readonly weight: v.NumberSchema<undefined>;
997
+ readonly stacked_amount: v.StringSchema<undefined>;
998
+ readonly weight_percent: v.NumberSchema<undefined>;
999
+ readonly stacked_amount_percent: v.NumberSchema<undefined>;
1000
+ readonly pooled_stacker_count: v.NumberSchema<undefined>;
1001
+ readonly solo_stacker_count: v.NumberSchema<undefined>;
1002
+ }, undefined>, undefined>;
1003
+ type Results$1 = v.InferOutput<typeof resultsSchema$1>;
408
1004
  declare const signersResponseSchema: v.ObjectSchema<{
409
1005
  readonly results: v.ArraySchema<v.ObjectSchema<{
410
1006
  readonly signing_key: v.StringSchema<undefined>;
@@ -421,9 +1017,18 @@ declare const signersResponseSchema: v.ObjectSchema<{
421
1017
  readonly total: v.NumberSchema<undefined>;
422
1018
  }, undefined>;
423
1019
  type SignersResponse = v.InferOutput<typeof signersResponseSchema>;
424
- declare function signersInCycle(args: Args$7): Promise<Result<SignersResponse, SafeError<"FetchSignersError" | "ParseBodyError" | "ValidateDataError">>>;
1020
+ declare function signersInCycle(args: Args$6): Promise<Result$1<SignersResponse, SafeError<"FetchSignersError" | "ParseBodyError" | "ValidateDataError">>>;
425
1021
 
426
- type Args$6 = {
1022
+ type signersInCycle$1_Signer = Signer;
1023
+ type signersInCycle$1_SignersResponse = SignersResponse;
1024
+ declare const signersInCycle$1_signerSchema: typeof signerSchema;
1025
+ declare const signersInCycle$1_signersInCycle: typeof signersInCycle;
1026
+ declare const signersInCycle$1_signersResponseSchema: typeof signersResponseSchema;
1027
+ declare namespace signersInCycle$1 {
1028
+ export { type Args$6 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 };
1029
+ }
1030
+
1031
+ type Args$5 = {
427
1032
  /**
428
1033
  * The signers public key as a hex string, with or without a '0x' prefix.
429
1034
  */
@@ -441,9 +1046,34 @@ declare const signerInCycleResponseSchema: v.ObjectSchema<{
441
1046
  readonly pooled_stacker_count: v.NumberSchema<undefined>;
442
1047
  }, undefined>;
443
1048
  type SignerInCycleResponse = v.InferOutput<typeof signerInCycleResponseSchema>;
444
- declare function signerInCycle(args: Args$6): Promise<Result<SignerInCycleResponse>>;
1049
+ declare function signerInCycle(args: Args$5): Promise<Result$1<SignerInCycleResponse>>;
1050
+
1051
+ type signerInCycle$1_SignerInCycleResponse = SignerInCycleResponse;
1052
+ declare const signerInCycle$1_signerInCycle: typeof signerInCycle;
1053
+ declare const signerInCycle$1_signerInCycleResponseSchema: typeof signerInCycleResponseSchema;
1054
+ declare namespace signerInCycle$1 {
1055
+ export { type Args$5 as Args, type signerInCycle$1_SignerInCycleResponse as SignerInCycleResponse, signerInCycle$1_signerInCycle as signerInCycle, signerInCycle$1_signerInCycleResponseSchema as signerInCycleResponseSchema };
1056
+ }
445
1057
 
446
- type Args$5 = ApiRequestOptions & ApiPaginationOptions;
1058
+ type Args$4 = ApiRequestOptions & ApiPaginationOptions;
1059
+ declare const cycleInfoSchema: v.ObjectSchema<{
1060
+ readonly block_height: v.NumberSchema<undefined>;
1061
+ readonly index_block_hash: v.StringSchema<undefined>;
1062
+ readonly cycle_number: v.NumberSchema<undefined>;
1063
+ readonly total_weight: v.NumberSchema<undefined>;
1064
+ readonly total_stacked_amount: v.StringSchema<undefined>;
1065
+ readonly total_signers: v.NumberSchema<undefined>;
1066
+ }, undefined>;
1067
+ type CycleInfo = v.InferOutput<typeof cycleInfoSchema>;
1068
+ declare const resultsSchema: v.ArraySchema<v.ObjectSchema<{
1069
+ readonly block_height: v.NumberSchema<undefined>;
1070
+ readonly index_block_hash: v.StringSchema<undefined>;
1071
+ readonly cycle_number: v.NumberSchema<undefined>;
1072
+ readonly total_weight: v.NumberSchema<undefined>;
1073
+ readonly total_stacked_amount: v.StringSchema<undefined>;
1074
+ readonly total_signers: v.NumberSchema<undefined>;
1075
+ }, undefined>, undefined>;
1076
+ type Results = v.InferOutput<typeof resultsSchema>;
447
1077
  declare const cyclesResponseSchema: v.ObjectSchema<{
448
1078
  readonly results: v.ArraySchema<v.ObjectSchema<{
449
1079
  readonly block_height: v.NumberSchema<undefined>;
@@ -458,9 +1088,20 @@ declare const cyclesResponseSchema: v.ObjectSchema<{
458
1088
  readonly total: v.NumberSchema<undefined>;
459
1089
  }, undefined>;
460
1090
  type CyclesResponse = v.InferOutput<typeof cyclesResponseSchema>;
461
- declare function cycles(args: Args$5): Promise<Result<CyclesResponse>>;
1091
+ declare function cycles(args: Args$4): Promise<Result$1<CyclesResponse>>;
462
1092
 
463
- type Args$4 = {
1093
+ type cycles$1_CycleInfo = CycleInfo;
1094
+ type cycles$1_CyclesResponse = CyclesResponse;
1095
+ type cycles$1_Results = Results;
1096
+ declare const cycles$1_cycleInfoSchema: typeof cycleInfoSchema;
1097
+ declare const cycles$1_cycles: typeof cycles;
1098
+ declare const cycles$1_cyclesResponseSchema: typeof cyclesResponseSchema;
1099
+ declare const cycles$1_resultsSchema: typeof resultsSchema;
1100
+ declare namespace cycles$1 {
1101
+ export { type Args$4 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 };
1102
+ }
1103
+
1104
+ type Args$3 = {
464
1105
  cycleNumber: number;
465
1106
  } & ApiRequestOptions;
466
1107
  declare const responseSchema$2: v.ObjectSchema<{
@@ -472,9 +1113,14 @@ declare const responseSchema$2: v.ObjectSchema<{
472
1113
  readonly total_signers: v.NumberSchema<undefined>;
473
1114
  }, undefined>;
474
1115
  type Response$2 = v.InferOutput<typeof responseSchema$2>;
475
- declare function cycle(opts: Args$4): Promise<Result<Response$2, SafeError<"FetchCycleError" | "ParseBodyError" | "ValidateDataError">>>;
1116
+ declare function cycle(opts: Args$3): Promise<Result$1<Response$2, SafeError<"FetchCycleError" | "ParseBodyError" | "ValidateDataError">>>;
1117
+
1118
+ declare const cycle$1_cycle: typeof cycle;
1119
+ declare namespace cycle$1 {
1120
+ export { type Args$3 as Args, type Response$2 as Response, cycle$1_cycle as cycle, responseSchema$2 as responseSchema };
1121
+ }
476
1122
 
477
- type Args$3 = ApiRequestOptions;
1123
+ type Args$2 = ApiRequestOptions;
478
1124
  declare const poxDetailsResponseSchema: v.ObjectSchema<{
479
1125
  readonly contract_id: v.StringSchema<undefined>;
480
1126
  readonly pox_activation_threshold_ustx: v.NumberSchema<undefined>;
@@ -528,7 +1174,12 @@ declare const poxDetailsResponseSchema: v.ObjectSchema<{
528
1174
  }, undefined>, undefined>;
529
1175
  }, undefined>;
530
1176
  type PoxDetailsResponse = v.InferOutput<typeof poxDetailsResponseSchema>;
531
- declare function poxDetails(args: Args$3): Promise<Result<PoxDetailsResponse>>;
1177
+ declare function poxDetails(args: Args$2): Promise<Result$1<PoxDetailsResponse>>;
1178
+
1179
+ declare const poxDetails$1_poxDetails: typeof poxDetails;
1180
+ declare namespace poxDetails$1 {
1181
+ export { poxDetails$1_poxDetails as poxDetails };
1182
+ }
532
1183
 
533
1184
  declare const CoreApiResponseSchema: v.ObjectSchema<{
534
1185
  readonly peer_version: v.NumberSchema<undefined>;
@@ -546,9 +1197,15 @@ declare const CoreApiResponseSchema: v.ObjectSchema<{
546
1197
  readonly exit_at_block_height: v.NumberSchema<undefined>;
547
1198
  }, undefined>;
548
1199
  type CoreApiResponse = v.InferOutput<typeof CoreApiResponseSchema>;
549
- declare function coreApi(apiOpts: ApiRequestOptions): Promise<Result<CoreApiResponse>>;
1200
+ declare function coreApi(apiOpts: ApiRequestOptions): Promise<Result$1<CoreApiResponse>>;
550
1201
 
551
- type Args$2 = {
1202
+ type coreApi$1_CoreApiResponse = CoreApiResponse;
1203
+ declare const coreApi$1_coreApi: typeof coreApi;
1204
+ declare namespace coreApi$1 {
1205
+ export { type coreApi$1_CoreApiResponse as CoreApiResponse, coreApi$1_coreApi as coreApi };
1206
+ }
1207
+
1208
+ type Args$1 = {
552
1209
  heightOrHash: string | number;
553
1210
  } & ApiRequestOptions;
554
1211
  declare const responseSchema$1: v.ObjectSchema<{
@@ -573,9 +1230,14 @@ declare const responseSchema$1: v.ObjectSchema<{
573
1230
  readonly execution_cost_write_length: v.NumberSchema<undefined>;
574
1231
  }, undefined>;
575
1232
  type Response$1 = v.InferOutput<typeof responseSchema$1>;
576
- declare function getBlock(opts: Args$2): Promise<Result<Response$1, SafeError<"FetchBlockError" | "ParseBodyError" | "ValidateDataError">>>;
1233
+ declare function getBlock(opts: Args$1): Promise<Result$1<Response$1, SafeError<"FetchBlockError" | "ParseBodyError" | "ValidateDataError">>>;
577
1234
 
578
- type Args$1 = {
1235
+ declare const getBlock$1_getBlock: typeof getBlock;
1236
+ declare namespace getBlock$1 {
1237
+ export { type Args$1 as Args, type Response$1 as Response, getBlock$1_getBlock as getBlock, responseSchema$1 as responseSchema };
1238
+ }
1239
+
1240
+ type Args = {
579
1241
  principal: string;
580
1242
  unanchored?: boolean;
581
1243
  untilBlock?: number;
@@ -605,7 +1267,108 @@ declare const responseSchema: v.ObjectSchema<{
605
1267
  }, undefined>, undefined>;
606
1268
  }, undefined>;
607
1269
  type Response = v.InferOutput<typeof responseSchema>;
608
- declare function balances(opts: Args$1): Promise<Result<Response, SafeError<"FetchBalancesError" | "ParseBodyError" | "ValidateDataError">>>;
1270
+ declare function balances(opts: Args): Promise<Result$1<Response, SafeError<"FetchBalancesError" | "ParseBodyError" | "ValidateDataError">>>;
1271
+
1272
+ type balances$1_Args = Args;
1273
+ type balances$1_Response = Response;
1274
+ declare const balances$1_balances: typeof balances;
1275
+ declare const balances$1_responseSchema: typeof responseSchema;
1276
+ declare namespace balances$1 {
1277
+ export { type balances$1_Args as Args, type balances$1_Response as Response, balances$1_balances as balances, balances$1_responseSchema as responseSchema };
1278
+ }
1279
+
1280
+ declare const index$7_balances: typeof balances;
1281
+ declare namespace index$7 {
1282
+ export { balances$1 as Balances, index$7_balances as balances };
1283
+ }
1284
+
1285
+ declare const index$6_getBlock: typeof getBlock;
1286
+ declare namespace index$6 {
1287
+ export { getBlock$1 as GetBlock, index$6_getBlock as getBlock };
1288
+ }
1289
+
1290
+ declare const index$5_coreApi: typeof coreApi;
1291
+ declare const index$5_poxDetails: typeof poxDetails;
1292
+ declare namespace index$5 {
1293
+ export { coreApi$1 as CoreApi, poxDetails$1 as PoxDetails, index$5_coreApi as coreApi, index$5_poxDetails as poxDetails };
1294
+ }
1295
+
1296
+ declare const index$4_cycle: typeof cycle;
1297
+ declare const index$4_cycles: typeof cycles;
1298
+ declare const index$4_signerInCycle: typeof signerInCycle;
1299
+ declare const index$4_signersInCycle: typeof signersInCycle;
1300
+ declare const index$4_stackersForSignerInCycle: typeof stackersForSignerInCycle;
1301
+ declare namespace index$4 {
1302
+ export { cycle$1 as Cycle, cycles$1 as Cycles, signerInCycle$1 as SignerInCycle, signersInCycle$1 as SignersInCycle, stackersForSignerInCycle$1 as StackersForSignerInCycle, index$4_cycle as cycle, index$4_cycles as cycles, index$4_signerInCycle as signerInCycle, index$4_signersInCycle as signersInCycle, index$4_stackersForSignerInCycle as stackersForSignerInCycle };
1303
+ }
1304
+
1305
+ declare const index$3_readOnly: typeof readOnly;
1306
+ declare namespace index$3 {
1307
+ export { readOnly$1 as ReadOnly, index$3_readOnly as readOnly };
1308
+ }
1309
+
1310
+ declare const index$2_members: typeof members;
1311
+ declare namespace index$2 {
1312
+ export { members$1 as Members, index$2_members as members };
1313
+ }
1314
+
1315
+ declare const index$1_addressTransactions: typeof addressTransactions;
1316
+ declare const index$1_getTransaction: typeof getTransaction;
1317
+ declare namespace index$1 {
1318
+ export { addressTransactions$1 as AddressTransactions, schemas as Common, getTransaction$1 as GetTransaction, index$1_addressTransactions as addressTransactions, index$1_getTransaction as getTransaction };
1319
+ }
1320
+
1321
+ declare const accounts: {
1322
+ balances: typeof balances;
1323
+ };
1324
+
1325
+ declare const blocks: {
1326
+ getBlock: typeof getBlock;
1327
+ };
1328
+
1329
+ declare const info: {
1330
+ coreApi: typeof coreApi;
1331
+ poxDetails: typeof poxDetails;
1332
+ };
1333
+
1334
+ declare const proofOfTransfer: {
1335
+ cycle: typeof cycle;
1336
+ cycles: typeof cycles;
1337
+ signerInCycle: typeof signerInCycle;
1338
+ signersInCycle: typeof signersInCycle;
1339
+ stackersForSignerInCycle: typeof stackersForSignerInCycle;
1340
+ };
1341
+
1342
+ declare const smartContracts: {
1343
+ readOnly: typeof readOnly;
1344
+ };
1345
+
1346
+ declare const stackingPool: {
1347
+ members: typeof members;
1348
+ };
1349
+
1350
+ declare const transactions: {
1351
+ addressTransactions: typeof addressTransactions;
1352
+ getTransaction: typeof getTransaction;
1353
+ };
1354
+
1355
+ declare const index_accounts: typeof accounts;
1356
+ declare const index_blocks: typeof blocks;
1357
+ declare const index_info: typeof info;
1358
+ declare const index_proofOfTransfer: typeof proofOfTransfer;
1359
+ declare const index_smartContracts: typeof smartContracts;
1360
+ declare const index_stackingPool: typeof stackingPool;
1361
+ declare const index_transactions: typeof transactions;
1362
+ declare namespace index {
1363
+ export { index$7 as Accounts, index$6 as Blocks, index$5 as Info, index$4 as ProofOfTransfer, index$3 as SmartContracts, index$2 as StackingPool, index$1 as Transactions, index_accounts as accounts, index_blocks as blocks, index_info as info, index_proofOfTransfer as proofOfTransfer, index_smartContracts as smartContracts, index_stackingPool as stackingPool, index_transactions as transactions };
1364
+ }
1365
+
1366
+ type Options = {
1367
+ startingDelay?: number;
1368
+ numOfAttempts?: number;
1369
+ };
1370
+ declare function callRateLimitedApi<T>(fn: () => Promise<T>, options?: Options): Promise<T>;
1371
+ declare function safeCallRateLimitedApi<T>(fn: () => Promise<Result$1<T>>, options?: Options): Promise<Result$1<T, SafeError<"MaxRetriesExceeded" | string>>>;
609
1372
 
610
1373
  declare const stacksApi: {
611
1374
  accounts: {
@@ -637,25 +1400,4 @@ declare const stacksApi: {
637
1400
  };
638
1401
  };
639
1402
 
640
- type Identifier = {
641
- type: "address";
642
- signerAddress: string;
643
- } | {
644
- type: "publicKey";
645
- signerPublicKey: string;
646
- };
647
- type Args = {
648
- identifier: Identifier;
649
- } & {
650
- cycleNumber: number;
651
- } & ApiRequestOptions;
652
- /**
653
- * Return the total locked amount for a signer in a PoX cycle.
654
- */
655
- declare function getSignerStackedAmount(args: Args): Promise<Result<bigint, SafeError<"SignerNotFound" | string>>>;
656
-
657
- declare const queries: {
658
- getSignerStackedAmount: typeof getSignerStackedAmount;
659
- };
660
-
661
- export { queries, stacksApi };
1403
+ export { type Result$1 as Result, type SafeError, index as StacksApi, callRateLimitedApi, error, safeCall, safeCallRateLimitedApi, safePromise, stacksApi, success };