@secretkeylabs/stacks-tools 0.8.0-44889a2 → 0.8.0-caef9a1
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 +144 -108
- package/dist/index.d.cts +167 -93
- package/dist/index.d.ts +167 -93
- package/dist/index.js +144 -108
- package/package.json +1 -1
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?:
|
|
21
|
+
proof?: 0 | 1;
|
|
22
22
|
tip?: "latest" | string;
|
|
23
23
|
};
|
|
24
24
|
type ApiPaginationOptions = {
|
|
@@ -58,12 +58,12 @@ declare function safeExtractResponseBody(response: Response): Promise<unknown>;
|
|
|
58
58
|
type Args$n = {
|
|
59
59
|
transactionId: string;
|
|
60
60
|
} & ApiRequestOptions;
|
|
61
|
-
type Response$
|
|
62
|
-
declare function getRawTransaction(args: Args$n): Promise<Result$1<Response$
|
|
61
|
+
type Response$8 = OperationResponse["get_raw_transaction_by_id"];
|
|
62
|
+
declare function getRawTransaction(args: Args$n): Promise<Result$1<Response$8>>;
|
|
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$
|
|
66
|
+
export { type Args$n as Args, type Response$8 as Response, getRawTransaction$1_getRawTransaction as getRawTransaction };
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
type Args$m = {
|
|
@@ -102,8 +102,8 @@ declare namespace mempoolTransactions$1 {
|
|
|
102
102
|
type Args$l = {
|
|
103
103
|
transactionId: string;
|
|
104
104
|
} & ApiRequestOptions;
|
|
105
|
-
type Response$
|
|
106
|
-
declare function getTransaction(args: Args$l): Promise<Result$1<Response$
|
|
105
|
+
type Response$7 = OperationResponse["get_transaction_by_id"];
|
|
106
|
+
declare function getTransaction(args: Args$l): Promise<Result$1<Response$7>>;
|
|
107
107
|
|
|
108
108
|
declare const getTransaction$1_getTransaction: typeof getTransaction;
|
|
109
109
|
declare namespace getTransaction$1 {
|
|
@@ -114,8 +114,8 @@ type Args$k = {
|
|
|
114
114
|
address: string;
|
|
115
115
|
transactionId: string;
|
|
116
116
|
} & ApiRequestOptions & ApiPaginationOptions;
|
|
117
|
-
type Response$
|
|
118
|
-
declare function eventsForAnAddressTransaction(args: Args$k): Promise<Result$1<Response$
|
|
117
|
+
type Response$6 = OperationResponse["/extended/v2/addresses/{address}/transactions/{tx_id}/events"];
|
|
118
|
+
declare function eventsForAnAddressTransaction(args: Args$k): Promise<Result$1<Response$6>>;
|
|
119
119
|
|
|
120
120
|
declare const eventsForAnAddressTransaction$1_eventsForAnAddressTransaction: typeof eventsForAnAddressTransaction;
|
|
121
121
|
declare namespace eventsForAnAddressTransaction$1 {
|
|
@@ -141,24 +141,24 @@ type Args$i = {
|
|
|
141
141
|
limit?: number;
|
|
142
142
|
offset?: number;
|
|
143
143
|
} & ApiRequestOptions & ApiPaginationOptions;
|
|
144
|
-
type Response$
|
|
145
|
-
declare function members(args: Args$i): Promise<Result$1<Response$
|
|
144
|
+
type Response$5 = OperationResponse["get_pool_delegations"];
|
|
145
|
+
declare function members(args: Args$i): Promise<Result$1<Response$5>>;
|
|
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$
|
|
149
|
+
export { type Args$i as Args, type Response$5 as Response, members$1_members as members };
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
type Args$h = {
|
|
153
153
|
cycleNumber: string | number | bigint;
|
|
154
154
|
signerPublicKey: string;
|
|
155
155
|
} & ApiRequestOptions & ApiPaginationOptions;
|
|
156
|
-
type Response$
|
|
157
|
-
declare function stackersForSignerInCycle(opts: Args$h): Promise<Result$1<Response$
|
|
156
|
+
type Response$4 = OperationResponse["get_pox_cycle_signer_stackers"];
|
|
157
|
+
declare function stackersForSignerInCycle(opts: Args$h): Promise<Result$1<Response$4, 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$
|
|
161
|
+
export { type Args$h as Args, type Response$4 as Response, stackersForSignerInCycle$1_stackersForSignerInCycle as stackersForSignerInCycle };
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
type Args$g = {
|
|
@@ -289,7 +289,7 @@ declare namespace cycles$1 {
|
|
|
289
289
|
type Args$d = {
|
|
290
290
|
cycleNumber: number;
|
|
291
291
|
} & ApiRequestOptions;
|
|
292
|
-
declare const responseSchema$
|
|
292
|
+
declare const responseSchema$2: v.ObjectSchema<{
|
|
293
293
|
readonly block_height: v.NumberSchema<undefined>;
|
|
294
294
|
readonly index_block_hash: v.StringSchema<undefined>;
|
|
295
295
|
readonly cycle_number: v.NumberSchema<undefined>;
|
|
@@ -297,12 +297,12 @@ declare const responseSchema$1: v.ObjectSchema<{
|
|
|
297
297
|
readonly total_stacked_amount: v.StringSchema<undefined>;
|
|
298
298
|
readonly total_signers: v.NumberSchema<undefined>;
|
|
299
299
|
}, undefined>;
|
|
300
|
-
type Response$
|
|
301
|
-
declare function cycle(opts: Args$d): Promise<Result$1<Response$
|
|
300
|
+
type Response$3 = v.InferOutput<typeof responseSchema$2>;
|
|
301
|
+
declare function cycle(opts: Args$d): Promise<Result$1<Response$3, 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$
|
|
305
|
+
export { type Args$d as Args, type Response$3 as Response, cycle$1_cycle as cycle, responseSchema$2 as responseSchema };
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
type FeePrioritiesResponse = {
|
|
@@ -376,28 +376,38 @@ declare namespace stx$1 {
|
|
|
376
376
|
}
|
|
377
377
|
|
|
378
378
|
type Args$b = {
|
|
379
|
-
heightOrHash: string | number | bigint;
|
|
380
|
-
} & ApiRequestOptions;
|
|
381
|
-
type Response$3 = OperationResponse["get_burn_block"];
|
|
382
|
-
declare function getBurnBlock(args: Args$b): Promise<Result$1<Response$3>>;
|
|
383
|
-
|
|
384
|
-
declare const getBurnBlock$1_getBurnBlock: typeof getBurnBlock;
|
|
385
|
-
declare namespace getBurnBlock$1 {
|
|
386
|
-
export { type Args$b as Args, type Response$3 as Response, getBurnBlock$1_getBurnBlock as getBurnBlock };
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
type Args$a = {
|
|
390
379
|
heightOrHash: string | number;
|
|
391
380
|
} & ApiRequestOptions;
|
|
392
|
-
|
|
393
|
-
|
|
381
|
+
declare const responseSchema$1: v.ObjectSchema<{
|
|
382
|
+
readonly canonical: v.BooleanSchema<undefined>;
|
|
383
|
+
readonly height: v.NumberSchema<undefined>;
|
|
384
|
+
readonly hash: v.StringSchema<undefined>;
|
|
385
|
+
readonly block_time: v.NumberSchema<undefined>;
|
|
386
|
+
readonly block_time_iso: v.StringSchema<undefined>;
|
|
387
|
+
readonly index_block_hash: v.StringSchema<undefined>;
|
|
388
|
+
readonly parent_block_hash: v.StringSchema<undefined>;
|
|
389
|
+
readonly parent_index_block_hash: v.StringSchema<undefined>;
|
|
390
|
+
readonly burn_block_time: v.NumberSchema<undefined>;
|
|
391
|
+
readonly burn_block_time_iso: v.StringSchema<undefined>;
|
|
392
|
+
readonly burn_block_hash: v.StringSchema<undefined>;
|
|
393
|
+
readonly burn_block_height: v.NumberSchema<undefined>;
|
|
394
|
+
readonly miner_txid: v.StringSchema<undefined>;
|
|
395
|
+
readonly tx_count: v.NumberSchema<undefined>;
|
|
396
|
+
readonly execution_cost_read_count: v.NumberSchema<undefined>;
|
|
397
|
+
readonly execution_cost_read_length: v.NumberSchema<undefined>;
|
|
398
|
+
readonly execution_cost_runtime: v.NumberSchema<undefined>;
|
|
399
|
+
readonly execution_cost_write_count: v.NumberSchema<undefined>;
|
|
400
|
+
readonly execution_cost_write_length: v.NumberSchema<undefined>;
|
|
401
|
+
}, undefined>;
|
|
402
|
+
type Response$2 = v.InferOutput<typeof responseSchema$1>;
|
|
403
|
+
declare function getBlock(opts: Args$b): Promise<Result$1<Response$2, SafeError<"FetchBlockError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
394
404
|
|
|
395
405
|
declare const getBlock$1_getBlock: typeof getBlock;
|
|
396
406
|
declare namespace getBlock$1 {
|
|
397
|
-
export { type Args$
|
|
407
|
+
export { type Args$b as Args, type Response$2 as Response, getBlock$1_getBlock as getBlock, responseSchema$1 as responseSchema };
|
|
398
408
|
}
|
|
399
409
|
|
|
400
|
-
type Args$
|
|
410
|
+
type Args$a = {
|
|
401
411
|
principal: string;
|
|
402
412
|
} & ApiRequestOptions;
|
|
403
413
|
declare const responseSchema: v.ObjectSchema<{
|
|
@@ -408,34 +418,33 @@ declare const responseSchema: v.ObjectSchema<{
|
|
|
408
418
|
readonly detected_mempool_nonces: v.ArraySchema<v.NumberSchema<undefined>, undefined>;
|
|
409
419
|
}, undefined>;
|
|
410
420
|
type Response$1 = v.InferOutput<typeof responseSchema>;
|
|
411
|
-
declare function latestNonce(opts: Args$
|
|
421
|
+
declare function latestNonce(opts: Args$a): Promise<Result$1<Response$1, SafeError<"FetchLatestNonceError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
412
422
|
|
|
413
423
|
declare const latestNonce$1_latestNonce: typeof latestNonce;
|
|
414
424
|
declare const latestNonce$1_responseSchema: typeof responseSchema;
|
|
415
425
|
declare namespace latestNonce$1 {
|
|
416
|
-
export { type Args$
|
|
426
|
+
export { type Args$a as Args, type Response$1 as Response, latestNonce$1_latestNonce as latestNonce, latestNonce$1_responseSchema as responseSchema };
|
|
417
427
|
}
|
|
418
428
|
|
|
419
|
-
type Args$
|
|
429
|
+
type Args$9 = {
|
|
420
430
|
principal: string;
|
|
421
431
|
unanchored?: boolean;
|
|
422
432
|
untilBlock?: number;
|
|
423
433
|
} & ApiRequestOptions;
|
|
424
|
-
declare function balances(opts: Args$
|
|
434
|
+
declare function balances(opts: Args$9): Promise<Result$1<OperationResponse["get_account_balance"], SafeError<"FetchBalancesError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
425
435
|
|
|
426
436
|
declare const balances$1_balances: typeof balances;
|
|
427
437
|
declare namespace balances$1 {
|
|
428
|
-
export { type Args$
|
|
438
|
+
export { type Args$9 as Args, balances$1_balances as balances };
|
|
429
439
|
}
|
|
430
440
|
|
|
431
|
-
declare const accounts: {
|
|
441
|
+
declare const accounts$1: {
|
|
432
442
|
balances: typeof balances;
|
|
433
443
|
latestNonce: typeof latestNonce;
|
|
434
444
|
};
|
|
435
445
|
|
|
436
|
-
declare const index$f_accounts: typeof accounts;
|
|
437
446
|
declare namespace index$f {
|
|
438
|
-
export { balances$1 as Balances, latestNonce$1 as LatestNonce,
|
|
447
|
+
export { balances$1 as Balances, latestNonce$1 as LatestNonce, accounts$1 as accounts };
|
|
439
448
|
}
|
|
440
449
|
|
|
441
450
|
declare const blocks: {
|
|
@@ -447,31 +456,21 @@ declare namespace index$e {
|
|
|
447
456
|
export { getBlock$1 as GetBlock, index$e_blocks as blocks };
|
|
448
457
|
}
|
|
449
458
|
|
|
450
|
-
declare const burnBlocks: {
|
|
451
|
-
getBurnBlock: typeof getBurnBlock;
|
|
452
|
-
};
|
|
453
|
-
|
|
454
|
-
declare const index$d_burnBlocks: typeof burnBlocks;
|
|
455
|
-
declare namespace index$d {
|
|
456
|
-
export { getBurnBlock$1 as GetBurnBlock, index$d_burnBlocks as burnBlocks };
|
|
457
|
-
}
|
|
458
|
-
|
|
459
459
|
declare const faucets: {
|
|
460
460
|
stx: typeof stx;
|
|
461
461
|
};
|
|
462
462
|
|
|
463
|
-
declare const index$
|
|
464
|
-
declare namespace index$
|
|
465
|
-
export { stx$1 as Stx, index$
|
|
463
|
+
declare const index$d_faucets: typeof faucets;
|
|
464
|
+
declare namespace index$d {
|
|
465
|
+
export { stx$1 as Stx, index$d_faucets as faucets };
|
|
466
466
|
}
|
|
467
467
|
|
|
468
|
-
declare const info: {
|
|
468
|
+
declare const info$2: {
|
|
469
469
|
coreApi: typeof coreApi;
|
|
470
470
|
};
|
|
471
471
|
|
|
472
|
-
declare
|
|
473
|
-
|
|
474
|
-
export { coreApi$1 as CoreApi, index$b_info as info };
|
|
472
|
+
declare namespace index$c {
|
|
473
|
+
export { coreApi$1 as CoreApi, info$2 as info };
|
|
475
474
|
}
|
|
476
475
|
|
|
477
476
|
declare const proofOfTransfer: {
|
|
@@ -482,18 +481,18 @@ declare const proofOfTransfer: {
|
|
|
482
481
|
stackersForSignerInCycle: typeof stackersForSignerInCycle;
|
|
483
482
|
};
|
|
484
483
|
|
|
485
|
-
declare const index$
|
|
486
|
-
declare namespace index$
|
|
487
|
-
export { cycle$1 as Cycle, cycles$1 as Cycles, signerInCycle$1 as SignerInCycle, signersInCycle$1 as SignersInCycle, stackersForSignerInCycle$1 as StackersForSignerInCycle, index$
|
|
484
|
+
declare const index$b_proofOfTransfer: typeof proofOfTransfer;
|
|
485
|
+
declare namespace index$b {
|
|
486
|
+
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
487
|
}
|
|
489
488
|
|
|
490
489
|
declare const stackingPool: {
|
|
491
490
|
members: typeof members;
|
|
492
491
|
};
|
|
493
492
|
|
|
494
|
-
declare const index$
|
|
495
|
-
declare namespace index$
|
|
496
|
-
export { members$1 as Members, index$
|
|
493
|
+
declare const index$a_stackingPool: typeof stackingPool;
|
|
494
|
+
declare namespace index$a {
|
|
495
|
+
export { members$1 as Members, index$a_stackingPool as stackingPool };
|
|
497
496
|
}
|
|
498
497
|
|
|
499
498
|
declare const transactions: {
|
|
@@ -504,18 +503,18 @@ declare const transactions: {
|
|
|
504
503
|
getRawTransaction: typeof getRawTransaction;
|
|
505
504
|
};
|
|
506
505
|
|
|
507
|
-
declare const index$
|
|
508
|
-
declare namespace index$
|
|
509
|
-
export { addressTransactions$1 as AddressTransactions, eventsForAnAddressTransaction$1 as EventsForAnAddressTransaction, getRawTransaction$1 as GetRawTransaction, getTransaction$1 as GetTransaction, mempoolTransactions$1 as MempoolTransactions, index$
|
|
506
|
+
declare const index$9_transactions: typeof transactions;
|
|
507
|
+
declare namespace index$9 {
|
|
508
|
+
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
509
|
}
|
|
511
510
|
|
|
512
511
|
declare const mempool: {
|
|
513
512
|
transactionFeePriorities: typeof transactionFeePriorities;
|
|
514
513
|
};
|
|
515
514
|
|
|
516
|
-
declare const index$
|
|
517
|
-
declare namespace index$
|
|
518
|
-
export { transactionFeePriorities$1 as TransactionFeePriorities, index$
|
|
515
|
+
declare const index$8_mempool: typeof mempool;
|
|
516
|
+
declare namespace index$8 {
|
|
517
|
+
export { transactionFeePriorities$1 as TransactionFeePriorities, index$8_mempool as mempool };
|
|
519
518
|
}
|
|
520
519
|
|
|
521
520
|
declare const stacksApi: {
|
|
@@ -526,9 +525,6 @@ declare const stacksApi: {
|
|
|
526
525
|
blocks: {
|
|
527
526
|
getBlock: typeof getBlock;
|
|
528
527
|
};
|
|
529
|
-
burnBlocks: {
|
|
530
|
-
getBurnBlock: typeof getBurnBlock;
|
|
531
|
-
};
|
|
532
528
|
faucets: {
|
|
533
529
|
stx: typeof stx;
|
|
534
530
|
};
|
|
@@ -557,12 +553,12 @@ declare const stacksApi: {
|
|
|
557
553
|
};
|
|
558
554
|
};
|
|
559
555
|
|
|
560
|
-
declare const index$
|
|
561
|
-
declare namespace index$
|
|
562
|
-
export { index$f as Accounts, index$e as Blocks, index$d as
|
|
556
|
+
declare const index$7_stacksApi: typeof stacksApi;
|
|
557
|
+
declare namespace index$7 {
|
|
558
|
+
export { index$f as Accounts, index$e as Blocks, 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
559
|
}
|
|
564
560
|
|
|
565
|
-
type Args$
|
|
561
|
+
type Args$8 = {
|
|
566
562
|
sender: string;
|
|
567
563
|
arguments: string[];
|
|
568
564
|
contractAddress: string;
|
|
@@ -579,15 +575,15 @@ interface ReadOnlyContractCallFailResponse {
|
|
|
579
575
|
}
|
|
580
576
|
type ReadOnlyContractCallResponse = ReadOnlyContractCallSuccessResponse | ReadOnlyContractCallFailResponse;
|
|
581
577
|
type ReadOnlyResponse = ReadOnlyContractCallResponse;
|
|
582
|
-
declare function readOnly$1(args: Args$
|
|
578
|
+
declare function readOnly$1(args: Args$8): Promise<Result$1<ReadOnlyResponse>>;
|
|
583
579
|
|
|
584
580
|
type readOnly$2_ReadOnlyContractCallResponse = ReadOnlyContractCallResponse;
|
|
585
581
|
type readOnly$2_ReadOnlyResponse = ReadOnlyResponse;
|
|
586
582
|
declare namespace readOnly$2 {
|
|
587
|
-
export { type Args$
|
|
583
|
+
export { type Args$8 as Args, type readOnly$2_ReadOnlyContractCallResponse as ReadOnlyContractCallResponse, type readOnly$2_ReadOnlyResponse as ReadOnlyResponse, readOnly$1 as readOnly };
|
|
588
584
|
}
|
|
589
585
|
|
|
590
|
-
type Args$
|
|
586
|
+
type Args$7 = {
|
|
591
587
|
contractAddress: string;
|
|
592
588
|
contractName: string;
|
|
593
589
|
mapName: string;
|
|
@@ -607,28 +603,28 @@ declare const mapEntryResponseSchema: v.ObjectSchema<{
|
|
|
607
603
|
readonly proof: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
608
604
|
}, undefined>;
|
|
609
605
|
type MapEntryResponse = v.InferOutput<typeof mapEntryResponseSchema>;
|
|
610
|
-
declare function mapEntry(args: Args$
|
|
606
|
+
declare function mapEntry(args: Args$7): Promise<Result$1<MapEntryResponse>>;
|
|
611
607
|
|
|
612
608
|
type mapEntry$1_MapEntryResponse = MapEntryResponse;
|
|
613
609
|
declare const mapEntry$1_mapEntry: typeof mapEntry;
|
|
614
610
|
declare namespace mapEntry$1 {
|
|
615
|
-
export { type Args$
|
|
611
|
+
export { type Args$7 as Args, type mapEntry$1_MapEntryResponse as MapEntryResponse, mapEntry$1_mapEntry as mapEntry };
|
|
616
612
|
}
|
|
617
613
|
|
|
618
|
-
type Args$
|
|
614
|
+
type Args$6 = {
|
|
619
615
|
contractAddress: string;
|
|
620
616
|
contractName: string;
|
|
621
617
|
} & ApiRequestOptions & ProofAndTip;
|
|
622
618
|
type InterfaceResponse = ClarityAbi;
|
|
623
|
-
declare function contractInterface(args: Args$
|
|
619
|
+
declare function contractInterface(args: Args$6): Promise<Result$1<InterfaceResponse>>;
|
|
624
620
|
|
|
625
621
|
type _interface_InterfaceResponse = InterfaceResponse;
|
|
626
622
|
declare const _interface_contractInterface: typeof contractInterface;
|
|
627
623
|
declare namespace _interface {
|
|
628
|
-
export { type Args$
|
|
624
|
+
export { type Args$6 as Args, type _interface_InterfaceResponse as InterfaceResponse, _interface_contractInterface as contractInterface };
|
|
629
625
|
}
|
|
630
626
|
|
|
631
|
-
type Args$
|
|
627
|
+
type Args$5 = ApiRequestOptions;
|
|
632
628
|
/**
|
|
633
629
|
* Get Proof of Transfer (PoX) information
|
|
634
630
|
*/
|
|
@@ -773,7 +769,7 @@ interface CoreNodePoxResponse {
|
|
|
773
769
|
}[];
|
|
774
770
|
}
|
|
775
771
|
type PoxDetailsResponse = CoreNodePoxResponse;
|
|
776
|
-
declare function poxDetails(args: Args$
|
|
772
|
+
declare function poxDetails(args: Args$5): Promise<Result$1<PoxDetailsResponse>>;
|
|
777
773
|
|
|
778
774
|
type poxDetails$1_CoreNodePoxResponse = CoreNodePoxResponse;
|
|
779
775
|
type poxDetails$1_PoxDetailsResponse = PoxDetailsResponse;
|
|
@@ -782,27 +778,105 @@ declare namespace poxDetails$1 {
|
|
|
782
778
|
export { type poxDetails$1_CoreNodePoxResponse as CoreNodePoxResponse, type poxDetails$1_PoxDetailsResponse as PoxDetailsResponse, poxDetails$1_poxDetails as poxDetails };
|
|
783
779
|
}
|
|
784
780
|
|
|
781
|
+
type Args$4 = {
|
|
782
|
+
/** Stacks principal. */
|
|
783
|
+
principal: string;
|
|
784
|
+
} & ApiRequestOptions & ProofAndTip;
|
|
785
|
+
type InfoResponse = {
|
|
786
|
+
/** Micro-STX as a hex-encoded string. */
|
|
787
|
+
balance: string;
|
|
788
|
+
/** Micro-STX as a hex-encoded string. */
|
|
789
|
+
locked: string;
|
|
790
|
+
unlock_height: number;
|
|
791
|
+
nonce: number;
|
|
792
|
+
balance_proof: string;
|
|
793
|
+
nonce_proof: string;
|
|
794
|
+
};
|
|
795
|
+
type InfoReturn = Promise<InfoResponse>;
|
|
796
|
+
declare const info: (args: Args$4) => Promise<[null, unknown] | [{
|
|
797
|
+
readonly name: "InfoFetchError";
|
|
798
|
+
readonly message: "Failed to fetch info.";
|
|
799
|
+
readonly data: {
|
|
800
|
+
readonly init: RequestInit;
|
|
801
|
+
readonly status: number;
|
|
802
|
+
readonly statusText: string;
|
|
803
|
+
readonly endpoint: string;
|
|
804
|
+
readonly body: unknown;
|
|
805
|
+
};
|
|
806
|
+
}, null] | [{
|
|
807
|
+
readonly name: "ParseBodyError";
|
|
808
|
+
readonly message: "Failed to parse response body as JSON.";
|
|
809
|
+
readonly data: SafeError<"SafeError", unknown>;
|
|
810
|
+
}, null]>;
|
|
811
|
+
|
|
812
|
+
type info$1_InfoResponse = InfoResponse;
|
|
813
|
+
type info$1_InfoReturn = InfoReturn;
|
|
814
|
+
declare const info$1_info: typeof info;
|
|
815
|
+
declare namespace info$1 {
|
|
816
|
+
export { type Args$4 as Args, type info$1_InfoResponse as InfoResponse, type info$1_InfoReturn as InfoReturn, info$1_info as info };
|
|
817
|
+
}
|
|
818
|
+
|
|
785
819
|
declare const smartContracts: {
|
|
786
820
|
contractInterface: typeof contractInterface;
|
|
787
821
|
mapEntry: typeof mapEntry;
|
|
788
822
|
readOnly: typeof readOnly$1;
|
|
789
823
|
};
|
|
790
824
|
|
|
791
|
-
declare const index$
|
|
792
|
-
declare namespace index$
|
|
793
|
-
export { _interface as ContractInterface, mapEntry$1 as MapEntry, readOnly$2 as ReadOnly, index$
|
|
825
|
+
declare const index$6_smartContracts: typeof smartContracts;
|
|
826
|
+
declare namespace index$6 {
|
|
827
|
+
export { _interface as ContractInterface, mapEntry$1 as MapEntry, readOnly$2 as ReadOnly, index$6_smartContracts as smartContracts };
|
|
794
828
|
}
|
|
795
829
|
|
|
796
830
|
declare const pox: {
|
|
797
831
|
poxDetails: typeof poxDetails;
|
|
798
832
|
};
|
|
799
833
|
|
|
800
|
-
declare const index$
|
|
834
|
+
declare const index$5_pox: typeof pox;
|
|
835
|
+
declare namespace index$5 {
|
|
836
|
+
export { poxDetails$1 as PoxDetails, index$5_pox as pox };
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
declare const accounts: {
|
|
840
|
+
info: (args: Args$4) => Promise<[null, unknown] | [{
|
|
841
|
+
readonly name: "InfoFetchError";
|
|
842
|
+
readonly message: "Failed to fetch info.";
|
|
843
|
+
readonly data: {
|
|
844
|
+
readonly init: RequestInit;
|
|
845
|
+
readonly status: number;
|
|
846
|
+
readonly statusText: string;
|
|
847
|
+
readonly endpoint: string;
|
|
848
|
+
readonly body: unknown;
|
|
849
|
+
};
|
|
850
|
+
}, null] | [{
|
|
851
|
+
readonly name: "ParseBodyError";
|
|
852
|
+
readonly message: "Failed to parse response body as JSON.";
|
|
853
|
+
readonly data: SafeError<"SafeError", unknown>;
|
|
854
|
+
}, null]>;
|
|
855
|
+
};
|
|
856
|
+
|
|
857
|
+
declare const index$4_accounts: typeof accounts;
|
|
801
858
|
declare namespace index$4 {
|
|
802
|
-
export {
|
|
859
|
+
export { info$1 as Info, index$4_accounts as accounts };
|
|
803
860
|
}
|
|
804
861
|
|
|
805
862
|
declare const stacksRpcApi: {
|
|
863
|
+
accounts: {
|
|
864
|
+
info: (args: Args$4) => Promise<[null, unknown] | [{
|
|
865
|
+
readonly name: "InfoFetchError";
|
|
866
|
+
readonly message: "Failed to fetch info.";
|
|
867
|
+
readonly data: {
|
|
868
|
+
readonly init: RequestInit;
|
|
869
|
+
readonly status: number;
|
|
870
|
+
readonly statusText: string;
|
|
871
|
+
readonly endpoint: string;
|
|
872
|
+
readonly body: unknown;
|
|
873
|
+
};
|
|
874
|
+
}, null] | [{
|
|
875
|
+
readonly name: "ParseBodyError";
|
|
876
|
+
readonly message: "Failed to parse response body as JSON.";
|
|
877
|
+
readonly data: SafeError<"SafeError", unknown>;
|
|
878
|
+
}, null]>;
|
|
879
|
+
};
|
|
806
880
|
pox: {
|
|
807
881
|
poxDetails: typeof poxDetails;
|
|
808
882
|
};
|
|
@@ -815,7 +889,7 @@ declare const stacksRpcApi: {
|
|
|
815
889
|
|
|
816
890
|
declare const index$3_stacksRpcApi: typeof stacksRpcApi;
|
|
817
891
|
declare namespace index$3 {
|
|
818
|
-
export { index$4 as
|
|
892
|
+
export { index$4 as Accounts, index$5 as Pox, index$6 as SmartContracts, index$3_stacksRpcApi as stacksRpcApi };
|
|
819
893
|
}
|
|
820
894
|
|
|
821
895
|
type Identifier = {
|
|
@@ -954,4 +1028,4 @@ declare namespace index {
|
|
|
954
1028
|
export { index$2 as Maps, index$1 as ReadOnly, index_pox4Api as pox4Api };
|
|
955
1029
|
}
|
|
956
1030
|
|
|
957
|
-
export { index as Pox4Api, type Result$1 as Result, type SafeError, index$
|
|
1031
|
+
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 };
|