viz-js-lib 0.12.6 → 0.12.7

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.
@@ -0,0 +1,1353 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "VIZ Blockchain JSON-RPC API Specification",
4
+ "description": "Complete specification of all JSON-RPC methods exposed by VIZ node plugins. Intended as a machine-readable spec for API explorer generation.",
5
+ "version": "1.0.0",
6
+ "plugins": [
7
+ {
8
+ "name": "validator_api",
9
+ "description": "Provides read-only access to validator (witness) data: schedules, votes, and validator registration info.",
10
+ "methods": [
11
+ {
12
+ "method": "get_active_validators",
13
+ "description": "Returns the list of currently active validator account names that are participating in block production.",
14
+ "aliases": ["get_active_witnesses"],
15
+ "params": [],
16
+ "returns": {
17
+ "type": "array",
18
+ "items": { "type": "string" },
19
+ "description": "Array of account names of currently active validators."
20
+ }
21
+ },
22
+ {
23
+ "method": "get_validator_schedule",
24
+ "description": "Returns the current validator schedule object, including the shuffled list of validators and their timeshares.",
25
+ "aliases": ["get_witness_schedule"],
26
+ "params": [],
27
+ "returns": {
28
+ "type": "object",
29
+ "description": "The validator_schedule_object containing current_shuffled_validators, timeshare, and related scheduling data."
30
+ }
31
+ },
32
+ {
33
+ "method": "get_validators",
34
+ "description": "Returns a list of validator objects by their database IDs. For each ID, returns either the validator_api_object or null if not found.",
35
+ "aliases": ["get_witnesses"],
36
+ "params": [
37
+ {
38
+ "name": "validator_ids",
39
+ "caption": "Validator IDs",
40
+ "description": "Array of validator object database IDs to look up.",
41
+ "type": "array",
42
+ "items": { "type": "integer" },
43
+ "required": true
44
+ }
45
+ ],
46
+ "returns": {
47
+ "type": "array",
48
+ "description": "Array of optional validator_api_object entries, one per requested ID."
49
+ }
50
+ },
51
+ {
52
+ "method": "get_validator_by_account",
53
+ "description": "Returns the validator object registered under a specific account name, or null if the account is not a validator.",
54
+ "aliases": ["get_witness_by_account"],
55
+ "params": [
56
+ {
57
+ "name": "account_name",
58
+ "caption": "Account Name",
59
+ "description": "The account name to look up as a validator.",
60
+ "type": "string",
61
+ "required": true
62
+ }
63
+ ],
64
+ "returns": {
65
+ "type": "object",
66
+ "description": "The validator_api_object for the account, or null if not a validator.",
67
+ "nullable": true
68
+ }
69
+ },
70
+ {
71
+ "method": "get_validators_by_vote",
72
+ "description": "Returns validators sorted by total votes (descending). Starts from a given account name. Only returns validators with votes > 0. Maximum 100 results.",
73
+ "aliases": ["get_witnesses_by_vote"],
74
+ "params": [
75
+ {
76
+ "name": "from",
77
+ "caption": "From Account",
78
+ "description": "The account name to start from. Use empty string to start from the top.",
79
+ "type": "string",
80
+ "required": true
81
+ },
82
+ {
83
+ "name": "limit",
84
+ "caption": "Limit",
85
+ "description": "Maximum number of results to return. Must not exceed 100.",
86
+ "type": "integer",
87
+ "required": true,
88
+ "maximum": 100
89
+ }
90
+ ],
91
+ "returns": {
92
+ "type": "array",
93
+ "description": "Array of validator_api_object entries sorted by vote count."
94
+ }
95
+ },
96
+ {
97
+ "method": "get_validators_by_counted_vote",
98
+ "description": "Returns validators sorted by counted votes (descending). Starts from a given account name. Only returns validators with counted_votes > 0. Maximum 100 results.",
99
+ "aliases": ["get_witnesses_by_counted_vote"],
100
+ "params": [
101
+ {
102
+ "name": "from",
103
+ "caption": "From Account",
104
+ "description": "The account name to start from. Use empty string to start from the top.",
105
+ "type": "string",
106
+ "required": true
107
+ },
108
+ {
109
+ "name": "limit",
110
+ "caption": "Limit",
111
+ "description": "Maximum number of results to return. Must not exceed 100.",
112
+ "type": "integer",
113
+ "required": true,
114
+ "maximum": 100
115
+ }
116
+ ],
117
+ "returns": {
118
+ "type": "array",
119
+ "description": "Array of validator_api_object entries sorted by counted vote."
120
+ }
121
+ },
122
+ {
123
+ "method": "get_validator_count",
124
+ "description": "Returns the total number of registered validators on the blockchain.",
125
+ "aliases": ["get_witness_count"],
126
+ "params": [],
127
+ "returns": {
128
+ "type": "integer",
129
+ "description": "Total count of registered validators."
130
+ }
131
+ },
132
+ {
133
+ "method": "lookup_validator_accounts",
134
+ "description": "Looks up validator account names starting from a lower bound. Returns up to 1000 results alphabetically.",
135
+ "aliases": ["lookup_witness_accounts"],
136
+ "params": [
137
+ {
138
+ "name": "lower_bound_name",
139
+ "caption": "Lower Bound Name",
140
+ "description": "The lower bound of the first account name to return. Use empty string to start from the beginning.",
141
+ "type": "string",
142
+ "required": true
143
+ },
144
+ {
145
+ "name": "limit",
146
+ "caption": "Limit",
147
+ "description": "Maximum number of results to return. Must not exceed 1000.",
148
+ "type": "integer",
149
+ "required": true,
150
+ "maximum": 1000
151
+ }
152
+ ],
153
+ "returns": {
154
+ "type": "array",
155
+ "items": { "type": "string" },
156
+ "description": "Set of validator account names matching the query."
157
+ }
158
+ }
159
+ ]
160
+ },
161
+ {
162
+ "name": "account_history",
163
+ "description": "Tracks operations by account and provides per-account operation history queries.",
164
+ "methods": [
165
+ {
166
+ "method": "get_account_history",
167
+ "description": "Returns a map of operations for a given account in the sequence range [from-limit, from]. Each account operation has a sequence number starting from 0. Use from=-1 (4294967295) to get the most recent operations.",
168
+ "params": [
169
+ {
170
+ "name": "account",
171
+ "caption": "Account Name",
172
+ "description": "The account name whose operation history to retrieve.",
173
+ "type": "string",
174
+ "required": true
175
+ },
176
+ {
177
+ "name": "from",
178
+ "caption": "From Sequence",
179
+ "description": "The absolute sequence number. Use -1 (4294967295) for the most recent operation.",
180
+ "type": "integer",
181
+ "required": true
182
+ },
183
+ {
184
+ "name": "limit",
185
+ "caption": "Limit",
186
+ "description": "Maximum number of operations to return. Must be between 1 and 1000. Must be less than 'from' unless from is -1.",
187
+ "type": "integer",
188
+ "required": true,
189
+ "minimum": 1,
190
+ "maximum": 1000
191
+ }
192
+ ],
193
+ "returns": {
194
+ "type": "object",
195
+ "description": "Map of sequence number to applied_operation objects for the account."
196
+ }
197
+ }
198
+ ]
199
+ },
200
+ {
201
+ "name": "operation_history",
202
+ "description": "Tracks all blockchain operations and provides block-level and transaction-level operation queries.",
203
+ "methods": [
204
+ {
205
+ "method": "get_ops_in_block",
206
+ "description": "Returns the sequence of operations included or generated within a particular block. Virtual operations are generated by the blockchain (e.g. rewards) as opposed to user-submitted operations.",
207
+ "params": [
208
+ {
209
+ "name": "block_num",
210
+ "caption": "Block Number",
211
+ "description": "Height of the block whose operations should be returned.",
212
+ "type": "integer",
213
+ "required": true
214
+ },
215
+ {
216
+ "name": "only_virtual",
217
+ "caption": "Only Virtual",
218
+ "description": "Whether to only include virtual operations in the returned results.",
219
+ "type": "boolean",
220
+ "required": true
221
+ }
222
+ ],
223
+ "returns": {
224
+ "type": "array",
225
+ "description": "Array of applied_operation objects from the specified block."
226
+ }
227
+ },
228
+ {
229
+ "method": "get_transaction",
230
+ "description": "Returns a transaction by its ID, including block number and transaction index within the block.",
231
+ "params": [
232
+ {
233
+ "name": "id",
234
+ "caption": "Transaction ID",
235
+ "description": "The hash (SHA-256 / ripemd160) of the transaction to retrieve.",
236
+ "type": "string",
237
+ "required": true
238
+ }
239
+ ],
240
+ "returns": {
241
+ "type": "object",
242
+ "description": "annotated_signed_transaction with block_num and transaction_num fields added."
243
+ }
244
+ }
245
+ ]
246
+ },
247
+ {
248
+ "name": "database_api",
249
+ "description": "The core read-only API for the blockchain database. Provides access to blocks, accounts, chain properties, authority validation, vesting delegations, and more.",
250
+ "methods": [
251
+ {
252
+ "method": "get_block_header",
253
+ "description": "Retrieves a block header by block number.",
254
+ "params": [
255
+ {
256
+ "name": "block_num",
257
+ "caption": "Block Number",
258
+ "description": "Height of the block whose header should be returned.",
259
+ "type": "integer",
260
+ "required": true
261
+ }
262
+ ],
263
+ "returns": {
264
+ "type": "object",
265
+ "description": "The block header, or null if no matching block was found.",
266
+ "nullable": true
267
+ }
268
+ },
269
+ {
270
+ "method": "get_block",
271
+ "description": "Retrieves a full, signed block by block number.",
272
+ "params": [
273
+ {
274
+ "name": "block_num",
275
+ "caption": "Block Number",
276
+ "description": "Height of the block to be returned.",
277
+ "type": "integer",
278
+ "required": true
279
+ }
280
+ ],
281
+ "returns": {
282
+ "type": "object",
283
+ "description": "The full signed block, or null if no matching block was found.",
284
+ "nullable": true
285
+ }
286
+ },
287
+ {
288
+ "method": "get_irreversible_block_header",
289
+ "description": "Retrieves a block header only if the block is irreversible. Returns null if the block has not yet been finalized.",
290
+ "params": [
291
+ {
292
+ "name": "block_num",
293
+ "caption": "Block Number",
294
+ "description": "Height of the block whose header should be returned.",
295
+ "type": "integer",
296
+ "required": true
297
+ }
298
+ ],
299
+ "returns": {
300
+ "type": "object",
301
+ "description": "The block header if the block is irreversible, or null.",
302
+ "nullable": true
303
+ }
304
+ },
305
+ {
306
+ "method": "get_irreversible_block",
307
+ "description": "Retrieves a full, signed block only if it is irreversible. Returns null if the block has not yet been finalized.",
308
+ "params": [
309
+ {
310
+ "name": "block_num",
311
+ "caption": "Block Number",
312
+ "description": "Height of the block to be returned.",
313
+ "type": "integer",
314
+ "required": true
315
+ }
316
+ ],
317
+ "returns": {
318
+ "type": "object",
319
+ "description": "The full signed block if irreversible, or null.",
320
+ "nullable": true
321
+ }
322
+ },
323
+ {
324
+ "method": "set_block_applied_callback",
325
+ "description": "Sets a callback function that is triggered on each newly generated block. Used for real-time block notifications via WebSocket.",
326
+ "params": [
327
+ {
328
+ "name": "callback",
329
+ "caption": "Callback",
330
+ "description": "Callback function to invoke when a new block is applied.",
331
+ "type": "function",
332
+ "required": true
333
+ }
334
+ ],
335
+ "returns": {
336
+ "type": "null",
337
+ "description": "No return value (callback-based)."
338
+ }
339
+ },
340
+ {
341
+ "method": "get_config",
342
+ "description": "Retrieves compile-time constants and configuration values of the blockchain (e.g., chain ID, symbol, precision).",
343
+ "params": [],
344
+ "returns": {
345
+ "type": "object",
346
+ "description": "Object containing blockchain compile-time configuration constants."
347
+ }
348
+ },
349
+ {
350
+ "method": "get_dynamic_global_properties",
351
+ "description": "Retrieves the current dynamic global properties object, which contains real-time chain state such as head block number, total supply, and other dynamic metrics.",
352
+ "params": [],
353
+ "returns": {
354
+ "type": "object",
355
+ "description": "The dynamic_global_property_api_object with current chain state."
356
+ }
357
+ },
358
+ {
359
+ "method": "get_chain_properties",
360
+ "description": "Retrieves the chain properties as set by the median validator schedule (chain-wide constraints like account creation fee, maximum block size, etc.).",
361
+ "params": [],
362
+ "returns": {
363
+ "type": "object",
364
+ "description": "chain_api_properties object with median chain parameters."
365
+ }
366
+ },
367
+ {
368
+ "method": "get_hardfork_version",
369
+ "description": "Returns the current hardfork version of the blockchain.",
370
+ "params": [],
371
+ "returns": {
372
+ "type": "string",
373
+ "description": "The current hardfork version string (e.g. '0.23.0')."
374
+ }
375
+ },
376
+ {
377
+ "method": "get_next_scheduled_hardfork",
378
+ "description": "Returns the next scheduled hardfork version and the time it is planned to go live.",
379
+ "params": [],
380
+ "returns": {
381
+ "type": "object",
382
+ "description": "Object with hf_version (string) and live_time (ISO timestamp)."
383
+ }
384
+ },
385
+ {
386
+ "method": "get_accounts",
387
+ "description": "Returns full account objects for a list of account names. Includes balances, vesting, authority, and validator votes.",
388
+ "params": [
389
+ {
390
+ "name": "names",
391
+ "caption": "Account Names",
392
+ "description": "Array of account names to look up.",
393
+ "type": "array",
394
+ "items": { "type": "string" },
395
+ "required": true
396
+ }
397
+ ],
398
+ "returns": {
399
+ "type": "array",
400
+ "description": "Array of account_api_object entries. Only accounts that exist are returned."
401
+ }
402
+ },
403
+ {
404
+ "method": "lookup_account_names",
405
+ "description": "Looks up accounts by their names. Returns an optional account object for each name; null if the account does not exist.",
406
+ "params": [
407
+ {
408
+ "name": "account_names",
409
+ "caption": "Account Names",
410
+ "description": "Array of account names to look up.",
411
+ "type": "array",
412
+ "items": { "type": "string" },
413
+ "required": true
414
+ }
415
+ ],
416
+ "returns": {
417
+ "type": "array",
418
+ "description": "Array of optional account_api_object entries. Each element may be null."
419
+ }
420
+ },
421
+ {
422
+ "method": "lookup_accounts",
423
+ "description": "Looks up account names starting from a lower bound. Returns a set of account names in alphabetical order.",
424
+ "params": [
425
+ {
426
+ "name": "lower_bound_name",
427
+ "caption": "Lower Bound Name",
428
+ "description": "The lower bound of the first account name to return.",
429
+ "type": "string",
430
+ "required": true
431
+ },
432
+ {
433
+ "name": "limit",
434
+ "caption": "Limit",
435
+ "description": "Maximum number of results to return. Must not exceed 1000.",
436
+ "type": "integer",
437
+ "required": true,
438
+ "maximum": 1000
439
+ }
440
+ ],
441
+ "returns": {
442
+ "type": "array",
443
+ "items": { "type": "string" },
444
+ "description": "Set of account names matching the query."
445
+ }
446
+ },
447
+ {
448
+ "method": "get_account_count",
449
+ "description": "Returns the total number of accounts registered on the blockchain.",
450
+ "params": [],
451
+ "returns": {
452
+ "type": "integer",
453
+ "description": "Total number of registered accounts."
454
+ }
455
+ },
456
+ {
457
+ "method": "get_master_history",
458
+ "description": "Returns the master authority change history for a given account, useful for account recovery audits.",
459
+ "params": [
460
+ {
461
+ "name": "account",
462
+ "caption": "Account Name",
463
+ "description": "The account name whose master authority history to retrieve.",
464
+ "type": "string",
465
+ "required": true
466
+ }
467
+ ],
468
+ "returns": {
469
+ "type": "array",
470
+ "description": "Array of master_authority_history_api_object entries."
471
+ }
472
+ },
473
+ {
474
+ "method": "get_recovery_request",
475
+ "description": "Returns the current account recovery request for an account, if one exists.",
476
+ "params": [
477
+ {
478
+ "name": "account",
479
+ "caption": "Account Name",
480
+ "description": "The account name whose recovery request to check.",
481
+ "type": "string",
482
+ "required": true
483
+ }
484
+ ],
485
+ "returns": {
486
+ "type": "object",
487
+ "description": "The account_recovery_request_api_object, or null if no request exists.",
488
+ "nullable": true
489
+ }
490
+ },
491
+ {
492
+ "method": "get_escrow",
493
+ "description": "Returns the escrow object for a given sender and escrow ID.",
494
+ "params": [
495
+ {
496
+ "name": "from",
497
+ "caption": "From Account",
498
+ "description": "The account name of the escrow sender.",
499
+ "type": "string",
500
+ "required": true
501
+ },
502
+ {
503
+ "name": "escrow_id",
504
+ "caption": "Escrow ID",
505
+ "description": "The numeric escrow ID to look up.",
506
+ "type": "integer",
507
+ "required": true
508
+ }
509
+ ],
510
+ "returns": {
511
+ "type": "object",
512
+ "description": "The escrow_api_object, or null if not found.",
513
+ "nullable": true
514
+ }
515
+ },
516
+ {
517
+ "method": "get_withdraw_routes",
518
+ "description": "Returns vesting withdrawal routes for a given account. Can filter by direction (incoming, outgoing, or all).",
519
+ "params": [
520
+ {
521
+ "name": "account",
522
+ "caption": "Account Name",
523
+ "description": "The account name whose withdrawal routes to retrieve.",
524
+ "type": "string",
525
+ "required": true
526
+ },
527
+ {
528
+ "name": "type",
529
+ "caption": "Route Type",
530
+ "description": "Filter direction: 'incoming', 'outgoing', or 'all'.",
531
+ "type": "string",
532
+ "enum": ["incoming", "outgoing", "all"],
533
+ "required": true
534
+ }
535
+ ],
536
+ "returns": {
537
+ "type": "array",
538
+ "description": "Array of withdraw_route objects with from_account, to_account, percent, auto_vest."
539
+ }
540
+ },
541
+ {
542
+ "method": "get_vesting_delegations",
543
+ "description": "Returns vesting delegation objects for a given account. Supports pagination and filtering by delegated or received.",
544
+ "params": [
545
+ {
546
+ "name": "account",
547
+ "caption": "Account Name",
548
+ "description": "The delegator or delegatee account name.",
549
+ "type": "string",
550
+ "required": true
551
+ },
552
+ {
553
+ "name": "from",
554
+ "caption": "From",
555
+ "description": "The account name to start from for pagination.",
556
+ "type": "string",
557
+ "required": true
558
+ },
559
+ {
560
+ "name": "limit",
561
+ "caption": "Limit",
562
+ "description": "Maximum number of results. Defaults to 100. Must not exceed 1000.",
563
+ "type": "integer",
564
+ "required": false,
565
+ "default": 100,
566
+ "maximum": 1000
567
+ },
568
+ {
569
+ "name": "type",
570
+ "caption": "Delegation Type",
571
+ "description": "Filter type: 'delegated' (sent) or 'received'. Defaults to 'delegated'.",
572
+ "type": "string",
573
+ "enum": ["delegated", "received"],
574
+ "required": false,
575
+ "default": "delegated"
576
+ }
577
+ ],
578
+ "returns": {
579
+ "type": "array",
580
+ "description": "Array of vesting_delegation_api_object entries."
581
+ }
582
+ },
583
+ {
584
+ "method": "get_expiring_vesting_delegations",
585
+ "description": "Returns expiring vesting delegation objects for a given account, starting from a given date.",
586
+ "params": [
587
+ {
588
+ "name": "account",
589
+ "caption": "Account Name",
590
+ "description": "The delegator account name.",
591
+ "type": "string",
592
+ "required": true
593
+ },
594
+ {
595
+ "name": "from",
596
+ "caption": "From Date",
597
+ "description": "Start date/time for expiration lookup (ISO timestamp).",
598
+ "type": "string",
599
+ "required": true
600
+ },
601
+ {
602
+ "name": "limit",
603
+ "caption": "Limit",
604
+ "description": "Maximum number of results. Defaults to 100. Must not exceed 1000.",
605
+ "type": "integer",
606
+ "required": false,
607
+ "default": 100,
608
+ "maximum": 1000
609
+ }
610
+ ],
611
+ "returns": {
612
+ "type": "array",
613
+ "description": "Array of vesting_delegation_expiration_api_object entries."
614
+ }
615
+ },
616
+ {
617
+ "method": "get_transaction_hex",
618
+ "description": "Returns a hexadecimal dump of the serialized binary form of a transaction.",
619
+ "params": [
620
+ {
621
+ "name": "trx",
622
+ "caption": "Transaction",
623
+ "description": "The signed transaction object to serialize.",
624
+ "type": "object",
625
+ "required": true
626
+ }
627
+ ],
628
+ "returns": {
629
+ "type": "string",
630
+ "description": "Hex-encoded serialized transaction."
631
+ }
632
+ },
633
+ {
634
+ "method": "get_required_signatures",
635
+ "description": "Given a partially signed transaction and a set of available public keys, returns the minimal subset of public keys that should add signatures to authorize the transaction.",
636
+ "params": [
637
+ {
638
+ "name": "trx",
639
+ "caption": "Transaction",
640
+ "description": "The signed transaction to analyze.",
641
+ "type": "object",
642
+ "required": true
643
+ },
644
+ {
645
+ "name": "available_keys",
646
+ "caption": "Available Keys",
647
+ "description": "Array/set of public keys that the caller can sign with.",
648
+ "type": "array",
649
+ "items": { "type": "string" },
650
+ "required": true
651
+ }
652
+ ],
653
+ "returns": {
654
+ "type": "array",
655
+ "items": { "type": "string" },
656
+ "description": "Set of public keys that are required to sign the transaction."
657
+ }
658
+ },
659
+ {
660
+ "method": "get_potential_signatures",
661
+ "description": "Returns the set of all public keys that could possibly sign for a given transaction. Useful for wallets to filter their key set before calling get_required_signatures.",
662
+ "params": [
663
+ {
664
+ "name": "trx",
665
+ "caption": "Transaction",
666
+ "description": "The signed transaction to analyze.",
667
+ "type": "object",
668
+ "required": true
669
+ }
670
+ ],
671
+ "returns": {
672
+ "type": "array",
673
+ "items": { "type": "string" },
674
+ "description": "Set of all public keys that could potentially authorize the transaction."
675
+ }
676
+ },
677
+ {
678
+ "method": "verify_authority",
679
+ "description": "Verifies that a transaction has all of the required signatures. Returns true if valid, otherwise throws an exception.",
680
+ "params": [
681
+ {
682
+ "name": "trx",
683
+ "caption": "Transaction",
684
+ "description": "The signed transaction to verify.",
685
+ "type": "object",
686
+ "required": true
687
+ }
688
+ ],
689
+ "returns": {
690
+ "type": "boolean",
691
+ "description": "true if the transaction has all required signatures."
692
+ }
693
+ },
694
+ {
695
+ "method": "verify_account_authority",
696
+ "description": "Verifies that a set of public keys has sufficient authority to authorize actions on behalf of an account.",
697
+ "params": [
698
+ {
699
+ "name": "name_or_id",
700
+ "caption": "Account Name",
701
+ "description": "The account name to check authority for.",
702
+ "type": "string",
703
+ "required": true
704
+ },
705
+ {
706
+ "name": "signers",
707
+ "caption": "Signer Keys",
708
+ "description": "Array/set of public keys to verify against the account's authority.",
709
+ "type": "array",
710
+ "items": { "type": "string" },
711
+ "required": true
712
+ }
713
+ ],
714
+ "returns": {
715
+ "type": "boolean",
716
+ "description": "true if the signers have enough authority to authorize the account."
717
+ }
718
+ },
719
+ {
720
+ "method": "get_database_info",
721
+ "description": "Returns database shared memory usage information including total size, free size, reserved size, used size, and per-index record counts.",
722
+ "params": [],
723
+ "returns": {
724
+ "type": "object",
725
+ "description": "Object with total_size, free_size, reserved_size, used_size, and index_list (array of {name, record_count})."
726
+ }
727
+ },
728
+ {
729
+ "method": "get_proposed_transactions",
730
+ "description": "Returns proposed transactions (proposals) associated with a given account, both authored and requiring approval.",
731
+ "params": [
732
+ {
733
+ "name": "account",
734
+ "caption": "Account Name",
735
+ "description": "The account name whose proposals to retrieve.",
736
+ "type": "string",
737
+ "required": true
738
+ },
739
+ {
740
+ "name": "from",
741
+ "caption": "From Offset",
742
+ "description": "Offset for pagination (number of results to skip).",
743
+ "type": "integer",
744
+ "required": true
745
+ },
746
+ {
747
+ "name": "limit",
748
+ "caption": "Limit",
749
+ "description": "Maximum number of proposals to return. Must not exceed 100.",
750
+ "type": "integer",
751
+ "required": true,
752
+ "maximum": 100
753
+ }
754
+ ],
755
+ "returns": {
756
+ "type": "array",
757
+ "description": "Array of proposal_api_object entries."
758
+ }
759
+ },
760
+ {
761
+ "method": "get_accounts_on_sale",
762
+ "description": "Returns a list of accounts currently on sale (direct sale, not auction). Only accounts whose sale start time has passed are included.",
763
+ "params": [
764
+ {
765
+ "name": "from",
766
+ "caption": "From Offset",
767
+ "description": "Number of results to skip for pagination.",
768
+ "type": "integer",
769
+ "required": true
770
+ },
771
+ {
772
+ "name": "limit",
773
+ "caption": "Limit",
774
+ "description": "Maximum number of results to return. Must not exceed 1000.",
775
+ "type": "integer",
776
+ "required": true,
777
+ "maximum": 1000
778
+ }
779
+ ],
780
+ "returns": {
781
+ "type": "array",
782
+ "description": "Array of account_on_sale_api_object entries."
783
+ }
784
+ },
785
+ {
786
+ "method": "get_accounts_on_auction",
787
+ "description": "Returns a list of accounts currently on auction (no target buyer set). Only accounts whose sale start time has passed are included.",
788
+ "params": [
789
+ {
790
+ "name": "from",
791
+ "caption": "From Offset",
792
+ "description": "Number of results to skip for pagination.",
793
+ "type": "integer",
794
+ "required": true
795
+ },
796
+ {
797
+ "name": "limit",
798
+ "caption": "Limit",
799
+ "description": "Maximum number of results to return. Must not exceed 1000.",
800
+ "type": "integer",
801
+ "required": true,
802
+ "maximum": 1000
803
+ }
804
+ ],
805
+ "returns": {
806
+ "type": "array",
807
+ "description": "Array of account_on_sale_api_object entries for auction listings."
808
+ }
809
+ },
810
+ {
811
+ "method": "get_subaccounts_on_sale",
812
+ "description": "Returns a list of subaccounts currently on sale.",
813
+ "params": [
814
+ {
815
+ "name": "from",
816
+ "caption": "From Offset",
817
+ "description": "Number of results to skip for pagination.",
818
+ "type": "integer",
819
+ "required": true
820
+ },
821
+ {
822
+ "name": "limit",
823
+ "caption": "Limit",
824
+ "description": "Maximum number of results to return. Must not exceed 1000.",
825
+ "type": "integer",
826
+ "required": true,
827
+ "maximum": 1000
828
+ }
829
+ ],
830
+ "returns": {
831
+ "type": "array",
832
+ "description": "Array of subaccount_on_sale_api_object entries."
833
+ }
834
+ }
835
+ ]
836
+ },
837
+ {
838
+ "name": "account_by_key",
839
+ "description": "Provides a lookup from public keys to the accounts that reference those keys in their authority.",
840
+ "methods": [
841
+ {
842
+ "method": "get_key_references",
843
+ "description": "Returns all account names that reference the given public keys in their master, active, or regular authority.",
844
+ "params": [
845
+ {
846
+ "name": "keys",
847
+ "caption": "Public Keys",
848
+ "description": "Array of public keys to look up.",
849
+ "type": "array",
850
+ "items": { "type": "string" },
851
+ "required": true
852
+ }
853
+ ],
854
+ "returns": {
855
+ "type": "array",
856
+ "description": "Array of arrays of account names. Each inner array corresponds to one input key and contains all accounts referencing that key."
857
+ }
858
+ }
859
+ ]
860
+ },
861
+ {
862
+ "name": "network_broadcast_api",
863
+ "description": "Provides transaction and block broadcasting capabilities. This is the write API for submitting transactions to the network.",
864
+ "methods": [
865
+ {
866
+ "method": "broadcast_transaction",
867
+ "description": "Broadcasts a signed transaction to the network. The transaction is accepted into the pending pool and propagated to P2P peers. Optionally checks that the blockchain is not too far behind.",
868
+ "params": [
869
+ {
870
+ "name": "trx",
871
+ "caption": "Transaction",
872
+ "description": "The signed transaction to broadcast.",
873
+ "type": "object",
874
+ "required": true
875
+ },
876
+ {
877
+ "name": "max_block_age",
878
+ "caption": "Max Block Age",
879
+ "description": "Optional. Maximum allowed age of the head block in seconds. If the blockchain is behind by more than this, the call will fail. Use -1 to disable.",
880
+ "type": "integer",
881
+ "required": false
882
+ }
883
+ ],
884
+ "returns": {
885
+ "type": "null",
886
+ "description": "No return value on success."
887
+ }
888
+ },
889
+ {
890
+ "method": "broadcast_transaction_synchronous",
891
+ "description": "Broadcasts a signed transaction and waits for confirmation. Returns the transaction ID, block number, and transaction index once included in a block. The callback includes whether the transaction expired.",
892
+ "params": [
893
+ {
894
+ "name": "trx",
895
+ "caption": "Transaction",
896
+ "description": "The signed transaction to broadcast.",
897
+ "type": "object",
898
+ "required": true
899
+ },
900
+ {
901
+ "name": "max_block_age",
902
+ "caption": "Max Block Age",
903
+ "description": "Optional. Maximum allowed age of the head block in seconds. Use -1 to disable.",
904
+ "type": "integer",
905
+ "required": false
906
+ }
907
+ ],
908
+ "returns": {
909
+ "type": "object",
910
+ "description": "Object with id (transaction hash), block_num, trx_num, and expired fields."
911
+ }
912
+ },
913
+ {
914
+ "method": "broadcast_block",
915
+ "description": "Broadcasts a signed block to the network. Typically used by validators to propagate newly produced blocks.",
916
+ "params": [
917
+ {
918
+ "name": "block",
919
+ "caption": "Block",
920
+ "description": "The signed block to broadcast.",
921
+ "type": "object",
922
+ "required": true
923
+ }
924
+ ],
925
+ "returns": {
926
+ "type": "null",
927
+ "description": "No return value on success."
928
+ }
929
+ },
930
+ {
931
+ "method": "broadcast_transaction_with_callback",
932
+ "description": "Broadcasts a signed transaction with a confirmation callback. The first argument is the callback, followed by the transaction. Similar to broadcast_transaction_synchronous but with custom callback handling.",
933
+ "params": [
934
+ {
935
+ "name": "callback",
936
+ "caption": "Callback",
937
+ "description": "Confirmation callback function.",
938
+ "type": "function",
939
+ "required": true
940
+ },
941
+ {
942
+ "name": "trx",
943
+ "caption": "Transaction",
944
+ "description": "The signed transaction to broadcast.",
945
+ "type": "object",
946
+ "required": true
947
+ },
948
+ {
949
+ "name": "max_block_age",
950
+ "caption": "Max Block Age",
951
+ "description": "Optional. Maximum allowed age of the head block in seconds. Use -1 to disable.",
952
+ "type": "integer",
953
+ "required": false
954
+ }
955
+ ],
956
+ "returns": {
957
+ "type": "null",
958
+ "description": "No direct return; result delivered via callback."
959
+ }
960
+ }
961
+ ]
962
+ },
963
+ {
964
+ "name": "committee_api",
965
+ "description": "Provides access to committee worker proposal requests and their voting state.",
966
+ "methods": [
967
+ {
968
+ "method": "get_committee_request",
969
+ "description": "Returns a committee request by its ID, optionally including votes.",
970
+ "params": [
971
+ {
972
+ "name": "request_id",
973
+ "caption": "Request ID",
974
+ "description": "The numeric ID of the committee request to retrieve.",
975
+ "type": "integer",
976
+ "required": true
977
+ },
978
+ {
979
+ "name": "votes_count",
980
+ "caption": "Votes Count",
981
+ "description": "Number of votes to include. Use 0 for no votes, -1 for all votes, or a positive number to limit.",
982
+ "type": "integer",
983
+ "required": false,
984
+ "default": 0
985
+ }
986
+ ],
987
+ "returns": {
988
+ "type": "object",
989
+ "description": "committee_api_object with optional embedded votes array."
990
+ }
991
+ },
992
+ {
993
+ "method": "get_committee_request_votes",
994
+ "description": "Returns all votes for a specific committee request.",
995
+ "params": [
996
+ {
997
+ "name": "request_id",
998
+ "caption": "Request ID",
999
+ "description": "The numeric ID of the committee request whose votes to retrieve.",
1000
+ "type": "integer",
1001
+ "required": true
1002
+ }
1003
+ ],
1004
+ "returns": {
1005
+ "type": "array",
1006
+ "description": "Array of committee_vote_state objects."
1007
+ }
1008
+ },
1009
+ {
1010
+ "method": "get_committee_requests_list",
1011
+ "description": "Returns a list of committee request IDs filtered by status.",
1012
+ "params": [
1013
+ {
1014
+ "name": "status",
1015
+ "caption": "Status",
1016
+ "description": "The status code to filter by (e.g. 0=pending, 1=approved, etc.).",
1017
+ "type": "integer",
1018
+ "required": true
1019
+ }
1020
+ ],
1021
+ "returns": {
1022
+ "type": "array",
1023
+ "items": { "type": "integer" },
1024
+ "description": "Array of committee request IDs matching the given status."
1025
+ }
1026
+ }
1027
+ ]
1028
+ },
1029
+ {
1030
+ "name": "invite_api",
1031
+ "description": "Provides access to invite objects used for account registration via invite keys.",
1032
+ "methods": [
1033
+ {
1034
+ "method": "get_invites_list",
1035
+ "description": "Returns a list of invite IDs filtered by status.",
1036
+ "params": [
1037
+ {
1038
+ "name": "status",
1039
+ "caption": "Status",
1040
+ "description": "The status code to filter invites by.",
1041
+ "type": "integer",
1042
+ "required": true
1043
+ }
1044
+ ],
1045
+ "returns": {
1046
+ "type": "array",
1047
+ "items": { "type": "integer" },
1048
+ "description": "Array of invite database IDs matching the given status."
1049
+ }
1050
+ },
1051
+ {
1052
+ "method": "get_invite_by_id",
1053
+ "description": "Returns an invite object by its database ID.",
1054
+ "params": [
1055
+ {
1056
+ "name": "id",
1057
+ "caption": "Invite ID",
1058
+ "description": "The database ID of the invite to retrieve.",
1059
+ "type": "integer",
1060
+ "required": true
1061
+ }
1062
+ ],
1063
+ "returns": {
1064
+ "type": "object",
1065
+ "description": "invite_api_object with invite details (key, creator, balance, etc.)."
1066
+ }
1067
+ },
1068
+ {
1069
+ "method": "get_invite_by_key",
1070
+ "description": "Returns an invite object by its public key.",
1071
+ "params": [
1072
+ {
1073
+ "name": "key",
1074
+ "caption": "Invite Key",
1075
+ "description": "The public key associated with the invite.",
1076
+ "type": "string",
1077
+ "required": true
1078
+ }
1079
+ ],
1080
+ "returns": {
1081
+ "type": "object",
1082
+ "description": "invite_api_object matching the given key."
1083
+ }
1084
+ }
1085
+ ]
1086
+ },
1087
+ {
1088
+ "name": "paid_subscription_api",
1089
+ "description": "Provides access to paid subscription data: subscription options set by content creators, subscription status of subscribers, and active/inactive subscription lists.",
1090
+ "methods": [
1091
+ {
1092
+ "method": "get_paid_subscription_options",
1093
+ "description": "Returns the paid subscription settings for a given account (creator).",
1094
+ "params": [
1095
+ {
1096
+ "name": "account",
1097
+ "caption": "Account Name",
1098
+ "description": "The account name of the subscription creator.",
1099
+ "type": "string",
1100
+ "required": true
1101
+ }
1102
+ ],
1103
+ "returns": {
1104
+ "type": "object",
1105
+ "description": "paid_subscription_state with subscription details (price, period, etc.)."
1106
+ }
1107
+ },
1108
+ {
1109
+ "method": "get_paid_subscriptions",
1110
+ "description": "Returns a paginated list of all paid subscription objects.",
1111
+ "params": [
1112
+ {
1113
+ "name": "from",
1114
+ "caption": "From Offset",
1115
+ "description": "Number of results to skip for pagination.",
1116
+ "type": "integer",
1117
+ "required": true
1118
+ },
1119
+ {
1120
+ "name": "limit",
1121
+ "caption": "Limit",
1122
+ "description": "Maximum number of results to return. Must not exceed 1000.",
1123
+ "type": "integer",
1124
+ "required": true,
1125
+ "maximum": 1000
1126
+ }
1127
+ ],
1128
+ "returns": {
1129
+ "type": "array",
1130
+ "description": "Array of paid_subscription_object entries."
1131
+ }
1132
+ },
1133
+ {
1134
+ "method": "get_paid_subscription_status",
1135
+ "description": "Returns the subscription status of a specific subscriber for a given creator account.",
1136
+ "params": [
1137
+ {
1138
+ "name": "subscriber",
1139
+ "caption": "Subscriber",
1140
+ "description": "The account name of the subscriber.",
1141
+ "type": "string",
1142
+ "required": true
1143
+ },
1144
+ {
1145
+ "name": "account",
1146
+ "caption": "Creator Account",
1147
+ "description": "The account name of the subscription creator.",
1148
+ "type": "string",
1149
+ "required": true
1150
+ }
1151
+ ],
1152
+ "returns": {
1153
+ "type": "object",
1154
+ "description": "paid_subscribe_state with subscription status details."
1155
+ }
1156
+ },
1157
+ {
1158
+ "method": "get_active_paid_subscriptions",
1159
+ "description": "Returns a list of creator account names that a given subscriber has active subscriptions to.",
1160
+ "params": [
1161
+ {
1162
+ "name": "subscriber",
1163
+ "caption": "Subscriber",
1164
+ "description": "The account name of the subscriber.",
1165
+ "type": "string",
1166
+ "required": true
1167
+ }
1168
+ ],
1169
+ "returns": {
1170
+ "type": "array",
1171
+ "items": { "type": "string" },
1172
+ "description": "Array of creator account names with active subscriptions."
1173
+ }
1174
+ },
1175
+ {
1176
+ "method": "get_inactive_paid_subscriptions",
1177
+ "description": "Returns a list of creator account names that a given subscriber has inactive (expired) subscriptions to.",
1178
+ "params": [
1179
+ {
1180
+ "name": "subscriber",
1181
+ "caption": "Subscriber",
1182
+ "description": "The account name of the subscriber.",
1183
+ "type": "string",
1184
+ "required": true
1185
+ }
1186
+ ],
1187
+ "returns": {
1188
+ "type": "array",
1189
+ "items": { "type": "string" },
1190
+ "description": "Array of creator account names with inactive subscriptions."
1191
+ }
1192
+ }
1193
+ ]
1194
+ },
1195
+ {
1196
+ "name": "custom_protocol_api",
1197
+ "description": "Provides access to account data enriched with custom protocol sequence information. Custom protocols allow third-party applications to track per-account custom operations.",
1198
+ "methods": [
1199
+ {
1200
+ "method": "get_account",
1201
+ "description": "Returns an account object enriched with custom protocol sequence data for a specific custom protocol ID. Populates custom_sequence and custom_sequence_block_num fields.",
1202
+ "params": [
1203
+ {
1204
+ "name": "account",
1205
+ "caption": "Account Name",
1206
+ "description": "The account name to look up.",
1207
+ "type": "string",
1208
+ "required": true
1209
+ },
1210
+ {
1211
+ "name": "custom_protocol_id",
1212
+ "caption": "Custom Protocol ID",
1213
+ "description": "The custom protocol ID string to retrieve the sequence for. Use empty string to skip custom protocol lookup.",
1214
+ "type": "string",
1215
+ "required": true
1216
+ }
1217
+ ],
1218
+ "returns": {
1219
+ "type": "object",
1220
+ "description": "account_api_object with custom_sequence and custom_sequence_block_num populated for the given protocol."
1221
+ }
1222
+ }
1223
+ ]
1224
+ },
1225
+ {
1226
+ "name": "auth_util",
1227
+ "description": "Provides utility methods for verifying account authority signatures against arbitrary data digests.",
1228
+ "methods": [
1229
+ {
1230
+ "method": "check_authority_signature",
1231
+ "description": "Verifies that the provided signatures are valid for the given account's authority at a specified level (master, active, or regular). Returns the public keys derived from the signatures.",
1232
+ "params": [
1233
+ {
1234
+ "name": "account_name",
1235
+ "caption": "Account Name",
1236
+ "description": "The account name whose authority to check.",
1237
+ "type": "string",
1238
+ "required": true
1239
+ },
1240
+ {
1241
+ "name": "level",
1242
+ "caption": "Authority Level",
1243
+ "description": "The authority level to verify against: 'master' (or 'm'), 'active' (or 'a'), 'regular' (or 'r'). Empty string defaults to 'active'.",
1244
+ "type": "string",
1245
+ "required": true
1246
+ },
1247
+ {
1248
+ "name": "dig",
1249
+ "caption": "Digest",
1250
+ "description": "The SHA-256 hash of the data that was signed.",
1251
+ "type": "string",
1252
+ "required": true
1253
+ },
1254
+ {
1255
+ "name": "sigs",
1256
+ "caption": "Signatures",
1257
+ "description": "Array of signatures to verify.",
1258
+ "type": "array",
1259
+ "items": { "type": "string" },
1260
+ "required": true
1261
+ }
1262
+ ],
1263
+ "returns": {
1264
+ "type": "array",
1265
+ "items": { "type": "string" },
1266
+ "description": "Array of public keys recovered from the valid signatures."
1267
+ }
1268
+ }
1269
+ ]
1270
+ },
1271
+ {
1272
+ "name": "block_info",
1273
+ "description": "Tracks block metadata (size, average block size, slot info) and provides queries to retrieve this information for ranges of blocks.",
1274
+ "methods": [
1275
+ {
1276
+ "method": "get_block_info",
1277
+ "description": "Returns block metadata (block_id, block_size, average_block_size, aslot, last_irreversible_block_num) for a range of blocks starting from start_block_num.",
1278
+ "params": [
1279
+ {
1280
+ "name": "start_block_num",
1281
+ "caption": "Start Block Number",
1282
+ "description": "The first block number to return info for. Must be greater than 0.",
1283
+ "type": "integer",
1284
+ "required": true,
1285
+ "minimum": 1
1286
+ },
1287
+ {
1288
+ "name": "count",
1289
+ "caption": "Count",
1290
+ "description": "Number of blocks to return info for. Must not exceed 10000.",
1291
+ "type": "integer",
1292
+ "required": true,
1293
+ "maximum": 10000
1294
+ }
1295
+ ],
1296
+ "returns": {
1297
+ "type": "array",
1298
+ "description": "Array of block_info objects. Entries may be empty if no info is stored (e.g. blocks before snapshot)."
1299
+ }
1300
+ },
1301
+ {
1302
+ "method": "get_blocks_with_info",
1303
+ "description": "Returns full signed blocks with attached metadata for a range. Limits total response size to 8 MB. Stops early if no info is stored for a block.",
1304
+ "params": [
1305
+ {
1306
+ "name": "start_block_num",
1307
+ "caption": "Start Block Number",
1308
+ "description": "The first block number to return. Must be greater than 0.",
1309
+ "type": "integer",
1310
+ "required": true,
1311
+ "minimum": 1
1312
+ },
1313
+ {
1314
+ "name": "count",
1315
+ "caption": "Count",
1316
+ "description": "Maximum number of blocks to return. Must not exceed 10000. Response is capped at 8 MB total.",
1317
+ "type": "integer",
1318
+ "required": true,
1319
+ "maximum": 10000
1320
+ }
1321
+ ],
1322
+ "returns": {
1323
+ "type": "array",
1324
+ "description": "Array of block_with_info objects, each containing a signed block and its block_info metadata."
1325
+ }
1326
+ }
1327
+ ]
1328
+ },
1329
+ {
1330
+ "name": "raw_block",
1331
+ "description": "Provides access to raw (base64-encoded) serialized block data for low-level block inspection or re-import.",
1332
+ "methods": [
1333
+ {
1334
+ "method": "get_raw_block",
1335
+ "description": "Returns a raw block by block number, including the base64-encoded serialized binary, block ID, previous block ID, and timestamp.",
1336
+ "params": [
1337
+ {
1338
+ "name": "block_num",
1339
+ "caption": "Block Number",
1340
+ "description": "Height of the block to retrieve in raw form.",
1341
+ "type": "integer",
1342
+ "required": true
1343
+ }
1344
+ ],
1345
+ "returns": {
1346
+ "type": "object",
1347
+ "description": "Object with block_id, previous, timestamp, and raw_block (base64-encoded string) fields."
1348
+ }
1349
+ }
1350
+ ]
1351
+ }
1352
+ ]
1353
+ }