-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathkaspa_rpc.pyi
More file actions
964 lines (693 loc) · 24.3 KB
/
kaspa_rpc.pyi
File metadata and controls
964 lines (693 loc) · 24.3 KB
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
"""
TypedDict definitions for Kaspa RPC request/response messages & contained types.
This file is maunally maintained and appended to kaspa.pyi file via stub gen process.
Long term, attempts should be made to auto generate.
"""
from enum import Enum
from typing import TypedDict
# =============================================================================
# Shared / Nested Types
# =============================================================================
class RpcOutpoint(TypedDict):
"""A transaction outpoint (reference to a specific output)."""
transactionId: str
index: int
class RpcScriptPublicKey(TypedDict):
"""A script public key."""
version: int
script: str
class RpcUtxoEntry(TypedDict):
"""A UTXO entry."""
amount: int
scriptPublicKey: RpcScriptPublicKey
blockDaaScore: int
isCoinbase: bool
class RpcUtxosByAddressesEntry(TypedDict):
"""A UTXO entry associated with an address."""
address: str
outpoint: RpcOutpoint
utxoEntry: RpcUtxoEntry
class RpcBalancesByAddressesEntry(TypedDict):
"""Balance information for a specific address."""
address: str
balance: int
class RpcFeeRateBucket(TypedDict):
"""A fee rate bucket for fee estimation."""
feerate: float
estimatedSeconds: float
class RpcFeeEstimate(TypedDict):
"""Fee estimation with priority, normal, and low buckets."""
priorityBucket: RpcFeeRateBucket
normalBuckets: list[RpcFeeRateBucket]
lowBuckets: list[RpcFeeRateBucket]
class RpcVerboseData(TypedDict):
"""Represent Kaspa transaction input verbose data"""
...
class RpcTransactionInput(TypedDict):
"""A transaction input."""
previousOutpoint: RpcOutpoint
signatureScript: str
sequence: int
sigOpCount: int
verboseData: RpcVerboseData | None
class RpcTransactionOutputVerboseData(TypedDict):
"""Verbose data for a transaction output."""
scriptPublicKeyType: str
scriptPublicKeyAddress: str
class RpcTransactionOutput(TypedDict):
"""A transaction output."""
value: int
scriptPublicKey: str
verboseData: RpcTransactionOutputVerboseData | None
class RpcTransaction(TypedDict):
"""A transaction."""
version: int
inputs: list[RpcTransactionInput]
outputs: list[RpcTransactionOutput]
lockTime: int
subnetworkId: str
gas: int
payload: str
mass: int
verboseData: RpcTransactionVerboseData | None
class RpcTransactionVerboseData(TypedDict, total=False):
"""Verbose transaction data."""
transactionId: str
hash: str
computeMass: int
blockHash: str
blockTime: int
class RpcBlockHeader(TypedDict):
"""A block header."""
hash: str
version: int
parentsByLevel: list[list[str]]
hashMerkleRoot: str
acceptedIdMerkleRoot: str
utxoCommitment: str
timestamp: int
bits: int
nonce: int
daaScore: int
blueWork: str
blueScore: int
pruningPoint: str
class RpcBlockVerboseData(TypedDict, total=False):
"""Verbose block data."""
hash: str
difficulty: float
selectedParentHash: str
transactionIds: list[str]
isHeaderOnly: bool
blueScore: int
childrenHashes: list[str]
mergeSetBluesHashes: list[str]
mergeSetRedsHashes: list[str]
isChainBlock: bool
class RpcBlock(TypedDict):
"""A block."""
header: RpcBlockHeader
transactions: list[RpcTransaction]
verboseData: RpcBlockVerboseData | None
class RpcRawHeader(TypedDict):
"""A raw block header without a cached hash."""
version: int
parentsByLevel: list[list[str]]
hashMerkleRoot: str
acceptedIdMerkleRoot: str
utxoCommitment: str
timestamp: int
bits: int
nonce: int
daaScore: int
blueWork: str
blueScore: int
pruningPoint: str
class RpcRawBlock(TypedDict):
"""
Raw Rpc block type - without a cached header hash and without verbose data.
Used for mining APIs (get_block_template & submit_block)
"""
header: RpcRawHeader
transactions: list[RpcTransaction]
class RpcMempoolEntry(TypedDict):
"""A mempool entry."""
fee: int
transaction: RpcTransaction
is_orphan: bool
class RpcMempoolEntryByAddress(TypedDict):
"""Mempool entries for a specific address."""
address: str
sending: list[RpcMempoolEntry]
receiving: list[RpcMempoolEntry]
class RpcAcceptedTransactionIds(TypedDict):
"""Accepted transaction IDs for a block."""
acceptingBlockHash: str
acceptedTransactionIds: list[str]
class ProcessMetrics(TypedDict):
"""Process metrics.
Category: RPC/Types
"""
residentSetSize: int
virtualMemorySize: int
coreNum: int
cpuUsage: float
fdNum: int
diskIoReadBytes: int
diskIoWriteBytes: int
diskIoReadPerSec: float
diskIoWritePerSec: float
class RpcStorageMetrics(TypedDict):
"""Storage metrics."""
storageSizeBytes: int
class ConsensusMetrics(TypedDict):
"""Consensus metrics.
Category: RPC/Types
"""
nodeBlocksSubmittedCount: int
nodeHeadersProcessedCount: int
nodeDependenciesProcessedCount: int
nodeBodiesProcessedCount: int
nodeTransactionsProcessedCount: int
nodeChainBlocksProcessedCount: int
nodeMassProcessedCount: int
nodeDatabaseBlocksCount: int
nodeDatabaseHeadersCount: int
networkMempoolSize: int
networkTipHashesCount: int
networkDifficulty: float
networkPastMedianTime: int
networkVirtualParentHashesCount: int
networkVirtualDaaScore: int
class ConnectionMetrics(TypedDict):
"""Connection metrics.
Category: RPC/Types
"""
borshLiveConnections: int
borshConnectionAttempts: int
borshHandshakeFailures: int
jsonLiveConnections: int
jsonConnectionAttempts: int
jsonHandshakeFailures: int
activePeers: int
class RpcPeerInfo(TypedDict):
"""Peer information."""
id: str
address: RpcPeerAddress
last_ping_duration: int
is_outbound: bool
time_offset: int
user_agent: str
advertised_protocol_version: int
time_connected: int
is_ibd_peer: bool
class BandwidthMetrics(TypedDict):
"""Bandwidth metrics for various protocols.
Category: RPC/Types
"""
borshBytesTx: int
borshBytesRx: int
jsonBytesTx: int
jsonBytesRx: int
p2pBytesTx: int
p2pBytesRx: int
grpcBytesTx: int
grpcBytesRx: int
class RpcPeerAddress(TypedDict):
"""A peer address."""
ip: str
port: int
class RpcDataVerbosityLevel(Enum):
"""Verbosity level for GetVirtualChainFromBlockV2Request"""
_None = 0,
Low = 1,
High = 2,
Full = 3,
class RpcOptionalHeader(TypedDict):
"""Represents a block header with optional fields populated based on verbosity level.
Fields are included based on the RpcDataVerbosityLevel specified in the request.
Each attribute is only populated when the verbosity level meets or exceeds
the required level for that field.
Attributes:
hash: The block hash. Level: None (always included).
version: Block version number. Level: Low.
parentsByLevel: Compressed parent block hashes by level. Level: High.
hashMerkleRoot: Merkle root of block hashes. Level: High.
acceptedIdMerkleRoot: Merkle root of accepted transaction IDs. Level: High.
utxoCommitment: UTXO commitment hash. Level: Full.
timestamp: Block timestamp in milliseconds. Level: Low.
bits: Difficulty target bits. Level: Low.
nonce: Block nonce. Level: Low.
daaScore: Difficulty adjustment algorithm score. Level: Low.
blueWork: Cumulative blue work. Level: Low.
blueScore: Blue score of the block. Level: Low.
pruningPoint: Pruning point block hash. Level: Full.
"""
hash: str | None
version: int | None
parentsByLevel: list[tuple[int, list[str]]] | None
hashMerkleRoot: str | None
acceptedIdMerkleRoot: str | None
utxoCommitment: str | None
timestamp: int | None
bits: int | None
nonce: int | None
daaScore: int | None
blueWork: str | None
blueScore: int | None
pruningPoint: str | None
class RpcOptionalTransactionOutpoint(TypedDict):
"""Represents a Kaspa transaction outpoint"""
transactionId: str | None
index: int | None
class RpcOptionalUtxoEntryVerboseData(TypedDict):
"""Represents verbose data for a UTXO entry with optional fields based on verbosity level.
Attributes:
scriptPublicKeyType: The type/class of the script public key. Level: Low.
scriptPublicKeyAddress: The address derived from the script public key. Level: Low.
"""
scriptPublicKeyType: str | None
scriptPublicKeyAddress: str | None
class RpcOptionalUtxoEntry(TypedDict):
"""Represents a UTXO entry with optional fields based on verbosity level.
Attributes:
amount: The amount in sompi. Level: High.
scriptPublicKey: The script public key. Level: High.
blockDaaScore: The DAA score of the block containing this UTXO. Level: Full.
isCoinbase: Whether this UTXO is from a coinbase transaction. Level: High.
verboseData: Additional verbose data for this UTXO entry.
"""
amount: int | None
scriptPublicKey: str | None
blockDaaScore: int | None
isCoinbase: bool | None
verboseData: RpcOptionalUtxoEntryVerboseData | None
class RpcOptionalTransactionInputVerboseData(TypedDict):
"""Represent Kaspa transaction input verbose data"""
utxoEntry: RpcOptionalUtxoEntry | None
class RpcOptionalTransactionOutputVerboseData(TypedDict):
"""Represents verbose data for a transaction output with optional fields based on verbosity level.
Attributes:
scriptPublicKeyType: The type/class of the script public key. Level: Low.
scriptPublicKeyAddress: The address derived from the script public key. Level: Low.
"""
scriptPublicKeyType: str | None
scriptPublicKeyAddress: str | None
class RpcOptionalTransactionOutput(TypedDict):
"""Represents a transaction output with optional fields based on verbosity level.
Attributes:
value: The output value in sompi. Level: Low.
scriptPublicKey: The script public key for this output. Level: Low.
verboseData: Additional verbose data for this output.
"""
value: int | None
scriptPublicKey: str | None
verboseData: RpcOptionalTransactionOutputVerboseData | None
class RpcOptionalTransactionInput(TypedDict):
"""Represents a transaction input with optional fields based on verbosity level.
Attributes:
previousOutpoint: The outpoint being spent. Level: High.
signatureScript: The signature script (hex encoded). Level: Low.
sequence: The sequence number. Level: High.
sigOpCount: The signature operation count. Level: High.
verboseData: Additional verbose data for this input.
"""
previousOutpoint: RpcOptionalTransactionOutpoint | None # TODO
signatureScript: str | None
sequence: int | None
sigOpCount: int | None
verboseData: RpcOptionalTransactionInputVerboseData | None # TODO
class RpcOptionalTransactionVerboseData(TypedDict):
"""Represents verbose data for a transaction with optional fields based on verbosity level.
Attributes:
transactionId: The transaction ID. Level: Low.
hash: The transaction hash. Level: Low.
computeMass: The computed mass of the transaction. Level: High.
blockHash: The hash of the block containing this transaction. Level: Low.
blockTime: The timestamp of the block containing this transaction. Level: Low.
"""
transactionId: str | None
hash: str | None
computeMass: int | None
blockHash: str | None
blockTime: int | None
class RpcOptionalTransaction(TypedDict):
"""Represents a transaction with optional fields based on verbosity level.
Attributes:
version: The transaction version. Level: Full.
inputs: List of transaction inputs.
outputs: List of transaction outputs.
lockTime: The lock time of the transaction. Level: Full.
subnetworkId: The subnetwork ID. Level: Full.
gas: The gas limit. Level: Full.
payload: The transaction payload (hex encoded). Level: High.
mass: The transaction mass. Level: High.
verboseData: Additional verbose data for this transaction.
"""
version: int | None
inputs: list[RpcOptionalTransactionInput] | None
outputs: list[RpcOptionalTransactionOutput] | None
lockTime: int | None
subnetworkId: str | None
gas: int | None
payload: list[int] | None
mass: int | None
verboseData: RpcOptionalTransactionVerboseData | None
class RpcChainBlockAcceptedTransactions(TypedDict):
"""Transaction acceptance data returned by GetVirtualChainFromBlockV2"""
chainBlockHeader: RpcOptionalHeader
acceptedTransactions: list[RpcOptionalTransaction]
# =============================================================================
# Request Types
# =============================================================================
class GetBlockCountRequest(TypedDict, total=False):
"""Request for get_block_count."""
pass
class GetBlockDagInfoRequest(TypedDict, total=False):
"""Request for get_block_dag_info."""
pass
class GetCoinSupplyRequest(TypedDict, total=False):
"""Request for get_coin_supply."""
pass
class GetConnectedPeerInfoRequest(TypedDict, total=False):
"""Request for get_connected_peer_info."""
pass
class GetInfoRequest(TypedDict, total=False):
"""Request for get_info."""
pass
class GetPeerAddressesRequest(TypedDict, total=False):
"""Request for get_peer_addresses."""
pass
class GetMetricsRequest(TypedDict, total=False):
"""Request for get_metrics."""
processMetrics: bool
connectionMetrics: bool
bandwidthMetrics: bool
consensusMetrics: bool
storageMetrics: bool
customMetrics: bool
class GetConnectionsRequest(TypedDict, total=False):
"""Request for get_connections."""
includeProfileData: bool
class GetSinkRequest(TypedDict, total=False):
"""Request for get_sink."""
pass
class GetSinkBlueScoreRequest(TypedDict, total=False):
"""Request for get_sink_blue_score."""
pass
class PingRequest(TypedDict, total=False):
"""Request for ping."""
pass
class ShutdownRequest(TypedDict, total=False):
"""Request for shutdown."""
pass
class GetServerInfoRequest(TypedDict, total=False):
"""Request for get_server_info."""
pass
class GetSyncStatusRequest(TypedDict, total=False):
"""Request for get_sync_status."""
pass
class GetFeeEstimateRequest(TypedDict, total=False):
"""Request for get_fee_estimate."""
pass
class GetCurrentNetworkRequest(TypedDict, total=False):
"""Request for get_current_network."""
pass
class GetSystemInfoRequest(TypedDict, total=False):
"""Request for get_system_info."""
pass
class AddPeerRequest(TypedDict):
"""Request for add_peer."""
peerAddress: str
isPermanent: bool
class BanRequest(TypedDict):
"""Request for ban."""
ip: str
class UnbanRequest(TypedDict):
"""Request for unban."""
ip: str
class EstimateNetworkHashesPerSecondRequest(TypedDict):
"""Request for estimate_network_hashes_per_second."""
windowSize: int
startHash: str | None
class GetBalanceByAddressRequest(TypedDict):
"""Request for get_balance_by_address."""
address: str
class GetBalancesByAddressesRequest(TypedDict):
"""Request for get_balances_by_addresses."""
addresses: list[str]
class GetBlockRequest(TypedDict):
"""Request for get_block."""
hash: str
includeTransactions: bool
class GetBlocksRequest(TypedDict):
"""Request for get_blocks."""
lowHash: str | None
includeBlocks: bool
includeTransactions: bool
class GetBlockTemplateRequest(TypedDict):
"""Request for get_block_template."""
payAddress: str
extraData: str
class GetCurrentBlockColorRequest(TypedDict):
"""Request for get_current_block_color."""
hash: str
class GetDaaScoreTimestampEstimateRequest(TypedDict):
"""Request for get_daa_score_timestamp_estimate."""
daaScores: list[int]
class GetFeeEstimateExperimentalRequest(TypedDict, total=False):
"""Request for get_fee_estimate_experimental."""
verbose: bool
class GetHeadersRequest(TypedDict):
"""Request for get_headers."""
startHash: str
limit: int
isAscending: bool
class GetMempoolEntriesRequest(TypedDict):
"""Request for get_mempool_entries."""
includeOrphanPool: bool
filterTransactionPool: bool
class GetMempoolEntriesByAddressesRequest(TypedDict):
"""Request for get_mempool_entries_by_addresses."""
addresses: list[str]
includeOrphanPool: bool
filterTransactionPool: bool
class GetMempoolEntryRequest(TypedDict):
"""Request for get_mempool_entry."""
transactionId: str
includeOrphanPool: bool
filterTransactionPool: bool
class GetSubnetworkRequest(TypedDict):
"""Request for get_subnetwork."""
subnetworkId: str
class GetUtxosByAddressesRequest(TypedDict):
"""Request for get_utxos_by_addresses."""
addresses: list[str]
class GetUtxoReturnAddressRequest(TypedDict):
"""Request for get_utxo_return_address."""
transactionId: str
class GetVirtualChainFromBlockRequest(TypedDict):
"""Request for get_virtual_chain_from_block."""
startHash: str
includeAcceptedTransactionIds: bool
minConfirmationCount: int | None
class GetVirtualChainFromBlockV2Request(TypedDict):
"""Request for get_virtual_chain_from_block_v2."""
startHash: str
dataVerbosityLevel: RpcDataVerbosityLevel | None
minConfirmationCount: int | None
class ResolveFinalityConflictRequest(TypedDict):
"""Request for resolve_finality_conflict."""
finalityBlockHash: str
class SubmitBlockRequest(TypedDict):
"""Request for submit_block."""
block: RpcBlock
allowNonDaaBlocks: bool
class SubmitTransactionRequest(TypedDict):
"""Request for submit_transaction."""
transaction: RpcTransaction
allowOrphan: bool
class SubmitTransactionReplacementRequest(TypedDict):
"""Request for submit_transaction_replacement."""
transaction: RpcTransaction
# =============================================================================
# Response Types (returned from RPC methods)
# =============================================================================
class GetBlockCountResponse(TypedDict):
"""Response from get_block_count."""
blockCount: int
headerCount: int
class GetBlockDagInfoResponse(TypedDict):
"""Response from get_block_dag_info."""
network: str
blockCount: int
headerCount: int
tipHashes: list[str]
difficulty: float
pastMedianTime: int
virtualParentHashes: list[str]
pruningPointHash: str
virtualDaaScore: int
sink: str
class GetCoinSupplyResponse(TypedDict):
"""Response from get_coin_supply."""
maxSompi: int
circulatingSompi: int
class GetConnectedPeerInfoResponse(TypedDict):
"""Response from get_connected_peer_info."""
peerInfo: list[RpcPeerInfo]
class GetInfoResponse(TypedDict):
"""Response from get_info."""
p2pId: str
mempoolSize: int
serverVersion: str
isUtxoIndexed: bool
isSynced: bool
hasNotifyCommand: bool
hasMessageId: bool
class GetPeerAddressesResponse(TypedDict):
"""Response from get_peer_addresses."""
knownAddresses: list[RpcPeerAddress]
bannedAddresses: list[RpcPeerAddress]
class GetMetricsResponse(TypedDict, total=False):
"""Response from get_metrics."""
serverTime: int
processMetrics: ProcessMetrics
connectionMetrics: ConnectionMetrics
bandwidthMetrics: BandwidthMetrics
consensusMetrics: ConsensusMetrics
storageMetrics: RpcStorageMetrics
customMetrics: dict | None
class ConnectionsProfileData(TypedDict):
"""Profile data for connection resource usage.
Category: RPC/Types
"""
cpuUsage: int
memoryUsage: int
class GetConnectionsResponse(TypedDict):
"""Response from get_connections."""
clients: int
peers: int
profileData: ConnectionsProfileData | None
class GetSinkResponse(TypedDict):
"""Response from get_sink."""
sink: str
class GetSinkBlueScoreResponse(TypedDict):
"""Response from get_sink_blue_score."""
blueScore: int
class PingResponse(TypedDict):
"""Response from ping."""
pass
class ShutdownResponse(TypedDict):
"""Response from shutdown."""
pass
class GetServerInfoResponse(TypedDict):
"""Response from get_server_info."""
rpcApiVersion: int
rpcApiRevision: int
serverVersion: str
networkId: str
hasUtxoIndex: bool
isSynced: bool
virtualDaaScore: int
class GetSyncStatusResponse(TypedDict):
"""Response from get_sync_status."""
isSynced: bool
class GetFeeEstimateResponse(TypedDict):
"""Response from get_fee_estimate."""
estimate: RpcFeeEstimate
class GetCurrentNetworkResponse(TypedDict):
"""Response from get_current_network."""
network: str
class GetSystemInfoResponse(TypedDict):
"""Response from get_system_info."""
version: str
systemId: list[int] | None
gitHash: list[int] | None
cpuPhysicalCores: int
totalMemory: int
fdLimit: int
proxySocketLimitPerCpuCore: int | None
class AddPeerResponse(TypedDict):
"""Response from add_peer."""
pass
class BanResponse(TypedDict):
"""Response from ban."""
pass
class UnbanResponse(TypedDict):
"""Response from unban."""
pass
class EstimateNetworkHashesPerSecondResponse(TypedDict):
"""Response from estimate_network_hashes_per_second."""
networkHashesPerSecond: int
class GetBalanceByAddressResponse(TypedDict):
"""Response from get_balance_by_address."""
balance: int
class GetBalancesByAddressesResponse(TypedDict):
"""Response from get_balances_by_addresses."""
entries: list[RpcBalancesByAddressesEntry]
class GetBlockResponse(TypedDict):
"""Response from get_block."""
block: RpcBlock
class GetBlocksResponse(TypedDict):
"""Response from get_blocks."""
blockHashes: list[str]
blocks: list[RpcBlock]
class GetBlockTemplateResponse(TypedDict):
"""Response from get_block_template."""
block: RpcRawBlock
isSynced: bool
class GetCurrentBlockColorResponse(TypedDict):
"""Response from get_current_block_color."""
blue: bool
class GetDaaScoreTimestampEstimateResponse(TypedDict):
"""Response from get_daa_score_timestamp_estimate."""
timestamps: list[int]
class GetFeeEstimateExperimentalResponse(TypedDict):
"""Response from get_fee_estimate_experimental."""
estimate: RpcFeeEstimate
verbose: dict | None
class GetHeadersResponse(TypedDict):
"""Response from get_headers."""
headers: list[RpcBlockHeader]
class GetMempoolEntriesResponse(TypedDict):
"""Response from get_mempool_entries."""
mempoolEntries: list[RpcMempoolEntry]
class GetMempoolEntriesByAddressesResponse(TypedDict):
"""Response from get_mempool_entries_by_addresses."""
entries: list[RpcMempoolEntryByAddress]
class GetMempoolEntryResponse(TypedDict):
"""Response from get_mempool_entry."""
mempoolEntry: RpcMempoolEntry
class GetSubnetworkResponse(TypedDict):
"""Response from get_subnetwork."""
gasLimit: int
class GetUtxosByAddressesResponse(TypedDict):
"""Response from get_utxos_by_addresses."""
entries: list[RpcUtxosByAddressesEntry]
class GetUtxoReturnAddressResponse(TypedDict):
"""Response from get_utxo_return_address."""
returnAddress: str | None
class GetVirtualChainFromBlockResponse(TypedDict):
"""Response from get_virtual_chain_from_block."""
removedChainBlockHashes: list[str]
addedChainBlockHashes: list[str]
acceptedTransactionIds: list[RpcAcceptedTransactionIds]
class GetVirtualChainFromBlockV2Response(TypedDict):
"""Response from get_virtual_chain_from_block_v2."""
removedChainBlockHashes: list[str]
addedChainBlockHashes: list[str]
chainBlockAcceptedTransactions: list[RpcChainBlockAcceptedTransactions]
class ResolveFinalityConflictResponse(TypedDict):
"""Response from resolve_finality_conflict."""
pass
class SubmitBlockResponse(TypedDict):
"""Response from submit_block."""
report: str
class SubmitTransactionResponse(TypedDict):
"""Response from submit_transaction."""
transactionId: str
class SubmitTransactionReplacementResponse(TypedDict):
"""Response from submit_transaction_replacement."""
transactionId: str
replacedTransaction: RpcTransaction