diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fab46fcf4..bea9fa1be 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: python-version: '3.7' @@ -17,7 +17,7 @@ jobs: name: "tests / unit" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: python-version: '3.7' @@ -37,12 +37,14 @@ jobs: - blockchain - other steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: python-version: '3.7' - if: matrix.test == 'other' - run: sudo apt install -y --no-install-recommends ffmpeg + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends ffmpeg - run: pip install tox-travis - run: tox -e ${{ matrix.test }} @@ -57,7 +59,7 @@ jobs: - windows-latest runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: python-version: '3.7' diff --git a/docs/api.json b/docs/api.json index aab9bd089..a94f925d2 100644 --- a/docs/api.json +++ b/docs/api.json @@ -54,10 +54,10 @@ "examples": [ { "title": "Get a file", - "curl": "curl -d'{\"method\": \"get\", \"params\": {\"uri\": \"astream#1812e1a18fbc87697c97a7eed78bc783e4a13d27\"}}' http://localhost:5279/", - "lbrynet": "lbrynet get astream#1812e1a18fbc87697c97a7eed78bc783e4a13d27", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"get\", \"params\": {\"uri\": \"astream#1812e1a18fbc87697c97a7eed78bc783e4a13d27\"}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"added_on\": 1584835916,\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"confirmations\": 3,\n \"content_fee\": null,\n \"download_directory\": \"/tmp/tmppom1car9\",\n \"download_path\": \"/tmp/tmppom1car9/tmpm1uonkty\",\n \"file_name\": \"tmpm1uonkty\",\n \"height\": 214,\n \"is_fully_reflected\": false,\n \"key\": \"e9f2998d8856ce6e8b4c2cdd1c119d60\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpm1uonkty\",\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01699edeea4b47704c3559528f1990c013a3bf9df60b16fc0ba8cc0eccbd2483d7e39dfa92e673dca6aed4250aa711cfc7b9d5b9d06785c6c89250c5c1c9efb086948eefa46510421f85c3f9607c9a43b08b49bfc70a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d706d31756f6e6b7479180b22186170706c69636174696f6e2f6f637465742d73747265616d3230b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"a74a8b79ed6d117b5c6bedd739ac8d13c283c2e560b8781be85709b60ee9ed7ae27886d19031f79ec91410cc1d92e2bc\",\n \"stream_name\": \"tmpm1uonkty\",\n \"streaming_url\": \"http://localhost:5280/stream/b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"suggested_file_name\": \"tmpm1uonkty\",\n \"timestamp\": 1584835933,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685\",\n \"written_bytes\": 11\n }\n}" + "curl": "curl -d'{\"method\": \"get\", \"params\": {\"uri\": \"astream#b417290577f86e33f746980cc43dcf35a76e3374\"}}' http://localhost:5279/", + "lbrynet": "lbrynet get astream#b417290577f86e33f746980cc43dcf35a76e3374", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"get\", \"params\": {\"uri\": \"astream#b417290577f86e33f746980cc43dcf35a76e3374\"}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"added_on\": 1585619142,\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"confirmations\": 3,\n \"content_fee\": null,\n \"download_directory\": \"/tmp/tmpx9izt3bj\",\n \"download_path\": \"/tmp/tmpx9izt3bj/tmp4s2rv5lr\",\n \"file_name\": \"tmp4s2rv5lr\",\n \"height\": 214,\n \"is_fully_reflected\": false,\n \"key\": \"33d1b3fcadd55ab27a674c579fe33d69\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp4s2rv5lr\",\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"0128a349afae6a298321acaed339043edbc5134630e3e5c3fffabbc16690ec00df8f717235b3217ea27fbd8cd335c0abf344ebbe19d733d648f4230ee35ed5144a97aed7852dc8e613629eb6289ef8db0a8f8f25850a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d703473327276356c72180b22186170706c69636174696f6e2f6f637465742d73747265616d323063004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"6444414d8b1853d67710a6314a853bb5eec6b089ee334c0ec0b69982c1f6d1ef3331a778fe880f6f483fcf5438f42e35\",\n \"stream_name\": \"tmp4s2rv5lr\",\n \"streaming_url\": \"http://localhost:5280/stream/63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"suggested_file_name\": \"tmp4s2rv5lr\",\n \"timestamp\": 1466680974,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047\",\n \"written_bytes\": 11\n }\n}" } ] }, @@ -250,10 +250,10 @@ "examples": [ { "title": "Publish a file", - "curl": "curl -d'{\"method\": \"publish\", \"params\": {\"name\": \"a-new-stream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp0wzu7x2i\", \"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/tmp0wzu7x2i", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"publish\", \"params\": {\"name\": \"a-new-stream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp0wzu7x2i\", \"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\": \"0100000001501661a892997b4c777c63fd39be344ab82058b384911ca9b4b48801902410e9010000006b483045022100b364c058b38d898e4b04aa50916eb2e9de2ba9faac510c989eb4e284674cb056022075feecbbc26134b82a127e85cf7efef07678209d6b1e7ab6d39561ea143fc497012103e043f917e640cc356b5ad4fe04c8f5059c146f20165c7dfa72c958618d9ba0ddffffffff0200e1f50500000000bfb50c612d6e65772d73747265616d4c94000a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d7030777a7537783269180b22186170706c69636174696f6e2f6f637465742d73747265616d3230686972c81f46e41e979c0f4d12300b9e3448ff2548ca1d79091a77ea56186b57d7f30ed523e3e204eb94e9b5d422ddd96d7576a914cb38379a797b1776434de2faa4f7426b8149029588ace0b46217000000001976a91472276c38a42d6c932ab8623510ec1c7f4495784188ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mx8DVBRUqnP1Z828nozvLuo8YkauX2yY93\",\n \"amount\": \"4.947555\",\n \"confirmations\": 4,\n \"height\": 215,\n \"is_spent\": false,\n \"nout\": 1,\n \"timestamp\": 1584835933,\n \"txid\": \"e91024900188b4b4a91c9184b35820b84a34be39fd637c774c7b9992a8611650\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mz3Up2zdL8STcAX8nGjEm6uE85n4nFLhcb\",\n \"amount\": \"1.0\",\n \"claim_id\": \"59704115fcaeafef00b83062d6eea0dadfb5c23c\",\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#59704115fcaeafef00b83062d6eea0dadfb5c23c\",\n \"timestamp\": null,\n \"txid\": \"80d614821ee63c9966ba91d25df8646571a2b9bdcdca108734e977364f684a08\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp0wzu7x2i\",\n \"sd_hash\": \"686972c81f46e41e979c0f4d12300b9e3448ff2548ca1d79091a77ea56186b57d7f30ed523e3e204eb94e9b5d422ddd9\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mqvYZ4axMU9xmjZDtN1r5fTvdAshZfc3uG\",\n \"amount\": \"3.923448\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"80d614821ee63c9966ba91d25df8646571a2b9bdcdca108734e977364f684a08\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.024107\",\n \"total_input\": \"4.947555\",\n \"total_output\": \"4.923448\",\n \"txid\": \"80d614821ee63c9966ba91d25df8646571a2b9bdcdca108734e977364f684a08\"\n }\n}" + "curl": "curl -d'{\"method\": \"publish\", \"params\": {\"name\": \"a-new-stream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpxe9u833p\", \"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/tmpxe9u833p", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"publish\", \"params\": {\"name\": \"a-new-stream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpxe9u833p\", \"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\": \"0100000001b61ef6cb5ab9368ad6502185509a58cce7ae7026123d4e7ca400340049bfe958010000006b4830450221009641ba03a807aec804d8629f58d583a4a526af3234f08a9270d83cbd0c3c78660220446541854f8ec998bb02afbcf7c6f8fb723834a68f25ec3d65513622cad7fa33012102f51a4f1c26839e5910ae2f0f8b568ac4594d9683241fa73aecc69079d8bd4ffcffffffff0200e1f50500000000bfb50c612d6e65772d73747265616d4c94000a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d707865397538333370180b22186170706c69636174696f6e2f6f637465742d73747265616d3230a2619d47feb5fdbe92fc7eaecd4329c18919294f995f2b3f80cee905d077eacda4b2175a4b0c2dc3b407310fdb2cb8d86d7576a914c71728033150726627534824c825746ddc379c6c88ace0b46217000000001976a9147b83a5a5934f4963a03e24e8cff754786389672a88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mkL6UhxXe22hMUnJwMXRSGYjAPQp7Rk5kW\",\n \"amount\": \"4.947555\",\n \"confirmations\": 4,\n \"height\": 215,\n \"is_spent\": false,\n \"nout\": 1,\n \"timestamp\": 1466681135,\n \"txid\": \"58e9bf49003400a47c4e3d122670aee7cc589a50852150d68a36b95acbf61eb6\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"myfeWA1Ri1w3NM4wq2kZ9DgC9i1JMkxUeh\",\n \"amount\": \"1.0\",\n \"claim_id\": \"3a4bd116dc04fadd264f9bfb5582b7c04ba6699c\",\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#3a4bd116dc04fadd264f9bfb5582b7c04ba6699c\",\n \"timestamp\": 1466646266,\n \"txid\": \"dff2209316dc08b00e0056e1d4c00bedd206532cccdc9f4336c949cf285c5568\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpxe9u833p\",\n \"sd_hash\": \"a2619d47feb5fdbe92fc7eaecd4329c18919294f995f2b3f80cee905d077eacda4b2175a4b0c2dc3b407310fdb2cb8d8\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mrn37eV4xbHjLAQeefMfZPDVWiQ25BEwRb\",\n \"amount\": \"3.923448\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": 1466646266,\n \"txid\": \"dff2209316dc08b00e0056e1d4c00bedd206532cccdc9f4336c949cf285c5568\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.024107\",\n \"total_input\": \"4.947555\",\n \"total_output\": \"4.923448\",\n \"txid\": \"dff2209316dc08b00e0056e1d4c00bedd206532cccdc9f4336c949cf285c5568\"\n }\n}" } ] }, @@ -272,16 +272,46 @@ "type": "str", "description": "wallet to check for claim purchase reciepts", "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 '': {\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#1812e1a18fbc87697c97a7eed78bc783e4a13d27\"]}}' http://localhost:5279/", - "lbrynet": "lbrynet resolve astream#1812e1a18fbc87697c97a7eed78bc783e4a13d27", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"resolve\", \"params\": {\"urls\": [\"astream#1812e1a18fbc87697c97a7eed78bc783e4a13d27\"]}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"astream#1812e1a18fbc87697c97a7eed78bc783e4a13d27\": {\n \"address\": \"mouj5yBftsbi5yBt9hwMrKzSy1uyYb8xFY\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#f/astream#1\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"claim_op\": \"update\",\n \"confirmations\": 3,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"meta\": {\n \"activation_height\": 213,\n \"creation_height\": 213,\n \"creation_timestamp\": 1584835933,\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#1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"short_url\": \"lbry://astream#1\",\n \"signing_channel\": {\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#f\",\n \"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_op\": \"update\",\n \"confirmations\": 7,\n \"has_signing_key\": false,\n \"height\": 210,\n \"meta\": {\n \"activation_height\": 209,\n \"claims_in_channel\": 1,\n \"creation_height\": 209,\n \"creation_timestamp\": 1584835932,\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#f69dbfa313c090198f5259354c70474beade9e69\",\n \"short_url\": \"lbry://@channel#f\",\n \"timestamp\": 1584835932,\n \"txid\": \"c1faeecd9f829c00f0cdbfda8f0753da97808b965549f0c45039a4619729a767\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51\",\n \"public_key_id\": \"muET7bMJFJa3PYo5UhPAE1nJHXKWfktBtx\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1584835933,\n \"txid\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpm1uonkty\",\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n }\n}" + "curl": "curl -d'{\"method\": \"resolve\", \"params\": {\"urls\": [\"astream#b417290577f86e33f746980cc43dcf35a76e3374\"], \"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#b417290577f86e33f746980cc43dcf35a76e3374", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"resolve\", \"params\": {\"urls\": [\"astream#b417290577f86e33f746980cc43dcf35a76e3374\"], \"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#b417290577f86e33f746980cc43dcf35a76e3374\": {\n \"address\": \"mwfK8kVb2w4P5HMQG7qF9FJUphvwvv276R\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3/astream#b\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"claim_op\": \"update\",\n \"confirmations\": 3,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"meta\": {\n \"activation_height\": 213,\n \"creation_height\": 213,\n \"creation_timestamp\": 1466680814,\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#b417290577f86e33f746980cc43dcf35a76e3374\",\n \"short_url\": \"lbry://astream#b\",\n \"signing_channel\": {\n \"address\": \"mn8TLwsBKAhp3hBdmqFBriYMP1pKbWmCkQ\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3\",\n \"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_op\": \"update\",\n \"confirmations\": 7,\n \"has_signing_key\": false,\n \"height\": 210,\n \"meta\": {\n \"activation_height\": 209,\n \"claims_in_channel\": 1,\n \"creation_height\": 209,\n \"creation_timestamp\": 1466680171,\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#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"short_url\": \"lbry://@channel#3\",\n \"timestamp\": 1466680331,\n \"txid\": \"1b4e1cbe7410fff87c6c569d30efd0d8d62ce359e736610c165b3af10918fac3\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638\",\n \"public_key_id\": \"mjP2THCJ1MFjmsmw8nRK5Wd3BfehMSHSEs\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1466680974,\n \"txid\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp4s2rv5lr\",\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n }\n}" } ] }, @@ -303,7 +333,7 @@ "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 \"connection_status\": {\n \"code\": \"connected\",\n \"message\": \"No connection problems detected\"\n },\n \"ffmpeg_status\": {\n \"analyze_audio_volume\": true,\n \"available\": true,\n \"which\": \"/usr/bin/ffmpeg\"\n },\n \"installation_id\": \"4ZzDixm9smJuv2YqtjHPXg1So4x3ga98t6cw9bwwZMzX7aKc2CXPFaxRLgGu85KL2M\",\n \"is_running\": true,\n \"skipped_components\": [\n \"dht\",\n \"upnp\",\n \"hash_announcer\",\n \"peer_protocol_server\"\n ],\n \"startup_status\": {\n \"blob_manager\": true,\n \"database\": true,\n \"exchange_rate_manager\": true,\n \"stream_manager\": true,\n \"wallet\": true,\n \"wallet_server_payments\": true\n },\n \"stream_manager\": {\n \"managed_files\": 0\n },\n \"wallet\": {\n \"available_servers\": 1,\n \"best_blockhash\": \"2c994e19ad74773e96a4b70c3924676727c99db13f96edae1dabff4bd4ed6cf9\",\n \"blocks\": 206,\n \"blocks_behind\": 0,\n \"connected\": \"127.0.0.1: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.99.0\",\n \"protocol_min\": \"0.54.0\",\n \"pruning\": null,\n \"server_version\": \"0.64.0\",\n \"trending_algorithm\": \"zscore\"\n },\n \"headers_synchronization_progress\": 100,\n \"known_servers\": 1,\n \"servers\": [\n {\n \"availability\": true,\n \"host\": \"localhost\",\n \"latency\": 0.010920712957158685,\n \"port\": 50002\n }\n ]\n },\n \"wallet_server_payments\": {\n \"max_fee\": \"0.0\",\n \"running\": false\n }\n }\n}" + "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 \"connection_status\": {\n \"code\": \"network_connection\",\n \"message\": \"Your internet connection appears to have been interrupted\"\n },\n \"ffmpeg_status\": {\n \"analyze_audio_volume\": true,\n \"available\": true,\n \"which\": \"/usr/bin/ffmpeg\"\n },\n \"installation_id\": \"9qRS65o6CNdLHGMMSHXm9SsArb29uFXWVm5bJ8YQ6viVE3oMR7hdkhWjBD3TUwhmxB\",\n \"is_running\": true,\n \"skipped_components\": [\n \"dht\",\n \"upnp\",\n \"hash_announcer\",\n \"peer_protocol_server\"\n ],\n \"startup_status\": {\n \"blob_manager\": true,\n \"database\": true,\n \"exchange_rate_manager\": true,\n \"stream_manager\": true,\n \"wallet\": true,\n \"wallet_server_payments\": true\n },\n \"stream_manager\": {\n \"managed_files\": 0\n },\n \"wallet\": {\n \"available_servers\": 1,\n \"best_blockhash\": \"4cf95e3975871ff565881ce16ac529093338eefb009fa08bcb6253c5cf266b64\",\n \"blocks\": 206,\n \"blocks_behind\": 0,\n \"connected\": \"127.0.0.1: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.99.0\",\n \"protocol_min\": \"0.54.0\",\n \"pruning\": null,\n \"server_version\": \"0.67.0\",\n \"trending_algorithm\": \"zscore\"\n },\n \"headers_synchronization_progress\": 100,\n \"known_servers\": 1,\n \"servers\": [\n {\n \"availability\": true,\n \"host\": \"localhost\",\n \"latency\": 0.005246120039373636,\n \"port\": 50002\n }\n ]\n },\n \"wallet_server_payments\": {\n \"max_fee\": \"0.0\",\n \"running\": false\n }\n }\n}" } ] }, @@ -325,7 +355,7 @@ "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\": \"GNOME\",\n \"distro\": {\n \"codename\": \"xenial\",\n \"id\": \"ubuntu\",\n \"like\": \"debian\",\n \"version\": \"16.04\",\n \"version_parts\": {\n \"build_number\": \"\",\n \"major\": \"16\",\n \"minor\": \"04\"\n }\n },\n \"lbrynet_version\": \"0.64.0\",\n \"os_release\": \"4.4.0-116-generic\",\n \"os_system\": \"Linux\",\n \"platform\": \"Linux-4.4.0-116-generic-x86_64-with-Ubuntu-16.04-xenial\",\n \"processor\": \"x86_64\",\n \"python_version\": \"3.7.5\",\n \"version\": \"0.64.0\"\n }\n}" + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"build\": \"dev\",\n \"desktop\": \"GNOME\",\n \"distro\": {\n \"codename\": \"xenial\",\n \"id\": \"ubuntu\",\n \"like\": \"debian\",\n \"version\": \"16.04\",\n \"version_parts\": {\n \"build_number\": \"\",\n \"major\": \"16\",\n \"minor\": \"04\"\n }\n },\n \"lbrynet_version\": \"0.67.0\",\n \"os_release\": \"4.4.0-116-generic\",\n \"os_system\": \"Linux\",\n \"platform\": \"Linux-4.4.0-116-generic-x86_64-with-Ubuntu-16.04-xenial\",\n \"processor\": \"x86_64\",\n \"python_version\": \"3.7.5\",\n \"version\": \"0.67.0\"\n }\n}" } ] } @@ -379,10 +409,10 @@ "examples": [ { "title": "Add an account from seed", - "curl": "curl -d'{\"method\": \"account_add\", \"params\": {\"account_name\": \"new account\", \"seed\": \"armor curtain sugar ghost reflect stem toast human sauce history fetch tone\", \"single_key\": false}}' http://localhost:5279/", - "lbrynet": "lbrynet account add \"new account\" --seed=\"armor curtain sugar ghost reflect stem toast human sauce history fetch tone\"", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_add\", \"params\": {\"account_name\": \"new account\", \"seed\": \"armor curtain sugar ghost reflect stem toast human sauce history fetch tone\", \"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\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1584835900.6848392,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPeJSdNzhfAC9LyN2RooELFk8JjRZX4bCsXZkzZty34jtHh61H2p2kyPjG9CnDqEcwF5Xb9uGzG4uxGQquCPA2Nz5pDaaykzt\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XmURGeNFZboTYPYMy8REq3j61wbpUs1GN41mCHndFEW9sEe6hyGGYuB73bkkFAy5e7bYmZid3jxyUs2SDFBux4PVTjep1tc\",\n \"seed\": \"armor curtain sugar ghost reflect stem toast human sauce history fetch tone\"\n }\n}" + "curl": "curl -d'{\"method\": \"account_add\", \"params\": {\"account_name\": \"new account\", \"seed\": \"list dignity illegal bonus bread apple change credit tape segment divorce suit\", \"single_key\": false}}' http://localhost:5279/", + "lbrynet": "lbrynet account add \"new account\" --seed=\"list dignity illegal bonus bread apple change credit tape segment divorce suit\"", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_add\", \"params\": {\"account_name\": \"new account\", \"seed\": \"list dignity illegal bonus bread apple change credit tape segment divorce suit\", \"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\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1585619126.9018846,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPdc1QfujCWQi3eMZirADb4HEJxte6bkMcq37zFjGwfrLJhY9GR41xRLMk6MxTavsaqrhQfHgui4LX7Xo6dCbnU1xm3wozqui\",\n \"public_key\": \"tpubD6NzVbkrYhZ4X53CZZPnupNADP5f1VQVdaq6FQgQ22A1fXNkt86XrLxAsgsUTL8mpJyGM5j74y9jvuUutbBHs9hePn9yEcfw8ScBi4hYRhq\",\n \"seed\": \"list dignity illegal bonus bread apple change credit tape segment divorce suit\"\n }\n}" } ] }, @@ -420,9 +450,9 @@ }, { "title": "Get balance for specific account by id", - "curl": "curl -d'{\"method\": \"account_balance\", \"params\": {\"account_id\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\"}}' http://localhost:5279/", - "lbrynet": "lbrynet account balance \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\"", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_balance\", \"params\": {\"account_id\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\"}}).json()", + "curl": "curl -d'{\"method\": \"account_balance\", \"params\": {\"account_id\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\"}}' http://localhost:5279/", + "lbrynet": "lbrynet account balance \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\"", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_balance\", \"params\": {\"account_id\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\"}}).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}" } ] @@ -457,7 +487,7 @@ "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\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1584835900.435758,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPeJSdNzhfAC9LyN2RooELFk8JjRZX4bCsXZkzZty34jtHh61H2p2kyPjG9CnDqEcwF5Xb9uGzG4uxGQquCPA2Nz5pDaaykzt\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XmURGeNFZboTYPYMy8REq3j61wbpUs1GN41mCHndFEW9sEe6hyGGYuB73bkkFAy5e7bYmZid3jxyUs2SDFBux4PVTjep1tc\",\n \"seed\": \"armor curtain sugar ghost reflect stem toast human sauce history fetch tone\"\n }\n}" + "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\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1585619126.6978645,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPdc1QfujCWQi3eMZirADb4HEJxte6bkMcq37zFjGwfrLJhY9GR41xRLMk6MxTavsaqrhQfHgui4LX7Xo6dCbnU1xm3wozqui\",\n \"public_key\": \"tpubD6NzVbkrYhZ4X53CZZPnupNADP5f1VQVdaq6FQgQ22A1fXNkt86XrLxAsgsUTL8mpJyGM5j74y9jvuUutbBHs9hePn9yEcfw8ScBi4hYRhq\",\n \"seed\": \"list dignity illegal bonus bread apple change credit tape segment divorce suit\"\n }\n}" } ] }, @@ -512,24 +542,24 @@ "examples": [ { "title": "Transfer 2 LBC from default account to specific account", - "curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"to_account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}' http://localhost:5279/", - "lbrynet": "lbrynet account fund --to_account=\"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\" --amount=2.0 --broadcast", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000015cc9e6010d4f13b19cb3978ccd9bbe864a08f6bf55be677f0eef83517b06ae99010000006b483045022100e7a18b6bc35dbefa13c93b0449f74eab2ddf90cb466cc2949039dd93fb7f5aee0220221903966551e544098dc52b00fd7fd6f507b932839e3f6f36a0e563cbea66ed01210249ca04368b632d77e18fe5cd8ccb94c35f0c86e10f8b6114830c7658f6253e32ffffffff0200c2eb0b000000001976a91417e91966e568324c8adedd5f69f25633a434756888ac90d7ae2f000000001976a91408b5ab543c10ac249df2620e908232fdc85a54ec88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"moV4jBP8e3fxiP3npkB9BHDBbHsp4KUWWE\",\n \"amount\": \"10.0\",\n \"confirmations\": 6,\n \"height\": 201,\n \"is_spent\": false,\n \"nout\": 1,\n \"timestamp\": 1584835931,\n \"txid\": \"99ae067b5183ef0e7f67be55bff6084a86be9bcd8c97b39cb1134f0d01e6c95c\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mhhP5V3SXymVzNb4UR6SE698yofBHJD4QB\",\n \"amount\": \"2.0\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"5694deec76abd26cf8860c9ade00a0a7a857e60f5d31ecb21ed3d8bd45a76cb9\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mgK1LBxVWBFUiesotg7ixBcWUEySBi7zD7\",\n \"amount\": \"7.999876\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"5694deec76abd26cf8860c9ade00a0a7a857e60f5d31ecb21ed3d8bd45a76cb9\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000124\",\n \"total_input\": \"10.0\",\n \"total_output\": \"9.999876\",\n \"txid\": \"5694deec76abd26cf8860c9ade00a0a7a857e60f5d31ecb21ed3d8bd45a76cb9\"\n }\n}" + "curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"to_account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}' http://localhost:5279/", + "lbrynet": "lbrynet account fund --to_account=\"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\" --amount=2.0 --broadcast", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001ba767d6a6e2e38834610c9d26fe3643693630e4f665a5ee0a6d0afbff83cd5f8000000006a47304402204d124f86882dc3877695cd976db13ae69d65c8428c8f6d835ca8223a7d6835e902205de28b9a4f110b0225a8755eec4c8c685537c50874328f2e40ddd48dca9dd7fd01210246887ed2c771522dce19644f0dfe7551c8b6e14f3bd0d1fb264973dcf105c888ffffffff0200c2eb0b000000001976a914c02e4a71f8e4ffaaff99a9e63c1fcead285a392c88ac90d7ae2f000000001976a914cb916329b5b4700cedcd3e8d94407665ca81d36688ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mxBTeoDmRCHM7c3jY8Fno67GC9dJhVohLV\",\n \"amount\": \"10.0\",\n \"confirmations\": 6,\n \"height\": 201,\n \"is_spent\": false,\n \"nout\": 0,\n \"timestamp\": 1466678885,\n \"txid\": \"f8d53cf8bfafd0a6e05e5a664f0e63933664e36fd2c9104683382e6e6a7d76ba\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"my37VE71ekzhESxzcaxJZutmqwxRc8w7dt\",\n \"amount\": \"2.0\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": 1466646266,\n \"txid\": \"de03731c8a7d576729fcf14a2f0f1a527d5c7d867494e2c21edf4311ad96268b\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mz5KdgkPjuzRAnBuivAdfeg49qMuvSNPMo\",\n \"amount\": \"7.999876\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": 1466646266,\n \"txid\": \"de03731c8a7d576729fcf14a2f0f1a527d5c7d867494e2c21edf4311ad96268b\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000124\",\n \"total_input\": \"10.0\",\n \"total_output\": \"9.999876\",\n \"txid\": \"de03731c8a7d576729fcf14a2f0f1a527d5c7d867494e2c21edf4311ad96268b\"\n }\n}" }, { "title": "Spread LBC between multiple addresses", - "curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"to_account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\", \"from_account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}' http://localhost:5279/", - "lbrynet": "lbrynet account fund --to_account=\"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\" --from_account=\"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\" --amount=1.5 --outputs=2 --broadcast", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\", \"from_account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001b96ca745bdd8d31eb2ec315d0fe657a8a7a000de9a0c86f86cd2ab76ecde9456000000006a4730440220626846c418656c7ac42c0480b602d4e7684a1d9d7e2956ce430105e4f20a1f2e022031beec8f7f6e5054d6c733e5ebcce801ad49074efdbe086f246d4eacad13f4ac012103b03ab79b30fcc9233c7dfb75b56bbb8ac0d3e16a2f58c6bdd82e68363a1d7ae0ffffffff03c0687804000000001976a91498c0f2f9f6c52890b2998a248cca7c1b6284cd1c88acc0687804000000001976a91498c0f2f9f6c52890b2998a248cca7c1b6284cd1c88ac6cb9fa02000000001976a914f55bcf4920603f97681808bfe7cb16057bbc15b088ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mhhP5V3SXymVzNb4UR6SE698yofBHJD4QB\",\n \"amount\": \"2.0\",\n \"confirmations\": 1,\n \"height\": 207,\n \"is_spent\": false,\n \"nout\": 0,\n \"timestamp\": 1584835932,\n \"txid\": \"5694deec76abd26cf8860c9ade00a0a7a857e60f5d31ecb21ed3d8bd45a76cb9\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"muSe9Z1BDta93HeTJa8VDKNd99W31p8ngC\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"6fcf9fd80257dc24776892dfa09d462c74a45f62d34904fc5ae3e7f26ede2ffc\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"muSe9Z1BDta93HeTJa8VDKNd99W31p8ngC\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"6fcf9fd80257dc24776892dfa09d462c74a45f62d34904fc5ae3e7f26ede2ffc\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"n3tHq6vVyfCXz9gTWS4cP9MCSGd8K2ZMad\",\n \"amount\": \"0.499859\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 2,\n \"timestamp\": null,\n \"txid\": \"6fcf9fd80257dc24776892dfa09d462c74a45f62d34904fc5ae3e7f26ede2ffc\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000141\",\n \"total_input\": \"2.0\",\n \"total_output\": \"1.999859\",\n \"txid\": \"6fcf9fd80257dc24776892dfa09d462c74a45f62d34904fc5ae3e7f26ede2ffc\"\n }\n}" + "curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"to_account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\", \"from_account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}' http://localhost:5279/", + "lbrynet": "lbrynet account fund --to_account=\"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\" --from_account=\"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\" --amount=1.5 --outputs=2 --broadcast", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\", \"from_account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000018b2696ad1143df1ec2e29474867d5c7d521a0f2f4af1fc2967577d8a1c7303de000000006b483045022100d969210fbc02f976ba640bee0c3e681e5bffb83279ac76415a454785fdbb712d02203f903ca5a9feac3dfee8c32b8af281f880d18b0ce7d22fb97802ae200e07e129012103f21681776984113124c74b9f6cc03984f6626d0cf8107ce65fa7adb93f5dd95effffffff03c0687804000000001976a9142e1a37355163311569fc92d53a58540b42623d9c88acc0687804000000001976a9142e1a37355163311569fc92d53a58540b42623d9c88ac6cb9fa02000000001976a9142e1a37355163311569fc92d53a58540b42623d9c88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"my37VE71ekzhESxzcaxJZutmqwxRc8w7dt\",\n \"amount\": \"2.0\",\n \"confirmations\": 1,\n \"height\": 207,\n \"is_spent\": false,\n \"nout\": 0,\n \"timestamp\": 1466679849,\n \"txid\": \"de03731c8a7d576729fcf14a2f0f1a527d5c7d867494e2c21edf4311ad96268b\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mjiinNeUAhoYMqyQm4bUXAM2J4M2gaqbUd\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": 1466646266,\n \"txid\": \"3781dca574d6b8f2e039e90510a240a1ea8e7bca6e92584af4c7d3638ecd7901\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mjiinNeUAhoYMqyQm4bUXAM2J4M2gaqbUd\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": 1466646266,\n \"txid\": \"3781dca574d6b8f2e039e90510a240a1ea8e7bca6e92584af4c7d3638ecd7901\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mjiinNeUAhoYMqyQm4bUXAM2J4M2gaqbUd\",\n \"amount\": \"0.499859\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 2,\n \"timestamp\": 1466646266,\n \"txid\": \"3781dca574d6b8f2e039e90510a240a1ea8e7bca6e92584af4c7d3638ecd7901\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000141\",\n \"total_input\": \"2.0\",\n \"total_output\": \"1.999859\",\n \"txid\": \"3781dca574d6b8f2e039e90510a240a1ea8e7bca6e92584af4c7d3638ecd7901\"\n }\n}" }, { "title": "Transfer all LBC to a specified account", - "curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"from_account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\", \"everything\": true, \"broadcast\": true}}' http://localhost:5279/", - "lbrynet": "lbrynet account fund --from_account=\"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\" --everything --broadcast", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"from_account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\", \"everything\": true, \"broadcast\": true}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000003fc2fde6ef2e7e35afc0449d3625fa4742c469da0df92687724dc5702d89fcf6f000000006a473044022068501773a464725636c0a02b679c85b18f955e769f164b14e51a1bb75400814702207f5a695c5c47d0a8137ef00dde084f42360a653d36e4654f17e7d5ccf4066b37012103094629fb54000094f79a0cbb47553cb076c76f43f4f8434c02885f8f8e6e26eafffffffffc2fde6ef2e7e35afc0449d3625fa4742c469da0df92687724dc5702d89fcf6f010000006b483045022100d180c9aa5a8a8bc6928bec99c7640b4aff3c2d1dab934afdeb891a31d99c417f022011c5dcbaae42b670532d4f2856e7c187b886d1a9d6c0620057e95f38a8c980d6012103094629fb54000094f79a0cbb47553cb076c76f43f4f8434c02885f8f8e6e26eafffffffffc2fde6ef2e7e35afc0449d3625fa4742c469da0df92687724dc5702d89fcf6f020000006b483045022100c824ce9dfe7fa3f561272c78ff96feb640b41f4a6405b0c1bfc75798a8ac8d4502203fd1c4995d58966d2b5cd37e39e43765f09d21651a9cab27fb33476eb9f2cb820121023716f8fa2a7546e360cce5ad547cd4bc6bde106d6556c33170f684ce8926d14cffffffff015027eb0b000000001976a914f397bdde615088678e78cccd7ee3adee8c7eb9f288ac00000000\",\n \"inputs\": [\n {\n \"address\": \"muSe9Z1BDta93HeTJa8VDKNd99W31p8ngC\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_spent\": false,\n \"nout\": 0,\n \"timestamp\": 1584835932,\n \"txid\": \"6fcf9fd80257dc24776892dfa09d462c74a45f62d34904fc5ae3e7f26ede2ffc\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"muSe9Z1BDta93HeTJa8VDKNd99W31p8ngC\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_spent\": false,\n \"nout\": 1,\n \"timestamp\": 1584835932,\n \"txid\": \"6fcf9fd80257dc24776892dfa09d462c74a45f62d34904fc5ae3e7f26ede2ffc\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"n3tHq6vVyfCXz9gTWS4cP9MCSGd8K2ZMad\",\n \"amount\": \"0.499859\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_spent\": false,\n \"nout\": 2,\n \"timestamp\": 1584835932,\n \"txid\": \"6fcf9fd80257dc24776892dfa09d462c74a45f62d34904fc5ae3e7f26ede2ffc\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"n3ixGs8m1HJG2cMbno1WozQ5rbB4oVBXFi\",\n \"amount\": \"1.999604\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"5c43f9726377287a8c86efba0510e2ccb032a060466fcc6ee8ebb00a612c6dd1\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000255\",\n \"total_input\": \"1.999859\",\n \"total_output\": \"1.999604\",\n \"txid\": \"5c43f9726377287a8c86efba0510e2ccb032a060466fcc6ee8ebb00a612c6dd1\"\n }\n}" + "curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"from_account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\", \"everything\": true, \"broadcast\": true}}' http://localhost:5279/", + "lbrynet": "lbrynet account fund --from_account=\"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\" --everything --broadcast", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"from_account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\", \"everything\": true, \"broadcast\": true}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000030179cd8e63d3c7f44a58926eca7b8eeaa140a21005e939e0f2b8d674a5dc8137000000006a4730440220072294a91fb8c278db3fbccb0b9f54c6a7a7d26d1c13b2f3eda90a7c3d30ba2902200fa2e4f767db19d77098a4bcd13ba42cdf387125924724ba14afbce736c69092012103ff9945fde56f713363f56c670582783628ac8394ec9b5ecd084163583f5ab1e5ffffffff0179cd8e63d3c7f44a58926eca7b8eeaa140a21005e939e0f2b8d674a5dc8137010000006b4830450221009b69f27d6d658bdf6baf700b49ffc4791b5fde01894fa6bf233b5b84c952817f02207ea0592844b37171b515912bb8a24bb6074a43195282956d91c011b4617caa26012103ff9945fde56f713363f56c670582783628ac8394ec9b5ecd084163583f5ab1e5ffffffff0179cd8e63d3c7f44a58926eca7b8eeaa140a21005e939e0f2b8d674a5dc8137020000006b483045022100e4cc8571456656e81b53177ead34181e70a5097cadd430dc87a4f135d9c7a2ba022066659e6d6460766ecfe12c63b637e8122ec1ad7d898643941c8117eb6132976b012103ff9945fde56f713363f56c670582783628ac8394ec9b5ecd084163583f5ab1e5ffffffff015027eb0b000000001976a9143d5138bbe9b26fa557c9726920f5d158a29a8d2288ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mjiinNeUAhoYMqyQm4bUXAM2J4M2gaqbUd\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_spent\": false,\n \"nout\": 0,\n \"timestamp\": 1466680010,\n \"txid\": \"3781dca574d6b8f2e039e90510a240a1ea8e7bca6e92584af4c7d3638ecd7901\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mjiinNeUAhoYMqyQm4bUXAM2J4M2gaqbUd\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_spent\": false,\n \"nout\": 1,\n \"timestamp\": 1466680010,\n \"txid\": \"3781dca574d6b8f2e039e90510a240a1ea8e7bca6e92584af4c7d3638ecd7901\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mjiinNeUAhoYMqyQm4bUXAM2J4M2gaqbUd\",\n \"amount\": \"0.499859\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_spent\": false,\n \"nout\": 2,\n \"timestamp\": 1466680010,\n \"txid\": \"3781dca574d6b8f2e039e90510a240a1ea8e7bca6e92584af4c7d3638ecd7901\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mm7Ap8eGFKRiKcuXgJowSpDy3nZQzY9AX4\",\n \"amount\": \"1.999604\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": 1466646266,\n \"txid\": \"b8debe7b8addd45389c0535b94987524028876ca66b2855d2c6f07aceec617c8\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000255\",\n \"total_input\": \"1.999859\",\n \"total_output\": \"1.999604\",\n \"txid\": \"b8debe7b8addd45389c0535b94987524028876ca66b2855d2c6f07aceec617c8\"\n }\n}" } ] }, @@ -587,7 +617,7 @@ "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\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"is_default\": true,\n \"ledger\": \"lbc_regtest\",\n \"name\": \"Account #n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"public_key\": \"tpubD6NzVbkrYhZ4X8pwbWsruVqYsaHQzzP3N7MrTUSHy9wED599Axz3rQT28CepEnEGTRmdxPeQcqrRLVSM7HmgpV2xw5G9fejw2FtBm2JxdT1\",\n \"satoshis\": 1000000000\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" + "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\": \"muNsgFBDV8aEGAnjyYrsFqVxAwfm6ArZki\",\n \"is_default\": true,\n \"ledger\": \"lbc_regtest\",\n \"name\": \"Account #muNsgFBDV8aEGAnjyYrsFqVxAwfm6ArZki\",\n \"public_key\": \"tpubD6NzVbkrYhZ4WforGSt7otWNx3y8UBLo31vy79WW5KZFBiCzc2qwddwFd8vJwW4WrFavdYuh9mqUVN9aTdXsHt7wyWALSWyKD5xBacfmkey\",\n \"satoshis\": 1000000000\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" } ] }, @@ -632,10 +662,10 @@ "examples": [ { "title": "Remove an account", - "curl": "curl -d'{\"method\": \"account_remove\", \"params\": {\"account_id\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\"}}' http://localhost:5279/", - "lbrynet": "lbrynet account remove n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_remove\", \"params\": {\"account_id\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\"}}).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\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1584835900.435758,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPeJSdNzhfAC9LyN2RooELFk8JjRZX4bCsXZkzZty34jtHh61H2p2kyPjG9CnDqEcwF5Xb9uGzG4uxGQquCPA2Nz5pDaaykzt\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XmURGeNFZboTYPYMy8REq3j61wbpUs1GN41mCHndFEW9sEe6hyGGYuB73bkkFAy5e7bYmZid3jxyUs2SDFBux4PVTjep1tc\",\n \"seed\": \"armor curtain sugar ghost reflect stem toast human sauce history fetch tone\"\n }\n}" + "curl": "curl -d'{\"method\": \"account_remove\", \"params\": {\"account_id\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\"}}' http://localhost:5279/", + "lbrynet": "lbrynet account remove mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_remove\", \"params\": {\"account_id\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\"}}).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\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1585619126.6978645,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPdc1QfujCWQi3eMZirADb4HEJxte6bkMcq37zFjGwfrLJhY9GR41xRLMk6MxTavsaqrhQfHgui4LX7Xo6dCbnU1xm3wozqui\",\n \"public_key\": \"tpubD6NzVbkrYhZ4X53CZZPnupNADP5f1VQVdaq6FQgQ22A1fXNkt86XrLxAsgsUTL8mpJyGM5j74y9jvuUutbBHs9hePn9yEcfw8ScBi4hYRhq\",\n \"seed\": \"list dignity illegal bonus bread apple change credit tape segment divorce suit\"\n }\n}" } ] }, @@ -722,10 +752,10 @@ "examples": [ { "title": "Modify maximum number of times a change address can be reused", - "curl": "curl -d'{\"method\": \"account_set\", \"params\": {\"account_id\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\", \"default\": false, \"change_max_uses\": 10}}' http://localhost:5279/", - "lbrynet": "lbrynet account set n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx --change_max_uses=10", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_set\", \"params\": {\"account_id\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\", \"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\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1584835900.7549298,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPeJSdNzhfAC9LyN2RooELFk8JjRZX4bCsXZkzZty34jtHh61H2p2kyPjG9CnDqEcwF5Xb9uGzG4uxGQquCPA2Nz5pDaaykzt\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XmURGeNFZboTYPYMy8REq3j61wbpUs1GN41mCHndFEW9sEe6hyGGYuB73bkkFAy5e7bYmZid3jxyUs2SDFBux4PVTjep1tc\",\n \"seed\": \"armor curtain sugar ghost reflect stem toast human sauce history fetch tone\"\n }\n}" + "curl": "curl -d'{\"method\": \"account_set\", \"params\": {\"account_id\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\", \"default\": false, \"change_max_uses\": 10}}' http://localhost:5279/", + "lbrynet": "lbrynet account set mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB --change_max_uses=10", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_set\", \"params\": {\"account_id\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\", \"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\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1585619126.9740307,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPdc1QfujCWQi3eMZirADb4HEJxte6bkMcq37zFjGwfrLJhY9GR41xRLMk6MxTavsaqrhQfHgui4LX7Xo6dCbnU1xm3wozqui\",\n \"public_key\": \"tpubD6NzVbkrYhZ4X53CZZPnupNADP5f1VQVdaq6FQgQ22A1fXNkt86XrLxAsgsUTL8mpJyGM5j74y9jvuUutbBHs9hePn9yEcfw8ScBi4hYRhq\",\n \"seed\": \"list dignity illegal bonus bread apple change credit tape segment divorce suit\"\n }\n}" } ] } @@ -761,9 +791,9 @@ "examples": [ { "title": "Check if address is mine", - "curl": "curl -d'{\"method\": \"address_is_mine\", \"params\": {\"address\": \"my1xvo9fLE5a9xquR1kLNZAnCkz1kAqwfS\"}}' http://localhost:5279/", - "lbrynet": "lbrynet address is_mine my1xvo9fLE5a9xquR1kLNZAnCkz1kAqwfS", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_is_mine\", \"params\": {\"address\": \"my1xvo9fLE5a9xquR1kLNZAnCkz1kAqwfS\"}}).json()", + "curl": "curl -d'{\"method\": \"address_is_mine\", \"params\": {\"address\": \"n26Ruaur9Urn4jw5jrnav4shRsZt56bCVy\"}}' http://localhost:5279/", + "lbrynet": "lbrynet address is_mine n26Ruaur9Urn4jw5jrnav4shRsZt56bCVy", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_is_mine\", \"params\": {\"address\": \"n26Ruaur9Urn4jw5jrnav4shRsZt56bCVy\"}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": true\n}" } ] @@ -810,14 +840,14 @@ "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\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"mfrU4bKSvSkWSbzKSBbzxYy4kPCtmaEhM8\",\n \"pubkey\": \"tpubDA9GDAntyJu4Kcp38TMfk6exXFseNvhQD2Sa1u2S5LkJwDFSqaPo7eddnDwjNF752ahkQD7mqDCVY35XBiwALkGUmcTowAKWto33y9yJSf3\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"mgK1LBxVWBFUiesotg7ixBcWUEySBi7zD7\",\n \"pubkey\": \"tpubDA9GDAntyJu4U3RBR86GSapZ2HutSPkG2wPrfMsNfXfNewebLPR1KrbdRqUnrSFXHdCyjkoiHRqX4vXiNyADmczNewqdTA3qnd5MkHanWdp\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"mhrLhT3w1bhsvLCu6RMPMmpyKu6CNcHZzt\",\n \"pubkey\": \"tpubDA9GDAntyJu4HiU7TpVacS3cApLRcZZKX8VhHjawehz2S3ExhDEKmp1HLvJZB9JgvqqFTFoZEqFtXEdic6g9sR8typ3TPpuqq4gatVQ3VDa\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"mj8LygwZkGqCQEg57FczPcrytBfQJYfvyG\",\n \"pubkey\": \"tpubDA9GDAntyJu4npr9BZK8ptZCWgfBixmDYYBuBJY1YsxB7GX7iGeTC7Rwzi1JDMSXtAgRbjmJgvaNWWpoxJDW3SA1H1YFan7KgVdfhzcf8FG\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"mjYcK8Kf5DqYHHHQGNdgZ1jtmx4Q7SF974\",\n \"pubkey\": \"tpubDA9GDAntyJu4sHbpkRpfXmxPDZsYhAXTQSqJjhXh2mw1G4pFck47v3WEfdAD23LK4wiW19p9AdEQaSHMqT3hyLrUdJvLTDtQ8qzhLzdkfJ3\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"mjgkKPckKoPzF1qwiDFm9Mw83KAj53R45c\",\n \"pubkey\": \"tpubDA9GDAntyJu4uxpeyC8xQHFZBNNwZSWFqzBMmV6uzL7PkMLkqMvMHKRRRp3TNTxZCCkMiybnTGmH1aG4uGaZGnnoqh7531yZxqcNLXMeEAb\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"mkVcoBC9oUYzSLdDUdYcYn2zqagcgqR3AE\",\n \"pubkey\": \"tpubDA9GDAntyJu4dTaADgRf7fCjavtugE6ZghFEohetXLsE4ma6ZHKEtcLwccsvGzyfaoqQ4uCVT9xnWz6jriRCH7uvfzdPjRj7twtDtSshrtX\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"mkrTtToujmYnuaxXpkg4GZKDMEU1myVTyH\",\n \"pubkey\": \"tpubDA9GDAntyJu4MbYfzfJ5FxNiLuE9rNDYw7mB2KGrRukrMFt9W2JRDRefN7Zg4aWuJeivXvM6bUgJ1U3CaGP8sgx2zYXSNaERtouqdJbxHKx\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"mm2DMQiyHStpHhTS3HM6fPCGx5LM86Jwaw\",\n \"pubkey\": \"tpubDA9GDAntyJu4S3cb69bLmXTKs9cU1jAqkND2USHuWiDa8zxiJWGhrLV86GR3i73tYanvtMHoq1rYv6eJkoiwfumQFG5LunN35Wr8tM6Xm1K\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"mmnDQQogwEmzAy3K8CtfqcUkX1V2X48ou5\",\n \"pubkey\": \"tpubDA9GDAntyJu574c1MC16ejn6CokoJqTyRLZPkd4yKD3eodm77y4jXr3ZaoozuN8BBsucBFKChqdaAnAhTrjLi3g14o14KHhHnJedP9NHRvF\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"moV4jBP8e3fxiP3npkB9BHDBbHsp4KUWWE\",\n \"pubkey\": \"tpubDA9GDAntyJu4EkznRXfC7mYMaGXizV4RYm2uFfEjVedYGQQwtBaxLfpaNGFarG4NY46MshVxWv8VCayLtGSMX786vL3cVhZ8oGxdhtVeomf\",\n \"used_times\": 1\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"mouj5yBftsbi5yBt9hwMrKzSy1uyYb8xFY\",\n \"pubkey\": \"tpubDA9GDAntyJu4JapSWN67Sgc5WgQZJg64nmz9tFJyEHRFkczoofj6XGMJoySqWb5iHYBETgA2Z4SzHnK4GaMwqstHZaw6mCNXSiZwjm8J7pf\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"mpnkRHsWkZ6nsnL2o3njNQtXYwwUigiUhL\",\n \"pubkey\": \"tpubDA9GDAntyJu4aEygbrm2r1g6Tf5TkGPo4Wg2dSos9sAB2xEd5pEUggEJZrTatLCyby3yzbJxk7K8QuBQB3sigg13puu7guWYsENpkFcxX37\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"pubkey\": \"tpubDA9GDAntyJu4SdocLNjs7Wf3uJhQHogf5PrW4uNAZYDD5zqeDsTgspAVH5CebQj7shSXQTer6pozKE3v4PgdhMh8d1Cb3yj69jSsCDMAUdo\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"mstJZ6Ft16V5dtm8fJVNdsXTxM6i2kmth3\",\n \"pubkey\": \"tpubDA9GDAntyJu51uHifRrbcys4bAV7qchUc22JWgj1dD8KFceqj8dm2kPNaEDwEozC3ZwCWWQPGxoHsLGcMPHSUj1dnvpDfu4V34jYuzgzcY4\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"mvp9uCJ88RTw9CnnVg1Q6nHqJoSMtnp1ny\",\n \"pubkey\": \"tpubDA9GDAntyJu4FPrYvBKZyXxRYgVvJ2SUQcVosjFKU7tqQTwF1SgDjvecUQKPLwLJQcq7rm3czYGq3ZB9esjGHsBAu2uCeocz6QLtpXfsTn7\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"mwNvtjtXgVCiFHcUJeMRcZX3JYh6TX5vpN\",\n \"pubkey\": \"tpubDA9GDAntyJu4KXNr6WimYTpFBVwMiD1MBmiP9L4HFHiqxSiNRuuH4pwPmW34BGdw3mKKqyqoks5CGrNhwDrhYtYsGtrgAPT9jtAzPDa5pho\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"my1xvo9fLE5a9xquR1kLNZAnCkz1kAqwfS\",\n \"pubkey\": \"tpubDA9GDAntyJu4R1uSbBJH59kskMXcg3DNqhceGc1sieH1AGqzTJogRJsiccSbfKZVZSDPduFvonv5aHP8gdCFnnLBqqtnUhUPtKn88p6XDba\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"myBEJneeThpAaF2yeJFDSorvi9LbkHzZ8v\",\n \"pubkey\": \"tpubDA9GDAntyJu4jmCZ3jJEYRXZUttRojdQ2cgGcEGSxxGKtaRr4ZMknmLipVvpwnE3eEn4KPMKjRCdqM6cMKsZYL2iAomgbobBB9D3fSpATz2\",\n \"used_times\": 0\n },\n {\n \"account\": \"n2afYo1ozCKSiLhZ2s4rwCpp7ibLwm8akH\",\n \"address\": \"mywfJLDgnxoJZxhu3a3VdeFQ6ftvbLLVmb\",\n \"pubkey\": \"tpubDA9GDAntyJu5113kbsS7WYGGqzZqQFVhPurwXMNXSsJFqYxxZBkKMZt68AK91Yf4wzLwu6EttKHLsZ8P8wqjMoF9XRi5w1xLqmZRWMjfL7f\",\n \"used_times\": 0\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 53,\n \"total_pages\": 3\n }\n}" + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mg2NERbtPAEA8C7ES2Rz4jdrrJiDCCdWmH\",\n \"pubkey\": \"tpubDA9GDAntyJu4at3suvUYotfBtxtiazhFD5Pogs6acYsWEbWaQWt4y8tqsrt5hXdo5S2X58amQ2McJfRYW2YSR8b52hjicdYvc2KYZ41Vb1X\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mgKiqvmz3wgJ2XgBigbVZiQ7VQ9LTjvvoj\",\n \"pubkey\": \"tpubDA9GDAntyJu4vg4ZF2xqV7Yt159uArMpcsQTTErYCdrS1wi6HhLWDDrV7EQiU96nrniLjGBHWM8jQpymT4c58bHFb7FgM6Bfqcso93iXpvj\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mgSfjS4VkrkFz3dEwy26DXezpetUN4oX4J\",\n \"pubkey\": \"tpubDA9GDAntyJu4KFBpzZG3NrPyugTy2zpXwXZi1mDpvwW4tfjtAgZZyJ2pjt395sB4FyW5SXHYrnuWyNK8rfECcH1enNs9Dnz6Mt9hyrPLvHD\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mgqeQ2stZJrPrWfpRTnxUJs5rfzuHeFphm\",\n \"pubkey\": \"tpubDA9GDAntyJu4hFaK3tfXbZPD5YEbz6k7RowjKgzjBBuhTZVPfeHfFw2NS2ZcpBvE6cTCrmXo5yJ3EDdFHjZM5LSpJCMwC2r7y3JrY1RCLeo\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"miAQbjwqBsJCVwbBxY1VyQFh4HP1LGfk3F\",\n \"pubkey\": \"tpubDA9GDAntyJu4VqvoXeKr1SJNn7dncCgzcDycvNKYk86NhU785JHdBRqjsMtnGtc7JTWKRSkdpmdtPGozvLtiS5SCuJw69kqDYB1EFmDSXBQ\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"miwoedeKZncJhuw5kn6ecMm9P97QF21iGw\",\n \"pubkey\": \"tpubDA9GDAntyJu4U6GkK7hPQ2pdwatdFVjPsyPuPQapt6PsEAkSdGAFuJwXhzLYsp8eQSmUJLZR6WH95tezrGGeaH5XsZHaUssdeYRfswjNxyM\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mizmHkQq1XgNdq1WbTkMpkXYDD6tqfLD7b\",\n \"pubkey\": \"tpubDA9GDAntyJu4HhPBMBLfHfLbAW1NHiYHAnjoX1dv8fXqFb9497Cp8jxCaK2FTQJQyKUf7MFVsmJcBccBoLTKiFbcYDFZS8wmC5UKkj7gw6h\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mjiinNeUAhoYMqyQm4bUXAM2J4M2gaqbUd\",\n \"pubkey\": \"tpubDA9GDAntyJu4F8nKEdAUptDsLSctszvPq3egNzFRQqsZMpzid1AXGmyrjZN7UWNMwLkVGkrvvyUeFwhFfWv2Vz2Z5L3DEQj1To5xkrsnTtf\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mkPBRdjioKsGgEykieJMUUZd5NqEt6WrS7\",\n \"pubkey\": \"tpubDA9GDAntyJu4uGeMmv5WSkRM4YLmu9qQGjvVsw29FZ2v4VYiEBYyUbAstGJZPc9QXMeg91EUNRxc6SfjasZbhszZpZPGNMhyCd7dFGmUTwo\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mkvHrPakuZ76fTy1fzAVMVXhXhbvkZ3GAG\",\n \"pubkey\": \"tpubDA9GDAntyJu4ME9SKj2EDughs9HkL7a2UffkzhDBscnrxq7GaqJ2h2CPmz2qG9XCMswsBjcaSnViy11YYeeUFoCEZUsNnK8VaykLxAEWy3A\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mm8513wykTEzgSAqBPtdq9Ai9qBDBn8nxN\",\n \"pubkey\": \"tpubDA9GDAntyJu4HgCM5xTNWezdF2P3a9iwQxoL43LLpKvieYmyN69LoNmCssgSL9KZAcwHExvRFraf6jMkyyhLegKxuzqixh1BaYWx8LjP69S\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mmSmRrq4CDj1VbENwN2ZjTqLusaY3Azfvn\",\n \"pubkey\": \"tpubDA9GDAntyJu524kbAUtS8d382CU1qzwPdmsGVHUKXmPYCBG9q6dryB71jc2kr9hkEwZ9pKJXb1v9ZrBPHs6uQZD7pp78pvKT2MqQobyAQvd\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mnJoKk2k9S48448KS6eTiM4tzuQizvBV9F\",\n \"pubkey\": \"tpubDA9GDAntyJu4QZ3bdmza9KmF7oeXgfeR8JTkueLM7irJzQH4TqcMWRG7G9azn4g3B45G4jHt6un4wzkkBWDaCGnSpDevuh1UTLLtqSdnisy\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"moFuZSjjwQCTVfJ3e57QKGUCyTUPxaC12D\",\n \"pubkey\": \"tpubDA9GDAntyJu54KK3mRquWYGRqge5C1B3nFVTDw7aucaQL3bTh5sdRjkCREkQLYf8Ky1kvgrnDq7n27Ve23AGh1zVmEVwPTz7LBDQHqTmM7h\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"moJxiemXwfZ1hEDZHrn1o7Mfq4CNi1m9Ns\",\n \"pubkey\": \"tpubDA9GDAntyJu4rANpygzqjNSfTkncdqAfVYJxfKfgv6A7yGZ4dfNASsrP4VaSctFZ45cQDqR8CThYeFGtAFM3VWABy7aGYPRtHsC5gGQU5KX\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mpN4nJ92JJ4bD3VuUK43xRmQrF6i4qMgQt\",\n \"pubkey\": \"tpubDA9GDAntyJu4QS4bLXoezLnzqW8tTZQijhv9e3RR1uLXVrd7vR5nj1kdp4riengATZrAtL5f4F8wU4U6dPBw9uzGD54f6SFCmHD3MgA1JZn\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mpSRtWkpqpFx7er7WLht7TtinwkwA333Et\",\n \"pubkey\": \"tpubDA9GDAntyJu4zK5U61UpMDKCpZxM3QZJaivcRAneNz727sSFjkxroaM8uuKvu6rDE2HHxCwepsB6XPRwu1qxRvwb7eeU8oD2cXtcDXusMSA\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mpyJHWXkHT6DeYywY8QPERuHNWRAfQdDqq\",\n \"pubkey\": \"tpubDA9GDAntyJu4nrqEVq2Wjjo8PvKtNtdUE8Z4MfESkCTAtuyCBnXzEgvsafSZHatxVop6KFR9etdLQgGwWKR4G6oj8v1QyKjKbRMbxkadwvo\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mrX24nUWrYRyS9Ga9x37vdHGn9rDfwdzp4\",\n \"pubkey\": \"tpubDA9GDAntyJu4YqyKxxSxJKHPyxqyqae16JC2XqevAE5pPPGB9Tz2ysrcebRCHXDc7pDEiWxRa75hscHgd917HdBXE6hcg7wZ54D1vivmB7D\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"ms9VPsDDLSnjF7hfdvLi7yRgKBkehFYgR9\",\n \"pubkey\": \"tpubDA9GDAntyJu4NoTVLeq2xRUgwbu5cw4m62DeJZz1EryENnn4nwRpG3Fyk6TqVRRbzZ6kZeY8Sv7YsqVZMisR4rYinJY3sMEXuwrd9E6mGr1\",\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\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\"}}' http://localhost:5279/", - "lbrynet": "lbrynet address list --account_id=\"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\"", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_list\", \"params\": {\"account_id\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\"}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"mfgtY6nPkGrR5XdKKyMsh2gNDbyv76XAiV\",\n \"pubkey\": \"tpubDA9GDAntyJu4qckeu1c3DwGcMirVVxWK5Q8bHrY84KN4ZrZj9cEinGUgdde8aP53txRsuBB5i53UTLQjoU4AXWGgUpS1epiHKsouM5rWbQt\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"mha7tLxPuVaZMJQBBKdMsRsq6WszouRVFS\",\n \"pubkey\": \"tpubDA9GDAntyJu4GUg8GDeLE1CvztaDqqMo27yH2Gv5Pjf4AXhEwzZjSTFVnDmFtXFffzRRZMhKry2h5VafpCXAC1LCa2UBb9wTDgQKqcmMYE4\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"mhhP5V3SXymVzNb4UR6SE698yofBHJD4QB\",\n \"pubkey\": \"tpubDA9GDAntyJu4FYdD8Epo4g6Rv5h6ANpvWdeQLRMoP6k7VFDEYxXf4RwfofXaN62u9gyJBPS9zxpUAErtKT4Sqa9HQpU2bXUByd478d3yBBW\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"mjwQA92XESeWhf2kTqxZdmLbhckxLJsBVo\",\n \"pubkey\": \"tpubDA9GDAntyJu4P4cmiuqPu3hs4ab72UoxuDFGu86z6kgEV8mbmbP2U7JZqscKENiHvk89JnHpY4yasd24dugTBBhdvtSA47XSov77xZ9wu8T\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"mkpQ3asNKrv9grA6Uam9h4FXnj38JtZYME\",\n \"pubkey\": \"tpubDA9GDAntyJu4LmYZK8GZArTNA2A1YjMbRqbbzJvNU8XJTHQqxsNpvP9GwbTqiMzP8ysotZ3vkLHtGZT7jJ3cQMTEVfw2zeTN8ivs1bPdiKj\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"mnAo9ooNtenR9TQAQzNiGVwAB9Tvpvvs6w\",\n \"pubkey\": \"tpubDA9GDAntyJu55fes82LsZS1RrTcvKEuXVYc3inRrXKPbBmvxAfhMmRnKmypbpPe5ehyKSLc8pWrGV16tVNyWNpDTBqieehsLJKDZVAxsJ8a\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"mnocJcFSWyp5ow8QuXJnDq4FJB2nVhVz9p\",\n \"pubkey\": \"tpubDA9GDAntyJu4Rmrv5wAwiwBAKSYqmby3CM8isDNqHQ1rhPWNRqyuEJztR5XiBePro29VSeK39JBHNRLPGcB7ykCCGksYKCTSgn7zr4cULeX\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"mo8exN32uhTVQHCZwBixRrJ4bktWi8xcXX\",\n \"pubkey\": \"tpubDA9GDAntyJu4UPU4cNxSqKrX3nLbPLxVaFxkQC7SL4kNLaVve5V2VvNVJdWfCc8HVMA49wseFSoK5S5gRCc7jCjtPydRJR6ziY9gXRNgUb3\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"mpog29Dn2TaQKSWda7PERJPiZBPeRPQ3KM\",\n \"pubkey\": \"tpubDA9GDAntyJu4T7K1yVHtTR7xnZju8Zr68NGCv4XfPJ3TptM2esyHeVSMNLHb38n4WK4VrS9ka1Jwbz57ZGZpdNF3FYTTgvBwvze4DJNHPaa\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"msKqrjZAvymscspkCS5UZCLUqu7VtSdHiF\",\n \"pubkey\": \"tpubDA9GDAntyJu4k2YQxaPvLqhZeLANmTCUmUinQiVT6AmqK9fn1Dwcs6it7x1rxPWbeP3v6C6QFqqMLqN9C83LQex2WPvZFycdpfwMRHKvnAS\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"msUZ3XJWfSwVHBZNyTXF6vZTRkt7ho5ukd\",\n \"pubkey\": \"tpubDA9GDAntyJu4YNneveq3hKVJGxnjpK8mA1oKiWVKPwRuAHeqTnKhZ9Ld14fH8vW9aS2skQU1NbQ1Sb21Lec2QRtWjLQuvdm4NebJBvXbqYr\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"mspzoJvS2NC4aseK2BDNVBHv9PdLFJfvyW\",\n \"pubkey\": \"tpubDA9GDAntyJu4dtAi76MNW6bmuQhcZztcGmQybKJVZdy2z4aJs5DqV9TiisfGrsffzwvSZ8tiqvHeKKbgfhhB5Fz8R3KLkwbJqsGBnP5RZPR\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"mtsN6Q2fRLizSryKXGCb1sqeUUxLtqZ8vh\",\n \"pubkey\": \"tpubDA9GDAntyJu4FHWKwjtdVXGuSt3sGZWixAscqs7mvFYYS7bF3bgvQEXJgtjM9LTN5xrvY3cSx2TuFn4SWkktQQnSooxPfMbw5RJt4hPiYnz\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"mtwvKhMYzLnqcjhK4AYWa9UEMQWSYwRQoU\",\n \"pubkey\": \"tpubDA9GDAntyJu4vhDocejVWsaR3zBrCva2tXjCHkWrZzRGg3T2i7dEFqPr9BfsDakdGs8NaisdQetcgh9sDUrJgsNiUqJTp2sfzL81RZy8dvT\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"mxHPt8g7PkoTeEUGSmK99yeFP9rv9GFVLC\",\n \"pubkey\": \"tpubDA9GDAntyJu4uvKQxxvrJkdXrtXV5YjHyCLf8mYtUPKnA6A52qqb8FmA6JKL7RU9XjBjkgEktgUvGRupwRG7XKD2CeuptX6LgSHcBvxfhYj\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"my2tRvcBmWUgXx8nJPeK8JE48gLUr4Gzmt\",\n \"pubkey\": \"tpubDA9GDAntyJu512GDEWkPc3NHZJameKEEzXgTbNsMijrXJxYzNQPMndbr3sM2bfsDPRSd8Hzw8TKBrE4oVKJ9s5HJqZNjYr84we4BKw3qmkW\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"myPafPXALReJvMxnaWzpdnkyZDqkEBvngZ\",\n \"pubkey\": \"tpubDA9GDAntyJu4n9PADe7o3hqPzWLfKyXSdbePsichQAeSeKjzbhjqdwBbD1BasRiwFAHFt2hjVu2RXPrbyXR3TmQWUdotinRZ9wBGEXMNmyo\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"mzdgmtHqyNSLbCuPKdFZMZ1hmhFWFURJj1\",\n \"pubkey\": \"tpubDA9GDAntyJu4WdwzdP2yeMa6QD3dqCHzoQcvGn5BnzNxsJdMKiGDe55SB5x6fQDN7g6i4MPoUpBV6aWAnEgc9fkPRxNUsELYW9DFYwbrkAY\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"n269KLafodzh82dKm3iuYjqZ39t4s1mMFd\",\n \"pubkey\": \"tpubDA9GDAntyJu51tx8B1jf9TEDzg16BddNJfNKVn26sXHq3599p2JpnURGjz5zhnoZwzGuv2Qo6AqjjTZqpMCpbc9aNgfZpHT7bam3x7VwAAd\",\n \"used_times\": 0\n },\n {\n \"account\": \"n3oiUUFS65baTaQkv1eBtWxEPoKFrBPFvx\",\n \"address\": \"n29S9vUzTHpREcp9ebfVXsojuQPqLWabNQ\",\n \"pubkey\": \"tpubDA9GDAntyJu4hkgvmSr3GQnPXpKg8SqF8p4iuSY1jUvxqUHcZ3tjUVcky4861FxDX3eUFfLUUJw9woxvp31UeH7qPfYwAHXhHJ3Aef8fZCf\",\n \"used_times\": 0\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 26,\n \"total_pages\": 2\n }\n}" + "curl": "curl -d'{\"method\": \"address_list\", \"params\": {\"account_id\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\"}}' http://localhost:5279/", + "lbrynet": "lbrynet address list --account_id=\"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\"", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_list\", \"params\": {\"account_id\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\"}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mg2NERbtPAEA8C7ES2Rz4jdrrJiDCCdWmH\",\n \"pubkey\": \"tpubDA9GDAntyJu4at3suvUYotfBtxtiazhFD5Pogs6acYsWEbWaQWt4y8tqsrt5hXdo5S2X58amQ2McJfRYW2YSR8b52hjicdYvc2KYZ41Vb1X\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mgKiqvmz3wgJ2XgBigbVZiQ7VQ9LTjvvoj\",\n \"pubkey\": \"tpubDA9GDAntyJu4vg4ZF2xqV7Yt159uArMpcsQTTErYCdrS1wi6HhLWDDrV7EQiU96nrniLjGBHWM8jQpymT4c58bHFb7FgM6Bfqcso93iXpvj\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mgSfjS4VkrkFz3dEwy26DXezpetUN4oX4J\",\n \"pubkey\": \"tpubDA9GDAntyJu4KFBpzZG3NrPyugTy2zpXwXZi1mDpvwW4tfjtAgZZyJ2pjt395sB4FyW5SXHYrnuWyNK8rfECcH1enNs9Dnz6Mt9hyrPLvHD\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mgqeQ2stZJrPrWfpRTnxUJs5rfzuHeFphm\",\n \"pubkey\": \"tpubDA9GDAntyJu4hFaK3tfXbZPD5YEbz6k7RowjKgzjBBuhTZVPfeHfFw2NS2ZcpBvE6cTCrmXo5yJ3EDdFHjZM5LSpJCMwC2r7y3JrY1RCLeo\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"miAQbjwqBsJCVwbBxY1VyQFh4HP1LGfk3F\",\n \"pubkey\": \"tpubDA9GDAntyJu4VqvoXeKr1SJNn7dncCgzcDycvNKYk86NhU785JHdBRqjsMtnGtc7JTWKRSkdpmdtPGozvLtiS5SCuJw69kqDYB1EFmDSXBQ\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"miwoedeKZncJhuw5kn6ecMm9P97QF21iGw\",\n \"pubkey\": \"tpubDA9GDAntyJu4U6GkK7hPQ2pdwatdFVjPsyPuPQapt6PsEAkSdGAFuJwXhzLYsp8eQSmUJLZR6WH95tezrGGeaH5XsZHaUssdeYRfswjNxyM\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mizmHkQq1XgNdq1WbTkMpkXYDD6tqfLD7b\",\n \"pubkey\": \"tpubDA9GDAntyJu4HhPBMBLfHfLbAW1NHiYHAnjoX1dv8fXqFb9497Cp8jxCaK2FTQJQyKUf7MFVsmJcBccBoLTKiFbcYDFZS8wmC5UKkj7gw6h\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mjiinNeUAhoYMqyQm4bUXAM2J4M2gaqbUd\",\n \"pubkey\": \"tpubDA9GDAntyJu4F8nKEdAUptDsLSctszvPq3egNzFRQqsZMpzid1AXGmyrjZN7UWNMwLkVGkrvvyUeFwhFfWv2Vz2Z5L3DEQj1To5xkrsnTtf\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mkPBRdjioKsGgEykieJMUUZd5NqEt6WrS7\",\n \"pubkey\": \"tpubDA9GDAntyJu4uGeMmv5WSkRM4YLmu9qQGjvVsw29FZ2v4VYiEBYyUbAstGJZPc9QXMeg91EUNRxc6SfjasZbhszZpZPGNMhyCd7dFGmUTwo\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mkvHrPakuZ76fTy1fzAVMVXhXhbvkZ3GAG\",\n \"pubkey\": \"tpubDA9GDAntyJu4ME9SKj2EDughs9HkL7a2UffkzhDBscnrxq7GaqJ2h2CPmz2qG9XCMswsBjcaSnViy11YYeeUFoCEZUsNnK8VaykLxAEWy3A\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mm8513wykTEzgSAqBPtdq9Ai9qBDBn8nxN\",\n \"pubkey\": \"tpubDA9GDAntyJu4HgCM5xTNWezdF2P3a9iwQxoL43LLpKvieYmyN69LoNmCssgSL9KZAcwHExvRFraf6jMkyyhLegKxuzqixh1BaYWx8LjP69S\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mmSmRrq4CDj1VbENwN2ZjTqLusaY3Azfvn\",\n \"pubkey\": \"tpubDA9GDAntyJu524kbAUtS8d382CU1qzwPdmsGVHUKXmPYCBG9q6dryB71jc2kr9hkEwZ9pKJXb1v9ZrBPHs6uQZD7pp78pvKT2MqQobyAQvd\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mnJoKk2k9S48448KS6eTiM4tzuQizvBV9F\",\n \"pubkey\": \"tpubDA9GDAntyJu4QZ3bdmza9KmF7oeXgfeR8JTkueLM7irJzQH4TqcMWRG7G9azn4g3B45G4jHt6un4wzkkBWDaCGnSpDevuh1UTLLtqSdnisy\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"moFuZSjjwQCTVfJ3e57QKGUCyTUPxaC12D\",\n \"pubkey\": \"tpubDA9GDAntyJu54KK3mRquWYGRqge5C1B3nFVTDw7aucaQL3bTh5sdRjkCREkQLYf8Ky1kvgrnDq7n27Ve23AGh1zVmEVwPTz7LBDQHqTmM7h\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"moJxiemXwfZ1hEDZHrn1o7Mfq4CNi1m9Ns\",\n \"pubkey\": \"tpubDA9GDAntyJu4rANpygzqjNSfTkncdqAfVYJxfKfgv6A7yGZ4dfNASsrP4VaSctFZ45cQDqR8CThYeFGtAFM3VWABy7aGYPRtHsC5gGQU5KX\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mpN4nJ92JJ4bD3VuUK43xRmQrF6i4qMgQt\",\n \"pubkey\": \"tpubDA9GDAntyJu4QS4bLXoezLnzqW8tTZQijhv9e3RR1uLXVrd7vR5nj1kdp4riengATZrAtL5f4F8wU4U6dPBw9uzGD54f6SFCmHD3MgA1JZn\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mpSRtWkpqpFx7er7WLht7TtinwkwA333Et\",\n \"pubkey\": \"tpubDA9GDAntyJu4zK5U61UpMDKCpZxM3QZJaivcRAneNz727sSFjkxroaM8uuKvu6rDE2HHxCwepsB6XPRwu1qxRvwb7eeU8oD2cXtcDXusMSA\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mpyJHWXkHT6DeYywY8QPERuHNWRAfQdDqq\",\n \"pubkey\": \"tpubDA9GDAntyJu4nrqEVq2Wjjo8PvKtNtdUE8Z4MfESkCTAtuyCBnXzEgvsafSZHatxVop6KFR9etdLQgGwWKR4G6oj8v1QyKjKbRMbxkadwvo\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"mrX24nUWrYRyS9Ga9x37vdHGn9rDfwdzp4\",\n \"pubkey\": \"tpubDA9GDAntyJu4YqyKxxSxJKHPyxqyqae16JC2XqevAE5pPPGB9Tz2ysrcebRCHXDc7pDEiWxRa75hscHgd917HdBXE6hcg7wZ54D1vivmB7D\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnU5HSxQS2e1ZMt9AMRj6BzUhjCk8b46GB\",\n \"address\": \"ms9VPsDDLSnjF7hfdvLi7yRgKBkehFYgR9\",\n \"pubkey\": \"tpubDA9GDAntyJu4NoTVLeq2xRUgwbu5cw4m62DeJZz1EryENnn4nwRpG3Fyk6TqVRRbzZ6kZeY8Sv7YsqVZMisR4rYinJY3sMEXuwrd9E6mGr1\",\n \"used_times\": 0\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 26,\n \"total_pages\": 2\n }\n}" } ] }, @@ -845,7 +875,7 @@ "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\": \"my1xvo9fLE5a9xquR1kLNZAnCkz1kAqwfS\"\n}" + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": \"n26Ruaur9Urn4jw5jrnav4shRsZt56bCVy\"\n}" } ] } @@ -895,10 +925,10 @@ "examples": [ { "title": "Delete a blob", - "curl": "curl -d'{\"method\": \"blob_delete\", \"params\": {\"blob_hash\": \"ef48171f5db25ac605fdb0a569f9b45d3f73efc6fd74ce636edd43b2fed341a9f4c9ec619e248f5a5a3e240cfa2e2936\"}}' http://localhost:5279/", - "lbrynet": "lbrynet blob delete ef48171f5db25ac605fdb0a569f9b45d3f73efc6fd74ce636edd43b2fed341a9f4c9ec619e248f5a5a3e240cfa2e2936", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"blob_delete\", \"params\": {\"blob_hash\": \"ef48171f5db25ac605fdb0a569f9b45d3f73efc6fd74ce636edd43b2fed341a9f4c9ec619e248f5a5a3e240cfa2e2936\"}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": \"Deleted ef48171f5db25ac605fdb0a569f9b45d3f73efc6fd74ce636edd43b2fed341a9f4c9ec619e248f5a5a3e240cfa2e2936\"\n}" + "curl": "curl -d'{\"method\": \"blob_delete\", \"params\": {\"blob_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\"}}' http://localhost:5279/", + "lbrynet": "lbrynet blob delete 63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"blob_delete\", \"params\": {\"blob_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\"}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": \"Deleted 63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\"\n}" } ] }, @@ -976,7 +1006,7 @@ "curl": "curl -d'{\"method\": \"blob_list\", \"params\": {\"needed\": false, \"finished\": false}}' http://localhost:5279/", "lbrynet": "lbrynet blob list", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"blob_list\", \"params\": {\"needed\": false, \"finished\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n \"ef48171f5db25ac605fdb0a569f9b45d3f73efc6fd74ce636edd43b2fed341a9f4c9ec619e248f5a5a3e240cfa2e2936\",\n \"87e2a90390f0d7db541542174108e21c9ad7dc06a0d385e4351f3603d67f7b6077cde038371cbecf3c7c5e2d19091f6a\",\n \"5fa36626c774e7137bcabcd0ad97fe5a0428fbf511474a5d61ef5fa81e86781fbab419a3159a4344196216c875f482bc\",\n \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\"\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 4,\n \"total_pages\": 1\n }\n}" + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"0cef3e461b5a2f4f1bbf009a852659ccb754a8a2da39cdee3e92543535af1c2bd600ea65446072b305b499d3555b6737\",\n \"273e718afaa2a7fb5ccdf3d14e63e81c6a2359deaa1bcc5e6d6bfded7f91157badab2f56e3bdd433f96292658b2c763e\",\n \"bac3bf82dd819d7d635e0b7e7e67a931ffb1510a33ec2226b850a107a9b31d63e43b96ccfe906e73d122845a84d4baf8\"\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 4,\n \"total_pages\": 1\n }\n}" } ] }, @@ -1057,10 +1087,10 @@ "examples": [ { "title": "Abandon a channel claim", - "curl": "curl -d'{\"method\": \"channel_abandon\", \"params\": {\"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\", \"preview\": false, \"blocking\": false}}' http://localhost:5279/", - "lbrynet": "lbrynet channel abandon f69dbfa313c090198f5259354c70474beade9e69", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_abandon\", \"params\": {\"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\", \"preview\": false, \"blocking\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"010000000167a7299761a43950c4f04955968b8097da53078fdabfcdf0009c829fcdeefac1000000006b483045022100ee84fa9d046e4e44353fbd6c38da78ad4493ac5aba1fb518d8b04559e35fbae80220507d6fef1e1944df961f53f3dd68437360831fb0bbb03b5eca7e0d2e0739e2ee0121021bb4d5cfaa5ba3e451821972ca95ea50246d4742a8fea350abf0e2e45c38fc3fffffffff0134b7f505000000001976a91458034da3f78b9b74eb666a644cede70d1e2e277f88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_op\": \"update\",\n \"confirmations\": 8,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"timestamp\": 1584835932,\n \"txid\": \"c1faeecd9f829c00f0cdbfda8f0753da97808b965549f0c45039a4619729a767\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51\",\n \"public_key_id\": \"muET7bMJFJa3PYo5UhPAE1nJHXKWfktBtx\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"moYKiT8DWkSm1xgYVRbwm4tuF2w5i5Ffwz\",\n \"amount\": \"0.999893\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"b0fde59ffc4ee208753b1fcf241727e5dbef57eb2e68d0db20d6f60d51b712dc\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000107\",\n \"total_input\": \"1.0\",\n \"total_output\": \"0.999893\",\n \"txid\": \"b0fde59ffc4ee208753b1fcf241727e5dbef57eb2e68d0db20d6f60d51b712dc\"\n }\n}" + "curl": "curl -d'{\"method\": \"channel_abandon\", \"params\": {\"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\", \"preview\": false, \"blocking\": false}}' http://localhost:5279/", + "lbrynet": "lbrynet channel abandon 304613c5db3e0439d3aeac2183296aaeaf49a328", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_abandon\", \"params\": {\"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\", \"preview\": false, \"blocking\": false}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001c3fa1809f13a5b160c6136e759e32cd6d8d0ef309d566c7cf8ff1074be1c4e1b000000006b4830450221009fec41103c3464a08d98b8e177ae35e4b6549a5f532ddb70246bdd3010aac75902207c06d1c511beb95f7a0fcd773ded1248e3e1f42491cef9eba3328d6beb8850ba012102e8e98ecb426bb86ecb8217a04d1e6224ea49d619c19350da6e50f7a1f76ab3a5ffffffff0134b7f505000000001976a91481e88231b34fdf9914e77f7baeb3be6af516fb7788ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mn8TLwsBKAhp3hBdmqFBriYMP1pKbWmCkQ\",\n \"amount\": \"1.0\",\n \"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_op\": \"update\",\n \"confirmations\": 8,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"timestamp\": 1466680331,\n \"txid\": \"1b4e1cbe7410fff87c6c569d30efd0d8d62ce359e736610c165b3af10918fac3\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638\",\n \"public_key_id\": \"mjP2THCJ1MFjmsmw8nRK5Wd3BfehMSHSEs\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"msMqzn8MYsBoKJAALBVAuiMZ3H87RWfen2\",\n \"amount\": \"0.999893\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": 1466646266,\n \"txid\": \"7b84fd4b4f83ab0734ba6c216e9272787b9ff90141aede9f926515bb563aa28e\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000107\",\n \"total_input\": \"1.0\",\n \"total_output\": \"0.999893\",\n \"txid\": \"7b84fd4b4f83ab0734ba6c216e9272787b9ff90141aede9f926515bb563aa28e\"\n }\n}" } ] }, @@ -1190,14 +1220,14 @@ "curl": "curl -d'{\"method\": \"channel_create\", \"params\": {\"name\": \"@channel\", \"bid\": \"1.0\", \"featured\": [], \"tags\": [], \"languages\": [], \"locations\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}' http://localhost:5279/", "lbrynet": "lbrynet channel create @channel 1.0", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_create\", \"params\": {\"name\": \"@channel\", \"bid\": \"1.0\", \"featured\": [], \"tags\": [], \"languages\": [], \"locations\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001b96ca745bdd8d31eb2ec315d0fe657a8a7a000de9a0c86f86cd2ab76ecde9456010000006a47304402205a1acfec542fbd9a0f531d518d1b5c470d49c6d0adb2d5b2c9a860300f11d4da022030a8c2358fe3476c6d2b3f9887e70c854849af45275e8a84438d46c3a1578d16012103b47f496da24027eed24d3596e2b9d0a877bbea35535160f048822ca2602d7a40ffffffff0200e1f5050000000084b508406368616e6e656c4c5d00125a0a583056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c516d7576a91478fcb214c44604e5be6a977d33eecfae2052bfd588acc462a029000000001976a9143a893c434390421e0ab56beae94470208810790488ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mgK1LBxVWBFUiesotg7ixBcWUEySBi7zD7\",\n \"amount\": \"7.999876\",\n \"confirmations\": 2,\n \"height\": 207,\n \"is_spent\": false,\n \"nout\": 1,\n \"timestamp\": 1584835932,\n \"txid\": \"5694deec76abd26cf8860c9ade00a0a7a857e60f5d31ecb21ed3d8bd45a76cb9\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_op\": \"create\",\n \"confirmations\": -2,\n \"has_signing_key\": true,\n \"height\": -2,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"timestamp\": null,\n \"txid\": \"25b4dff8f31ec7a5c8ba2240f45b19b51558dc0658454f9c685c5ffaf59397b8\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51\",\n \"public_key_id\": \"muET7bMJFJa3PYo5UhPAE1nJHXKWfktBtx\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mkrTtToujmYnuaxXpkg4GZKDMEU1myVTyH\",\n \"amount\": \"6.983769\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"25b4dff8f31ec7a5c8ba2240f45b19b51558dc0658454f9c685c5ffaf59397b8\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.016107\",\n \"total_input\": \"7.999876\",\n \"total_output\": \"7.983769\",\n \"txid\": \"25b4dff8f31ec7a5c8ba2240f45b19b51558dc0658454f9c685c5ffaf59397b8\"\n }\n}" + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000018b2696ad1143df1ec2e29474867d5c7d521a0f2f4af1fc2967577d8a1c7303de010000006a473044022004a59dffc4b9dc47a8c6b5d88aac2ec5280a9ed9180960a8fdb9b0aa06ab9db502206308904bef9e34afde0fd5eaa36ea28827634bbd179cb89bcead7cb2fcdb966a012102f699883d795469b9983e6d9353dcfca47a2e2cb05e6ce427731090a902b1e6c2ffffffff0200e1f5050000000084b508406368616e6e656c4c5d00125a0a583056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c6386d7576a9144887901f6fc283acfbadc1b194e042ad19145ebd88acc462a029000000001976a914e7e11b1e988a86f680f5968df5b449822c0e497188ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mz5KdgkPjuzRAnBuivAdfeg49qMuvSNPMo\",\n \"amount\": \"7.999876\",\n \"confirmations\": 2,\n \"height\": 207,\n \"is_spent\": false,\n \"nout\": 1,\n \"timestamp\": 1466679849,\n \"txid\": \"de03731c8a7d576729fcf14a2f0f1a527d5c7d867494e2c21edf4311ad96268b\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mn8TLwsBKAhp3hBdmqFBriYMP1pKbWmCkQ\",\n \"amount\": \"1.0\",\n \"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_op\": \"create\",\n \"confirmations\": -2,\n \"has_signing_key\": true,\n \"height\": -2,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"timestamp\": 1466646266,\n \"txid\": \"6093877c7f4a7d662480afd9d63affdefa9bc0949cc4d22ae4cd5fac8d3af8a1\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638\",\n \"public_key_id\": \"mjP2THCJ1MFjmsmw8nRK5Wd3BfehMSHSEs\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"n2f241395dLShG7ccmpZKUSfR7YFitLnbr\",\n \"amount\": \"6.983769\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": 1466646266,\n \"txid\": \"6093877c7f4a7d662480afd9d63affdefa9bc0949cc4d22ae4cd5fac8d3af8a1\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.016107\",\n \"total_input\": \"7.999876\",\n \"total_output\": \"7.983769\",\n \"txid\": \"6093877c7f4a7d662480afd9d63affdefa9bc0949cc4d22ae4cd5fac8d3af8a1\"\n }\n}" }, { "title": "Create a channel claim with all metadata", "curl": "curl -d'{\"method\": \"channel_create\", \"params\": {\"name\": \"@bigchannel\", \"bid\": \"1.0\", \"title\": \"Big Channel\", \"description\": \"A channel with lots of videos.\", \"email\": \"creator@smallmedia.com\", \"website_url\": \"http://smallmedia.com\", \"featured\": [], \"tags\": [\"music\", \"art\"], \"languages\": [\"pt-BR\", \"uk\"], \"locations\": [\"BR\", \"UA::Kiyv\"], \"thumbnail_url\": \"http://smallmedia.com/logo.jpg\", \"cover_url\": \"http://smallmedia.com/logo.jpg\", \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}' http://localhost:5279/", "lbrynet": "lbrynet channel create @bigchannel 1.0 --title=\"Big Channel\" --description=\"A channel with lots of videos.\" --email=\"creator@smallmedia.com\" --tags=music --tags=art --languages=pt-BR --languages=uk --locations=BR --locations=UA::Kiyv --website_url=\"http://smallmedia.com\" --thumbnail_url=\"http://smallmedia.com/logo.jpg\" --cover_url=\"http://smallmedia.com/logo.jpg\"", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_create\", \"params\": {\"name\": \"@bigchannel\", \"bid\": \"1.0\", \"title\": \"Big Channel\", \"description\": \"A channel with lots of videos.\", \"email\": \"creator@smallmedia.com\", \"website_url\": \"http://smallmedia.com\", \"featured\": [], \"tags\": [\"music\", \"art\"], \"languages\": [\"pt-BR\", \"uk\"], \"locations\": [\"BR\", \"UA::Kiyv\"], \"thumbnail_url\": \"http://smallmedia.com/logo.jpg\", \"cover_url\": \"http://smallmedia.com/logo.jpg\", \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"010000000167a7299761a43950c4f04955968b8097da53078fdabfcdf0009c829fcdeefac1010000006a47304402205abd38f8adeb3950adf264fab7c68a119b219b3b48dd3ff8c77b97309f181c2402204f162fe003deed1cd45d36de0aee4db86e392d63c47c95a97ff6c80d88a25ff2012103277bb0de96148191bfff2e88566ed19220fd353a6683c46450065b19bd89f632ffffffff0200e1f50500000000fd5001b50b406269676368616e6e656c4d25010012ab010a583056301006072a8648ce3d020106052b8104000a0342000486cb373c7368441a86e776e174e43dc11789ccfb4e8bc8db0780c001139873270e23fb3b3fbe2d9b0f4313bd99269b923828248d79a41d1fa4609437f5aa4f34121663726561746f7240736d616c6c6d656469612e636f6d1a15687474703a2f2f736d616c6c6d656469612e636f6d22202a1e687474703a2f2f736d616c6c6d656469612e636f6d2f6c6f676f2e6a7067420b426967204368616e6e656c4a1e41206368616e6e656c2077697468206c6f7473206f6620766964656f732e52202a1e687474703a2f2f736d616c6c6d656469612e636f6d2f6c6f676f2e6a70675a056d757369635a0361727462050883011820620308ab016a0208206a0908e9011a044b6979766d7576a914bff6bae31870d227836a10646b4c6e8a689d4a3488ace221d305000000001976a914a7caa56e590e012321070767227fac92b3b5f7bd88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mhrLhT3w1bhsvLCu6RMPMmpyKu6CNcHZzt\",\n \"amount\": \"1.9993355\",\n \"confirmations\": 1,\n \"height\": 210,\n \"is_spent\": false,\n \"nout\": 1,\n \"timestamp\": 1584835932,\n \"txid\": \"c1faeecd9f829c00f0cdbfda8f0753da97808b965549f0c45039a4619729a767\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"my1xvo9fLE5a9xquR1kLNZAnCkz1kAqwfS\",\n \"amount\": \"1.0\",\n \"claim_id\": \"394206bf088e3dc39310896b8df780f2a7f4c6a8\",\n \"claim_op\": \"create\",\n \"confirmations\": -2,\n \"has_signing_key\": true,\n \"height\": -2,\n \"meta\": {},\n \"name\": \"@bigchannel\",\n \"normalized_name\": \"@bigchannel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@bigchannel#394206bf088e3dc39310896b8df780f2a7f4c6a8\",\n \"timestamp\": null,\n \"txid\": \"9ece5795eaea8f86ff81f75897b35999f3b92b8571710aeda7ef79e497d8977a\",\n \"type\": \"claim\",\n \"value\": {\n \"cover\": {\n \"url\": \"http://smallmedia.com/logo.jpg\"\n },\n \"description\": \"A channel with lots of videos.\",\n \"email\": \"creator@smallmedia.com\",\n \"languages\": [\n \"pt-BR\",\n \"uk\"\n ],\n \"locations\": [\n {\n \"country\": \"BR\"\n },\n {\n \"city\": \"Kiyv\",\n \"country\": \"UA\"\n }\n ],\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000486cb373c7368441a86e776e174e43dc11789ccfb4e8bc8db0780c001139873270e23fb3b3fbe2d9b0f4313bd99269b923828248d79a41d1fa4609437f5aa4f34\",\n \"public_key_id\": \"n4JVdpocQMXcmgMZzFccYPRq6Q91adJNwU\",\n \"tags\": [\n \"music\",\n \"art\"\n ],\n \"thumbnail\": {\n \"url\": \"http://smallmedia.com/logo.jpg\"\n },\n \"title\": \"Big Channel\",\n \"website_url\": \"http://smallmedia.com\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mvp9uCJ88RTw9CnnVg1Q6nHqJoSMtnp1ny\",\n \"amount\": \"0.9772285\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"9ece5795eaea8f86ff81f75897b35999f3b92b8571710aeda7ef79e497d8977a\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.022107\",\n \"total_input\": \"1.9993355\",\n \"total_output\": \"1.9772285\",\n \"txid\": \"9ece5795eaea8f86ff81f75897b35999f3b92b8571710aeda7ef79e497d8977a\"\n }\n}" + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001c3fa1809f13a5b160c6136e759e32cd6d8d0ef309d566c7cf8ff1074be1c4e1b010000006a473044022051d1cfde99a9c5ba28d06326f44d6057a03f05beb991a1db9b0045a10d083260022066c6b2129f93a74501c6dc1fd5795d59125351f3906ee1af25d7a622c6e912cc012103e46bef23d6732bd2fc783da723bd296b765ac47cbe64a269b78d076d8ffecc0fffffffff0200e1f50500000000fd5001b50b406269676368616e6e656c4d25010012ab010a583056301006072a8648ce3d020106052b8104000a034200040c0776ef3c7bd287c6c7f252edd4aa950ee40107df604adad221058ba757577328a99d2284f60522b85e08e6e4600df8f86a2d285928bfd04c7ab7447e6c7b80121663726561746f7240736d616c6c6d656469612e636f6d1a15687474703a2f2f736d616c6c6d656469612e636f6d22202a1e687474703a2f2f736d616c6c6d656469612e636f6d2f6c6f676f2e6a7067420b426967204368616e6e656c4a1e41206368616e6e656c2077697468206c6f7473206f6620766964656f732e52202a1e687474703a2f2f736d616c6c6d656469612e636f6d2f6c6f676f2e6a70675a056d757369635a0361727462050883011820620308ab016a0208206a0908e9011a044b6979766d7576a914e1b74ad1ade2dbf1079d148c755f35d5601687f388ace221d305000000001976a9140002186ea235bfc061e9a0fda30c230802085a1f88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mpN1k4fBHJTEdYBd6nBKFvej3rAp9vvcAB\",\n \"amount\": \"1.9993355\",\n \"confirmations\": 1,\n \"height\": 210,\n \"is_spent\": false,\n \"nout\": 1,\n \"timestamp\": 1466680331,\n \"txid\": \"1b4e1cbe7410fff87c6c569d30efd0d8d62ce359e736610c165b3af10918fac3\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"n26Ruaur9Urn4jw5jrnav4shRsZt56bCVy\",\n \"amount\": \"1.0\",\n \"claim_id\": \"97d7d07a00b49769f454345e7ed11621795284bf\",\n \"claim_op\": \"create\",\n \"confirmations\": -2,\n \"has_signing_key\": true,\n \"height\": -2,\n \"meta\": {},\n \"name\": \"@bigchannel\",\n \"normalized_name\": \"@bigchannel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@bigchannel#97d7d07a00b49769f454345e7ed11621795284bf\",\n \"timestamp\": 1466646266,\n \"txid\": \"2e20a8847a25bbe7d7a6b5b137dadfb8b4ab71ed9cfc38b40d24836817d74f76\",\n \"type\": \"claim\",\n \"value\": {\n \"cover\": {\n \"url\": \"http://smallmedia.com/logo.jpg\"\n },\n \"description\": \"A channel with lots of videos.\",\n \"email\": \"creator@smallmedia.com\",\n \"languages\": [\n \"pt-BR\",\n \"uk\"\n ],\n \"locations\": [\n {\n \"country\": \"BR\"\n },\n {\n \"city\": \"Kiyv\",\n \"country\": \"UA\"\n }\n ],\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200040c0776ef3c7bd287c6c7f252edd4aa950ee40107df604adad221058ba757577328a99d2284f60522b85e08e6e4600df8f86a2d285928bfd04c7ab7447e6c7b80\",\n \"public_key_id\": \"mpSDMqMnhxX428hTSAV1GBfmwEvhyNHqsf\",\n \"tags\": [\n \"music\",\n \"art\"\n ],\n \"thumbnail\": {\n \"url\": \"http://smallmedia.com/logo.jpg\"\n },\n \"title\": \"Big Channel\",\n \"website_url\": \"http://smallmedia.com\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mfWzoeWq8tdZJWcMKaWgC2iLHVx6fWtQkB\",\n \"amount\": \"0.9772285\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": 1466646266,\n \"txid\": \"2e20a8847a25bbe7d7a6b5b137dadfb8b4ab71ed9cfc38b40d24836817d74f76\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.022107\",\n \"total_input\": \"1.9993355\",\n \"total_output\": \"1.9772285\",\n \"txid\": \"2e20a8847a25bbe7d7a6b5b137dadfb8b4ab71ed9cfc38b40d24836817d74f76\"\n }\n}" } ] }, @@ -1313,14 +1343,14 @@ "curl": "curl -d'{\"method\": \"channel_list\", \"params\": {\"name\": [], \"claim_id\": [], \"resolve\": false, \"no_totals\": false}}' http://localhost:5279/", "lbrynet": "lbrynet channel list", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_list\", \"params\": {\"name\": [], \"claim_id\": [], \"resolve\": false, \"no_totals\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"has_signing_key\": true,\n \"height\": 209,\n \"is_internal_transfer\": false,\n \"is_my_input\": true,\n \"is_my_output\": true,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"timestamp\": 1584835932,\n \"txid\": \"25b4dff8f31ec7a5c8ba2240f45b19b51558dc0658454f9c685c5ffaf59397b8\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51\",\n \"public_key_id\": \"muET7bMJFJa3PYo5UhPAE1nJHXKWfktBtx\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mn8TLwsBKAhp3hBdmqFBriYMP1pKbWmCkQ\",\n \"amount\": \"1.0\",\n \"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"has_signing_key\": true,\n \"height\": 209,\n \"is_internal_transfer\": false,\n \"is_my_input\": true,\n \"is_my_output\": true,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"timestamp\": 1466680171,\n \"txid\": \"6093877c7f4a7d662480afd9d63affdefa9bc0949cc4d22ae4cd5fac8d3af8a1\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638\",\n \"public_key_id\": \"mjP2THCJ1MFjmsmw8nRK5Wd3BfehMSHSEs\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" }, { "title": "Paginate your channel claims", "curl": "curl -d'{\"method\": \"channel_list\", \"params\": {\"name\": [], \"claim_id\": [], \"page\": 1, \"page_size\": 20, \"resolve\": false, \"no_totals\": false}}' http://localhost:5279/", "lbrynet": "lbrynet channel list --page=1 --page_size=20", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_list\", \"params\": {\"name\": [], \"claim_id\": [], \"page\": 1, \"page_size\": 20, \"resolve\": false, \"no_totals\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"has_signing_key\": true,\n \"height\": 209,\n \"is_internal_transfer\": false,\n \"is_my_input\": true,\n \"is_my_output\": true,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"timestamp\": 1584835932,\n \"txid\": \"25b4dff8f31ec7a5c8ba2240f45b19b51558dc0658454f9c685c5ffaf59397b8\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51\",\n \"public_key_id\": \"muET7bMJFJa3PYo5UhPAE1nJHXKWfktBtx\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mn8TLwsBKAhp3hBdmqFBriYMP1pKbWmCkQ\",\n \"amount\": \"1.0\",\n \"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"has_signing_key\": true,\n \"height\": 209,\n \"is_internal_transfer\": false,\n \"is_my_input\": true,\n \"is_my_output\": true,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"timestamp\": 1466680171,\n \"txid\": \"6093877c7f4a7d662480afd9d63affdefa9bc0949cc4d22ae4cd5fac8d3af8a1\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638\",\n \"public_key_id\": \"mjP2THCJ1MFjmsmw8nRK5Wd3BfehMSHSEs\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" } ] }, @@ -1477,10 +1507,10 @@ "examples": [ { "title": "Update a channel claim", - "curl": "curl -d'{\"method\": \"channel_update\", \"params\": {\"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\", \"title\": \"New Channel\", \"featured\": [], \"clear_featured\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"new_signing_key\": false, \"funding_account_ids\": [], \"preview\": false, \"blocking\": false, \"replace\": false}}' http://localhost:5279/", - "lbrynet": "lbrynet channel update f69dbfa313c090198f5259354c70474beade9e69 --title=\"New Channel\"", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_update\", \"params\": {\"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\", \"title\": \"New Channel\", \"featured\": [], \"clear_featured\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"new_signing_key\": false, \"funding_account_ids\": [], \"preview\": false, \"blocking\": false, \"replace\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000002b89793f5fa5f5c689c4f455806dc5815b5195bf44022bac8a5c71ef3f8dfb425000000006b483045022100ffa5d27dd3a63b38a2ee62abd98858787c4ec7098596f36632ee087780b5876e02206dd4ade3a3b4724bd5a1a6aa3a5474040745355214029846cdabf87d42ba96620121021bb4d5cfaa5ba3e451821972ca95ea50246d4742a8fea350abf0e2e45c38fc3fffffffffd16d2c610ab0ebe86ecc6f4660a032b0cce21005baef868c7a28776372f9435c000000006b4830450221009082778c64690422adc68949a7a3ebd64c8c46672d4dc3e4f8c8c8df7ed1b26702205fab3029410e8f8fad2e733b83b17dc6770fbe1d9827302838c94af72c44b495012102d52b00ac1fe977e49ef0f39ba8f00c215fb127098ba29dd9fb557fa21e705302ffffffff0200e1f50500000000a6b708406368616e6e656c14699edeea4b47704c3559528f1990c013a3bf9df64c6a00125a0a583056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51420b4e6577204368616e6e656c6d6d76a91478fcb214c44604e5be6a977d33eecfae2052bfd588ac6ebeea0b000000001976a914199adb328b1c68f7b1f18d87cd563293b61a1f5688ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"has_signing_key\": true,\n \"height\": 209,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"timestamp\": 1584835932,\n \"txid\": \"25b4dff8f31ec7a5c8ba2240f45b19b51558dc0658454f9c685c5ffaf59397b8\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51\",\n \"public_key_id\": \"muET7bMJFJa3PYo5UhPAE1nJHXKWfktBtx\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"n3ixGs8m1HJG2cMbno1WozQ5rbB4oVBXFi\",\n \"amount\": \"1.999604\",\n \"confirmations\": 1,\n \"height\": 209,\n \"is_spent\": false,\n \"nout\": 0,\n \"timestamp\": 1584835932,\n \"txid\": \"5c43f9726377287a8c86efba0510e2ccb032a060466fcc6ee8ebb00a612c6dd1\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_op\": \"update\",\n \"confirmations\": -2,\n \"has_signing_key\": true,\n \"height\": -2,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"timestamp\": null,\n \"txid\": \"c1faeecd9f829c00f0cdbfda8f0753da97808b965549f0c45039a4619729a767\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51\",\n \"public_key_id\": \"muET7bMJFJa3PYo5UhPAE1nJHXKWfktBtx\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mhrLhT3w1bhsvLCu6RMPMmpyKu6CNcHZzt\",\n \"amount\": \"1.9993355\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"c1faeecd9f829c00f0cdbfda8f0753da97808b965549f0c45039a4619729a767\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.0002685\",\n \"total_input\": \"2.999604\",\n \"total_output\": \"2.9993355\",\n \"txid\": \"c1faeecd9f829c00f0cdbfda8f0753da97808b965549f0c45039a4619729a767\"\n }\n}" + "curl": "curl -d'{\"method\": \"channel_update\", \"params\": {\"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\", \"title\": \"New Channel\", \"featured\": [], \"clear_featured\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"new_signing_key\": false, \"funding_account_ids\": [], \"preview\": false, \"blocking\": false, \"replace\": false}}' http://localhost:5279/", + "lbrynet": "lbrynet channel update 304613c5db3e0439d3aeac2183296aaeaf49a328 --title=\"New Channel\"", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_update\", \"params\": {\"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\", \"title\": \"New Channel\", \"featured\": [], \"clear_featured\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"new_signing_key\": false, \"funding_account_ids\": [], \"preview\": false, \"blocking\": false, \"replace\": false}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000002a1f83a8dac5fcde42ad2c49c94c09bfadeff3ad6d9af8024667d4a7f7c879360000000006a473044022030620aed6ea4d807669926dfe3683ddfbf190592c5d9fad3008062e6195440a102203996fe59971ab6fed75e74fc852689ac57a2053c2089a2f3c3b03f90e9fbbd96012102e8e98ecb426bb86ecb8217a04d1e6224ea49d619c19350da6e50f7a1f76ab3a5ffffffffc817c6eeac076f2c5d85b266ca768802247598945b53c08953d4dd8a7bbedeb8000000006a47304402207517d7ef915693b1e090c5f8bd91f2faa152efb8ff8a445a9891dd6f250271a7022041c54190c560575718a5a7ac366c20952b33d6f1a6886c99f8c110a3fa2f4faa012102017deec5fa4572a29704158fbb15a3673f1bcb33f8d95d261579fcdb1555a4e3ffffffff0200e1f50500000000a6b708406368616e6e656c1428a349afae6a298321acaed339043edbc51346304c6a00125a0a583056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638420b4e6577204368616e6e656c6d6d76a9144887901f6fc283acfbadc1b194e042ad19145ebd88ac6ebeea0b000000001976a9146108445b235c957157080d56d5ba5675091efb3688ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mn8TLwsBKAhp3hBdmqFBriYMP1pKbWmCkQ\",\n \"amount\": \"1.0\",\n \"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"has_signing_key\": true,\n \"height\": 209,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"timestamp\": 1466680171,\n \"txid\": \"6093877c7f4a7d662480afd9d63affdefa9bc0949cc4d22ae4cd5fac8d3af8a1\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638\",\n \"public_key_id\": \"mjP2THCJ1MFjmsmw8nRK5Wd3BfehMSHSEs\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mm7Ap8eGFKRiKcuXgJowSpDy3nZQzY9AX4\",\n \"amount\": \"1.999604\",\n \"confirmations\": 1,\n \"height\": 209,\n \"is_spent\": false,\n \"nout\": 0,\n \"timestamp\": 1466680171,\n \"txid\": \"b8debe7b8addd45389c0535b94987524028876ca66b2855d2c6f07aceec617c8\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mn8TLwsBKAhp3hBdmqFBriYMP1pKbWmCkQ\",\n \"amount\": \"1.0\",\n \"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_op\": \"update\",\n \"confirmations\": -2,\n \"has_signing_key\": true,\n \"height\": -2,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"timestamp\": 1466646266,\n \"txid\": \"1b4e1cbe7410fff87c6c569d30efd0d8d62ce359e736610c165b3af10918fac3\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638\",\n \"public_key_id\": \"mjP2THCJ1MFjmsmw8nRK5Wd3BfehMSHSEs\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mpN1k4fBHJTEdYBd6nBKFvej3rAp9vvcAB\",\n \"amount\": \"1.9993355\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": 1466646266,\n \"txid\": \"1b4e1cbe7410fff87c6c569d30efd0d8d62ce359e736610c165b3af10918fac3\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.0002685\",\n \"total_input\": \"2.999604\",\n \"total_output\": \"2.9993355\",\n \"txid\": \"1b4e1cbe7410fff87c6c569d30efd0d8d62ce359e736610c165b3af10918fac3\"\n }\n}" } ] } @@ -1558,23 +1588,29 @@ "type": "bool", "description": "do not calculate the total number of pages and items in result set (significant performance boost)", "is_required": false + }, + { + "name": "include_received_tips", + "type": "bool", + "description": "calculate the amount of tips recieved for claim outputs", + "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 \"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 }", "examples": [ { "title": "List all your claims", - "curl": "curl -d'{\"method\": \"claim_list\", \"params\": {\"claim_type\": [], \"claim_id\": [], \"name\": [], \"channel_id\": [], \"resolve\": false, \"no_totals\": false}}' http://localhost:5279/", + "curl": "curl -d'{\"method\": \"claim_list\", \"params\": {\"claim_type\": [], \"claim_id\": [], \"name\": [], \"channel_id\": [], \"resolve\": false, \"no_totals\": false, \"include_received_tips\": false}}' http://localhost:5279/", "lbrynet": "lbrynet claim list", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"claim_list\", \"params\": {\"claim_type\": [], \"claim_id\": [], \"name\": [], \"channel_id\": [], \"resolve\": false, \"no_totals\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mouj5yBftsbi5yBt9hwMrKzSy1uyYb8xFY\",\n \"amount\": \"1.0\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"is_internal_transfer\": false,\n \"is_my_input\": true,\n \"is_my_output\": true,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"signing_channel\": {\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"timestamp\": 1584835932,\n \"txid\": \"c1faeecd9f829c00f0cdbfda8f0753da97808b965549f0c45039a4619729a767\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51\",\n \"public_key_id\": \"muET7bMJFJa3PYo5UhPAE1nJHXKWfktBtx\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1584835933,\n \"txid\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpm1uonkty\",\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_internal_transfer\": false,\n \"is_my_input\": true,\n \"is_my_output\": true,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"timestamp\": 1584835932,\n \"txid\": \"c1faeecd9f829c00f0cdbfda8f0753da97808b965549f0c45039a4619729a767\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51\",\n \"public_key_id\": \"muET7bMJFJa3PYo5UhPAE1nJHXKWfktBtx\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 2,\n \"total_pages\": 1\n }\n}" + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"claim_list\", \"params\": {\"claim_type\": [], \"claim_id\": [], \"name\": [], \"channel_id\": [], \"resolve\": false, \"no_totals\": false, \"include_received_tips\": false}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mwfK8kVb2w4P5HMQG7qF9FJUphvwvv276R\",\n \"amount\": \"1.0\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"is_internal_transfer\": false,\n \"is_my_input\": true,\n \"is_my_output\": true,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#b417290577f86e33f746980cc43dcf35a76e3374\",\n \"signing_channel\": {\n \"address\": \"mn8TLwsBKAhp3hBdmqFBriYMP1pKbWmCkQ\",\n \"amount\": \"1.0\",\n \"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"timestamp\": 1466680331,\n \"txid\": \"1b4e1cbe7410fff87c6c569d30efd0d8d62ce359e736610c165b3af10918fac3\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638\",\n \"public_key_id\": \"mjP2THCJ1MFjmsmw8nRK5Wd3BfehMSHSEs\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1466680974,\n \"txid\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp4s2rv5lr\",\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mn8TLwsBKAhp3hBdmqFBriYMP1pKbWmCkQ\",\n \"amount\": \"1.0\",\n \"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_internal_transfer\": false,\n \"is_my_input\": true,\n \"is_my_output\": true,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"timestamp\": 1466680331,\n \"txid\": \"1b4e1cbe7410fff87c6c569d30efd0d8d62ce359e736610c165b3af10918fac3\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638\",\n \"public_key_id\": \"mjP2THCJ1MFjmsmw8nRK5Wd3BfehMSHSEs\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 2,\n \"total_pages\": 1\n }\n}" }, { "title": "Paginate your claims", - "curl": "curl -d'{\"method\": \"claim_list\", \"params\": {\"claim_type\": [], \"claim_id\": [], \"name\": [], \"channel_id\": [], \"page\": 1, \"page_size\": 20, \"resolve\": false, \"no_totals\": false}}' http://localhost:5279/", + "curl": "curl -d'{\"method\": \"claim_list\", \"params\": {\"claim_type\": [], \"claim_id\": [], \"name\": [], \"channel_id\": [], \"page\": 1, \"page_size\": 20, \"resolve\": false, \"no_totals\": false, \"include_received_tips\": false}}' http://localhost:5279/", "lbrynet": "lbrynet claim list --page=1 --page_size=20", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"claim_list\", \"params\": {\"claim_type\": [], \"claim_id\": [], \"name\": [], \"channel_id\": [], \"page\": 1, \"page_size\": 20, \"resolve\": false, \"no_totals\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mouj5yBftsbi5yBt9hwMrKzSy1uyYb8xFY\",\n \"amount\": \"1.0\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"is_internal_transfer\": false,\n \"is_my_input\": true,\n \"is_my_output\": true,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"signing_channel\": {\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"timestamp\": 1584835932,\n \"txid\": \"c1faeecd9f829c00f0cdbfda8f0753da97808b965549f0c45039a4619729a767\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51\",\n \"public_key_id\": \"muET7bMJFJa3PYo5UhPAE1nJHXKWfktBtx\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1584835933,\n \"txid\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpm1uonkty\",\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_internal_transfer\": false,\n \"is_my_input\": true,\n \"is_my_output\": true,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"timestamp\": 1584835932,\n \"txid\": \"c1faeecd9f829c00f0cdbfda8f0753da97808b965549f0c45039a4619729a767\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51\",\n \"public_key_id\": \"muET7bMJFJa3PYo5UhPAE1nJHXKWfktBtx\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 2,\n \"total_pages\": 1\n }\n}" + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"claim_list\", \"params\": {\"claim_type\": [], \"claim_id\": [], \"name\": [], \"channel_id\": [], \"page\": 1, \"page_size\": 20, \"resolve\": false, \"no_totals\": false, \"include_received_tips\": false}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mwfK8kVb2w4P5HMQG7qF9FJUphvwvv276R\",\n \"amount\": \"1.0\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"is_internal_transfer\": false,\n \"is_my_input\": true,\n \"is_my_output\": true,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#b417290577f86e33f746980cc43dcf35a76e3374\",\n \"signing_channel\": {\n \"address\": \"mn8TLwsBKAhp3hBdmqFBriYMP1pKbWmCkQ\",\n \"amount\": \"1.0\",\n \"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"timestamp\": 1466680331,\n \"txid\": \"1b4e1cbe7410fff87c6c569d30efd0d8d62ce359e736610c165b3af10918fac3\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638\",\n \"public_key_id\": \"mjP2THCJ1MFjmsmw8nRK5Wd3BfehMSHSEs\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1466680974,\n \"txid\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp4s2rv5lr\",\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mn8TLwsBKAhp3hBdmqFBriYMP1pKbWmCkQ\",\n \"amount\": \"1.0\",\n \"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_internal_transfer\": false,\n \"is_my_input\": true,\n \"is_my_output\": true,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"timestamp\": 1466680331,\n \"txid\": \"1b4e1cbe7410fff87c6c569d30efd0d8d62ce359e736610c165b3af10918fac3\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638\",\n \"public_key_id\": \"mjP2THCJ1MFjmsmw8nRK5Wd3BfehMSHSEs\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 2,\n \"total_pages\": 1\n }\n}" } ] }, @@ -1881,23 +1917,35 @@ "type": "str", "description": "wallet to check for claim purchase reciepts", "is_required": false + }, + { + "name": "include_purchase_receipt", + "type": "bool", + "description": "lookup and include a receipt if this wallet has purchased the claim", + "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 } ], "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 \"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 }", "examples": [ { "title": "Search for all claims in channel", - "curl": "curl -d'{\"method\": \"claim_search\", \"params\": {\"claim_ids\": [], \"channel\": \"@channel\", \"channel_ids\": [], \"not_channel_ids\": [], \"has_channel_signature\": false, \"valid_channel_signature\": false, \"invalid_channel_signature\": false, \"is_controlling\": false, \"stream_types\": [], \"media_types\": [], \"any_tags\": [], \"all_tags\": [], \"not_tags\": [], \"any_languages\": [], \"all_languages\": [], \"not_languages\": [], \"any_locations\": [], \"all_locations\": [], \"not_locations\": [], \"order_by\": []}}' http://localhost:5279/", + "curl": "curl -d'{\"method\": \"claim_search\", \"params\": {\"claim_ids\": [], \"channel\": \"@channel\", \"channel_ids\": [], \"not_channel_ids\": [], \"has_channel_signature\": false, \"valid_channel_signature\": false, \"invalid_channel_signature\": false, \"is_controlling\": false, \"stream_types\": [], \"media_types\": [], \"any_tags\": [], \"all_tags\": [], \"not_tags\": [], \"any_languages\": [], \"all_languages\": [], \"not_languages\": [], \"any_locations\": [], \"all_locations\": [], \"not_locations\": [], \"order_by\": [], \"include_purchase_receipt\": false, \"include_is_my_output\": false}}' http://localhost:5279/", "lbrynet": "lbrynet claim search --channel=@channel", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"claim_search\", \"params\": {\"claim_ids\": [], \"channel\": \"@channel\", \"channel_ids\": [], \"not_channel_ids\": [], \"has_channel_signature\": false, \"valid_channel_signature\": false, \"invalid_channel_signature\": false, \"is_controlling\": false, \"stream_types\": [], \"media_types\": [], \"any_tags\": [], \"all_tags\": [], \"not_tags\": [], \"any_languages\": [], \"all_languages\": [], \"not_languages\": [], \"any_locations\": [], \"all_locations\": [], \"not_locations\": [], \"order_by\": []}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"blocked\": {\n \"channels\": [],\n \"total\": 0\n },\n \"items\": [\n {\n \"address\": \"mouj5yBftsbi5yBt9hwMrKzSy1uyYb8xFY\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#f/astream#1\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"meta\": {\n \"activation_height\": 213,\n \"creation_height\": 213,\n \"creation_timestamp\": 1584835933,\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#1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"short_url\": \"lbry://astream#1\",\n \"signing_channel\": {\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#f\",\n \"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": false,\n \"height\": 210,\n \"meta\": {\n \"activation_height\": 209,\n \"claims_in_channel\": 1,\n \"creation_height\": 209,\n \"creation_timestamp\": 1584835932,\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#f69dbfa313c090198f5259354c70474beade9e69\",\n \"short_url\": \"lbry://@channel#f\",\n \"timestamp\": 1584835932,\n \"txid\": \"c1faeecd9f829c00f0cdbfda8f0753da97808b965549f0c45039a4619729a767\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51\",\n \"public_key_id\": \"muET7bMJFJa3PYo5UhPAE1nJHXKWfktBtx\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1584835933,\n \"txid\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpm1uonkty\",\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"claim_search\", \"params\": {\"claim_ids\": [], \"channel\": \"@channel\", \"channel_ids\": [], \"not_channel_ids\": [], \"has_channel_signature\": false, \"valid_channel_signature\": false, \"invalid_channel_signature\": false, \"is_controlling\": false, \"stream_types\": [], \"media_types\": [], \"any_tags\": [], \"all_tags\": [], \"not_tags\": [], \"any_languages\": [], \"all_languages\": [], \"not_languages\": [], \"any_locations\": [], \"all_locations\": [], \"not_locations\": [], \"order_by\": [], \"include_purchase_receipt\": false, \"include_is_my_output\": false}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"blocked\": {\n \"channels\": [],\n \"total\": 0\n },\n \"items\": [\n {\n \"address\": \"mwfK8kVb2w4P5HMQG7qF9FJUphvwvv276R\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3/astream#b\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"meta\": {\n \"activation_height\": 213,\n \"creation_height\": 213,\n \"creation_timestamp\": 1466680814,\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#b417290577f86e33f746980cc43dcf35a76e3374\",\n \"short_url\": \"lbry://astream#b\",\n \"signing_channel\": {\n \"address\": \"mn8TLwsBKAhp3hBdmqFBriYMP1pKbWmCkQ\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3\",\n \"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": false,\n \"height\": 210,\n \"meta\": {\n \"activation_height\": 209,\n \"claims_in_channel\": 1,\n \"creation_height\": 209,\n \"creation_timestamp\": 1466680171,\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#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"short_url\": \"lbry://@channel#3\",\n \"timestamp\": 1466680331,\n \"txid\": \"1b4e1cbe7410fff87c6c569d30efd0d8d62ce359e736610c165b3af10918fac3\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638\",\n \"public_key_id\": \"mjP2THCJ1MFjmsmw8nRK5Wd3BfehMSHSEs\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1466680974,\n \"txid\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp4s2rv5lr\",\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" }, { "title": "Search for claims matching a name", - "curl": "curl -d'{\"method\": \"claim_search\", \"params\": {\"name\": \"astream\", \"claim_ids\": [], \"channel_ids\": [], \"not_channel_ids\": [], \"has_channel_signature\": false, \"valid_channel_signature\": false, \"invalid_channel_signature\": false, \"is_controlling\": false, \"stream_types\": [], \"media_types\": [], \"any_tags\": [], \"all_tags\": [], \"not_tags\": [], \"any_languages\": [], \"all_languages\": [], \"not_languages\": [], \"any_locations\": [], \"all_locations\": [], \"not_locations\": [], \"order_by\": []}}' http://localhost:5279/", + "curl": "curl -d'{\"method\": \"claim_search\", \"params\": {\"name\": \"astream\", \"claim_ids\": [], \"channel_ids\": [], \"not_channel_ids\": [], \"has_channel_signature\": false, \"valid_channel_signature\": false, \"invalid_channel_signature\": false, \"is_controlling\": false, \"stream_types\": [], \"media_types\": [], \"any_tags\": [], \"all_tags\": [], \"not_tags\": [], \"any_languages\": [], \"all_languages\": [], \"not_languages\": [], \"any_locations\": [], \"all_locations\": [], \"not_locations\": [], \"order_by\": [], \"include_purchase_receipt\": false, \"include_is_my_output\": false}}' http://localhost:5279/", "lbrynet": "lbrynet claim search --name=\"astream\"", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"claim_search\", \"params\": {\"name\": \"astream\", \"claim_ids\": [], \"channel_ids\": [], \"not_channel_ids\": [], \"has_channel_signature\": false, \"valid_channel_signature\": false, \"invalid_channel_signature\": false, \"is_controlling\": false, \"stream_types\": [], \"media_types\": [], \"any_tags\": [], \"all_tags\": [], \"not_tags\": [], \"any_languages\": [], \"all_languages\": [], \"not_languages\": [], \"any_locations\": [], \"all_locations\": [], \"not_locations\": [], \"order_by\": []}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"blocked\": {\n \"channels\": [],\n \"total\": 0\n },\n \"items\": [\n {\n \"address\": \"mouj5yBftsbi5yBt9hwMrKzSy1uyYb8xFY\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#f/astream#1\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"meta\": {\n \"activation_height\": 213,\n \"creation_height\": 213,\n \"creation_timestamp\": 1584835933,\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#1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"short_url\": \"lbry://astream#1\",\n \"signing_channel\": {\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#f\",\n \"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": false,\n \"height\": 210,\n \"meta\": {\n \"activation_height\": 209,\n \"claims_in_channel\": 1,\n \"creation_height\": 209,\n \"creation_timestamp\": 1584835932,\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#f69dbfa313c090198f5259354c70474beade9e69\",\n \"short_url\": \"lbry://@channel#f\",\n \"timestamp\": 1584835932,\n \"txid\": \"c1faeecd9f829c00f0cdbfda8f0753da97808b965549f0c45039a4619729a767\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51\",\n \"public_key_id\": \"muET7bMJFJa3PYo5UhPAE1nJHXKWfktBtx\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1584835933,\n \"txid\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpm1uonkty\",\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"claim_search\", \"params\": {\"name\": \"astream\", \"claim_ids\": [], \"channel_ids\": [], \"not_channel_ids\": [], \"has_channel_signature\": false, \"valid_channel_signature\": false, \"invalid_channel_signature\": false, \"is_controlling\": false, \"stream_types\": [], \"media_types\": [], \"any_tags\": [], \"all_tags\": [], \"not_tags\": [], \"any_languages\": [], \"all_languages\": [], \"not_languages\": [], \"any_locations\": [], \"all_locations\": [], \"not_locations\": [], \"order_by\": [], \"include_purchase_receipt\": false, \"include_is_my_output\": false}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"blocked\": {\n \"channels\": [],\n \"total\": 0\n },\n \"items\": [\n {\n \"address\": \"mwfK8kVb2w4P5HMQG7qF9FJUphvwvv276R\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3/astream#b\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"meta\": {\n \"activation_height\": 213,\n \"creation_height\": 213,\n \"creation_timestamp\": 1466680814,\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#b417290577f86e33f746980cc43dcf35a76e3374\",\n \"short_url\": \"lbry://astream#b\",\n \"signing_channel\": {\n \"address\": \"mn8TLwsBKAhp3hBdmqFBriYMP1pKbWmCkQ\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3\",\n \"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": false,\n \"height\": 210,\n \"meta\": {\n \"activation_height\": 209,\n \"claims_in_channel\": 1,\n \"creation_height\": 209,\n \"creation_timestamp\": 1466680171,\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#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"short_url\": \"lbry://@channel#3\",\n \"timestamp\": 1466680331,\n \"txid\": \"1b4e1cbe7410fff87c6c569d30efd0d8d62ce359e736610c165b3af10918fac3\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638\",\n \"public_key_id\": \"mjP2THCJ1MFjmsmw8nRK5Wd3BfehMSHSEs\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1466680974,\n \"txid\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp4s2rv5lr\",\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" } ] } @@ -2308,9 +2356,9 @@ "examples": [ { "title": "Abandon a comment", - "curl": "curl -d'{\"method\": \"comment_abandon\", \"params\": {\"comment_id\": \"d3251fb817d88f62203813a0edd97907640030b3195f2363a7f7a5e5f2ed1be2\"}}' http://localhost:5279/", - "lbrynet": "lbrynet comment abandon d3251fb817d88f62203813a0edd97907640030b3195f2363a7f7a5e5f2ed1be2", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_abandon\", \"params\": {\"comment_id\": \"d3251fb817d88f62203813a0edd97907640030b3195f2363a7f7a5e5f2ed1be2\"}}).json()", + "curl": "curl -d'{\"method\": \"comment_abandon\", \"params\": {\"comment_id\": \"136bd27d898eb02f272ca6da97dbcd47b59ec1d849d281fb606d8d0a0a2d3998\"}}' http://localhost:5279/", + "lbrynet": "lbrynet comment abandon 136bd27d898eb02f272ca6da97dbcd47b59ec1d849d281fb606d8d0a0a2d3998", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_abandon\", \"params\": {\"comment_id\": \"136bd27d898eb02f272ca6da97dbcd47b59ec1d849d281fb606d8d0a0a2d3998\"}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"abandoned\": false\n }\n}" } ] @@ -2366,17 +2414,17 @@ "examples": [ { "title": "Posting a comment as your channel", - "curl": "curl -d'{\"method\": \"comment_create\", \"params\": {\"comment\": \"Thank you Based God\", \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\", \"channel_name\": \"@channel\", \"channel_account_id\": []}}' http://localhost:5279/", - "lbrynet": "lbrynet comment create --comment=\"Thank you Based God\" --channel_name=@channel --claim_id=1812e1a18fbc87697c97a7eed78bc783e4a13d27", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_create\", \"params\": {\"comment\": \"Thank you Based God\", \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\", \"channel_name\": \"@channel\", \"channel_account_id\": []}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"channel_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"comment\": \"Thank you Based God\",\n \"comment_id\": \"d3251fb817d88f62203813a0edd97907640030b3195f2363a7f7a5e5f2ed1be2\",\n \"is_claim_signature_valid\": true,\n \"is_hidden\": false,\n \"signature\": \"3f021cb77b7e6db1547fc209f9b75a74006f2e9f284f25960fe72d27ad0835f4d7c8ceca63c226a31b5722e8a2e3d9e9139776d36fa63c9aae42141671a18b30\",\n \"signing_ts\": \"1584835911\",\n \"timestamp\": 1584835911\n }\n}" + "curl": "curl -d'{\"method\": \"comment_create\", \"params\": {\"comment\": \"Thank you Based God\", \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\", \"channel_name\": \"@channel\", \"channel_account_id\": []}}' http://localhost:5279/", + "lbrynet": "lbrynet comment create --comment=\"Thank you Based God\" --channel_name=@channel --claim_id=b417290577f86e33f746980cc43dcf35a76e3374", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_create\", \"params\": {\"comment\": \"Thank you Based God\", \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\", \"channel_name\": \"@channel\", \"channel_account_id\": []}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"channel_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"comment\": \"Thank you Based God\",\n \"comment_id\": \"136bd27d898eb02f272ca6da97dbcd47b59ec1d849d281fb606d8d0a0a2d3998\",\n \"is_claim_signature_valid\": true,\n \"is_hidden\": false,\n \"signature\": \"4474bf96bdc76626df8c9c3d818c8e83179ece4ce614a77faaa61b1da52e2941b8aee2d38695671a4e2a6aa6c5c891bfd4f5a4c46324922009f7deb04d36e663\",\n \"signing_ts\": \"1585619138\",\n \"timestamp\": 1585619138\n }\n}" }, { "title": "Use the parent_id param to make replies", - "curl": "curl -d'{\"method\": \"comment_create\", \"params\": {\"comment\": \"I have photographic evidence confirming Sasquatch exists\", \"parent_id\": \"d3251fb817d88f62203813a0edd97907640030b3195f2363a7f7a5e5f2ed1be2\", \"channel_name\": \"@channel\", \"channel_account_id\": []}}' http://localhost:5279/", - "lbrynet": "lbrynet comment create --comment=\"I have photographic evidence confirming Sasquatch exists\" --channel_name=@channel --parent_id=d3251fb817d88f62203813a0edd97907640030b3195f2363a7f7a5e5f2ed1be2", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_create\", \"params\": {\"comment\": \"I have photographic evidence confirming Sasquatch exists\", \"parent_id\": \"d3251fb817d88f62203813a0edd97907640030b3195f2363a7f7a5e5f2ed1be2\", \"channel_name\": \"@channel\", \"channel_account_id\": []}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"channel_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"comment\": \"I have photographic evidence confirming Sasquatch exists\",\n \"comment_id\": \"af049505a05033dc6eb1852ff374890ab626bfb6572e787fcfb85fa2f8f079d3\",\n \"is_claim_signature_valid\": true,\n \"is_hidden\": false,\n \"parent_id\": \"d3251fb817d88f62203813a0edd97907640030b3195f2363a7f7a5e5f2ed1be2\",\n \"signature\": \"9195e20f2b52a266ed5f6523e114f0bdb053475b40dad24d6698dcc9f5aa7887ae29f61a29a28296d714d1216618fb5af9bc061915158afcdd521bfc132c8440\",\n \"signing_ts\": \"1584835911\",\n \"timestamp\": 1584835912\n }\n}" + "curl": "curl -d'{\"method\": \"comment_create\", \"params\": {\"comment\": \"I have photographic evidence confirming Sasquatch exists\", \"parent_id\": \"136bd27d898eb02f272ca6da97dbcd47b59ec1d849d281fb606d8d0a0a2d3998\", \"channel_name\": \"@channel\", \"channel_account_id\": []}}' http://localhost:5279/", + "lbrynet": "lbrynet comment create --comment=\"I have photographic evidence confirming Sasquatch exists\" --channel_name=@channel --parent_id=136bd27d898eb02f272ca6da97dbcd47b59ec1d849d281fb606d8d0a0a2d3998", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_create\", \"params\": {\"comment\": \"I have photographic evidence confirming Sasquatch exists\", \"parent_id\": \"136bd27d898eb02f272ca6da97dbcd47b59ec1d849d281fb606d8d0a0a2d3998\", \"channel_name\": \"@channel\", \"channel_account_id\": []}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"channel_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"comment\": \"I have photographic evidence confirming Sasquatch exists\",\n \"comment_id\": \"27502e5961eb902cf29c64f0547c7646582a3b91124042d043cdcf557be286c6\",\n \"is_claim_signature_valid\": true,\n \"is_hidden\": false,\n \"parent_id\": \"136bd27d898eb02f272ca6da97dbcd47b59ec1d849d281fb606d8d0a0a2d3998\",\n \"signature\": \"20112298a3b30f126651195470283f17092a5381fa6d1254af15ffe010761b4f743c28e01a1847c9d7fa4efdfd1d26e2fffae08378f75f3b5084c7d870772ebe\",\n \"signing_ts\": \"1585619138\",\n \"timestamp\": 1585619139\n }\n}" } ] }, @@ -2457,17 +2505,17 @@ "examples": [ { "title": "List all comments on a claim", - "curl": "curl -d'{\"method\": \"comment_list\", \"params\": {\"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\", \"include_replies\": true, \"is_channel_signature_valid\": false, \"visible\": false, \"hidden\": false}}' http://localhost:5279/", - "lbrynet": "lbrynet comment list 1812e1a18fbc87697c97a7eed78bc783e4a13d27 --include_replies", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_list\", \"params\": {\"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\", \"include_replies\": true, \"is_channel_signature_valid\": false, \"visible\": false, \"hidden\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"has_hidden_comments\": false,\n \"items\": [\n {\n \"channel_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"comment\": \"I have photographic evidence confirming Sasquatch exists\",\n \"comment_id\": \"af049505a05033dc6eb1852ff374890ab626bfb6572e787fcfb85fa2f8f079d3\",\n \"is_channel_signature_valid\": true,\n \"is_hidden\": false,\n \"parent_id\": \"d3251fb817d88f62203813a0edd97907640030b3195f2363a7f7a5e5f2ed1be2\",\n \"signature\": \"9195e20f2b52a266ed5f6523e114f0bdb053475b40dad24d6698dcc9f5aa7887ae29f61a29a28296d714d1216618fb5af9bc061915158afcdd521bfc132c8440\",\n \"signing_ts\": \"1584835911\",\n \"timestamp\": 1584835912\n },\n {\n \"channel_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"comment\": \"Thank you Based God\",\n \"comment_id\": \"d3251fb817d88f62203813a0edd97907640030b3195f2363a7f7a5e5f2ed1be2\",\n \"is_channel_signature_valid\": true,\n \"is_hidden\": false,\n \"signature\": \"3f021cb77b7e6db1547fc209f9b75a74006f2e9f284f25960fe72d27ad0835f4d7c8ceca63c226a31b5722e8a2e3d9e9139776d36fa63c9aae42141671a18b30\",\n \"signing_ts\": \"1584835911\",\n \"timestamp\": 1584835911\n }\n ],\n \"page\": 1,\n \"page_size\": 50,\n \"total_items\": 2,\n \"total_pages\": 1\n }\n}" + "curl": "curl -d'{\"method\": \"comment_list\", \"params\": {\"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\", \"include_replies\": true, \"is_channel_signature_valid\": false, \"visible\": false, \"hidden\": false}}' http://localhost:5279/", + "lbrynet": "lbrynet comment list b417290577f86e33f746980cc43dcf35a76e3374 --include_replies", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_list\", \"params\": {\"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\", \"include_replies\": true, \"is_channel_signature_valid\": false, \"visible\": false, \"hidden\": false}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"has_hidden_comments\": false,\n \"items\": [\n {\n \"channel_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"comment\": \"I have photographic evidence confirming Sasquatch exists\",\n \"comment_id\": \"27502e5961eb902cf29c64f0547c7646582a3b91124042d043cdcf557be286c6\",\n \"is_channel_signature_valid\": true,\n \"is_hidden\": false,\n \"parent_id\": \"136bd27d898eb02f272ca6da97dbcd47b59ec1d849d281fb606d8d0a0a2d3998\",\n \"signature\": \"20112298a3b30f126651195470283f17092a5381fa6d1254af15ffe010761b4f743c28e01a1847c9d7fa4efdfd1d26e2fffae08378f75f3b5084c7d870772ebe\",\n \"signing_ts\": \"1585619138\",\n \"timestamp\": 1585619139\n },\n {\n \"channel_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"comment\": \"Thank you Based God\",\n \"comment_id\": \"136bd27d898eb02f272ca6da97dbcd47b59ec1d849d281fb606d8d0a0a2d3998\",\n \"is_channel_signature_valid\": true,\n \"is_hidden\": false,\n \"signature\": \"4474bf96bdc76626df8c9c3d818c8e83179ece4ce614a77faaa61b1da52e2941b8aee2d38695671a4e2a6aa6c5c891bfd4f5a4c46324922009f7deb04d36e663\",\n \"signing_ts\": \"1585619138\",\n \"timestamp\": 1585619138\n }\n ],\n \"page\": 1,\n \"page_size\": 50,\n \"total_items\": 2,\n \"total_pages\": 1\n }\n}" }, { "title": "List a comment thread replying to a top level comment", - "curl": "curl -d'{\"method\": \"comment_list\", \"params\": {\"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\", \"parent_id\": \"d3251fb817d88f62203813a0edd97907640030b3195f2363a7f7a5e5f2ed1be2\", \"include_replies\": false, \"is_channel_signature_valid\": false, \"visible\": false, \"hidden\": false}}' http://localhost:5279/", - "lbrynet": "lbrynet comment list 1812e1a18fbc87697c97a7eed78bc783e4a13d27 --parent_id=d3251fb817d88f62203813a0edd97907640030b3195f2363a7f7a5e5f2ed1be2", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_list\", \"params\": {\"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\", \"parent_id\": \"d3251fb817d88f62203813a0edd97907640030b3195f2363a7f7a5e5f2ed1be2\", \"include_replies\": false, \"is_channel_signature_valid\": false, \"visible\": false, \"hidden\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"has_hidden_comments\": false,\n \"items\": [\n {\n \"channel_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"comment\": \"Thank you Based God\",\n \"comment_id\": \"d3251fb817d88f62203813a0edd97907640030b3195f2363a7f7a5e5f2ed1be2\",\n \"is_channel_signature_valid\": true,\n \"is_hidden\": false,\n \"signature\": \"3f021cb77b7e6db1547fc209f9b75a74006f2e9f284f25960fe72d27ad0835f4d7c8ceca63c226a31b5722e8a2e3d9e9139776d36fa63c9aae42141671a18b30\",\n \"signing_ts\": \"1584835911\",\n \"timestamp\": 1584835911\n }\n ],\n \"page\": 1,\n \"page_size\": 50,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" + "curl": "curl -d'{\"method\": \"comment_list\", \"params\": {\"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\", \"parent_id\": \"136bd27d898eb02f272ca6da97dbcd47b59ec1d849d281fb606d8d0a0a2d3998\", \"include_replies\": false, \"is_channel_signature_valid\": false, \"visible\": false, \"hidden\": false}}' http://localhost:5279/", + "lbrynet": "lbrynet comment list b417290577f86e33f746980cc43dcf35a76e3374 --parent_id=136bd27d898eb02f272ca6da97dbcd47b59ec1d849d281fb606d8d0a0a2d3998", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_list\", \"params\": {\"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\", \"parent_id\": \"136bd27d898eb02f272ca6da97dbcd47b59ec1d849d281fb606d8d0a0a2d3998\", \"include_replies\": false, \"is_channel_signature_valid\": false, \"visible\": false, \"hidden\": false}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"has_hidden_comments\": false,\n \"items\": [\n {\n \"channel_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"comment\": \"Thank you Based God\",\n \"comment_id\": \"136bd27d898eb02f272ca6da97dbcd47b59ec1d849d281fb606d8d0a0a2d3998\",\n \"is_channel_signature_valid\": true,\n \"is_hidden\": false,\n \"signature\": \"4474bf96bdc76626df8c9c3d818c8e83179ece4ce614a77faaa61b1da52e2941b8aee2d38695671a4e2a6aa6c5c891bfd4f5a4c46324922009f7deb04d36e663\",\n \"signing_ts\": \"1585619138\",\n \"timestamp\": 1585619138\n }\n ],\n \"page\": 1,\n \"page_size\": 50,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" } ] }, @@ -2498,9 +2546,9 @@ "examples": [ { "title": "Edit the contents of a comment", - "curl": "curl -d'{\"method\": \"comment_update\", \"params\": {\"comment\": \"Where there was once sasquatch, there is not\", \"comment_id\": \"d3251fb817d88f62203813a0edd97907640030b3195f2363a7f7a5e5f2ed1be2\"}}' http://localhost:5279/", - "lbrynet": "lbrynet comment update Where there was once sasquatch, there is not --comment_id=d3251fb817d88f62203813a0edd97907640030b3195f2363a7f7a5e5f2ed1be2", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_update\", \"params\": {\"comment\": \"Where there was once sasquatch, there is not\", \"comment_id\": \"d3251fb817d88f62203813a0edd97907640030b3195f2363a7f7a5e5f2ed1be2\"}}).json()", + "curl": "curl -d'{\"method\": \"comment_update\", \"params\": {\"comment\": \"Where there was once sasquatch, there is not\", \"comment_id\": \"136bd27d898eb02f272ca6da97dbcd47b59ec1d849d281fb606d8d0a0a2d3998\"}}' http://localhost:5279/", + "lbrynet": "lbrynet comment update Where there was once sasquatch, there is not --comment_id=136bd27d898eb02f272ca6da97dbcd47b59ec1d849d281fb606d8d0a0a2d3998", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_update\", \"params\": {\"comment\": \"Where there was once sasquatch, there is not\", \"comment_id\": \"136bd27d898eb02f272ca6da97dbcd47b59ec1d849d281fb606d8d0a0a2d3998\"}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": null\n}" } ] @@ -2591,9 +2639,9 @@ "examples": [ { "title": "Delete a file", - "curl": "curl -d'{\"method\": \"file_delete\", \"params\": {\"delete_from_download_dir\": false, \"delete_all\": false, \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\"}}' http://localhost:5279/", - "lbrynet": "lbrynet file delete --claim_id=\"1812e1a18fbc87697c97a7eed78bc783e4a13d27\"", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_delete\", \"params\": {\"delete_from_download_dir\": false, \"delete_all\": false, \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\"}}).json()", + "curl": "curl -d'{\"method\": \"file_delete\", \"params\": {\"delete_from_download_dir\": false, \"delete_all\": false, \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\"}}' http://localhost:5279/", + "lbrynet": "lbrynet file delete --claim_id=\"b417290577f86e33f746980cc43dcf35a76e3374\"", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_delete\", \"params\": {\"delete_from_download_dir\": false, \"delete_all\": false, \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\"}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": true\n}" } ] @@ -2724,14 +2772,14 @@ "curl": "curl -d'{\"method\": \"file_list\", \"params\": {\"reverse\": false}}' http://localhost:5279/", "lbrynet": "lbrynet file list", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_list\", \"params\": {\"reverse\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"added_on\": null,\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"confirmations\": -1,\n \"content_fee\": null,\n \"download_directory\": null,\n \"download_path\": null,\n \"file_name\": null,\n \"height\": -1,\n \"is_fully_reflected\": true,\n \"key\": \"e9f2998d8856ce6e8b4c2cdd1c119d60\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpm1uonkty\",\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01699edeea4b47704c3559528f1990c013a3bf9df60b16fc0ba8cc0eccbd2483d7e39dfa92e673dca6aed4250aa711cfc7b9d5b9d06785c6c89250c5c1c9efb086948eefa46510421f85c3f9607c9a43b08b49bfc70a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d706d31756f6e6b7479180b22186170706c69636174696f6e2f6f637465742d73747265616d3230b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"a74a8b79ed6d117b5c6bedd739ac8d13c283c2e560b8781be85709b60ee9ed7ae27886d19031f79ec91410cc1d92e2bc\",\n \"stream_name\": \"tmpm1uonkty\",\n \"streaming_url\": \"http://localhost:5280/stream/b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"suggested_file_name\": \"tmpm1uonkty\",\n \"timestamp\": null,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685\",\n \"written_bytes\": 0\n },\n {\n \"added_on\": null,\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"9271c67ecdab03c607ed4e0f337c480104a4ebf3\",\n \"claim_name\": \"blank-image\",\n \"completed\": false,\n \"confirmations\": -1,\n \"content_fee\": null,\n \"download_directory\": null,\n \"download_path\": null,\n \"file_name\": null,\n \"height\": -1,\n \"is_fully_reflected\": true,\n \"key\": \"628374e8d43616d5ac87b889ffe7c60f\",\n \"metadata\": {\n \"author\": \"Picaso\",\n \"description\": \"A blank PNG that is 5x7.\",\n \"fee\": {\n \"address\": \"n3PmRqqzpaEVNnryaVNn6x8HMrhEDXyxd8\",\n \"amount\": \"0.3\",\n \"currency\": \"LBC\"\n },\n \"image\": {\n \"height\": 7,\n \"width\": 5\n },\n \"languages\": [\n \"en\"\n ],\n \"license\": \"Public Domain\",\n \"license_url\": \"http://public-domain.org\",\n \"locations\": [\n {\n \"city\": \"Manchester\",\n \"country\": \"US\",\n \"state\": \"NH\"\n }\n ],\n \"release_time\": \"1584835908\",\n \"source\": {\n \"hash\": \"6c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545\",\n \"media_type\": \"image/png\",\n \"name\": \"tmp699j9izb.png\",\n \"sd_hash\": \"5fa36626c774e7137bcabcd0ad97fe5a0428fbf511474a5d61ef5fa81e86781fbab419a3159a4344196216c875f482bc\",\n \"size\": \"99\"\n },\n \"stream_type\": \"image\",\n \"tags\": [\n \"blank\",\n \"art\"\n ],\n \"thumbnail\": {\n \"url\": \"http://smallmedia.com/thumbnail.jpg\"\n },\n \"title\": \"Blank Image\"\n },\n \"mime_type\": \"image/png\",\n \"nout\": 0,\n \"outpoint\": \"e91024900188b4b4a91c9184b35820b84a34be39fd637c774c7b9992a8611650:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01699edeea4b47704c3559528f1990c013a3bf9df63ddc6b65c42398dba7cafd1b7e84df7aa1a937ceadea99bef0e7721d6f49f148f719bce2caf436465882c11dfd88a8e4eb2645122c43f4246b1be6cd1b312af60ae6010a82010a306c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545120f746d703639396a39697a622e706e6718632209696d6167652f706e6732305fa36626c774e7137bcabcd0ad97fe5a0428fbf511474a5d61ef5fa81e86781fbab419a3159a4344196216c875f482bc120650696361736f1a0d5075626c696320446f6d61696e2218687474703a2f2f7075626c69632d646f6d61696e2e6f726728c4dadaf3053222080112196feff6c907bf7d8cc92d54dbdca5681a1413615a11f629f54b188087a70e520408051007420b426c616e6b20496d6167654a184120626c616e6b20504e472074686174206973203578372e52252a23687474703a2f2f736d616c6c6d656469612e636f6d2f7468756d626e61696c2e6a70675a05626c616e6b5a03617274620208016a1308ec0112024e481a0a4d616e63686573746572\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"5fa36626c774e7137bcabcd0ad97fe5a0428fbf511474a5d61ef5fa81e86781fbab419a3159a4344196216c875f482bc\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"8f3422e92041c09046231d08d02719a1dc2b6c1ee4c931153b5246bfee68efa5bce244406ca5df3f7d3bae5b0b8bfa58\",\n \"stream_name\": \"tmp699j9izb.png\",\n \"streaming_url\": \"http://localhost:5280/stream/5fa36626c774e7137bcabcd0ad97fe5a0428fbf511474a5d61ef5fa81e86781fbab419a3159a4344196216c875f482bc\",\n \"suggested_file_name\": \"tmp699j9izb.png\",\n \"timestamp\": null,\n \"total_bytes\": 112,\n \"total_bytes_lower_bound\": 96,\n \"txid\": \"e91024900188b4b4a91c9184b35820b84a34be39fd637c774c7b9992a8611650\",\n \"written_bytes\": 0\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 2,\n \"total_pages\": 1\n }\n}" + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"added_on\": null,\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"confirmations\": -1,\n \"content_fee\": null,\n \"download_directory\": null,\n \"download_path\": null,\n \"file_name\": null,\n \"height\": -1,\n \"is_fully_reflected\": true,\n \"key\": \"33d1b3fcadd55ab27a674c579fe33d69\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp4s2rv5lr\",\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"0128a349afae6a298321acaed339043edbc5134630e3e5c3fffabbc16690ec00df8f717235b3217ea27fbd8cd335c0abf344ebbe19d733d648f4230ee35ed5144a97aed7852dc8e613629eb6289ef8db0a8f8f25850a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d703473327276356c72180b22186170706c69636174696f6e2f6f637465742d73747265616d323063004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"6444414d8b1853d67710a6314a853bb5eec6b089ee334c0ec0b69982c1f6d1ef3331a778fe880f6f483fcf5438f42e35\",\n \"stream_name\": \"tmp4s2rv5lr\",\n \"streaming_url\": \"http://localhost:5280/stream/63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"suggested_file_name\": \"tmp4s2rv5lr\",\n \"timestamp\": 1466646427,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047\",\n \"written_bytes\": 0\n },\n {\n \"added_on\": null,\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"cff8ccad3fd50a18bca94a93c8f6094fd26c0aa5\",\n \"claim_name\": \"blank-image\",\n \"completed\": false,\n \"confirmations\": -1,\n \"content_fee\": null,\n \"download_directory\": null,\n \"download_path\": null,\n \"file_name\": null,\n \"height\": -1,\n \"is_fully_reflected\": true,\n \"key\": \"a5c7c3efbd235d11dafeb21e2f758a23\",\n \"metadata\": {\n \"author\": \"Picaso\",\n \"description\": \"A blank PNG that is 5x7.\",\n \"fee\": {\n \"address\": \"mya4RmQTERdSBem1HV8PzXQhx6Zri7ED1X\",\n \"amount\": \"0.3\",\n \"currency\": \"LBC\"\n },\n \"image\": {\n \"height\": 7,\n \"width\": 5\n },\n \"languages\": [\n \"en\"\n ],\n \"license\": \"Public Domain\",\n \"license_url\": \"http://public-domain.org\",\n \"locations\": [\n {\n \"city\": \"Manchester\",\n \"country\": \"US\",\n \"state\": \"NH\"\n }\n ],\n \"release_time\": \"1585619135\",\n \"source\": {\n \"hash\": \"6c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545\",\n \"media_type\": \"image/png\",\n \"name\": \"tmp0bz4e07e.png\",\n \"sd_hash\": \"bac3bf82dd819d7d635e0b7e7e67a931ffb1510a33ec2226b850a107a9b31d63e43b96ccfe906e73d122845a84d4baf8\",\n \"size\": \"99\"\n },\n \"stream_type\": \"image\",\n \"tags\": [\n \"blank\",\n \"art\"\n ],\n \"thumbnail\": {\n \"url\": \"http://smallmedia.com/thumbnail.jpg\"\n },\n \"title\": \"Blank Image\"\n },\n \"mime_type\": \"image/png\",\n \"nout\": 0,\n \"outpoint\": \"58e9bf49003400a47c4e3d122670aee7cc589a50852150d68a36b95acbf61eb6:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"0128a349afae6a298321acaed339043edbc51346309f46b4ef31aade52076b9eea70cc65f2b35c3fdf3d270d9c3c4ddf6ff5d7e826488928d5375156b244f27a39ca11ec999f5788cd854119240426d5e7e4cc08de0ae6010a82010a306c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545120f746d7030627a34653037652e706e6718632209696d6167652f706e673230bac3bf82dd819d7d635e0b7e7e67a931ffb1510a33ec2226b850a107a9b31d63e43b96ccfe906e73d122845a84d4baf8120650696361736f1a0d5075626c696320446f6d61696e2218687474703a2f2f7075626c69632d646f6d61696e2e6f726728bfc18af4053222080112196fc608a1aca773f6714c174cc895cf030f2f1b67082806ac16188087a70e520408051007420b426c616e6b20496d6167654a184120626c616e6b20504e472074686174206973203578372e52252a23687474703a2f2f736d616c6c6d656469612e636f6d2f7468756d626e61696c2e6a70675a05626c616e6b5a03617274620208016a1308ec0112024e481a0a4d616e63686573746572\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"bac3bf82dd819d7d635e0b7e7e67a931ffb1510a33ec2226b850a107a9b31d63e43b96ccfe906e73d122845a84d4baf8\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"4786b654fbb4e087f1312f9645ba2bef08b3e9eb2243a1798353055a8b64905692aa7fe6147675603abbcd792b76217e\",\n \"stream_name\": \"tmp0bz4e07e.png\",\n \"streaming_url\": \"http://localhost:5280/stream/bac3bf82dd819d7d635e0b7e7e67a931ffb1510a33ec2226b850a107a9b31d63e43b96ccfe906e73d122845a84d4baf8\",\n \"suggested_file_name\": \"tmp0bz4e07e.png\",\n \"timestamp\": 1466646427,\n \"total_bytes\": 112,\n \"total_bytes_lower_bound\": 96,\n \"txid\": \"58e9bf49003400a47c4e3d122670aee7cc589a50852150d68a36b95acbf61eb6\",\n \"written_bytes\": 0\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 2,\n \"total_pages\": 1\n }\n}" }, { "title": "List files matching a parameter", - "curl": "curl -d'{\"method\": \"file_list\", \"params\": {\"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\", \"reverse\": false}}' http://localhost:5279/", - "lbrynet": "lbrynet file list --claim_id=\"1812e1a18fbc87697c97a7eed78bc783e4a13d27\"", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_list\", \"params\": {\"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\", \"reverse\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"added_on\": null,\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"confirmations\": 3,\n \"content_fee\": null,\n \"download_directory\": null,\n \"download_path\": null,\n \"file_name\": null,\n \"height\": 214,\n \"is_fully_reflected\": true,\n \"key\": \"e9f2998d8856ce6e8b4c2cdd1c119d60\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpm1uonkty\",\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01699edeea4b47704c3559528f1990c013a3bf9df60b16fc0ba8cc0eccbd2483d7e39dfa92e673dca6aed4250aa711cfc7b9d5b9d06785c6c89250c5c1c9efb086948eefa46510421f85c3f9607c9a43b08b49bfc70a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d706d31756f6e6b7479180b22186170706c69636174696f6e2f6f637465742d73747265616d3230b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"a74a8b79ed6d117b5c6bedd739ac8d13c283c2e560b8781be85709b60ee9ed7ae27886d19031f79ec91410cc1d92e2bc\",\n \"stream_name\": \"tmpm1uonkty\",\n \"streaming_url\": \"http://localhost:5280/stream/b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"suggested_file_name\": \"tmpm1uonkty\",\n \"timestamp\": 1584835933,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685\",\n \"written_bytes\": 0\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" + "curl": "curl -d'{\"method\": \"file_list\", \"params\": {\"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\", \"reverse\": false}}' http://localhost:5279/", + "lbrynet": "lbrynet file list --claim_id=\"b417290577f86e33f746980cc43dcf35a76e3374\"", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_list\", \"params\": {\"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\", \"reverse\": false}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"added_on\": null,\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"confirmations\": 3,\n \"content_fee\": null,\n \"download_directory\": null,\n \"download_path\": null,\n \"file_name\": null,\n \"height\": 214,\n \"is_fully_reflected\": true,\n \"key\": \"33d1b3fcadd55ab27a674c579fe33d69\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp4s2rv5lr\",\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"0128a349afae6a298321acaed339043edbc5134630e3e5c3fffabbc16690ec00df8f717235b3217ea27fbd8cd335c0abf344ebbe19d733d648f4230ee35ed5144a97aed7852dc8e613629eb6289ef8db0a8f8f25850a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d703473327276356c72180b22186170706c69636174696f6e2f6f637465742d73747265616d323063004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"6444414d8b1853d67710a6314a853bb5eec6b089ee334c0ec0b69982c1f6d1ef3331a778fe880f6f483fcf5438f42e35\",\n \"stream_name\": \"tmp4s2rv5lr\",\n \"streaming_url\": \"http://localhost:5280/stream/63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"suggested_file_name\": \"tmp4s2rv5lr\",\n \"timestamp\": 1466680974,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047\",\n \"written_bytes\": 0\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" } ] }, @@ -2848,10 +2896,10 @@ "examples": [ { "title": "Save a file to the downloads directory", - "curl": "curl -d'{\"method\": \"file_save\", \"params\": {\"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\"}}' http://localhost:5279/", - "lbrynet": "lbrynet file save --sd_hash=\"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\"", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_save\", \"params\": {\"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\"}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"added_on\": 1584835916,\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"confirmations\": 3,\n \"content_fee\": null,\n \"download_directory\": \"/tmp/tmppom1car9\",\n \"download_path\": \"/tmp/tmppom1car9/tmpm1uonkty_1\",\n \"file_name\": \"tmpm1uonkty_1\",\n \"height\": 214,\n \"is_fully_reflected\": false,\n \"key\": \"e9f2998d8856ce6e8b4c2cdd1c119d60\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpm1uonkty\",\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01699edeea4b47704c3559528f1990c013a3bf9df60b16fc0ba8cc0eccbd2483d7e39dfa92e673dca6aed4250aa711cfc7b9d5b9d06785c6c89250c5c1c9efb086948eefa46510421f85c3f9607c9a43b08b49bfc70a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d706d31756f6e6b7479180b22186170706c69636174696f6e2f6f637465742d73747265616d3230b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"a74a8b79ed6d117b5c6bedd739ac8d13c283c2e560b8781be85709b60ee9ed7ae27886d19031f79ec91410cc1d92e2bc\",\n \"stream_name\": \"tmpm1uonkty\",\n \"streaming_url\": \"http://localhost:5280/stream/b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"suggested_file_name\": \"tmpm1uonkty\",\n \"timestamp\": 1584835933,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685\",\n \"written_bytes\": 11\n }\n}" + "curl": "curl -d'{\"method\": \"file_save\", \"params\": {\"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\"}}' http://localhost:5279/", + "lbrynet": "lbrynet file save --sd_hash=\"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\"", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_save\", \"params\": {\"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\"}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"added_on\": 1585619142,\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"confirmations\": 3,\n \"content_fee\": null,\n \"download_directory\": \"/tmp/tmpx9izt3bj\",\n \"download_path\": \"/tmp/tmpx9izt3bj/tmp4s2rv5lr_1\",\n \"file_name\": \"tmp4s2rv5lr_1\",\n \"height\": 214,\n \"is_fully_reflected\": false,\n \"key\": \"33d1b3fcadd55ab27a674c579fe33d69\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp4s2rv5lr\",\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"0128a349afae6a298321acaed339043edbc5134630e3e5c3fffabbc16690ec00df8f717235b3217ea27fbd8cd335c0abf344ebbe19d733d648f4230ee35ed5144a97aed7852dc8e613629eb6289ef8db0a8f8f25850a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d703473327276356c72180b22186170706c69636174696f6e2f6f637465742d73747265616d323063004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"6444414d8b1853d67710a6314a853bb5eec6b089ee334c0ec0b69982c1f6d1ef3331a778fe880f6f483fcf5438f42e35\",\n \"stream_name\": \"tmp4s2rv5lr\",\n \"streaming_url\": \"http://localhost:5280/stream/63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"suggested_file_name\": \"tmp4s2rv5lr\",\n \"timestamp\": 1466680974,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047\",\n \"written_bytes\": 11\n }\n}" } ] }, @@ -3132,7 +3180,7 @@ "curl": "curl -d'{\"method\": \"settings_get\", \"params\": {}}' http://localhost:5279/", "lbrynet": "lbrynet settings get", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"settings_get\", \"params\": {}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"announce_head_and_sd_only\": true,\n \"api\": \"localhost:5279\",\n \"audio_encoder\": \"aac -b:a 160k\",\n \"blob_download_timeout\": 30.0,\n \"blob_lru_cache_size\": 0,\n \"blockchain_name\": \"lbrycrd_regtest\",\n \"cache_time\": 150,\n \"coin_selection_strategy\": \"standard\",\n \"comment_server\": \"https://comments.lbry.com/api\",\n \"components_to_skip\": [\n \"dht\",\n \"upnp\",\n \"hash_announcer\",\n \"peer_protocol_server\"\n ],\n \"concurrent_blob_announcers\": 10,\n \"concurrent_reflector_uploads\": 10,\n \"config\": \"/home/lex/.local/share/lbry/lbrynet/daemon_settings.yml\",\n \"data_dir\": \"/tmp/tmppom1car9\",\n \"download_dir\": \"/tmp/tmppom1car9\",\n \"download_timeout\": 30.0,\n \"ffmpeg_path\": \"\",\n \"fixed_peer_delay\": 2.0,\n \"known_dht_nodes\": [],\n \"lbryum_servers\": [\n [\n \"127.0.0.1\",\n 50001\n ]\n ],\n \"max_connections_per_download\": 4,\n \"max_key_fee\": {\n \"amount\": 50.0,\n \"currency\": \"USD\"\n },\n \"max_wallet_server_fee\": \"0.0\",\n \"network_interface\": \"0.0.0.0\",\n \"node_rpc_timeout\": 5.0,\n \"peer_connect_timeout\": 3.0,\n \"prometheus_port\": 0,\n \"reflect_streams\": true,\n \"reflector_servers\": [\n [\n \"127.0.0.1\",\n 5566\n ]\n ],\n \"s3_headers_depth\": 960,\n \"save_blobs\": true,\n \"save_files\": true,\n \"save_resolved_claims\": true,\n \"share_usage_data\": false,\n \"split_buckets_under_index\": 1,\n \"streaming_get\": true,\n \"streaming_server\": \"localhost:5280\",\n \"tcp_port\": 3333,\n \"track_bandwidth\": true,\n \"udp_port\": 4444,\n \"use_upnp\": false,\n \"video_bitrate_maximum\": 8400000,\n \"video_encoder\": \"libx264 -crf 21 -preset faster -pix_fmt yuv420p\",\n \"video_scaler\": \"-vf \\\"scale=if(gte(iw\\\\,ih)\\\\,min(2560\\\\,iw)\\\\,-2):if(lt(iw\\\\,ih)\\\\,min(2560\\\\,ih)\\\\,-2)\\\" -maxrate 8400K -bufsize 5000K\",\n \"volume_analysis_time\": 240,\n \"volume_filter\": \"-af loudnorm\",\n \"wallet_dir\": \"/tmp/tmppom1car9\",\n \"wallets\": [\n \"default_wallet\"\n ]\n }\n}" + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"announce_head_and_sd_only\": true,\n \"api\": \"localhost:5279\",\n \"audio_encoder\": \"aac -b:a 160k\",\n \"blob_download_timeout\": 30.0,\n \"blob_lru_cache_size\": 0,\n \"blockchain_name\": \"lbrycrd_regtest\",\n \"cache_time\": 150,\n \"coin_selection_strategy\": \"standard\",\n \"comment_server\": \"https://comments.lbry.com/api\",\n \"components_to_skip\": [\n \"dht\",\n \"upnp\",\n \"hash_announcer\",\n \"peer_protocol_server\"\n ],\n \"concurrent_blob_announcers\": 10,\n \"concurrent_reflector_uploads\": 10,\n \"config\": \"/home/lex/.local/share/lbry/lbrynet/daemon_settings.yml\",\n \"data_dir\": \"/tmp/tmpx9izt3bj\",\n \"download_dir\": \"/tmp/tmpx9izt3bj\",\n \"download_timeout\": 30.0,\n \"ffmpeg_path\": \"\",\n \"fixed_peer_delay\": 2.0,\n \"known_dht_nodes\": [],\n \"lbryum_servers\": [\n [\n \"127.0.0.1\",\n 50001\n ]\n ],\n \"max_connections_per_download\": 4,\n \"max_key_fee\": {\n \"amount\": 50.0,\n \"currency\": \"USD\"\n },\n \"max_wallet_server_fee\": \"0.0\",\n \"network_interface\": \"0.0.0.0\",\n \"node_rpc_timeout\": 5.0,\n \"peer_connect_timeout\": 3.0,\n \"prometheus_port\": 0,\n \"reflect_streams\": true,\n \"reflector_servers\": [\n [\n \"127.0.0.1\",\n 5566\n ]\n ],\n \"s3_headers_depth\": 960,\n \"save_blobs\": true,\n \"save_files\": true,\n \"save_resolved_claims\": true,\n \"share_usage_data\": false,\n \"split_buckets_under_index\": 1,\n \"streaming_get\": true,\n \"streaming_server\": \"localhost:5280\",\n \"tcp_port\": 3333,\n \"track_bandwidth\": true,\n \"udp_port\": 4444,\n \"use_upnp\": false,\n \"video_bitrate_maximum\": 8400000,\n \"video_encoder\": \"libx264 -crf 21 -preset faster -pix_fmt yuv420p\",\n \"video_scaler\": \"-vf \\\"scale=if(gte(iw\\\\,ih)\\\\,min(1920\\\\,iw)\\\\,-2):if(lt(iw\\\\,ih)\\\\,min(1920\\\\,ih)\\\\,-2)\\\" -maxrate 8400K -bufsize 5000K\",\n \"volume_analysis_time\": 240,\n \"volume_filter\": \"-af loudnorm\",\n \"wallet_dir\": \"/tmp/tmpx9izt3bj\",\n \"wallets\": [\n \"default_wallet\"\n ]\n }\n}" } ] }, @@ -3207,10 +3255,10 @@ "examples": [ { "title": "Abandon a stream claim", - "curl": "curl -d'{\"method\": \"stream_abandon\", \"params\": {\"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\", \"preview\": false, \"blocking\": false}}' http://localhost:5279/", - "lbrynet": "lbrynet stream abandon 1812e1a18fbc87697c97a7eed78bc783e4a13d27", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_abandon\", \"params\": {\"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\", \"preview\": false, \"blocking\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"010000000185662a6760f4771ab16e8425bf6575bca03f204a95613a42b1712be2699549e1000000006b483045022100977bcc6ef9dd9cbf3b1b83c6010036da61d7f5b6df436a6e420c75c592b158e9022020ba3b2faedc9d4bdc9f60975a65285211f142ab7d3ef573fc707e3271a0fbbe012102c970f16119e215dad18ba379ff0fdefaf3f403fd57846667bad3aafbae8ebd4effffffff0134b7f505000000001976a91421e207f9c1a83ddba6200fa3af512a0be71b8df188ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mouj5yBftsbi5yBt9hwMrKzSy1uyYb8xFY\",\n \"amount\": \"1.0\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"claim_op\": \"update\",\n \"confirmations\": 3,\n \"height\": 214,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"timestamp\": 1584835933,\n \"txid\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpm1uonkty\",\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mic7NJcC7d6nTwNdGAEbERFq2zQxh34dSJ\",\n \"amount\": \"0.999893\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"9a492bd0c50c777de4ab98e05d4354080c7c8c71cc7b5354c43af258b001487f\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000107\",\n \"total_input\": \"1.0\",\n \"total_output\": \"0.999893\",\n \"txid\": \"9a492bd0c50c777de4ab98e05d4354080c7c8c71cc7b5354c43af258b001487f\"\n }\n}" + "curl": "curl -d'{\"method\": \"stream_abandon\", \"params\": {\"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\", \"preview\": false, \"blocking\": false}}' http://localhost:5279/", + "lbrynet": "lbrynet stream abandon b417290577f86e33f746980cc43dcf35a76e3374", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_abandon\", \"params\": {\"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\", \"preview\": false, \"blocking\": false}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"010000000147b02b5e13d5b4cc153493734022cbc0c9df2a93f49afbd26c640c7db9c13ac3000000006b483045022100f6d5269d88af21461f57f6e7cf7ed6d548d22393fb371336fee9f0ba56692c36022028ab977abc1fdc681d0af0753b1816c61cce2939c1abbfcad8ad53be82a22af2012102b343002aa3e967dc7fd58c5e42a43afd9917761247c39eab60b5543068ea9b36ffffffff0134b7f505000000001976a9143f6f6e293757d1ec5035d4940811d684f1b4af6788ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mwfK8kVb2w4P5HMQG7qF9FJUphvwvv276R\",\n \"amount\": \"1.0\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"claim_op\": \"update\",\n \"confirmations\": 3,\n \"height\": 214,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#b417290577f86e33f746980cc43dcf35a76e3374\",\n \"timestamp\": 1466680974,\n \"txid\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp4s2rv5lr\",\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mmJNMTFfsS7yJJ4hAXxr2kESegkUqhUGxK\",\n \"amount\": \"0.999893\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": 1466646266,\n \"txid\": \"51d50cb1ed0d10ee35b52b76464f831413792d1e5f2b0dcec2beca03d6fe3a9c\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000107\",\n \"total_input\": \"1.0\",\n \"total_output\": \"0.999893\",\n \"txid\": \"51d50cb1ed0d10ee35b52b76464f831413792d1e5f2b0dcec2beca03d6fe3a9c\"\n }\n}" } ] }, @@ -3423,17 +3471,17 @@ "examples": [ { "title": "Create a stream claim without metadata", - "curl": "curl -d'{\"method\": \"stream_create\", \"params\": {\"name\": \"astream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpm1uonkty\", \"validate_file\": false, \"optimize_file\": false, \"tags\": [], \"languages\": [], \"locations\": [], \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}' http://localhost:5279/", - "lbrynet": "lbrynet stream create astream 1.0 /tmp/tmpm1uonkty", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_create\", \"params\": {\"name\": \"astream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpm1uonkty\", \"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\": \"0100000001b89793f5fa5f5c689c4f455806dc5815b5195bf44022bac8a5c71ef3f8dfb425010000006b4830450221009ec3fb249dbd5006ce3994cd8412cd8aa4fe542ddc127286b507f143a7fae12d022023891dba843e8e137a7262c60faaed670b187ec5303f988fe1b2ba903f144768012103a037703c7aba48313cc1e4ef0048cb75ff55f87e9abcb5652d53cbb708a0bba7ffffffff0200e1f50500000000bab5076173747265616d4c94000a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d706d31756f6e6b7479180b22186170706c69636174696f6e2f6f637465742d73747265616d3230b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec6d7576a9145c0f8c305cc7db6ef599823bb522bcd8d016f88688ac38fb9423000000001976a914996ee7d5638b9403b27030c760418ced4812026688ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mkrTtToujmYnuaxXpkg4GZKDMEU1myVTyH\",\n \"amount\": \"6.983769\",\n \"confirmations\": 4,\n \"height\": 209,\n \"is_spent\": false,\n \"nout\": 1,\n \"timestamp\": 1584835932,\n \"txid\": \"25b4dff8f31ec7a5c8ba2240f45b19b51558dc0658454f9c685c5ffaf59397b8\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mouj5yBftsbi5yBt9hwMrKzSy1uyYb8xFY\",\n \"amount\": \"1.0\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"claim_op\": \"create\",\n \"confirmations\": -2,\n \"height\": -2,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"timestamp\": null,\n \"txid\": \"de5d55b42f9f8668a763f44468331bef2fff372ffbc6c5916d930d302aa2a5fd\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpm1uonkty\",\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"muWEYG3i5tKnuyX5NJbWwZwLqUkTVcBS1r\",\n \"amount\": \"5.969662\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"de5d55b42f9f8668a763f44468331bef2fff372ffbc6c5916d930d302aa2a5fd\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.014107\",\n \"total_input\": \"6.983769\",\n \"total_output\": \"6.969662\",\n \"txid\": \"de5d55b42f9f8668a763f44468331bef2fff372ffbc6c5916d930d302aa2a5fd\"\n }\n}" + "curl": "curl -d'{\"method\": \"stream_create\", \"params\": {\"name\": \"astream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp4s2rv5lr\", \"validate_file\": false, \"optimize_file\": false, \"tags\": [], \"languages\": [], \"locations\": [], \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}' http://localhost:5279/", + "lbrynet": "lbrynet stream create astream 1.0 /tmp/tmp4s2rv5lr", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_create\", \"params\": {\"name\": \"astream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp4s2rv5lr\", \"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\": \"0100000001a1f83a8dac5fcde42ad2c49c94c09bfadeff3ad6d9af8024667d4a7f7c879360010000006a47304402201ed5bb4e669c723c264c94433157ef3470b0eac91e937e3d7442b812db44560302201e0538961870642b1beec5192ee325f4dcf66dfce5fdaba21a68100bb86713980121023b7a79ed531c250d3941e007e168d8837208b61ef3adf8e91963e93c8464300cffffffff0200e1f50500000000bab5076173747265616d4c94000a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d703473327276356c72180b22186170706c69636174696f6e2f6f637465742d73747265616d323063004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b816d7576a914b116bc7b344a29a65a05624cc01681215b056b4288ac38fb9423000000001976a914ee58da4da04826c532264958457031d70dfde91488ac00000000\",\n \"inputs\": [\n {\n \"address\": \"n2f241395dLShG7ccmpZKUSfR7YFitLnbr\",\n \"amount\": \"6.983769\",\n \"confirmations\": 4,\n \"height\": 209,\n \"is_spent\": false,\n \"nout\": 1,\n \"timestamp\": 1466680171,\n \"txid\": \"6093877c7f4a7d662480afd9d63affdefa9bc0949cc4d22ae4cd5fac8d3af8a1\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mwfK8kVb2w4P5HMQG7qF9FJUphvwvv276R\",\n \"amount\": \"1.0\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"claim_op\": \"create\",\n \"confirmations\": -2,\n \"height\": -2,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#b417290577f86e33f746980cc43dcf35a76e3374\",\n \"timestamp\": 1466646266,\n \"txid\": \"d6f249f429c3fe9c50a3d347cf4a0e46053a23b32d9af5de027c74491ffca732\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp4s2rv5lr\",\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"n3FDZJkAZdD88VrnNJvHaskA8m8oF267rB\",\n \"amount\": \"5.969662\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": 1466646266,\n \"txid\": \"d6f249f429c3fe9c50a3d347cf4a0e46053a23b32d9af5de027c74491ffca732\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.014107\",\n \"total_input\": \"6.983769\",\n \"total_output\": \"6.969662\",\n \"txid\": \"d6f249f429c3fe9c50a3d347cf4a0e46053a23b32d9af5de027c74491ffca732\"\n }\n}" }, { "title": "Create an image stream claim with all metadata and fee", - "curl": "curl -d'{\"method\": \"stream_create\", \"params\": {\"name\": \"blank-image\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp699j9izb.png\", \"validate_file\": false, \"optimize_file\": false, \"fee_currency\": \"LBC\", \"fee_amount\": \"0.3\", \"title\": \"Blank Image\", \"description\": \"A blank PNG that is 5x7.\", \"author\": \"Picaso\", \"tags\": [\"blank\", \"art\"], \"languages\": [\"en\"], \"locations\": [\"US:NH:Manchester\"], \"license\": \"Public Domain\", \"license_url\": \"http://public-domain.org\", \"thumbnail_url\": \"http://smallmedia.com/thumbnail.jpg\", \"release_time\": 1584835908, \"channel_id\": \"f69dbfa313c090198f5259354c70474beade9e69\", \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}' http://localhost:5279/", - "lbrynet": "lbrynet stream create blank-image 1.0 /tmp/tmp699j9izb.png --tags=blank --tags=art --languages=en --locations=US:NH:Manchester --fee_currency=LBC --fee_amount=0.3 --title=\"Blank Image\" --description=\"A blank PNG that is 5x7.\" --author=Picaso --license=\"Public Domain\" --license_url=http://public-domain.org --thumbnail_url=\"http://smallmedia.com/thumbnail.jpg\" --release_time=1584835908 --channel_id=\"f69dbfa313c090198f5259354c70474beade9e69\"", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_create\", \"params\": {\"name\": \"blank-image\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp699j9izb.png\", \"validate_file\": false, \"optimize_file\": false, \"fee_currency\": \"LBC\", \"fee_amount\": \"0.3\", \"title\": \"Blank Image\", \"description\": \"A blank PNG that is 5x7.\", \"author\": \"Picaso\", \"tags\": [\"blank\", \"art\"], \"languages\": [\"en\"], \"locations\": [\"US:NH:Manchester\"], \"license\": \"Public Domain\", \"license_url\": \"http://public-domain.org\", \"thumbnail_url\": \"http://smallmedia.com/thumbnail.jpg\", \"release_time\": 1584835908, \"channel_id\": \"f69dbfa313c090198f5259354c70474beade9e69\", \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001fda5a22a300d936d91c5c6fb2f37ff2fef1b336844f463a768869f2fb4555dde010000006b4830450221008c82dc6b345cf3b115b6afde19cace2af6d06ebed9cdd964e3a3aa8e3ccce6ce02201ea6332c90f1eae039662a1d79df049fe25d5b8a26e384a4310aced2d8a679e4012102c5aa11f433762ec45265bb4857db68195d553f6ced094b3e13df4fd00d96575affffffff0200e1f50500000000fddc01b50b626c616e6b2d696d6167654db10101699edeea4b47704c3559528f1990c013a3bf9df63ddc6b65c42398dba7cafd1b7e84df7aa1a937ceadea99bef0e7721d6f49f148f719bce2caf436465882c11dfd88a8e4eb2645122c43f4246b1be6cd1b312af60ae6010a82010a306c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545120f746d703639396a39697a622e706e6718632209696d6167652f706e6732305fa36626c774e7137bcabcd0ad97fe5a0428fbf511474a5d61ef5fa81e86781fbab419a3159a4344196216c875f482bc120650696361736f1a0d5075626c696320446f6d61696e2218687474703a2f2f7075626c69632d646f6d61696e2e6f726728c4dadaf3053222080112196feff6c907bf7d8cc92d54dbdca5681a1413615a11f629f54b188087a70e520408051007420b426c616e6b20496d6167654a184120626c616e6b20504e472074686174206973203578372e52252a23687474703a2f2f736d616c6c6d656469612e636f6d2f7468756d626e61696c2e6a70675a05626c616e6b5a03617274620208016a1308ec0112024e481a0a4d616e636865737465726d7576a914eff6c907bf7d8cc92d54dbdca5681a1413615a1188acac5e7d1d000000001976a914b62d40b18b2ca3ce5d21f0e84eda4526b42857f288ac00000000\",\n \"inputs\": [\n {\n \"address\": \"muWEYG3i5tKnuyX5NJbWwZwLqUkTVcBS1r\",\n \"amount\": \"5.969662\",\n \"confirmations\": 2,\n \"height\": 213,\n \"is_spent\": false,\n \"nout\": 1,\n \"timestamp\": 1584835933,\n \"txid\": \"de5d55b42f9f8668a763f44468331bef2fff372ffbc6c5916d930d302aa2a5fd\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"n3PmRqqzpaEVNnryaVNn6x8HMrhEDXyxd8\",\n \"amount\": \"1.0\",\n \"claim_id\": \"9271c67ecdab03c607ed4e0f337c480104a4ebf3\",\n \"claim_op\": \"create\",\n \"confirmations\": -2,\n \"height\": -2,\n \"is_channel_signature_valid\": true,\n \"meta\": {},\n \"name\": \"blank-image\",\n \"normalized_name\": \"blank-image\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://blank-image#9271c67ecdab03c607ed4e0f337c480104a4ebf3\",\n \"signing_channel\": {\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"timestamp\": 1584835932,\n \"txid\": \"c1faeecd9f829c00f0cdbfda8f0753da97808b965549f0c45039a4619729a767\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51\",\n \"public_key_id\": \"muET7bMJFJa3PYo5UhPAE1nJHXKWfktBtx\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": null,\n \"txid\": \"e91024900188b4b4a91c9184b35820b84a34be39fd637c774c7b9992a8611650\",\n \"type\": \"claim\",\n \"value\": {\n \"author\": \"Picaso\",\n \"description\": \"A blank PNG that is 5x7.\",\n \"fee\": {\n \"address\": \"n3PmRqqzpaEVNnryaVNn6x8HMrhEDXyxd8\",\n \"amount\": \"0.3\",\n \"currency\": \"LBC\"\n },\n \"image\": {\n \"height\": 7,\n \"width\": 5\n },\n \"languages\": [\n \"en\"\n ],\n \"license\": \"Public Domain\",\n \"license_url\": \"http://public-domain.org\",\n \"locations\": [\n {\n \"city\": \"Manchester\",\n \"country\": \"US\",\n \"state\": \"NH\"\n }\n ],\n \"release_time\": \"1584835908\",\n \"source\": {\n \"hash\": \"6c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545\",\n \"media_type\": \"image/png\",\n \"name\": \"tmp699j9izb.png\",\n \"sd_hash\": \"5fa36626c774e7137bcabcd0ad97fe5a0428fbf511474a5d61ef5fa81e86781fbab419a3159a4344196216c875f482bc\",\n \"size\": \"99\"\n },\n \"stream_type\": \"image\",\n \"tags\": [\n \"blank\",\n \"art\"\n ],\n \"thumbnail\": {\n \"url\": \"http://smallmedia.com/thumbnail.jpg\"\n },\n \"title\": \"Blank Image\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mx8DVBRUqnP1Z828nozvLuo8YkauX2yY93\",\n \"amount\": \"4.947555\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"e91024900188b4b4a91c9184b35820b84a34be39fd637c774c7b9992a8611650\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.022107\",\n \"total_input\": \"5.969662\",\n \"total_output\": \"5.947555\",\n \"txid\": \"e91024900188b4b4a91c9184b35820b84a34be39fd637c774c7b9992a8611650\"\n }\n}" + "curl": "curl -d'{\"method\": \"stream_create\", \"params\": {\"name\": \"blank-image\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp0bz4e07e.png\", \"validate_file\": false, \"optimize_file\": false, \"fee_currency\": \"LBC\", \"fee_amount\": \"0.3\", \"title\": \"Blank Image\", \"description\": \"A blank PNG that is 5x7.\", \"author\": \"Picaso\", \"tags\": [\"blank\", \"art\"], \"languages\": [\"en\"], \"locations\": [\"US:NH:Manchester\"], \"license\": \"Public Domain\", \"license_url\": \"http://public-domain.org\", \"thumbnail_url\": \"http://smallmedia.com/thumbnail.jpg\", \"release_time\": 1585619135, \"channel_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\", \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}' http://localhost:5279/", + "lbrynet": "lbrynet stream create blank-image 1.0 /tmp/tmp0bz4e07e.png --tags=blank --tags=art --languages=en --locations=US:NH:Manchester --fee_currency=LBC --fee_amount=0.3 --title=\"Blank Image\" --description=\"A blank PNG that is 5x7.\" --author=Picaso --license=\"Public Domain\" --license_url=http://public-domain.org --thumbnail_url=\"http://smallmedia.com/thumbnail.jpg\" --release_time=1585619135 --channel_id=\"304613c5db3e0439d3aeac2183296aaeaf49a328\"", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_create\", \"params\": {\"name\": \"blank-image\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp0bz4e07e.png\", \"validate_file\": false, \"optimize_file\": false, \"fee_currency\": \"LBC\", \"fee_amount\": \"0.3\", \"title\": \"Blank Image\", \"description\": \"A blank PNG that is 5x7.\", \"author\": \"Picaso\", \"tags\": [\"blank\", \"art\"], \"languages\": [\"en\"], \"locations\": [\"US:NH:Manchester\"], \"license\": \"Public Domain\", \"license_url\": \"http://public-domain.org\", \"thumbnail_url\": \"http://smallmedia.com/thumbnail.jpg\", \"release_time\": 1585619135, \"channel_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\", \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"010000000132a7fc1f49747c02def59a2db3233a05460e4acf47d3a3509cfec329f449f2d6010000006b483045022100c29b9c07ff0c0e33fa2a774ae537fc64ea673188493addc177a7df67d24600e2022016ce4ab6712b02eaf58e807528a5c22f5ebc9886b7d3e74a71d8e6848e54ded7012103d79d6395c6b7a9a089e29dcdde76ee9e7b119193ca966e0e597e17fde306f3f7ffffffff0200e1f50500000000fddc01b50b626c616e6b2d696d6167654db1010128a349afae6a298321acaed339043edbc51346309f46b4ef31aade52076b9eea70cc65f2b35c3fdf3d270d9c3c4ddf6ff5d7e826488928d5375156b244f27a39ca11ec999f5788cd854119240426d5e7e4cc08de0ae6010a82010a306c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545120f746d7030627a34653037652e706e6718632209696d6167652f706e673230bac3bf82dd819d7d635e0b7e7e67a931ffb1510a33ec2226b850a107a9b31d63e43b96ccfe906e73d122845a84d4baf8120650696361736f1a0d5075626c696320446f6d61696e2218687474703a2f2f7075626c69632d646f6d61696e2e6f726728bfc18af4053222080112196fc608a1aca773f6714c174cc895cf030f2f1b67082806ac16188087a70e520408051007420b426c616e6b20496d6167654a184120626c616e6b20504e472074686174206973203578372e52252a23687474703a2f2f736d616c6c6d656469612e636f6d2f7468756d626e61696c2e6a70675a05626c616e6b5a03617274620208016a1308ec0112024e481a0a4d616e636865737465726d7576a914c608a1aca773f6714c174cc895cf030f2f1b670888acac5e7d1d000000001976a91434cae27d4aa666a3b8208ec8de561baaf42c5fb888ac00000000\",\n \"inputs\": [\n {\n \"address\": \"n3FDZJkAZdD88VrnNJvHaskA8m8oF267rB\",\n \"amount\": \"5.969662\",\n \"confirmations\": 2,\n \"height\": 213,\n \"is_spent\": false,\n \"nout\": 1,\n \"timestamp\": 1466680814,\n \"txid\": \"d6f249f429c3fe9c50a3d347cf4a0e46053a23b32d9af5de027c74491ffca732\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mya4RmQTERdSBem1HV8PzXQhx6Zri7ED1X\",\n \"amount\": \"1.0\",\n \"claim_id\": \"cff8ccad3fd50a18bca94a93c8f6094fd26c0aa5\",\n \"claim_op\": \"create\",\n \"confirmations\": -2,\n \"height\": -2,\n \"is_channel_signature_valid\": true,\n \"meta\": {},\n \"name\": \"blank-image\",\n \"normalized_name\": \"blank-image\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://blank-image#cff8ccad3fd50a18bca94a93c8f6094fd26c0aa5\",\n \"signing_channel\": {\n \"address\": \"mn8TLwsBKAhp3hBdmqFBriYMP1pKbWmCkQ\",\n \"amount\": \"1.0\",\n \"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"timestamp\": 1466680331,\n \"txid\": \"1b4e1cbe7410fff87c6c569d30efd0d8d62ce359e736610c165b3af10918fac3\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638\",\n \"public_key_id\": \"mjP2THCJ1MFjmsmw8nRK5Wd3BfehMSHSEs\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1466646266,\n \"txid\": \"58e9bf49003400a47c4e3d122670aee7cc589a50852150d68a36b95acbf61eb6\",\n \"type\": \"claim\",\n \"value\": {\n \"author\": \"Picaso\",\n \"description\": \"A blank PNG that is 5x7.\",\n \"fee\": {\n \"address\": \"mya4RmQTERdSBem1HV8PzXQhx6Zri7ED1X\",\n \"amount\": \"0.3\",\n \"currency\": \"LBC\"\n },\n \"image\": {\n \"height\": 7,\n \"width\": 5\n },\n \"languages\": [\n \"en\"\n ],\n \"license\": \"Public Domain\",\n \"license_url\": \"http://public-domain.org\",\n \"locations\": [\n {\n \"city\": \"Manchester\",\n \"country\": \"US\",\n \"state\": \"NH\"\n }\n ],\n \"release_time\": \"1585619135\",\n \"source\": {\n \"hash\": \"6c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545\",\n \"media_type\": \"image/png\",\n \"name\": \"tmp0bz4e07e.png\",\n \"sd_hash\": \"bac3bf82dd819d7d635e0b7e7e67a931ffb1510a33ec2226b850a107a9b31d63e43b96ccfe906e73d122845a84d4baf8\",\n \"size\": \"99\"\n },\n \"stream_type\": \"image\",\n \"tags\": [\n \"blank\",\n \"art\"\n ],\n \"thumbnail\": {\n \"url\": \"http://smallmedia.com/thumbnail.jpg\"\n },\n \"title\": \"Blank Image\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mkL6UhxXe22hMUnJwMXRSGYjAPQp7Rk5kW\",\n \"amount\": \"4.947555\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": 1466646266,\n \"txid\": \"58e9bf49003400a47c4e3d122670aee7cc589a50852150d68a36b95acbf61eb6\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.022107\",\n \"total_input\": \"5.969662\",\n \"total_output\": \"5.947555\",\n \"txid\": \"58e9bf49003400a47c4e3d122670aee7cc589a50852150d68a36b95acbf61eb6\"\n }\n}" } ] }, @@ -3497,14 +3545,14 @@ "curl": "curl -d'{\"method\": \"stream_list\", \"params\": {\"name\": [], \"claim_id\": [], \"resolve\": false, \"no_totals\": false}}' http://localhost:5279/", "lbrynet": "lbrynet stream list", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_list\", \"params\": {\"name\": [], \"claim_id\": [], \"resolve\": false, \"no_totals\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mouj5yBftsbi5yBt9hwMrKzSy1uyYb8xFY\",\n \"amount\": \"1.0\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"is_internal_transfer\": false,\n \"is_my_input\": true,\n \"is_my_output\": true,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"signing_channel\": {\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"timestamp\": 1584835932,\n \"txid\": \"c1faeecd9f829c00f0cdbfda8f0753da97808b965549f0c45039a4619729a767\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51\",\n \"public_key_id\": \"muET7bMJFJa3PYo5UhPAE1nJHXKWfktBtx\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1584835933,\n \"txid\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpm1uonkty\",\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mwfK8kVb2w4P5HMQG7qF9FJUphvwvv276R\",\n \"amount\": \"1.0\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"is_internal_transfer\": false,\n \"is_my_input\": true,\n \"is_my_output\": true,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#b417290577f86e33f746980cc43dcf35a76e3374\",\n \"signing_channel\": {\n \"address\": \"mn8TLwsBKAhp3hBdmqFBriYMP1pKbWmCkQ\",\n \"amount\": \"1.0\",\n \"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"timestamp\": 1466680331,\n \"txid\": \"1b4e1cbe7410fff87c6c569d30efd0d8d62ce359e736610c165b3af10918fac3\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638\",\n \"public_key_id\": \"mjP2THCJ1MFjmsmw8nRK5Wd3BfehMSHSEs\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1466680974,\n \"txid\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp4s2rv5lr\",\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" }, { "title": "Paginate your stream claims", "curl": "curl -d'{\"method\": \"stream_list\", \"params\": {\"name\": [], \"claim_id\": [], \"page\": 1, \"page_size\": 20, \"resolve\": false, \"no_totals\": false}}' http://localhost:5279/", "lbrynet": "lbrynet stream list --page=1 --page_size=20", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_list\", \"params\": {\"name\": [], \"claim_id\": [], \"page\": 1, \"page_size\": 20, \"resolve\": false, \"no_totals\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mouj5yBftsbi5yBt9hwMrKzSy1uyYb8xFY\",\n \"amount\": \"1.0\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"is_internal_transfer\": false,\n \"is_my_input\": true,\n \"is_my_output\": true,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"signing_channel\": {\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"timestamp\": 1584835932,\n \"txid\": \"c1faeecd9f829c00f0cdbfda8f0753da97808b965549f0c45039a4619729a767\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51\",\n \"public_key_id\": \"muET7bMJFJa3PYo5UhPAE1nJHXKWfktBtx\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1584835933,\n \"txid\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpm1uonkty\",\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mwfK8kVb2w4P5HMQG7qF9FJUphvwvv276R\",\n \"amount\": \"1.0\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"is_internal_transfer\": false,\n \"is_my_input\": true,\n \"is_my_output\": true,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#b417290577f86e33f746980cc43dcf35a76e3374\",\n \"signing_channel\": {\n \"address\": \"mn8TLwsBKAhp3hBdmqFBriYMP1pKbWmCkQ\",\n \"amount\": \"1.0\",\n \"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"timestamp\": 1466680331,\n \"txid\": \"1b4e1cbe7410fff87c6c569d30efd0d8d62ce359e736610c165b3af10918fac3\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638\",\n \"public_key_id\": \"mjP2THCJ1MFjmsmw8nRK5Wd3BfehMSHSEs\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1466680974,\n \"txid\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp4s2rv5lr\",\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}" } ] }, @@ -3837,10 +3885,10 @@ "examples": [ { "title": "Update a stream claim to add channel", - "curl": "curl -d'{\"method\": \"stream_update\", \"params\": {\"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\", \"validate_file\": false, \"optimize_file\": false, \"clear_fee\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"channel_id\": \"f69dbfa313c090198f5259354c70474beade9e69\", \"clear_channel\": false, \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false, \"replace\": false}}' http://localhost:5279/", - "lbrynet": "lbrynet stream update 1812e1a18fbc87697c97a7eed78bc783e4a13d27 --channel_id=\"f69dbfa313c090198f5259354c70474beade9e69\"", - "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_update\", \"params\": {\"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\", \"validate_file\": false, \"optimize_file\": false, \"clear_fee\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"channel_id\": \"f69dbfa313c090198f5259354c70474beade9e69\", \"clear_channel\": false, \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false, \"replace\": false}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000002fda5a22a300d936d91c5c6fb2f37ff2fef1b336844f463a768869f2fb4555dde000000006b483045022100ba0a0955671c1f5397e63d2d6cc695daafe502e7611eac5333b59ded57bbda2d022070cb0da7109231f1b26f8864ab5f2a003f5316d019d941118de49d9daf7c5369012102c970f16119e215dad18ba379ff0fdefaf3f403fd57846667bad3aafbae8ebd4effffffff7a97d897e479efa7ed0a7171852bb9f39959b39758f781ff868feaea9557ce9e010000006a47304402202aff0c0533accd3323272effc0af7159b6782c903df2cc33f29a06038eaa0a0202206fc682bbce286c48289fc25004824037c300e77e18cf681ffbb645483a7824d7012102ca8319d1ab75c91f6b191ec3805cea7ccfa58f1982340d39c25df5c9d43f1006ffffffff0200e1f50500000000fd2301b7076173747265616d14273da1e483c78bd7eea7977c6987bc8fa1e112184ce801699edeea4b47704c3559528f1990c013a3bf9df60b16fc0ba8cc0eccbd2483d7e39dfa92e673dca6aed4250aa711cfc7b9d5b9d06785c6c89250c5c1c9efb086948eefa46510421f85c3f9607c9a43b08b49bfc70a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d706d31756f6e6b7479180b22186170706c69636174696f6e2f6f637465742d73747265616d3230b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec6d6d76a9145c0f8c305cc7db6ef599823bb522bcd8d016f88688ac32a0d205000000001976a914d09321c34343db4b06b01257ae3cad37c565df6c88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mouj5yBftsbi5yBt9hwMrKzSy1uyYb8xFY\",\n \"amount\": \"1.0\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"height\": 213,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"timestamp\": 1584835933,\n \"txid\": \"de5d55b42f9f8668a763f44468331bef2fff372ffbc6c5916d930d302aa2a5fd\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpm1uonkty\",\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mvp9uCJ88RTw9CnnVg1Q6nHqJoSMtnp1ny\",\n \"amount\": \"0.9772285\",\n \"confirmations\": 3,\n \"height\": 211,\n \"is_spent\": false,\n \"nout\": 1,\n \"timestamp\": 1584835932,\n \"txid\": \"9ece5795eaea8f86ff81f75897b35999f3b92b8571710aeda7ef79e497d8977a\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mouj5yBftsbi5yBt9hwMrKzSy1uyYb8xFY\",\n \"amount\": \"1.0\",\n \"claim_id\": \"1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"claim_op\": \"update\",\n \"confirmations\": -2,\n \"height\": -2,\n \"is_channel_signature_valid\": true,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#1812e1a18fbc87697c97a7eed78bc783e4a13d27\",\n \"signing_channel\": {\n \"address\": \"mrYg6g2wFDVioeNHQf65BxYRrbGZ5kZwp4\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f69dbfa313c090198f5259354c70474beade9e69\",\n \"claim_op\": \"update\",\n \"confirmations\": 4,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#f69dbfa313c090198f5259354c70474beade9e69\",\n \"timestamp\": 1584835932,\n \"txid\": \"c1faeecd9f829c00f0cdbfda8f0753da97808b965549f0c45039a4619729a767\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042d80addadf27a3f528d24c2b078bec6831cd78b9a75fd2e37daf06cc4eb1ed9c37f06489183d1ab140803170a196c4def86d0af8270c1e191b44d57c5a879c51\",\n \"public_key_id\": \"muET7bMJFJa3PYo5UhPAE1nJHXKWfktBtx\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": null,\n \"txid\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpm1uonkty\",\n \"sd_hash\": \"b7dcc2bd45fee5a5bfebfc2f20bae924c07d99534d320c24d50abb7b2d086e10fe04d61e74ebac9f9cd938a3947255ec\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mzXo6rgWKoRAjwSf7cUmAhxPNudFwS6zbJ\",\n \"amount\": \"0.9768965\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000332\",\n \"total_input\": \"1.9772285\",\n \"total_output\": \"1.9768965\",\n \"txid\": \"e1499569e22b71b1423a61954a203fa0bc7565bf25846eb11a77f460672a6685\"\n }\n}" + "curl": "curl -d'{\"method\": \"stream_update\", \"params\": {\"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\", \"validate_file\": false, \"optimize_file\": false, \"clear_fee\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"channel_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\", \"clear_channel\": false, \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false, \"replace\": false}}' http://localhost:5279/", + "lbrynet": "lbrynet stream update b417290577f86e33f746980cc43dcf35a76e3374 --channel_id=\"304613c5db3e0439d3aeac2183296aaeaf49a328\"", + "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_update\", \"params\": {\"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\", \"validate_file\": false, \"optimize_file\": false, \"clear_fee\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"channel_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\", \"clear_channel\": false, \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false, \"replace\": false}}).json()", + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"010000000232a7fc1f49747c02def59a2db3233a05460e4acf47d3a3509cfec329f449f2d6000000006b483045022100af94690d7e86b0bb266622803b4923958ee3ebfa810271875cf6193897ff14c5022076c717310ea890d84f16306bb8163a25724d6592ade879623ee48b7feb105c59012102b343002aa3e967dc7fd58c5e42a43afd9917761247c39eab60b5543068ea9b36ffffffff764fd7176883240db438fc9ced71abb4b8dfda37b1b5a6d7e7bb257a84a8202e010000006b483045022100fa5ff07909a0b5c497dbf35d82f67e113be50a7676db9179c4a803de9c3c311b022067b9cba37f2511c63523c3a35cfe34fd1d01ad5257ee94525fd8d50c32a6da9f012102e81bdae9fae369844547c06c6d0ff0f9a78cb7626b70ff71461ce3d930191969ffffffff0200e1f50500000000fd2301b7076173747265616d1474336ea735cf3dc40c9846f7336ef877052917b44ce80128a349afae6a298321acaed339043edbc5134630e3e5c3fffabbc16690ec00df8f717235b3217ea27fbd8cd335c0abf344ebbe19d733d648f4230ee35ed5144a97aed7852dc8e613629eb6289ef8db0a8f8f25850a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d703473327276356c72180b22186170706c69636174696f6e2f6f637465742d73747265616d323063004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b816d6d76a914b116bc7b344a29a65a05624cc01681215b056b4288ac32a0d205000000001976a91432f5fcc29e9c70ebf331e37279112cb3a5b9752488ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mwfK8kVb2w4P5HMQG7qF9FJUphvwvv276R\",\n \"amount\": \"1.0\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"height\": 213,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#b417290577f86e33f746980cc43dcf35a76e3374\",\n \"timestamp\": 1466680814,\n \"txid\": \"d6f249f429c3fe9c50a3d347cf4a0e46053a23b32d9af5de027c74491ffca732\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp4s2rv5lr\",\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mfWzoeWq8tdZJWcMKaWgC2iLHVx6fWtQkB\",\n \"amount\": \"0.9772285\",\n \"confirmations\": 3,\n \"height\": 211,\n \"is_spent\": false,\n \"nout\": 1,\n \"timestamp\": 1466680492,\n \"txid\": \"2e20a8847a25bbe7d7a6b5b137dadfb8b4ab71ed9cfc38b40d24836817d74f76\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mwfK8kVb2w4P5HMQG7qF9FJUphvwvv276R\",\n \"amount\": \"1.0\",\n \"claim_id\": \"b417290577f86e33f746980cc43dcf35a76e3374\",\n \"claim_op\": \"update\",\n \"confirmations\": -2,\n \"height\": -2,\n \"is_channel_signature_valid\": true,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#b417290577f86e33f746980cc43dcf35a76e3374\",\n \"signing_channel\": {\n \"address\": \"mn8TLwsBKAhp3hBdmqFBriYMP1pKbWmCkQ\",\n \"amount\": \"1.0\",\n \"claim_id\": \"304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"claim_op\": \"update\",\n \"confirmations\": 4,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_spent\": false,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#304613c5db3e0439d3aeac2183296aaeaf49a328\",\n \"timestamp\": 1466680331,\n \"txid\": \"1b4e1cbe7410fff87c6c569d30efd0d8d62ce359e736610c165b3af10918fac3\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200048cd7720f02952ebe51d9e8c1b495743919ce730f25ac195cae43d8d598724a60b88d50381ad4874d6ba0b3dcf819077a41ab854831404f97d7626c3df626c638\",\n \"public_key_id\": \"mjP2THCJ1MFjmsmw8nRK5Wd3BfehMSHSEs\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1466646266,\n \"txid\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp4s2rv5lr\",\n \"sd_hash\": \"63004f5578b24360b3c67cffa552d07a4a334375afb7972c8beb47b835a1cec86b7208dc17addf852377e6afb78b8b81\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mkAQm9R1CD72sLjMnSgtiYJWfEu8vc6opu\",\n \"amount\": \"0.9768965\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": 1466646266,\n \"txid\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000332\",\n \"total_input\": \"1.9772285\",\n \"total_output\": \"1.9768965\",\n \"txid\": \"c33ac1b97d0c646cd2fb9af4932adfc9c0cb224073933415ccb4d5135e2bb047\"\n }\n}" } ] } @@ -4142,7 +4190,7 @@ "curl": "curl -d'{\"method\": \"transaction_list\", \"params\": {}}' http://localhost:5279/", "lbrynet": "lbrynet transaction list", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"transaction_list\", \"params\": {}}).json()", - "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"abandon_info\": [],\n \"claim_info\": [],\n \"confirmations\": 1,\n \"date\": \"2020-03-21 20:12\",\n \"fee\": \"-0.000124\",\n \"purchase_info\": [],\n \"support_info\": [],\n \"timestamp\": 1584835932,\n \"txid\": \"5694deec76abd26cf8860c9ade00a0a7a857e60f5d31ecb21ed3d8bd45a76cb9\",\n \"update_info\": [],\n \"value\": \"0.0\"\n },\n {\n \"abandon_info\": [],\n \"claim_info\": [],\n \"confirmations\": 7,\n \"date\": \"2020-03-21 20:12\",\n \"fee\": \"0.0\",\n \"purchase_info\": [],\n \"support_info\": [],\n \"timestamp\": 1584835931,\n \"txid\": \"99ae067b5183ef0e7f67be55bff6084a86be9bcd8c97b39cb1134f0d01e6c95c\",\n \"update_info\": [],\n \"value\": \"10.0\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 2,\n \"total_pages\": 1\n }\n}" + "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"abandon_info\": [],\n \"claim_info\": [],\n \"confirmations\": 1,\n \"date\": \"2016-06-23 07:04\",\n \"fee\": \"-0.000124\",\n \"purchase_info\": [],\n \"support_info\": [],\n \"timestamp\": 1466679849,\n \"txid\": \"de03731c8a7d576729fcf14a2f0f1a527d5c7d867494e2c21edf4311ad96268b\",\n \"update_info\": [],\n \"value\": \"0.0\"\n },\n {\n \"abandon_info\": [],\n \"claim_info\": [],\n \"confirmations\": 7,\n \"date\": \"2016-06-23 06:48\",\n \"fee\": \"0.0\",\n \"purchase_info\": [],\n \"support_info\": [],\n \"timestamp\": 1466678885,\n \"txid\": \"f8d53cf8bfafd0a6e05e5a664f0e63933664e36fd2c9104683382e6e6a7d76ba\",\n \"update_info\": [],\n \"value\": \"10.0\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 2,\n \"total_pages\": 1\n }\n}" } ] }, @@ -4241,6 +4289,12 @@ "description": "excludes any outputs that are exactly this combination: \"--is_my_input --is_my_output --type=other\" this allows to exclude \"change\" payments, this flag can be used in combination with any of the other flags", "is_required": false }, + { + "name": "include_received_tips", + "type": "bool", + "description": "calculate the amount of tips recieved for claim outputs", + "is_required": false + }, { "name": "account_id", "type": "str", @@ -4287,6 +4341,208 @@ "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 \"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 }", "examples": [] }, + { + "name": "txo_plot", + "description": "Plot transaction output sum over days.", + "arguments": [ + { + "name": "type", + "type": "str or list", + "description": "claim type: stream, channel, support, purchase, collection, repost, other", + "is_required": false + }, + { + "name": "txid", + "type": "str or list", + "description": "transaction id of outputs", + "is_required": false + }, + { + "name": "claim_id", + "type": "str or list", + "description": "claim id", + "is_required": false + }, + { + "name": "name", + "type": "str or list", + "description": "claim name", + "is_required": false + }, + { + "name": "unspent", + "type": "bool", + "description": "hide spent outputs, show only unspent ones", + "is_required": false + }, + { + "name": "is_my_input_or_output", + "type": "bool", + "description": "txos which have your inputs or your outputs, if using this flag the other related flags are ignored (--is_my_output, --is_my_input, etc)", + "is_required": false + }, + { + "name": "is_my_output", + "type": "bool", + "description": "show outputs controlled by you", + "is_required": false + }, + { + "name": "is_not_my_output", + "type": "bool", + "description": "show outputs not controlled by you", + "is_required": false + }, + { + "name": "is_my_input", + "type": "bool", + "description": "show outputs created by you", + "is_required": false + }, + { + "name": "is_not_my_input", + "type": "bool", + "description": "show outputs not created by you", + "is_required": false + }, + { + "name": "exclude_internal_transfers", + "type": "bool", + "description": "excludes any outputs that are exactly this combination: \"--is_my_input --is_my_output --type=other\" this allows to exclude \"change\" payments, this flag can be used in combination with any of the other flags", + "is_required": false + }, + { + "name": "account_id", + "type": "str", + "description": "id of the account to query", + "is_required": false + }, + { + "name": "wallet_id", + "type": "str", + "description": "restrict results to specific wallet", + "is_required": false + }, + { + "name": "days_back", + "type": "int", + "description": "number of days back from today (not compatible with --start_day, --days_after, --end_day)", + "is_required": false + }, + { + "name": "start_day", + "type": "date", + "description": "start on specific date (YYYY-MM-DD) (instead of --days_back)", + "is_required": false + }, + { + "name": "days_after", + "type": "int", + "description": "end number of days after --start_day (instead of --end_day)", + "is_required": false + }, + { + "name": "end_day", + "type": "date", + "description": "end on specific date (YYYY-MM-DD) (instead of --days_after)", + "is_required": false + } + ], + "returns": "List[Dict]", + "examples": [] + }, + { + "name": "txo_spend", + "description": "Spend transaction outputs, batching into multiple transactions as necessary.", + "arguments": [ + { + "name": "type", + "type": "str or list", + "description": "claim type: stream, channel, support, purchase, collection, repost, other", + "is_required": false + }, + { + "name": "txid", + "type": "str or list", + "description": "transaction id of outputs", + "is_required": false + }, + { + "name": "claim_id", + "type": "str or list", + "description": "claim id", + "is_required": false + }, + { + "name": "channel_id", + "type": "str or list", + "description": "claims in this channel", + "is_required": false + }, + { + "name": "name", + "type": "str or list", + "description": "claim name", + "is_required": false + }, + { + "name": "is_my_input", + "type": "bool", + "description": "show outputs created by you", + "is_required": false + }, + { + "name": "is_not_my_input", + "type": "bool", + "description": "show outputs not created by you", + "is_required": false + }, + { + "name": "exclude_internal_transfers", + "type": "bool", + "description": "excludes any outputs that are exactly this combination: \"--is_my_input --is_my_output --type=other\" this allows to exclude \"change\" payments, this flag can be used in combination with any of the other flags", + "is_required": false + }, + { + "name": "account_id", + "type": "str", + "description": "id of the account to query", + "is_required": false + }, + { + "name": "wallet_id", + "type": "str", + "description": "restrict results 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 abandon is in mempool", + "is_required": false + }, + { + "name": "batch_size", + "type": "int", + "description": "number of txos to spend per transactions", + "is_required": false + }, + { + "name": "include_full_tx", + "type": "bool", + "description": "include entire tx in output and not just the txid", + "is_required": false + } + ], + "returns": " [\n {\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 }\n ]", + "examples": [] + }, { "name": "txo_sum", "description": "Sum of transaction outputs.", diff --git a/lbry/__init__.py b/lbry/__init__.py index a5cbafb5b..1591ec860 100644 --- a/lbry/__init__.py +++ b/lbry/__init__.py @@ -1,2 +1,2 @@ -__version__ = "0.66.0" +__version__ = "0.69.1" version = tuple(map(int, __version__.split('.'))) # pylint: disable=invalid-name diff --git a/lbry/conf.py b/lbry/conf.py index 37390fd90..fa395d8a9 100644 --- a/lbry/conf.py +++ b/lbry/conf.py @@ -602,8 +602,6 @@ class Config(CLIConfig): # blockchain blockchain_name = String("Blockchain name - lbrycrd_main, lbrycrd_regtest, or lbrycrd_testnet", 'lbrycrd_main') - s3_headers_depth = Integer("download headers from s3 when the local height is more than 10 chunks behind", 96 * 10) - cache_time = Integer("Time to cache resolved claims", 150) # TODO: use this # daemon save_files = Toggle("Save downloaded files when calling `get` by default", True) diff --git a/lbry/extras/daemon/componentmanager.py b/lbry/extras/daemon/componentmanager.py index 811f58561..f9f7903ae 100644 --- a/lbry/extras/daemon/componentmanager.py +++ b/lbry/extras/daemon/componentmanager.py @@ -158,11 +158,14 @@ class ComponentManager: for component in self.components } - def get_component(self, component_name): + def get_actual_component(self, component_name): for component in self.components: if component.component_name == component_name: - return component.component + return component raise NameError(component_name) + def get_component(self, component_name): + return self.get_actual_component(component_name).component + def has_component(self, component_name): return any(component for component in self.components if component_name == component.component_name) diff --git a/lbry/extras/daemon/daemon.py b/lbry/extras/daemon/daemon.py index 0411e99a5..9789bfa14 100644 --- a/lbry/extras/daemon/daemon.py +++ b/lbry/extras/daemon/daemon.py @@ -329,6 +329,9 @@ class Daemon(metaclass=JSONRPCServerType): prom_app.router.add_get('/metrics', self.handle_metrics_get_request) self.metrics_runner = web.AppRunner(prom_app) + self.need_connection_status_refresh = asyncio.Event() + self._connection_status_task: Optional[asyncio.Task] = None + @property def dht_node(self) -> typing.Optional['Node']: return self.component_manager.get_component(DHT_COMPONENT) @@ -441,18 +444,25 @@ class Daemon(metaclass=JSONRPCServerType): log.warning("detected internet connection was lost") self._connection_status = (self.component_manager.loop.time(), connected) - async def get_connection_status(self) -> str: - if self._connection_status[0] + 300 > self.component_manager.loop.time(): - if not self._connection_status[1]: - await self.update_connection_status() - else: + async def keep_connection_status_up_to_date(self): + while True: + try: + await asyncio.wait_for(self.need_connection_status_refresh.wait(), 300) + except asyncio.TimeoutError: + pass await self.update_connection_status() - return CONNECTION_STATUS_CONNECTED if self._connection_status[1] else CONNECTION_STATUS_NETWORK + self.need_connection_status_refresh.clear() async def start(self): log.info("Starting LBRYNet Daemon") log.debug("Settings: %s", json.dumps(self.conf.settings_dict, indent=2)) log.info("Platform: %s", json.dumps(self.platform_info, indent=2)) + + self.need_connection_status_refresh.set() + self._connection_status_task = self.component_manager.loop.create_task( + self.keep_connection_status_up_to_date() + ) + await self.analytics_manager.send_server_startup() await self.rpc_runner.setup() await self.streaming_runner.setup() @@ -511,6 +521,10 @@ class Daemon(metaclass=JSONRPCServerType): await self.component_startup_task async def stop(self): + if self._connection_status_task: + if not self._connection_status_task.done(): + self._connection_status_task.cancel() + self._connection_status_task = None if self.component_startup_task is not None: if self.component_startup_task.done(): await self.component_manager.stop() @@ -785,7 +799,7 @@ class Daemon(metaclass=JSONRPCServerType): 'analyze_audio_volume': (bool) should ffmpeg analyze audio } """ - return await self._video_file_analyzer.status(reset=True) + return await self._video_file_analyzer.status(reset=True, recheck=True) async def jsonrpc_status(self): """ @@ -875,14 +889,16 @@ class Daemon(metaclass=JSONRPCServerType): } """ - connection_code = await self.get_connection_status() + if not self._connection_status[1]: + self.need_connection_status_refresh.set() + connection_code = CONNECTION_STATUS_CONNECTED if self._connection_status[1] else CONNECTION_STATUS_NETWORK ffmpeg_status = await self._video_file_analyzer.status() - + running_components = self.component_manager.get_components_status() response = { 'installation_id': self.installation_id, - 'is_running': all(self.component_manager.get_components_status().values()), + 'is_running': all(running_components.values()), 'skipped_components': self.component_manager.skip_components, - 'startup_status': self.component_manager.get_components_status(), + 'startup_status': running_components, 'connection_status': { 'code': connection_code, 'message': CONNECTION_MESSAGES[connection_code], @@ -1325,6 +1341,8 @@ class Daemon(metaclass=JSONRPCServerType): Returns: Dictionary of wallet status information. """ + if self.wallet_manager is None: + return {'is_encrypted': None, 'is_syncing': None, 'is_locked': None} wallet = self.wallet_manager.get_wallet_or_default(wallet_id) return { 'is_encrypted': wallet.is_encrypted, @@ -1899,9 +1917,8 @@ class Daemon(metaclass=JSONRPCServerType): """ @requires(STREAM_MANAGER_COMPONENT) - async def jsonrpc_file_list( - self, sort=None, reverse=False, comparison=None, - wallet_id=None, page=None, page_size=None, **kwargs): + async def jsonrpc_file_list(self, sort=None, reverse=False, comparison=None, wallet_id=None, page=None, + page_size=None, **kwargs): """ List files limited by optional filters @@ -1922,17 +1939,17 @@ class Daemon(metaclass=JSONRPCServerType): --stream_hash= : (str) get file with matching stream hash --rowid= : (int) get file with matching row id --added_on= : (int) get file with matching time of insertion - --claim_id= : (str) get file with matching claim id - --outpoint= : (str) get file with matching claim outpoint + --claim_id= : (str) get file with matching claim id(s) + --outpoint= : (str) get file with matching claim outpoint(s) --txid= : (str) get file with matching claim txid --nout= : (int) get file with matching claim nout - --channel_claim_id= : (str) get file with matching channel claim id + --channel_claim_id= : (str) get file with matching channel claim id(s) --channel_name= : (str) get file with matching channel name --claim_name= : (str) get file with matching claim name --blobs_in_stream : (int) get file with matching blobs in stream --blobs_remaining= : (int) amount of remaining blobs to download --sort= : (str) field to sort by (one of the above filter fields) - --comparison= : (str) logical comparison, (eq | ne | g | ge | l | le) + --comparison= : (str) logical comparison, (eq | ne | g | ge | l | le | in) --page= : (int) page to return during paginating --page_size= : (int) number of items on page during pagination --wallet_id= : (str) add purchase receipts from this wallet @@ -1942,6 +1959,7 @@ class Daemon(metaclass=JSONRPCServerType): wallet = self.wallet_manager.get_wallet_or_default(wallet_id) sort = sort or 'rowid' comparison = comparison or 'eq' + paginated = paginate_list( self.stream_manager.get_filtered_streams(sort, reverse, comparison, **kwargs), page, page_size ) @@ -2195,7 +2213,7 @@ class Daemon(metaclass=JSONRPCServerType): List my stream and channel claims. Usage: - claim_list [--claim_type=...] [--claim_id=...] [--name=...] + claim_list [--claim_type=...] [--claim_id=...] [--name=...] [--is_spent] [--channel_id=...] [--account_id=] [--wallet_id=] [--page=] [--page_size=] [--resolve] [--order_by=] [--no_totals] [--include_received_tips] @@ -2205,6 +2223,7 @@ class Daemon(metaclass=JSONRPCServerType): --claim_id= : (str or list) claim id --channel_id= : (str or list) streams in this channel --name= : (str or list) claim name + --is_spent : (bool) shows previous claim updates and abandons --account_id= : (str) id of the account to query --wallet_id= : (str) restrict results to specific wallet --page= : (int) page to return during paginating @@ -2218,7 +2237,8 @@ class Daemon(metaclass=JSONRPCServerType): Returns: {Paginated[Output]} """ kwargs['type'] = claim_type or CLAIM_TYPE_NAMES - kwargs['unspent'] = True + if 'is_spent' not in kwargs: + kwargs['is_not_spent'] = True return self.jsonrpc_txo_list(**kwargs) @requires(WALLET_COMPONENT) @@ -2732,12 +2752,13 @@ class Daemon(metaclass=JSONRPCServerType): Usage: channel_list [ | --account_id=] [--wallet_id=] - [--name=...] [--claim_id=...] + [--name=...] [--claim_id=...] [--is_spent] [--page=] [--page_size=] [--resolve] [--no_totals] Options: --name= : (str or list) channel name --claim_id= : (str or list) channel id + --is_spent : (bool) shows previous channel updates and abandons --account_id= : (str) id of the account to use --wallet_id= : (str) restrict results to specific wallet --page= : (int) page to return during paginating @@ -2749,7 +2770,8 @@ class Daemon(metaclass=JSONRPCServerType): Returns: {Paginated[Output]} """ kwargs['type'] = 'channel' - kwargs['unspent'] = True + if 'is_spent' not in kwargs: + kwargs['is_not_spent'] = True return self.jsonrpc_txo_list(*args, **kwargs) @requires(WALLET_COMPONENT) @@ -3486,12 +3508,13 @@ class Daemon(metaclass=JSONRPCServerType): Usage: stream_list [ | --account_id=] [--wallet_id=] - [--name=...] [--claim_id=...] + [--name=...] [--claim_id=...] [--is_spent] [--page=] [--page_size=] [--resolve] [--no_totals] Options: --name= : (str or list) stream name --claim_id= : (str or list) stream id + --is_spent : (bool) shows previous stream updates and abandons --account_id= : (str) id of the account to query --wallet_id= : (str) restrict results to specific wallet --page= : (int) page to return during paginating @@ -3503,7 +3526,8 @@ class Daemon(metaclass=JSONRPCServerType): Returns: {Paginated[Output]} """ kwargs['type'] = 'stream' - kwargs['unspent'] = True + if 'is_spent' not in kwargs: + kwargs['is_not_spent'] = True return self.jsonrpc_txo_list(*args, **kwargs) @requires(WALLET_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT, BLOB_COMPONENT, @@ -3950,19 +3974,23 @@ class Daemon(metaclass=JSONRPCServerType): return tx @requires(WALLET_COMPONENT) - def jsonrpc_support_list(self, *args, tips=None, **kwargs): + def jsonrpc_support_list(self, *args, received=False, sent=False, staked=False, **kwargs): """ - List supports and tips in my control. + List staked supports and sent/received tips. Usage: support_list [ | --account_id=] [--wallet_id=] - [--name=...] [--claim_id=...] [--tips] + [--name=...] [--claim_id=...] + [--received | --sent | --staked] [--is_spent] [--page=] [--page_size=] [--no_totals] Options: --name= : (str or list) claim name --claim_id= : (str or list) claim id - --tips : (bool) only show tips + --received : (bool) only show received (tips) + --sent : (bool) only show sent (tips) + --staked : (bool) only show my staked supports + --is_spent : (bool) show abandoned supports --account_id= : (str) id of the account to query --wallet_id= : (str) restrict results to specific wallet --page= : (int) page to return during paginating @@ -3973,9 +4001,20 @@ class Daemon(metaclass=JSONRPCServerType): Returns: {Paginated[Output]} """ kwargs['type'] = 'support' - kwargs['unspent'] = True - if tips is True: + if 'is_spent' not in kwargs: + kwargs['is_not_spent'] = True + if received: kwargs['is_not_my_input'] = True + kwargs['is_my_output'] = True + elif sent: + kwargs['is_my_input'] = True + kwargs['is_not_my_output'] = True + # spent for not my outputs is undetermined + kwargs.pop('is_spent', None) + kwargs.pop('is_not_spent', None) + elif staked: + kwargs['is_my_input'] = True + kwargs['is_my_output'] = True return self.jsonrpc_txo_list(*args, **kwargs) @requires(WALLET_COMPONENT) @@ -4150,11 +4189,15 @@ class Daemon(metaclass=JSONRPCServerType): @staticmethod def _constrain_txo_from_kwargs( constraints, type=None, txid=None, # pylint: disable=redefined-builtin - claim_id=None, channel_id=None, name=None, unspent=False, reposted_claim_id=None, + claim_id=None, channel_id=None, name=None, reposted_claim_id=None, + is_spent=False, is_not_spent=False, is_my_input_or_output=None, exclude_internal_transfers=False, is_my_output=None, is_not_my_output=None, is_my_input=None, is_not_my_input=None): - constraints['unspent'] = unspent + if is_spent: + constraints['is_spent'] = True + elif is_not_spent: + constraints['is_spent'] = False constraints['exclude_internal_transfers'] = exclude_internal_transfers if is_my_input_or_output is True: constraints['is_my_input_or_output'] = True @@ -4183,8 +4226,9 @@ class Daemon(metaclass=JSONRPCServerType): List my transaction outputs. Usage: - txo_list [--account_id=] [--type=...] [--txid=...] [--unspent] + txo_list [--account_id=] [--type=...] [--txid=...] [--claim_id=...] [--channel_id=...] [--name=...] + [--is_spent | --is_not_spent] [--is_my_input_or_output | [[--is_my_output | --is_not_my_output] [--is_my_input | --is_not_my_input]] ] @@ -4199,7 +4243,8 @@ class Daemon(metaclass=JSONRPCServerType): --claim_id= : (str or list) claim id --channel_id= : (str or list) claims in this channel --name= : (str or list) claim name - --unspent : (bool) hide spent outputs, show only unspent ones + --is_spent : (bool) only show spent txos + --is_not_spent : (bool) only show not spent txos --is_my_input_or_output : (bool) txos which have your inputs or your outputs, if using this flag the other related flags are ignored (--is_my_output, --is_my_input, etc) @@ -4248,6 +4293,63 @@ class Daemon(metaclass=JSONRPCServerType): self._constrain_txo_from_kwargs(constraints, **kwargs) return paginate_rows(claims, None if no_totals else claim_count, page, page_size, **constraints) + @requires(WALLET_COMPONENT) + async def jsonrpc_txo_spend( + self, account_id=None, wallet_id=None, batch_size=500, + include_full_tx=False, preview=False, blocking=False, **kwargs): + """ + Spend transaction outputs, batching into multiple transactions as necessary. + + Usage: + txo_spend [--account_id=] [--type=...] [--txid=...] + [--claim_id=...] [--channel_id=...] [--name=...] + [--is_my_input | --is_not_my_input] + [--exclude_internal_transfers] [--wallet_id=] + [--preview] [--blocking] [--batch_size=] [--include_full_tx] + + Options: + --type= : (str or list) claim type: stream, channel, support, + purchase, collection, repost, other + --txid= : (str or list) transaction id of outputs + --claim_id= : (str or list) claim id + --channel_id= : (str or list) claims in this channel + --name= : (str or list) claim name + --is_my_input : (bool) show outputs created by you + --is_not_my_input : (bool) show outputs not created by you + --exclude_internal_transfers: (bool) excludes any outputs that are exactly this combination: + "--is_my_input --is_my_output --type=other" + this allows to exclude "change" payments, this + flag can be used in combination with any of the other flags + --account_id= : (str) id of the account to query + --wallet_id= : (str) restrict results to specific wallet + --preview : (bool) do not broadcast the transaction + --blocking : (bool) wait until abandon is in mempool + --batch_size= : (int) number of txos to spend per transactions + --include_full_tx : (bool) include entire tx in output and not just the txid + + Returns: {List[Transaction]} + """ + wallet = self.wallet_manager.get_wallet_or_default(wallet_id) + accounts = [wallet.get_account_or_error(account_id)] if account_id else wallet.accounts + txos = await self.ledger.get_txos( + wallet=wallet, accounts=accounts, read_only=True, + **self._constrain_txo_from_kwargs({}, is_not_spent=True, is_my_output=True, **kwargs) + ) + txs = [] + while txos: + txs.append( + await Transaction.create( + [Input.spend(txos.pop()) for _ in range(min(len(txos), batch_size))], + [], accounts, accounts[0] + ) + ) + if not preview: + for tx in txs: + await self.broadcast_or_release(tx, blocking) + if include_full_tx: + return txs + return [{'txid': tx.id} for tx in txs] + @requires(WALLET_COMPONENT) def jsonrpc_txo_sum(self, account_id=None, wallet_id=None, **kwargs): """ @@ -4255,7 +4357,8 @@ class Daemon(metaclass=JSONRPCServerType): Usage: txo_list [--account_id=] [--type=...] [--txid=...] - [--claim_id=...] [--name=...] [--unspent] + [--claim_id=...] [--name=...] + [--is_spent] [--is_not_spent] [--is_my_input_or_output | [[--is_my_output | --is_not_my_output] [--is_my_input | --is_not_my_input]] ] @@ -4267,7 +4370,8 @@ class Daemon(metaclass=JSONRPCServerType): --txid= : (str or list) transaction id of outputs --claim_id= : (str or list) claim id --name= : (str or list) claim name - --unspent : (bool) hide spent outputs, show only unspent ones + --is_spent : (bool) only show spent txos + --is_not_spent : (bool) only show not spent txos --is_my_input_or_output : (bool) txos which have your inputs or your outputs, if using this flag the other related flags are ignored (--is_my_output, --is_my_input, etc) @@ -4299,7 +4403,7 @@ class Daemon(metaclass=JSONRPCServerType): Usage: txo_plot [--account_id=] [--type=...] [--txid=...] - [--claim_id=...] [--name=...] [--unspent] + [--claim_id=...] [--name=...] [--is_spent] [--is_not_spent] [--is_my_input_or_output | [[--is_my_output | --is_not_my_output] [--is_my_input | --is_not_my_input]] ] @@ -4314,7 +4418,8 @@ class Daemon(metaclass=JSONRPCServerType): --txid= : (str or list) transaction id of outputs --claim_id= : (str or list) claim id --name= : (str or list) claim name - --unspent : (bool) hide spent outputs, show only unspent ones + --is_spent : (bool) only show spent txos + --is_not_spent : (bool) only show not spent txos --is_my_input_or_output : (bool) txos which have your inputs or your outputs, if using this flag the other related flags are ignored (--is_my_output, --is_my_input, etc) @@ -4371,7 +4476,7 @@ class Daemon(metaclass=JSONRPCServerType): Returns: {Paginated[Output]} """ kwargs['type'] = ['other', 'purchase'] - kwargs['unspent'] = True + kwargs['is_not_spent'] = True return self.jsonrpc_txo_list(*args, **kwargs) @requires(WALLET_COMPONENT) @@ -5049,10 +5154,11 @@ class Daemon(metaclass=JSONRPCServerType): --comment_ids= : (str, list) one or more comment_id to hide. --wallet_id= : (str) restrict operation to specific wallet - Returns: - (dict) keyed by comment_id, containing success info - '': { - "hidden": (bool) flag indicating if comment_id was hidden + Returns: lists containing the ids comments that are hidden and visible. + + { + "hidden": (list) IDs of hidden comments. + "visible": (list) IDs of visible comments. } """ wallet = self.wallet_manager.get_wallet_or_default(wallet_id) @@ -5063,6 +5169,7 @@ class Daemon(metaclass=JSONRPCServerType): comments = await comment_client.jsonrpc_post( self.conf.comment_server, 'get_comments_by_id', comment_ids=comment_ids ) + comments = comments['items'] claim_ids = {comment['claim_id'] for comment in comments} claims = {cid: await self.ledger.get_claim_by_claim_id(wallet.accounts, claim_id=cid) for cid in claim_ids} pieces = [] diff --git a/lbry/extras/daemon/json_response_encoder.py b/lbry/extras/daemon/json_response_encoder.py index d2080db8c..a4246bfab 100644 --- a/lbry/extras/daemon/json_response_encoder.py +++ b/lbry/extras/daemon/json_response_encoder.py @@ -108,7 +108,8 @@ def encode_file_doc(): 'metadata': '(dict) None if claim is not found else the claim metadata', 'channel_claim_id': '(str) None if claim is not found or not signed', 'channel_name': '(str) None if claim is not found or not signed', - 'claim_name': '(str) None if claim is not found else the claim name' + 'claim_name': '(str) None if claim is not found else the claim name', + 'reflector_progress': '(int) reflector upload progress, 0 to 100' } @@ -307,7 +308,8 @@ class JSONResponseEncoder(JSONEncoder): 'height': tx_height, 'confirmations': (best_height + 1) - tx_height if tx_height > 0 else tx_height, 'timestamp': self.ledger.headers.estimated_timestamp(tx_height), - 'is_fully_reflected': managed_stream.is_fully_reflected + 'is_fully_reflected': managed_stream.is_fully_reflected, + 'reflector_progress': managed_stream.reflector_progress } def encode_claim(self, claim): diff --git a/lbry/file_analysis.py b/lbry/file_analysis.py index 982a75e35..21dd8df61 100644 --- a/lbry/file_analysis.py +++ b/lbry/file_analysis.py @@ -8,6 +8,7 @@ import re import shlex import shutil import subprocess +from math import ceil import lbry.utils from lbry.conf import TranscodeConfig @@ -30,6 +31,7 @@ class VideoFileAnalyzer: self._which_ffmpeg = None self._which_ffprobe = None self._env_copy = dict(os.environ) + self._checked_ffmpeg = False if lbry.utils.is_running_from_bundle(): # handle the situation where PyInstaller overrides our runtime environment: self._replace_or_pop_env('LD_LIBRARY_PATH') @@ -72,6 +74,10 @@ class VideoFileAnalyzer: log.debug("Using %s at %s", version.splitlines()[0].split(" Copyright")[0], self._which_ffmpeg) return version + @staticmethod + def _which_ffmpeg_and_ffmprobe(path): + return shutil.which("ffmpeg", path=path), shutil.which("ffprobe", path=path) + async def _verify_ffmpeg_installed(self): if self._ffmpeg_installed: return @@ -80,29 +86,33 @@ class VideoFileAnalyzer: if hasattr(self._conf, "data_dir"): path += os.path.pathsep + os.path.join(getattr(self._conf, "data_dir"), "ffmpeg", "bin") path += os.path.pathsep + self._env_copy.get("PATH", "") - - self._which_ffmpeg = shutil.which("ffmpeg", path=path) + self._which_ffmpeg, self._which_ffprobe = await asyncio.get_running_loop().run_in_executor( + None, self._which_ffmpeg_and_ffmprobe, path + ) if not self._which_ffmpeg: log.warning("Unable to locate ffmpeg executable. Path: %s", path) raise FileNotFoundError(f"Unable to locate ffmpeg executable. Path: {path}") - self._which_ffprobe = shutil.which("ffprobe", path=path) if not self._which_ffprobe: log.warning("Unable to locate ffprobe executable. Path: %s", path) raise FileNotFoundError(f"Unable to locate ffprobe executable. Path: {path}") if os.path.dirname(self._which_ffmpeg) != os.path.dirname(self._which_ffprobe): log.warning("ffmpeg and ffprobe are in different folders!") + await self._verify_executables() self._ffmpeg_installed = True - async def status(self, reset=False): + async def status(self, reset=False, recheck=False): if reset: self._available_encoders = "" self._ffmpeg_installed = None - if self._ffmpeg_installed is None: + if self._checked_ffmpeg and not recheck: + pass + elif self._ffmpeg_installed is None: try: await self._verify_ffmpeg_installed() except FileNotFoundError: pass + self._checked_ffmpeg = True return { "available": self._ffmpeg_installed, "which": self._which_ffmpeg, @@ -345,7 +355,7 @@ class VideoFileAnalyzer: def _build_spec(scan_data): assert scan_data - duration = float(scan_data["format"]["duration"]) # existence verified when scan_data made + duration = ceil(float(scan_data["format"]["duration"])) # existence verified when scan_data made width = -1 height = -1 for stream in scan_data["streams"]: @@ -354,7 +364,7 @@ class VideoFileAnalyzer: width = max(width, int(stream["width"])) height = max(height, int(stream["height"])) - log.debug(" Detected duration: %f sec. with resolution: %d x %d", duration, width, height) + log.debug(" Detected duration: %d sec. with resolution: %d x %d", duration, width, height) spec = {"duration": duration} if height >= 0: diff --git a/lbry/stream/managed_stream.py b/lbry/stream/managed_stream.py index bf6955a9b..5071d879e 100644 --- a/lbry/stream/managed_stream.py +++ b/lbry/stream/managed_stream.py @@ -65,6 +65,7 @@ class ManagedStream: 'downloader', 'analytics_manager', 'fully_reflected', + 'reflector_progress', 'file_output_task', 'delayed_stop_task', 'streaming_responses', @@ -101,6 +102,7 @@ class ManagedStream: self.analytics_manager = analytics_manager self.fully_reflected = asyncio.Event(loop=self.loop) + self.reflector_progress = 0 self.file_output_task: typing.Optional[asyncio.Task] = None self.delayed_stop_task: typing.Optional[asyncio.Task] = None self.streaming_responses: typing.List[typing.Tuple[Request, StreamResponse]] = [] @@ -445,9 +447,10 @@ class ManagedStream: ] log.info("we have %i/%i needed blobs needed by reflector for lbry://%s#%s", len(we_have), len(needed), self.claim_name, self.claim_id) - for blob_hash in we_have: + for i, blob_hash in enumerate(we_have): await protocol.send_blob(blob_hash) sent.append(blob_hash) + self.reflector_progress = int((i + 1) / len(we_have) * 100) except (asyncio.TimeoutError, ValueError): return sent except ConnectionRefusedError: diff --git a/lbry/stream/stream_manager.py b/lbry/stream/stream_manager.py index 0ff206936..4fb37e99a 100644 --- a/lbry/stream/stream_manager.py +++ b/lbry/stream/stream_manager.py @@ -23,6 +23,9 @@ if typing.TYPE_CHECKING: from lbry.extras.daemon.analytics import AnalyticsManager from lbry.extras.daemon.storage import SQLiteStorage, StoredContentClaim from lbry.extras.daemon.exchange_rate_manager import ExchangeRateManager + from lbry.wallet.transaction import Transaction + from lbry.wallet.manager import WalletManager + from lbry.wallet.wallet import Wallet log = logging.getLogger(__name__) @@ -46,6 +49,12 @@ FILTER_FIELDS = [ 'blobs_in_stream' ] +SET_FILTER_FIELDS = { + "claim_ids": "claim_id", + "channel_claim_ids": "channel_claim_id", + "outpoints": "outpoint" +} + COMPARISON_OPERATORS = { 'eq': lambda a, b: a == b, 'ne': lambda a, b: a != b, @@ -53,6 +62,7 @@ COMPARISON_OPERATORS = { 'l': lambda a, b: a < b, 'ge': lambda a, b: a >= b, 'le': lambda a, b: a <= b, + 'in': lambda a, b: a in b } @@ -276,15 +286,34 @@ class StreamManager: raise ValueError(f"'{comparison}' is not a valid comparison") if 'full_status' in search_by: del search_by['full_status'] + for search in search_by: if search not in FILTER_FIELDS: raise ValueError(f"'{search}' is not a valid search operation") + + compare_sets = {} + if isinstance(search_by.get('claim_id'), list): + compare_sets['claim_ids'] = search_by.pop('claim_id') + if isinstance(search_by.get('outpoint'), list): + compare_sets['outpoints'] = search_by.pop('outpoint') + if isinstance(search_by.get('channel_claim_id'), list): + compare_sets['channel_claim_ids'] = search_by.pop('channel_claim_id') + if search_by: comparison = comparison or 'eq' streams = [] for stream in self.streams.values(): + matched = False + for set_search, val in compare_sets.items(): + if COMPARISON_OPERATORS[comparison](getattr(stream, SET_FILTER_FIELDS[set_search]), val): + streams.append(stream) + matched = True + break + if matched: + continue for search, val in search_by.items(): - if COMPARISON_OPERATORS[comparison](getattr(stream, search), val): + this_stream = getattr(stream, search) + if COMPARISON_OPERATORS[comparison](this_stream, val): streams.append(stream) break else: diff --git a/lbry/testcase.py b/lbry/testcase.py index c0f8fa449..dcdaa83e5 100644 --- a/lbry/testcase.py +++ b/lbry/testcase.py @@ -565,6 +565,14 @@ class CommandTestCase(IntegrationTestCase): self.daemon.jsonrpc_wallet_send(*args, **kwargs), confirm ) + async def txo_spend(self, *args, confirm=True, **kwargs): + txs = await self.daemon.jsonrpc_txo_spend(*args, **kwargs) + if confirm: + await asyncio.wait([self.ledger.wait(tx) for tx in txs]) + await self.generate(1) + await asyncio.wait([self.ledger.wait(tx, self.blockchain.block_expected) for tx in txs]) + return self.sout(txs) + async def resolve(self, uri, **kwargs): return (await self.out(self.daemon.jsonrpc_resolve(uri, **kwargs)))[uri] diff --git a/lbry/wallet/checkpoints.py b/lbry/wallet/checkpoints.py index 71b7770a3..3b33bd5fb 100644 --- a/lbry/wallet/checkpoints.py +++ b/lbry/wallet/checkpoints.py @@ -734,4 +734,10 @@ HASHES = { 732000: '53e1b373805f3236c7725415e872d5635b8679894c4fb630c62b6b75b4ec9d9c', 733000: '43e9ab6cf54fde5dcdc4c473af26b256435f4af4254d96fa728f2af9b078d630', 734000: 'a3ef7f9257d591c7dcc0f82346cb162a768ee5fe1228353ec485e69be1bf585f', + 735000: '9bc81abb6c9294463d7fa12b9ceea4f929a5491cf4b6ff8e47e0a95b02c6d355', + 736000: 'a3b391ecba546ebbbe6e05c5222beca269e5dce6e508028ea41725fef138b687', + 737000: '0f2e4e43c76b3bf6fc6db9b87adb9a17a05e85110dcb923442746a00446e513a', + 738000: 'aebdf15b23eb7a37600f67d45bf6586b1d5bff3d5f3459adc2f6211ab3dd0bcb', + 739000: '3f5a894ac42f95f7d54ce25c42ea0baf1a05b2da0e9406978de0dc53484d8b04', + 740000: '55debc22f995d844eafa0a90296c9f4f433e2b7f38456fff45dd3c66cef04e37', } diff --git a/lbry/wallet/database.py b/lbry/wallet/database.py index 949442247..5aec29649 100644 --- a/lbry/wallet/database.py +++ b/lbry/wallet/database.py @@ -694,7 +694,7 @@ class Database(SQLiteMixin): self, cols, accounts=None, is_my_input=None, is_my_output=True, is_my_input_or_output=None, exclude_internal_transfers=False, include_is_spent=False, include_is_my_input=False, - read_only=False, **constraints): + is_spent=None, read_only=False, **constraints): for rename_col in ('txid', 'txoid'): for rename_constraint in (rename_col, rename_col+'__in', rename_col+'__not_in'): if rename_constraint in constraints: @@ -733,27 +733,23 @@ class Database(SQLiteMixin): include_is_my_input = True constraints['exclude_internal_payments__or'] = { 'txo.txo_type__not': TXO_TYPES['other'], + 'txo.address__not_in': my_addresses, 'txi.address__is_null': True, - 'txi.address__not_in': my_addresses + 'txi.address__not_in': my_addresses, } sql = [f"SELECT {cols} FROM txo JOIN tx ON (tx.txid=txo.txid)"] - if include_is_spent: + if is_spent: + constraints['spent.txoid__is_not_null'] = True + elif is_spent is False: + constraints['is_reserved'] = False + constraints['spent.txoid__is_null'] = True + if include_is_spent or is_spent is not None: sql.append("LEFT JOIN txi AS spent ON (spent.txoid=txo.txoid)") if include_is_my_input: sql.append("LEFT JOIN txi ON (txi.position=0 AND txi.txid=txo.txid)") return await self.db.execute_fetchall(*query(' '.join(sql), **constraints), read_only=read_only) - @staticmethod - def constrain_unspent(constraints): - constraints['is_reserved'] = False - constraints['include_is_spent'] = True - constraints['spent.txoid__is_null'] = True - - async def get_txos(self, wallet=None, no_tx=False, unspent=False, read_only=False, **constraints): - - if unspent: - self.constrain_unspent(constraints) - + async def get_txos(self, wallet=None, no_tx=False, read_only=False, **constraints): include_is_spent = constraints.get('include_is_spent', False) include_is_my_input = constraints.get('include_is_my_input', False) include_is_my_output = constraints.pop('include_is_my_output', False) @@ -869,7 +865,8 @@ class Database(SQLiteMixin): return txos - def _clean_txo_constraints_for_aggregation(self, unspent, constraints): + @staticmethod + def _clean_txo_constraints_for_aggregation(constraints): constraints.pop('include_is_spent', None) constraints.pop('include_is_my_input', None) constraints.pop('include_is_my_output', None) @@ -879,22 +876,19 @@ class Database(SQLiteMixin): constraints.pop('offset', None) constraints.pop('limit', None) constraints.pop('order_by', None) - if unspent: - self.constrain_unspent(constraints) - async def get_txo_count(self, unspent=False, **constraints): - self._clean_txo_constraints_for_aggregation(unspent, constraints) + async def get_txo_count(self, **constraints): + self._clean_txo_constraints_for_aggregation(constraints) count = await self.select_txos('COUNT(*) AS total', **constraints) return count[0]['total'] or 0 - async def get_txo_sum(self, unspent=False, **constraints): - self._clean_txo_constraints_for_aggregation(unspent, constraints) + async def get_txo_sum(self, **constraints): + self._clean_txo_constraints_for_aggregation(constraints) result = await self.select_txos('SUM(amount) AS total', **constraints) return result[0]['total'] or 0 - async def get_txo_plot( - self, unspent=False, start_day=None, days_back=0, end_day=None, days_after=None, **constraints): - self._clean_txo_constraints_for_aggregation(unspent, constraints) + async def get_txo_plot(self, start_day=None, days_back=0, end_day=None, days_after=None, **constraints): + self._clean_txo_constraints_for_aggregation(constraints) if start_day is None: constraints['day__gte'] = self.ledger.headers.estimated_julian_day( self.ledger.headers.height @@ -915,17 +909,18 @@ class Database(SQLiteMixin): ) def get_utxos(self, read_only=False, **constraints): - return self.get_txos(unspent=True, read_only=read_only, **constraints) + return self.get_txos(is_spent=False, read_only=read_only, **constraints) def get_utxo_count(self, **constraints): - return self.get_txo_count(unspent=True, **constraints) + return self.get_txo_count(is_spent=False, **constraints) async def get_balance(self, wallet=None, accounts=None, read_only=False, **constraints): assert wallet or accounts, \ "'wallet' or 'accounts' constraints required to calculate balance" constraints['accounts'] = accounts or wallet.accounts - self.constrain_unspent(constraints) - balance = await self.select_txos('SUM(amount) as total', read_only=read_only, **constraints) + balance = await self.select_txos( + 'SUM(amount) as total', is_spent=False, read_only=read_only, **constraints + ) return balance[0]['total'] or 0 async def select_addresses(self, cols, read_only=False, **constraints): @@ -1084,7 +1079,7 @@ class Database(SQLiteMixin): def get_supports_summary(self, read_only=False, **constraints): return self.get_txos( txo_type=TXO_TYPES['support'], - unspent=True, is_my_output=True, + is_spent=False, is_my_output=True, include_is_my_input=True, no_tx=True, read_only=read_only, **constraints diff --git a/lbry/wallet/header.py b/lbry/wallet/header.py index d8ea47665..fd5a85c61 100644 --- a/lbry/wallet/header.py +++ b/lbry/wallet/header.py @@ -59,7 +59,15 @@ class Headers: self.io = open(self.path, 'w+b') else: self.io = open(self.path, 'r+b') - self._size = self.io.seek(0, os.SEEK_END) // self.header_size + bytes_size = self.io.seek(0, os.SEEK_END) + self._size = bytes_size // self.header_size + max_checkpointed_height = max(self.checkpoints.keys() or [-1]) + 1000 + if bytes_size % self.header_size: + log.warning("Reader file size doesnt match header size. Repairing, might take a while.") + await self.repair() + else: + # try repairing any incomplete write on tip from previous runs (outside of checkpoints, that are ok) + await self.repair(start_height=max_checkpointed_height) await self.ensure_checkpointed_size() await self.get_all_missing_headers() @@ -128,7 +136,9 @@ class Headers: raise IndexError(f"failed to get {height}, at {len(self)}") def estimated_timestamp(self, height): - return self.first_block_timestamp + (height * self.timestamp_average_offset) + if height <= 0: + return + return int(self.first_block_timestamp + (height * self.timestamp_average_offset)) def estimated_julian_day(self, height): return date_to_julian_day(date.fromtimestamp(self.estimated_timestamp(height))) @@ -292,23 +302,26 @@ class Headers: height, f"insufficient proof of work: {proof_of_work.value} vs target {target.value}" ) - async def repair(self): + async def repair(self, start_height=0): previous_header_hash = fail = None batch_size = 36 - for start_height in range(0, self.height, batch_size): + for height in range(start_height, self.height, batch_size): headers = await asyncio.get_running_loop().run_in_executor( - self.executor, self._read, start_height, batch_size + self.executor, self._read, height, batch_size ) if len(headers) % self.header_size != 0: headers = headers[:(len(headers) // self.header_size) * self.header_size] - for header_hash, header in self._iterate_headers(start_height, headers): + for header_hash, header in self._iterate_headers(height, headers): height = header['block_height'] - if height: + if previous_header_hash: if header['prev_block_hash'] != previous_header_hash: fail = True - else: + elif height == 0: if header_hash != self.genesis_hash: fail = True + else: + # for sanity and clarity, since it is the only way we can end up here + assert start_height > 0 and height == start_height if fail: log.warning("Header file corrupted at height %s, truncating it.", height - 1) def __truncate(at_height): diff --git a/lbry/wallet/ledger.py b/lbry/wallet/ledger.py index 6e9607b58..79e7ef6b2 100644 --- a/lbry/wallet/ledger.py +++ b/lbry/wallet/ledger.py @@ -24,6 +24,7 @@ from .account import Account, AddressManager, SingleKey from .network import Network from .transaction import Transaction, Output from .header import Headers, UnvalidatedHeaders +from .checkpoints import HASHES from .constants import TXO_TYPES, CLAIM_TYPES, COIN, NULL_HASH32 from .bip32 import PubKey, PrivateKey from .coinselection import CoinSelector @@ -108,6 +109,8 @@ class Ledger(metaclass=LedgerRegistry): default_fee_per_byte = 50 default_fee_per_name_char = 200000 + checkpoints = HASHES + def __init__(self, config=None): self.config = config or {} self.db: Database = self.config.get('db') or Database( @@ -117,6 +120,7 @@ class Ledger(metaclass=LedgerRegistry): self.headers: Headers = self.config.get('headers') or self.headers_class( os.path.join(self.path, "headers") ) + self.headers.checkpoints = self.checkpoints self.network: Network = self.config.get('network') or Network(self) self.network.on_header.listen(self.receive_header) self.network.on_status.listen(self.process_status_update) @@ -266,7 +270,7 @@ class Ledger(metaclass=LedgerRegistry): self.constraint_spending_utxos(constraints) return self.db.get_utxo_count(**constraints) - async def get_txos(self, resolve=False, **constraints): + async def get_txos(self, resolve=False, **constraints) -> List[Output]: txos = await self.db.get_txos(**constraints) if resolve: return await self._resolve_for_local_results(constraints.get('accounts', []), txos) @@ -316,11 +320,12 @@ class Ledger(metaclass=LedgerRegistry): self.db.open(), self.headers.open() ]) - first_connection = self.network.on_connected.first - asyncio.ensure_future(self.network.start()) - await first_connection + fully_synced = self.on_ready.first + asyncio.create_task(self.network.start()) + await self.network.on_connected.first async with self._header_processing_lock: await self._update_tasks.add(self.initial_headers_sync()) + await fully_synced await asyncio.gather(*(a.maybe_migrate_certificates() for a in self.accounts)) await asyncio.gather(*(a.save_max_gap() for a in self.accounts)) if len(self.accounts) > 10: @@ -328,12 +333,9 @@ class Ledger(metaclass=LedgerRegistry): else: await self._report_state() self.on_transaction.listen(self._reset_balance_cache) - await self.on_ready.first async def join_network(self, *_): log.info("Subscribing and updating accounts.") - async with self._header_processing_lock: - await self._update_tasks.add(self.initial_headers_sync()) await self._update_tasks.add(self.subscribe_accounts()) await self._update_tasks.done.wait() self._on_ready_controller.add(True) @@ -356,8 +358,8 @@ class Ledger(metaclass=LedgerRegistry): self.headers.chunk_getter = get_chunk async def doit(): - async with self._header_processing_lock: - for height in reversed(sorted(self.headers.known_missing_checkpointed_chunks)): + for height in reversed(sorted(self.headers.known_missing_checkpointed_chunks)): + async with self._header_processing_lock: await self.headers.ensure_chunk_at(height) self._other_tasks.add(doit()) await self.update_headers() @@ -716,7 +718,7 @@ class Ledger(metaclass=LedgerRegistry): if include_is_my_output: mine = await self.db.get_txo_count( claim_id=txo.claim_id, txo_type__in=CLAIM_TYPES, is_my_output=True, - unspent=True, accounts=accounts + is_spent=False, accounts=accounts ) if mine: txo_copy.is_my_output = True @@ -726,7 +728,7 @@ class Ledger(metaclass=LedgerRegistry): supports = await self.db.get_txo_sum( claim_id=txo.claim_id, txo_type=TXO_TYPES['support'], is_my_input=True, is_my_output=True, - unspent=True, accounts=accounts + is_spent=False, accounts=accounts ) txo_copy.sent_supports = supports if include_sent_tips: @@ -750,7 +752,11 @@ class Ledger(metaclass=LedgerRegistry): async def resolve(self, accounts, urls, **kwargs): resolve = partial(self.network.retriable_call, self.network.resolve) - txos = (await self._inflate_outputs(resolve(urls), accounts, **kwargs))[0] + urls_copy = list(urls) + txos = [] + while urls_copy: + batch, urls_copy = urls_copy[:500], urls_copy[500:] + txos.extend((await self._inflate_outputs(resolve(batch), accounts, **kwargs))[0]) assert len(urls) == len(txos), "Mismatch between urls requested for resolve and responses received." result = {} for url, txo in zip(urls, txos): @@ -1058,6 +1064,7 @@ class TestNetLedger(Ledger): script_address_prefix = bytes((196,)) extended_public_key_prefix = unhexlify('043587cf') extended_private_key_prefix = unhexlify('04358394') + checkpoints = {} class RegTestLedger(Ledger): @@ -1072,3 +1079,4 @@ class RegTestLedger(Ledger): genesis_hash = '6e3fcf1299d4ec5d79c3a4c91d624a4acf9e2e173d95a1a0504f677669687556' genesis_bits = 0x207fffff target_timespan = 1 + checkpoints = {} diff --git a/lbry/wallet/orchstr8/node.py b/lbry/wallet/orchstr8/node.py index a94a7bc0a..83436eb2d 100644 --- a/lbry/wallet/orchstr8/node.py +++ b/lbry/wallet/orchstr8/node.py @@ -55,7 +55,8 @@ class Conductor: async def start_blockchain(self): if not self.blockchain_started: - await self.blockchain_node.start() + asyncio.create_task(self.blockchain_node.start()) + await self.blockchain_node.running.wait() await self.blockchain_node.generate(200) self.blockchain_started = True @@ -255,6 +256,10 @@ class BlockchainNode: self.rpcport = 9245 + 2 # avoid conflict with default rpc port self.rpcuser = 'rpcuser' self.rpcpassword = 'rpcpassword' + self.stopped = False + self.restart_ready = asyncio.Event() + self.restart_ready.set() + self.running = asyncio.Event() @property def rpc_url(self): @@ -315,13 +320,27 @@ class BlockchainNode: f'-port={self.peerport}' ] self.log.info(' '.join(command)) - self.transport, self.protocol = await loop.subprocess_exec( - BlockchainProcess, *command - ) - await self.protocol.ready.wait() - assert not self.protocol.stopped.is_set() + while not self.stopped: + if self.running.is_set(): + await asyncio.sleep(1) + continue + await self.restart_ready.wait() + try: + self.transport, self.protocol = await loop.subprocess_exec( + BlockchainProcess, *command + ) + await self.protocol.ready.wait() + assert not self.protocol.stopped.is_set() + self.running.set() + except asyncio.CancelledError: + self.running.clear() + raise + except Exception as e: + self.running.clear() + log.exception('failed to start lbrycrdd', exc_info=e) async def stop(self, cleanup=True): + self.stopped = True try: self.transport.terminate() await self.protocol.stopped.wait() @@ -330,6 +349,16 @@ class BlockchainNode: if cleanup: self.cleanup() + async def clear_mempool(self): + self.restart_ready.clear() + self.transport.terminate() + await self.protocol.stopped.wait() + self.transport.close() + self.running.clear() + os.remove(os.path.join(self.data_path, 'regtest', 'mempool.dat')) + self.restart_ready.set() + await self.running.wait() + def cleanup(self): shutil.rmtree(self.data_path, ignore_errors=True) @@ -361,6 +390,12 @@ class BlockchainNode: def get_block_hash(self, block): return self._cli_cmnd('getblockhash', str(block)) + def sendrawtransaction(self, tx): + return self._cli_cmnd('sendrawtransaction', tx) + + async def get_block(self, block_hash): + return json.loads(await self._cli_cmnd('getblock', block_hash, '1')) + def get_raw_change_address(self): return self._cli_cmnd('getrawchangeaddress') diff --git a/lbry/wallet/rpc/session.py b/lbry/wallet/rpc/session.py index e9c4c6925..53c164f4f 100644 --- a/lbry/wallet/rpc/session.py +++ b/lbry/wallet/rpc/session.py @@ -39,8 +39,7 @@ from lbry.wallet.tasks import TaskGroup from .jsonrpc import Request, JSONRPCConnection, JSONRPCv2, JSONRPC, Batch, Notification from .jsonrpc import RPCError, ProtocolError from .framing import BadMagicError, BadChecksumError, OversizedPayloadError, BitcoinFramer, NewlineFramer -from .util import Concurrency -from lbry.wallet.server.prometheus import NOTIFICATION_COUNT, RESPONSE_TIMES, REQUEST_ERRORS_COUNT +from lbry.wallet.server.prometheus import NOTIFICATION_COUNT, RESPONSE_TIMES, REQUEST_ERRORS_COUNT, RESET_CONNECTIONS class Connector: @@ -389,6 +388,7 @@ class RPCSession(SessionBase): except MemoryError: self.logger.warning('received oversized message from %s:%s, dropping connection', self._address[0], self._address[1]) + RESET_CONNECTIONS.labels(version=self.client_version).inc() self._close() return diff --git a/lbry/wallet/server/block_processor.py b/lbry/wallet/server/block_processor.py index 9c6f10682..44eba7d1a 100644 --- a/lbry/wallet/server/block_processor.py +++ b/lbry/wallet/server/block_processor.py @@ -2,7 +2,7 @@ import time import asyncio from struct import pack, unpack from concurrent.futures.thread import ThreadPoolExecutor - +from typing import Optional import lbry from lbry.schema.claim import Claim from lbry.wallet.server.db.writer import SQLDB @@ -10,7 +10,7 @@ from lbry.wallet.server.daemon import DaemonError from lbry.wallet.server.hash import hash_to_hex_str, HASHX_LEN from lbry.wallet.server.util import chunks, class_logger from lbry.wallet.server.leveldb import FlushData -from lbry.wallet.server.prometheus import BLOCK_COUNT, BLOCK_UPDATE_TIMES +from lbry.wallet.server.prometheus import BLOCK_COUNT, BLOCK_UPDATE_TIMES, REORG_COUNT class Prefetcher: @@ -219,7 +219,7 @@ class BlockProcessor: 'resetting the prefetcher') await self.prefetcher.reset_height(self.height) - async def reorg_chain(self, count=None): + async def reorg_chain(self, count: Optional[int] = None): """Handle a chain reorganisation. Count is the number of blocks to simulate a reorg, or None for @@ -253,7 +253,9 @@ class BlockProcessor: await self.run_in_thread_with_lock(self.backup_blocks, raw_blocks) await self.run_in_thread_with_lock(flush_backup) last -= len(raw_blocks) + await self.run_in_thread_with_lock(self.db.sql.delete_claims_above_height, self.height) await self.prefetcher.reset_height(self.height) + REORG_COUNT.inc() async def reorg_hashes(self, count): """Return a pair (start, last, hashes) of blocks to back up during a @@ -270,7 +272,7 @@ class BlockProcessor: return start, last, await self.db.fs_block_hashes(start, count) - async def calc_reorg_range(self, count): + async def calc_reorg_range(self, count: Optional[int]): """Calculate the reorg range""" def diff_pos(hashes1, hashes2): diff --git a/lbry/wallet/server/db/reader.py b/lbry/wallet/server/db/reader.py index b60990001..a98330efb 100644 --- a/lbry/wallet/server/db/reader.py +++ b/lbry/wallet/server/db/reader.py @@ -545,11 +545,19 @@ def _apply_constraints_for_array_attributes(constraints, attr, cleaner, for_coun f':$any_{attr}{i}' for i in range(len(any_items)) ) if for_count or attr == 'tag': - any_queries[f'#_any_{attr}'] = f""" - {CLAIM_HASH_OR_REPOST_HASH_SQL} IN ( - SELECT claim_hash FROM {attr} WHERE {attr} IN ({values}) - ) - """ + if attr == 'tag': + any_queries[f'#_any_{attr}'] = f""" + (claim.claim_type != {CLAIM_TYPES['repost']} + AND claim.claim_hash IN (SELECT claim_hash FROM tag WHERE tag IN ({values}))) OR + (claim.claim_type == {CLAIM_TYPES['repost']} AND + claim.reposted_claim_hash IN (SELECT claim_hash FROM tag WHERE tag IN ({values}))) + """ + else: + any_queries[f'#_any_{attr}'] = f""" + {CLAIM_HASH_OR_REPOST_HASH_SQL} IN ( + SELECT claim_hash FROM {attr} WHERE {attr} IN ({values}) + ) + """ else: any_queries[f'#_any_{attr}'] = f""" EXISTS( @@ -596,11 +604,19 @@ def _apply_constraints_for_array_attributes(constraints, attr, cleaner, for_coun f':$not_{attr}{i}' for i in range(len(not_items)) ) if for_count: - constraints[f'#_not_{attr}'] = f""" - {CLAIM_HASH_OR_REPOST_HASH_SQL} NOT IN ( - SELECT claim_hash FROM {attr} WHERE {attr} IN ({values}) - ) - """ + if attr == 'tag': + constraints[f'#_not_{attr}'] = f""" + (claim.claim_type != {CLAIM_TYPES['repost']} + AND claim.claim_hash NOT IN (SELECT claim_hash FROM tag WHERE tag IN ({values}))) AND + (claim.claim_type == {CLAIM_TYPES['repost']} AND + claim.reposted_claim_hash NOT IN (SELECT claim_hash FROM tag WHERE tag IN ({values}))) + """ + else: + constraints[f'#_not_{attr}'] = f""" + {CLAIM_HASH_OR_REPOST_HASH_SQL} NOT IN ( + SELECT claim_hash FROM {attr} WHERE {attr} IN ({values}) + ) + """ else: constraints[f'#_not_{attr}'] = f""" NOT EXISTS( diff --git a/lbry/wallet/server/db/writer.py b/lbry/wallet/server/db/writer.py index cb9ad07ea..988b7b266 100644 --- a/lbry/wallet/server/db/writer.py +++ b/lbry/wallet/server/db/writer.py @@ -433,6 +433,15 @@ class SQLDB: return {r.channel_hash for r in affected_channels} return set() + def delete_claims_above_height(self, height: int): + claim_hashes = [x[0] for x in self.execute( + "SELECT claim_hash FROM claim WHERE height>?", (height, ) + ).fetchall()] + while claim_hashes: + batch = set(claim_hashes[:500]) + claim_hashes = claim_hashes[500:] + self.delete_claims(batch) + def _clear_claim_metadata(self, claim_hashes: Set[bytes]): if claim_hashes: for table in ('tag',): # 'language', 'location', etc diff --git a/lbry/wallet/server/prometheus.py b/lbry/wallet/server/prometheus.py index a2f82f21e..e28976bf9 100644 --- a/lbry/wallet/server/prometheus.py +++ b/lbry/wallet/server/prometheus.py @@ -51,6 +51,13 @@ BLOCK_COUNT = Gauge( "block_count", "Number of processed blocks", namespace=NAMESPACE ) BLOCK_UPDATE_TIMES = Histogram("block_time", "Block update times", namespace=NAMESPACE) +REORG_COUNT = Gauge( + "reorg_count", "Number of reorgs", namespace=NAMESPACE +) +RESET_CONNECTIONS = Counter( + "reset_clients", "Number of reset connections by client version", + namespace=NAMESPACE, labelnames=("version",) +) class PrometheusServer: diff --git a/lbry/wallet/tasks.py b/lbry/wallet/tasks.py index f57b55f5f..2ec60709e 100644 --- a/lbry/wallet/tasks.py +++ b/lbry/wallet/tasks.py @@ -7,6 +7,7 @@ class TaskGroup: self._loop = loop or get_event_loop() self._tasks = set() self.done = Event() + self.started = Event() def __len__(self): return len(self._tasks) @@ -14,6 +15,7 @@ class TaskGroup: def add(self, coro): task = self._loop.create_task(coro) self._tasks.add(task) + self.started.set() self.done.clear() task.add_done_callback(self._remove) return task @@ -22,8 +24,10 @@ class TaskGroup: self._tasks.remove(task) if len(self._tasks) < 1: self.done.set() + self.started.clear() def cancel(self): for task in self._tasks: task.cancel() self.done.set() + self.started.clear() diff --git a/tests/integration/blockchain/test_blockchain_reorganization.py b/tests/integration/blockchain/test_blockchain_reorganization.py index b271966df..216030839 100644 --- a/tests/integration/blockchain/test_blockchain_reorganization.py +++ b/tests/integration/blockchain/test_blockchain_reorganization.py @@ -1,8 +1,11 @@ import logging -from lbry.testcase import IntegrationTestCase +import asyncio +from binascii import hexlify +from lbry.testcase import CommandTestCase +from lbry.wallet.server.prometheus import REORG_COUNT -class BlockchainReorganizationTests(IntegrationTestCase): +class BlockchainReorganizationTests(CommandTestCase): VERBOSITY = logging.WARN @@ -13,21 +16,105 @@ class BlockchainReorganizationTests(IntegrationTestCase): ) async def test_reorg(self): + REORG_COUNT.set(0) # invalidate current block, move forward 2 - self.assertEqual(self.ledger.headers.height, 200) - await self.assertBlockHash(200) - await self.blockchain.invalidate_block((await self.ledger.headers.hash(200)).decode()) + self.assertEqual(self.ledger.headers.height, 206) + await self.assertBlockHash(206) + await self.blockchain.invalidate_block((await self.ledger.headers.hash(206)).decode()) await self.blockchain.generate(2) - await self.ledger.on_header.where(lambda e: e.height == 201) - self.assertEqual(self.ledger.headers.height, 201) - await self.assertBlockHash(200) - await self.assertBlockHash(201) + await self.ledger.on_header.where(lambda e: e.height == 207) + self.assertEqual(self.ledger.headers.height, 207) + await self.assertBlockHash(206) + await self.assertBlockHash(207) + self.assertEqual(1, REORG_COUNT._samples()[0][2]) # invalidate current block, move forward 3 - await self.blockchain.invalidate_block((await self.ledger.headers.hash(200)).decode()) + await self.blockchain.invalidate_block((await self.ledger.headers.hash(206)).decode()) await self.blockchain.generate(3) - await self.ledger.on_header.where(lambda e: e.height == 202) - self.assertEqual(self.ledger.headers.height, 202) - await self.assertBlockHash(200) - await self.assertBlockHash(201) - await self.assertBlockHash(202) + await self.ledger.on_header.where(lambda e: e.height == 208) + self.assertEqual(self.ledger.headers.height, 208) + await self.assertBlockHash(206) + await self.assertBlockHash(207) + await self.assertBlockHash(208) + self.assertEqual(2, REORG_COUNT._samples()[0][2]) + + async def test_reorg_change_claim_height(self): + # sanity check + txos, _, _, _ = await self.ledger.claim_search([], name='hovercraft') + self.assertListEqual(txos, []) + + still_valid = await self.daemon.jsonrpc_stream_create( + 'still-valid', '1.0', file_path=self.create_upload_file(data=b'hi!') + ) + await self.ledger.wait(still_valid) + await self.generate(1) + + # create a claim and verify it's returned by claim_search + self.assertEqual(self.ledger.headers.height, 207) + broadcast_tx = await self.daemon.jsonrpc_stream_create( + 'hovercraft', '1.0', file_path=self.create_upload_file(data=b'hi!') + ) + await self.ledger.wait(broadcast_tx) + await self.generate(1) + await self.ledger.wait(broadcast_tx, self.blockchain.block_expected) + self.assertEqual(self.ledger.headers.height, 208) + txos, _, _, _ = await self.ledger.claim_search([], name='hovercraft') + self.assertEqual(1, len(txos)) + txo = txos[0] + self.assertEqual(txo.tx_ref.id, broadcast_tx.id) + self.assertEqual(txo.tx_ref.height, 208) + + # check that our tx is in block 208 as returned by lbrycrdd + invalidated_block_hash = (await self.ledger.headers.hash(208)).decode() + block_207 = await self.blockchain.get_block(invalidated_block_hash) + self.assertIn(txo.tx_ref.id, block_207['tx']) + self.assertEqual(208, txos[0].tx_ref.height) + + # reorg the last block dropping our claim tx + await self.blockchain.invalidate_block(invalidated_block_hash) + await self.blockchain.clear_mempool() + await self.blockchain.generate(2) + + # verify the claim was dropped from block 208 as returned by lbrycrdd + reorg_block_hash = await self.blockchain.get_block_hash(208) + self.assertNotEqual(invalidated_block_hash, reorg_block_hash) + block_207 = await self.blockchain.get_block(reorg_block_hash) + self.assertNotIn(txo.tx_ref.id, block_207['tx']) + + # wait for the client to catch up and verify the reorg + await asyncio.wait_for(self.on_header(209), 3.0) + await self.assertBlockHash(207) + await self.assertBlockHash(208) + await self.assertBlockHash(209) + client_reorg_block_hash = (await self.ledger.headers.hash(208)).decode() + self.assertEqual(client_reorg_block_hash, reorg_block_hash) + + # verify the dropped claim is no longer returned by claim search + txos, _, _, _ = await self.ledger.claim_search([], name='hovercraft') + self.assertListEqual(txos, []) + + # verify the claim published a block earlier wasn't also reverted + txos, _, _, _ = await self.ledger.claim_search([], name='still-valid') + self.assertEqual(1, len(txos)) + self.assertEqual(207, txos[0].tx_ref.height) + + # broadcast the claim in a different block + new_txid = await self.blockchain.sendrawtransaction(hexlify(broadcast_tx.raw).decode()) + self.assertEqual(broadcast_tx.id, new_txid) + await self.blockchain.generate(1) + + # wait for the client to catch up + await asyncio.wait_for(self.on_header(210), 1.0) + + # verify the claim is in the new block and that it is returned by claim_search + block_210 = await self.blockchain.get_block((await self.ledger.headers.hash(210)).decode()) + self.assertIn(txo.tx_ref.id, block_210['tx']) + txos, _, _, _ = await self.ledger.claim_search([], name='hovercraft') + self.assertEqual(1, len(txos)) + self.assertEqual(txos[0].tx_ref.id, new_txid) + self.assertEqual(210, txos[0].tx_ref.height) + + # this should still be unchanged + txos, _, _, _ = await self.ledger.claim_search([], name='still-valid') + self.assertEqual(1, len(txos)) + self.assertEqual(207, txos[0].tx_ref.height) diff --git a/tests/integration/blockchain/test_claim_commands.py b/tests/integration/blockchain/test_claim_commands.py index 38c00591d..eda369674 100644 --- a/tests/integration/blockchain/test_claim_commands.py +++ b/tests/integration/blockchain/test_claim_commands.py @@ -1,6 +1,7 @@ import os.path import tempfile import logging +import asyncio from binascii import unhexlify from urllib.request import urlopen @@ -79,6 +80,12 @@ class ClaimSearchCommand(ClaimTestCase): ] * 23828 self.assertListEqual([], await self.claim_search(claim_ids=claim_ids)) + # this should do nothing... if the resolve (which is retried) results in the server disconnecting, + # it kerplodes + await asyncio.wait_for(self.daemon.jsonrpc_resolve([ + f'0000000000000000000000000000000000000000{i}' for i in range(30000) + ]), 30) + # 23829 claim ids makes the request just large enough claim_ids = [ '0000000000000000000000000000000000000000', @@ -423,18 +430,18 @@ class TransactionOutputCommands(ClaimTestCase): async def test_txo_list_and_sum_filtering(self): channel_id = self.get_claim_id(await self.channel_create()) - self.assertEqual('1.0', lbc(await self.txo_sum(type='channel', unspent=True))) + self.assertEqual('1.0', lbc(await self.txo_sum(type='channel', is_not_spent=True))) await self.channel_update(channel_id, bid='0.5') - self.assertEqual('0.5', lbc(await self.txo_sum(type='channel', unspent=True))) + self.assertEqual('0.5', lbc(await self.txo_sum(type='channel', is_not_spent=True))) self.assertEqual('1.5', lbc(await self.txo_sum(type='channel'))) stream_id = self.get_claim_id(await self.stream_create(bid='1.3')) - self.assertEqual('1.3', lbc(await self.txo_sum(type='stream', unspent=True))) + self.assertEqual('1.3', lbc(await self.txo_sum(type='stream', is_not_spent=True))) await self.stream_update(stream_id, bid='0.7') - self.assertEqual('0.7', lbc(await self.txo_sum(type='stream', unspent=True))) + self.assertEqual('0.7', lbc(await self.txo_sum(type='stream', is_not_spent=True))) self.assertEqual('2.0', lbc(await self.txo_sum(type='stream'))) - self.assertEqual('1.2', lbc(await self.txo_sum(type=['stream', 'channel'], unspent=True))) + self.assertEqual('1.2', lbc(await self.txo_sum(type=['stream', 'channel'], is_not_spent=True))) self.assertEqual('3.5', lbc(await self.txo_sum(type=['stream', 'channel']))) # type filtering @@ -496,22 +503,35 @@ class TransactionOutputCommands(ClaimTestCase): address2 = await self.daemon.jsonrpc_address_unused(wallet_id=wallet2.id) await self.channel_create('@kept-channel') await self.channel_create('@sent-channel', claim_address=address2) + await self.wallet_send('2.9', address2) # all txos on second wallet - received_channel, = await self.txo_list(wallet_id=wallet2.id, is_my_input_or_output=True) + received_payment, received_channel = await self.txo_list( + wallet_id=wallet2.id, is_my_input_or_output=True) self.assertEqual('1.0', received_channel['amount']) self.assertFalse(received_channel['is_my_input']) self.assertTrue(received_channel['is_my_output']) self.assertFalse(received_channel['is_internal_transfer']) + self.assertEqual('2.9', received_payment['amount']) + self.assertFalse(received_payment['is_my_input']) + self.assertTrue(received_payment['is_my_output']) + self.assertFalse(received_payment['is_internal_transfer']) # all txos on default wallet r = await self.txo_list(is_my_input_or_output=True) self.assertEqual( - ['1.0', '7.947786', '1.0', '8.973893', '10.0'], + ['2.9', '5.047662', '1.0', '7.947786', '1.0', '8.973893', '10.0'], [t['amount'] for t in r] ) - sent_channel, change2, kept_channel, change1, initial_funds = r + sent_payment, change3, sent_channel, change2, kept_channel, change1, initial_funds = r + + self.assertTrue(sent_payment['is_my_input']) + self.assertFalse(sent_payment['is_my_output']) + self.assertFalse(sent_payment['is_internal_transfer']) + self.assertTrue(change3['is_my_input']) + self.assertTrue(change3['is_my_output']) + self.assertTrue(change3['is_internal_transfer']) self.assertTrue(sent_channel['is_my_input']) self.assertFalse(sent_channel['is_my_output']) @@ -533,27 +553,31 @@ class TransactionOutputCommands(ClaimTestCase): # my stuff and stuff i sent excluding "change" r = await self.txo_list(is_my_input_or_output=True, exclude_internal_transfers=True) - self.assertEqual([sent_channel, kept_channel, initial_funds], r) + self.assertEqual([sent_payment, sent_channel, kept_channel, initial_funds], r) # my unspent stuff and stuff i sent excluding "change" - r = await self.txo_list(is_my_input_or_output=True, unspent=True, exclude_internal_transfers=True) - self.assertEqual([sent_channel, kept_channel], r) + r = await self.txo_list(is_my_input_or_output=True, is_not_spent=True, exclude_internal_transfers=True) + self.assertEqual([sent_payment, sent_channel, kept_channel], r) # only "change" r = await self.txo_list(is_my_input=True, is_my_output=True, type="other") - self.assertEqual([change2, change1], r) + self.assertEqual([change3, change2, change1], r) # only unspent "change" - r = await self.txo_list(is_my_input=True, is_my_output=True, type="other", unspent=True) - self.assertEqual([change2], r) + r = await self.txo_list(is_my_input=True, is_my_output=True, type="other", is_not_spent=True) + self.assertEqual([change3], r) + + # only spent "change" + r = await self.txo_list(is_my_input=True, is_my_output=True, type="other", is_spent=True) + self.assertEqual([change2, change1], r) # all my unspent stuff - r = await self.txo_list(is_my_output=True, unspent=True) - self.assertEqual([change2, kept_channel], r) + r = await self.txo_list(is_my_output=True, is_not_spent=True) + self.assertEqual([change3, kept_channel], r) # stuff i sent r = await self.txo_list(is_not_my_output=True) - self.assertEqual([sent_channel], r) + self.assertEqual([sent_payment, sent_channel], r) async def test_txo_plot(self): day_blocks = int((24 * 60 * 60) / self.ledger.headers.timestamp_average_offset) @@ -610,6 +634,26 @@ class TransactionOutputCommands(ClaimTestCase): {'day': '2016-06-25', 'total': '0.6'}, ], plot) + async def test_txo_spend(self): + stream_id = self.get_claim_id(await self.stream_create()) + for _ in range(10): + await self.support_create(stream_id, '0.1') + await self.assertBalance(self.account, '7.978478') + self.assertEqual('1.0', lbc(await self.txo_sum(type='support', is_not_spent=True))) + txs = await self.txo_spend(type='support', batch_size=3, include_full_tx=True) + self.assertEqual(4, len(txs)) + self.assertEqual(3, len(txs[0]['inputs'])) + self.assertEqual(3, len(txs[1]['inputs'])) + self.assertEqual(3, len(txs[2]['inputs'])) + self.assertEqual(1, len(txs[3]['inputs'])) + self.assertEqual('0.0', lbc(await self.txo_sum(type='support', is_not_spent=True))) + await self.assertBalance(self.account, '8.977606') + + await self.support_create(stream_id, '0.1') + txs = await self.daemon.jsonrpc_txo_spend(type='support', batch_size=3) + self.assertEqual(1, len(txs)) + self.assertEqual({'txid'}, set(txs[0])) + class ClaimCommands(ClaimTestCase): diff --git a/tests/integration/blockchain/test_network.py b/tests/integration/blockchain/test_network.py index f2222d560..eacd0d0e6 100644 --- a/tests/integration/blockchain/test_network.py +++ b/tests/integration/blockchain/test_network.py @@ -1,4 +1,3 @@ -import logging import asyncio import lbry diff --git a/tests/integration/blockchain/test_wallet_commands.py b/tests/integration/blockchain/test_wallet_commands.py index cd86fa51d..4f8f0d6ed 100644 --- a/tests/integration/blockchain/test_wallet_commands.py +++ b/tests/integration/blockchain/test_wallet_commands.py @@ -1,6 +1,5 @@ import asyncio import json -import os from lbry.wallet import ENCRYPT_ON_DISK from lbry.error import InvalidPasswordError @@ -22,14 +21,26 @@ class WalletCommands(CommandTestCase): async def test_wallet_syncing_status(self): address = await self.daemon.jsonrpc_address_unused() - sendtxid = await self.blockchain.send_to_address(address, 1) + self.assertFalse(self.daemon.jsonrpc_wallet_status()['is_syncing']) + await self.blockchain.send_to_address(address, 1) + await self.ledger._update_tasks.started.wait() + self.assertTrue(self.daemon.jsonrpc_wallet_status()['is_syncing']) + await self.ledger._update_tasks.done.wait() + self.assertFalse(self.daemon.jsonrpc_wallet_status()['is_syncing']) - async def eventually_will_sync(): - while not self.daemon.jsonrpc_wallet_status()['is_syncing']: - await asyncio.sleep(0) - check_sync = asyncio.create_task(eventually_will_sync()) - await self.confirm_tx(sendtxid, self.ledger) - await asyncio.wait_for(check_sync, timeout=10) + wallet = self.daemon.component_manager.get_actual_component('wallet') + wallet_manager = wallet.wallet_manager + # when component manager hasn't started yet + wallet.wallet_manager = None + self.assertEqual( + {'is_encrypted': None, 'is_syncing': None, 'is_locked': None}, + self.daemon.jsonrpc_wallet_status() + ) + wallet.wallet_manager = wallet_manager + self.assertEqual( + {'is_encrypted': False, 'is_syncing': False, 'is_locked': False}, + self.daemon.jsonrpc_wallet_status() + ) async def test_wallet_reconnect(self): await self.conductor.spv_node.stop(True) diff --git a/tests/integration/blockchain/test_wallet_server_sessions.py b/tests/integration/blockchain/test_wallet_server_sessions.py index f0887ead0..059da8e65 100644 --- a/tests/integration/blockchain/test_wallet_server_sessions.py +++ b/tests/integration/blockchain/test_wallet_server_sessions.py @@ -45,14 +45,6 @@ class TestSessions(IntegrationTestCase): await self.ledger.network.broadcast('13370042004200') -class TestSegwitServer(IntegrationTestCase): - LEDGER = lbry.wallet - ENABLE_SEGWIT = True - - async def test_at_least_it_starts(self): - await asyncio.wait_for(self.ledger.network.get_headers(0, 1), 1.0) - - class TestUsagePayment(CommandTestCase): async def test_single_server_payment(self): wallet_pay_service = self.daemon.component_manager.get_component('wallet_server_payments') @@ -81,7 +73,7 @@ class TestUsagePayment(CommandTestCase): self.assertEqual(features["payment_address"], address) self.assertEqual(features["daily_fee"], "1.1") with self.assertRaises(ServerPaymentFeeAboveMaxAllowedError): - await asyncio.wait_for(wallet_pay_service.on_payment.first, timeout=3) + await asyncio.wait_for(wallet_pay_service.on_payment.first, timeout=8) await node.stop(False) await node.start(self.blockchain, extraconf={"PAYMENT_ADDRESS": address, "DAILY_FEE": "1.0"}) diff --git a/tests/integration/datanetwork/test_file_commands.py b/tests/integration/datanetwork/test_file_commands.py index 24d9b1e71..1ab06d088 100644 --- a/tests/integration/datanetwork/test_file_commands.py +++ b/tests/integration/datanetwork/test_file_commands.py @@ -21,6 +21,11 @@ class FileCommands(CommandTestCase): self.assertEqual(file1['claim_name'], 'foo') self.assertEqual(file2['claim_name'], 'foo2') + self.assertItemCount(await self.daemon.jsonrpc_file_list(claim_id=[file1['claim_id'], file2['claim_id']]), 2) + self.assertItemCount(await self.daemon.jsonrpc_file_list(claim_id=file1['claim_id']), 1) + self.assertItemCount(await self.daemon.jsonrpc_file_list(outpoint=[file1['outpoint'], file2['outpoint']]), 2) + self.assertItemCount(await self.daemon.jsonrpc_file_list(outpoint=file1['outpoint']), 1) + await self.daemon.jsonrpc_file_delete(claim_name='foo') self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1) await self.daemon.jsonrpc_file_delete(claim_name='foo2') diff --git a/tests/integration/other/test_comment_commands.py b/tests/integration/other/test_comment_commands.py index 8a66f71bb..fb72bf7cc 100644 --- a/tests/integration/other/test_comment_commands.py +++ b/tests/integration/other/test_comment_commands.py @@ -106,11 +106,16 @@ class MockedCommentServer: return False def hide_comments(self, pieces: list): - comments_hidden = [] + hidden = [] for p in pieces: if self.hide_comment(**p): - comments_hidden.append(p['comment_id']) - return {'hidden': comments_hidden} + hidden.append(p['comment_id']) + + comment_ids = {c['comment_id'] for c in pieces} + return { + 'hidden': hidden, + 'visible': list(comment_ids - set(hidden)) + } def get_claim_comments(self, claim_id, page=1, page_size=50,**kwargs): comments = list(filter(lambda c: c['claim_id'] == claim_id, self.comments)) @@ -138,12 +143,19 @@ class MockedCommentServer: def get_comment_channel_by_id(self, comment_id: int, **kwargs): comment = self.comments[self.get_comment_id(comment_id)] return { - 'channel_id': comment.get('channel_id'), - 'channel_name': comment.get('channel_name') + 'channel_id': comment['channel_id'], + 'channel_name': comment['channel_name'], } def get_comments_by_id(self, comment_ids: list): - return [self.comments[self.get_comment_id(cid)] for cid in comment_ids] + comments = [self.comments[self.get_comment_id(cid)] for cid in comment_ids] + return { + 'page': 1, + 'page_size': len(comment_ids), + 'total_pages': 1, + 'items': comments, + 'has_hidden_comments': bool({c for c in comments if c['is_hidden']}) + } methods = { 'get_claim_comments': get_claim_comments, diff --git a/tests/integration/other/test_transcoding.py b/tests/integration/other/test_transcoding.py index d671ace4d..673e39a0c 100644 --- a/tests/integration/other/test_transcoding.py +++ b/tests/integration/other/test_transcoding.py @@ -60,7 +60,7 @@ class TranscodeValidation(ClaimTestCase): self.assertEqual(self.video_file_webm, new_file_name) self.assertEqual(spec["width"], 1280) self.assertEqual(spec["height"], 720) - self.assertEqual(spec["duration"], 15.054) + self.assertEqual(spec["duration"], 16) async def test_volume(self): self.conf.volume_analysis_time = 200 @@ -160,3 +160,26 @@ class TranscodeValidation(ClaimTestCase): await self.analyzer.status(reset=True) with self.assertRaisesRegex(Exception, "Unable to locate"): await self.analyzer.verify_or_repair(True, False, self.video_file_name) + + async def test_dont_recheck_ffmpeg_installation(self): + + call_count = 0 + + original = self.daemon._video_file_analyzer._verify_ffmpeg_installed + + def _verify_ffmpeg_installed(): + nonlocal call_count + call_count += 1 + return original() + + self.daemon._video_file_analyzer._verify_ffmpeg_installed = _verify_ffmpeg_installed + self.assertEqual(0, call_count) + await self.daemon.jsonrpc_status() + self.assertEqual(1, call_count) + # counter should not go up again + await self.daemon.jsonrpc_status() + self.assertEqual(1, call_count) + + # this should force rechecking the installation + await self.daemon.jsonrpc_ffmpeg_find() + self.assertEqual(2, call_count) diff --git a/tests/unit/stream/test_reflector.py b/tests/unit/stream/test_reflector.py index 8c228f92c..4845948d1 100644 --- a/tests/unit/stream/test_reflector.py +++ b/tests/unit/stream/test_reflector.py @@ -46,7 +46,9 @@ class TestStreamAssembler(AsyncioTestCase): reflector.start_server(5566, '127.0.0.1') await reflector.started_listening.wait() self.addCleanup(reflector.stop_server) + self.assertEqual(0, self.stream.reflector_progress) sent = await self.stream.upload_to_reflector('127.0.0.1', 5566) + self.assertEqual(100, self.stream.reflector_progress) self.assertSetEqual( set(sent), set(map(lambda b: b.blob_hash, diff --git a/tests/unit/wallet/test_headers.py b/tests/unit/wallet/test_headers.py index 52dfc2117..e014f6e46 100644 --- a/tests/unit/wallet/test_headers.py +++ b/tests/unit/wallet/test_headers.py @@ -143,6 +143,37 @@ class TestHeaders(AsyncioTestCase): self.assertEqual(7, headers.height) await headers.connect(len(headers), HEADERS[block_bytes(8):]) self.assertEqual(19, headers.height) + # verify from middle + await headers.repair(start_height=10) + self.assertEqual(19, headers.height) + + def test_do_not_estimate_unconfirmed(self): + headers = Headers(':memory:') + self.assertIsNone(headers.estimated_timestamp(-1)) + self.assertIsNone(headers.estimated_timestamp(0)) + self.assertIsNotNone(headers.estimated_timestamp(1)) + + async def test_misalignment_triggers_repair_on_open(self): + headers = Headers(':memory:') + headers.io.seek(0) + headers.io.write(HEADERS) + with self.assertLogs(level='WARN') as cm: + await headers.open() + self.assertEqual(cm.output, []) + headers.io.seek(0) + headers.io.truncate() + headers.io.write(HEADERS[:block_bytes(10)]) + headers.io.write(b'ops') + headers.io.write(HEADERS[block_bytes(10):]) + await headers.open() + self.assertEqual( + cm.output, [ + 'WARNING:lbry.wallet.header:Reader file size doesnt match header size. ' + 'Repairing, might take a while.', + 'WARNING:lbry.wallet.header:Header file corrupted at height 9, truncating ' + 'it.' + ] + ) async def test_concurrency(self): BLOCKS = 19