-
Notifications
You must be signed in to change notification settings - Fork 123
/
Copy pathgenerated.d.ts
3662 lines (3660 loc) · 107 KB
/
generated.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
This file is generated automatically. **DO NOT MODIFY THIS FILE DIRECTLY**
Updates are made by editing the JSON Schema files in the 'docs/' directory,
then running the 'npm build' script.
*/
export type SchemaMergeRootStub =
| AddressAssetsListResponse
| AddressBalanceResponse
| AddressNftListResponse
| AddressStxBalanceResponse
| AddressStxInboundListResponse
| AddressTransactionsWithTransfersListResponse
| AddressTransactionsListResponse
| BlockListResponse
| BurnBlockListResponse
| BnsError
| BnsFetchFileZoneResponse
| BnsGetAllNamesResponse
| BnsGetAllSubdomainsResponse
| BnsFetchHistoricalZoneFileResponse
| BnsGetNameInfoResponse
| BnsGetNamePriceResponse
| BnsNamesOwnByAddressResponse
| BnsGetSubdomainAtTx
| BnsGetAllNamespacesNamesResponse
| BnsGetAllNamespacesResponse
| BnsGetNamespacePriceResponse
| GetAllSubdomainsInName
| BurnchainRewardSlotHolderListResponse
| BurnchainRewardListResponse
| ReadOnlyFunctionSuccessResponse
| ContractListResponse
| AccountDataResponse
| MapEntryResponse
| ContractInterfaceResponse
| ContractSourceResponse
| CoreNodeFeeResponse
| CoreNodeInfoResponse
| CoreNodePoxResponse
| TransactionFeeEstimateResponse
| TransactionFeeEstimateRequest
| RunFaucetResponse
| FeeRateRequest
| FeeRate
| NetworkBlockTimeResponse
| NetworkBlockTimesResponse
| ServerStatusResponse
| GetStxCirculatingSupplyPlainResponse
| GetStxSupplyLegacyFormatResponse
| GetStxTotalSupplyPlainResponse
| GetStxSupplyResponse
| MicroblockListResponse
| UnanchoredTransactionListResponse
| RosettaAccountBalanceRequest
| RosettaAccountBalanceResponse
| RosettaBlockRequest
| RosettaBlockResponse
| RosettaBlockTransactionRequest
| RosettaBlockTransactionResponse
| RosettaConstructionCombineRequest
| RosettaConstructionCombineResponse
| RosettaConstructionDeriveRequest
| RosettaConstructionDeriveResponse
| RosettaConstructionHashRequest
| RosettaConstructionHashResponse
| RosettaConstructionMetadataRequest
| RosettaConstructionMetadataResponse
| RosettaConstructionParseRequest
| RosettaConstructionParseResponse
| RosettaConstructionPayloadsRequest
| RosettaConstructionPayloadResponse
| RosettaConstructionPreprocessRequest
| RosettaConstructionPreprocessResponse
| RosettaConstructionSubmitRequest
| RosettaConstructionSubmitResponse
| RosettaMempoolRequest
| RosettaMempoolResponse
| RosettaMempoolTransactionRequest
| RosettaMempoolTransactionResponse
| RosettaNetworkListRequest
| RosettaNetworkListResponse
| RosettaOptionsRequest
| RosettaNetworkOptionsResponse
| RosettaStatusRequest
| RosettaNetworkStatusResponse
| AddressSearchResult
| BlockSearchResult
| ContractSearchResult
| SearchErrorResult
| MempoolTxSearchResult
| SearchSuccessResult
| TxSearchResult
| SearchResult
| PoolDelegationsResponse
| {
[k: string]: unknown | undefined;
}
| FungibleTokensMetadataList
| NonFungibleTokenHistoryEventList
| NonFungibleTokenHoldingsList
| NonFungibleTokenMintList
| NonFungibleTokensMetadataList
| MempoolTransactionStatsResponse
| MempoolTransactionListResponse
| GetRawTransactionResult
| TransactionEventsResponse
| TransactionResults
| PostCoreNodeTransactionsError
| AddressNonces
| AddressTokenOfferingLocked
| AddressTransactionWithTransfers
| AddressUnlockSchedule
| FtBalance
| NftBalance
| StxBalance
| Block
| BurnBlock
| BurnchainRewardSlotHolder
| BurnchainReward
| BurnchainRewardsTotal
| ReadOnlyFunctionArgs
| SmartContract
| TargetBlockTime
| ChainTip
| AbstractMempoolTransaction
| MempoolTokenTransferTransaction
| MempoolSmartContractTransaction
| MempoolContractCallTransaction
| MempoolPoisonMicroblockTransaction
| MempoolCoinbaseTransaction
| MempoolTenureChangeTransaction
| MempoolTransactionStatus
| MempoolTransaction
| Microblock
| NftEvent
| PostConditionStx
| PostConditionFungible
| PostConditionNonFungible
| PostConditionFungibleConditionCode
| PostConditionMode
| PostConditionNonFungibleConditionCode
| PostConditionPrincipalType
| PostConditionPrincipal
| PostConditionType
| PostCondition
| RosettaAccountIdentifier
| RosettaAccount
| RosettaMaxFeeAmount
| RosettaAmount
| RosettaBlockIdentifierHash
| RosettaBlockIdentifierHeight
| RosettaBlockIdentifier
| RosettaBlock
| RosettaCoinChange
| RosettaCoin
| RosettaOptions
| RosettaCurrency
| RosettaErrorNoDetails
| RosettaError
| RosettaGenesisBlockIdentifier
| NetworkIdentifier
| RosettaPeers
| RosettaOldestBlockIdentifier
| RosettaOperationIdentifier
| RosettaOperationStatus
| RosettaOperation
| OtherTransactionIdentifier
| RosettaParentBlockIdentifier
| RosettaPartialBlockIdentifier
| RosettaPublicKey
| RosettaRelatedOperation
| SignatureType
| RosettaSignature
| SigningPayload
| RosettaSubAccount
| RosettaSyncStatus
| TransactionIdentifier
| RosettaTransaction
| PoolDelegation
| FungibleTokenMetadata
| NonFungibleTokenHistoryEventWithTxId
| NonFungibleTokenHistoryEventWithTxMetadata
| NonFungibleTokenHistoryEvent
| NonFungibleTokenHoldingWithTxId
| NonFungibleTokenHoldingWithTxMetadata
| NonFungibleTokenHolding
| NonFungibleTokenMintWithTxId
| NonFungibleTokenMintWithTxMetadata
| NonFungibleTokenMint
| NonFungibleTokenMetadata
| AbstractTransactionEvent
| TransactionEventAssetType
| TransactionEventAsset
| TransactionEventFungibleAsset
| TransactionEventNonFungibleAsset
| TransactionEventSmartContractLog
| TransactionEventStxAsset
| TransactionEventStxLock
| TransactionEventType
| TransactionEvent
| AbstractTransaction
| TransactionAnchorModeType
| BaseTransaction
| TokenTransferTransactionMetadata
| TokenTransferTransaction
| SmartContractTransactionMetadata
| SmartContractTransaction
| ContractCallTransactionMetadata
| ContractCallTransaction
| PoisonMicroblockTransactionMetadata
| PoisonMicroblockTransaction
| CoinbaseTransactionMetadata
| CoinbaseTransaction
| TenureChangeTransactionMetadata
| TenureChangeTransaction
| TransactionFound
| TransactionList
| TransactionMetadata
| TransactionNotFound
| TransactionStatus
| TransactionType
| Transaction
| InboundStxTransfer
| RpcAddressBalanceNotificationResponse
| RpcAddressBalanceSubscriptionParams
| RpcAddressBalanceSubscriptionRequest
| RpcAddressTxNotificationResponse
| RpcAddressTxSubscriptionParams
| RpcAddressTxSubscriptionRequest
| RpcBlockNotificationResponse
| RpcBlockSubscriptionParams
| RpcBlockSubscriptionRequest
| RpcMempoolNotificationResponse
| RpcMempoolSubscriptionParams
| RpcMempoolSubscriptionRequest
| RpcMicroblockNotificationResponse
| RpcMicroblockSubscriptionParams
| RpcMicroblockSubscriptionRequest
| RpcNftAssetEventSubscriptionParams
| RpcNftAssetEventSubscriptionRequest
| RpcNftCollectionEventSubscriptionParams
| RpcNftCollectionEventSubscriptionRequest
| RpcNftEventNotificationResponse
| RpcNftEventSubscriptionParams
| RpcNftEventSubscriptionRequest
| RpcSubscriptionType
| RpcTxUpdateNotificationResponse
| RpcTxUpdateSubscriptionParams
| RpcTxUpdateSubscriptionRequest;
export type TransactionEvent =
| TransactionEventSmartContractLog
| TransactionEventStxLock
| TransactionEventStxAsset
| TransactionEventFungibleAsset
| TransactionEventNonFungibleAsset;
/**
* Only present in `smart_contract` and `contract_call` tx types.
*/
export type TransactionEventSmartContractLog = AbstractTransactionEvent & {
event_type: "smart_contract_log";
tx_id: string;
contract_log: {
contract_id: string;
topic: string;
value: {
hex: string;
repr: string;
};
};
};
/**
* Only present in `smart_contract` and `contract_call` tx types.
*/
export type TransactionEventStxLock = AbstractTransactionEvent & {
event_type: "stx_lock";
tx_id: string;
stx_lock_event: {
locked_amount: string;
unlock_height: number;
locked_address: string;
};
};
/**
* Only present in `smart_contract` and `contract_call` tx types.
*/
export type TransactionEventStxAsset = AbstractTransactionEvent & {
event_type: "stx_asset";
tx_id: string;
asset: TransactionEventAsset;
};
export type TransactionEventAssetType = "transfer" | "mint" | "burn";
export type TransactionEventFungibleAsset = AbstractTransactionEvent & {
event_type: "fungible_token_asset";
tx_id: string;
asset: {
asset_event_type: string;
asset_id: string;
sender: string;
recipient: string;
amount: string;
};
};
export type TransactionEventNonFungibleAsset = AbstractTransactionEvent & {
event_type: "non_fungible_token_asset";
tx_id: string;
asset: {
asset_event_type: string;
asset_id: string;
sender: string;
recipient: string;
value: {
hex: string;
repr: string;
};
};
};
/**
* GET request that returns address balances
*/
export type AddressStxBalanceResponse = StxBalance & {
token_offering_locked?: AddressTokenOfferingLocked;
};
/**
* Describes all transaction types on Stacks 2.0 blockchain
*/
export type Transaction =
| TokenTransferTransaction
| SmartContractTransaction
| ContractCallTransaction
| PoisonMicroblockTransaction
| CoinbaseTransaction
| TenureChangeTransaction;
/**
* Describes representation of a Type-0 Stacks 2.0 transaction. https://github.com/blockstack/stacks-blockchain/blob/master/sip/sip-005-blocks-and-transactions.md#type-0-transferring-an-asset
*/
export type TokenTransferTransaction = AbstractTransaction & TokenTransferTransactionMetadata;
/**
* Anchored transaction metadata. All mined/anchored Stacks transactions have these properties.
*/
export type AbstractTransaction = BaseTransaction & {
/**
* Hash of the blocked this transactions was associated with
*/
block_hash: string;
/**
* Height of the block this transactions was associated with
*/
block_height: number;
/**
* Unix timestamp (in seconds) indicating when this block was mined
*/
burn_block_time: number;
/**
* An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when this block was mined.
*/
burn_block_time_iso: string;
/**
* Unix timestamp (in seconds) indicating when this parent block was mined
*/
parent_burn_block_time: number;
/**
* An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when this parent block was mined.
*/
parent_burn_block_time_iso: string;
/**
* Set to `true` if block corresponds to the canonical chain tip
*/
canonical: boolean;
/**
* Index of the transaction, indicating the order. Starts at `0` and increases with each transaction
*/
tx_index: number;
tx_status: TransactionStatus;
/**
* Result of the transaction. For contract calls, this will show the value returned by the call. For other transaction types, this will return a boolean indicating the success of the transaction.
*/
tx_result: {
/**
* Hex string representing the value fo the transaction result
*/
hex: string;
/**
* Readable string of the transaction result
*/
repr: string;
};
/**
* Number of transaction events
*/
event_count: number;
/**
* Hash of the previous block.
*/
parent_block_hash: string;
/**
* True if the transaction is included in a microblock that has not been confirmed by an anchor block.
*/
is_unanchored: boolean;
/**
* The microblock hash that this transaction was streamed in. If the transaction was batched in an anchor block (not included within a microblock) then this value will be an empty string.
*/
microblock_hash: string;
/**
* The microblock sequence number that this transaction was streamed in. If the transaction was batched in an anchor block (not included within a microblock) then this value will be 2147483647 (0x7fffffff, the max int32 value), this value preserves logical transaction ordering on (block_height, microblock_sequence, tx_index).
*/
microblock_sequence: number;
/**
* Set to `true` if microblock is anchored in the canonical chain tip, `false` if the transaction was orphaned in a micro-fork.
*/
microblock_canonical: boolean;
/**
* Execution cost read count.
*/
execution_cost_read_count: number;
/**
* Execution cost read length.
*/
execution_cost_read_length: number;
/**
* Execution cost runtime.
*/
execution_cost_runtime: number;
/**
* Execution cost write count.
*/
execution_cost_write_count: number;
/**
* Execution cost write length.
*/
execution_cost_write_length: number;
/**
* List of transaction events
*/
events: TransactionEvent[];
};
export type PostConditionMode = "allow" | "deny";
/**
* Post-conditionscan limit the damage done to a user's assets
*/
export type PostCondition = PostConditionStx | PostConditionFungible | PostConditionNonFungible;
export type PostConditionStx = {
principal: PostConditionPrincipal;
} & {
condition_code: PostConditionFungibleConditionCode;
amount: string;
type: "stx";
};
export type PostConditionPrincipal =
| {
/**
* String literal of type `PostConditionPrincipalType`
*/
type_id: "principal_origin";
}
| {
/**
* String literal of type `PostConditionPrincipalType`
*/
type_id: "principal_standard";
address: string;
}
| {
/**
* String literal of type `PostConditionPrincipalType`
*/
type_id: "principal_contract";
address: string;
contract_name: string;
};
/**
* A fungible condition code encodes a statement being made for either STX or a fungible token, with respect to the originating account.
*/
export type PostConditionFungibleConditionCode =
| "sent_equal_to"
| "sent_greater_than"
| "sent_greater_than_or_equal_to"
| "sent_less_than"
| "sent_less_than_or_equal_to";
export type PostConditionFungible = {
principal: PostConditionPrincipal;
} & {
condition_code: PostConditionFungibleConditionCode;
type: "fungible";
amount: string;
asset: {
asset_name: string;
contract_address: string;
contract_name: string;
};
};
export type PostConditionNonFungible = {
principal: PostConditionPrincipal;
} & {
condition_code: PostConditionNonFungibleConditionCode;
type: "non_fungible";
asset_value: {
hex: string;
repr: string;
};
asset: {
asset_name: string;
contract_address: string;
contract_name: string;
};
};
/**
* A non-fungible condition code encodes a statement being made about a non-fungible token, with respect to whether or not the particular non-fungible token is owned by the account.
*/
export type PostConditionNonFungibleConditionCode = "sent" | "not_sent";
/**
* `on_chain_only`: the transaction MUST be included in an anchored block, `off_chain_only`: the transaction MUST be included in a microblock, `any`: the leader can choose where to include the transaction.
*/
export type TransactionAnchorModeType = "on_chain_only" | "off_chain_only" | "any";
/**
* Status of the transaction
*/
export type TransactionStatus = "success" | "abort_by_response" | "abort_by_post_condition";
/**
* Describes representation of a Type-1 Stacks 2.0 transaction. https://github.com/blockstack/stacks-blockchain/blob/master/sip/sip-005-blocks-and-transactions.md#type-1-instantiating-a-smart-contract
*/
export type SmartContractTransaction = AbstractTransaction & SmartContractTransactionMetadata;
/**
* Describes representation of a Type 2 Stacks 2.0 transaction: Contract Call
*/
export type ContractCallTransaction = AbstractTransaction & ContractCallTransactionMetadata;
/**
* Describes representation of a Type 3 Stacks 2.0 transaction: Poison Microblock
*/
export type PoisonMicroblockTransaction = AbstractTransaction & PoisonMicroblockTransactionMetadata;
/**
* Describes representation of a Type 3 Stacks 2.0 transaction: Poison Microblock
*/
export type CoinbaseTransaction = AbstractTransaction & CoinbaseTransactionMetadata;
/**
* Describes representation of a Type 7 Stacks transaction: Tenure Change
*/
export type TenureChangeTransaction = AbstractTransaction & TenureChangeTransactionMetadata;
/**
* Describes all transaction types on Stacks 2.0 blockchain
*/
export type MempoolTransaction =
| MempoolTokenTransferTransaction
| MempoolSmartContractTransaction
| MempoolContractCallTransaction
| MempoolPoisonMicroblockTransaction
| MempoolCoinbaseTransaction
| MempoolTenureChangeTransaction;
/**
* Describes representation of a Type-0 Stacks 2.0 transaction. https://github.com/blockstack/stacks-blockchain/blob/master/sip/sip-005-blocks-and-transactions.md#type-0-transferring-an-asset
*/
export type MempoolTokenTransferTransaction = AbstractMempoolTransaction & TokenTransferTransactionMetadata;
/**
* Abstract transaction. This schema makes up all properties common between all Stacks 2.0 transaction types
*/
export type AbstractMempoolTransaction = BaseTransaction & {
tx_status: MempoolTransactionStatus;
/**
* A unix timestamp (in seconds) indicating when the transaction broadcast was received by the node.
*/
receipt_time: number;
/**
* An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when the transaction broadcast was received by the node.
*/
receipt_time_iso: string;
};
/**
* Status of the transaction
*/
export type MempoolTransactionStatus =
| "pending"
| "dropped_replace_by_fee"
| "dropped_replace_across_fork"
| "dropped_too_expensive"
| "dropped_stale_garbage_collect";
/**
* Describes representation of a Type-1 Stacks 2.0 transaction. https://github.com/blockstack/stacks-blockchain/blob/master/sip/sip-005-blocks-and-transactions.md#type-1-instantiating-a-smart-contract
*/
export type MempoolSmartContractTransaction = AbstractMempoolTransaction & SmartContractTransactionMetadata;
/**
* Describes representation of a Type 2 Stacks 2.0 transaction: Contract Call
*/
export type MempoolContractCallTransaction = AbstractMempoolTransaction & ContractCallTransactionMetadata;
/**
* Describes representation of a Type 3 Stacks 2.0 transaction: Poison Microblock
*/
export type MempoolPoisonMicroblockTransaction = AbstractMempoolTransaction & PoisonMicroblockTransactionMetadata;
/**
* Describes representation of a Type 3 Stacks 2.0 transaction: Poison Microblock
*/
export type MempoolCoinbaseTransaction = AbstractMempoolTransaction & CoinbaseTransactionMetadata;
/**
* Describes representation of a Type 7 Stacks transaction: Tenure Change
*/
export type MempoolTenureChangeTransaction = AbstractMempoolTransaction & TenureChangeTransactionMetadata;
/**
* Fetch a user's raw zone file. This only works for RFC-compliant zone files. This method returns an error for names that have non-standard zone files.
*/
export type BnsFetchFileZoneResponse =
| {
zonefile?: string;
}
| {
error?: string;
};
/**
* Fetch a list of all names known to the node.
*/
export type BnsGetAllNamesResponse = string[];
/**
* Fetch a list of all subdomains known to the node.
*/
export type BnsGetAllSubdomainsResponse = string[];
/**
* Fetches the historical zonefile specified by the username and zone hash.
*/
export type BnsFetchHistoricalZoneFileResponse =
| {
zonefile?: string;
}
| {
error?: string;
};
/**
* Fetches the list of subdomain operations processed by a given transaction. The returned array includes subdomain operations that have not yet been accepted as part of any subdomain’s history (checkable via the accepted field). If the given transaction ID does not correspond to a Stacks transaction that introduced new subdomain operations, and empty array will be returned.
*/
export type BnsGetSubdomainAtTx = {
accepted?: number;
block_height?: number;
domain?: string;
fully_qualified_subdomain?: string;
missing?: string;
owner?: string;
parent_zonefile_hash?: string;
parent_zonefile_index?: number;
resolver?: string;
sequence?: number;
signature?: string;
txid?: string;
zonefile_hash?: string;
zonefile_offset?: number;
}[];
/**
* Fetch a list of names from the namespace.
*/
export type BnsGetAllNamespacesNamesResponse = string[];
/**
* Fetch a list of subdomains in a name.
*/
export type GetAllSubdomainsInName = string[];
/**
* GET fee estimates
*/
export type CoreNodeFeeResponse = string;
/**
* GET request that returns network target block times
*/
export type GetStxCirculatingSupplyPlainResponse = string;
/**
* GET request that returns network target block times
*/
export type GetStxTotalSupplyPlainResponse = string;
/**
* When fetching data by BlockIdentifier, it may be possible to only specify the index or hash. If neither property is specified, it is assumed that the client is making a request at the current block.
*/
export type RosettaPartialBlockIdentifier =
| RosettaBlockIdentifierHash
| RosettaBlockIdentifierHeight
| {
[k: string]: unknown | undefined;
};
/**
* The block_identifier uniquely identifies a block in a particular network.
*/
export type RosettaBlockIdentifier = RosettaBlockIdentifierHash & RosettaBlockIdentifierHeight;
/**
* SignatureType is the type of a cryptographic signature.
*/
export type SignatureType = "ecdsa" | "ecdsa_recovery" | "ed25519" | "schnorr_1" | "schnorr_poseidon";
/**
* Search success result
*/
export type SearchSuccessResult =
| AddressSearchResult
| BlockSearchResult
| ContractSearchResult
| MempoolTxSearchResult
| TxSearchResult;
/**
* complete search result for terms
*/
export type SearchResult = SearchErrorResult | SearchSuccessResult;
/**
* Describes an event from the history of a Non-Fungible Token
*/
export type NonFungibleTokenHistoryEvent =
| NonFungibleTokenHistoryEventWithTxId
| NonFungibleTokenHistoryEventWithTxMetadata;
/**
* Describes the ownership of a Non-Fungible Token
*/
export type NonFungibleTokenHolding = NonFungibleTokenHoldingWithTxId | NonFungibleTokenHoldingWithTxMetadata;
/**
* Describes the minting of a Non-Fungible Token
*/
export type NonFungibleTokenMint = NonFungibleTokenMintWithTxId | NonFungibleTokenMintWithTxMetadata;
export type PostConditionPrincipalType = "principal_origin" | "principal_standard" | "principal_contract";
export type PostConditionType = "stx" | "non_fungible" | "fungible";
/**
* Events types
*/
export type TransactionEventType =
| "smart_contract_log"
| "stx_lock"
| "stx_asset"
| "fungible_token_asset"
| "non_fungible_token_asset";
export type TransactionMetadata =
| TokenTransferTransactionMetadata
| SmartContractTransactionMetadata
| ContractCallTransactionMetadata
| PoisonMicroblockTransactionMetadata
| CoinbaseTransactionMetadata
| TenureChangeTransactionMetadata;
/**
* String literal of all Stacks 2.0 transaction types
*/
export type TransactionType =
| "token_transfer"
| "smart_contract"
| "contract_call"
| "poison_microblock"
| "coinbase"
| "tenure_change";
export type RpcAddressBalanceNotificationParams = {
address: string;
} & AddressStxBalanceResponse;
export type RpcAddressTxNotificationParams = {
address: string;
tx_id: string;
tx_type: TransactionType;
tx_status: TransactionStatus;
} & AddressTransactionWithTransfers;
export type RpcSubscriptionType =
| "tx_update"
| "address_tx_update"
| "address_balance_update"
| "block"
| "microblock"
| "mempool"
| "nft_event"
| "nft_asset_event"
| "nft_collection_event";
/**
* GET request that returns address assets
*/
export interface AddressAssetsListResponse {
limit: number;
offset: number;
total: number;
results: TransactionEvent[];
}
export interface AbstractTransactionEvent {
event_index: number;
}
export interface TransactionEventAsset {
asset_event_type?: TransactionEventAssetType;
asset_id?: string;
sender?: string;
recipient?: string;
amount?: string;
value?: string;
memo?: string;
}
/**
* GET request that returns address balances
*/
export interface AddressBalanceResponse {
stx: StxBalance;
fungible_tokens: {
[k: string]: FtBalance | undefined;
};
non_fungible_tokens: {
[k: string]: NftBalance | undefined;
};
token_offering_locked?: AddressTokenOfferingLocked;
}
export interface StxBalance {
balance: string;
total_sent: string;
total_received: string;
total_fees_sent: string;
total_miner_rewards_received: string;
/**
* The transaction where the lock event occurred. Empty if no tokens are locked.
*/
lock_tx_id: string;
/**
* The amount of locked STX, as string quoted micro-STX. Zero if no tokens are locked.
*/
locked: string;
/**
* The STX chain block height of when the lock event occurred. Zero if no tokens are locked.
*/
lock_height: number;
/**
* The burnchain block height of when the lock event occurred. Zero if no tokens are locked.
*/
burnchain_lock_height: number;
/**
* The burnchain block height of when the tokens unlock. Zero if no tokens are locked.
*/
burnchain_unlock_height: number;
}
export interface FtBalance {
balance: string;
total_sent: string;
total_received: string;
}
export interface NftBalance {
count: string;
total_sent: string;
total_received: string;
}
/**
* Token Offering Locked
*/
export interface AddressTokenOfferingLocked {
/**
* Micro-STX amount still locked at current block height.
*/
total_locked: string;
/**
* Micro-STX amount unlocked at current block height.
*/
total_unlocked: string;
unlock_schedule: AddressUnlockSchedule[];
}
/**
* Unlock schedule amount and block height
*/
export interface AddressUnlockSchedule {
/**
* Micro-STX amount locked at this block height.
*/
amount: string;
block_height: number;
}
export interface AddressNftListResponse {
limit: number;
offset: number;
total: number;
nft_events: NftEvent[];
}
export interface NftEvent {
sender?: string;
recipient?: string;
asset_identifier: string;
asset_event_type: string;
/**
* Identifier of the NFT
*/
value: {
/**
* Hex string representing the identifier of the NFT
*/
hex: string;
/**
* Readable string of the NFT identifier
*/
repr: string;
};
tx_id: string;
tx_index: number;
block_height: number;
event_index: number;
}
/**
* GET request that returns a list of inbound STX transfers with a memo
*/
export interface AddressStxInboundListResponse {
limit: number;
offset: number;
total: number;
results: InboundStxTransfer[];
}
/**
* A inbound STX transfer with a memo
*/
export interface InboundStxTransfer {
/**
* Principal that sent this transfer
*/
sender: string;
/**
* Transfer amount in micro-STX as integer string
*/
amount: string;
/**
* Hex encoded memo bytes associated with the transfer
*/
memo: string;
/**
* Block height at which this transfer occurred
*/
block_height: number;
/**
* The transaction ID in which this transfer occurred
*/
tx_id: string;
/**
* Indicates if the transfer is from a stx-transfer transaction or a contract-call transaction
*/
transfer_type: "bulk-send" | "stx-transfer" | "stx-transfer-memo";
/**
* Index of the transaction within a block
*/
tx_index: number;
}
/**
* GET request that returns account transactions
*/
export interface AddressTransactionsWithTransfersListResponse {
limit: number;
offset: number;
total: number;
results: AddressTransactionWithTransfers[];
}
/**
* Transaction with STX transfers for a given address
*/
export interface AddressTransactionWithTransfers {
tx: Transaction;
/**
* Total sent from the given address, including the tx fee, in micro-STX as an integer string.
*/
stx_sent: string;
/**
* Total received by the given address in micro-STX as an integer string.
*/
stx_received: string;
stx_transfers: {
/**
* Amount transferred in micro-STX as an integer string.
*/
amount: string;
/**
* Principal that sent STX. This is unspecified if the STX were minted.
*/
sender?: string;
/**
* Principal that received STX. This is unspecified if the STX were burned.
*/
recipient?: string;
}[];
ft_transfers?: {
/**
* Fungible Token asset identifier.
*/
asset_identifier: string;
/**
* Amount transferred as an integer string. This balance does not factor in possible SIP-010 decimals.
*/
amount: string;
/**
* Principal that sent the asset.
*/
sender?: string;
/**
* Principal that received the asset.
*/
recipient?: string;
}[];
nft_transfers?: {
/**
* Non Fungible Token asset identifier.
*/
asset_identifier: string;
/**
* Non Fungible Token asset value.
*/
value: {
hex: string;
repr: string;
};
/**
* Principal that sent the asset.
*/
sender?: string;
/**
* Principal that received the asset.
*/
recipient?: string;
}[];
}
/**
* Transaction properties that are available from a raw serialized transactions. These are available for transactions in the mempool as well as mined transactions.
*/
export interface BaseTransaction {