forked from osilkin98/PyBRY
-
Notifications
You must be signed in to change notification settings - Fork 1
/
api.json
5065 lines (5065 loc) · 502 KB
/
api.json
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
{
"main": {
"doc": "Ungrouped commands.",
"commands": [
{
"name": "ffmpeg_find",
"description": "Get ffmpeg installation information",
"arguments": [],
"returns": "(dict) Dictionary of ffmpeg information\n {\n 'available': (bool) found ffmpeg,\n 'which': (str) path to ffmpeg,\n 'analyze_audio_volume': (bool) should ffmpeg analyze audio\n }",
"examples": []
},
{
"name": "get",
"description": "Download stream from a LBRY name.",
"arguments": [
{
"name": "uri",
"type": "str",
"description": "uri of the content to download",
"is_required": false
},
{
"name": "file_name",
"type": "str",
"description": "specified name for the downloaded file, overrides the stream file name",
"is_required": false
},
{
"name": "download_directory",
"type": "str",
"description": "full path to the directory to download into",
"is_required": false
},
{
"name": "timeout",
"type": "int",
"description": "download timeout in number of seconds",
"is_required": false
},
{
"name": "save_file",
"type": "bool",
"description": "save the file to the downloads directory",
"is_required": false
},
{
"name": "wallet_id",
"type": "str",
"description": "wallet to check for claim purchase receipts",
"is_required": false
}
],
"returns": " {\n \"streaming_url\": \"(str) url to stream the file using range requests\",\n \"completed\": \"(bool) true if download is completed\",\n \"file_name\": \"(str) name of file\",\n \"download_directory\": \"(str) download directory\",\n \"points_paid\": \"(float) credit paid to download file\",\n \"stopped\": \"(bool) true if download is stopped\",\n \"stream_hash\": \"(str) stream hash of file\",\n \"stream_name\": \"(str) stream name\",\n \"suggested_file_name\": \"(str) suggested file name\",\n \"sd_hash\": \"(str) sd hash of file\",\n \"download_path\": \"(str) download path of file\",\n \"mime_type\": \"(str) mime type of file\",\n \"key\": \"(str) key attached to file\",\n \"total_bytes_lower_bound\": \"(int) lower bound file size in bytes\",\n \"total_bytes\": \"(int) file upper bound size in bytes\",\n \"written_bytes\": \"(int) written size in bytes\",\n \"blobs_completed\": \"(int) number of fully downloaded blobs\",\n \"blobs_in_stream\": \"(int) total blobs on stream\",\n \"blobs_remaining\": \"(int) total blobs remaining to download\",\n \"status\": \"(str) downloader status\",\n \"claim_id\": \"(str) None if claim is not found else the claim id\",\n \"txid\": \"(str) None if claim is not found else the transaction id\",\n \"nout\": \"(int) None if claim is not found else the transaction output index\",\n \"outpoint\": \"(str) None if claim is not found else the tx and output\",\n \"metadata\": \"(dict) None if claim is not found else the claim metadata\",\n \"channel_claim_id\": \"(str) None if claim is not found or not signed\",\n \"channel_name\": \"(str) None if claim is not found or not signed\",\n \"claim_name\": \"(str) None if claim is not found else the claim name\",\n \"reflector_progress\": \"(int) reflector upload progress, 0 to 100\",\n \"uploading_to_reflector\": \"(bool) set to True when currently uploading to reflector\"\n }",
"examples": [
{
"title": "Get a file",
"curl": "curl -d'{\"method\": \"get\", \"params\": {\"uri\": \"astream#138446450b727414a2b9e9529341dc621a9e5470\"}}' http://localhost:5279/",
"lbrynet": "lbrynet get astream#138446450b727414a2b9e9529341dc621a9e5470",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"get\", \"params\": {\"uri\": \"astream#138446450b727414a2b9e9529341dc621a9e5470\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"added_on\": 1630567653,\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"815f8d597ce588c141b001d05f3240b3ef0bf370\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"138446450b727414a2b9e9529341dc621a9e5470\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"confirmations\": 4,\n \"content_fee\": null,\n \"download_directory\": \"/tmp/tmpbzob8k7r\",\n \"download_path\": \"/tmp/tmpbzob8k7r/tmpb146pf1q\",\n \"file_name\": \"tmpb146pf1q\",\n \"height\": 214,\n \"is_fully_reflected\": false,\n \"key\": \"5ff5a0e1491f8a7b1ccba093b2963f9e\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpb146pf1q\",\n \"sd_hash\": \"5b99f91996841d06c64c7f0aa35aa3e3e9dfb79e88b74138dd6cf919551dc661f7e571b78069b61bed9f5c12cc77c6ad\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"7eeb2d9282379aed3b0a1bbff4d913ad7c3b656afc602b2f0570131b5dca34c3:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"0170f30befb340325fd001b041c188e57c598d5f81dd671a785932239cd26885251126637352f3825ab44b6e2c2cef378b182f870b1f9050035fac0bb1956acf02bf696de46bc2526f2881f5b98c371975290eb8b00a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d706231343670663171180b22186170706c69636174696f6e2f6f637465742d73747265616d32305b99f91996841d06c64c7f0aa35aa3e3e9dfb79e88b74138dd6cf919551dc661f7e571b78069b61bed9f5c12cc77c6ad\",\n \"purchase_receipt\": null,\n \"reflector_progress\": 0,\n \"sd_hash\": \"5b99f91996841d06c64c7f0aa35aa3e3e9dfb79e88b74138dd6cf919551dc661f7e571b78069b61bed9f5c12cc77c6ad\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"77bf955798d4e67da2f877931216008c79f97a5788167e8bbb239b5f94ff13508c40c18604f29220efa7c79756f1a2ff\",\n \"stream_name\": \"tmpb146pf1q\",\n \"streaming_url\": \"http://localhost:5280/stream/5b99f91996841d06c64c7f0aa35aa3e3e9dfb79e88b74138dd6cf919551dc661f7e571b78069b61bed9f5c12cc77c6ad\",\n \"suggested_file_name\": \"tmpb146pf1q\",\n \"timestamp\": 1630567677,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"7eeb2d9282379aed3b0a1bbff4d913ad7c3b656afc602b2f0570131b5dca34c3\",\n \"uploading_to_reflector\": false,\n \"written_bytes\": 11\n }\n}"
}
]
},
{
"name": "publish",
"description": "Create or replace a stream claim at a given name (use 'stream create/update' for more control).",
"arguments": [
{
"name": "name",
"type": "str",
"description": "name of the content (can only consist of a-z A-Z 0-9 and -(dash))",
"is_required": true
},
{
"name": "bid",
"type": "decimal",
"description": "amount to back the claim",
"is_required": false
},
{
"name": "file_path",
"type": "str",
"description": "path to file to be associated with name.",
"is_required": false
},
{
"name": "file_name",
"type": "str",
"description": "name of file to be associated with stream.",
"is_required": false
},
{
"name": "file_hash",
"type": "str",
"description": "hash of file to be associated with stream.",
"is_required": false
},
{
"name": "validate_file",
"type": "bool",
"description": "validate that the video container and encodings match common web browser support or that optimization succeeds if specified. FFmpeg is required",
"is_required": false
},
{
"name": "optimize_file",
"type": "bool",
"description": "transcode the video & audio if necessary to ensure common web browser support. FFmpeg is required",
"is_required": false
},
{
"name": "fee_currency",
"type": "string",
"description": "specify fee currency",
"is_required": false
},
{
"name": "fee_amount",
"type": "decimal",
"description": "content download fee",
"is_required": false
},
{
"name": "fee_address",
"type": "str",
"description": "address where to send fee payments, will use value from --claim_address if not provided",
"is_required": false
},
{
"name": "title",
"type": "str",
"description": "title of the publication",
"is_required": false
},
{
"name": "description",
"type": "str",
"description": "description of the publication",
"is_required": false
},
{
"name": "author",
"type": "str",
"description": "author of the publication. The usage for this field is not the same as for channels. The author field is used to credit an author who is not the publisher and is not represented by the channel. For example, a pdf file of 'The Odyssey' has an author of 'Homer' but may by published to a channel such as '@classics', or to no channel at all",
"is_required": false
},
{
"name": "tags",
"type": "list",
"description": "add content tags",
"is_required": false
},
{
"name": "languages",
"type": "list",
"description": "languages used by the channel, using RFC 5646 format, eg: for English `--languages=en` for Spanish (Spain) `--languages=es-ES` for Spanish (Mexican) `--languages=es-MX` for Chinese (Simplified) `--languages=zh-Hans` for Chinese (Traditional) `--languages=zh-Hant`",
"is_required": false
},
{
"name": "locations",
"type": "list",
"description": "locations relevant to the stream, consisting of 2 letter `country` code and a `state`, `city` and a postal `code` along with a `latitude` and `longitude`. for JSON RPC: pass a dictionary with aforementioned attributes as keys, eg: ... \"locations\": [{'country': 'US', 'state': 'NH'}] ... for command line: pass a colon delimited list with values in the following order: \"COUNTRY:STATE:CITY:CODE:LATITUDE:LONGITUDE\" making sure to include colon for blank values, for example to provide only the city: ... --locations=\"::Manchester\" with all values set: ... --locations=\"US:NH:Manchester:03101:42.990605:-71.460989\" optionally, you can just pass the \"LATITUDE:LONGITUDE\": ... --locations=\"42.990605:-71.460989\" finally, you can also pass JSON string of dictionary on the command line as you would via JSON RPC ... --locations=\"{'country': 'US', 'state': 'NH'}\"",
"is_required": false
},
{
"name": "license",
"type": "str",
"description": "publication license",
"is_required": false
},
{
"name": "license_url",
"type": "str",
"description": "publication license url",
"is_required": false
},
{
"name": "thumbnail_url",
"type": "str",
"description": "thumbnail url",
"is_required": false
},
{
"name": "release_time",
"type": "int",
"description": "original public release of content, seconds since UNIX epoch",
"is_required": false
},
{
"name": "width",
"type": "int",
"description": "image/video width, automatically calculated from media file",
"is_required": false
},
{
"name": "height",
"type": "int",
"description": "image/video height, automatically calculated from media file",
"is_required": false
},
{
"name": "duration",
"type": "int",
"description": "audio/video duration in seconds, automatically calculated",
"is_required": false
},
{
"name": "sd_hash",
"type": "str",
"description": "sd_hash of stream",
"is_required": false
},
{
"name": "channel_id",
"type": "str",
"description": "claim id of the publisher channel",
"is_required": false
},
{
"name": "channel_name",
"type": "str",
"description": "name of publisher channel",
"is_required": false
},
{
"name": "channel_account_id",
"type": "str",
"description": "one or more account ids for accounts to look in for channel certificates, defaults to all accounts.",
"is_required": false
},
{
"name": "account_id",
"type": "str",
"description": "account to use for holding the transaction",
"is_required": false
},
{
"name": "wallet_id",
"type": "str",
"description": "restrict operation to specific wallet",
"is_required": false
},
{
"name": "funding_account_ids",
"type": "list",
"description": "ids of accounts to fund this transaction",
"is_required": false
},
{
"name": "claim_address",
"type": "str",
"description": "address where the claim is sent to, if not specified it will be determined automatically from the account",
"is_required": false
},
{
"name": "preview",
"type": "bool",
"description": "do not broadcast the transaction",
"is_required": false
},
{
"name": "blocking",
"type": "bool",
"description": "wait until transaction is in mempool",
"is_required": false
}
],
"returns": " {\n \"txid\": \"hash of transaction in hex\",\n \"height\": \"block where transaction was recorded\",\n \"inputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_received\": \"true if txo was sent from external account to this account\",\n \"is_spent\": \"true if txo is spent\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'purchase'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim', 'support' or 'purchase', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"claim\": \"for purchase outputs only, metadata of purchased claim\",\n \"reposted_claim\": \"for repost claims only, metadata of claim being reposted\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\",\n \"purchase_receipt\": \"metadata for the purchase transaction associated with this claim\"\n }\n ],\n \"outputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_received\": \"true if txo was sent from external account to this account\",\n \"is_spent\": \"true if txo is spent\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'purchase'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim', 'support' or 'purchase', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"claim\": \"for purchase outputs only, metadata of purchased claim\",\n \"reposted_claim\": \"for repost claims only, metadata of claim being reposted\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\",\n \"purchase_receipt\": \"metadata for the purchase transaction associated with this claim\"\n }\n ],\n \"total_input\": \"sum of inputs as a decimal\",\n \"total_output\": \"sum of outputs, sans fee, as a decimal\",\n \"total_fee\": \"fee amount\",\n \"hex\": \"entire transaction encoded in hex\"\n }",
"examples": [
{
"title": "Publish a file",
"curl": "curl -d'{\"method\": \"publish\", \"params\": {\"name\": \"a-new-stream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp03r7_9ca\", \"validate_file\": false, \"optimize_file\": false, \"tags\": [], \"languages\": [], \"locations\": [], \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet publish a-new-stream --bid=1.0 --file_path=/tmp/tmp03r7_9ca",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"publish\", \"params\": {\"name\": \"a-new-stream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp03r7_9ca\", \"validate_file\": false, \"optimize_file\": false, \"tags\": [], \"languages\": [], \"locations\": [], \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001b765c49b00e0a553b516a41e94bcf6c38abfc705ed63736cf0c0e561698f2454010000006b483045022100c4f1270fc5a84e8a6f0bffad6440aa1b23b90e83d970b6cc60cf2398b2c762ae0220120a1226520a2d66843caa3b7c0a1d2779a8e5a98d069274b1e5c0fd8cbf3b9101210260bd481afc7f3eb2632d36de0ce39e50886e0682a7acb658c5a091a8cffb6270ffffffff0200e1f50500000000bfb50c612d6e65772d73747265616d4c94000a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d70303372375f396361180b22186170706c69636174696f6e2f6f637465742d73747265616d3230f9b1769c0e89beda641ec305c1065103a5b9d4dbf8262813431628e9703a2fe7542bc00d4edae17cb51c902b63b019e16d7576a914cd674ff84ce88a3671d5d9a946f883497d50c3aa88ac54826311000000001976a91427cf3fd6f52023fbf8776551641cf0ca8c449f4788ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mtm2gHnthSQ2n61dnJSeZCd873eHByQQ8r\",\n \"amount\": \"3.941448\",\n \"confirmations\": 3,\n \"height\": 217,\n \"nout\": 1,\n \"timestamp\": 1630567677,\n \"txid\": \"54248f6961e5c0f06c7363ed05c7bf8ac3f6bc941ea416b553a5e0009bc465b7\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mzF2aecxjjueNYMHUCipNAzZ7NNAtLv4Nc\",\n \"amount\": \"1.0\",\n \"claim_id\": \"75d6cf604b30fa292603bf2b3686d1bfd3f149cf\",\n \"claim_op\": \"create\",\n \"confirmations\": -2,\n \"height\": -2,\n \"meta\": {},\n \"name\": \"a-new-stream\",\n \"normalized_name\": \"a-new-stream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://a-new-stream#75d6cf604b30fa292603bf2b3686d1bfd3f149cf\",\n \"timestamp\": null,\n \"txid\": \"06c1465e2e68fda3d6efb5d6e209e07d3ee1dd2e3ad18d49bc926c3e241ff934\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp03r7_9ca\",\n \"sd_hash\": \"f9b1769c0e89beda641ec305c1065103a5b9d4dbf8262813431628e9703a2fe7542bc00d4edae17cb51c902b63b019e1\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mj9SvUTwe82GnSov4HupzJSK12zx8qVZcM\",\n \"amount\": \"2.917341\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"06c1465e2e68fda3d6efb5d6e209e07d3ee1dd2e3ad18d49bc926c3e241ff934\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.024107\",\n \"total_input\": \"3.941448\",\n \"total_output\": \"3.917341\",\n \"txid\": \"06c1465e2e68fda3d6efb5d6e209e07d3ee1dd2e3ad18d49bc926c3e241ff934\"\n }\n}"
}
]
},
{
"name": "resolve",
"description": "Get the claim that a URL refers to.",
"arguments": [
{
"name": "urls",
"type": "str, list",
"description": "one or more urls to resolve",
"is_required": false
},
{
"name": "wallet_id",
"type": "str",
"description": "wallet to check for claim purchase receipts",
"is_required": false
},
{
"name": "new_sdk_server",
"type": "str",
"description": "URL of the new SDK server (EXPERIMENTAL)",
"is_required": false
},
{
"name": "include_purchase_receipt",
"type": "bool",
"description": "lookup and include a receipt if this wallet has purchased the claim being resolved",
"is_required": false
},
{
"name": "include_is_my_output",
"type": "bool",
"description": "lookup and include a boolean indicating if claim being resolved is yours",
"is_required": false
},
{
"name": "include_sent_supports",
"type": "bool",
"description": "lookup and sum the total amount of supports you've made to this claim",
"is_required": false
},
{
"name": "include_sent_tips",
"type": "bool",
"description": "lookup and sum the total amount of tips you've made to this claim (only makes sense when claim is not yours)",
"is_required": false
},
{
"name": "include_received_tips",
"type": "bool",
"description": "lookup and sum the total amount of tips you've received to this claim (only makes sense when claim is yours)",
"is_required": false
}
],
"returns": "Dictionary of results, keyed by url\n '<url>': {\n If a resolution error occurs:\n 'error': Error message\n\n If the url resolves to a channel or a claim in a channel:\n 'certificate': {\n 'address': (str) claim address,\n 'amount': (float) claim amount,\n 'effective_amount': (float) claim amount including supports,\n 'claim_id': (str) claim id,\n 'claim_sequence': (int) claim sequence number (or -1 if unknown),\n 'decoded_claim': (bool) whether or not the claim value was decoded,\n 'height': (int) claim height,\n 'confirmations': (int) claim depth,\n 'timestamp': (int) timestamp of the block that included this claim tx,\n 'has_signature': (bool) included if decoded_claim\n 'name': (str) claim name,\n 'permanent_url': (str) permanent url of the certificate claim,\n 'supports: (list) list of supports [{'txid': (str) txid,\n 'nout': (int) nout,\n 'amount': (float) amount}],\n 'txid': (str) claim txid,\n 'nout': (str) claim nout,\n 'signature_is_valid': (bool), included if has_signature,\n 'value': ClaimDict if decoded, otherwise hex string\n }\n\n If the url resolves to a channel:\n 'claims_in_channel': (int) number of claims in the channel,\n\n If the url resolves to a claim:\n 'claim': {\n 'address': (str) claim address,\n 'amount': (float) claim amount,\n 'effective_amount': (float) claim amount including supports,\n 'claim_id': (str) claim id,\n 'claim_sequence': (int) claim sequence number (or -1 if unknown),\n 'decoded_claim': (bool) whether or not the claim value was decoded,\n 'height': (int) claim height,\n 'depth': (int) claim depth,\n 'has_signature': (bool) included if decoded_claim\n 'name': (str) claim name,\n 'permanent_url': (str) permanent url of the claim,\n 'channel_name': (str) channel name if claim is in a channel\n 'supports: (list) list of supports [{'txid': (str) txid,\n 'nout': (int) nout,\n 'amount': (float) amount}]\n 'txid': (str) claim txid,\n 'nout': (str) claim nout,\n 'signature_is_valid': (bool), included if has_signature,\n 'value': ClaimDict if decoded, otherwise hex string\n }\n }",
"examples": [
{
"title": "Resolve a claim",
"curl": "curl -d'{\"method\": \"resolve\", \"params\": {\"urls\": [\"astream#138446450b727414a2b9e9529341dc621a9e5470\"], \"include_purchase_receipt\": false, \"include_is_my_output\": false, \"include_sent_supports\": false, \"include_sent_tips\": false, \"include_received_tips\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet resolve astream#138446450b727414a2b9e9529341dc621a9e5470",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"resolve\", \"params\": {\"urls\": [\"astream#138446450b727414a2b9e9529341dc621a9e5470\"], \"include_purchase_receipt\": false, \"include_is_my_output\": false, \"include_sent_supports\": false, \"include_sent_tips\": false, \"include_received_tips\": false}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"astream#138446450b727414a2b9e9529341dc621a9e5470\": {\n \"address\": \"mpSzreoT2ukyzd3c5h2Sf9vEedb6MvHX59\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#8/astream#1\",\n \"claim_id\": \"138446450b727414a2b9e9529341dc621a9e5470\",\n \"claim_op\": \"update\",\n \"confirmations\": 4,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"meta\": {\n \"activation_height\": 213,\n \"creation_height\": 213,\n \"creation_timestamp\": 1630567677,\n \"effective_amount\": \"1.0\",\n \"expiration_height\": 263187,\n \"is_controlling\": true,\n \"reposted\": 0,\n \"support_amount\": \"0.0\",\n \"take_over_height\": 213,\n \"trending_global\": 0.0,\n \"trending_group\": 0,\n \"trending_local\": 0.0,\n \"trending_mixed\": 0.0\n },\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#138446450b727414a2b9e9529341dc621a9e5470\",\n \"short_url\": \"lbry://astream#1\",\n \"signing_channel\": {\n \"address\": \"n1AzRGYFcKbdXVAD8WnM2x8kT3HTr7L9f7\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#8\",\n \"claim_id\": \"815f8d597ce588c141b001d05f3240b3ef0bf370\",\n \"claim_op\": \"update\",\n \"confirmations\": 8,\n \"has_signing_key\": false,\n \"height\": 210,\n \"meta\": {\n \"activation_height\": 209,\n \"claims_in_channel\": 2,\n \"creation_height\": 209,\n \"creation_timestamp\": 1630567676,\n \"effective_amount\": \"1.0\",\n \"expiration_height\": 263183,\n \"is_controlling\": true,\n \"reposted\": 0,\n \"support_amount\": \"0.0\",\n \"take_over_height\": 209,\n \"trending_global\": 0.0,\n \"trending_group\": 0,\n \"trending_local\": 0.0,\n \"trending_mixed\": 0.0\n },\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#815f8d597ce588c141b001d05f3240b3ef0bf370\",\n \"short_url\": \"lbry://@channel#8\",\n \"timestamp\": 1630567676,\n \"txid\": \"4e4163b7541635b598f655dc51ef2b944547c2b6a494dc491a89c280ca153490\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004d423b3b41984ef96038ca03278bdcfd3147f88fa3054d0706a2e8c8e8064dee8dcef501042c1ec2ed062565f3119613ca475fd85f958d5ccc9e3c39beb4fc7a6\",\n \"public_key_id\": \"mhz4rWgbySXKByVvkfkhRGGGbmQgy59v2Z\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1630567677,\n \"txid\": \"7eeb2d9282379aed3b0a1bbff4d913ad7c3b656afc602b2f0570131b5dca34c3\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpb146pf1q\",\n \"sd_hash\": \"5b99f91996841d06c64c7f0aa35aa3e3e9dfb79e88b74138dd6cf919551dc661f7e571b78069b61bed9f5c12cc77c6ad\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n }\n}"
}
]
},
{
"name": "routing_table_get",
"description": "Get DHT routing information",
"arguments": [],
"returns": "(dict) dictionary containing routing and peer information\n {\n \"buckets\": {\n <bucket index>: [\n {\n \"address\": (str) peer address,\n \"udp_port\": (int) peer udp port,\n \"tcp_port\": (int) peer tcp port,\n \"node_id\": (str) peer node id,\n }\n ]\n },\n \"node_id\": (str) the local dht node id\n }",
"examples": []
},
{
"name": "status",
"description": "Get daemon status",
"arguments": [],
"returns": "(dict) lbrynet-daemon status\n {\n 'installation_id': (str) installation id - base58,\n 'is_running': (bool),\n 'skipped_components': (list) [names of skipped components (str)],\n 'startup_status': { Does not include components which have been skipped\n 'blob_manager': (bool),\n 'blockchain_headers': (bool),\n 'database': (bool),\n 'dht': (bool),\n 'exchange_rate_manager': (bool),\n 'hash_announcer': (bool),\n 'peer_protocol_server': (bool),\n 'file_manager': (bool),\n 'libtorrent_component': (bool),\n 'upnp': (bool),\n 'wallet': (bool),\n },\n 'connection_status': {\n 'code': (str) connection status code,\n 'message': (str) connection status message\n },\n 'blockchain_headers': {\n 'downloading_headers': (bool),\n 'download_progress': (float) 0-100.0\n },\n 'wallet': {\n 'connected': (str) host and port of the connected spv server,\n 'blocks': (int) local blockchain height,\n 'blocks_behind': (int) remote_height - local_height,\n 'best_blockhash': (str) block hash of most recent block,\n 'is_encrypted': (bool),\n 'is_locked': (bool),\n 'connected_servers': (list) [\n {\n 'host': (str) server hostname,\n 'port': (int) server port,\n 'latency': (int) milliseconds\n }\n ],\n },\n 'libtorrent_component': {\n 'running': (bool) libtorrent was detected and started successfully,\n },\n 'dht': {\n 'node_id': (str) lbry dht node id - hex encoded,\n 'peers_in_routing_table': (int) the number of peers in the routing table,\n },\n 'blob_manager': {\n 'finished_blobs': (int) number of finished blobs in the blob manager,\n 'connections': {\n 'incoming_bps': {\n <source ip and tcp port>: (int) bytes per second received,\n },\n 'outgoing_bps': {\n <destination ip and tcp port>: (int) bytes per second sent,\n },\n 'total_outgoing_mps': (float) megabytes per second sent,\n 'total_incoming_mps': (float) megabytes per second received,\n 'time': (float) timestamp\n }\n },\n 'hash_announcer': {\n 'announce_queue_size': (int) number of blobs currently queued to be announced\n },\n 'file_manager': {\n 'managed_files': (int) count of files in the stream manager,\n },\n 'upnp': {\n 'aioupnp_version': (str),\n 'redirects': {\n <TCP | UDP>: (int) external_port,\n },\n 'gateway': (str) manufacturer and model,\n 'dht_redirect_set': (bool),\n 'peer_redirect_set': (bool),\n 'external_ip': (str) external ip address,\n }\n }",
"examples": [
{
"title": "Get status",
"curl": "curl -d'{\"method\": \"status\", \"params\": {}}' http://localhost:5279/",
"lbrynet": "lbrynet status",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"status\", \"params\": {}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"blob_manager\": {\n \"connections\": {\n \"incoming_bps\": {},\n \"max_incoming_mbs\": 0.0,\n \"max_outgoing_mbs\": 0.0,\n \"outgoing_bps\": {},\n \"total_incoming_mbs\": 0.0,\n \"total_outgoing_mbs\": 0.0,\n \"total_received\": 0,\n \"total_sent\": 0\n },\n \"finished_blobs\": 0\n },\n \"disk_space\": {\n \"running\": true,\n \"space_used\": \"0\"\n },\n \"ffmpeg_status\": {\n \"analyze_audio_volume\": true,\n \"available\": true,\n \"which\": \"/usr/bin/ffmpeg\"\n },\n \"file_manager\": {\n \"managed_files\": 0\n },\n \"installation_id\": \"sefddTD9i1NVkZqNcjEFbL6PRRGmBXUfdGe3he54UKrFjrLUepzqGwtVbY5rXhw2j\",\n \"is_running\": true,\n \"skipped_components\": [\n \"dht\",\n \"upnp\",\n \"hash_announcer\",\n \"peer_protocol_server\",\n \"libtorrent_component\"\n ],\n \"startup_status\": {\n \"blob_manager\": true,\n \"database\": true,\n \"disk_space\": true,\n \"exchange_rate_manager\": true,\n \"file_manager\": true,\n \"wallet\": true,\n \"wallet_server_payments\": true\n },\n \"wallet\": {\n \"available_servers\": 1,\n \"best_blockhash\": \"1af1c53a3386a4b30141b631129c83c7a6ae052e587fb3b8c717d603810600eb\",\n \"blocks\": 206,\n \"blocks_behind\": 0,\n \"connected\": \"localhost:50002\",\n \"connected_features\": {\n \"daily_fee\": \"0\",\n \"description\": \"\",\n \"donation_address\": \"\",\n \"genesis_hash\": \"6e3fcf1299d4ec5d79c3a4c91d624a4acf9e2e173d95a1a0504f677669687556\",\n \"hash_function\": \"sha256\",\n \"hosts\": {},\n \"payment_address\": \"\",\n \"protocol_max\": \"0.199.0\",\n \"protocol_min\": \"0.54.0\",\n \"pruning\": null,\n \"server_version\": \"0.102.0\",\n \"trending_algorithm\": \"zscore\"\n },\n \"headers_synchronization_progress\": 100,\n \"known_servers\": 0,\n \"servers\": [\n {\n \"availability\": true,\n \"host\": \"localhost\",\n \"latency\": 0.004395185000248603,\n \"port\": 50002\n }\n ]\n },\n \"wallet_server_payments\": {\n \"max_fee\": \"0.0\",\n \"running\": false\n }\n }\n}"
}
]
},
{
"name": "stop",
"description": "Stop lbrynet API server.",
"arguments": [],
"returns": "(string) Shutdown message",
"examples": []
},
{
"name": "version",
"description": "Get lbrynet API server version information",
"arguments": [],
"returns": "(dict) Dictionary of lbry version information\n {\n 'processor': (str) processor type,\n 'python_version': (str) python version,\n 'platform': (str) platform string,\n 'os_release': (str) os release string,\n 'os_system': (str) os name,\n 'version': (str) lbrynet version,\n 'build': (str) \"dev\" | \"qa\" | \"rc\" | \"release\",\n }",
"examples": [
{
"title": "Get version",
"curl": "curl -d'{\"method\": \"version\", \"params\": {}}' http://localhost:5279/",
"lbrynet": "lbrynet version",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"version\", \"params\": {}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"build\": \"dev\",\n \"desktop\": \"ubuntu:GNOME\",\n \"distro\": {\n \"codename\": \"focal\",\n \"id\": \"ubuntu\",\n \"like\": \"debian\",\n \"version\": \"20.04\",\n \"version_parts\": {\n \"build_number\": \"\",\n \"major\": \"20\",\n \"minor\": \"04\"\n }\n },\n \"lbrynet_version\": \"0.102.0\",\n \"os_release\": \"5.11.0-27-generic\",\n \"os_system\": \"Linux\",\n \"platform\": \"Linux-5.11.0-27-generic-x86_64-with-debian-bullseye-sid\",\n \"processor\": \"x86_64\",\n \"python_version\": \"3.7.10\",\n \"version\": \"0.102.0\"\n }\n}"
}
]
}
]
},
"account": {
"doc": "Create, modify and inspect wallet accounts.",
"commands": [
{
"name": "account_add",
"description": "Add a previously created account from a seed, private key or public key (read-only).\nSpecify --single_key for single address or vanity address accounts.",
"arguments": [
{
"name": "account_name",
"type": "str",
"description": "name of the account to add",
"is_required": true
},
{
"name": "seed",
"type": "str",
"description": "seed to generate new account from",
"is_required": false
},
{
"name": "private_key",
"type": "str",
"description": "private key for new account",
"is_required": false
},
{
"name": "public_key",
"type": "str",
"description": "public key for new account",
"is_required": false
},
{
"name": "single_key",
"type": "bool",
"description": "create single key account, default is multi-key",
"is_required": false
},
{
"name": "wallet_id",
"type": "str",
"description": "restrict operation to specific wallet",
"is_required": false
}
],
"returns": " {\n \"id\": \"account_id\",\n \"is_default\": \"this account is used by default\",\n \"ledger\": \"name of crypto currency and network\",\n \"name\": \"optional account name\",\n \"seed\": \"human friendly words from which account can be recreated\",\n \"encrypted\": \"if account is encrypted\",\n \"private_key\": \"extended private key\",\n \"public_key\": \"extended public key\",\n \"address_generator\": \"settings for generating addresses\",\n \"modified_on\": \"date of last modification to account settings\"\n }",
"examples": [
{
"title": "Add an account from seed",
"curl": "curl -d'{\"method\": \"account_add\", \"params\": {\"account_name\": \"new account\", \"seed\": \"boost property since welcome armed arch goddess correct stick traffic pyramid glory\", \"single_key\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet account add \"new account\" --seed=\"boost property since welcome armed arch goddess correct stick traffic pyramid glory\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_add\", \"params\": {\"account_name\": \"new account\", \"seed\": \"boost property since welcome armed arch goddess correct stick traffic pyramid glory\", \"single_key\": false}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"address_generator\": {\n \"change\": {\n \"gap\": 6,\n \"maximum_uses_per_address\": 1\n },\n \"name\": \"deterministic-chain\",\n \"receiving\": {\n \"gap\": 20,\n \"maximum_uses_per_address\": 1\n }\n },\n \"encrypted\": false,\n \"id\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1630567643,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPduGkPH4FUHQh6vCVc5PuD2t5148Qf3ds9oJ2b6MpGzKK6BD8QVWeYfkFPAqrEvtFXckYM7p83XaQGyaCiHFAi3hdUnfScwC\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XNJYGviqsh4ofwiRmQaonLUrHaAi5KSFzHYoDVBQTUwBGMQsNMBh3cvEAmp6uotNWBXa2kUJ3GiFHLyWEc7k1YtDkF7jGQW\",\n \"seed\": \"boost property since welcome armed arch goddess correct stick traffic pyramid glory\"\n }\n}"
}
]
},
{
"name": "account_balance",
"description": "Return the balance of an account",
"arguments": [
{
"name": "account_id",
"type": "str",
"description": "If provided only the balance for this account will be given. Otherwise default account.",
"is_required": false
},
{
"name": "wallet_id",
"type": "str",
"description": "balance for specific wallet",
"is_required": false
},
{
"name": "confirmations",
"type": "int",
"description": "Only include transactions with this many confirmed blocks.",
"is_required": false
}
],
"returns": "(decimal) amount of lbry credits in wallet",
"examples": [
{
"title": "Get default account balance",
"curl": "curl -d'{\"method\": \"account_balance\", \"params\": {}}' http://localhost:5279/",
"lbrynet": "lbrynet account balance",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_balance\", \"params\": {}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"available\": \"7.999876\",\n \"reserved\": \"0.0\",\n \"reserved_subtotals\": {\n \"claims\": \"0.0\",\n \"supports\": \"0.0\",\n \"tips\": \"0.0\"\n },\n \"total\": \"7.999876\"\n }\n}"
},
{
"title": "Get balance for specific account by id",
"curl": "curl -d'{\"method\": \"account_balance\", \"params\": {\"account_id\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\"}}' http://localhost:5279/",
"lbrynet": "lbrynet account balance \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_balance\", \"params\": {\"account_id\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"available\": \"2.0\",\n \"reserved\": \"0.0\",\n \"reserved_subtotals\": {\n \"claims\": \"0.0\",\n \"supports\": \"0.0\",\n \"tips\": \"0.0\"\n },\n \"total\": \"2.0\"\n }\n}"
}
]
},
{
"name": "account_create",
"description": "Create a new account. Specify --single_key if you want to use\nthe same address for all transactions (not recommended).",
"arguments": [
{
"name": "account_name",
"type": "str",
"description": "name of the account to create",
"is_required": true
},
{
"name": "single_key",
"type": "bool",
"description": "create single key account, default is multi-key",
"is_required": false
},
{
"name": "wallet_id",
"type": "str",
"description": "restrict operation to specific wallet",
"is_required": false
}
],
"returns": " {\n \"id\": \"account_id\",\n \"is_default\": \"this account is used by default\",\n \"ledger\": \"name of crypto currency and network\",\n \"name\": \"optional account name\",\n \"seed\": \"human friendly words from which account can be recreated\",\n \"encrypted\": \"if account is encrypted\",\n \"private_key\": \"extended private key\",\n \"public_key\": \"extended public key\",\n \"address_generator\": \"settings for generating addresses\",\n \"modified_on\": \"date of last modification to account settings\"\n }",
"examples": [
{
"title": "Create an account",
"curl": "curl -d'{\"method\": \"account_create\", \"params\": {\"account_name\": \"generated account\", \"single_key\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet account create \"generated account\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_create\", \"params\": {\"account_name\": \"generated account\", \"single_key\": false}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"address_generator\": {\n \"change\": {\n \"gap\": 6,\n \"maximum_uses_per_address\": 1\n },\n \"name\": \"deterministic-chain\",\n \"receiving\": {\n \"gap\": 20,\n \"maximum_uses_per_address\": 1\n }\n },\n \"encrypted\": false,\n \"id\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1630567643,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPduGkPH4FUHQh6vCVc5PuD2t5148Qf3ds9oJ2b6MpGzKK6BD8QVWeYfkFPAqrEvtFXckYM7p83XaQGyaCiHFAi3hdUnfScwC\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XNJYGviqsh4ofwiRmQaonLUrHaAi5KSFzHYoDVBQTUwBGMQsNMBh3cvEAmp6uotNWBXa2kUJ3GiFHLyWEc7k1YtDkF7jGQW\",\n \"seed\": \"boost property since welcome armed arch goddess correct stick traffic pyramid glory\"\n }\n}"
}
]
},
{
"name": "account_fund",
"description": "Transfer some amount (or --everything) to an account from another\naccount (can be the same account). Amounts are interpreted as LBC.\nYou can also spread the transfer across a number of --outputs (cannot\nbe used together with --everything).",
"arguments": [
{
"name": "to_account",
"type": "str",
"description": "send to this account",
"is_required": false
},
{
"name": "from_account",
"type": "str",
"description": "spend from this account",
"is_required": false
},
{
"name": "amount",
"type": "str",
"description": "the amount to transfer lbc",
"is_required": true
},
{
"name": "everything",
"type": "bool",
"description": "transfer everything (excluding claims), default: false.",
"is_required": false
},
{
"name": "outputs",
"type": "int",
"description": "split payment across many outputs, default: 1.",
"is_required": false
},
{
"name": "wallet_id",
"type": "str",
"description": "limit operation to specific wallet.",
"is_required": false
},
{
"name": "broadcast",
"type": "bool",
"description": "actually broadcast the transaction, default: false.",
"is_required": false
}
],
"returns": " {\n \"txid\": \"hash of transaction in hex\",\n \"height\": \"block where transaction was recorded\",\n \"inputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_received\": \"true if txo was sent from external account to this account\",\n \"is_spent\": \"true if txo is spent\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'purchase'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim', 'support' or 'purchase', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"claim\": \"for purchase outputs only, metadata of purchased claim\",\n \"reposted_claim\": \"for repost claims only, metadata of claim being reposted\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\",\n \"purchase_receipt\": \"metadata for the purchase transaction associated with this claim\"\n }\n ],\n \"outputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_received\": \"true if txo was sent from external account to this account\",\n \"is_spent\": \"true if txo is spent\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'purchase'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim', 'support' or 'purchase', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"claim\": \"for purchase outputs only, metadata of purchased claim\",\n \"reposted_claim\": \"for repost claims only, metadata of claim being reposted\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\",\n \"purchase_receipt\": \"metadata for the purchase transaction associated with this claim\"\n }\n ],\n \"total_input\": \"sum of inputs as a decimal\",\n \"total_output\": \"sum of outputs, sans fee, as a decimal\",\n \"total_fee\": \"fee amount\",\n \"hex\": \"entire transaction encoded in hex\"\n }",
"examples": [
{
"title": "Transfer 2 LBC from default account to specific account",
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"to_account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}' http://localhost:5279/",
"lbrynet": "lbrynet account fund --to_account=\"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\" --amount=2.0 --broadcast",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001e9f00a343869c4b4481e652594b6f8eae760887301e1567780c4270bd30019e2010000006a47304402202d1e959145e5dc3ec42ee86fb60722c03a001e8ec11d8394752bd1695ca5279f02202c714f3d40917898a862e9fae707e80666463e393c248ada114abe1f892f86e201210267f2c1b36491d9597d967005cf254782bb5887988776e7c7e21ab4377a2d7d87ffffffff0200c2eb0b000000001976a914a858150692010ad17ca54a100925effc55d0bee888ac90d7ae2f000000001976a914948a164bd4049fac04830906efab835cbd41ec5888ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mhJhtMKzFMs7iFKnGUHUQZryjXad4v3Fi5\",\n \"amount\": \"10.0\",\n \"confirmations\": 6,\n \"height\": 201,\n \"nout\": 1,\n \"timestamp\": 1630567675,\n \"txid\": \"e21900d30b27c4807756e101738860e7eaf8b69425651e48b4c46938340af0e9\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mvs5LLQGfgY49FptN2H1dVWDxXAetAXDY7\",\n \"amount\": \"2.0\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"f8283696d48f8affcf1b5d3b3166b8f30274069427c95507be9f735e24ce67ac\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mu4MiuQqZpiH9UyFtjjRrTsE8EQMxUfzqR\",\n \"amount\": \"7.999876\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"f8283696d48f8affcf1b5d3b3166b8f30274069427c95507be9f735e24ce67ac\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000124\",\n \"total_input\": \"10.0\",\n \"total_output\": \"9.999876\",\n \"txid\": \"f8283696d48f8affcf1b5d3b3166b8f30274069427c95507be9f735e24ce67ac\"\n }\n}"
},
{
"title": "Spread LBC between multiple addresses",
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"to_account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\", \"from_account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}' http://localhost:5279/",
"lbrynet": "lbrynet account fund --to_account=\"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\" --from_account=\"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\" --amount=1.5 --outputs=2 --broadcast",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\", \"from_account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001ac67ce245e739fbe0755c92794067402f3b866313b5d1bcfff8a8fd4963628f8000000006a473044022022f87e8de1c4cd7209976d90ec1de48c67558402144446f16b4de58992fd4180022013380abab11bfb497de0a304150ead3924403287f6c984e7c0350f7d303179ef012103f867e609a6ec6841b477b00656003f603c6789517b921c7723ffaa0ebcf586d5ffffffff03c0687804000000001976a914a858150692010ad17ca54a100925effc55d0bee888acc0687804000000001976a914a858150692010ad17ca54a100925effc55d0bee888ac6cb9fa02000000001976a9148d6dce2e91024e46798fac5a083b39d89ce36a5388ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mvs5LLQGfgY49FptN2H1dVWDxXAetAXDY7\",\n \"amount\": \"2.0\",\n \"confirmations\": 1,\n \"height\": 207,\n \"nout\": 0,\n \"timestamp\": 1630567676,\n \"txid\": \"f8283696d48f8affcf1b5d3b3166b8f30274069427c95507be9f735e24ce67ac\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mvs5LLQGfgY49FptN2H1dVWDxXAetAXDY7\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"d25a87fc3491a4809ab0ad329788b90a4ba600ee33bc58c3205789842d9c245e\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mvs5LLQGfgY49FptN2H1dVWDxXAetAXDY7\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"d25a87fc3491a4809ab0ad329788b90a4ba600ee33bc58c3205789842d9c245e\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mtQm7WpSZYAC5Wmt31xWM6uvYd8QBtea2B\",\n \"amount\": \"0.499859\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 2,\n \"timestamp\": null,\n \"txid\": \"d25a87fc3491a4809ab0ad329788b90a4ba600ee33bc58c3205789842d9c245e\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000141\",\n \"total_input\": \"2.0\",\n \"total_output\": \"1.999859\",\n \"txid\": \"d25a87fc3491a4809ab0ad329788b90a4ba600ee33bc58c3205789842d9c245e\"\n }\n}"
},
{
"title": "Transfer all LBC to a specified account",
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"from_account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\", \"everything\": true, \"broadcast\": true}}' http://localhost:5279/",
"lbrynet": "lbrynet account fund --from_account=\"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\" --everything --broadcast",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"from_account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\", \"everything\": true, \"broadcast\": true}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000035e249c2d84895720c358bc33ee00a64b0ab9889732adb09a80a49134fc875ad2000000006a473044022074ac46e3d6b794b649bb229c1918f2124bea89da9b823e397e61f344e27e894b02206378546a40e1459b23c8a9f3cd07c3e18e5240a3a18cc9fd4f22ac5a965c1fb6012103f867e609a6ec6841b477b00656003f603c6789517b921c7723ffaa0ebcf586d5ffffffff5e249c2d84895720c358bc33ee00a64b0ab9889732adb09a80a49134fc875ad2010000006b483045022100f5e83245f943e62123e88cf38f2941158a20f37d4f02885d22a837b4bff66ee00220346a06c53326699cf3be01567537670e443485bb022fcb567631cf48f27e6e1d012103f867e609a6ec6841b477b00656003f603c6789517b921c7723ffaa0ebcf586d5ffffffff5e249c2d84895720c358bc33ee00a64b0ab9889732adb09a80a49134fc875ad2020000006b483045022100a1fb8e9e23ecfd29bed86e12b1a6ab977b930915f25b96e0e4b847ae6253d619022046206d189e59aa9806b810066ef26c9dd83dead212212bc35fc4101e03e6d39401210318857bbd3a2f61c04512dff77d4aac1db91eb9753d37fb7a8ddbdfbdd5c4beabffffffff015027eb0b000000001976a9145e10d78836b02121866dc204ea3e8617092e5bdd88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mvs5LLQGfgY49FptN2H1dVWDxXAetAXDY7\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"nout\": 0,\n \"timestamp\": 1630567676,\n \"txid\": \"d25a87fc3491a4809ab0ad329788b90a4ba600ee33bc58c3205789842d9c245e\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mvs5LLQGfgY49FptN2H1dVWDxXAetAXDY7\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"nout\": 1,\n \"timestamp\": 1630567676,\n \"txid\": \"d25a87fc3491a4809ab0ad329788b90a4ba600ee33bc58c3205789842d9c245e\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mtQm7WpSZYAC5Wmt31xWM6uvYd8QBtea2B\",\n \"amount\": \"0.499859\",\n \"confirmations\": 1,\n \"height\": 208,\n \"nout\": 2,\n \"timestamp\": 1630567676,\n \"txid\": \"d25a87fc3491a4809ab0ad329788b90a4ba600ee33bc58c3205789842d9c245e\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mp6KzHPSgp4DW57qGcKAWR1S48EvDxnot3\",\n \"amount\": \"1.999604\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"ec420a34acc98a91e82aa19c25c1396aacc10be80262de8177813be8f5285ec8\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000255\",\n \"total_input\": \"1.999859\",\n \"total_output\": \"1.999604\",\n \"txid\": \"ec420a34acc98a91e82aa19c25c1396aacc10be80262de8177813be8f5285ec8\"\n }\n}"
}
]
},
{
"name": "account_list",
"description": "List details of all of the accounts or a specific account.",
"arguments": [
{
"name": "account_id",
"type": "str",
"description": "If provided only the balance for this account will be given",
"is_required": false
},
{
"name": "wallet_id",
"type": "str",
"description": "accounts in specific wallet",
"is_required": false
},
{
"name": "confirmations",
"type": "int",
"description": "required confirmations (default: 0)",
"is_required": false
},
{
"name": "include_claims",
"type": "bool",
"description": "include claims, requires than a LBC account is specified (default: false)",
"is_required": false
},
{
"name": "show_seed",
"type": "bool",
"description": "show the seed for the account",
"is_required": false
},
{
"name": "page",
"type": "int",
"description": "page to return during paginating",
"is_required": false
},
{
"name": "page_size",
"type": "int",
"description": "number of items on page during pagination",
"is_required": false
}
],
"returns": " {\n \"page\": \"Page number of the current items.\",\n \"page_size\": \"Number of items to show on a page.\",\n \"total_pages\": \"Total number of pages.\",\n \"total_items\": \"Total number of items.\",\n \"items\": [\n {\n \"id\": \"account_id\",\n \"is_default\": \"this account is used by default\",\n \"ledger\": \"name of crypto currency and network\",\n \"name\": \"optional account name\",\n \"seed\": \"human friendly words from which account can be recreated\",\n \"encrypted\": \"if account is encrypted\",\n \"private_key\": \"extended private key\",\n \"public_key\": \"extended public key\",\n \"address_generator\": \"settings for generating addresses\",\n \"modified_on\": \"date of last modification to account settings\"\n }\n ]\n }",
"examples": [
{
"title": "List your accounts",
"curl": "curl -d'{\"method\": \"account_list\", \"params\": {\"include_claims\": false, \"show_seed\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet account list",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_list\", \"params\": {\"include_claims\": false, \"show_seed\": false}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address_generator\": {\n \"change\": {\n \"gap\": 6,\n \"maximum_uses_per_address\": 1\n },\n \"name\": \"deterministic-chain\",\n \"receiving\": {\n \"gap\": 20,\n \"maximum_uses_per_address\": 1\n }\n },\n \"certificates\": 0,\n \"coins\": 10.0,\n \"encrypted\": false,\n \"id\": \"mm5kqqENANLHxj2dhxJhs8zWiwdndbf2jM\",\n \"is_default\": true,\n \"ledger\": \"lbc_regtest\",\n \"name\": \"Account #mm5kqqENANLHxj2dhxJhs8zWiwdndbf2jM\",\n \"public_key\": \"tpubD6NzVbkrYhZ4Y27iMLaV6qbMCkraNnmt8HMmC3iSxSS61oTYHCJRz1YfzYtV2DUWvJDkvAzxnGye138VBr7FvDpUqdPK7Znf8TdhnfpAL1b\",\n \"satoshis\": 1000000000\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}"
}
]
},
{
"name": "account_max_address_gap",
"description": "Finds ranges of consecutive addresses that are unused and returns the length\nof the longest such range: for change and receiving address chains. This is\nuseful to figure out ideal values to set for 'receiving_gap' and 'change_gap'\naccount settings.",
"arguments": [
{
"name": "account_id",
"type": "str",
"description": "account for which to get max gaps",
"is_required": true
},
{
"name": "wallet_id",
"type": "str",
"description": "restrict operation to specific wallet",
"is_required": false
}
],
"returns": "(map) maximum gap for change and receiving addresses",
"examples": []
},
{
"name": "account_remove",
"description": "Remove an existing account.",
"arguments": [
{
"name": "account_id",
"type": "str",
"description": "id of the account to remove",
"is_required": true
},
{
"name": "wallet_id",
"type": "str",
"description": "restrict operation to specific wallet",
"is_required": false
}
],
"returns": " {\n \"id\": \"account_id\",\n \"is_default\": \"this account is used by default\",\n \"ledger\": \"name of crypto currency and network\",\n \"name\": \"optional account name\",\n \"seed\": \"human friendly words from which account can be recreated\",\n \"encrypted\": \"if account is encrypted\",\n \"private_key\": \"extended private key\",\n \"public_key\": \"extended public key\",\n \"address_generator\": \"settings for generating addresses\",\n \"modified_on\": \"date of last modification to account settings\"\n }",
"examples": [
{
"title": "Remove an account",
"curl": "curl -d'{\"method\": \"account_remove\", \"params\": {\"account_id\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\"}}' http://localhost:5279/",
"lbrynet": "lbrynet account remove mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_remove\", \"params\": {\"account_id\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"address_generator\": {\n \"change\": {\n \"gap\": 6,\n \"maximum_uses_per_address\": 1\n },\n \"name\": \"deterministic-chain\",\n \"receiving\": {\n \"gap\": 20,\n \"maximum_uses_per_address\": 1\n }\n },\n \"encrypted\": false,\n \"id\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1630567643,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPduGkPH4FUHQh6vCVc5PuD2t5148Qf3ds9oJ2b6MpGzKK6BD8QVWeYfkFPAqrEvtFXckYM7p83XaQGyaCiHFAi3hdUnfScwC\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XNJYGviqsh4ofwiRmQaonLUrHaAi5KSFzHYoDVBQTUwBGMQsNMBh3cvEAmp6uotNWBXa2kUJ3GiFHLyWEc7k1YtDkF7jGQW\",\n \"seed\": \"boost property since welcome armed arch goddess correct stick traffic pyramid glory\"\n }\n}"
}
]
},
{
"name": "account_send",
"description": "Send the same number of credits to multiple addresses from a specific account (or default account).",
"arguments": [
{
"name": "account_id",
"type": "str",
"description": "account to fund the transaction",
"is_required": false
},
{
"name": "wallet_id",
"type": "str",
"description": "restrict operation to specific wallet",
"is_required": false
},
{
"name": "preview",
"type": "bool",
"description": "do not broadcast the transaction",
"is_required": false
},
{
"name": "blocking",
"type": "bool",
"description": "wait until tx has synced",
"is_required": false
}
],
"returns": " {\n \"txid\": \"hash of transaction in hex\",\n \"height\": \"block where transaction was recorded\",\n \"inputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_received\": \"true if txo was sent from external account to this account\",\n \"is_spent\": \"true if txo is spent\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'purchase'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim', 'support' or 'purchase', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"claim\": \"for purchase outputs only, metadata of purchased claim\",\n \"reposted_claim\": \"for repost claims only, metadata of claim being reposted\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\",\n \"purchase_receipt\": \"metadata for the purchase transaction associated with this claim\"\n }\n ],\n \"outputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_received\": \"true if txo was sent from external account to this account\",\n \"is_spent\": \"true if txo is spent\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'purchase'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim', 'support' or 'purchase', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"claim\": \"for purchase outputs only, metadata of purchased claim\",\n \"reposted_claim\": \"for repost claims only, metadata of claim being reposted\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\",\n \"purchase_receipt\": \"metadata for the purchase transaction associated with this claim\"\n }\n ],\n \"total_input\": \"sum of inputs as a decimal\",\n \"total_output\": \"sum of outputs, sans fee, as a decimal\",\n \"total_fee\": \"fee amount\",\n \"hex\": \"entire transaction encoded in hex\"\n }",
"examples": []
},
{
"name": "account_set",
"description": "Change various settings on an account.",
"arguments": [
{
"name": "account_id",
"type": "str",
"description": "id of the account to change",
"is_required": true
},
{
"name": "wallet_id",
"type": "str",
"description": "restrict operation to specific wallet",
"is_required": false
},
{
"name": "default",
"type": "bool",
"description": "make this account the default",
"is_required": false
},
{
"name": "new_name",
"type": "str",
"description": "new name for the account",
"is_required": false
},
{
"name": "receiving_gap",
"type": "int",
"description": "set the gap for receiving addresses",
"is_required": false
},
{
"name": "receiving_max_uses",
"type": "int",
"description": "set the maximum number of times to use a receiving address",
"is_required": false
},
{
"name": "change_gap",
"type": "int",
"description": "set the gap for change addresses",
"is_required": false
},
{
"name": "change_max_uses",
"type": "int",
"description": "set the maximum number of times to use a change address",
"is_required": false
}
],
"returns": " {\n \"id\": \"account_id\",\n \"is_default\": \"this account is used by default\",\n \"ledger\": \"name of crypto currency and network\",\n \"name\": \"optional account name\",\n \"seed\": \"human friendly words from which account can be recreated\",\n \"encrypted\": \"if account is encrypted\",\n \"private_key\": \"extended private key\",\n \"public_key\": \"extended public key\",\n \"address_generator\": \"settings for generating addresses\",\n \"modified_on\": \"date of last modification to account settings\"\n }",
"examples": [
{
"title": "Modify maximum number of times a change address can be reused",
"curl": "curl -d'{\"method\": \"account_set\", \"params\": {\"account_id\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\", \"default\": false, \"change_max_uses\": 10}}' http://localhost:5279/",
"lbrynet": "lbrynet account set mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr --change_max_uses=10",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_set\", \"params\": {\"account_id\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\", \"default\": false, \"change_max_uses\": 10}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"address_generator\": {\n \"change\": {\n \"gap\": 6,\n \"maximum_uses_per_address\": 10\n },\n \"name\": \"deterministic-chain\",\n \"receiving\": {\n \"gap\": 20,\n \"maximum_uses_per_address\": 1\n }\n },\n \"encrypted\": false,\n \"id\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1630567643,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPduGkPH4FUHQh6vCVc5PuD2t5148Qf3ds9oJ2b6MpGzKK6BD8QVWeYfkFPAqrEvtFXckYM7p83XaQGyaCiHFAi3hdUnfScwC\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XNJYGviqsh4ofwiRmQaonLUrHaAi5KSFzHYoDVBQTUwBGMQsNMBh3cvEAmp6uotNWBXa2kUJ3GiFHLyWEc7k1YtDkF7jGQW\",\n \"seed\": \"boost property since welcome armed arch goddess correct stick traffic pyramid glory\"\n }\n}"
}
]
}
]
},
"address": {
"doc": "List, generate and verify addresses.",
"commands": [
{
"name": "address_is_mine",
"description": "Checks if an address is associated with the current wallet.",
"arguments": [
{
"name": "address",
"type": "str",
"description": "address to check",
"is_required": true
},
{
"name": "account_id",
"type": "str",
"description": "id of the account to use",
"is_required": false
},
{
"name": "wallet_id",
"type": "str",
"description": "restrict operation to specific wallet",
"is_required": false
}
],
"returns": "(bool) true, if address is associated with current wallet",
"examples": [
{
"title": "Check if address is mine",
"curl": "curl -d'{\"method\": \"address_is_mine\", \"params\": {\"address\": \"muFMoJK6g1gNktsXYWyDUzb4W8kc7bXKy3\"}}' http://localhost:5279/",
"lbrynet": "lbrynet address is_mine muFMoJK6g1gNktsXYWyDUzb4W8kc7bXKy3",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_is_mine\", \"params\": {\"address\": \"muFMoJK6g1gNktsXYWyDUzb4W8kc7bXKy3\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": true\n}"
}
]
},
{
"name": "address_list",
"description": "List account addresses or details of single address.",
"arguments": [
{
"name": "address",
"type": "str",
"description": "just show details for single address",
"is_required": false
},
{
"name": "account_id",
"type": "str",
"description": "id of the account to use",
"is_required": false
},
{
"name": "wallet_id",
"type": "str",
"description": "restrict operation to specific wallet",
"is_required": false
},
{
"name": "page",
"type": "int",
"description": "page to return during paginating",
"is_required": false
},
{
"name": "page_size",
"type": "int",
"description": "number of items on page during pagination",
"is_required": false
}
],
"returns": " {\n \"page\": \"Page number of the current items.\",\n \"page_size\": \"Number of items to show on a page.\",\n \"total_pages\": \"Total number of pages.\",\n \"total_items\": \"Total number of items.\",\n \"items\": [\n \"an address in base58\"\n ]\n }",
"examples": [
{
"title": "List addresses in default account",
"curl": "curl -d'{\"method\": \"address_list\", \"params\": {}}' http://localhost:5279/",
"lbrynet": "lbrynet address list",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_list\", \"params\": {}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mgFHBxv5E4sFvwUGGo38kEAy17ShnxH8wR\",\n \"pubkey\": \"tpubDA9GDAntyJu4JZQ83iwTiweQZQeacjzqAggyK6fcC5Twtv1Tx9m2JQCze6gC8ygn1vmpkmVXsS1kJx9YVk63goLrL5hpZKR3yVnzaka4Ave\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mh7M3qE7uYM5xsbVPCsoy8GovkPjRnpdZD\",\n \"pubkey\": \"tpubDA9GDAntyJu4a7hndHFRPprpVAfeBCQ6HCQgcBk5Z3KjHevV68WzRRbThhTbZin8eAnEUa7XSd3Es4HNNCzAoehZLQBFnmF5SwQY9seRaJn\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mhTcH8cE3MVkWzyhnZGbEK7KgiHb73M4Dn\",\n \"pubkey\": \"tpubDA9GDAntyJu4wUjVRhu4DDBViocAiNu5pc6bHqv9JWhGBmEe4cGge36ZaHQbh2WjpAhL8sQcq9ch8zc4wsTA2V5GhdADPw1Y7x27k7FZKhD\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mhxn7CVxZke1XW5Ds9EziUR6UGn8PYD5h4\",\n \"pubkey\": \"tpubDA9GDAntyJu4NWHpn3XDifdgHCFZ2izY5J8pKLm9KW6d6j6cc79HSUPWmZ87FcCswWVzkPvHgLQEja2WgafR4TRSNqG9YWjLb4Mk4AdKf7B\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"miDhUnNDNNe32VG2g88dswPivRF28eSXiK\",\n \"pubkey\": \"tpubDA9GDAntyJu4NAJGcTKReU8YPLLKZKrVZBw69LuQErmkmoG34zHyDjU8gaQnm41pbxcrLoLavCtQXwghw6sez4heCjoaHUGCEbm78YQRvu1\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"migoW8Ks6whuwHL7bwJsaekyL1bBAxFuft\",\n \"pubkey\": \"tpubDA9GDAntyJu54TvpUgmSCUQib5DVPt32BrxppkbpJ8y2Rym7ami1g5XkxXQ7gXQXakBDStqLnM2gvRp8cxrWQ9UPGSLK2y9LeWkrwKpTqbb\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mj9Uy7F3RJDRHU11UZ1x14xDgrGA32ZcFB\",\n \"pubkey\": \"tpubDA9GDAntyJu4dLxTbBWeRXJKt3MLExpnUZtpwW9nnGacECe7V6W5XF9XD2q4jH6BqSR3TtVsAD7AxY6HxNDMCtuXCqm78jcuF8mWLbT4AS1\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mkMAEVoNHAfctodz75skDcyPAWWemQU7Ny\",\n \"pubkey\": \"tpubDA9GDAntyJu4mWKuSePxpKruFPeiQB7W2H2FjiCt8ECe5uq6cyL1NsZbDtZT5eMA5TE1UVEHVTewtPWXYRvdNJfGyEJm6Yrq8T7ZtKxZ6MN\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mkQjVtF9vv7Xaqj1wnMrJ9pN9VyeTJgDxY\",\n \"pubkey\": \"tpubDA9GDAntyJu4L65TpHRzD8x7gVNQb4cpeCX6jQ33rVFdBXE82zumk36wfAakiSYxGKmaUHgUezVsme6kvN4AwXHkKSjpGmWZLQDxFQvqFfA\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mm2nUb52jM6VYxw88YAN1yGRVwokrLkDuM\",\n \"pubkey\": \"tpubDA9GDAntyJu4QEMzBwaScsHNH4oVtx4bpFb8VhU2CKK8QJMzErjk63H4c1ZzLx47uAmVLWSRcA1tzvfYx2Rr2hUiaJJ77qm3uVQjvEDB7PX\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mmQjfvGjmD9hr2tjMbuRkiLKXkmsAAe5yG\",\n \"pubkey\": \"tpubDA9GDAntyJu4EqV2qxMJdESJ7Uf9chzp9bgY4DaWMthFVyeNBDXmYDVAbTVVJTUvykx5jkwVN7wWSGMA5aZAZETqcGUK4GQEEz5vJYdQF8u\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mmpdJrBWLKXbfg9A8jNobUNXe2QeTYBVAr\",\n \"pubkey\": \"tpubDA9GDAntyJu53ArAJ76HFHVYSWjVHLeGVw3c15oqBZP33v2sgidBwmk11kPsgx6G3MV8WvSvoR2GQznkYXSc6MoHWoCp29f7Yvwszgc9V3A\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mpXcMmM2zExJhH5NiYMP4SvRYJMCxYJUwZ\",\n \"pubkey\": \"tpubDA9GDAntyJu4zNu4NsmqpHbpHAnxQafkEbQNssaNz4Gf7EtXcNVn8BKNaADGLumF6LJXRCV35BdcUhib325aGZoLnF62bLSJDTzkR2DY5B9\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mrqWceHpMpGcbu7BCqpQ8p9ob3qRWmjoXB\",\n \"pubkey\": \"tpubDA9GDAntyJu4XfXXN8zReHfXHTNae3HwzE99dJHDVMUE2fdZb8YJ2ALh8iz7tnf1XUohVJJxZ98v6HZhipfHu4w5Gv2i63VUcaomno6dSGh\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"msDzY2VuBeD51bNUTXsQKuiyAPb9wZQSFQ\",\n \"pubkey\": \"tpubDA9GDAntyJu4sTcTdGkVL4oeqWz8JYvVAjc7stVeKLxWMU7eHEym6rvDC5ZKxJZcHGu9bNAM6yayV5VhEGsFfVP3NwHjJh1Kj9b4fQY86s3\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mtGkypAUsHYWxJ3vjJtCvNhx5hdgpjhbMZ\",\n \"pubkey\": \"tpubDA9GDAntyJu4gtxXJSkgYg6YfwkmqBbWyYuxNMJACw5g8BSiMt5gY8oXbGt5NuBZJNkAni3kZDJxpWynpvBTtx4apqxVMQCTL6D572PxQW5\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mtQm7WpSZYAC5Wmt31xWM6uvYd8QBtea2B\",\n \"pubkey\": \"tpubDA9GDAntyJu4UGFPszDqEqXTCbU3WW95EXsgSPiKK6wb2mcnp9JGFEQjPWbkGDDawCGQ9HMK7urKaGMiHbZd65ggSLkGzcDmXczoaJjeNm4\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mtV74ZPEKfPqhfdLoqBw5b5yymj6hJb1PL\",\n \"pubkey\": \"tpubDA9GDAntyJu4u21fsrAJVTKPsDN4JeoSV6RrPueh7CHzTu4ptv3ixqheueqykkWwMG6c6ncUyWmvyXyGS6PyCzg8hHFpRYThg2iK3vSX6sS\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mtcDFso3eJBFkQ52LeT6aETKmwN5dcDvSB\",\n \"pubkey\": \"tpubDA9GDAntyJu4afGXn2ZQQ2wv58dqwspHGqzfBf9K2bscaNykSBx6qYgaNXbvkGh6Mtoa8YeikQER5A6ZJHDZcSqpAQmTgpA2KviknYKWu3M\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"muCQSMngq9Eee9vSsxa7PUyYttrYKpEgiN\",\n \"pubkey\": \"tpubDA9GDAntyJu4QZGtFXpTGayHG12UJ83jwgVQtMwMmhPmxwv2Qk1JZ82AtVPCVWwe5H7Nru9wSDtCgy9HNRBrVCtoJapryL39cQmf7ApNx8Q\",\n \"used_times\": 0\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 53,\n \"total_pages\": 3\n }\n}"
},
{
"title": "List addresses in specified account",
"curl": "curl -d'{\"method\": \"address_list\", \"params\": {\"account_id\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\"}}' http://localhost:5279/",
"lbrynet": "lbrynet address list --account_id=\"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_list\", \"params\": {\"account_id\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mgFHBxv5E4sFvwUGGo38kEAy17ShnxH8wR\",\n \"pubkey\": \"tpubDA9GDAntyJu4JZQ83iwTiweQZQeacjzqAggyK6fcC5Twtv1Tx9m2JQCze6gC8ygn1vmpkmVXsS1kJx9YVk63goLrL5hpZKR3yVnzaka4Ave\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mh7M3qE7uYM5xsbVPCsoy8GovkPjRnpdZD\",\n \"pubkey\": \"tpubDA9GDAntyJu4a7hndHFRPprpVAfeBCQ6HCQgcBk5Z3KjHevV68WzRRbThhTbZin8eAnEUa7XSd3Es4HNNCzAoehZLQBFnmF5SwQY9seRaJn\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mhTcH8cE3MVkWzyhnZGbEK7KgiHb73M4Dn\",\n \"pubkey\": \"tpubDA9GDAntyJu4wUjVRhu4DDBViocAiNu5pc6bHqv9JWhGBmEe4cGge36ZaHQbh2WjpAhL8sQcq9ch8zc4wsTA2V5GhdADPw1Y7x27k7FZKhD\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mhxn7CVxZke1XW5Ds9EziUR6UGn8PYD5h4\",\n \"pubkey\": \"tpubDA9GDAntyJu4NWHpn3XDifdgHCFZ2izY5J8pKLm9KW6d6j6cc79HSUPWmZ87FcCswWVzkPvHgLQEja2WgafR4TRSNqG9YWjLb4Mk4AdKf7B\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"miDhUnNDNNe32VG2g88dswPivRF28eSXiK\",\n \"pubkey\": \"tpubDA9GDAntyJu4NAJGcTKReU8YPLLKZKrVZBw69LuQErmkmoG34zHyDjU8gaQnm41pbxcrLoLavCtQXwghw6sez4heCjoaHUGCEbm78YQRvu1\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"migoW8Ks6whuwHL7bwJsaekyL1bBAxFuft\",\n \"pubkey\": \"tpubDA9GDAntyJu54TvpUgmSCUQib5DVPt32BrxppkbpJ8y2Rym7ami1g5XkxXQ7gXQXakBDStqLnM2gvRp8cxrWQ9UPGSLK2y9LeWkrwKpTqbb\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mj9Uy7F3RJDRHU11UZ1x14xDgrGA32ZcFB\",\n \"pubkey\": \"tpubDA9GDAntyJu4dLxTbBWeRXJKt3MLExpnUZtpwW9nnGacECe7V6W5XF9XD2q4jH6BqSR3TtVsAD7AxY6HxNDMCtuXCqm78jcuF8mWLbT4AS1\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mkMAEVoNHAfctodz75skDcyPAWWemQU7Ny\",\n \"pubkey\": \"tpubDA9GDAntyJu4mWKuSePxpKruFPeiQB7W2H2FjiCt8ECe5uq6cyL1NsZbDtZT5eMA5TE1UVEHVTewtPWXYRvdNJfGyEJm6Yrq8T7ZtKxZ6MN\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mkQjVtF9vv7Xaqj1wnMrJ9pN9VyeTJgDxY\",\n \"pubkey\": \"tpubDA9GDAntyJu4L65TpHRzD8x7gVNQb4cpeCX6jQ33rVFdBXE82zumk36wfAakiSYxGKmaUHgUezVsme6kvN4AwXHkKSjpGmWZLQDxFQvqFfA\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mm2nUb52jM6VYxw88YAN1yGRVwokrLkDuM\",\n \"pubkey\": \"tpubDA9GDAntyJu4QEMzBwaScsHNH4oVtx4bpFb8VhU2CKK8QJMzErjk63H4c1ZzLx47uAmVLWSRcA1tzvfYx2Rr2hUiaJJ77qm3uVQjvEDB7PX\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mmQjfvGjmD9hr2tjMbuRkiLKXkmsAAe5yG\",\n \"pubkey\": \"tpubDA9GDAntyJu4EqV2qxMJdESJ7Uf9chzp9bgY4DaWMthFVyeNBDXmYDVAbTVVJTUvykx5jkwVN7wWSGMA5aZAZETqcGUK4GQEEz5vJYdQF8u\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mmpdJrBWLKXbfg9A8jNobUNXe2QeTYBVAr\",\n \"pubkey\": \"tpubDA9GDAntyJu53ArAJ76HFHVYSWjVHLeGVw3c15oqBZP33v2sgidBwmk11kPsgx6G3MV8WvSvoR2GQznkYXSc6MoHWoCp29f7Yvwszgc9V3A\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mpXcMmM2zExJhH5NiYMP4SvRYJMCxYJUwZ\",\n \"pubkey\": \"tpubDA9GDAntyJu4zNu4NsmqpHbpHAnxQafkEbQNssaNz4Gf7EtXcNVn8BKNaADGLumF6LJXRCV35BdcUhib325aGZoLnF62bLSJDTzkR2DY5B9\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mrqWceHpMpGcbu7BCqpQ8p9ob3qRWmjoXB\",\n \"pubkey\": \"tpubDA9GDAntyJu4XfXXN8zReHfXHTNae3HwzE99dJHDVMUE2fdZb8YJ2ALh8iz7tnf1XUohVJJxZ98v6HZhipfHu4w5Gv2i63VUcaomno6dSGh\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"msDzY2VuBeD51bNUTXsQKuiyAPb9wZQSFQ\",\n \"pubkey\": \"tpubDA9GDAntyJu4sTcTdGkVL4oeqWz8JYvVAjc7stVeKLxWMU7eHEym6rvDC5ZKxJZcHGu9bNAM6yayV5VhEGsFfVP3NwHjJh1Kj9b4fQY86s3\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mtGkypAUsHYWxJ3vjJtCvNhx5hdgpjhbMZ\",\n \"pubkey\": \"tpubDA9GDAntyJu4gtxXJSkgYg6YfwkmqBbWyYuxNMJACw5g8BSiMt5gY8oXbGt5NuBZJNkAni3kZDJxpWynpvBTtx4apqxVMQCTL6D572PxQW5\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mtQm7WpSZYAC5Wmt31xWM6uvYd8QBtea2B\",\n \"pubkey\": \"tpubDA9GDAntyJu4UGFPszDqEqXTCbU3WW95EXsgSPiKK6wb2mcnp9JGFEQjPWbkGDDawCGQ9HMK7urKaGMiHbZd65ggSLkGzcDmXczoaJjeNm4\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mtV74ZPEKfPqhfdLoqBw5b5yymj6hJb1PL\",\n \"pubkey\": \"tpubDA9GDAntyJu4u21fsrAJVTKPsDN4JeoSV6RrPueh7CHzTu4ptv3ixqheueqykkWwMG6c6ncUyWmvyXyGS6PyCzg8hHFpRYThg2iK3vSX6sS\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"mtcDFso3eJBFkQ52LeT6aETKmwN5dcDvSB\",\n \"pubkey\": \"tpubDA9GDAntyJu4afGXn2ZQQ2wv58dqwspHGqzfBf9K2bscaNykSBx6qYgaNXbvkGh6Mtoa8YeikQER5A6ZJHDZcSqpAQmTgpA2KviknYKWu3M\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgUF5KXtPdtbB7AKMhcDvHFzkcztoeaFjr\",\n \"address\": \"muCQSMngq9Eee9vSsxa7PUyYttrYKpEgiN\",\n \"pubkey\": \"tpubDA9GDAntyJu4QZGtFXpTGayHG12UJ83jwgVQtMwMmhPmxwv2Qk1JZ82AtVPCVWwe5H7Nru9wSDtCgy9HNRBrVCtoJapryL39cQmf7ApNx8Q\",\n \"used_times\": 0\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 26,\n \"total_pages\": 2\n }\n}"
}
]
},
{
"name": "address_unused",
"description": "Return an address containing no balance, will create\na new address if there is none.",
"arguments": [
{
"name": "account_id",
"type": "str",
"description": "id of the account to use",
"is_required": false
},
{
"name": "wallet_id",
"type": "str",
"description": "restrict operation to specific wallet",
"is_required": false
}
],
"returns": " \"an address in base58\"",
"examples": [
{
"title": "Get an unused address",
"curl": "curl -d'{\"method\": \"address_unused\", \"params\": {}}' http://localhost:5279/",
"lbrynet": "lbrynet address unused",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_unused\", \"params\": {}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": \"muFMoJK6g1gNktsXYWyDUzb4W8kc7bXKy3\"\n}"
}
]
}
]
},
"blob": {
"doc": "Blob management.",
"commands": [
{
"name": "blob_announce",
"description": "Announce blobs to the DHT",
"arguments": [
{
"name": "blob_hash",
"type": "str",
"description": "announce a blob, specified by blob_hash",
"is_required": false
},
{
"name": "stream_hash",
"type": "str",
"description": "announce all blobs associated with stream_hash",
"is_required": false
},
{
"name": "sd_hash",
"type": "str",
"description": "announce all blobs associated with sd_hash and the sd_hash itself",
"is_required": false
}
],
"returns": "(bool) true if successful",
"examples": []
},
{
"name": "blob_clean",
"description": "Deletes blobs to cleanup disk space",
"arguments": [],
"returns": "(bool) true if successful",
"examples": []
},
{
"name": "blob_delete",
"description": "Delete a blob",
"arguments": [
{
"name": "blob_hash",
"type": "str",
"description": "blob hash of the blob to delete",
"is_required": true
}
],
"returns": "(str) Success/fail message",
"examples": [
{
"title": "Delete a blob",
"curl": "curl -d'{\"method\": \"blob_delete\", \"params\": {\"blob_hash\": \"fcfdd5d1524e7310850316125f129d12cd5f2a3fc08e41c82d6a4dc3eec554cd383a71fc714957cb2a60ee9d62b5dd4c\"}}' http://localhost:5279/",
"lbrynet": "lbrynet blob delete fcfdd5d1524e7310850316125f129d12cd5f2a3fc08e41c82d6a4dc3eec554cd383a71fc714957cb2a60ee9d62b5dd4c",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"blob_delete\", \"params\": {\"blob_hash\": \"fcfdd5d1524e7310850316125f129d12cd5f2a3fc08e41c82d6a4dc3eec554cd383a71fc714957cb2a60ee9d62b5dd4c\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": \"Deleted fcfdd5d1524e7310850316125f129d12cd5f2a3fc08e41c82d6a4dc3eec554cd383a71fc714957cb2a60ee9d62b5dd4c\"\n}"
}
]
},
{
"name": "blob_get",
"description": "Download and return a blob",
"arguments": [
{
"name": "blob_hash",
"type": "str",
"description": "blob hash of the blob to get",
"is_required": true
},
{
"name": "timeout",
"type": "int",
"description": "timeout in number of seconds",
"is_required": false
}
],
"returns": "(str) Success/Fail message or (dict) decoded data",
"examples": []
},
{
"name": "blob_list",
"description": "Returns blob hashes. If not given filters, returns all blobs known by the blob manager",
"arguments": [
{
"name": "needed",
"type": "bool",
"description": "only return needed blobs",
"is_required": false