Compare commits

...
Author SHA1 Message Date
Lex Berezhny 5822fc1d5b v0.54.1 2020-01-22 08:40:35 -05:00
Lex Berezhny 2cd7ea257c Added support to differentiate between filtering and blocking for content censoring 2020-01-22 08:39:14 -05:00
Alex Grin 0a21b72f9c v0.54.0 2020-01-21 16:17:12 -05:00
Alex Grintsvayg 80280f6f4a Revert "v0.54.0"
This reverts commit bd3b4906d1.
2020-01-21 15:34:35 -05:00
Alex Grintsvayg 810a8e76d1 Pin pip to 19.3.1 on Windows
pip 20 made the following change:

> Remove interpreter-specific major version tag e.g. cp3-none-any from consideration.
> https://github.com/pypa/pip/pull/7355

The coincurve pip package only has a major version tag for its windows
wheel. pip20 will not allow us to install that wheel, and compiling
coincurve from source causes errors. So we cannot use pip 20 or above
until coincurve fixes its compatibility tags, we can compile coincurve
from source, we stop using coincurve, or we figure out another way to
install it.

Note that on osx and linux, coincurve has the correct tags.
2020-01-21 15:24:29 -05:00
Lex Berezhny bd3b4906d1 v0.54.0 2020-01-21 11:30:14 -05:00
Lex Berezhny d9c740f014 update tests to use 0.54.0 minimum version 2020-01-21 11:28:56 -05:00
Alex Grintsvayg ec63a18960 Revert "v0.54.0"
This reverts commit fab0618b6b.
2020-01-21 11:23:51 -05:00
Alex Grin fab0618b6b v0.54.0 2020-01-21 11:00:38 -05:00
Alex Grintsvayg 13e57e7aa8 Revert "v0.54.0"
This reverts commit 836b66e110.
2020-01-21 10:43:21 -05:00
Alex Grintsvayg 1299c9162c Revert "Add prometheus metrics collection to client and server"
This reverts commit 59a5bacb2e.
2020-01-21 10:30:49 -05:00
Alex Grintsvayg a64f33dbcc ignore coverage files 2020-01-21 10:30:48 -05:00
Alex Grin 836b66e110 v0.54.0 2020-01-20 14:26:36 -05:00
Alex Grintsvayg 802119d789 Revert "v0.54.0"
This reverts commit aec4d1dc60.
2020-01-20 14:24:30 -05:00
Alex Grintsvayg f94135cadd make pycharm happy about long lines 2020-01-20 14:18:00 -05:00
Alex Grintsvayg 474c0f980e skip randomly-failing dht test 2020-01-20 14:16:52 -05:00
Alex Grintsvayg 2cf0f791f2 remove unused import 2020-01-20 13:44:49 -05:00
Alex Grin aec4d1dc60 v0.54.0 2020-01-20 13:13:30 -05:00
Alex Grintsvayg 8d28bb5a66 bump min protocol version 2020-01-20 12:53:10 -05:00
Alex Grintsvayg 1d5e553f9c Merge branch 'blocked_search_metadata'
* blocked_search_metadata:
  add index for claim_type and release_time
  fix test
  fix json api generator
  add pagination for claim_search
  regenerate protobufs
  using multiprocessing.Manager to keep blocked content synced between readers
2020-01-20 12:51:02 -05:00
Lex Berezhny 9d79c52d20 add index for claim_type and release_time 2020-01-20 12:50:20 -05:00
Lex Berezhny 1ac03e2f1d fix test 2020-01-20 12:50:16 -05:00
Lex Berezhny 801f05f45e fix json api generator 2020-01-20 12:50:16 -05:00
Lex Berezhny 345196aa3b add pagination for claim_search 2020-01-20 12:49:42 -05:00
Lex Berezhny a01b52421e regenerate protobufs 2020-01-20 12:49:41 -05:00
Lex Berezhny 86cedfe8b2 using multiprocessing.Manager to keep blocked content synced between readers 2020-01-20 12:49:41 -05:00
Alex Grintsvayg 709128225b Merge branch 'prometheus'
* prometheus:
  Add prometheus metrics collection to client and server
2020-01-20 12:45:11 -05:00
Alex Grintsvayg 59a5bacb2e Add prometheus metrics collection to client and server 2020-01-20 12:43:49 -05:00
Jack Robison 3a21df31ee v0.53.3 2020-01-16 16:43:26 -05:00
Jack Robison 0e3407ec2f Merge pull request #2730 from lbryio/bump-aioupnp2
update aioupnp requirement to 0.0.17
2020-01-16 16:00:42 -05:00
Jack Robison fd6609e961 bump aioupnp requirement to 0.0.17 2020-01-16 15:40:29 -05:00
Jack Robison b0b5e045ff non blocking aioupnp success analytics 2020-01-16 15:40:24 -05:00
Jack Robison f293d7cccc pin windows pyinstaller 2020-01-16 15:02:15 -05:00
Jack Robison 974ed29c36 Merge pull request #2729 from lbryio/fix-headers-subscription-to-old
disconnect from server that returns rpc error for server.version
2020-01-15 17:59:17 -05:00
Jack Robison 53eb033034 disconnect from server that returns rpc error for server.version
-the server returns this error if it thinks we are incompatible with it
2020-01-15 17:06:13 -05:00
Jack Robison f2545b98ab Merge pull request #2728 from lbryio/check-server-version-from-client
check minimum server version from wallet client
2020-01-15 16:53:10 -05:00
Jack Robison 1bf51e855d check minimum server version from wallet client 2020-01-15 15:55:39 -05:00
Jack Robison e4da2a695b v0.53.2 2020-01-14 16:47:56 -05:00
Lex Berezhny 1a905d9a42 make --start-tag work again in release/script.py 2020-01-13 21:40:07 -05:00
Victor Shyba 7d9d0c15d3 fix test_direct_sync flakiness 2020-01-13 21:17:10 -05:00
Victor Shyba d34f5c2712 fix None in history, check records after wait 2020-01-13 21:17:10 -05:00
Victor Shyba a56dd66c98 separate cases and make it deterministic 2020-01-13 21:17:10 -05:00
Victor Shyba 3946bc6662 fix and document new edge case on tests 2020-01-13 21:17:10 -05:00
Victor Shyba 6647dd8f08 fix decrypting invalid bytes with valid padding 2020-01-13 21:17:10 -05:00
Jack Robison 9371122bed Merge pull request #2725 from lbryio/stream-manager-startup
faster stream manager startup
2020-01-13 18:09:49 -05:00
Jack Robison 734cd8ee08 logging 2020-01-13 17:51:05 -05:00
Jack Robison d85d9d05bb fast get_all_lbry_files 2020-01-13 17:51:05 -05:00
Jack Robison 1d7b87b3a9 fix inefficient loop in update_manually_removed_files_since_last_run 2020-01-13 17:51:02 -05:00
Lex Berezhny f0cfde36f2 v0.53.1 2020-01-13 14:12:30 -05:00
Lex Berezhny 7e220d2741 downgrade setuptools 2020-01-13 14:03:45 -05:00
Lex Berezhny c4b1351a43 stop building on travis 2020-01-13 14:03:45 -05:00
Lex Berezhny 90d2597bc3 pin to pyinstaller==3.5 2020-01-13 14:03:45 -05:00
Lex Berezhny c1508c94c2 v0.53.0 2020-01-13 12:23:41 -05:00
32 changed files with 1910 additions and 1458 deletions

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
/build
/dist
/.tox
/.coverage
/.coverage*
/lbry-venv
lbry.egg-info
+6 -3
View File
@@ -70,6 +70,7 @@ test:json-api:
paths:
- lbrynet-${OS}.zip
script:
- pip install --upgrade 'setuptools<45.0.0'
- pip install pyinstaller
- python3.7 docker/set_build.py
- pip install -e .
@@ -117,15 +118,17 @@ build:windows:
before_script:
- ./docker/install_choco.ps1
- choco install -y --x86 python3 7zip checksum
# - python --version | findstr /B "Python 3\.7\." # dont upgrade python on every run. just make sure we're on the right Python
# - pip --version | findstr /E '\(python 3\.7\)'
- python --version # | findstr /B "Python 3\.7\." # dont upgrade python on every run. just make sure we're on the right Python
- pip --version # | findstr /E '\(python 3\.7\)'
- pip install virtualenv pywin32
- virtualenv venv
- venv/Scripts/activate.ps1
- pip install pip==19.3.1; $true # $true ignores errors. need this to get the correct coincurve wheel. see commit notes for details.
after_script:
- rmdir -Recurse venv
script:
- pip install pyinstaller
- pip install --upgrade 'setuptools<45.0.0'
- pip install pyinstaller==3.5
- python docker/set_build.py
- pip install -e .
- pyinstaller --additional-hooks-dir=scripts/. --icon=icons/lbry256.ico -F -n lbrynet lbry/extras/cli.py
-51
View File
@@ -1,51 +0,0 @@
dist: xenial
language: python
python: "3.7"
jobs:
include:
- stage: code quality
name: "pylint & mypy"
install:
- make install tools
script: make lint
- stage: test
name: "Unit Tests"
install:
- make install tools
script:
- HOME=/tmp coverage run -p --source=lbry -m unittest discover -vv tests.unit
- name: "Integration Tests - Data Network"
install:
- pip install tox-travis
- sudo mount -o mode=1777,nosuid,nodev -t tmpfs tmpfs /tmp
script: tox -e datanetwork
- name: "Integration Tests - Blockchain"
install:
- pip install tox-travis
- sudo mount -o mode=1777,nosuid,nodev -t tmpfs tmpfs /tmp
script: tox -e blockchain
- name: "Integration Tests - Other"
install:
- pip install tox-travis
- sudo mount -o mode=1777,nosuid,nodev -t tmpfs tmpfs /tmp
script: tox -e other
- name: "Run Examples"
install:
- make install tools
script:
- HOME=/tmp coverage run -p --source=lbry scripts/generate_json_api.py
cache:
directories:
- $HOME/venv
- $HOME/.cache/pip
- $HOME/Library/Caches/pip
- $HOME/Library/Caches/Homebrew
- $TRAVIS_BUILD_DIR/.tox
+166 -172
View File
@@ -47,10 +47,10 @@
"examples": [
{
"title": "Get a file",
"curl": "curl -d'{\"method\": \"get\", \"params\": {\"uri\": \"astream#f95ede15cbeff2da7e4a481c538501c36343077c\"}}' http://localhost:5279/",
"lbrynet": "lbrynet get astream#f95ede15cbeff2da7e4a481c538501c36343077c",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"get\", \"params\": {\"uri\": \"astream#f95ede15cbeff2da7e4a481c538501c36343077c\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"added_on\": 1578100350,\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"confirmations\": 3,\n \"content_fee\": null,\n \"download_directory\": \"/tmp/tmpykj53y2t\",\n \"download_path\": \"/tmp/tmpykj53y2t/tmpsg2mhmr_\",\n \"file_name\": \"tmpsg2mhmr_\",\n \"height\": 214,\n \"key\": \"518b647925f56fbbdadc5f15058b9196\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpsg2mhmr_\",\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"a50b3532115ae329c2e0bc6cf713a015a524418d34d84f8ca37711253e8ee50f:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"017897f4a57b411ebe066cbf2f54de8e16aeb9c834feb406b1b0991fcbfff25ad85805dbf02124246436d8012302edcdf004a4479aec646070e3c9909aa22f08a482d54f00cb245398f838f4c36941981d0698e2a20a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d707367326d686d725f180b22186170706c69636174696f6e2f6f637465742d73747265616d3230d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"1b7b40081d9b1a8f60b7d5a2af031b1c04bd7edbd0675bfa1920f6351524501fa4edf6acb13db77a4ca1c9503fcaa33b\",\n \"stream_name\": \"tmpsg2mhmr_\",\n \"streaming_url\": \"http://localhost:5280/stream/d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"suggested_file_name\": \"tmpsg2mhmr_\",\n \"timestamp\": 1578100370,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"a50b3532115ae329c2e0bc6cf713a015a524418d34d84f8ca37711253e8ee50f\",\n \"written_bytes\": 11\n }\n}"
"curl": "curl -d'{\"method\": \"get\", \"params\": {\"uri\": \"astream#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\"}}' http://localhost:5279/",
"lbrynet": "lbrynet get astream#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"get\", \"params\": {\"uri\": \"astream#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"added_on\": 1579400254,\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"confirmations\": 3,\n \"content_fee\": null,\n \"download_directory\": \"/tmp/tmp1ozq8ity\",\n \"download_path\": \"/tmp/tmp1ozq8ity/tmppsu__ylo\",\n \"file_name\": \"tmppsu__ylo\",\n \"height\": 214,\n \"key\": \"b7d93a1d57d3e61812c674a34a4f3961\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmppsu__ylo\",\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"5d701f3ffa627da65082fc499b2cc34a83435b2b7f0b24166f4bae87ee330450:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01c7482562bfe65919bd8f74f3c067fbf4f62cd43fa5f4d8ab7ca870112e7310d70d239ea4d507688327acf4b80eb68fc7a5138726aa8bcd6a61c926732b2f5edf6c36fb5977cbb0c0b36e08980a78166af7fbb9660a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d707073755f5f796c6f180b22186170706c69636174696f6e2f6f637465742d73747265616d3230a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"c0a2bb6f6e97c10717c53e24d8057cafbdc095b9a9f6f78d2bab385a38dcfd226f9731c2dee9eba3463d73bacbc41e94\",\n \"stream_name\": \"tmppsu__ylo\",\n \"streaming_url\": \"http://localhost:5280/stream/a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"suggested_file_name\": \"tmppsu__ylo\",\n \"timestamp\": 1579400270,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"5d701f3ffa627da65082fc499b2cc34a83435b2b7f0b24166f4bae87ee330450\",\n \"written_bytes\": 11\n }\n}"
}
]
},
@@ -231,10 +231,10 @@
"examples": [
{
"title": "Publish a file",
"curl": "curl -d'{\"method\": \"publish\", \"params\": {\"name\": \"a-new-stream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp89vmvfej\", \"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/tmp89vmvfej",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"publish\", \"params\": {\"name\": \"a-new-stream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp89vmvfej\", \"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\": \"01000000019261fc655c21c891fdb228261e71b40731b7560485fde5ae2de4462f847987a8010000006a47304402203f618cdaac1482f66527524fc0d10a86a4b3d131a2851d5b727d4d168125d54d02207132914eebf13193ea9805f058705fb357a98a791dfa1bf869ee5fb95f0e1dbc0121026e6755b2a17c5d7a261164316cbb733320b8f15af4a9a6db073bc4795ad632e8ffffffff0200e1f50500000000bfb50c612d6e65772d73747265616d4c94000a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d703839766d7666656a180b22186170706c69636174696f6e2f6f637465742d73747265616d3230a6358fe4485d55476a753e02cd1ffbba8f2fedca0c1a64dc040a337e43e780c90fa55a4585b86884b4109b3abb696e5d6d7576a914ca546f7063fc143b3913f5c2925e8f62b540d01888ace0b46217000000001976a9145e5b817ed5c75ae107c70cca3a6b6d2fbf95034e88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mt4ReBJRH3QXdfyxiKyCwuFAFDgPVUPiSK\",\n \"amount\": \"4.947555\",\n \"confirmations\": 4,\n \"height\": 215,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1578100370,\n \"txid\": \"a88779842f46e42daee5fd850456b73107b4711e2628b2fd91c8215c65fc6192\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"myxmwUKbt7Qg3yFL8Nuf6ewKy9t8Y5FPB6\",\n \"amount\": \"1.0\",\n \"claim_id\": \"07956de3340a77144971b4464a121d2e5bd577fb\",\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#07956de3340a77144971b4464a121d2e5bd577fb\",\n \"timestamp\": null,\n \"txid\": \"9dcb4a032983ce49038d4ff24fbec0ce82942780599c3d699c8d564c968cc0df\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp89vmvfej\",\n \"sd_hash\": \"a6358fe4485d55476a753e02cd1ffbba8f2fedca0c1a64dc040a337e43e780c90fa55a4585b86884b4109b3abb696e5d\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mp7sS2K2b3EZgjoFeFqzGvFvS7tfJJ4Zyb\",\n \"amount\": \"3.923448\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"9dcb4a032983ce49038d4ff24fbec0ce82942780599c3d699c8d564c968cc0df\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.024107\",\n \"total_input\": \"4.947555\",\n \"total_output\": \"4.923448\",\n \"txid\": \"9dcb4a032983ce49038d4ff24fbec0ce82942780599c3d699c8d564c968cc0df\"\n }\n}"
"curl": "curl -d'{\"method\": \"publish\", \"params\": {\"name\": \"a-new-stream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpc8ov7w53\", \"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/tmpc8ov7w53",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"publish\", \"params\": {\"name\": \"a-new-stream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpc8ov7w53\", \"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\": \"010000000167e85c88fde387f326fba37b2612c3a805b2ed9ad4f9e5b46307a48029fa6d87010000006a473044022028798a357db4cf4403bc4cee03faf1b946a88dfa381599d1bfae2cacd3fab5f30220486161df34b2456b078f6d5b930bf437ef846ff6e6d68405cecdf866df177039012102d1577d55cb8cde272aca54b60c9b2be77d45d62367d15a09e05936c1ba3d00d2ffffffff0200e1f50500000000bfb50c612d6e65772d73747265616d4c94000a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d7063386f7637773533180b22186170706c69636174696f6e2f6f637465742d73747265616d3230846e3586adcc755850c7db569c5aaa1fb27e575e33be00c43fe67af34a0932668b3cb4959b38bfd6053beffc9cf7f7766d7576a914709db1a433f5f89b2dd707a1a172889b5ad8b35388ace0b46217000000001976a914b1be5eed89b7362def12fac0f7eda5046d3defa288ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mq8BBn6fuhMt5EY9reRSUSwkAWBDpiFUhi\",\n \"amount\": \"4.947555\",\n \"confirmations\": 4,\n \"height\": 215,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1579400270,\n \"txid\": \"876dfa2980a40763b4e5f9d49aedb205a8c312267ba3fb26f387e3fd885ce867\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mqnQtJbG1yPUh9czkmvQWvkCyCB4HdYtdk\",\n \"amount\": \"1.0\",\n \"claim_id\": \"147e85f9f871ac68c1162c6bb0b0a065d67c1c30\",\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#147e85f9f871ac68c1162c6bb0b0a065d67c1c30\",\n \"timestamp\": null,\n \"txid\": \"1653397207802b93eaca0f53d8ca4c86e56f532a3bb7d68731b6e8ba4faf95d8\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpc8ov7w53\",\n \"sd_hash\": \"846e3586adcc755850c7db569c5aaa1fb27e575e33be00c43fe67af34a0932668b3cb4959b38bfd6053beffc9cf7f776\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mwimxCnDnH6Bxpvn3Am4Cq7wzqej7B9oF6\",\n \"amount\": \"3.923448\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"1653397207802b93eaca0f53d8ca4c86e56f532a3bb7d68731b6e8ba4faf95d8\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.024107\",\n \"total_input\": \"4.947555\",\n \"total_output\": \"4.923448\",\n \"txid\": \"1653397207802b93eaca0f53d8ca4c86e56f532a3bb7d68731b6e8ba4faf95d8\"\n }\n}"
}
]
},
@@ -259,10 +259,10 @@
"examples": [
{
"title": "Resolve a claim",
"curl": "curl -d'{\"method\": \"resolve\", \"params\": {\"urls\": [\"astream#f95ede15cbeff2da7e4a481c538501c36343077c\"]}}' http://localhost:5279/",
"lbrynet": "lbrynet resolve astream#f95ede15cbeff2da7e4a481c538501c36343077c",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"resolve\", \"params\": {\"urls\": [\"astream#f95ede15cbeff2da7e4a481c538501c36343077c\"]}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"astream#f95ede15cbeff2da7e4a481c538501c36343077c\": {\n \"address\": \"mxWcrRGimXXR7VmSAhgzGkWfENPu5PE4Sv\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3/astream#f\",\n \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\",\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\": 1578100370,\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#f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"short_url\": \"lbry://astream#f\",\n \"signing_channel\": {\n \"address\": \"mgegsgW4K5Za5hALM3us2wcKtPiSvZuNoW\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3\",\n \"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\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\": 1578100369,\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#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"short_url\": \"lbry://@channel#3\",\n \"timestamp\": 1578100369,\n \"txid\": \"2dec1041a506773a5fb4e81589ef2f7243cc227c970b24fcd062b2745207dd60\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b\",\n \"public_key_id\": \"mhW32CGgi122kZTBp4XnkTFZSTYwFP4bva\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1578100370,\n \"txid\": \"a50b3532115ae329c2e0bc6cf713a015a524418d34d84f8ca37711253e8ee50f\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpsg2mhmr_\",\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n }\n}"
"curl": "curl -d'{\"method\": \"resolve\", \"params\": {\"urls\": [\"astream#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\"]}}' http://localhost:5279/",
"lbrynet": "lbrynet resolve astream#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"resolve\", \"params\": {\"urls\": [\"astream#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\"]}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"astream#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\": {\n \"address\": \"mm4reqApxMGhBDpeWEVfhAeCWGrtkMpn9r\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3/astream#b\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\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\": 1579400270,\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#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"short_url\": \"lbry://astream#b\",\n \"signing_channel\": {\n \"address\": \"mtDvR2y9mdUW6zGkoKbDrnEFjDv3zjYbUD\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3\",\n \"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\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\": 1579400269,\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#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"short_url\": \"lbry://@channel#3\",\n \"timestamp\": 1579400269,\n \"txid\": \"e519f7b43012574efe4144be3a5c7cb2b09455202f50b592df4734af432a154f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00\",\n \"public_key_id\": \"mrW9NiUf9kwrAghgoSb13EViJDjzEs1NXk\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1579400270,\n \"txid\": \"5d701f3ffa627da65082fc499b2cc34a83435b2b7f0b24166f4bae87ee330450\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmppsu__ylo\",\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n }\n}"
}
]
},
@@ -277,14 +277,14 @@
"name": "status",
"description": "Get daemon status",
"arguments": [],
"returns": "(dict) lbrynet-daemon status\n {\n 'installation_id': (str) installation id - base58,\n 'is_running': (bool),\n 'skipped_components': (list) [names of skipped components (str)],\n 'startup_status': { Does not include components which have been skipped\n 'blob_manager': (bool),\n 'blockchain_headers': (bool),\n 'database': (bool),\n 'dht': (bool),\n 'exchange_rate_manager': (bool),\n 'hash_announcer': (bool),\n 'peer_protocol_server': (bool),\n 'stream_manager': (bool),\n 'upnp': (bool),\n 'wallet': (bool),\n },\n 'connection_status': {\n 'code': (str) connection status code,\n 'message': (str) connection status message\n },\n 'blockchain_headers': {\n 'downloading_headers': (bool),\n 'download_progress': (float) 0-100.0\n },\n 'wallet': {\n 'blocks': (int) local blockchain height,\n 'blocks_behind': (int) remote_height - local_height,\n 'best_blockhash': (str) block hash of most recent block,\n 'is_encrypted': (bool),\n 'is_locked': (bool),\n 'connected_servers': (list) [\n {\n 'host': (str) server hostname,\n 'port': (int) server port,\n 'latency': (int) milliseconds\n }\n ],\n },\n 'dht': {\n 'node_id': (str) lbry dht node id - hex encoded,\n 'peers_in_routing_table': (int) the number of peers in the routing table,\n },\n 'blob_manager': {\n 'finished_blobs': (int) number of finished blobs in the blob manager,\n 'connections': {\n 'incoming_bps': {\n <source ip and tcp port>: (int) bytes per second received,\n },\n 'outgoing_bps': {\n <destination ip and tcp port>: (int) bytes per second sent,\n },\n 'total_outgoing_mps': (float) megabytes per second sent,\n 'total_incoming_mps': (float) megabytes per second received,\n 'time': (float) timestamp\n }\n },\n 'hash_announcer': {\n 'announce_queue_size': (int) number of blobs currently queued to be announced\n },\n 'stream_manager': {\n 'managed_files': (int) count of files in the stream manager,\n },\n 'upnp': {\n 'aioupnp_version': (str),\n 'redirects': {\n <TCP | UDP>: (int) external_port,\n },\n 'gateway': (str) manufacturer and model,\n 'dht_redirect_set': (bool),\n 'peer_redirect_set': (bool),\n 'external_ip': (str) external ip address,\n }\n }",
"returns": "(dict) lbrynet-daemon status\n {\n 'installation_id': (str) installation id - base58,\n 'is_running': (bool),\n 'skipped_components': (list) [names of skipped components (str)],\n 'startup_status': { Does not include components which have been skipped\n 'blob_manager': (bool),\n 'blockchain_headers': (bool),\n 'database': (bool),\n 'dht': (bool),\n 'exchange_rate_manager': (bool),\n 'hash_announcer': (bool),\n 'peer_protocol_server': (bool),\n 'stream_manager': (bool),\n 'upnp': (bool),\n 'wallet': (bool),\n },\n 'connection_status': {\n 'code': (str) connection status code,\n 'message': (str) connection status message\n },\n 'blockchain_headers': {\n 'downloading_headers': (bool),\n 'download_progress': (float) 0-100.0\n },\n 'wallet': {\n 'connected': (str) host and port of the connected spv server,\n 'blocks': (int) local blockchain height,\n 'blocks_behind': (int) remote_height - local_height,\n 'best_blockhash': (str) block hash of most recent block,\n 'is_encrypted': (bool),\n 'is_locked': (bool),\n 'connected_servers': (list) [\n {\n 'host': (str) server hostname,\n 'port': (int) server port,\n 'latency': (int) milliseconds\n }\n ],\n },\n 'dht': {\n 'node_id': (str) lbry dht node id - hex encoded,\n 'peers_in_routing_table': (int) the number of peers in the routing table,\n },\n 'blob_manager': {\n 'finished_blobs': (int) number of finished blobs in the blob manager,\n 'connections': {\n 'incoming_bps': {\n <source ip and tcp port>: (int) bytes per second received,\n },\n 'outgoing_bps': {\n <destination ip and tcp port>: (int) bytes per second sent,\n },\n 'total_outgoing_mps': (float) megabytes per second sent,\n 'total_incoming_mps': (float) megabytes per second received,\n 'time': (float) timestamp\n }\n },\n 'hash_announcer': {\n 'announce_queue_size': (int) number of blobs currently queued to be announced\n },\n 'stream_manager': {\n 'managed_files': (int) count of files in the stream manager,\n },\n 'upnp': {\n 'aioupnp_version': (str),\n 'redirects': {\n <TCP | UDP>: (int) external_port,\n },\n 'gateway': (str) manufacturer and model,\n 'dht_redirect_set': (bool),\n 'peer_redirect_set': (bool),\n 'external_ip': (str) external ip address,\n }\n }",
"examples": [
{
"title": "Get status",
"curl": "curl -d'{\"method\": \"status\", \"params\": {}}' http://localhost:5279/",
"lbrynet": "lbrynet status",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"status\", \"params\": {}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"blob_manager\": {\n \"connections\": {\n \"incoming_bps\": {},\n \"max_incoming_mbs\": 0.0,\n \"max_outgoing_mbs\": 0.0,\n \"outgoing_bps\": {},\n \"total_incoming_mbs\": 0.0,\n \"total_outgoing_mbs\": 0.0,\n \"total_received\": 0,\n \"total_sent\": 0\n },\n \"finished_blobs\": 0\n },\n \"connection_status\": {\n \"code\": \"connected\",\n \"message\": \"No connection problems detected\"\n },\n \"installation_id\": \"7L2Eqr9iYhoqYwYJFuXhjPRZUSehma22CM34RQcWzMA8Xp5iqopX6Su7n375uWN6TL\",\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 },\n \"stream_manager\": {\n \"managed_files\": 0\n },\n \"wallet\": {\n \"available_servers\": 1,\n \"best_blockhash\": \"f25a215e89357dca5e22090632731ffe44977f01de951b25da4bf7f324a5d0dc\",\n \"blocks\": 206,\n \"blocks_behind\": 0,\n \"headers_synchronization_progress\": 100,\n \"known_servers\": 1,\n \"servers\": [\n {\n \"availability\": true,\n \"host\": \"localhost\",\n \"latency\": 0.005787739999504993,\n \"port\": 50002\n }\n ]\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\": \"connected\",\n \"message\": \"No connection problems detected\"\n },\n \"installation_id\": \"6bX88naHw5g5pVDihups1vDJAUJX3tPnSTzzX8gqn8GqqhDDAGS8gXYeHYYhkfMeav\",\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 },\n \"stream_manager\": {\n \"managed_files\": 0\n },\n \"wallet\": {\n \"available_servers\": 1,\n \"best_blockhash\": \"691772a32fc37ac70ef8cff4ca4d3e3ff3f6e46271d61ebf927976d0fec1aec8\",\n \"blocks\": 206,\n \"blocks_behind\": 0,\n \"connected\": \"127.0.0.1:50002\",\n \"headers_synchronization_progress\": 100,\n \"known_servers\": 1,\n \"servers\": [\n {\n \"availability\": true,\n \"host\": \"localhost\",\n \"latency\": 0.010761522004031576,\n \"port\": 50002\n }\n ]\n }\n }\n}"
}
]
},
@@ -299,14 +299,14 @@
"name": "version",
"description": "Get lbrynet API server version information",
"arguments": [],
"returns": "(dict) Dictionary of lbry version information\n {\n 'processor': (str) processor type,\n 'python_version': (str) python version,\n 'platform': (str) platform string,\n 'os_release': (str) os release string,\n 'os_system': (str) os name,\n 'lbrynet_version': (str) lbrynet version,\n 'torba_version': (str) torba version,\n 'build': (str) \"dev\" | \"qa\" | \"rc\" | \"release\",\n }",
"returns": "(dict) Dictionary of lbry version information\n {\n 'processor': (str) processor type,\n 'python_version': (str) python version,\n 'platform': (str) platform string,\n 'os_release': (str) os release string,\n 'os_system': (str) os name,\n 'version': (str) lbrynet version,\n 'build': (str) \"dev\" | \"qa\" | \"rc\" | \"release\",\n }",
"examples": [
{
"title": "Get version",
"curl": "curl -d'{\"method\": \"version\", \"params\": {}}' http://localhost:5279/",
"lbrynet": "lbrynet version",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"version\", \"params\": {}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"build\": \"dev\",\n \"desktop\": \"ubuntu:GNOME\",\n \"distro\": {\n \"codename\": \"bionic\",\n \"id\": \"ubuntu\",\n \"like\": \"debian\",\n \"version\": \"18.04\",\n \"version_parts\": {\n \"build_number\": \"\",\n \"major\": \"18\",\n \"minor\": \"04\"\n }\n },\n \"lbrynet_version\": \"0.51.2\",\n \"os_release\": \"4.15.0-72-generic\",\n \"os_system\": \"Linux\",\n \"platform\": \"Linux-4.15.0-72-generic-x86_64-with-debian-buster-sid\",\n \"processor\": \"x86_64\",\n \"python_version\": \"3.7.3\",\n \"torba_version\": \"0.5.7\"\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.53.3\",\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.53.3\"\n }\n}"
}
]
}
@@ -360,10 +360,10 @@
"examples": [
{
"title": "Add an account from seed",
"curl": "curl -d'{\"method\": \"account_add\", \"params\": {\"account_name\": \"new account\", \"seed\": \"crisp result shop endorse polar duck figure refuse forest cherry patient adult\", \"single_key\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet account add \"new account\" --seed=\"crisp result shop endorse polar duck figure refuse forest cherry patient adult\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_add\", \"params\": {\"account_name\": \"new account\", \"seed\": \"crisp result shop endorse polar duck figure refuse forest cherry patient adult\", \"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\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1578100337.6263494,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPdnKS42LM2cpNdVGZzcBdnUDYgPE1FnJMQeYHfBeNem3Mvig22kHHcp7n4V6GLPu3NN2AB5B4jVW3so9pz8PVesPBhqGtyNW\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XFMDwfzwS2UVCWnW9wNYMmpKxuGJg46kF8o4HaTxqFfE6qjCCs9dqqVKwrGHFuRiZorsiJeL6diaQNGjVREQzwHDDmDRcHq\",\n \"seed\": \"crisp result shop endorse polar duck figure refuse forest cherry patient adult\"\n }\n}"
"curl": "curl -d'{\"method\": \"account_add\", \"params\": {\"account_name\": \"new account\", \"seed\": \"blossom warfare trial oil essay six develop bless remember recipe wasp avoid\", \"single_key\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet account add \"new account\" --seed=\"blossom warfare trial oil essay six develop bless remember recipe wasp avoid\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_add\", \"params\": {\"account_name\": \"new account\", \"seed\": \"blossom warfare trial oil essay six develop bless remember recipe wasp avoid\", \"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\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1579400238.4076705,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPfLMWqQPugfYqk2VbqyAav7taMiAdCUZVBf77qycF8dLQRYCdcZYfEnYn3wwp6WJiXATSf4i1zQPQeDAmhz9ayKfjGQH74aH\",\n \"public_key\": \"tpubD6NzVbkrYhZ4YoPJj44W65CxK41Y1JMVVRVMeECvckMt29MtUNRqK7xGbfyP4PU7giFaGg3k8cFikmVCYvmSwUmJCHQ7Wqoj7G8nM73L6CK\",\n \"seed\": \"blossom warfare trial oil essay six develop bless remember recipe wasp avoid\"\n }\n}"
}
]
},
@@ -401,9 +401,9 @@
},
{
"title": "Get balance for specific account by id",
"curl": "curl -d'{\"method\": \"account_balance\", \"params\": {\"account_id\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\"}}' http://localhost:5279/",
"lbrynet": "lbrynet account balance \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_balance\", \"params\": {\"account_id\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\"}}).json()",
"curl": "curl -d'{\"method\": \"account_balance\", \"params\": {\"account_id\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\"}}' http://localhost:5279/",
"lbrynet": "lbrynet account balance \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_balance\", \"params\": {\"account_id\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\"}}).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}"
}
]
@@ -438,7 +438,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\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1578100337.3588758,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPdnKS42LM2cpNdVGZzcBdnUDYgPE1FnJMQeYHfBeNem3Mvig22kHHcp7n4V6GLPu3NN2AB5B4jVW3so9pz8PVesPBhqGtyNW\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XFMDwfzwS2UVCWnW9wNYMmpKxuGJg46kF8o4HaTxqFfE6qjCCs9dqqVKwrGHFuRiZorsiJeL6diaQNGjVREQzwHDDmDRcHq\",\n \"seed\": \"crisp result shop endorse polar duck figure refuse forest cherry patient adult\"\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\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1579400238.2787437,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPfLMWqQPugfYqk2VbqyAav7taMiAdCUZVBf77qycF8dLQRYCdcZYfEnYn3wwp6WJiXATSf4i1zQPQeDAmhz9ayKfjGQH74aH\",\n \"public_key\": \"tpubD6NzVbkrYhZ4YoPJj44W65CxK41Y1JMVVRVMeECvckMt29MtUNRqK7xGbfyP4PU7giFaGg3k8cFikmVCYvmSwUmJCHQ7Wqoj7G8nM73L6CK\",\n \"seed\": \"blossom warfare trial oil essay six develop bless remember recipe wasp avoid\"\n }\n}"
}
]
},
@@ -493,24 +493,24 @@
"examples": [
{
"title": "Transfer 2 LBC from default account to specific account",
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"to_account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}' http://localhost:5279/",
"lbrynet": "lbrynet account fund --to_account=\"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\" --amount=2.0 --broadcast",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001fae81ffd71edd1fffa0ced713f6805cb3509a4fc3ab6dab9727e8bdc0a008b2c010000006b483045022100db45099bd6844ec2fbe177f52aae68691d62a2214594984434ceb709cffa8bd402201475e5b299669f675f66f9c74747ca89f69bf466a2bcb72ccb4e9e3a40ec269e012102e21b09fddf104abd95a09b5e2698bcb9b6f6309b8c6cbad7a03f492ef50501bcffffffff0200c2eb0b000000001976a914b083d5ba4e58ff5203a710510e14236f6cee550f88ac90d7ae2f000000001976a914699d461ab6d545bd8fa68aaad81987ced16f248488ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mgnRjwhDHYUFX1KYeDak6rsojzUBFQVCSb\",\n \"amount\": \"10.0\",\n \"confirmations\": 6,\n \"height\": 201,\n \"is_change\": false,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1578100368,\n \"txid\": \"2c8b000adc8b7e72b9dab63afca40935cb05683f71ed0cfaffd1ed71fd1fe8fa\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mwcH9s47UjtP7Nc1evDDS81XnKXB7vsiz8\",\n \"amount\": \"2.0\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"fab51b399e427816b9a9eb806aef897783af8e7016e1b00e4538202c49b56f1a\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mq9PemsqE69wHyzyTKNB7SQeaFzyr4ASHb\",\n \"amount\": \"7.999876\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"fab51b399e427816b9a9eb806aef897783af8e7016e1b00e4538202c49b56f1a\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000124\",\n \"total_input\": \"10.0\",\n \"total_output\": \"9.999876\",\n \"txid\": \"fab51b399e427816b9a9eb806aef897783af8e7016e1b00e4538202c49b56f1a\"\n }\n}"
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"to_account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}' http://localhost:5279/",
"lbrynet": "lbrynet account fund --to_account=\"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\" --amount=2.0 --broadcast",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"010000000132b8996b03c88232743ed37c9bd5ef57ef57892e42135d46f02f2ae95b341bda000000006b483045022100e401824a767f4cbad7329c6f1ad563bec85e002eebbf0d1b170e5924d3ab85a702202c2d06303dec4a65274f125f2aadba5307614392213dd79b77b9aae204730fbf0121036207aaaac5d1bcaf702f1d662cb1aa1d35b7796d74a0c3b0e45ff3c0abe8aa38ffffffff0200c2eb0b000000001976a91483bf0505a3da64584762ba81cb4612c1e57b89fa88ac90d7ae2f000000001976a914f4748e91a505e9b414274111b7753dda6dcf7d5f88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mkAjveCss25NmkHkokv9a43V868iuvSqcQ\",\n \"amount\": \"10.0\",\n \"confirmations\": 6,\n \"height\": 201,\n \"is_change\": false,\n \"is_mine\": true,\n \"nout\": 0,\n \"timestamp\": 1579400268,\n \"txid\": \"da1b345be92a2ff0465d13422e8957ef57efd59b7cd33e743282c8036b99b832\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"msXZeTbziXSNU1iSU2tvYkHGgHWtmN9LqV\",\n \"amount\": \"2.0\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"d783f059791a295f8835f32b68d9a680e5d64c15270265cc11db5e5730624d00\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"n3oWoNoXgKSWq8ksK8iXes7EkQNh9ZiYLb\",\n \"amount\": \"7.999876\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"d783f059791a295f8835f32b68d9a680e5d64c15270265cc11db5e5730624d00\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000124\",\n \"total_input\": \"10.0\",\n \"total_output\": \"9.999876\",\n \"txid\": \"d783f059791a295f8835f32b68d9a680e5d64c15270265cc11db5e5730624d00\"\n }\n}"
},
{
"title": "Spread LBC between multiple addresses",
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"to_account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\", \"from_account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}' http://localhost:5279/",
"lbrynet": "lbrynet account fund --to_account=\"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\" --from_account=\"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\" --amount=1.5 --outputs=2 --broadcast",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\", \"from_account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000011a6fb5492c2038450eb0e116708eaf837789ef6a80eba9b91678429e391bb5fa000000006a473044022047a73955537de3e5f1c3db9a44d9736bac0b8cdadc17cf6f9c38834e85a8df30022071ab067746a267ab9e013ce3935af56437e91f45c3b0022cab0561c3238feecf01210340bcbba8e0a028d0e4cd0658b63cd00303ff71fec8ba8f8965fe3e7cfa495466ffffffff03c0687804000000001976a9142bace3499514b0539b48e093c565787eefb7264f88acc0687804000000001976a9142bace3499514b0539b48e093c565787eefb7264f88ac6cb9fa02000000001976a9142bace3499514b0539b48e093c565787eefb7264f88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mwcH9s47UjtP7Nc1evDDS81XnKXB7vsiz8\",\n \"amount\": \"2.0\",\n \"confirmations\": 1,\n \"height\": 207,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 0,\n \"timestamp\": 1578100369,\n \"txid\": \"fab51b399e427816b9a9eb806aef897783af8e7016e1b00e4538202c49b56f1a\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mjVtTm4kGu9fYZBRRtSfL9busdQKo6Ho6j\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"f6e173d401840d75acb7a35ef65df0a094b5203366938e5ec81dd2d275c50ab5\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mjVtTm4kGu9fYZBRRtSfL9busdQKo6Ho6j\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"f6e173d401840d75acb7a35ef65df0a094b5203366938e5ec81dd2d275c50ab5\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mjVtTm4kGu9fYZBRRtSfL9busdQKo6Ho6j\",\n \"amount\": \"0.499859\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 2,\n \"timestamp\": null,\n \"txid\": \"f6e173d401840d75acb7a35ef65df0a094b5203366938e5ec81dd2d275c50ab5\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000141\",\n \"total_input\": \"2.0\",\n \"total_output\": \"1.999859\",\n \"txid\": \"f6e173d401840d75acb7a35ef65df0a094b5203366938e5ec81dd2d275c50ab5\"\n }\n}"
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"to_account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\", \"from_account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}' http://localhost:5279/",
"lbrynet": "lbrynet account fund --to_account=\"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\" --from_account=\"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\" --amount=1.5 --outputs=2 --broadcast",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\", \"from_account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001004d6230575edb11cc650227154cd6e580a6d9682bf335885f291a7959f083d7000000006a47304402205dc6e0ca05752fbc6a1417d7fbfe19d506565b1bf6454d5cf0956d372373e96b0220391150e2bd6c02230bf1b65298255bef91d0ffdf76362dc6ad44e214cfab37f001210262c4cb530de06e209b04a735d6a9378ce0400e2e7425764350498d418d1c4968ffffffff03c0687804000000001976a91483bf0505a3da64584762ba81cb4612c1e57b89fa88acc0687804000000001976a91483bf0505a3da64584762ba81cb4612c1e57b89fa88ac6cb9fa02000000001976a91494954a46cdbadfd282700522f5b4c4e0c4f2544b88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"msXZeTbziXSNU1iSU2tvYkHGgHWtmN9LqV\",\n \"amount\": \"2.0\",\n \"confirmations\": 1,\n \"height\": 207,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 0,\n \"timestamp\": 1579400269,\n \"txid\": \"d783f059791a295f8835f32b68d9a680e5d64c15270265cc11db5e5730624d00\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"msXZeTbziXSNU1iSU2tvYkHGgHWtmN9LqV\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"676bdd03fc4057753edc98df6c1221401ea70ed0c84aa11616de6275dcbf4072\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"msXZeTbziXSNU1iSU2tvYkHGgHWtmN9LqV\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"676bdd03fc4057753edc98df6c1221401ea70ed0c84aa11616de6275dcbf4072\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mu4b9JhJBCaDmdkpSmQURFvhbYy9uUmnr9\",\n \"amount\": \"0.499859\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 2,\n \"timestamp\": null,\n \"txid\": \"676bdd03fc4057753edc98df6c1221401ea70ed0c84aa11616de6275dcbf4072\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000141\",\n \"total_input\": \"2.0\",\n \"total_output\": \"1.999859\",\n \"txid\": \"676bdd03fc4057753edc98df6c1221401ea70ed0c84aa11616de6275dcbf4072\"\n }\n}"
},
{
"title": "Transfer all LBC to a specified account",
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"from_account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\", \"everything\": true, \"broadcast\": true}}' http://localhost:5279/",
"lbrynet": "lbrynet account fund --from_account=\"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\" --everything --broadcast",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"from_account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\", \"everything\": true, \"broadcast\": true}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000003b50ac575d2d21dc85e8e93663320b594a0f05df65ea3b7ac750d8401d473e1f6000000006b483045022100d75863f53112e8019009a3170358ebcfae2f090ef66fde33603c34333052bd2b02204a2f2bae69756e00bd9d6b2162be63d634d27c90c5032e2f2c068569e6af1d7c012103db8496bdae55127421bd4c603a27a48f3e124634f0a78feba79e9713d8751d51ffffffffb50ac575d2d21dc85e8e93663320b594a0f05df65ea3b7ac750d8401d473e1f6010000006b483045022100e964a231ff8930c691e638188f31c861ea7e0c9de314e1178d745343141204b7022077aa8545ad0d6b078605bcc41b01377a39e6c32df40e27978ff9a3621e33b0da012103db8496bdae55127421bd4c603a27a48f3e124634f0a78feba79e9713d8751d51ffffffffb50ac575d2d21dc85e8e93663320b594a0f05df65ea3b7ac750d8401d473e1f6020000006b483045022100dbae65a07a75e0e71dd1a6ba11850dcd98eb868c603fba6861a573e2048a89a90220314e2bd84be73cd43797f55180b059511e5385d596b3b21faed2dd96878dfa3b012103db8496bdae55127421bd4c603a27a48f3e124634f0a78feba79e9713d8751d51ffffffff015027eb0b000000001976a9146e03ff57f1683632414efa4dc9f8618051d17b2988ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mjVtTm4kGu9fYZBRRtSfL9busdQKo6Ho6j\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 0,\n \"timestamp\": 1578100369,\n \"txid\": \"f6e173d401840d75acb7a35ef65df0a094b5203366938e5ec81dd2d275c50ab5\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mjVtTm4kGu9fYZBRRtSfL9busdQKo6Ho6j\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1578100369,\n \"txid\": \"f6e173d401840d75acb7a35ef65df0a094b5203366938e5ec81dd2d275c50ab5\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mjVtTm4kGu9fYZBRRtSfL9busdQKo6Ho6j\",\n \"amount\": \"0.499859\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 2,\n \"timestamp\": 1578100369,\n \"txid\": \"f6e173d401840d75acb7a35ef65df0a094b5203366938e5ec81dd2d275c50ab5\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mqYfQuGoVMqbcsjHk1WpmewZ9xKqWjyQQE\",\n \"amount\": \"1.999604\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"5b1f6b704c3f42fef8b00ff1f18a74c04d321dd52430740df2cc46ca6756d329\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000255\",\n \"total_input\": \"1.999859\",\n \"total_output\": \"1.999604\",\n \"txid\": \"5b1f6b704c3f42fef8b00ff1f18a74c04d321dd52430740df2cc46ca6756d329\"\n }\n}"
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"from_account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\", \"everything\": true, \"broadcast\": true}}' http://localhost:5279/",
"lbrynet": "lbrynet account fund --from_account=\"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\" --everything --broadcast",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"from_account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\", \"everything\": true, \"broadcast\": true}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000037240bfdc7562de1616a14ac8d00ea71e4021126cdf98dc3e755740fc03dd6b67000000006b483045022100ed59201d80743f92e275fdb41099b2db1b25577bd6e8e2bdde6712f37560bcfe02206664ef1be775a1a5c293c05d9c1549c88577cf5e7c6aeb088ea70fdcae98792d01210262c4cb530de06e209b04a735d6a9378ce0400e2e7425764350498d418d1c4968ffffffff7240bfdc7562de1616a14ac8d00ea71e4021126cdf98dc3e755740fc03dd6b67010000006b48304502210097df72fdc6f40bb4b119baba6d6232065aa86e06082a7d84776eb442e8847f720220483c841aaed85c5e063e59885bf65891dae92561c47d68147096c4d534a275d201210262c4cb530de06e209b04a735d6a9378ce0400e2e7425764350498d418d1c4968ffffffff7240bfdc7562de1616a14ac8d00ea71e4021126cdf98dc3e755740fc03dd6b67020000006b483045022100cdafc9dd334b238845fdbbec3f1e90f18f608cff017fc2ae1df569f8d9ff744c022032459996bfe81fdc20e89fe59bb82131c52d77f6fe3ddd791665c9aaea807a28012102827e9ee79680f998b2072aac822e794621ab77994880c0f811215aa7556c3796ffffffff015027eb0b000000001976a914291cb899cee628ed4076d8aff8c17e3b9ff8685e88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"msXZeTbziXSNU1iSU2tvYkHGgHWtmN9LqV\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 0,\n \"timestamp\": 1579400269,\n \"txid\": \"676bdd03fc4057753edc98df6c1221401ea70ed0c84aa11616de6275dcbf4072\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"msXZeTbziXSNU1iSU2tvYkHGgHWtmN9LqV\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1579400269,\n \"txid\": \"676bdd03fc4057753edc98df6c1221401ea70ed0c84aa11616de6275dcbf4072\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mu4b9JhJBCaDmdkpSmQURFvhbYy9uUmnr9\",\n \"amount\": \"0.499859\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 2,\n \"timestamp\": 1579400269,\n \"txid\": \"676bdd03fc4057753edc98df6c1221401ea70ed0c84aa11616de6275dcbf4072\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mjGLQViMN89giFBMxP4E8VAMUcbxyjywk7\",\n \"amount\": \"1.999604\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"e356d9edcef5b1f9dc1620d7c703f13a4046b49e3ffc4e924778b1ac6600b3fe\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000255\",\n \"total_input\": \"1.999859\",\n \"total_output\": \"1.999604\",\n \"txid\": \"e356d9edcef5b1f9dc1620d7c703f13a4046b49e3ffc4e924778b1ac6600b3fe\"\n }\n}"
}
]
},
@@ -568,7 +568,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\": \"msR2Dh8sqsjhHbFRWydSVoKrZrUvF5V5ny\",\n \"is_default\": true,\n \"ledger\": \"lbc_regtest\",\n \"name\": \"Account #msR2Dh8sqsjhHbFRWydSVoKrZrUvF5V5ny\",\n \"public_key\": \"tpubD6NzVbkrYhZ4YHvi5JKNRX6PikdKUPF4E3AUP2FRoR3NVPhZbEbYaa4RhvKYLotvyoGuBVwJq5faqL7n9rGxo2adKQscsfFDxX6N8LCA4Gi\",\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\": \"mtoi8LVg42arZktjQKe9Kjkn3hB5RfQjtR\",\n \"is_default\": true,\n \"ledger\": \"lbc_regtest\",\n \"name\": \"Account #mtoi8LVg42arZktjQKe9Kjkn3hB5RfQjtR\",\n \"public_key\": \"tpubD6NzVbkrYhZ4WZzDVYzTURW6cCCz7UcQh8zCz2gLc3eif8LciP36qBtz1nyWjKm5qL5zQbFwTT6GoFBDy84fqiyVt6BDDr17s51vLbF9sAk\",\n \"satoshis\": 1000000000\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}"
}
]
},
@@ -613,10 +613,10 @@
"examples": [
{
"title": "Remove an account",
"curl": "curl -d'{\"method\": \"account_remove\", \"params\": {\"account_id\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\"}}' http://localhost:5279/",
"lbrynet": "lbrynet account remove mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_remove\", \"params\": {\"account_id\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\"}}).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\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1578100337.3588758,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPdnKS42LM2cpNdVGZzcBdnUDYgPE1FnJMQeYHfBeNem3Mvig22kHHcp7n4V6GLPu3NN2AB5B4jVW3so9pz8PVesPBhqGtyNW\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XFMDwfzwS2UVCWnW9wNYMmpKxuGJg46kF8o4HaTxqFfE6qjCCs9dqqVKwrGHFuRiZorsiJeL6diaQNGjVREQzwHDDmDRcHq\",\n \"seed\": \"crisp result shop endorse polar duck figure refuse forest cherry patient adult\"\n }\n}"
"curl": "curl -d'{\"method\": \"account_remove\", \"params\": {\"account_id\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\"}}' http://localhost:5279/",
"lbrynet": "lbrynet account remove mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_remove\", \"params\": {\"account_id\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\"}}).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\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1579400238.2787437,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPfLMWqQPugfYqk2VbqyAav7taMiAdCUZVBf77qycF8dLQRYCdcZYfEnYn3wwp6WJiXATSf4i1zQPQeDAmhz9ayKfjGQH74aH\",\n \"public_key\": \"tpubD6NzVbkrYhZ4YoPJj44W65CxK41Y1JMVVRVMeECvckMt29MtUNRqK7xGbfyP4PU7giFaGg3k8cFikmVCYvmSwUmJCHQ7Wqoj7G8nM73L6CK\",\n \"seed\": \"blossom warfare trial oil essay six develop bless remember recipe wasp avoid\"\n }\n}"
}
]
},
@@ -703,10 +703,10 @@
"examples": [
{
"title": "Modify maximum number of times a change address can be reused",
"curl": "curl -d'{\"method\": \"account_set\", \"params\": {\"account_id\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\", \"default\": false, \"change_max_uses\": 10}}' http://localhost:5279/",
"lbrynet": "lbrynet account set mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE --change_max_uses=10",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_set\", \"params\": {\"account_id\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\", \"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\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1578100337.763172,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPdnKS42LM2cpNdVGZzcBdnUDYgPE1FnJMQeYHfBeNem3Mvig22kHHcp7n4V6GLPu3NN2AB5B4jVW3so9pz8PVesPBhqGtyNW\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XFMDwfzwS2UVCWnW9wNYMmpKxuGJg46kF8o4HaTxqFfE6qjCCs9dqqVKwrGHFuRiZorsiJeL6diaQNGjVREQzwHDDmDRcHq\",\n \"seed\": \"crisp result shop endorse polar duck figure refuse forest cherry patient adult\"\n }\n}"
"curl": "curl -d'{\"method\": \"account_set\", \"params\": {\"account_id\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\", \"default\": false, \"change_max_uses\": 10}}' http://localhost:5279/",
"lbrynet": "lbrynet account set mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT --change_max_uses=10",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_set\", \"params\": {\"account_id\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\", \"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\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1579400238.461284,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPfLMWqQPugfYqk2VbqyAav7taMiAdCUZVBf77qycF8dLQRYCdcZYfEnYn3wwp6WJiXATSf4i1zQPQeDAmhz9ayKfjGQH74aH\",\n \"public_key\": \"tpubD6NzVbkrYhZ4YoPJj44W65CxK41Y1JMVVRVMeECvckMt29MtUNRqK7xGbfyP4PU7giFaGg3k8cFikmVCYvmSwUmJCHQ7Wqoj7G8nM73L6CK\",\n \"seed\": \"blossom warfare trial oil essay six develop bless remember recipe wasp avoid\"\n }\n}"
}
]
}
@@ -742,9 +742,9 @@
"examples": [
{
"title": "Check if address is mine",
"curl": "curl -d'{\"method\": \"address_is_mine\", \"params\": {\"address\": \"mqsQmxDUKHRr4CXwZ3s3GryGvNqKaikYap\"}}' http://localhost:5279/",
"lbrynet": "lbrynet address is_mine mqsQmxDUKHRr4CXwZ3s3GryGvNqKaikYap",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_is_mine\", \"params\": {\"address\": \"mqsQmxDUKHRr4CXwZ3s3GryGvNqKaikYap\"}}).json()",
"curl": "curl -d'{\"method\": \"address_is_mine\", \"params\": {\"address\": \"mqMjLadUVYcKcoUD6bDjtymz3mw5o85a9f\"}}' http://localhost:5279/",
"lbrynet": "lbrynet address is_mine mqMjLadUVYcKcoUD6bDjtymz3mw5o85a9f",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_is_mine\", \"params\": {\"address\": \"mqMjLadUVYcKcoUD6bDjtymz3mw5o85a9f\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": true\n}"
}
]
@@ -791,14 +791,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\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mhRoAy2fFzHoYrDc7ECWfyPoQM87cjtmAC\",\n \"pubkey\": \"tpubDA9GDAntyJu4RSTwRGyaq6iWXT9v5KQeVqwi91LMqr2CgNsZY5KBQvfNUrJHceSzHsjAyezcDo35QnRghr8YJ7zTs4iTtYhrNxDaEkQxwnx\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mi36cwEEEMAmDj9DWJC9r8o38VtyaciSq9\",\n \"pubkey\": \"tpubDA9GDAntyJu51jEeFwEjqyFk1PYc8uAEBG2LWpwVdRhYM7J9WzRkwn93J6xL8qYr9kQmYPs6qyKavdbqD6NpagAeKM6WXJthpfwjwBbfg3h\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"miRscPmNBiyhHSJhZNzeGypv7Zt2cDKMgo\",\n \"pubkey\": \"tpubDA9GDAntyJu4PnisuVk9ZUSrWEGAYF3hVhtdZD9ZrwfAV4c8E2xWGQjb2am3JBaXVsDAFeXtzEu33bkcSbHB8sHvjuHLz2y3edwFgisyG7X\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"midCaeVPj2m75g4RYmzjpH3cSotrCAEnDT\",\n \"pubkey\": \"tpubDA9GDAntyJu4LVt2DfgdFTREquiXLmnRnDJEWgLEcY5G3KSZA3Ntd48G2B8LaquNfsdAECZFn75V65dnhiDhUsuY5SVHMwgAnBU5pMC5oNh\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mjVtTm4kGu9fYZBRRtSfL9busdQKo6Ho6j\",\n \"pubkey\": \"tpubDA9GDAntyJu4UpXp4njwPJnhkSd9NEXigbcTv6QWY5nEeACFxk5LuCDwVMxvxMBYvcscSqcpTriChL8JFu5HapMoBWUDbd33cs2or5eRcEt\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mjbTR1JdEBHVuo2Au9pNkJQihEKTpGeae8\",\n \"pubkey\": \"tpubDA9GDAntyJu4JbSJCE9uwH7FaschXG9yxRAwRpZJig7txtfNPp44UBs1tfBKrRC4DG8VurobWAFNWcvsff6cKnkbJn6g35Gu553FewtUh5s\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mkSKqHK2es9rVEtWWpdNDQrpGYMeNXcHRn\",\n \"pubkey\": \"tpubDA9GDAntyJu4K93MC1bJq1Fyq8u7fEMsWXGqWVFt78of92Yu98KaH6xHrZWjPYebA7Rw4GiJRQJuUsjR7yMHU6CsoR75Kpgx84CT5rAVBwh\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mkgrmBXBs3fvHiorrfq3RhJuEKfJdWo3Zo\",\n \"pubkey\": \"tpubDA9GDAntyJu4heotibNLewZPRaroUbgrU67TctTtHuguH51N4um2m9RxdgjKe12zW9zVCSuL24FNakgqk21YwkLsoc87jRHFr7zyRLct3A6\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mkzZjeBq2DyBDGAU3WC4DtgHJ9cWt3R3am\",\n \"pubkey\": \"tpubDA9GDAntyJu4iNuKNPPjGrUuGtiDJiP2tfTUVpozKzU4nQXqPkdNSjV6LzetyGqQSeBiPRfziYj6NiYs4BTto6gtoJjRLmxpyHrc2vQ8MqE\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mm9wuEStZy1YncckjJ7ZR8XFrtjZ8xSuyv\",\n \"pubkey\": \"tpubDA9GDAntyJu4ExVTPY2WDrNE28ZtdUs2j6xbQGSyv9vay45ucvdU8Bd3R9RcGz6cagojV8e2GoaBtJNnX9xHLTZEGUnJ5iSv2knq3C5QFLR\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mpFmiaUgLTV9wn2g5GCfw7mjHbMCrzRxWr\",\n \"pubkey\": \"tpubDA9GDAntyJu4fLfrnYLLFenQNjpc7V49voZyZw3Yj8K5ccfHsvwAxs6RXxqM8ETHLcKiZaEa4W5p9ovZgwanx7EmpZSTu9ZgSsTdZZZ7g7Q\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mpVpnkVofTBHjBPqd4rF3SJZB8ybipqx2m\",\n \"pubkey\": \"tpubDA9GDAntyJu4Vkbkrsdd21MX4pwdkJhXirzy3QwaEi8BEBfmLdHsaimAKVDhdJbX2kFW2tyXBpJysuT58ZPQsfwb8jB4SHb2JNY9m5qCjxW\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mpoqPCBm3NbKrzd7PSgfoBJ9bPES1spRUS\",\n \"pubkey\": \"tpubDA9GDAntyJu4Xuj1v5SSgUFtZmbugFmjwUqn784e77f5Y8XTgcKN3FzFXqwvUPGjFMf3nVm1GnWQKbXWotAWemNR5zmxq78DGuo5Qe2XFJ1\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mqoi2fGDiramGu6AZCqdtGqwnUVn1cJAzT\",\n \"pubkey\": \"tpubDA9GDAntyJu4tJeJtyFz9JCcE4jjgfstYa4pTjryTrpVCmR9A1uEnDaBLudszsjQpmmWF5j7n8XAsLS5vF2AQZgtPgeutXVry1W6VvQwjWT\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mtsgHJjDhNxW4ndpwLFbDVrCPTRkPWZrUz\",\n \"pubkey\": \"tpubDA9GDAntyJu4No4Vi6syGUn1X1iMJg87HokQE4UnLMome3X9P8t6GqDWnFLv8TuuR8rFXE4wBJXoBVwPJQrY6nCT6BQwBhU95od6qaY2EVo\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"muXjWrfZvZ2BFzH2Hr9bL3RjBXFPhw43yd\",\n \"pubkey\": \"tpubDA9GDAntyJu5555z1VeGnNsG15XCAFfau3Qf3gAzEB8nLtLY9iN2hh4F6h17tGucn9SmHSbkJiVzQWvJZ5cZdkFUvTndk7yzfjvuzaT5Hoo\",\n \"Line truncated
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mhBD332VegShAorKpxukWrEWmbUzfdzDhS\",\n \"pubkey\": \"tpubDA9GDAntyJu55PTWeX41jxL6f4ZW1EGTUiYjcfXbpbpz2GBPp6Yi2x1FVA2d12KnUPDYuKPUWGw1Dh9ZntinTb8D7ZUFAKCKyN93Hdqvqms\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"miwwrn6FK5FY6sQbDcU7YNcd6oTHtwJvQH\",\n \"pubkey\": \"tpubDA9GDAntyJu52wuCcgVYDVds4DcRGs71e2TH4k5yfFudwwjq5439ojn1o24jDtew9AggW7TUcF34NT54mPeZEZazy4bWQYwtf5GEgY3V2SQ\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mjwdqgZ3k5cTKLzzqj6jeKHWbPpauWrBwv\",\n \"pubkey\": \"tpubDA9GDAntyJu4NL6PR5ZY1orKdmJJmQUb16RH2pvPhrxbqyEzVvAT3MSQn7LinV1VonLQBGhckU6eeELehxpGb12aLscaiUuY1soB38Zq84t\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mmE9RDU2T1HD9oX9SNVoQA7vD3A359qkRR\",\n \"pubkey\": \"tpubDA9GDAntyJu4SnoQ8QZEPs9SAKh1qkuJ2j6iStdRTpr6LwARWVfwdve4y6DyyCcBKTpotUPGypdiiw1PSJuTBNbApaq2SZGHsU7td35AyPQ\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mn8QjQsVrYXU8zYorX95cYPwa79Z7uNxq1\",\n \"pubkey\": \"tpubDA9GDAntyJu4qb6PvTo3wt3dQYE46LJM3czxuhSgrzst8LGSrux8NxHNeEMgxCHXnPyruimAw5Yp1tuS3nyRUUowEfPjKrCWmBE3jSuyrac\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"moKAJoi8inN2KjDeqJZcyqzPWotVbUHuVe\",\n \"pubkey\": \"tpubDA9GDAntyJu4fu7FweQwbXz15syBjxW3Qmnyyt8wjWPgoLPpe7Kx76Z2yVb6nwMXE3vVvYJTYyrL9BePyiUxK4s56fP6W7HCq8F8qPcr2Ae\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mpSC61mQBsRYVx57wvwRf7TJ3SR1uf4YJk\",\n \"pubkey\": \"tpubDA9GDAntyJu4RgxjLgKhVanz5KdQy2kGJhLkP62Qhu2ToZSV4u6m1fwkdTNve8ideaEix1rKFVnenUKGUL3iTZpixHH8bsAAE1CutJFhupm\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mpSdwtjqtiSix4WPWPDmEQWyd9ND54dcXn\",\n \"pubkey\": \"tpubDA9GDAntyJu4H2jN5FGPJdo2NKGHnNcoZfACWe2goMeKwy69UB7J3FpMhCDffHSXuHhVG8gJrf8Qm6cAcimhwmFN18oWF8ZE1h7s6SeNUYW\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mqyx9wR5hV4h7eg8731X1XxTTq9GhXzo8E\",\n \"pubkey\": \"tpubDA9GDAntyJu4vyXxpCj5dtueXk7vY1bD3jPdpAnDDrPDQWCmT92ATZxCJCZNnxD77JgwamFvLHzRVbqMVdny4dSunNKntVSwig81XsZ9MA7\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mrW3GqozotWt25hEfnQCnwRCgAEgnqVVUa\",\n \"pubkey\": \"tpubDA9GDAntyJu4o5HeVMXjD64V8bJRU9VsHfRkoCigJsUjW4SunbFmtifvLazZKPDcfmoWgz6kR3NHpE1yXZozQU65MmK1HPS9Zd8fwCzGY3V\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"msXZeTbziXSNU1iSU2tvYkHGgHWtmN9LqV\",\n \"pubkey\": \"tpubDA9GDAntyJu4ExrVLbVAKrFQE46Fg5bcHtLRuYeHi7WEvTzVfwUmmHzhQ79HC45h9uKPLmWN7Y5SRzi31kxonKpDtxyLcUQjSYLXSgMdx1M\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mskMFx1gcztwp3GVX4pQhpebSQHxUSWbg9\",\n \"pubkey\": \"tpubDA9GDAntyJu4JciDnjGGkpLCzn3M11GZ6uW9ipEaMHM5nsDeAkoW8yLaBc4tHVhQKP7GMoNp2ySnbwKsezXC39hLcGTyMWXibYcNWPcvv6d\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mtCpZhdUga64KZxcie9UzJGRBhLY99pB6s\",\n \"pubkey\": \"tpubDA9GDAntyJu4uNESG5uscZXCCNwqF3tJWw7VgABooB4VQ6SSszVbLBNbXTbhFdDoZEe9UHuLScKzjMU6X8FjvuL4iumBpDqA6nTxJheMQwa\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mtX3UmbqJQ8wNShAjKNDMd1dvrzh3tHitR\",\n \"pubkey\": \"tpubDA9GDAntyJu4zsgAwf58DXNW9uajnXp6hNDExgWKEwFSg7vTf1UkWsfXmamCSH6PBc2h4mcznVY5dLnGpwV1d8fhdGoUX6dUvaSYT2GycGo\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mu4b9JhJBCaDmdkpSmQURFvhbYy9uUmnr9\",\n \"pubkey\": \"tpubDA9GDAntyJu4Kin1srBhnMwUZ9bMrUXvKBudKxkeumaCDe9JzbBy7oHZVDArCHhpcy67tweE8LMNhYxQYShZ6PqefMSMF4hQGWFUeAi9D88\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mv4KUj3getjB1DwQ2GxP3ncVox9T3h5wDj\",\n \"pubkey\": \"tpubDA9GDAntyJu4YPg9jamaGsUjnf5KBpfvrRqtYVfAV6iqJg1zbF96ixnBV4E3ynvgYZgRf7GzKeTZ4BfPWGXWY1tUCk4Q2rMogze7UG3vcZu\",\n \"Line truncated
},
{
"title": "List addresses in specified account",
"curl": "curl -d'{\"method\": \"address_list\", \"params\": {\"account_id\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\"}}' http://localhost:5279/",
"lbrynet": "lbrynet address list --account_id=\"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_list\", \"params\": {\"account_id\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mhRoAy2fFzHoYrDc7ECWfyPoQM87cjtmAC\",\n \"pubkey\": \"tpubDA9GDAntyJu4RSTwRGyaq6iWXT9v5KQeVqwi91LMqr2CgNsZY5KBQvfNUrJHceSzHsjAyezcDo35QnRghr8YJ7zTs4iTtYhrNxDaEkQxwnx\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mi36cwEEEMAmDj9DWJC9r8o38VtyaciSq9\",\n \"pubkey\": \"tpubDA9GDAntyJu51jEeFwEjqyFk1PYc8uAEBG2LWpwVdRhYM7J9WzRkwn93J6xL8qYr9kQmYPs6qyKavdbqD6NpagAeKM6WXJthpfwjwBbfg3h\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"miRscPmNBiyhHSJhZNzeGypv7Zt2cDKMgo\",\n \"pubkey\": \"tpubDA9GDAntyJu4PnisuVk9ZUSrWEGAYF3hVhtdZD9ZrwfAV4c8E2xWGQjb2am3JBaXVsDAFeXtzEu33bkcSbHB8sHvjuHLz2y3edwFgisyG7X\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"midCaeVPj2m75g4RYmzjpH3cSotrCAEnDT\",\n \"pubkey\": \"tpubDA9GDAntyJu4LVt2DfgdFTREquiXLmnRnDJEWgLEcY5G3KSZA3Ntd48G2B8LaquNfsdAECZFn75V65dnhiDhUsuY5SVHMwgAnBU5pMC5oNh\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mjVtTm4kGu9fYZBRRtSfL9busdQKo6Ho6j\",\n \"pubkey\": \"tpubDA9GDAntyJu4UpXp4njwPJnhkSd9NEXigbcTv6QWY5nEeACFxk5LuCDwVMxvxMBYvcscSqcpTriChL8JFu5HapMoBWUDbd33cs2or5eRcEt\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mjbTR1JdEBHVuo2Au9pNkJQihEKTpGeae8\",\n \"pubkey\": \"tpubDA9GDAntyJu4JbSJCE9uwH7FaschXG9yxRAwRpZJig7txtfNPp44UBs1tfBKrRC4DG8VurobWAFNWcvsff6cKnkbJn6g35Gu553FewtUh5s\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mkSKqHK2es9rVEtWWpdNDQrpGYMeNXcHRn\",\n \"pubkey\": \"tpubDA9GDAntyJu4K93MC1bJq1Fyq8u7fEMsWXGqWVFt78of92Yu98KaH6xHrZWjPYebA7Rw4GiJRQJuUsjR7yMHU6CsoR75Kpgx84CT5rAVBwh\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mkgrmBXBs3fvHiorrfq3RhJuEKfJdWo3Zo\",\n \"pubkey\": \"tpubDA9GDAntyJu4heotibNLewZPRaroUbgrU67TctTtHuguH51N4um2m9RxdgjKe12zW9zVCSuL24FNakgqk21YwkLsoc87jRHFr7zyRLct3A6\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mkzZjeBq2DyBDGAU3WC4DtgHJ9cWt3R3am\",\n \"pubkey\": \"tpubDA9GDAntyJu4iNuKNPPjGrUuGtiDJiP2tfTUVpozKzU4nQXqPkdNSjV6LzetyGqQSeBiPRfziYj6NiYs4BTto6gtoJjRLmxpyHrc2vQ8MqE\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mm9wuEStZy1YncckjJ7ZR8XFrtjZ8xSuyv\",\n \"pubkey\": \"tpubDA9GDAntyJu4ExVTPY2WDrNE28ZtdUs2j6xbQGSyv9vay45ucvdU8Bd3R9RcGz6cagojV8e2GoaBtJNnX9xHLTZEGUnJ5iSv2knq3C5QFLR\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mpFmiaUgLTV9wn2g5GCfw7mjHbMCrzRxWr\",\n \"pubkey\": \"tpubDA9GDAntyJu4fLfrnYLLFenQNjpc7V49voZyZw3Yj8K5ccfHsvwAxs6RXxqM8ETHLcKiZaEa4W5p9ovZgwanx7EmpZSTu9ZgSsTdZZZ7g7Q\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mpVpnkVofTBHjBPqd4rF3SJZB8ybipqx2m\",\n \"pubkey\": \"tpubDA9GDAntyJu4Vkbkrsdd21MX4pwdkJhXirzy3QwaEi8BEBfmLdHsaimAKVDhdJbX2kFW2tyXBpJysuT58ZPQsfwb8jB4SHb2JNY9m5qCjxW\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mpoqPCBm3NbKrzd7PSgfoBJ9bPES1spRUS\",\n \"pubkey\": \"tpubDA9GDAntyJu4Xuj1v5SSgUFtZmbugFmjwUqn784e77f5Y8XTgcKN3FzFXqwvUPGjFMf3nVm1GnWQKbXWotAWemNR5zmxq78DGuo5Qe2XFJ1\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mqoi2fGDiramGu6AZCqdtGqwnUVn1cJAzT\",\n \"pubkey\": \"tpubDA9GDAntyJu4tJeJtyFz9JCcE4jjgfstYa4pTjryTrpVCmR9A1uEnDaBLudszsjQpmmWF5j7n8XAsLS5vF2AQZgtPgeutXVry1W6VvQwjWT\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"mtsgHJjDhNxW4ndpwLFbDVrCPTRkPWZrUz\",\n \"pubkey\": \"tpubDA9GDAntyJu4No4Vi6syGUn1X1iMJg87HokQE4UnLMome3X9P8t6GqDWnFLv8TuuR8rFXE4wBJXoBVwPJQrY6nCT6BQwBhU95od6qaY2EVo\",\n \"used_times\": 0\n },\n {\n \"account\": \"mnVHmjfWZm6m13QiZTVRtpyo8NSM5vdaSE\",\n \"address\": \"muXjWrfZvZ2BFzH2Hr9bL3RjBXFPhw43yd\",\n \"pubkey\": \"tpubDA9GDAntyJu5555z1VeGnNsG15XCAFfau3Qf3gAzEB8nLtLY9iN2hh4F6h17tGucn9SmHSbkJiVzQWvJZ5cZdkFUvTndk7yzfjvuzaT5Hoo\",\n \"Line truncated
"curl": "curl -d'{\"method\": \"address_list\", \"params\": {\"account_id\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\"}}' http://localhost:5279/",
"lbrynet": "lbrynet address list --account_id=\"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_list\", \"params\": {\"account_id\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mhBD332VegShAorKpxukWrEWmbUzfdzDhS\",\n \"pubkey\": \"tpubDA9GDAntyJu55PTWeX41jxL6f4ZW1EGTUiYjcfXbpbpz2GBPp6Yi2x1FVA2d12KnUPDYuKPUWGw1Dh9ZntinTb8D7ZUFAKCKyN93Hdqvqms\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"miwwrn6FK5FY6sQbDcU7YNcd6oTHtwJvQH\",\n \"pubkey\": \"tpubDA9GDAntyJu52wuCcgVYDVds4DcRGs71e2TH4k5yfFudwwjq5439ojn1o24jDtew9AggW7TUcF34NT54mPeZEZazy4bWQYwtf5GEgY3V2SQ\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mjwdqgZ3k5cTKLzzqj6jeKHWbPpauWrBwv\",\n \"pubkey\": \"tpubDA9GDAntyJu4NL6PR5ZY1orKdmJJmQUb16RH2pvPhrxbqyEzVvAT3MSQn7LinV1VonLQBGhckU6eeELehxpGb12aLscaiUuY1soB38Zq84t\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mmE9RDU2T1HD9oX9SNVoQA7vD3A359qkRR\",\n \"pubkey\": \"tpubDA9GDAntyJu4SnoQ8QZEPs9SAKh1qkuJ2j6iStdRTpr6LwARWVfwdve4y6DyyCcBKTpotUPGypdiiw1PSJuTBNbApaq2SZGHsU7td35AyPQ\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mn8QjQsVrYXU8zYorX95cYPwa79Z7uNxq1\",\n \"pubkey\": \"tpubDA9GDAntyJu4qb6PvTo3wt3dQYE46LJM3czxuhSgrzst8LGSrux8NxHNeEMgxCHXnPyruimAw5Yp1tuS3nyRUUowEfPjKrCWmBE3jSuyrac\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"moKAJoi8inN2KjDeqJZcyqzPWotVbUHuVe\",\n \"pubkey\": \"tpubDA9GDAntyJu4fu7FweQwbXz15syBjxW3Qmnyyt8wjWPgoLPpe7Kx76Z2yVb6nwMXE3vVvYJTYyrL9BePyiUxK4s56fP6W7HCq8F8qPcr2Ae\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mpSC61mQBsRYVx57wvwRf7TJ3SR1uf4YJk\",\n \"pubkey\": \"tpubDA9GDAntyJu4RgxjLgKhVanz5KdQy2kGJhLkP62Qhu2ToZSV4u6m1fwkdTNve8ideaEix1rKFVnenUKGUL3iTZpixHH8bsAAE1CutJFhupm\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mpSdwtjqtiSix4WPWPDmEQWyd9ND54dcXn\",\n \"pubkey\": \"tpubDA9GDAntyJu4H2jN5FGPJdo2NKGHnNcoZfACWe2goMeKwy69UB7J3FpMhCDffHSXuHhVG8gJrf8Qm6cAcimhwmFN18oWF8ZE1h7s6SeNUYW\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mqyx9wR5hV4h7eg8731X1XxTTq9GhXzo8E\",\n \"pubkey\": \"tpubDA9GDAntyJu4vyXxpCj5dtueXk7vY1bD3jPdpAnDDrPDQWCmT92ATZxCJCZNnxD77JgwamFvLHzRVbqMVdny4dSunNKntVSwig81XsZ9MA7\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mrW3GqozotWt25hEfnQCnwRCgAEgnqVVUa\",\n \"pubkey\": \"tpubDA9GDAntyJu4o5HeVMXjD64V8bJRU9VsHfRkoCigJsUjW4SunbFmtifvLazZKPDcfmoWgz6kR3NHpE1yXZozQU65MmK1HPS9Zd8fwCzGY3V\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"msXZeTbziXSNU1iSU2tvYkHGgHWtmN9LqV\",\n \"pubkey\": \"tpubDA9GDAntyJu4ExrVLbVAKrFQE46Fg5bcHtLRuYeHi7WEvTzVfwUmmHzhQ79HC45h9uKPLmWN7Y5SRzi31kxonKpDtxyLcUQjSYLXSgMdx1M\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mskMFx1gcztwp3GVX4pQhpebSQHxUSWbg9\",\n \"pubkey\": \"tpubDA9GDAntyJu4JciDnjGGkpLCzn3M11GZ6uW9ipEaMHM5nsDeAkoW8yLaBc4tHVhQKP7GMoNp2ySnbwKsezXC39hLcGTyMWXibYcNWPcvv6d\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mtCpZhdUga64KZxcie9UzJGRBhLY99pB6s\",\n \"pubkey\": \"tpubDA9GDAntyJu4uNESG5uscZXCCNwqF3tJWw7VgABooB4VQ6SSszVbLBNbXTbhFdDoZEe9UHuLScKzjMU6X8FjvuL4iumBpDqA6nTxJheMQwa\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mtX3UmbqJQ8wNShAjKNDMd1dvrzh3tHitR\",\n \"pubkey\": \"tpubDA9GDAntyJu4zsgAwf58DXNW9uajnXp6hNDExgWKEwFSg7vTf1UkWsfXmamCSH6PBc2h4mcznVY5dLnGpwV1d8fhdGoUX6dUvaSYT2GycGo\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mu4b9JhJBCaDmdkpSmQURFvhbYy9uUmnr9\",\n \"pubkey\": \"tpubDA9GDAntyJu4Kin1srBhnMwUZ9bMrUXvKBudKxkeumaCDe9JzbBy7oHZVDArCHhpcy67tweE8LMNhYxQYShZ6PqefMSMF4hQGWFUeAi9D88\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgfeXcmpqs1EQkuxsAzKFwXWTk15F9hDpT\",\n \"address\": \"mv4KUj3getjB1DwQ2GxP3ncVox9T3h5wDj\",\n \"pubkey\": \"tpubDA9GDAntyJu4YPg9jamaGsUjnf5KBpfvrRqtYVfAV6iqJg1zbF96ixnBV4E3ynvgYZgRf7GzKeTZ4BfPWGXWY1tUCk4Q2rMogze7UG3vcZu\",\n \"Line truncated
}
]
},
@@ -826,7 +826,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\": \"mqsQmxDUKHRr4CXwZ3s3GryGvNqKaikYap\"\n}"
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": \"mqMjLadUVYcKcoUD6bDjtymz3mw5o85a9f\"\n}"
}
]
}
@@ -876,10 +876,10 @@
"examples": [
{
"title": "Delete a blob",
"curl": "curl -d'{\"method\": \"blob_delete\", \"params\": {\"blob_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\"}}' http://localhost:5279/",
"lbrynet": "lbrynet blob delete d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"blob_delete\", \"params\": {\"blob_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": \"Deleted d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\"\n}"
"curl": "curl -d'{\"method\": \"blob_delete\", \"params\": {\"blob_hash\": \"f2c7e91c86074ee51fbd5fb7a609baf15237790c286bb57682a30aaff8f635d614c16acbfaa2b63a28f62f10692b6fc4\"}}' http://localhost:5279/",
"lbrynet": "lbrynet blob delete f2c7e91c86074ee51fbd5fb7a609baf15237790c286bb57682a30aaff8f635d614c16acbfaa2b63a28f62f10692b6fc4",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"blob_delete\", \"params\": {\"blob_hash\": \"f2c7e91c86074ee51fbd5fb7a609baf15237790c286bb57682a30aaff8f635d614c16acbfaa2b63a28f62f10692b6fc4\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": \"Deleted f2c7e91c86074ee51fbd5fb7a609baf15237790c286bb57682a30aaff8f635d614c16acbfaa2b63a28f62f10692b6fc4\"\n}"
}
]
},
@@ -957,7 +957,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 \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"e43e126a8ab9d7c2fba7fa619adf4a06e8ba559c3ae9d5c8a1cf6ab6f23f9202a06f0ee14ce48f73351c44cc81f6fafd\",\n \"60f3a294f3e56f7acc5383cc68261e819456624fef11de8a34647088412564882bf683dcc6521cfcdd06dfc252e89450\",\n \"b610beb101c564ba97da7da38a8fc2dad6e5c9f05534740f9bdfff11a5d59a5e5b081d052e5930ac7d7a78c9ec64fc2b\"\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 \"f2c7e91c86074ee51fbd5fb7a609baf15237790c286bb57682a30aaff8f635d614c16acbfaa2b63a28f62f10692b6fc4\",\n \"3fab0258c15b9cacf5f42e3d531d64f0bf50e398903a172ef461b5337cf4b3394e85b5bd00fd044315884a310cbb8c1c\",\n \"4f2f2a425212f91080b92ee4edeac1ac88138133df17419984969791aae9f5ce4640952b41cd27686ed0c6692db77573\",\n \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\"\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 4,\n \"total_pages\": 1\n }\n}"
}
]
},
@@ -1038,10 +1038,10 @@
"examples": [
{
"title": "Abandon a channel claim",
"curl": "curl -d'{\"method\": \"channel_abandon\", \"params\": {\"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\", \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet channel abandon 34c8b9ae168ede542fbf6c06be1e417ba5f49778",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_abandon\", \"params\": {\"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\", \"preview\": false, \"blocking\": false}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"010000000160dd075274b262d0fc240b977c22cc43722fef8915e8b45f3a7706a54110ec2d000000006b483045022100b0017ad6c4f8b64b8b388a0f98381cba7d6a0ba927dc93782b3e445b409e4299022029235923fb13553d4e75432c8318252a4796a9fc5e6e884349e5b02164830bee01210283a3599bf2285ec1c5cab20e7deb848c0859879817febbc19741f6d24c4d585cffffffff0134b7f505000000001976a914834bda886513b18154ddc81942a882bbd23050fc88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mgegsgW4K5Za5hALM3us2wcKtPiSvZuNoW\",\n \"amount\": \"1.0\",\n \"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"claim_op\": \"update\",\n \"confirmations\": 8,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"timestamp\": 1578100369,\n \"txid\": \"2dec1041a506773a5fb4e81589ef2f7243cc227c970b24fcd062b2745207dd60\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b\",\n \"public_key_id\": \"mhW32CGgi122kZTBp4XnkTFZSTYwFP4bva\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"msVBgb2ADQVvspzSbHbHxaZf5GkJsK3WUj\",\n \"amount\": \"0.999893\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"22c2f90777594c01cf2317f8bf391065f094ab7be15b06c53ac7194508581d11\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000107\",\n \"total_input\": \"1.0\",\n \"total_output\": \"0.999893\",\n \"txid\": \"22c2f90777594c01cf2317f8bf391065f094ab7be15b06c53ac7194508581d11\"\n }\n}"
"curl": "curl -d'{\"method\": \"channel_abandon\", \"params\": {\"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\", \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet channel abandon 3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_abandon\", \"params\": {\"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\", \"preview\": false, \"blocking\": false}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000014f152a43af3447df92b5502f205594b0b27c5c3abe4441fe4e571230b4f719e5000000006a4730440220054c34959eb83de5d08179f34d0e3fc24f8bbe995ec076bff9c494c3f0cc4d520220393d7b25ca273813a4baef15f9f4483e42f48f3f8dcd64ad326686df48d7c6fc01210221ef54d238f749a1d2deb3dd483977d0788ffea39fe7ddb90105a640c8dd5df0ffffffff0134b7f505000000001976a9142d49e03ebc21902a3c69968fc5e9671ef0826ed188ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mtDvR2y9mdUW6zGkoKbDrnEFjDv3zjYbUD\",\n \"amount\": \"1.0\",\n \"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"claim_op\": \"update\",\n \"confirmations\": 8,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"timestamp\": 1579400269,\n \"txid\": \"e519f7b43012574efe4144be3a5c7cb2b09455202f50b592df4734af432a154f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00\",\n \"public_key_id\": \"mrW9NiUf9kwrAghgoSb13EViJDjzEs1NXk\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mjeRCgGffix8mdBKxWWp1UCeci5fiENzke\",\n \"amount\": \"0.999893\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"9d03d5164405955e62c84ae0855bf2f5cebe560f3c881c522ce322d99ab4edfc\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000107\",\n \"total_input\": \"1.0\",\n \"total_output\": \"0.999893\",\n \"txid\": \"9d03d5164405955e62c84ae0855bf2f5cebe560f3c881c522ce322d99ab4edfc\"\n }\n}"
}
]
},
@@ -1171,14 +1171,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\": \"01000000011a6fb5492c2038450eb0e116708eaf837789ef6a80eba9b91678429e391bb5fa010000006b483045022100ca9a2dbda7fb4c8e664f937a5505418665d06c955ef17049d6428e3264921ba502203c2c4e8b59dc15688103401bb676bd92f0781c51fade04c8c21590b8100cd6ac012103d3e551a3f99f1285c13cfa6acb2b4cdc46dbd54c535ff4aeebc606b605de6cbdffffffff0200e1f5050000000084b508406368616e6e656c4c5d00125a0a583056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b6d7576a9140c6e94d265bed4f6905211e5cce559f0eb24fa6788acc462a029000000001976a914054cfc428d109bbbf8bd05064b93285ee0e24b2488ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mq9PemsqE69wHyzyTKNB7SQeaFzyr4ASHb\",\n \"amount\": \"7.999876\",\n \"confirmations\": 2,\n \"height\": 207,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1578100369,\n \"txid\": \"fab51b399e427816b9a9eb806aef897783af8e7016e1b00e4538202c49b56f1a\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mgegsgW4K5Za5hALM3us2wcKtPiSvZuNoW\",\n \"amount\": \"1.0\",\n \"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\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#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"timestamp\": null,\n \"txid\": \"27c7390579a483d3d4c35fd31ccb5b496decc9d021a090deae49df440fa1c3e1\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b\",\n \"public_key_id\": \"mhW32CGgi122kZTBp4XnkTFZSTYwFP4bva\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mfzyu3xmuyEGe5JrdzJDzA2WTbmzKX4NhH\",\n \"amount\": \"6.983769\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"27c7390579a483d3d4c35fd31ccb5b496decc9d021a090deae49df440fa1c3e1\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.016107\",\n \"total_input\": \"7.999876\",\n \"total_output\": \"7.983769\",\n \"txid\": \"27c7390579a483d3d4c35fd31ccb5b496decc9d021a090deae49df440fa1c3e1\"\n }\n}"
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001004d6230575edb11cc650227154cd6e580a6d9682bf335885f291a7959f083d7010000006b483045022100cd41aa71dc9baaf282518a1a828a8aee40b5240c7c46552bbdc4edbcf0d95a630220641ace025295940d042018e6ddaeac6d630867c886e01ed2f34144438bb752ab01210346a0dc2ed9b6f183df7dcab18a08029e39ab410e90d036b5158e9e17f18349e8ffffffff0200e1f5050000000084b508406368616e6e656c4c5d00125a0a583056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea006d7576a9148b60feaab143c74c08b53029db8c6de10dedd3c588acc462a029000000001976a9140f5183703edf7ab410e57cf32d5e1b8cf4d0557388ac00000000\",\n \"inputs\": [\n {\n \"address\": \"n3oWoNoXgKSWq8ksK8iXes7EkQNh9ZiYLb\",\n \"amount\": \"7.999876\",\n \"confirmations\": 2,\n \"height\": 207,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1579400269,\n \"txid\": \"d783f059791a295f8835f32b68d9a680e5d64c15270265cc11db5e5730624d00\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mtDvR2y9mdUW6zGkoKbDrnEFjDv3zjYbUD\",\n \"amount\": \"1.0\",\n \"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\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#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"timestamp\": null,\n \"txid\": \"b6903bc7b0594dfc94ad26cfba84772661f6a54001030caad7e1bfd3081fe17a\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00\",\n \"public_key_id\": \"mrW9NiUf9kwrAghgoSb13EViJDjzEs1NXk\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mgux5apnZu14xZczXd8XJsCYpfqtyis7fL\",\n \"amount\": \"6.983769\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"b6903bc7b0594dfc94ad26cfba84772661f6a54001030caad7e1bfd3081fe17a\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.016107\",\n \"total_input\": \"7.999876\",\n \"total_output\": \"7.983769\",\n \"txid\": \"b6903bc7b0594dfc94ad26cfba84772661f6a54001030caad7e1bfd3081fe17a\"\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\": \"010000000160dd075274b262d0fc240b977c22cc43722fef8915e8b45f3a7706a54110ec2d010000006b483045022100b85b3132cd6f4af5b206a67a77c936c2728dc65853963a8a8deb48295a74181902206c9da830d016f90c4eeb1ccd1f3a86913ea375f1439b131d4f9e5bcd17d55941012102bd88c34ec29ef877731b6df4b33639f100286ad1773e95bbd370386f047467a7ffffffff0200e1f50500000000fd5001b50b406269676368616e6e656c4d25010012ab010a583056301006072a8648ce3d020106052b8104000a0342000473f9be55e6c57d3148aac400a8bbf972ab129bb7f7f4c4072b73af700124046cde1f4969b2a5c9bd74f7f790b77ce451e1e05b66b7be5e43de87111b287f535d121663726561746f7240736d616c6c6d656469612e636f6d1a15687474703a2f2f736d616c6c6d656469612e636f6d22202a1e687474703a2f2f736d616c6c6d656469612e636f6d2f6c6f676f2e6a7067420b426967204368616e6e656c4a1e41206368616e6e656c2077697468206c6f7473206f6620766964656f732e52202a1e687474703a2f2f736d616c6c6d656469612e636f6d2f6c6f676f2e6a70675a056d757369635a0361727462050883011820620308ab016a0208206a0908e9011a044b6979766d7576a914cd0441f0594022f35e49794ce757b71e0ea7ad9488ace221d305000000001976a914babf2b1708de18de4706473d4fac84d63573f82488ac00000000\",\n \"inputs\": [\n {\n \"address\": \"n1ko3V5QiUem8yDuBjLXbXfxNYkNHqxa5b\",\n \"amount\": \"1.9993355\",\n \"confirmations\": 1,\n \"height\": 210,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1578100369,\n \"txid\": \"2dec1041a506773a5fb4e81589ef2f7243cc227c970b24fcd062b2745207dd60\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mzCyvCbHJFr6qxjTL6fR6MuhYa47zXLCWk\",\n \"amount\": \"1.0\",\n \"claim_id\": \"2392a555c9d6e76a533bcdfdbe994304dca0380f\",\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#2392a555c9d6e76a533bcdfdbe994304dca0380f\",\n \"timestamp\": null,\n \"txid\": \"1cdd8976085097fabe7110cd87e3daea2c44cf41ec961fe4b10cee36b0e274bd\",\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\": \"3056301006072a8648ce3d020106052b8104000a0342000473f9be55e6c57d3148aac400a8bbf972ab129bb7f7f4c4072b73af700124046cde1f4969b2a5c9bd74f7f790b77ce451e1e05b66b7be5e43de87111b287f535d\",\n \"public_key_id\": \"mwASebZ7GpVKHwNZnJPCxD6hghQtPNfURw\",\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\": \"mxYNzLoWYLHRSTNpaM1JKoGgAvr3X96aMf\",\n \"amount\": \"0.9772285\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"1cdd8976085097fabe7110cd87e3daea2c44cf41ec961fe4b10cee36b0e274bd\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.022107\",\n \"total_input\": \"1.9993355\",\n \"total_output\": \"1.9772285\",\n \"txid\": \"1cdd8976085097fabe7110cd87e3daea2c44cf41ec961fe4b10cee36b0e274bd\"\n }\n}"
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000014f152a43af3447df92b5502f205594b0b27c5c3abe4441fe4e571230b4f719e5010000006a473044022061d8b7d44cc8d4341f6a6413ec4ab49e1bb255c9c0a89ae878689bdd935c90d20220417383a7e4fcbd344b3db67e8cbb3222a972012c6be5b6de56a07c1656f6b3d2012103d66dfdc764a5619ad0900de587b4e939eaebf57275b4362ce09a6734a2d6499bffffffff0200e1f50500000000fd5001b50b406269676368616e6e656c4d25010012ab010a583056301006072a8648ce3d020106052b8104000a03420004b43253b247edef2e75be3a1bba5783c4a4bd4369e0952717fbfcc26877ea78dd3f0fd0af0d088b63936595a175ed6645fa6bc58c3cd92f9d592b0ee93323835c121663726561746f7240736d616c6c6d656469612e636f6d1a15687474703a2f2f736d616c6c6d656469612e636f6d22202a1e687474703a2f2f736d616c6c6d656469612e636f6d2f6c6f676f2e6a7067420b426967204368616e6e656c4a1e41206368616e6e656c2077697468206c6f7473206f6620766964656f732e52202a1e687474703a2f2f736d616c6c6d656469612e636f6d2f6c6f676f2e6a70675a056d757369635a0361727462050883011820620308ab016a0208206a0908e9011a044b6979766d7576a9141d96781c411576a0ef8098d1ad193cd754462c5088ace221d305000000001976a91479fb112f3ee8ac1754a98f86bdc30ffd6c633b7488ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mvjpjwcyFwQ9LduzW28nHywqRMzS2H7wnV\",\n \"amount\": \"1.9993355\",\n \"confirmations\": 1,\n \"height\": 210,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1579400269,\n \"txid\": \"e519f7b43012574efe4144be3a5c7cb2b09455202f50b592df4734af432a154f\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"miDQ9Q6oPAYgtjecojcdNBjSZkfb523m2e\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f11f553c0a8d3bb5d341e397570db0325adcf865\",\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#f11f553c0a8d3bb5d341e397570db0325adcf865\",\n \"timestamp\": null,\n \"txid\": \"40191b15d2bc3eaff9289ebd7bbba0e192a416c3deceb4b1978b19580ef461db\",\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\": \"3056301006072a8648ce3d020106052b8104000a03420004b43253b247edef2e75be3a1bba5783c4a4bd4369e0952717fbfcc26877ea78dd3f0fd0af0d088b63936595a175ed6645fa6bc58c3cd92f9d592b0ee93323835c\",\n \"public_key_id\": \"myPsvzUSyDKbmyNh6u97527qikAUz1Crcp\",\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\": \"mrdvpiSawqx4bm35RPdTrHYvN4Eqy7KpXq\",\n \"amount\": \"0.9772285\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"40191b15d2bc3eaff9289ebd7bbba0e192a416c3deceb4b1978b19580ef461db\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.022107\",\n \"total_input\": \"1.9993355\",\n \"total_output\": \"1.9772285\",\n \"txid\": \"40191b15d2bc3eaff9289ebd7bbba0e192a416c3deceb4b1978b19580ef461db\"\n }\n}"
}
]
},
@@ -1270,14 +1270,14 @@
"curl": "curl -d'{\"method\": \"channel_list\", \"params\": {}}' http://localhost:5279/",
"lbrynet": "lbrynet channel list",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_list\", \"params\": {}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mgegsgW4K5Za5hALM3us2wcKtPiSvZuNoW\",\n \"amount\": \"1.0\",\n \"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"has_signing_key\": true,\n \"height\": 209,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"timestamp\": 1578100369,\n \"txid\": \"27c7390579a483d3d4c35fd31ccb5b496decc9d021a090deae49df440fa1c3e1\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b\",\n \"public_key_id\": \"mhW32CGgi122kZTBp4XnkTFZSTYwFP4bva\"\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\": \"mtDvR2y9mdUW6zGkoKbDrnEFjDv3zjYbUD\",\n \"amount\": \"1.0\",\n \"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"has_signing_key\": true,\n \"height\": 209,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"timestamp\": 1579400269,\n \"txid\": \"b6903bc7b0594dfc94ad26cfba84772661f6a54001030caad7e1bfd3081fe17a\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00\",\n \"public_key_id\": \"mrW9NiUf9kwrAghgoSb13EViJDjzEs1NXk\"\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\": {\"page\": 1, \"page_size\": 20}}' http://localhost:5279/",
"lbrynet": "lbrynet channel list --page=1 --page_size=20",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_list\", \"params\": {\"page\": 1, \"page_size\": 20}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mgegsgW4K5Za5hALM3us2wcKtPiSvZuNoW\",\n \"amount\": \"1.0\",\n \"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"has_signing_key\": true,\n \"height\": 209,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"timestamp\": 1578100369,\n \"txid\": \"27c7390579a483d3d4c35fd31ccb5b496decc9d021a090deae49df440fa1c3e1\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b\",\n \"public_key_id\": \"mhW32CGgi122kZTBp4XnkTFZSTYwFP4bva\"\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\": \"mtDvR2y9mdUW6zGkoKbDrnEFjDv3zjYbUD\",\n \"amount\": \"1.0\",\n \"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"has_signing_key\": true,\n \"height\": 209,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"timestamp\": 1579400269,\n \"txid\": \"b6903bc7b0594dfc94ad26cfba84772661f6a54001030caad7e1bfd3081fe17a\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00\",\n \"public_key_id\": \"mrW9NiUf9kwrAghgoSb13EViJDjzEs1NXk\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}"
}
]
},
@@ -1434,10 +1434,10 @@
"examples": [
{
"title": "Update a channel claim",
"curl": "curl -d'{\"method\": \"channel_update\", \"params\": {\"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\", \"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 34c8b9ae168ede542fbf6c06be1e417ba5f49778 --title=\"New Channel\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_update\", \"params\": {\"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\", \"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\": \"0100000002e1c3a10f44df49aede90a021d0c9ec6d495bcb1cd35fc3d4d383a4790539c727000000006b4830450221008260f89ca26a469272c0ad7967e0977d9203ccc5dc94076c0f24510a2d17f83702201e23673ca769fd279db7d847b826897cf38fcfccd8692d018e3f75a583e5c27401210283a3599bf2285ec1c5cab20e7deb848c0859879817febbc19741f6d24c4d585cffffffff29d35667ca46ccf20d743024d51d324dc0748af1f10fb0f8fe423f4c706b1f5b000000006a47304402200f5cf42111a0cf601f18af3786e7b0a3aac1e0bb328ffe86483337a49d1738e5022021a170843213297d4f7fd83a8b798d71c4887c096e31a708ad1e8239498c38b10121036498bf6b798a60e5ad0715c0f285d8a4232e36dfa3ed52de50d45f228dcc0181ffffffff0200e1f50500000000a6b708406368616e6e656c147897f4a57b411ebe066cbf2f54de8e16aeb9c8344c6a00125a0a583056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b420b4e6577204368616e6e656c6d6d76a9140c6e94d265bed4f6905211e5cce559f0eb24fa6788ac6ebeea0b000000001976a914de009ddbc11e758e57dc6fa3cedb505e046e4af188ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mgegsgW4K5Za5hALM3us2wcKtPiSvZuNoW\",\n \"amount\": \"1.0\",\n \"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"has_signing_key\": true,\n \"height\": 209,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"timestamp\": 1578100369,\n \"txid\": \"27c7390579a483d3d4c35fd31ccb5b496decc9d021a090deae49df440fa1c3e1\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b\",\n \"public_key_id\": \"mhW32CGgi122kZTBp4XnkTFZSTYwFP4bva\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mqYfQuGoVMqbcsjHk1WpmewZ9xKqWjyQQE\",\n \"amount\": \"1.999604\",\n \"confirmations\": 1,\n \"height\": 209,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 0,\n \"timestamp\": 1578100369,\n \"txid\": \"5b1f6b704c3f42fef8b00ff1f18a74c04d321dd52430740df2cc46ca6756d329\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mgegsgW4K5Za5hALM3us2wcKtPiSvZuNoW\",\n \"amount\": \"1.0\",\n \"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\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#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"timestamp\": null,\n \"txid\": \"2dec1041a506773a5fb4e81589ef2f7243cc227c970b24fcd062b2745207dd60\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b\",\n \"public_key_id\": \"mhW32CGgi122kZTBp4XnkTFZSTYwFP4bva\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"n1ko3V5QiUem8yDuBjLXbXfxNYkNHqxa5b\",\n \"amount\": \"1.9993355\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"2dec1041a506773a5fb4e81589ef2f7243cc227c970b24fcd062b2745207dd60\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.0002685\",\n \"total_input\": \"2.999604\",\n \"total_output\": \"2.9993355\",\n \"txid\": \"2dec1041a506773a5fb4e81589ef2f7243cc227c970b24fcd062b2745207dd60\"\n }\n}"
"curl": "curl -d'{\"method\": \"channel_update\", \"params\": {\"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\", \"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 3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7 --title=\"New Channel\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_update\", \"params\": {\"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\", \"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\": \"01000000027ae11f08d3bfe1d7aa0c030140a5f661267784bacf26ad94fc4d59b0c73b90b6000000006b483045022100aa830c924d60c7891fa07bf8c113f495da6d9fc4518a187811f7899d6425c18e02203f40187984b2c36ac131c0bb0d6a6dd564a815eaffc897aa30b8938a7c28d25601210221ef54d238f749a1d2deb3dd483977d0788ffea39fe7ddb90105a640c8dd5df0fffffffffeb30066acb17847924efc3f9eb446403af103c7d72016dcf9b1f5ceedd956e3000000006b483045022100aa318cb4c5640147c9c5263f33632def50caae65e2100e159f8b8a8640ae07ab02204c9a430ca449040d3f318dd4a90931c730a96926baffdb09a63acfec3a3675510121024827cb142e9a1b919e8a5e27cb9bad94c8455254bb8ca8ff1b267f2bed67bd20ffffffff0200e1f50500000000a6b708406368616e6e656c14c7482562bfe65919bd8f74f3c067fbf4f62cd43f4c6a00125a0a583056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00420b4e6577204368616e6e656c6d6d76a9148b60feaab143c74c08b53029db8c6de10dedd3c588ac6ebeea0b000000001976a914a6f8fd2194ac23e5ea3b611a9ff14ed34c5b3c0d88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mtDvR2y9mdUW6zGkoKbDrnEFjDv3zjYbUD\",\n \"amount\": \"1.0\",\n \"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"has_signing_key\": true,\n \"height\": 209,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"timestamp\": 1579400269,\n \"txid\": \"b6903bc7b0594dfc94ad26cfba84772661f6a54001030caad7e1bfd3081fe17a\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00\",\n \"public_key_id\": \"mrW9NiUf9kwrAghgoSb13EViJDjzEs1NXk\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mjGLQViMN89giFBMxP4E8VAMUcbxyjywk7\",\n \"amount\": \"1.999604\",\n \"confirmations\": 1,\n \"height\": 209,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 0,\n \"timestamp\": 1579400269,\n \"txid\": \"e356d9edcef5b1f9dc1620d7c703f13a4046b49e3ffc4e924778b1ac6600b3fe\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mtDvR2y9mdUW6zGkoKbDrnEFjDv3zjYbUD\",\n \"amount\": \"1.0\",\n \"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\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#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"timestamp\": null,\n \"txid\": \"e519f7b43012574efe4144be3a5c7cb2b09455202f50b592df4734af432a154f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00\",\n \"public_key_id\": \"mrW9NiUf9kwrAghgoSb13EViJDjzEs1NXk\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mvjpjwcyFwQ9LduzW28nHywqRMzS2H7wnV\",\n \"amount\": \"1.9993355\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"e519f7b43012574efe4144be3a5c7cb2b09455202f50b592df4734af432a154f\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.0002685\",\n \"total_input\": \"2.999604\",\n \"total_output\": \"2.9993355\",\n \"txid\": \"e519f7b43012574efe4144be3a5c7cb2b09455202f50b592df4734af432a154f\"\n }\n}"
}
]
}
@@ -1488,14 +1488,14 @@
"curl": "curl -d'{\"method\": \"claim_list\", \"params\": {}}' http://localhost:5279/",
"lbrynet": "lbrynet claim list",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"claim_list\", \"params\": {}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mxWcrRGimXXR7VmSAhgzGkWfENPu5PE4Sv\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_change\": false,\n \"is_channel_signature_valid\": true,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"signing_channel\": {\n \"address\": \"mgegsgW4K5Za5hALM3us2wcKtPiSvZuNoW\",\n \"amount\": \"1.0\",\n \"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"timestamp\": 1578100369,\n \"txid\": \"2dec1041a506773a5fb4e81589ef2f7243cc227c970b24fcd062b2745207dd60\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b\",\n \"public_key_id\": \"mhW32CGgi122kZTBp4XnkTFZSTYwFP4bva\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1578100370,\n \"txid\": \"a50b3532115ae329c2e0bc6cf713a015a524418d34d84f8ca37711253e8ee50f\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpsg2mhmr_\",\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mgegsgW4K5Za5hALM3us2wcKtPiSvZuNoW\",\n \"amount\": \"1.0\",\n \"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"timestamp\": 1578100369,\n \"txid\": \"2dec1041a506773a5fb4e81589ef2f7243cc227c970b24fcd062b2745207dd60\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b\",\n \"public_key_id\": \"mhW32CGgi122kZTBp4XnkTFZSTYwFP4bva\",\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}"
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mm4reqApxMGhBDpeWEVfhAeCWGrtkMpn9r\",\n \"amount\": \"1.0\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_change\": false,\n \"is_channel_signature_valid\": true,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"signing_channel\": {\n \"address\": \"mtDvR2y9mdUW6zGkoKbDrnEFjDv3zjYbUD\",\n \"amount\": \"1.0\",\n \"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"timestamp\": 1579400269,\n \"txid\": \"e519f7b43012574efe4144be3a5c7cb2b09455202f50b592df4734af432a154f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00\",\n \"public_key_id\": \"mrW9NiUf9kwrAghgoSb13EViJDjzEs1NXk\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1579400270,\n \"txid\": \"5d701f3ffa627da65082fc499b2cc34a83435b2b7f0b24166f4bae87ee330450\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmppsu__ylo\",\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mtDvR2y9mdUW6zGkoKbDrnEFjDv3zjYbUD\",\n \"amount\": \"1.0\",\n \"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"timestamp\": 1579400269,\n \"txid\": \"e519f7b43012574efe4144be3a5c7cb2b09455202f50b592df4734af432a154f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00\",\n \"public_key_id\": \"mrW9NiUf9kwrAghgoSb13EViJDjzEs1NXk\",\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\": {\"page\": 1, \"page_size\": 20}}' http://localhost:5279/",
"lbrynet": "lbrynet claim list --page=1 --page_size=20",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"claim_list\", \"params\": {\"page\": 1, \"page_size\": 20}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mxWcrRGimXXR7VmSAhgzGkWfENPu5PE4Sv\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_change\": false,\n \"is_channel_signature_valid\": true,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"signing_channel\": {\n \"address\": \"mgegsgW4K5Za5hALM3us2wcKtPiSvZuNoW\",\n \"amount\": \"1.0\",\n \"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"timestamp\": 1578100369,\n \"txid\": \"2dec1041a506773a5fb4e81589ef2f7243cc227c970b24fcd062b2745207dd60\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b\",\n \"public_key_id\": \"mhW32CGgi122kZTBp4XnkTFZSTYwFP4bva\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1578100370,\n \"txid\": \"a50b3532115ae329c2e0bc6cf713a015a524418d34d84f8ca37711253e8ee50f\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpsg2mhmr_\",\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mgegsgW4K5Za5hALM3us2wcKtPiSvZuNoW\",\n \"amount\": \"1.0\",\n \"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"timestamp\": 1578100369,\n \"txid\": \"2dec1041a506773a5fb4e81589ef2f7243cc227c970b24fcd062b2745207dd60\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b\",\n \"public_key_id\": \"mhW32CGgi122kZTBp4XnkTFZSTYwFP4bva\",\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}"
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mm4reqApxMGhBDpeWEVfhAeCWGrtkMpn9r\",\n \"amount\": \"1.0\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_change\": false,\n \"is_channel_signature_valid\": true,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"signing_channel\": {\n \"address\": \"mtDvR2y9mdUW6zGkoKbDrnEFjDv3zjYbUD\",\n \"amount\": \"1.0\",\n \"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"timestamp\": 1579400269,\n \"txid\": \"e519f7b43012574efe4144be3a5c7cb2b09455202f50b592df4734af432a154f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00\",\n \"public_key_id\": \"mrW9NiUf9kwrAghgoSb13EViJDjzEs1NXk\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1579400270,\n \"txid\": \"5d701f3ffa627da65082fc499b2cc34a83435b2b7f0b24166f4bae87ee330450\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmppsu__ylo\",\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mtDvR2y9mdUW6zGkoKbDrnEFjDv3zjYbUD\",\n \"amount\": \"1.0\",\n \"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"timestamp\": 1579400269,\n \"txid\": \"e519f7b43012574efe4144be3a5c7cb2b09455202f50b592df4734af432a154f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00\",\n \"public_key_id\": \"mrW9NiUf9kwrAghgoSb13EViJDjzEs1NXk\",\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}"
}
]
},
@@ -1557,12 +1557,6 @@
"description": "exclude claims signed by any of these channels (arguments must be claim ids of the channels)",
"is_required": false
},
{
"name": "blocklist_channel_ids",
"type": "list",
"description": "channel_ids of channels containing reposts of claims you want to be blocked from search results",
"is_required": false
},
{
"name": "has_channel_signature",
"type": "bool",
@@ -1808,17 +1802,17 @@
"examples": [
{
"title": "Search for all claims in channel",
"curl": "curl -d'{\"method\": \"claim_search\", \"params\": {\"claim_ids\": [], \"channel\": \"@channel\", \"channel_ids\": [], \"not_channel_ids\": [], \"blocklist_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\": []}}' 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\": [], \"blocklist_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 \"items\": [\n {\n \"address\": \"mxWcrRGimXXR7VmSAhgzGkWfENPu5PE4Sv\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3/astream#f\",\n \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\",\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\": 1578100370,\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#f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"short_url\": \"lbry://astream#f\",\n \"signing_channel\": {\n \"address\": \"mgegsgW4K5Za5hALM3us2wcKtPiSvZuNoW\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3\",\n \"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\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\": 1578100369,\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#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"short_url\": \"lbry://@channel#3\",\n \"timestamp\": 1578100369,\n \"txid\": \"2dec1041a506773a5fb4e81589ef2f7243cc227c970b24fcd062b2745207dd60\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b\",\n \"public_key_id\": \"mhW32CGgi122kZTBp4XnkTFZSTYwFP4bva\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1578100370,\n \"txid\": \"a50b3532115ae329c2e0bc6cf713a015a524418d34d84f8ca37711253e8ee50f\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpsg2mhmr_\",\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\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\": []}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"blocked\": {\n \"total\": 0\n },\n \"items\": [\n {\n \"address\": \"mm4reqApxMGhBDpeWEVfhAeCWGrtkMpn9r\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3/astream#b\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\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\": 1579400270,\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#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"short_url\": \"lbry://astream#b\",\n \"signing_channel\": {\n \"address\": \"mtDvR2y9mdUW6zGkoKbDrnEFjDv3zjYbUD\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3\",\n \"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\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\": 1579400269,\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#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"short_url\": \"lbry://@channel#3\",\n \"timestamp\": 1579400269,\n \"txid\": \"e519f7b43012574efe4144be3a5c7cb2b09455202f50b592df4734af432a154f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00\",\n \"public_key_id\": \"mrW9NiUf9kwrAghgoSb13EViJDjzEs1NXk\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1579400270,\n \"txid\": \"5d701f3ffa627da65082fc499b2cc34a83435b2b7f0b24166f4bae87ee330450\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmppsu__ylo\",\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\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\": [], \"blocklist_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\": []}}' 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\": [], \"blocklist_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 \"items\": [\n {\n \"address\": \"mxWcrRGimXXR7VmSAhgzGkWfENPu5PE4Sv\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3/astream#f\",\n \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\",\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\": 1578100370,\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#f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"short_url\": \"lbry://astream#f\",\n \"signing_channel\": {\n \"address\": \"mgegsgW4K5Za5hALM3us2wcKtPiSvZuNoW\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3\",\n \"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\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\": 1578100369,\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#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"short_url\": \"lbry://@channel#3\",\n \"timestamp\": 1578100369,\n \"txid\": \"2dec1041a506773a5fb4e81589ef2f7243cc227c970b24fcd062b2745207dd60\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b\",\n \"public_key_id\": \"mhW32CGgi122kZTBp4XnkTFZSTYwFP4bva\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1578100370,\n \"txid\": \"a50b3532115ae329c2e0bc6cf713a015a524418d34d84f8ca37711253e8ee50f\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpsg2mhmr_\",\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\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\": []}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"blocked\": {\n \"total\": 0\n },\n \"items\": [\n {\n \"address\": \"mm4reqApxMGhBDpeWEVfhAeCWGrtkMpn9r\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3/astream#b\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\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\": 1579400270,\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#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"short_url\": \"lbry://astream#b\",\n \"signing_channel\": {\n \"address\": \"mtDvR2y9mdUW6zGkoKbDrnEFjDv3zjYbUD\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#3\",\n \"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\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\": 1579400269,\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#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"short_url\": \"lbry://@channel#3\",\n \"timestamp\": 1579400269,\n \"txid\": \"e519f7b43012574efe4144be3a5c7cb2b09455202f50b592df4734af432a154f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00\",\n \"public_key_id\": \"mrW9NiUf9kwrAghgoSb13EViJDjzEs1NXk\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1579400270,\n \"txid\": \"5d701f3ffa627da65082fc499b2cc34a83435b2b7f0b24166f4bae87ee330450\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmppsu__ylo\",\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\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}"
}
]
}
@@ -2229,10 +2223,10 @@
"examples": [
{
"title": "Abandon a comment",
"curl": "curl -d'{\"method\": \"comment_abandon\", \"params\": {\"comment_id\": \"0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb\"}}' http://localhost:5279/",
"lbrynet": "lbrynet comment abandon 0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_abandon\", \"params\": {\"comment_id\": \"0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"error\": {\n \"IndexError\": \"list index out of range\",\n \"code\": -32603,\n \"message\": \"Internal Server Error. Please notify a LBRY Administrator.\"\n },\n \"id\": null,\n \"jsonrpc\": \"2.0\"\n }\n}"
"curl": "curl -d'{\"method\": \"comment_abandon\", \"params\": {\"comment_id\": \"71e2866380adfc3595879353a57608e2b4dcda36bf311b102265bbca5b8f37d1\"}}' http://localhost:5279/",
"lbrynet": "lbrynet comment abandon 71e2866380adfc3595879353a57608e2b4dcda36bf311b102265bbca5b8f37d1",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_abandon\", \"params\": {\"comment_id\": \"71e2866380adfc3595879353a57608e2b4dcda36bf311b102265bbca5b8f37d1\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"abandoned\": false\n }\n}"
}
]
},
@@ -2273,7 +2267,7 @@
{
"name": "channel_account_id",
"type": "str",
"description": "one or more account ids for accounts to look in for channel certificates, defaults to all accounts.",
"description": "one or more account ids for accounts to look in for channel certificates, defaults to all accounts",
"is_required": false
},
{
@@ -2287,51 +2281,17 @@
"examples": [
{
"title": "Posting a comment as your channel",
"curl": "curl -d'{\"method\": \"comment_create\", \"params\": {\"comment\": \"Thank you Based God\", \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\", \"channel_name\": \"@channel\", \"channel_account_id\": []}}' http://localhost:5279/",
"lbrynet": "lbrynet comment create --comment=\"Thank you Based God\" --channel_name=@channel --claim_id=f95ede15cbeff2da7e4a481c538501c36343077c",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_create\", \"params\": {\"comment\": \"Thank you Based God\", \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\", \"channel_name\": \"@channel\", \"channel_account_id\": []}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"channel_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"comment\": \"Thank you Based God\",\n \"comment_id\": \"0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb\",\n \"is_claim_signature_valid\": true,\n \"is_hidden\": false,\n \"signature\": \"cea3d588e438a9c725db76c4f9f071a80438c7d586d56563685f0357c2ed5069d6eba598ca58887c029ddeaea6feeb13c63a13f85768390608601cc391412179\",\n \"signing_ts\": \"1578100348\",\n \"timestamp\": 1578100348\n }\n}"
"curl": "curl -d'{\"method\": \"comment_create\", \"params\": {\"comment\": \"Thank you Based God\", \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\", \"channel_name\": \"@channel\", \"channel_account_id\": []}}' http://localhost:5279/",
"lbrynet": "lbrynet comment create --comment=\"Thank you Based God\" --channel_name=@channel --claim_id=bfdbf31b0af4091febc7cd1a2945ea5fa93f0711",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_create\", \"params\": {\"comment\": \"Thank you Based God\", \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\", \"channel_name\": \"@channel\", \"channel_account_id\": []}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"channel_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"comment\": \"Thank you Based God\",\n \"comment_id\": \"71e2866380adfc3595879353a57608e2b4dcda36bf311b102265bbca5b8f37d1\",\n \"is_claim_signature_valid\": true,\n \"is_hidden\": false,\n \"signature\": \"0d89339695ee2cf301fd7224d6c313d2c226887e3ffd42c96d9f25185b8c54bbba65d311f20416502b808542a9d88e0568c386e93e8ae607d1f283cca7f26580\",\n \"signing_ts\": \"1579400249\",\n \"timestamp\": 1579400250\n }\n}"
},
{
"title": "You can r",
"curl": "curl -d'{\"method\": \"comment_create\", \"params\": {\"comment\": \"I have photographic evidence confirming Sasquatch exists\", \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\", \"parent_id\": \"0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb\", \"channel_name\": \"@channel\", \"channel_account_id\": []}}' http://localhost:5279/",
"lbrynet": "lbrynet comment create --comment=\"I have photographic evidence confirming Sasquatch exists\" --channel_name=@channel --claim_id=f95ede15cbeff2da7e4a481c538501c36343077c --parent_id=0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_create\", \"params\": {\"comment\": \"I have photographic evidence confirming Sasquatch exists\", \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\", \"parent_id\": \"0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb\", \"channel_name\": \"@channel\", \"channel_account_id\": []}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"channel_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"comment\": \"I have photographic evidence confirming Sasquatch exists\",\n \"comment_id\": \"50931c4dea5fa80a84e4b42c091b26197cc5e3b33bde978ec18e0c95bf01ee4b\",\n \"is_claim_signature_valid\": true,\n \"is_hidden\": false,\n \"parent_id\": \"0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb\",\n \"signature\": \"b3ffcf62cc5aedfef3cc200b597955404752487244a816744387ebfbc2e6ed3ce1eaf0656a581d8eaec6bc6e228effbb7cf0d9a74a861cfdc41ffa519bb2eba0\",\n \"signing_ts\": \"1578100348\",\n \"timestamp\": 1578100348\n }\n}"
}
]
},
{
"name": "comment_update",
"description": "Update a comment published as one of your channels.",
"arguments": [
{
"name": "comment",
"type": "str",
"description": "New comment replacing the old one",
"is_required": true
},
{
"name": "comment_id",
"type": "str",
"description": "Hash identifying the comment to edit",
"is_required": true
},
{
"name": "wallet_id",
"type": "str",
"description": "restrict operation to specific wallet",
"is_required": false
}
],
"returns": "(dict) Comment object if edit was successful, (None) otherwise\n {\n \"comment\": (str) The actual string as inputted by the user,\n \"comment_id\": (str) The Comment's unique identifier,\n \"channel_name\": (str) Name of the channel this was posted under, prepended with a '@',\n \"channel_id\": (str) The Channel Claim ID that this comment was posted under,\n \"signature\": (str) The signature of the comment,\n \"signing_ts\": (str) Timestamp used to sign the most recent signature,\n \"channel_url\": (str) Channel's URI in the ClaimTrie,\n \"parent_id\": (str) Comment this is replying to, (None) if this is the root,\n \"timestamp\": (int) The time at which comment was entered into the server at, in nanoseconds.\n }",
"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\": \"0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb\"}}' http://localhost:5279/",
"lbrynet": "lbrynet comment \"update Where there was once sasquatch, there is not\" --comment_id=0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_update\", \"params\": {\"comment\": \"Where there was once sasquatch, there is not\", \"comment_id\": \"0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"error\": {\n \"code\": -32601,\n \"message\": \"The method does not exist / is not available.\"\n },\n \"id\": null,\n \"jsonrpc\": \"2.0\"\n }\n}"
"curl": "curl -d'{\"method\": \"comment_create\", \"params\": {\"comment\": \"I have photographic evidence confirming Sasquatch exists\", \"parent_id\": \"71e2866380adfc3595879353a57608e2b4dcda36bf311b102265bbca5b8f37d1\", \"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=71e2866380adfc3595879353a57608e2b4dcda36bf311b102265bbca5b8f37d1",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_create\", \"params\": {\"comment\": \"I have photographic evidence confirming Sasquatch exists\", \"parent_id\": \"71e2866380adfc3595879353a57608e2b4dcda36bf311b102265bbca5b8f37d1\", \"channel_name\": \"@channel\", \"channel_account_id\": []}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"channel_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"comment\": \"I have photographic evidence confirming Sasquatch exists\",\n \"comment_id\": \"06b54746ce74e42aa7760ce9d3b609b5ab30a4b59f0e3eb2c67cdc00eba7d7e0\",\n \"is_claim_signature_valid\": true,\n \"is_hidden\": false,\n \"parent_id\": \"71e2866380adfc3595879353a57608e2b4dcda36bf311b102265bbca5b8f37d1\",\n \"signature\": \"d45617c4ab93c956c50454e0bad50e3006813d6ebe5693647f0f2f9a23aff7576b90bb08844f314bd92ce36d98c677c58c263b9b8f9c5d6d3cdae14d89af396d\",\n \"signing_ts\": \"1579400250\",\n \"timestamp\": 1579400251\n }\n}"
}
]
},
@@ -2412,17 +2372,51 @@
"examples": [
{
"title": "List all comments on a claim",
"curl": "curl -d'{\"method\": \"comment_list\", \"params\": {\"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\", \"include_replies\": true, \"is_channel_signature_valid\": false, \"visible\": false, \"hidden\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet comment list f95ede15cbeff2da7e4a481c538501c36343077c --include_replies",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_list\", \"params\": {\"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\", \"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\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"comment\": \"Thank you Based God\",\n \"comment_id\": \"0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb\",\n \"is_channel_signature_valid\": true,\n \"is_hidden\": false,\n \"signature\": \"cea3d588e438a9c725db76c4f9f071a80438c7d586d56563685f0357c2ed5069d6eba598ca58887c029ddeaea6feeb13c63a13f85768390608601cc391412179\",\n \"signing_ts\": \"1578100348\",\n \"timestamp\": 1578100348\n },\n {\n \"channel_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"comment\": \"I have photographic evidence confirming Sasquatch exists\",\n \"comment_id\": \"50931c4dea5fa80a84e4b42c091b26197cc5e3b33bde978ec18e0c95bf01ee4b\",\n \"is_channel_signature_valid\": true,\n \"is_hidden\": false,\n \"parent_id\": \"0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb\",\n \"signature\": \"b3ffcf62cc5aedfef3cc200b597955404752487244a816744387ebfbc2e6ed3ce1eaf0656a581d8eaec6bc6e228effbb7cf0d9a74a861cfdc41ffa519bb2eba0\",\n \"signing_ts\": \"1578100348\",\n \"timestamp\": 1578100348\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\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\", \"include_replies\": true, \"is_channel_signature_valid\": false, \"visible\": false, \"hidden\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet comment list bfdbf31b0af4091febc7cd1a2945ea5fa93f0711 --include_replies",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_list\", \"params\": {\"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\", \"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\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"comment\": \"I have photographic evidence confirming Sasquatch exists\",\n \"comment_id\": \"06b54746ce74e42aa7760ce9d3b609b5ab30a4b59f0e3eb2c67cdc00eba7d7e0\",\n \"is_channel_signature_valid\": true,\n \"is_hidden\": false,\n \"parent_id\": \"71e2866380adfc3595879353a57608e2b4dcda36bf311b102265bbca5b8f37d1\",\n \"signature\": \"d45617c4ab93c956c50454e0bad50e3006813d6ebe5693647f0f2f9a23aff7576b90bb08844f314bd92ce36d98c677c58c263b9b8f9c5d6d3cdae14d89af396d\",\n \"signing_ts\": \"1579400250\",\n \"timestamp\": 1579400251\n },\n {\n \"channel_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"comment\": \"Thank you Based God\",\n \"comment_id\": \"71e2866380adfc3595879353a57608e2b4dcda36bf311b102265bbca5b8f37d1\",\n \"is_channel_signature_valid\": true,\n \"is_hidden\": false,\n \"signature\": \"0d89339695ee2cf301fd7224d6c313d2c226887e3ffd42c96d9f25185b8c54bbba65d311f20416502b808542a9d88e0568c386e93e8ae607d1f283cca7f26580\",\n \"signing_ts\": \"1579400249\",\n \"timestamp\": 1579400250\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\": \"f95ede15cbeff2da7e4a481c538501c36343077c\", \"parent_id\": \"0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb\", \"include_replies\": false, \"is_channel_signature_valid\": false, \"visible\": false, \"hidden\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet comment list f95ede15cbeff2da7e4a481c538501c36343077c --parent_id=0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_list\", \"params\": {\"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\", \"parent_id\": \"0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb\", \"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\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"comment\": \"Thank you Based God\",\n \"comment_id\": \"0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb\",\n \"is_channel_signature_valid\": true,\n \"is_hidden\": false,\n \"signature\": \"cea3d588e438a9c725db76c4f9f071a80438c7d586d56563685f0357c2ed5069d6eba598ca58887c029ddeaea6feeb13c63a13f85768390608601cc391412179\",\n \"signing_ts\": \"1578100348\",\n \"timestamp\": 1578100348\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\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\", \"parent_id\": \"71e2866380adfc3595879353a57608e2b4dcda36bf311b102265bbca5b8f37d1\", \"include_replies\": false, \"is_channel_signature_valid\": false, \"visible\": false, \"hidden\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet comment list bfdbf31b0af4091febc7cd1a2945ea5fa93f0711 --parent_id=71e2866380adfc3595879353a57608e2b4dcda36bf311b102265bbca5b8f37d1",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_list\", \"params\": {\"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\", \"parent_id\": \"71e2866380adfc3595879353a57608e2b4dcda36bf311b102265bbca5b8f37d1\", \"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\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"channel_name\": \"@channel\",\n \"channel_url\": \"lbry://@channel#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"comment\": \"Thank you Based God\",\n \"comment_id\": \"71e2866380adfc3595879353a57608e2b4dcda36bf311b102265bbca5b8f37d1\",\n \"is_channel_signature_valid\": true,\n \"is_hidden\": false,\n \"signature\": \"0d89339695ee2cf301fd7224d6c313d2c226887e3ffd42c96d9f25185b8c54bbba65d311f20416502b808542a9d88e0568c386e93e8ae607d1f283cca7f26580\",\n \"signing_ts\": \"1579400249\",\n \"timestamp\": 1579400250\n }\n ],\n \"page\": 1,\n \"page_size\": 50,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}"
}
]
},
{
"name": "comment_update",
"description": "Edit a comment published as one of your channels.",
"arguments": [
{
"name": "comment",
"type": "str",
"description": "New comment replacing the old one",
"is_required": true
},
{
"name": "comment_id",
"type": "str",
"description": "Hash identifying the comment to edit",
"is_required": true
},
{
"name": "wallet_id",
"type": "str",
"description": "restrict operation to specific wallet",
"is_required": false
}
],
"returns": "(dict) Comment object if edit was successful, (None) otherwise\n {\n \"comment\": (str) The actual string as inputted by the user,\n \"comment_id\": (str) The Comment's unique identifier,\n \"channel_name\": (str) Name of the channel this was posted under, prepended with a '@',\n \"channel_id\": (str) The Channel Claim ID that this comment was posted under,\n \"signature\": (str) The signature of the comment,\n \"signing_ts\": (str) Timestamp used to sign the most recent signature,\n \"channel_url\": (str) Channel's URI in the ClaimTrie,\n \"parent_id\": (str) Comment this is replying to, (None) if this is the root,\n \"timestamp\": (int) The time at which comment was entered into the server at, in nanoseconds.\n }",
"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\": \"71e2866380adfc3595879353a57608e2b4dcda36bf311b102265bbca5b8f37d1\"}}' http://localhost:5279/",
"lbrynet": "lbrynet comment update Where there was once sasquatch, there is not --comment_id=71e2866380adfc3595879353a57608e2b4dcda36bf311b102265bbca5b8f37d1",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_update\", \"params\": {\"comment\": \"Where there was once sasquatch, there is not\", \"comment_id\": \"71e2866380adfc3595879353a57608e2b4dcda36bf311b102265bbca5b8f37d1\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": null\n}"
}
]
}
@@ -2512,9 +2506,9 @@
"examples": [
{
"title": "Delete a file",
"curl": "curl -d'{\"method\": \"file_delete\", \"params\": {\"delete_from_download_dir\": false, \"delete_all\": false, \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\"}}' http://localhost:5279/",
"lbrynet": "lbrynet file delete --claim_id=\"f95ede15cbeff2da7e4a481c538501c36343077c\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_delete\", \"params\": {\"delete_from_download_dir\": false, \"delete_all\": false, \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\"}}).json()",
"curl": "curl -d'{\"method\": \"file_delete\", \"params\": {\"delete_from_download_dir\": false, \"delete_all\": false, \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\"}}' http://localhost:5279/",
"lbrynet": "lbrynet file delete --claim_id=\"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_delete\", \"params\": {\"delete_from_download_dir\": false, \"delete_all\": false, \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": true\n}"
}
]
@@ -2645,14 +2639,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\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\",\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 \"key\": \"518b647925f56fbbdadc5f15058b9196\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpsg2mhmr_\",\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"a50b3532115ae329c2e0bc6cf713a015a524418d34d84f8ca37711253e8ee50f:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"017897f4a57b411ebe066cbf2f54de8e16aeb9c834feb406b1b0991fcbfff25ad85805dbf02124246436d8012302edcdf004a4479aec646070e3c9909aa22f08a482d54f00cb245398f838f4c36941981d0698e2a20a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d707367326d686d725f180b22186170706c69636174696f6e2f6f637465742d73747265616d3230d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"1b7b40081d9b1a8f60b7d5a2af031b1c04bd7edbd0675bfa1920f6351524501fa4edf6acb13db77a4ca1c9503fcaa33b\",\n \"stream_name\": \"tmpsg2mhmr_\",\n \"streaming_url\": \"http://localhost:5280/stream/d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"suggested_file_name\": \"tmpsg2mhmr_\",\n \"timestamp\": null,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"a50b3532115ae329c2e0bc6cf713a015a524418d34d84f8ca37711253e8ee50f\",\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\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"2dfb4a9dc1557c5cc89d3447904cc3b493be911e\",\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 \"key\": \"6773acf1a6d9101f7dcd69fcc43a9a2d\",\n \"metadata\": {\n \"author\": \"Picaso\",\n \"description\": \"A blank PNG that is 5x7.\",\n \"fee\": {\n \"address\": \"mvkLPgxEeqM1iP5o69JVj4Tm6NpdYjhCZE\",\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\": \"1578100345\",\n \"source\": {\n \"hash\": \"6c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545\",\n \"media_type\": \"image/png\",\n \"name\": \"tmpouzs2ayp.png\",\n \"sd_hash\": \"b610beb101c564ba97da7da38a8fc2dad6e5c9f05534740f9bdfff11a5d59a5e5b081d052e5930ac7d7a78c9ec64fc2b\",\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\": \"a88779842f46e42daee5fd850456b73107b4711e2628b2fdLine truncated
"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\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\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 \"key\": \"b7d93a1d57d3e61812c674a34a4f3961\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmppsu__ylo\",\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"5d701f3ffa627da65082fc499b2cc34a83435b2b7f0b24166f4bae87ee330450:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01c7482562bfe65919bd8f74f3c067fbf4f62cd43fa5f4d8ab7ca870112e7310d70d239ea4d507688327acf4b80eb68fc7a5138726aa8bcd6a61c926732b2f5edf6c36fb5977cbb0c0b36e08980a78166af7fbb9660a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d707073755f5f796c6f180b22186170706c69636174696f6e2f6f637465742d73747265616d3230a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"c0a2bb6f6e97c10717c53e24d8057cafbdc095b9a9f6f78d2bab385a38dcfd226f9731c2dee9eba3463d73bacbc41e94\",\n \"stream_name\": \"tmppsu__ylo\",\n \"streaming_url\": \"http://localhost:5280/stream/a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"suggested_file_name\": \"tmppsu__ylo\",\n \"timestamp\": null,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"5d701f3ffa627da65082fc499b2cc34a83435b2b7f0b24166f4bae87ee330450\",\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\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"1473978f00fed53c4b18ddf24b9990a954eb4b00\",\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 \"key\": \"134f4e871ad788d059bc8e2b3fe31ebf\",\n \"metadata\": {\n \"author\": \"Picaso\",\n \"description\": \"A blank PNG that is 5x7.\",\n \"fee\": {\n \"address\": \"mggQVVstsxpesZJrF3TefabV5ZQ2pp9rBD\",\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\": \"1579400247\",\n \"source\": {\n \"hash\": \"6c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545\",\n \"media_type\": \"image/png\",\n \"name\": \"tmpsyd4i3_g.png\",\n \"sd_hash\": \"4f2f2a425212f91080b92ee4edeac1ac88138133df17419984969791aae9f5ce4640952b41cd27686ed0c6692db77573\",\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\": \"876dfa2980a40763b4e5f9d49aedb205a8c312267ba3fb26Line truncated
},
{
"title": "List files matching a parameter",
"curl": "curl -d'{\"method\": \"file_list\", \"params\": {\"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\", \"reverse\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet file list --claim_id=\"f95ede15cbeff2da7e4a481c538501c36343077c\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_list\", \"params\": {\"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\", \"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\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\",\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 \"key\": \"518b647925f56fbbdadc5f15058b9196\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpsg2mhmr_\",\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"a50b3532115ae329c2e0bc6cf713a015a524418d34d84f8ca37711253e8ee50f:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"017897f4a57b411ebe066cbf2f54de8e16aeb9c834feb406b1b0991fcbfff25ad85805dbf02124246436d8012302edcdf004a4479aec646070e3c9909aa22f08a482d54f00cb245398f838f4c36941981d0698e2a20a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d707367326d686d725f180b22186170706c69636174696f6e2f6f637465742d73747265616d3230d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"1b7b40081d9b1a8f60b7d5a2af031b1c04bd7edbd0675bfa1920f6351524501fa4edf6acb13db77a4ca1c9503fcaa33b\",\n \"stream_name\": \"tmpsg2mhmr_\",\n \"streaming_url\": \"http://localhost:5280/stream/d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"suggested_file_name\": \"tmpsg2mhmr_\",\n \"timestamp\": 1578100370,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"a50b3532115ae329c2e0bc6cf713a015a524418d34d84f8ca37711253e8ee50f\",\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\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\", \"reverse\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet file list --claim_id=\"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_list\", \"params\": {\"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\", \"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\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\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 \"key\": \"b7d93a1d57d3e61812c674a34a4f3961\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmppsu__ylo\",\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"5d701f3ffa627da65082fc499b2cc34a83435b2b7f0b24166f4bae87ee330450:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01c7482562bfe65919bd8f74f3c067fbf4f62cd43fa5f4d8ab7ca870112e7310d70d239ea4d507688327acf4b80eb68fc7a5138726aa8bcd6a61c926732b2f5edf6c36fb5977cbb0c0b36e08980a78166af7fbb9660a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d707073755f5f796c6f180b22186170706c69636174696f6e2f6f637465742d73747265616d3230a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"c0a2bb6f6e97c10717c53e24d8057cafbdc095b9a9f6f78d2bab385a38dcfd226f9731c2dee9eba3463d73bacbc41e94\",\n \"stream_name\": \"tmppsu__ylo\",\n \"streaming_url\": \"http://localhost:5280/stream/a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"suggested_file_name\": \"tmppsu__ylo\",\n \"timestamp\": 1579400270,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"5d701f3ffa627da65082fc499b2cc34a83435b2b7f0b24166f4bae87ee330450\",\n \"written_bytes\": 0\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}"
}
]
},
@@ -2769,10 +2763,10 @@
"examples": [
{
"title": "Save a file to the downloads directory",
"curl": "curl -d'{\"method\": \"file_save\", \"params\": {\"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\"}}' http://localhost:5279/",
"lbrynet": "lbrynet file save --sd_hash=\"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_save\", \"params\": {\"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"added_on\": 1578100350,\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"confirmations\": 3,\n \"content_fee\": null,\n \"download_directory\": \"/tmp/tmpykj53y2t\",\n \"download_path\": \"/tmp/tmpykj53y2t/tmpsg2mhmr__1\",\n \"file_name\": \"tmpsg2mhmr__1\",\n \"height\": 214,\n \"key\": \"518b647925f56fbbdadc5f15058b9196\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpsg2mhmr_\",\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"a50b3532115ae329c2e0bc6cf713a015a524418d34d84f8ca37711253e8ee50f:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"017897f4a57b411ebe066cbf2f54de8e16aeb9c834feb406b1b0991fcbfff25ad85805dbf02124246436d8012302edcdf004a4479aec646070e3c9909aa22f08a482d54f00cb245398f838f4c36941981d0698e2a20a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d707367326d686d725f180b22186170706c69636174696f6e2f6f637465742d73747265616d3230d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"1b7b40081d9b1a8f60b7d5a2af031b1c04bd7edbd0675bfa1920f6351524501fa4edf6acb13db77a4ca1c9503fcaa33b\",\n \"stream_name\": \"tmpsg2mhmr_\",\n \"streaming_url\": \"http://localhost:5280/stream/d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"suggested_file_name\": \"tmpsg2mhmr_\",\n \"timestamp\": 1578100370,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"a50b3532115ae329c2e0bc6cf713a015a524418d34d84f8ca37711253e8ee50f\",\n \"written_bytes\": 11\n }\n}"
"curl": "curl -d'{\"method\": \"file_save\", \"params\": {\"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\"}}' http://localhost:5279/",
"lbrynet": "lbrynet file save --sd_hash=\"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_save\", \"params\": {\"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\"}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"added_on\": 1579400254,\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"confirmations\": 3,\n \"content_fee\": null,\n \"download_directory\": \"/tmp/tmp1ozq8ity\",\n \"download_path\": \"/tmp/tmp1ozq8ity/tmppsu__ylo_1\",\n \"file_name\": \"tmppsu__ylo_1\",\n \"height\": 214,\n \"key\": \"b7d93a1d57d3e61812c674a34a4f3961\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmppsu__ylo\",\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"5d701f3ffa627da65082fc499b2cc34a83435b2b7f0b24166f4bae87ee330450:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01c7482562bfe65919bd8f74f3c067fbf4f62cd43fa5f4d8ab7ca870112e7310d70d239ea4d507688327acf4b80eb68fc7a5138726aa8bcd6a61c926732b2f5edf6c36fb5977cbb0c0b36e08980a78166af7fbb9660a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d707073755f5f796c6f180b22186170706c69636174696f6e2f6f637465742d73747265616d3230a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"purchase_receipt\": null,\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"c0a2bb6f6e97c10717c53e24d8057cafbdc095b9a9f6f78d2bab385a38dcfd226f9731c2dee9eba3463d73bacbc41e94\",\n \"stream_name\": \"tmppsu__ylo\",\n \"streaming_url\": \"http://localhost:5280/stream/a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"suggested_file_name\": \"tmppsu__ylo\",\n \"timestamp\": 1579400270,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"5d701f3ffa627da65082fc499b2cc34a83435b2b7f0b24166f4bae87ee330450\",\n \"written_bytes\": 11\n }\n}"
}
]
},
@@ -3053,7 +3047,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 \"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/oleg/.local/share/lbry/lbrynet/daemon_settings.yml\",\n \"data_dir\": \"/tmp/tmpykj53y2t\",\n \"download_dir\": \"/tmp/tmpykj53y2t\",\n \"download_timeout\": 30.0,\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 \"network_interface\": \"0.0.0.0\",\n \"node_rpc_timeout\": 5.0,\n \"peer_connect_timeout\": 3.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 \"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 \"wallet_dir\": \"/tmp/tmpykj53y2t\",\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 \"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/tmp1ozq8ity\",\n \"download_dir\": \"/tmp/tmp1ozq8ity\",\n \"download_timeout\": 30.0,\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 \"network_interface\": \"0.0.0.0\",\n \"node_rpc_timeout\": 5.0,\n \"peer_connect_timeout\": 3.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 \"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 \"wallet_dir\": \"/tmp/tmp1ozq8ity\",\n \"wallets\": [\n \"default_wallet\"\n ]\n }\n}"
}
]
},
@@ -3128,10 +3122,10 @@
"examples": [
{
"title": "Abandon a stream claim",
"curl": "curl -d'{\"method\": \"stream_abandon\", \"params\": {\"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\", \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet stream abandon f95ede15cbeff2da7e4a481c538501c36343077c",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_abandon\", \"params\": {\"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\", \"preview\": false, \"blocking\": false}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000010fe58e3e251177a38c4fd8348d4124a515a013f76cbce0c229e35a1132350ba5000000006a47304402203074166d29b98dc529c8a1d1508e75016c50ba20d5025cc88fa3623ca7c021ab02207780bf6259b3a0cd849d9c0b81e2ccd33ff71a95c4039c26a3287fc4f9cce81c012103f2e2ccaf961844ec796b540daf5d42cff1d04a97d4056fa93dcc26c97ec7c2c0ffffffff0134b7f505000000001976a914c8ea871b5657f6189cb8749701cb9b36f8c03e4288ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mxWcrRGimXXR7VmSAhgzGkWfENPu5PE4Sv\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"claim_op\": \"update\",\n \"confirmations\": 3,\n \"height\": 214,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"timestamp\": 1578100370,\n \"txid\": \"a50b3532115ae329c2e0bc6cf713a015a524418d34d84f8ca37711253e8ee50f\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpsg2mhmr_\",\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"myqJPhEuj6btmLkrdqezi23koaE1s9hsjE\",\n \"amount\": \"0.999893\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"4eae8324fa33aac4d8737a08848db7cf00412ef74a8c9e72a455402c6fc8b513\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000107\",\n \"total_input\": \"1.0\",\n \"total_output\": \"0.999893\",\n \"txid\": \"4eae8324fa33aac4d8737a08848db7cf00412ef74a8c9e72a455402c6fc8b513\"\n }\n}"
"curl": "curl -d'{\"method\": \"stream_abandon\", \"params\": {\"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\", \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet stream abandon bfdbf31b0af4091febc7cd1a2945ea5fa93f0711",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_abandon\", \"params\": {\"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\", \"preview\": false, \"blocking\": false}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001500433ee87ae4b6f16240b7f2b5b43834ac32c9b49fc8250a67d62fa3f1f705d000000006a47304402202e9ade76631162d8694ca7f67a1ac7e255e3e65eb290b8847b4bdba1d0a9a3b1022025aed44a70e2ba5a59713213fa566507deca483483f9d14444167bfe9231ea3501210249220d8b62e50bc2554469a35becdb252fc98336058afafbb2bf0b1ea8926200ffffffff0134b7f505000000001976a91428f1254f7d792510b4c745109d84b09d9ec35fd288ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mm4reqApxMGhBDpeWEVfhAeCWGrtkMpn9r\",\n \"amount\": \"1.0\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"claim_op\": \"update\",\n \"confirmations\": 3,\n \"height\": 214,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"timestamp\": 1579400270,\n \"txid\": \"5d701f3ffa627da65082fc499b2cc34a83435b2b7f0b24166f4bae87ee330450\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmppsu__ylo\",\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mjFSCpwDqXiDrwroNTLwTnkfqT8U3p9Y9x\",\n \"amount\": \"0.999893\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"34804102d654b8d05953b4bd81b3023f384352e9b62d2b858ad259ac7b67839b\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000107\",\n \"total_input\": \"1.0\",\n \"total_output\": \"0.999893\",\n \"txid\": \"34804102d654b8d05953b4bd81b3023f384352e9b62d2b858ad259ac7b67839b\"\n }\n}"
}
]
},
@@ -3332,17 +3326,17 @@
"examples": [
{
"title": "Create a stream claim without metadata",
"curl": "curl -d'{\"method\": \"stream_create\", \"params\": {\"name\": \"astream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpsg2mhmr_\", \"tags\": [], \"languages\": [], \"locations\": [], \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet stream create astream 1.0 /tmp/tmpsg2mhmr_",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_create\", \"params\": {\"name\": \"astream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpsg2mhmr_\", \"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\": \"0100000001e1c3a10f44df49aede90a021d0c9ec6d495bcb1cd35fc3d4d383a4790539c727010000006a4730440220524487b323b690518e0486ddc3ab3c410f36923f6685765976faedeb52cb9f5702204ff3d6bd490007c890497e9ce8cd470ca273914b3095fc1f97e671f0d92bd66201210395301134db56244412f5d36c0d5277eaa3f7db80b5a2460f999de187f9e46f45ffffffff0200e1f50500000000bab5076173747265616d4c94000a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d707367326d686d725f180b22186170706c69636174696f6e2f6f637465742d73747265616d3230d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea51856d7576a914ba69e8b2c9aa40bdff8fc5890344f4fff6c7028588ac38fb9423000000001976a914ee3ed40a870a4cfcab28e9b0d3a2a42b135b3d5a88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mfzyu3xmuyEGe5JrdzJDzA2WTbmzKX4NhH\",\n \"amount\": \"6.983769\",\n \"confirmations\": 4,\n \"height\": 209,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1578100369,\n \"txid\": \"27c7390579a483d3d4c35fd31ccb5b496decc9d021a090deae49df440fa1c3e1\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mxWcrRGimXXR7VmSAhgzGkWfENPu5PE4Sv\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\",\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#f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"timestamp\": null,\n \"txid\": \"e17fdc5ca2418fced58b9d34c8688c99dcc3e1dd33412a84268889b884f5d523\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpsg2mhmr_\",\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"n3EgP6VSRrfksucGhy8DES7q9nzVNqt3zu\",\n \"amount\": \"5.969662\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"e17fdc5ca2418fced58b9d34c8688c99dcc3e1dd33412a84268889b884f5d523\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.014107\",\n \"total_input\": \"6.983769\",\n \"total_output\": \"6.969662\",\n \"txid\": \"e17fdc5ca2418fced58b9d34c8688c99dcc3e1dd33412a84268889b884f5d523\"\n }\n}"
"curl": "curl -d'{\"method\": \"stream_create\", \"params\": {\"name\": \"astream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmppsu__ylo\", \"tags\": [], \"languages\": [], \"locations\": [], \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet stream create astream 1.0 /tmp/tmppsu__ylo",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_create\", \"params\": {\"name\": \"astream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmppsu__ylo\", \"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\": \"01000000017ae11f08d3bfe1d7aa0c030140a5f661267784bacf26ad94fc4d59b0c73b90b6010000006a47304402200b9d3230d5fefcc25c25ed698f4ff07756c4b68ca4eb1e2b0e375d7ff218367302205cbe18806f1c2048f5189080acd5693f36e2770f87c47b3dd182a5217852c6350121032f98a457e4b23c99b3ecf17dc0ca3fb088400c0bd818f93c9e27eb2b3e5db4efffffffff0200e1f50500000000bab5076173747265616d4c94000a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d707073755f5f796c6f180b22186170706c69636174696f6e2f6f637465742d73747265616d3230a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b6d7576a9143ce13aed49065382390a945c0ffaa39f10401a4888ac38fb9423000000001976a91446cd176a3f02ed515c9c47d4554d80091f0fe16688ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mgux5apnZu14xZczXd8XJsCYpfqtyis7fL\",\n \"amount\": \"6.983769\",\n \"confirmations\": 4,\n \"height\": 209,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1579400269,\n \"txid\": \"b6903bc7b0594dfc94ad26cfba84772661f6a54001030caad7e1bfd3081fe17a\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mm4reqApxMGhBDpeWEVfhAeCWGrtkMpn9r\",\n \"amount\": \"1.0\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\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#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"timestamp\": null,\n \"txid\": \"960cfa157e4279343626da119b389f16dc11d9f5cd70b4333305348d8dabd50d\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmppsu__ylo\",\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mmyKHVCN9y2Ld4bstWW7jMBrUzd1eYuLu9\",\n \"amount\": \"5.969662\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"960cfa157e4279343626da119b389f16dc11d9f5cd70b4333305348d8dabd50d\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.014107\",\n \"total_input\": \"6.983769\",\n \"total_output\": \"6.969662\",\n \"txid\": \"960cfa157e4279343626da119b389f16dc11d9f5cd70b4333305348d8dabd50d\"\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/tmpouzs2ayp.png\", \"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\": 1578100345, \"channel_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\", \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet stream create blank-image 1.0 /tmp/tmpouzs2ayp.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=1578100345 --channel_id=\"34c8b9ae168ede542fbf6c06be1e417ba5f49778\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_create\", \"params\": {\"name\": \"blank-image\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpouzs2ayp.png\", \"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\": 1578100345, \"channel_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\", \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"010000000123d5f584b8898826842a4133dde1c3dc998c68c8349d8bd5ce8f41a25cdc7fe1010000006a473044022012dafd1dec1614e6952f9c76856dada3b0e6297f9f685e6e553f000bc76d6ce902202694ac7ad4aefb336e977beda4fceba693834b687c90d5bc7fb3c9002b2482d3012102480ca93f8eedad5b32e533220b047828b8bacbf22698e783a4f9869817b5a1b3ffffffff0200e1f50500000000fddc01b50b626c616e6b2d696d6167654db101017897f4a57b411ebe066cbf2f54de8e16aeb9c834ab253012b48d909ffedaaedc15bd1803adaaa38595d1a0b6146f1be6c03cd1775befdc00cdfe79240a54441bf0c25be69276062d2996ca0467d8ddf0720c04d20ae6010a82010a306c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545120f746d706f757a73326179702e706e6718632209696d6167652f706e673230b610beb101c564ba97da7da38a8fc2dad6e5c9f05534740f9bdfff11a5d59a5e5b081d052e5930ac7d7a78c9ec64fc2b120650696361736f1a0d5075626c696320446f6d61696e2218687474703a2f2f7075626c69632d646f6d61696e2e6f726728f9ccbff0053222080112196fa711bd739a0b2d2706f69cf3fcaed58867580adea7190699188087a70e520408051007420b426c616e6b20496d6167654a184120626c616e6b20504e472074686174206973203578372e52252a23687474703a2f2f736d616c6c6d656469612e636f6d2f7468756d626e61696c2e6a70675a05626c616e6b5a03617274620208016a1308ec0112024e481a0a4d616e636865737465726d7576a914a711bd739a0b2d2706f69cf3fcaed58867580ade88acac5e7d1d000000001976a91489953b798ec28c4334b1d8dc2132762ec19afbfa88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"n3EgP6VSRrfksucGhy8DES7q9nzVNqt3zu\",\n \"amount\": \"5.969662\",\n \"confirmations\": 2,\n \"height\": 213,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1578100370,\n \"txid\": \"e17fdc5ca2418fced58b9d34c8688c99dcc3e1dd33412a84268889b884f5d523\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mvkLPgxEeqM1iP5o69JVj4Tm6NpdYjhCZE\",\n \"amount\": \"1.0\",\n \"claim_id\": \"2dfb4a9dc1557c5cc89d3447904cc3b493be911e\",\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#2dfb4a9dc1557c5cc89d3447904cc3b493be911e\",\n \"signing_channel\": {\n \"address\": \"mgegsgW4K5Za5hALM3us2wcKtPiSvZuNoW\",\n \"amount\": \"1.0\",\n \"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"timestamp\": 1578100369,\n \"txid\": \"2dec1041a506773a5fb4e81589ef2f7243cc227c970b24fcd062b2745207dd60\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b\",\n \"public_key_id\": \"mhW32CGgi122kZTBp4XnkTFZSTYwFP4bva\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": null,\n \"txid\": \"a88779842f46e42daee5fd850456b73107b4711e2628b2fd91c8215c65fc6192\",\n \"type\": \"claim\",\n \"value\": {\n \"author\": \"Picaso\",\n \"description\": \"A blank PNG that is 5x7.\",\n \"fee\": {\n \"address\": \"mvkLPgxEeqM1iP5o69JVj4Tm6NpdYjhCZE\",\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\": \"1578100345\",\n \"source\": {\n \"hash\": \"6c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545\",\n \"media_type\": \"image/png\",\n \"name\": \"tmpouzs2ayp.png\",\n \"sd_hash\": \"b610beb101c564ba97da7da38a8fc2dad6e5c9f05534740f9bdfff11a5d59a5e5b081d052e5930ac7d7a78c9ec64fc2b\",\n \"size\": \"99\"\n },\n \"streaLine truncated
"curl": "curl -d'{\"method\": \"stream_create\", \"params\": {\"name\": \"blank-image\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpsyd4i3_g.png\", \"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\": 1579400247, \"channel_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\", \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet stream create blank-image 1.0 /tmp/tmpsyd4i3_g.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=1579400247 --channel_id=\"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_create\", \"params\": {\"name\": \"blank-image\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpsyd4i3_g.png\", \"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\": 1579400247, \"channel_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\", \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000010dd5ab8d8d34053333b470cdf5d911dc169f389b11da26363479427e15fa0c96010000006b4830450221008b3a286c9c6ecb9f14c875c33b4eb1a8cf64478dfe564f0d95082a61488af3040220363afe6e832f5bb6f6ebaaafb710bc560cce9ae8aa7b1f7b13e71e09512a15220121032b0568f9ad906425aaa666aa33b367304fc1f1f452bbfd878501e78b0279136affffffff0200e1f50500000000fddc01b50b626c616e6b2d696d6167654db10101c7482562bfe65919bd8f74f3c067fbf4f62cd43f9bf76a5a0c03757ca393073f855ffbebc226220c971a2a940b7bd16a67c5a6a84b0634c03adfee9c0f9011a1f13f98312e70b5eaa2ecd1e75d1e4ee6043eea0b0ae6010a82010a306c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545120f746d707379643469335f672e706e6718632209696d6167652f706e6732304f2f2a425212f91080b92ee4edeac1ac88138133df17419984969791aae9f5ce4640952b41cd27686ed0c6692db77573120650696361736f1a0d5075626c696320446f6d61696e2218687474703a2f2f7075626c69632d646f6d61696e2e6f726728b7f88ef1053222080112196f0cc1bce498b9f602f5a0553a8398c62884f7ba8cc916c584188087a70e520408051007420b426c616e6b20496d6167654a184120626c616e6b20504e472074686174206973203578372e52252a23687474703a2f2f736d616c6c6d656469612e636f6d2f7468756d626e61696c2e6a70675a05626c616e6b5a03617274620208016a1308ec0112024e481a0a4d616e636865737465726d7576a9140cc1bce498b9f602f5a0553a8398c62884f7ba8c88acac5e7d1d000000001976a914696273c68ecdd2f6919f1294253cd6a10f48b3a288ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mmyKHVCN9y2Ld4bstWW7jMBrUzd1eYuLu9\",\n \"amount\": \"5.969662\",\n \"confirmations\": 2,\n \"height\": 213,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1579400270,\n \"txid\": \"960cfa157e4279343626da119b389f16dc11d9f5cd70b4333305348d8dabd50d\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mggQVVstsxpesZJrF3TefabV5ZQ2pp9rBD\",\n \"amount\": \"1.0\",\n \"claim_id\": \"1473978f00fed53c4b18ddf24b9990a954eb4b00\",\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#1473978f00fed53c4b18ddf24b9990a954eb4b00\",\n \"signing_channel\": {\n \"address\": \"mtDvR2y9mdUW6zGkoKbDrnEFjDv3zjYbUD\",\n \"amount\": \"1.0\",\n \"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"timestamp\": 1579400269,\n \"txid\": \"e519f7b43012574efe4144be3a5c7cb2b09455202f50b592df4734af432a154f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00\",\n \"public_key_id\": \"mrW9NiUf9kwrAghgoSb13EViJDjzEs1NXk\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": null,\n \"txid\": \"876dfa2980a40763b4e5f9d49aedb205a8c312267ba3fb26f387e3fd885ce867\",\n \"type\": \"claim\",\n \"value\": {\n \"author\": \"Picaso\",\n \"description\": \"A blank PNG that is 5x7.\",\n \"fee\": {\n \"address\": \"mggQVVstsxpesZJrF3TefabV5ZQ2pp9rBD\",\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\": \"1579400247\",\n \"source\": {\n \"hash\": \"6c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545\",\n \"media_type\": \"image/png\",\n \"name\": \"tmpsyd4i3_g.png\",\n \"sd_hash\": \"4f2f2a425212f91080b92ee4edeac1ac88138133df17419984969791aae9f5ce4640952b41cd27686ed0c6692db77573\",\n \"size\": \"99\"\n },\n \"strLine truncated
}
]
},
@@ -3382,14 +3376,14 @@
"curl": "curl -d'{\"method\": \"stream_list\", \"params\": {}}' http://localhost:5279/",
"lbrynet": "lbrynet stream list",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_list\", \"params\": {}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mxWcrRGimXXR7VmSAhgzGkWfENPu5PE4Sv\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_change\": false,\n \"is_channel_signature_valid\": true,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"signing_channel\": {\n \"address\": \"mgegsgW4K5Za5hALM3us2wcKtPiSvZuNoW\",\n \"amount\": \"1.0\",\n \"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"timestamp\": 1578100369,\n \"txid\": \"2dec1041a506773a5fb4e81589ef2f7243cc227c970b24fcd062b2745207dd60\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b\",\n \"public_key_id\": \"mhW32CGgi122kZTBp4XnkTFZSTYwFP4bva\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1578100370,\n \"txid\": \"a50b3532115ae329c2e0bc6cf713a015a524418d34d84f8ca37711253e8ee50f\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpsg2mhmr_\",\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\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\": \"mm4reqApxMGhBDpeWEVfhAeCWGrtkMpn9r\",\n \"amount\": \"1.0\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_change\": false,\n \"is_channel_signature_valid\": true,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"signing_channel\": {\n \"address\": \"mtDvR2y9mdUW6zGkoKbDrnEFjDv3zjYbUD\",\n \"amount\": \"1.0\",\n \"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"timestamp\": 1579400269,\n \"txid\": \"e519f7b43012574efe4144be3a5c7cb2b09455202f50b592df4734af432a154f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00\",\n \"public_key_id\": \"mrW9NiUf9kwrAghgoSb13EViJDjzEs1NXk\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1579400270,\n \"txid\": \"5d701f3ffa627da65082fc499b2cc34a83435b2b7f0b24166f4bae87ee330450\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmppsu__ylo\",\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\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\": {\"page\": 1, \"page_size\": 20}}' http://localhost:5279/",
"lbrynet": "lbrynet stream list --page=1 --page_size=20",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_list\", \"params\": {\"page\": 1, \"page_size\": 20}}).json()",
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mxWcrRGimXXR7VmSAhgzGkWfENPu5PE4Sv\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_change\": false,\n \"is_channel_signature_valid\": true,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"signing_channel\": {\n \"address\": \"mgegsgW4K5Za5hALM3us2wcKtPiSvZuNoW\",\n \"amount\": \"1.0\",\n \"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"timestamp\": 1578100369,\n \"txid\": \"2dec1041a506773a5fb4e81589ef2f7243cc227c970b24fcd062b2745207dd60\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b\",\n \"public_key_id\": \"mhW32CGgi122kZTBp4XnkTFZSTYwFP4bva\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1578100370,\n \"txid\": \"a50b3532115ae329c2e0bc6cf713a015a524418d34d84f8ca37711253e8ee50f\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpsg2mhmr_\",\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\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\": \"mm4reqApxMGhBDpeWEVfhAeCWGrtkMpn9r\",\n \"amount\": \"1.0\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"claim_op\": \"update\",\n \"confirmations\": 1,\n \"height\": 214,\n \"is_change\": false,\n \"is_channel_signature_valid\": true,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"signing_channel\": {\n \"address\": \"mtDvR2y9mdUW6zGkoKbDrnEFjDv3zjYbUD\",\n \"amount\": \"1.0\",\n \"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"timestamp\": 1579400269,\n \"txid\": \"e519f7b43012574efe4144be3a5c7cb2b09455202f50b592df4734af432a154f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00\",\n \"public_key_id\": \"mrW9NiUf9kwrAghgoSb13EViJDjzEs1NXk\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1579400270,\n \"txid\": \"5d701f3ffa627da65082fc499b2cc34a83435b2b7f0b24166f4bae87ee330450\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmppsu__ylo\",\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\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}"
}
]
},
@@ -3710,10 +3704,10 @@
"examples": [
{
"title": "Update a stream claim to add channel",
"curl": "curl -d'{\"method\": \"stream_update\", \"params\": {\"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\", \"clear_fee\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"channel_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\", \"clear_channel\": false, \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false, \"replace\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet stream update f95ede15cbeff2da7e4a481c538501c36343077c --channel_id=\"34c8b9ae168ede542fbf6c06be1e417ba5f49778\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_update\", \"params\": {\"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\", \"clear_fee\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"channel_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\", \"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\": \"010000000223d5f584b8898826842a4133dde1c3dc998c68c8349d8bd5ce8f41a25cdc7fe1000000006a47304402206c2a1d14de758134ec21c1ebac7f09c6f550732195d64aa933ebef69aa8a154002207e2a7a16397cd775dec508dfee1c96fe168d4369ce19cc56631807bb4659bb30012103f2e2ccaf961844ec796b540daf5d42cff1d04a97d4056fa93dcc26c97ec7c2c0ffffffffbd74e2b036ee0cb1e41f96ec41cf442ceadae387cd1071befa9750087689dd1c010000006b483045022100f198c09c8fa0302328bfbb8a4eb9fa8e82471d5808c843ea3af46e2e157463a502207b9ff778f705aa250d79a95320ca6c9d8dc71af3c293abf7d6004a8ecc38994101210227da4d9f87093bc831863496f30e690544e3ecf51b174783d6a623bdf6906e04ffffffff0200e1f50500000000fd2301b7076173747265616d147c074363c30185531c484a7edaf2efcb15de5ef94ce8017897f4a57b411ebe066cbf2f54de8e16aeb9c834feb406b1b0991fcbfff25ad85805dbf02124246436d8012302edcdf004a4479aec646070e3c9909aa22f08a482d54f00cb245398f838f4c36941981d0698e2a20a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d707367326d686d725f180b22186170706c69636174696f6e2f6f637465742d73747265616d3230d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea51856d6d76a914ba69e8b2c9aa40bdff8fc5890344f4fff6c7028588ac32a0d205000000001976a914f22c67628f4fbf6b6f137e60e7ff41de630e422c88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mxWcrRGimXXR7VmSAhgzGkWfENPu5PE4Sv\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"height\": 213,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"timestamp\": 1578100370,\n \"txid\": \"e17fdc5ca2418fced58b9d34c8688c99dcc3e1dd33412a84268889b884f5d523\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpsg2mhmr_\",\n \"sd_hash\": \"d5d9055437076e3fc8b5f3a2aa724ec45e1c70fdd4f169839e0d44b8345e6968b8dda9ac4740fc6a0ea01c6cc5ea5185\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mxYNzLoWYLHRSTNpaM1JKoGgAvr3X96aMf\",\n \"amount\": \"0.9772285\",\n \"confirmations\": 3,\n \"height\": 211,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1578100369,\n \"txid\": \"1cdd8976085097fabe7110cd87e3daea2c44cf41ec961fe4b10cee36b0e274bd\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mxWcrRGimXXR7VmSAhgzGkWfENPu5PE4Sv\",\n \"amount\": \"1.0\",\n \"claim_id\": \"f95ede15cbeff2da7e4a481c538501c36343077c\",\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#f95ede15cbeff2da7e4a481c538501c36343077c\",\n \"signing_channel\": {\n \"address\": \"mgegsgW4K5Za5hALM3us2wcKtPiSvZuNoW\",\n \"amount\": \"1.0\",\n \"claim_id\": \"34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"claim_op\": \"update\",\n \"confirmations\": 4,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#34c8b9ae168ede542fbf6c06be1e417ba5f49778\",\n \"timestamp\": 1578100369,\n \"txid\": \"2dec1041a506773a5fb4e81589ef2f7243cc227c970b24fcd062b2745207dd60\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200042a0e709a4a4becca5e9d95972e931d5046eea76fec6db02616521b4ac48626b14ed5cd2175fcb8a428553ccb4e31c320539c02499f25c465bcf4af324bfbdb4b\",\n \"public_key_id\": \"mhW32CGgi122kZTBp4XnkTFZSTYwFP4bva\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": null,\n \"txid\": \"a50b3532115ae329c2e0bc6cf713a015a524418d34d84f8ca37711253e8ee50f\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n Line truncated
"curl": "curl -d'{\"method\": \"stream_update\", \"params\": {\"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\", \"clear_fee\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"channel_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\", \"clear_channel\": false, \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false, \"replace\": false}}' http://localhost:5279/",
"lbrynet": "lbrynet stream update bfdbf31b0af4091febc7cd1a2945ea5fa93f0711 --channel_id=\"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\"",
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_update\", \"params\": {\"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\", \"clear_fee\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"channel_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\", \"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\": \"01000000020dd5ab8d8d34053333b470cdf5d911dc169f389b11da26363479427e15fa0c96000000006a47304402201177d3c1018a1ba4cacbe12f5b353882321af4a3ec110d5d32c80cd53363fa0702206b779bade0fb1c80ba914bed41b2174a9d8f00e37856aadb5c5661903b58d5ab01210249220d8b62e50bc2554469a35becdb252fc98336058afafbb2bf0b1ea8926200ffffffffdb61f40e58198b97b1b4cedec316a492e1a0bb7bbd9e28f9af3ebcd2151b1940010000006b483045022100bc62bc7cfe201921998f2019d3702034bc011bcf9f7e1f9de2027924fae8f5f6022023b452c8687b8ce07168b8befb6f1ad1f008445a1b7e1db0d94499283c4a0183012103982c03f90e7196836e8033ce0f70e3a394829b9a14f057fb3c60776bdfef60c2ffffffff0200e1f50500000000fd2301b7076173747265616d1411073fa95fea45291acdc7eb1f09f40a1bf3dbbf4ce801c7482562bfe65919bd8f74f3c067fbf4f62cd43fa5f4d8ab7ca870112e7310d70d239ea4d507688327acf4b80eb68fc7a5138726aa8bcd6a61c926732b2f5edf6c36fb5977cbb0c0b36e08980a78166af7fbb9660a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d707073755f5f796c6f180b22186170706c69636174696f6e2f6f637465742d73747265616d3230a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b6d6d76a9143ce13aed49065382390a945c0ffaa39f10401a4888ac32a0d205000000001976a914af3f9b41e32d887a1a3b04d532bf4c260b5b535488ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mm4reqApxMGhBDpeWEVfhAeCWGrtkMpn9r\",\n \"amount\": \"1.0\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"height\": 213,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"astream\",\n \"normalized_name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"timestamp\": 1579400270,\n \"txid\": \"960cfa157e4279343626da119b389f16dc11d9f5cd70b4333305348d8dabd50d\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmppsu__ylo\",\n \"sd_hash\": \"a40fb1a597f6933a1d60bd8f461a109a4e50247a5aea4709d20ef75b2e3da600632621b9d463fa9f9b6ce3ffbc3ebc3b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mrdvpiSawqx4bm35RPdTrHYvN4Eqy7KpXq\",\n \"amount\": \"0.9772285\",\n \"confirmations\": 3,\n \"height\": 211,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1579400269,\n \"txid\": \"40191b15d2bc3eaff9289ebd7bbba0e192a416c3deceb4b1978b19580ef461db\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mm4reqApxMGhBDpeWEVfhAeCWGrtkMpn9r\",\n \"amount\": \"1.0\",\n \"claim_id\": \"bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\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#bfdbf31b0af4091febc7cd1a2945ea5fa93f0711\",\n \"signing_channel\": {\n \"address\": \"mtDvR2y9mdUW6zGkoKbDrnEFjDv3zjYbUD\",\n \"amount\": \"1.0\",\n \"claim_id\": \"3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"claim_op\": \"update\",\n \"confirmations\": 4,\n \"has_signing_key\": true,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"meta\": {},\n \"name\": \"@channel\",\n \"normalized_name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#3fd42cf6f4fb67c0f3748fbd1959e6bf622548c7\",\n \"timestamp\": 1579400269,\n \"txid\": \"e519f7b43012574efe4144be3a5c7cb2b09455202f50b592df4734af432a154f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a0342000457b1f020041b2ad401abb5135e306ea03ee4353f7da63b98cb81fdeee3fa0fcf768cce00a36cb3f72ecb16af6b1606f7f8a303b7a6892e93e1946122cbf6ea00\",\n \"public_key_id\": \"mrW9NiUf9kwrAghgoSb13EViJDjzEs1NXk\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": null,\n \"txid\": \"5d701f3ffa627da65082fc499b2cc34a83435b2b7f0b24166f4bae87ee330450\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n Line truncated
}
]
}
@@ -3958,7 +3952,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-01-03 20:12\",\n \"fee\": \"-0.000124\",\n \"purchase_info\": [],\n \"support_info\": [],\n \"timestamp\": 1578100369,\n \"txid\": \"fab51b399e427816b9a9eb806aef897783af8e7016e1b00e4538202c49b56f1a\",\n \"update_info\": [],\n \"value\": \"0.0\"\n },\n {\n \"abandon_info\": [],\n \"claim_info\": [],\n \"confirmations\": 7,\n \"date\": \"2020-01-03 20:12\",\n \"fee\": \"0.0\",\n \"purchase_info\": [],\n \"support_info\": [],\n \"timestamp\": 1578100368,\n \"txid\": \"2c8b000adc8b7e72b9dab63afca40935cb05683f71ed0cfaffd1ed71fd1fe8fa\",\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\": \"2020-01-18 21:17\",\n \"fee\": \"-0.000124\",\n \"purchase_info\": [],\n \"support_info\": [],\n \"timestamp\": 1579400269,\n \"txid\": \"d783f059791a295f8835f32b68d9a680e5d64c15270265cc11db5e5730624d00\",\n \"update_info\": [],\n \"value\": \"0.0\"\n },\n {\n \"abandon_info\": [],\n \"claim_info\": [],\n \"confirmations\": 7,\n \"date\": \"2020-01-18 21:17\",\n \"fee\": \"0.0\",\n \"purchase_info\": [],\n \"support_info\": [],\n \"timestamp\": 1579400268,\n \"txid\": \"da1b345be92a2ff0465d13422e8957ef57efd59b7cd33e743282c8036b99b832\",\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}"
}
]
},
+1 -1
View File
@@ -1,2 +1,2 @@
__version__ = "0.52.0"
__version__ = "0.54.1"
version = tuple(map(int, __version__.split('.'))) # pylint: disable=invalid-name
+2
View File
@@ -33,6 +33,8 @@ def aes_decrypt(secret: str, value: str) -> typing.Tuple[str, bytes]:
unpadder = PKCS7(AES.block_size).unpadder()
result = unpadder.update(decryptor.update(data)) + unpadder.finalize()
return result.decode(), init_vector
except UnicodeDecodeError:
raise InvalidPasswordError()
except ValueError as e:
if e.args[0] == 'Invalid padding bytes.':
raise InvalidPasswordError()
+1
View File
@@ -55,6 +55,7 @@ Code | Name | Message
409 | ResolveTimeout | Failed to resolve '{url}' within the timeout.
410 | KeyFeeAboveMaxAllowed | {message}
411 | InvalidPassword | Password is invalid.
412 | IncompatibleWalletServer | '{server}:{port}' has an incompatibly old version.
**5xx** | Blob | **Blobs**
500 | BlobNotFound | Blob not found.
501 | BlobPermissionDenied | Permission denied to read blob.
+6
View File
@@ -209,6 +209,12 @@ class InvalidPasswordError(WalletError):
super().__init__("Password is invalid.")
class IncompatibleWalletServerError(WalletError):
def __init__(self, server, port):
super().__init__(f"'{server}:{port}' has an incompatibly old version.")
class BlobError(BaseError):
"""
**Blobs**
+4 -2
View File
@@ -475,8 +475,10 @@ class UPnPComponent(Component):
if self.external_ip:
log.info("detected external ip using lbry.com fallback")
if self.component_manager.analytics_manager:
await self.component_manager.analytics_manager.send_upnp_setup_success_fail(
success, await self.get_status()
self.component_manager.loop.create_task(
self.component_manager.analytics_manager.send_upnp_setup_success_fail(
success, await self.get_status()
)
)
self._maintain_redirects_task = self.component_manager.loop.create_task(
self._repeatedly_maintain_redirects(now=False)
+8 -7
View File
@@ -2159,7 +2159,6 @@ class Daemon(metaclass=JSONRPCServerType):
[--claim_id=<claim_id> | --claim_ids=<claim_ids>...]
[--channel=<channel> |
[[--channel_ids=<channel_ids>...] [--not_channel_ids=<not_channel_ids>...]]]
[--blocklist_channel_ids=<blocklist_channel_ids>...]
[--has_channel_signature] [--valid_channel_signature | --invalid_channel_signature]
[--is_controlling] [--release_time=<release_time>] [--public_key_id=<public_key_id>]
[--timestamp=<timestamp>] [--creation_timestamp=<creation_timestamp>]
@@ -2200,9 +2199,6 @@ class Daemon(metaclass=JSONRPCServerType):
use in conjunction with --valid_channel_signature
--not_channel_ids=<not_channel_ids>: (list) exclude claims signed by any of these channels
(arguments must be claim ids of the channels)
--blocklist_channel_ids=<blocklist_channel_ids>: (list) channel_ids of channels containing
reposts of claims you want to be blocked from
search results
--has_channel_signature : (bool) claims with a channel signature (valid or invalid)
--valid_channel_signature : (bool) claims with a valid channel signature or no signature,
use in conjunction with --has_channel_signature to
@@ -2293,8 +2289,13 @@ class Daemon(metaclass=JSONRPCServerType):
kwargs['signature_valid'] = 0
page_num, page_size = abs(kwargs.pop('page', 1)), min(abs(kwargs.pop('page_size', DEFAULT_PAGE_SIZE)), 50)
kwargs.update({'offset': page_size * (page_num - 1), 'limit': page_size})
txos, _, total = await self.ledger.claim_search(wallet.accounts, **kwargs)
result = {"items": txos, "page": page_num, "page_size": page_size}
txos, blocked, _, total = await self.ledger.claim_search(wallet.accounts, **kwargs)
result = {
"items": txos,
"blocked": blocked,
"page": page_num,
"page_size": page_size
}
if not kwargs.pop('no_totals', False):
result['total_pages'] = int((total + (page_size - 1)) / page_size)
result['total_items'] = total
@@ -2729,7 +2730,7 @@ class Daemon(metaclass=JSONRPCServerType):
# check that the holding_address hasn't changed since the export was made
holding_address = data['holding_address']
channels, _, _ = await self.ledger.claim_search(
channels, _, _, _ = await self.ledger.claim_search(
wallet.accounts, public_key_id=self.ledger.public_key_to_address(public_key_der)
)
if channels and channels[0].get_address(self.ledger) != holding_address:
+26 -23
View File
@@ -136,18 +136,13 @@ def _get_lbry_file_stream_dict(rowid, added_on, stream_hash, file_name, download
def get_all_lbry_files(transaction: sqlite3.Connection) -> typing.List[typing.Dict]:
files = []
signed_claims = {}
stream_hashes_and_bt_infohashes = transaction.execute("select stream_hash, bt_infohash from file").fetchall()
stream_hashes = tuple(
stream_hash for stream_hash, _ in stream_hashes_and_bt_infohashes if stream_hash is not None
)
for (rowid, stream_hash, _, file_name, download_dir, data_rate, status, saved_file, raw_content_fee,
added_on, _, sd_hash, stream_key, stream_name, suggested_file_name, *claim_args) in _batched_select(
transaction, "select file.rowid, file.*, stream.*, c.* "
added_on, _, sd_hash, stream_key, stream_name, suggested_file_name, *claim_args) in transaction.execute(
"select file.rowid, file.*, stream.*, c.* "
"from file inner join stream on file.stream_hash=stream.stream_hash "
"inner join content_claim cc on file.stream_hash=cc.stream_hash "
"inner join claim c on cc.claim_outpoint=c.claim_outpoint "
"where file.stream_hash in {} "
"order by c.rowid desc", stream_hashes):
"order by c.rowid desc").fetchall():
claim = StoredContentClaim(*claim_args)
if claim.channel_claim_id:
if claim.channel_claim_id not in signed_claims:
@@ -539,22 +534,30 @@ class SQLiteStorage(SQLiteMixin):
Update files that have been removed from the downloads directory since the last run
"""
def update_manually_removed_files(transaction: sqlite3.Connection):
removed = []
for (stream_hash, download_directory, file_name) in transaction.execute(
"select stream_hash, download_directory, file_name from file where saved_file=1 "
files = {}
query = "select stream_hash, download_directory, file_name from file where saved_file=1 " \
"and stream_hash is not null"
).fetchall():
if download_directory and file_name and os.path.isfile(
os.path.join(binascii.unhexlify(download_directory).decode(),
binascii.unhexlify(file_name).decode())):
continue
removed.append((stream_hash,))
if removed:
transaction.executemany(
"update file set file_name=null, download_directory=null, saved_file=0 where stream_hash=?",
removed
).fetchall()
return await self.db.run(update_manually_removed_files)
for (stream_hash, download_directory, file_name) in transaction.execute(query).fetchall():
if download_directory and file_name:
files[stream_hash] = download_directory, file_name
return files
def detect_removed(files):
return [
stream_hash for stream_hash, (download_directory, file_name) in files.items()
if not os.path.isfile(os.path.join(binascii.unhexlify(download_directory).decode(),
binascii.unhexlify(file_name).decode()))
]
def update_db_removed(transaction: sqlite3.Connection, removed):
query = "update file set file_name=null, download_directory=null, saved_file=0 where stream_hash in {}"
for cur in _batched_select(transaction, query, removed):
cur.fetchall()
stream_and_file = await self.db.run(update_manually_removed_files)
removed = await self.loop.run_in_executor(None, detect_removed, stream_and_file)
if removed:
await self.db.run(update_db_removed, removed)
def get_all_lbry_files(self) -> typing.Awaitable[typing.List[typing.Dict]]:
return self.db.run(get_all_lbry_files)
+1 -1
View File
@@ -1,5 +1,5 @@
build:
rm types/v2/* -rf
touch types/v2/__init__.py
cd types/v2/ && protoc --python_out=. -I ../../../../../../types/v2/proto/ ../../../../../../types/v2/proto/*.proto
cd types/v2/ && protoc --python_out=. -I ../../../../../types/v2/proto/ ../../../../../types/v2/proto/*.proto
sed -e 's/^import\ \(.*\)_pb2\ /from . import\ \1_pb2\ /g' -i types/v2/*.py
+65 -8
View File
@@ -1,28 +1,75 @@
import base64
import struct
from typing import List, Optional, Tuple
from typing import List
from binascii import hexlify
from itertools import chain
from lbry.schema.types.v2.result_pb2 import Outputs as OutputsMessage
class Censor:
__slots__ = 'streams', 'channels', 'censored', 'total'
def __init__(self, streams: dict = None, channels: dict = None):
self.streams = streams or {}
self.channels = channels or {}
self.censored = {}
self.total = 0
def censor(self, row) -> bool:
was_censored = False
for claim_hash, lookup in (
(row['claim_hash'], self.streams),
(row['claim_hash'], self.channels),
(row['channel_hash'], self.channels)):
censoring_channel_hash = lookup.get(claim_hash)
if censoring_channel_hash:
was_censored = True
self.censored.setdefault(censoring_channel_hash, 0)
self.censored[censoring_channel_hash] += 1
break
if was_censored:
self.total += 1
return was_censored
def to_message(self, outputs: OutputsMessage):
outputs.blocked_total = self.total
for censoring_channel_hash, count in self.censored.items():
block = outputs.blocked.add()
block.count = count
block.channel_hash = censoring_channel_hash
class Outputs:
__slots__ = 'txos', 'extra_txos', 'txs', 'offset', 'total'
__slots__ = 'txos', 'extra_txos', 'txs', 'offset', 'total', 'blocked', 'blocked_total'
def __init__(self, txos: List, extra_txos: List, txs: set, offset: int, total: int):
def __init__(self, txos: List, extra_txos: List, txs: set,
offset: int, total: int, blocked: List, blocked_total: int):
self.txos = txos
self.txs = txs
self.extra_txos = extra_txos
self.offset = offset
self.total = total
self.blocked = blocked
self.blocked_total = blocked_total
def inflate(self, txs):
tx_map = {tx.hash: tx for tx in txs}
for txo_message in self.extra_txos:
self.message_to_txo(txo_message, tx_map)
return [self.message_to_txo(txo_message, tx_map) for txo_message in self.txos]
txos = [self.message_to_txo(txo_message, tx_map) for txo_message in self.txos]
return txos, self.inflate_blocked()
def inflate_blocked(self):
return {
"total": self.blocked_total,
"channels": {
hexlify(message.channel_hash[::-1]).decode(): message.count
for message in self.blocked
}
}
def message_to_txo(self, txo_message, tx_map):
if txo_message.WhichOneof('meta') == 'error':
@@ -70,18 +117,24 @@ class Outputs:
if txo_message.WhichOneof('meta') == 'error':
continue
txs.add((hexlify(txo_message.tx_hash[::-1]).decode(), txo_message.height))
return cls(outputs.txos, outputs.extra_txos, txs, outputs.offset, outputs.total)
return cls(
outputs.txos, outputs.extra_txos, txs,
outputs.offset, outputs.total,
outputs.blocked, outputs.blocked_total
)
@classmethod
def to_base64(cls, txo_rows, extra_txo_rows, offset=0, total=None) -> str:
return base64.b64encode(cls.to_bytes(txo_rows, extra_txo_rows, offset, total)).decode()
def to_base64(cls, txo_rows, extra_txo_rows, offset=0, total=None, blocked=None) -> str:
return base64.b64encode(cls.to_bytes(txo_rows, extra_txo_rows, offset, total, blocked)).decode()
@classmethod
def to_bytes(cls, txo_rows, extra_txo_rows, offset=0, total=None) -> bytes:
def to_bytes(cls, txo_rows, extra_txo_rows, offset=0, total=None, blocked: Censor = None) -> bytes:
page = OutputsMessage()
page.offset = offset
if total is not None:
page.total = total
if blocked is not None:
blocked.to_message(page)
for row in txo_rows:
cls.row_to_message(row, page.txos.add(), extra_txo_rows)
for row in extra_txo_rows:
@@ -121,6 +174,10 @@ class Outputs:
cls.set_reference(txo_message, 'channel', txo['channel_hash'], extra_txo_rows)
cls.set_reference(txo_message, 'repost', txo['reposted_claim_hash'], extra_txo_rows)
@staticmethod
def set_blocked(message, blocked):
message.blocked_total = blocked.total
@staticmethod
def set_reference(message, attr, claim_hash, rows):
if claim_hash:
File diff suppressed because it is too large. Load diff
+4 -4
View File
@@ -7,6 +7,7 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
@@ -18,9 +19,9 @@ DESCRIPTOR = _descriptor.FileDescriptor(
name='purchase.proto',
package='pb',
syntax='proto3',
serialized_options=None,
serialized_pb=_b('\n\x0epurchase.proto\x12\x02pb\"\x1e\n\x08Purchase\x12\x12\n\nclaim_hash\x18\x01 \x01(\x0c\x62\x06proto3')
)
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
@@ -38,14 +39,14 @@ _PURCHASE = _descriptor.Descriptor(
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
@@ -56,7 +57,6 @@ _PURCHASE = _descriptor.Descriptor(
)
DESCRIPTOR.message_types_by_name['Purchase'] = _PURCHASE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Purchase = _reflection.GeneratedProtocolMessageType('Purchase', (_message.Message,), dict(
DESCRIPTOR = _PURCHASE,
+122 -49
View File
@@ -7,6 +7,7 @@ from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
@@ -18,9 +19,9 @@ DESCRIPTOR = _descriptor.FileDescriptor(
name='result.proto',
package='pb',
syntax='proto3',
serialized_options=None,
serialized_pb=_b('\n\x0cresult.proto\x12\x02pb\"b\n\x07Outputs\x12\x18\n\x04txos\x18\x01 \x03(\x0b\x32\n.pb.Output\x12\x1e\n\nextra_txos\x18\x02 \x03(\x0b\x32\n.pb.Output\x12\r\n\x05total\x18\x03 \x01(\r\x12\x0e\n\x06offset\x18\x04 \x01(\r\"{\n\x06Output\x12\x0f\n\x07tx_hash\x18\x01 \x01(\x0c\x12\x0c\n\x04nout\x18\x02 \x01(\r\x12\x0e\n\x06height\x18\x03 \x01(\r\x12\x1e\n\x05\x63laim\x18\x07 \x01(\x0b\x32\r.pb.ClaimMetaH\x00\x12\x1a\n\x05\x65rror\x18\x0f \x01(\x0b\x32\t.pb.ErrorH\x00\x42\x06\n\x04meta\"\xaf\x03\n\tClaimMeta\x12\x1b\n\x07\x63hannel\x18\x01 \x01(\x0b\x32\n.pb.Output\x12\x1a\n\x06repost\x18\x02 \x01(\x0b\x32\n.pb.Output\x12\x11\n\tshort_url\x18\x03 \x01(\t\x12\x15\n\rcanonical_url\x18\x04 \x01(\t\x12\x16\n\x0eis_controlling\x18\x05 \x01(\x08\x12\x18\n\x10take_over_height\x18\x06 \x01(\r\x12\x17\n\x0f\x63reation_height\x18\x07 \x01(\r\x12\x19\n\x11\x61\x63tivation_height\x18\x08 \x01(\r\x12\x19\n\x11\x65xpiration_height\x18\t \x01(\r\x12\x19\n\x11\x63laims_in_channel\x18\n \x01(\r\x12\x10\n\x08reposted\x18\x0b \x01(\r\x12\x18\n\x10\x65\x66\x66\x65\x63tive_amount\x18\x14 \x01(\x04\x12\x16\n\x0esupport_amount\x18\x15 \x01(\x04\x12\x16\n\x0etrending_group\x18\x16 \x01(\r\x12\x16\n\x0etrending_mixed\x18\x17 \x01(\x02\x12\x16\n\x0etrending_local\x18\x18 \x01(\x02\x12\x17\n\x0ftrending_global\x18\x19 \x01(\x02\"i\n\x05\x45rror\x12\x1c\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x0e.pb.Error.Code\x12\x0c\n\x04text\x18\x02 \x01(\t\"4\n\x04\x43ode\x12\x10\n\x0cUNKNOWN_CODE\x10\x00\x12\r\n\tNOT_FOUND\x10\x01\x12\x0b\n\x07INVALID\x10\x02\x62\x06proto3')
serialized_pb=_b('\n\x0cresult.proto\x12\x02pb\"\x97\x01\n\x07Outputs\x12\x18\n\x04txos\x18\x01 \x03(\x0b\x32\n.pb.Output\x12\x1e\n\nextra_txos\x18\x02 \x03(\x0b\x32\n.pb.Output\x12\r\n\x05total\x18\x03 \x01(\r\x12\x0e\n\x06offset\x18\x04 \x01(\r\x12\x1c\n\x07\x62locked\x18\x05 \x03(\x0b\x32\x0b.pb.Blocked\x12\x15\n\rblocked_total\x18\x06 \x01(\r\"{\n\x06Output\x12\x0f\n\x07tx_hash\x18\x01 \x01(\x0c\x12\x0c\n\x04nout\x18\x02 \x01(\r\x12\x0e\n\x06height\x18\x03 \x01(\r\x12\x1e\n\x05\x63laim\x18\x07 \x01(\x0b\x32\r.pb.ClaimMetaH\x00\x12\x1a\n\x05\x65rror\x18\x0f \x01(\x0b\x32\t.pb.ErrorH\x00\x42\x06\n\x04meta\"\xaf\x03\n\tClaimMeta\x12\x1b\n\x07\x63hannel\x18\x01 \x01(\x0b\x32\n.pb.Output\x12\x1a\n\x06repost\x18\x02 \x01(\x0b\x32\n.pb.Output\x12\x11\n\tshort_url\x18\x03 \x01(\t\x12\x15\n\rcanonical_url\x18\x04 \x01(\t\x12\x16\n\x0eis_controlling\x18\x05 \x01(\x08\x12\x18\n\x10take_over_height\x18\x06 \x01(\r\x12\x17\n\x0f\x63reation_height\x18\x07 \x01(\r\x12\x19\n\x11\x61\x63tivation_height\x18\x08 \x01(\r\x12\x19\n\x11\x65xpiration_height\x18\t \x01(\r\x12\x19\n\x11\x63laims_in_channel\x18\n \x01(\r\x12\x10\n\x08reposted\x18\x0b \x01(\r\x12\x18\n\x10\x65\x66\x66\x65\x63tive_amount\x18\x14 \x01(\x04\x12\x16\n\x0esupport_amount\x18\x15 \x01(\x04\x12\x16\n\x0etrending_group\x18\x16 \x01(\r\x12\x16\n\x0etrending_mixed\x18\x17 \x01(\x02\x12\x16\n\x0etrending_local\x18\x18 \x01(\x02\x12\x17\n\x0ftrending_global\x18\x19 \x01(\x02\"\x94\x01\n\x05\x45rror\x12\x1c\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x0e.pb.Error.Code\x12\x0c\n\x04text\x18\x02 \x01(\t\x12\x1c\n\x07\x62locked\x18\x03 \x01(\x0b\x32\x0b.pb.Blocked\"A\n\x04\x43ode\x12\x10\n\x0cUNKNOWN_CODE\x10\x00\x12\r\n\tNOT_FOUND\x10\x01\x12\x0b\n\x07INVALID\x10\x02\x12\x0b\n\x07\x42LOCKED\x10\x03\".\n\x07\x42locked\x12\r\n\x05\x63ount\x18\x01 \x01(\r\x12\x14\n\x0c\x63hannel_hash\x18\x02 \x01(\x0c\x62\x06proto3')
)
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
@@ -32,21 +33,25 @@ _ERROR_CODE = _descriptor.EnumDescriptor(
values=[
_descriptor.EnumValueDescriptor(
name='UNKNOWN_CODE', index=0, number=0,
serialized_options=None,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='NOT_FOUND', index=1, number=1,
serialized_options=None,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='INVALID', index=2, number=2,
serialized_options=None,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='BLOCKED', index=3, number=3,
options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=732,
serialized_end=784,
options=None,
serialized_start=817,
serialized_end=882,
)
_sym_db.RegisterEnumDescriptor(_ERROR_CODE)
@@ -64,42 +69,56 @@ _OUTPUTS = _descriptor.Descriptor(
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='extra_txos', full_name='pb.Outputs.extra_txos', index=1,
number=2, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='total', full_name='pb.Outputs.total', index=2,
number=3, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='offset', full_name='pb.Outputs.offset', index=3,
number=4, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='blocked', full_name='pb.Outputs.blocked', index=4,
number=5, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='blocked_total', full_name='pb.Outputs.blocked_total', index=5,
number=6, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=20,
serialized_end=118,
serialized_start=21,
serialized_end=172,
)
@@ -116,42 +135,42 @@ _OUTPUT = _descriptor.Descriptor(
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='nout', full_name='pb.Output.nout', index=1,
number=2, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='height', full_name='pb.Output.height', index=2,
number=3, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='claim', full_name='pb.Output.claim', index=3,
number=7, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='error', full_name='pb.Output.error', index=4,
number=15, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
@@ -160,8 +179,8 @@ _OUTPUT = _descriptor.Descriptor(
name='meta', full_name='pb.Output.meta',
index=0, containing_type=None, fields=[]),
],
serialized_start=120,
serialized_end=243,
serialized_start=174,
serialized_end=297,
)
@@ -178,133 +197,133 @@ _CLAIMMETA = _descriptor.Descriptor(
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='repost', full_name='pb.ClaimMeta.repost', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='short_url', full_name='pb.ClaimMeta.short_url', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='canonical_url', full_name='pb.ClaimMeta.canonical_url', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='is_controlling', full_name='pb.ClaimMeta.is_controlling', index=4,
number=5, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='take_over_height', full_name='pb.ClaimMeta.take_over_height', index=5,
number=6, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='creation_height', full_name='pb.ClaimMeta.creation_height', index=6,
number=7, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='activation_height', full_name='pb.ClaimMeta.activation_height', index=7,
number=8, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='expiration_height', full_name='pb.ClaimMeta.expiration_height', index=8,
number=9, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='claims_in_channel', full_name='pb.ClaimMeta.claims_in_channel', index=9,
number=10, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='reposted', full_name='pb.ClaimMeta.reposted', index=10,
number=11, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='effective_amount', full_name='pb.ClaimMeta.effective_amount', index=11,
number=20, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='support_amount', full_name='pb.ClaimMeta.support_amount', index=12,
number=21, type=4, cpp_type=4, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='trending_group', full_name='pb.ClaimMeta.trending_group', index=13,
number=22, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='trending_mixed', full_name='pb.ClaimMeta.trending_mixed', index=14,
number=23, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='trending_local', full_name='pb.ClaimMeta.trending_local', index=15,
number=24, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='trending_global', full_name='pb.ClaimMeta.trending_global', index=16,
number=25, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=246,
serialized_end=677,
serialized_start=300,
serialized_end=731,
)
@@ -321,14 +340,21 @@ _ERROR = _descriptor.Descriptor(
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='text', full_name='pb.Error.text', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
options=None),
_descriptor.FieldDescriptor(
name='blocked', full_name='pb.Error.blocked', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
@@ -336,18 +362,57 @@ _ERROR = _descriptor.Descriptor(
enum_types=[
_ERROR_CODE,
],
serialized_options=None,
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=679,
serialized_end=784,
serialized_start=734,
serialized_end=882,
)
_BLOCKED = _descriptor.Descriptor(
name='Blocked',
full_name='pb.Blocked',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='count', full_name='pb.Blocked.count', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='channel_hash', full_name='pb.Blocked.channel_hash', index=1,
number=2, type=12, cpp_type=9, label=1,
has_default_value=False, default_value=_b(""),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=884,
serialized_end=930,
)
_OUTPUTS.fields_by_name['txos'].message_type = _OUTPUT
_OUTPUTS.fields_by_name['extra_txos'].message_type = _OUTPUT
_OUTPUTS.fields_by_name['blocked'].message_type = _BLOCKED
_OUTPUT.fields_by_name['claim'].message_type = _CLAIMMETA
_OUTPUT.fields_by_name['error'].message_type = _ERROR
_OUTPUT.oneofs_by_name['meta'].fields.append(
@@ -359,12 +424,13 @@ _OUTPUT.fields_by_name['error'].containing_oneof = _OUTPUT.oneofs_by_name['meta'
_CLAIMMETA.fields_by_name['channel'].message_type = _OUTPUT
_CLAIMMETA.fields_by_name['repost'].message_type = _OUTPUT
_ERROR.fields_by_name['code'].enum_type = _ERROR_CODE
_ERROR.fields_by_name['blocked'].message_type = _BLOCKED
_ERROR_CODE.containing_type = _ERROR
DESCRIPTOR.message_types_by_name['Outputs'] = _OUTPUTS
DESCRIPTOR.message_types_by_name['Output'] = _OUTPUT
DESCRIPTOR.message_types_by_name['ClaimMeta'] = _CLAIMMETA
DESCRIPTOR.message_types_by_name['Error'] = _ERROR
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
DESCRIPTOR.message_types_by_name['Blocked'] = _BLOCKED
Outputs = _reflection.GeneratedProtocolMessageType('Outputs', (_message.Message,), dict(
DESCRIPTOR = _OUTPUTS,
@@ -394,5 +460,12 @@ Error = _reflection.GeneratedProtocolMessageType('Error', (_message.Message,), d
))
_sym_db.RegisterMessage(Error)
Blocked = _reflection.GeneratedProtocolMessageType('Blocked', (_message.Message,), dict(
DESCRIPTOR = _BLOCKED,
__module__ = 'result_pb2'
# @@protoc_insertion_point(class_scope:pb.Blocked)
))
_sym_db.RegisterMessage(Blocked)
# @@protoc_insertion_point(module_scope)
+1
View File
@@ -144,6 +144,7 @@ class StreamManager:
to_recover.append(file_info)
to_start.append(file_info)
if to_recover:
log.info("Recover %i files", len(to_recover))
await self.recover_streams(to_recover)
log.info("Initializing %i files", len(to_start))
+11 -7
View File
@@ -271,7 +271,7 @@ class Ledger(metaclass=LedgerRegistry):
async def get_local_status_and_history(self, address, history=None):
if not history:
address_details = await self.db.get_address(address=address)
history = address_details['history'] or ''
history = (address_details['history'] if address_details else '') or ''
parts = history.split(':')[:-1]
return (
hexlify(sha256(history.encode())).decode() if history else None,
@@ -616,9 +616,12 @@ class Ledger(metaclass=LedgerRegistry):
)) for address_record in records
], timeout=timeout)
if pending:
records = await self.db.get_addresses(address__in=addresses)
for record in records:
found = False
_, local_history = await self.get_local_status_and_history(None, history=record['history'])
local_history = (await self.get_local_status_and_history(
record['address'], history=record['history']
))[1] if record['history'] else []
for txid, local_height in local_history:
if txid == tx.id and local_height >= height:
found = True
@@ -626,7 +629,7 @@ class Ledger(metaclass=LedgerRegistry):
print(record['history'], addresses, tx.id)
raise asyncio.TimeoutError('Timed out waiting for transaction.')
async def _inflate_outputs(self, query, accounts):
async def _inflate_outputs(self, query, accounts) -> Tuple[List[Output], dict, int, int]:
outputs = Outputs.from_base64(await query)
txs = []
if len(outputs.txs) > 0:
@@ -649,7 +652,8 @@ class Ledger(metaclass=LedgerRegistry):
}
for txo in priced_claims:
txo.purchase_receipt = receipts.get(txo.claim_id)
return outputs.inflate(txs), outputs.offset, outputs.total
txos, blocked = outputs.inflate(txs)
return txos, blocked, outputs.offset, outputs.total
async def resolve(self, accounts, urls):
resolve = partial(self.network.retriable_call, self.network.resolve)
@@ -666,7 +670,7 @@ class Ledger(metaclass=LedgerRegistry):
result[url] = {'error': f'{url} did not resolve to a claim'}
return result
async def claim_search(self, accounts, **kwargs) -> Tuple[List[Output], int, int]:
async def claim_search(self, accounts, **kwargs) -> Tuple[List[Output], dict, int, int]:
return await self._inflate_outputs(self.network.claim_search(**kwargs), accounts)
async def get_claim_by_claim_id(self, accounts, claim_id) -> Output:
@@ -714,7 +718,7 @@ class Ledger(metaclass=LedgerRegistry):
if resolve:
claim_ids = [p.purchased_claim_id for p in purchases]
try:
resolved, _, _ = await self.claim_search([], claim_ids=claim_ids)
resolved, _, _, _ = await self.claim_search([], claim_ids=claim_ids)
except Exception as err:
if isinstance(err, asyncio.CancelledError): # TODO: remove when updated to 3.8
raise
@@ -749,7 +753,7 @@ class Ledger(metaclass=LedgerRegistry):
async def resolve_collection(self, collection, offset=0, page_size=1):
claim_ids = collection.claim.collection.claims.ids[offset:page_size+offset]
try:
resolve_results, _, _ = await self.claim_search([], claim_ids=claim_ids)
resolve_results, _, _, _ = await self.claim_search([], claim_ids=claim_ids)
except Exception as err:
if isinstance(err, asyncio.CancelledError): # TODO: remove when updated to 3.8
raise
+12 -2
View File
@@ -5,6 +5,7 @@ from operator import itemgetter
from typing import Dict, Optional, Tuple
from lbry import __version__
from lbry.error import IncompatibleWalletServerError
from lbry.wallet.rpc import RPCSession as BaseClientSession, Connector, RPCError, ProtocolError
from lbry.wallet.stream import StreamController
@@ -97,8 +98,13 @@ class ClientSession(BaseClientSession):
await self.ensure_server_version()
retry_delay = default_delay
except RPCError as e:
log.warning("Server error, ignoring for 1h: %s:%d -- %s", *self.server, e.message)
await self.close()
log.debug("Server error, ignoring for 1h: %s:%d -- %s", *self.server, e.message)
retry_delay = 60 * 60
except IncompatibleWalletServerError:
await self.close()
retry_delay = 60 * 60
log.debug("Wallet server has an incompatible version, retrying in 1h: %s:%d", *self.server)
except (asyncio.TimeoutError, OSError):
await self.close()
retry_delay = min(60, retry_delay * 2)
@@ -112,9 +118,12 @@ class ClientSession(BaseClientSession):
async def ensure_server_version(self, required=None, timeout=3):
required = required or self.network.PROTOCOL_VERSION
return await asyncio.wait_for(
response = await asyncio.wait_for(
self.send_request('server.version', [__version__, required]), timeout=timeout
)
if tuple(int(piece) for piece in response[0].split(".")) < self.network.MINIMUM_REQUIRED:
raise IncompatibleWalletServerError(*self.server)
return response
async def create_connection(self, timeout=6):
connector = Connector(lambda: self, *self.server)
@@ -139,6 +148,7 @@ class ClientSession(BaseClientSession):
class Network:
PROTOCOL_VERSION = __version__
MINIMUM_REQUIRED = (0, 54, 0)
def __init__(self, ledger):
self.ledger = ledger
+4 -4
View File
@@ -12,9 +12,9 @@ from lbry.wallet.server.util import cachedproperty, subclasses
from lbry.wallet.server.hash import Base58, hash160, double_sha256, hash_to_hex_str, HASHX_LEN
from lbry.wallet.server.daemon import Daemon, LBCDaemon
from lbry.wallet.server.script import ScriptPubKey, OpCodes
from lbry.wallet.server.leveldb import DB
from lbry.wallet.server.leveldb import LevelDB
from lbry.wallet.server.session import LBRYElectrumX, LBRYSessionManager
from lbry.wallet.server.db.writer import LBRYDB
from lbry.wallet.server.db.writer import LBRYLevelDB
from lbry.wallet.server.block_processor import LBRYBlockProcessor
@@ -41,7 +41,7 @@ class Coin:
DAEMON = Daemon
BLOCK_PROCESSOR = LBRYBlockProcessor
SESSION_MANAGER = LBRYSessionManager
DB = DB
DB = LevelDB
HEADER_VALUES = [
'version', 'prev_block_hash', 'merkle_root', 'timestamp', 'bits', 'nonce'
]
@@ -240,7 +240,7 @@ class LBC(Coin):
BLOCK_PROCESSOR = LBRYBlockProcessor
SESSION_MANAGER = LBRYSessionManager
DESERIALIZER = DeserializerSegWit
DB = LBRYDB
DB = LBRYLevelDB
NAME = "LBRY"
SHORTNAME = "LBC"
NET = "mainnet"
+77 -43
View File
@@ -14,7 +14,7 @@ from lbry.wallet.database import query, interpolate
from lbry.schema.url import URL, normalize_name
from lbry.schema.tags import clean_tags
from lbry.schema.result import Outputs
from lbry.schema.result import Outputs, Censor
from lbry.wallet import Ledger, RegTestLedger
from .common import CLAIM_TYPES, STREAM_TYPES, COMMON_TAGS
@@ -47,7 +47,7 @@ INTEGER_PARAMS = {
SEARCH_PARAMS = {
'name', 'text', 'claim_id', 'claim_ids', 'txid', 'nout', 'channel', 'channel_ids', 'not_channel_ids',
'public_key_id', 'claim_type', 'stream_types', 'media_types', 'fee_currency',
'has_channel_signature', 'signature_valid', 'blocklist_channel_ids',
'has_channel_signature', 'signature_valid',
'any_tags', 'all_tags', 'not_tags', 'reposted_claim_id',
'any_locations', 'all_locations', 'not_locations',
'any_languages', 'all_languages', 'not_languages',
@@ -70,6 +70,10 @@ class ReaderState:
ledger: Type[Ledger]
query_timeout: float
log: logging.Logger
blocked_streams: Dict
blocked_channels: Dict
filtered_streams: Dict
filtered_channels: Dict
def close(self):
self.db.close()
@@ -88,20 +92,37 @@ class ReaderState:
self.db.setprogresshandler(interruptor, 100)
def get_resolve_censor(self) -> Censor:
return Censor(self.blocked_streams, self.blocked_channels)
def get_search_censor(self) -> Censor:
return Censor(self.filtered_streams, self.filtered_channels)
ctx: ContextVar[Optional[ReaderState]] = ContextVar('ctx')
def initializer(log, _path, _ledger_name, query_timeout, _measure=False):
def row_factory(cursor, row):
return {
k[0]: (set(row[i].split(',')) if k[0] == 'tags' else row[i])
for i, k in enumerate(cursor.getdescription())
}
def initializer(log, _path, _ledger_name, query_timeout, _measure=False, block_and_filter=None):
db = apsw.Connection(_path, flags=apsw.SQLITE_OPEN_READONLY | apsw.SQLITE_OPEN_URI)
def row_factory(cursor, row):
return {k[0]: row[i] for i, k in enumerate(cursor.getdescription())}
db.setrowtrace(row_factory)
if block_and_filter:
blocked_streams, blocked_channels, filtered_streams, filtered_channels = block_and_filter
else:
blocked_streams = blocked_channels = filtered_streams = filtered_channels = {}
ctx.set(
ReaderState(
db=db, stack=[], metrics={}, is_tracking_metrics=_measure,
ledger=Ledger if _ledger_name == 'mainnet' else RegTestLedger,
query_timeout=query_timeout, log=log
query_timeout=query_timeout, log=log,
blocked_streams=blocked_streams, blocked_channels=blocked_channels,
filtered_streams=filtered_streams, filtered_channels=filtered_channels,
)
)
@@ -159,11 +180,28 @@ def encode_result(result):
@measure
def execute_query(sql, values) -> List:
def execute_query(sql, values, row_offset: int, row_limit: int, censor: Censor) -> List:
context = ctx.get()
context.set_query_timeout()
try:
return context.db.cursor().execute(sql, values).fetchall()
c = context.db.cursor()
def row_filter(cursor, row):
nonlocal row_offset
row = row_factory(cursor, row)
if len(row) > 1 and censor.censor(row):
return
if row_offset:
row_offset -= 1
return
return row
c.setrowtrace(row_filter)
i, rows = 0, []
for row in c.execute(sql, values):
i += 1
rows.append(row)
if i >= row_limit:
break
return rows
except apsw.Error as err:
plain_sql = interpolate(sql, values)
if context.is_tracking_metrics:
@@ -175,10 +213,13 @@ def execute_query(sql, values) -> List:
raise SQLiteOperationalError(context.metrics)
def _get_claims(cols, for_count=False, **constraints) -> Tuple[str, Dict]:
def claims_query(cols, for_count=False, **constraints) -> Tuple[str, Dict]:
if 'order_by' in constraints:
order_by_parts = constraints['order_by']
if isinstance(order_by_parts, str):
order_by_parts = [order_by_parts]
sql_order_by = []
for order_by in constraints['order_by']:
for order_by in order_by_parts:
is_asc = order_by.startswith('^')
column = order_by[1:] if is_asc else order_by
if column not in ORDER_FIELDS:
@@ -256,21 +297,6 @@ def _get_claims(cols, for_count=False, **constraints) -> Tuple[str, Dict]:
'claim.signature_valid__is_null': True,
'claim.channel_hash__not_in': not_channel_ids_binary
}
if 'blocklist_channel_ids' in constraints:
blocklist_ids = constraints.pop('blocklist_channel_ids')
if blocklist_ids:
blocking_channels = [
unhexlify(channel_id)[::-1] for channel_id in blocklist_ids
]
constraints.update({
f'$blocking_channel{i}': a for i, a in enumerate(blocking_channels)
})
blocklist = ', '.join([
f':$blocking_channel{i}' for i in range(len(blocking_channels))
])
constraints['claim.claim_hash__not_in#blocklist_channel_ids'] = f"""
SELECT reposted_claim_hash FROM claim WHERE channel_hash IN ({blocklist})
"""
if 'signature_valid' in constraints:
has_channel_signature = constraints.pop('has_channel_signature', False)
if has_channel_signature:
@@ -319,7 +345,7 @@ def _get_claims(cols, for_count=False, **constraints) -> Tuple[str, Dict]:
return query(select, **constraints)
def get_claims(cols, for_count=False, **constraints) -> List:
def select_claims(censor: Censor, cols: str, for_count=False, **constraints) -> List:
if 'channel' in constraints:
channel_url = constraints.pop('channel')
match = resolve_url(channel_url)
@@ -327,21 +353,24 @@ def get_claims(cols, for_count=False, **constraints) -> List:
constraints['channel_hash'] = match['claim_hash']
else:
return [{'row_count': 0}] if cols == 'count(*) as row_count' else []
sql, values = _get_claims(cols, for_count, **constraints)
return execute_query(sql, values)
row_offset = constraints.pop('offset', 0)
row_limit = constraints.pop('limit', 20)
sql, values = claims_query(cols, for_count, **constraints)
return execute_query(sql, values, row_offset, row_limit, censor)
@measure
def get_claims_count(**constraints) -> int:
def count_claims(**constraints) -> int:
constraints.pop('offset', None)
constraints.pop('limit', None)
constraints.pop('order_by', None)
count = get_claims('count(*) as row_count', for_count=True, **constraints)
count = select_claims(Censor(), 'count(*) as row_count', for_count=True, **constraints)
return count[0]['row_count']
def _search(**constraints):
return get_claims(
def search_claims(censor: Censor, **constraints) -> List:
return select_claims(
censor,
"""
claimtrie.claim_hash as is_controlling,
claimtrie.last_take_over_height,
@@ -359,48 +388,53 @@ def _search(**constraints):
)
def _get_referenced_rows(txo_rows: List[dict]):
def _get_referenced_rows(censor: Censor, txo_rows: List[dict]):
repost_hashes = set(filter(None, map(itemgetter('reposted_claim_hash'), txo_rows)))
channel_hashes = set(filter(None, map(itemgetter('channel_hash'), txo_rows)))
reposted_txos = []
if repost_hashes:
reposted_txos = _search(**{'claim.claim_hash__in': repost_hashes})
reposted_txos = search_claims(censor, **{'claim.claim_hash__in': repost_hashes})
channel_hashes |= set(filter(None, map(itemgetter('channel_hash'), reposted_txos)))
channel_txos = []
if channel_hashes:
channel_txos = _search(**{'claim.claim_hash__in': channel_hashes})
channel_txos = search_claims(censor, **{'claim.claim_hash__in': channel_hashes})
# channels must come first for client side inflation to work properly
return channel_txos + reposted_txos
@measure
def search(constraints) -> Tuple[List, List, int, int]:
def search(constraints) -> Tuple[List, List, int, int, Censor]:
assert set(constraints).issubset(SEARCH_PARAMS), \
f"Search query contains invalid arguments: {set(constraints).difference(SEARCH_PARAMS)}"
total = None
if not constraints.pop('no_totals', False):
total = get_claims_count(**constraints)
total = count_claims(**constraints)
constraints['offset'] = abs(constraints.get('offset', 0))
constraints['limit'] = min(abs(constraints.get('limit', 10)), 50)
if 'order_by' not in constraints:
constraints['order_by'] = ["claim_hash"]
txo_rows = _search(**constraints)
extra_txo_rows = _get_referenced_rows(txo_rows)
return txo_rows, extra_txo_rows, constraints['offset'], total
context = ctx.get()
search_censor = context.get_search_censor()
txo_rows = search_claims(search_censor, **constraints)
extra_txo_rows = _get_referenced_rows(context.get_resolve_censor(), txo_rows)
return txo_rows, extra_txo_rows, constraints['offset'], total, search_censor
@measure
def resolve(urls) -> Tuple[List, List]:
txo_rows = [resolve_url(raw_url) for raw_url in urls]
extra_txo_rows = _get_referenced_rows([r for r in txo_rows if isinstance(r, dict)])
extra_txo_rows = _get_referenced_rows(
ctx.get().get_resolve_censor(), [r for r in txo_rows if isinstance(r, dict)]
)
return txo_rows, extra_txo_rows
@measure
def resolve_url(raw_url):
censor = ctx.get().get_resolve_censor()
try:
url = URL.parse(raw_url)
@@ -415,7 +449,7 @@ def resolve_url(raw_url):
query['is_controlling'] = True
else:
query['order_by'] = ['^creation_height']
matches = _search(**query, limit=1)
matches = search_claims(censor, **query, limit=1)
if matches:
channel = matches[0]
else:
@@ -433,7 +467,7 @@ def resolve_url(raw_url):
query['signature_valid'] = 1
elif set(query) == {'name'}:
query['is_controlling'] = 1
matches = _search(**query, limit=1)
matches = search_claims(censor, **query, limit=1)
if matches:
return matches[0]
else:
+71 -5
View File
@@ -4,8 +4,10 @@ from typing import Union, Tuple, Set, List
from itertools import chain
from decimal import Decimal
from collections import namedtuple
from multiprocessing import Manager
from binascii import unhexlify
from lbry.wallet.server.leveldb import DB
from lbry.wallet.server.leveldb import LevelDB
from lbry.wallet.server.util import class_logger
from lbry.wallet.database import query, constraints_to_sql
@@ -136,6 +138,10 @@ class SQLDB:
create unique index if not exists filter_fee_amount_order_release_time_idx on claim (fee_amount, release_time, claim_hash);
create unique index if not exists claim_type_trending_idx on claim (claim_type, trending_global, trending_mixed, claim_hash);
create unique index if not exists claim_type_release_idx on claim (claim_type, release_time, claim_hash);
create unique index if not exists claim_type_effective_amount_idx on claim (claim_type, effective_amount, claim_hash);
create unique index if not exists channel_hash_release_time_idx on claim (channel_hash, release_time, claim_hash);
-- TODO: verify that all indexes below are used
create index if not exists claim_height_normalized_idx on claim (height, normalized asc);
@@ -166,13 +172,24 @@ class SQLDB:
CREATE_TAG_TABLE
)
def __init__(self, main, path):
def __init__(self, main, path: str, blocking_channels: list, filtering_channels: list):
self.main = main
self._db_path = path
self.db = None
self.logger = class_logger(__name__, self.__class__.__name__)
self.ledger = Ledger if self.main.coin.NET == 'mainnet' else RegTestLedger
self.ledger = Ledger if main.coin.NET == 'mainnet' else RegTestLedger
self._fts_synced = False
self.state_manager = None
self.blocked_streams = None
self.blocked_channels = None
self.blocking_channel_hashes = {
unhexlify(channel_id)[::-1] for channel_id in blocking_channels if channel_id
}
self.filtered_streams = None
self.filtered_channels = None
self.filtering_channel_hashes = {
unhexlify(channel_id)[::-1] for channel_id in filtering_channels if channel_id
}
def open(self):
self.db = apsw.Connection(
@@ -192,10 +209,47 @@ class SQLDB:
self.execute(self.CREATE_TABLES_QUERY)
register_canonical_functions(self.db)
register_trending_functions(self.db)
self.state_manager = Manager()
self.blocked_streams = self.state_manager.dict()
self.blocked_channels = self.state_manager.dict()
self.filtered_streams = self.state_manager.dict()
self.filtered_channels = self.state_manager.dict()
self.update_blocked_and_filtered_claims()
def close(self):
if self.db is not None:
self.db.close()
if self.state_manager is not None:
self.state_manager.shutdown()
def update_blocked_and_filtered_claims(self):
self.update_claims_from_channel_hashes(
self.blocked_streams, self.blocked_channels, self.blocking_channel_hashes
)
self.update_claims_from_channel_hashes(
self.filtered_streams, self.filtered_channels, self.filtering_channel_hashes
)
self.filtered_streams.update(self.blocked_streams)
self.filtered_channels.update(self.blocked_channels)
def update_claims_from_channel_hashes(self, shared_streams, shared_channels, channel_hashes):
sql = query(
"SELECT claim.channel_hash, claim.reposted_claim_hash, reposted.claim_type "
"FROM claim JOIN claim AS reposted ON (reposted.claim_hash=claim.reposted_claim_hash)", **{
'claim.reposted_claim_hash__is_not_null': 1,
'claim.channel_hash__in': channel_hashes
}
)
streams, channels = {}, {}
for blocked_claim in self.execute(*sql):
if blocked_claim.claim_type == CLAIM_TYPES['stream']:
streams[blocked_claim.reposted_claim_hash] = blocked_claim.channel_hash
elif blocked_claim.claim_type == CLAIM_TYPES['channel']:
channels[blocked_claim.reposted_claim_hash] = blocked_claim.channel_hash
shared_streams.clear()
shared_streams.update(streams)
shared_channels.clear()
shared_channels.update(channels)
@staticmethod
def _insert_sql(table: str, data: dict) -> Tuple[str, list]:
@@ -585,6 +639,13 @@ class SQLDB:
""", [(channel_hash,) for channel_hash in all_channel_keys.keys()])
sub_timer.stop()
sub_timer = timer.add_timer('update blocked claims list')
sub_timer.start()
if (self.blocking_channel_hashes.intersection(all_channel_keys) or
self.filtering_channel_hashes.intersection(all_channel_keys)):
self.update_blocked_and_filtered_claims()
sub_timer.stop()
def _update_support_amount(self, claim_hashes):
if claim_hashes:
self.execute(f"""
@@ -778,12 +839,17 @@ class SQLDB:
self._fts_synced = True
class LBRYDB(DB):
class LBRYLevelDB(LevelDB):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
path = os.path.join(self.env.db_dir, 'claims.db')
self.sql = SQLDB(self, path)
# space separated list of channel URIs used for filtering bad content
self.sql = SQLDB(
self, path,
self.env.default('BLOCKING_CHANNELS_IDS', '').split(' '),
self.env.default('FILTERING_CHANNELS_IDS', '').split(' '),
)
def close(self):
super().close()
+1 -1
View File
@@ -47,7 +47,7 @@ class FlushData:
tip = attr.ib()
class DB:
class LevelDB:
"""Simple wrapper of the backend database for querying.
Performs no DB update, though the DB will be cleaned on opening if
+11 -12
View File
@@ -23,7 +23,7 @@ from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor
import lbry
from lbry.wallet.server.block_processor import LBRYBlockProcessor
from lbry.wallet.server.db.writer import LBRYDB
from lbry.wallet.server.db.writer import LBRYLevelDB
from lbry.wallet.server.db import reader
from lbry.wallet.server.websocket import AdminWebSocket
from lbry.wallet.server.metrics import ServerLoadData, APICallMetrics
@@ -39,8 +39,6 @@ from lbry.wallet.server.daemon import DaemonError
from lbry.wallet.server.peers import PeerManager
if typing.TYPE_CHECKING:
from lbry.wallet.server.env import Env
from lbry.wallet.server.leveldb import DB
from lbry.wallet.server.block_processor import BlockProcessor
from lbry.wallet.server.mempool import MemPool
from lbry.wallet.server.daemon import Daemon
@@ -119,7 +117,7 @@ class SessionGroup:
class SessionManager:
"""Holds global state about all sessions."""
def __init__(self, env: 'Env', db: 'DB', bp: 'BlockProcessor', daemon: 'Daemon', mempool: 'MemPool',
def __init__(self, env: 'Env', db: LBRYLevelDB, bp: LBRYBlockProcessor, daemon: 'Daemon', mempool: 'MemPool',
shutdown_event: asyncio.Event):
env.max_send = max(350000, env.max_send)
self.env = env
@@ -747,8 +745,13 @@ class LBRYSessionManager(SessionManager):
path = os.path.join(self.env.db_dir, 'claims.db')
args = dict(
initializer=reader.initializer,
initargs=(self.logger, path, self.env.coin.NET, self.env.database_query_timeout,
self.env.track_metrics)
initargs=(
self.logger, path, self.env.coin.NET, self.env.database_query_timeout,
self.env.track_metrics, (
self.db.sql.blocked_streams, self.db.sql.blocked_channels,
self.db.sql.filtered_streams, self.db.sql.filtered_channels
)
)
)
if self.env.max_query_workers is not None and self.env.max_query_workers == 0:
self.query_executor = ThreadPoolExecutor(max_workers=1, **args)
@@ -773,7 +776,7 @@ class LBRYSessionManager(SessionManager):
class LBRYElectrumX(SessionBase):
"""A TCP server that handles incoming Electrum connections."""
PROTOCOL_MIN = (0, 52, 0)
PROTOCOL_MIN = (0, 54, 0)
PROTOCOL_MAX = (0, 99, 0)
max_errors = math.inf # don't disconnect people for errors! let them happen...
session_mgr: LBRYSessionManager
@@ -791,10 +794,7 @@ class LBRYElectrumX(SessionBase):
# fixme: this is a rebase hack, we need to go through ChainState instead later
self.daemon = self.session_mgr.daemon
self.bp: LBRYBlockProcessor = self.session_mgr.bp
self.db: LBRYDB = self.bp.db
# space separated list of channel URIs used for filtering bad content
filtering_channels = self.env.default('FILTERING_CHANNELS_IDS', '')
self.filtering_channels_ids = list(filter(None, filtering_channels.split(' ')))
self.db: LBRYLevelDB = self.bp.db
@classmethod
def protocol_min_max_strings(cls):
@@ -934,7 +934,6 @@ class LBRYElectrumX(SessionBase):
async def claimtrie_search(self, **kwargs):
if kwargs:
kwargs.setdefault('blocklist_channel_ids', []).extend(self.filtering_channels_ids)
return await self.run_and_cache_query('search', reader.search_to_bytes, kwargs)
async def claimtrie_resolve(self, *urls):
+1 -1
View File
@@ -127,7 +127,7 @@ def release(args):
new_version = current_version.increment(args.action)
print(f' New Version: {new_version}')
previous_release = repo.release_from_tag(current_version.tag)
previous_release = repo.release_from_tag(args.start_tag or current_version.tag)
print(f' Changelog From: {previous_release.tag_name} ({previous_release.created_at})')
print()
+1 -1
View File
@@ -34,7 +34,7 @@ setup(
},
install_requires=[
'aiohttp==3.5.4',
'aioupnp==0.0.16',
'aioupnp==0.0.17',
'appdirs==1.4.3',
'certifi>=2018.11.29',
'colorama==0.3.7',
@@ -751,27 +751,33 @@ class StreamCommands(ClaimTestCase):
self.assertEqual(resolved['newstuff-again']['reposted_claim']['name'], 'newstuff')
async def test_filtering_channels_for_removing_content(self):
await self.channel_create('@badstuff', '1.0')
await self.stream_create('not_bad', '1.1', channel_name='@badstuff')
tx = await self.stream_create('too_bad', '1.1', channel_name='@badstuff')
claim_id = self.get_claim_id(tx)
await self.channel_create('@reposts', '1.0')
await self.stream_repost(claim_id, 'normal_repost', '1.2', channel_name='@reposts')
filtering1 = await self.channel_create('@filtering1', '1.0')
filtering1 = self.get_claim_id(filtering1)
await self.stream_repost(claim_id, 'filter1', '1.1', channel_name='@filtering1')
await self.conductor.spv_node.stop()
await self.conductor.spv_node.start(
self.conductor.blockchain_node, extraconf={'FILTERING_CHANNELS_IDS': filtering1}
await self.channel_create('@some_channel', '1.0')
await self.stream_create('good_content', '1.1', channel_name='@some_channel', tags=['good'])
bad_content_id = self.get_claim_id(
await self.stream_create('bad_content', '1.1', channel_name='@some_channel', tags=['bad'])
)
await self.ledger.stop()
await self.ledger.start()
filtered_claim_search = await self.claim_search(name='too_bad')
self.assertEqual(filtered_claim_search, [])
filtered_claim_search = await self.claim_search(name='not_bad')
self.assertEqual(len(filtered_claim_search), 1)
filtered_claim_search = await self.claim_search(name='normal_repost')
self.assertEqual(len(filtered_claim_search), 1)
blocking_channel_id = self.get_claim_id(
await self.channel_create('@filtering', '1.0')
)
self.conductor.spv_node.server.db.sql.filtering_channel_hashes.add(
unhexlify(blocking_channel_id)[::-1]
)
await self.stream_repost(bad_content_id, 'filter1', '1.1', channel_name='@filtering')
# search for blocked content directly
result = await self.out(self.daemon.jsonrpc_claim_search(name='bad_content'))
self.assertEqual([], result['items'])
self.assertEqual({"channels": {blocking_channel_id: 1}, "total": 1}, result['blocked'])
# search channel containing blocked content
result = await self.out(self.daemon.jsonrpc_claim_search(channel='@some_channel'))
self.assertEqual(1, len(result['items']))
self.assertEqual({"channels": {blocking_channel_id: 1}, "total": 1}, result['blocked'])
# content was filtered by not_tag before censoring
result = await self.out(self.daemon.jsonrpc_claim_search(channel='@some_channel', not_tags=["good", "bad"]))
self.assertEqual(0, len(result['items']))
self.assertEqual({"channels": {}, "total": 0}, result['blocked'])
async def test_publish_updates_file_list(self):
tx = await self.stream_create(title='created')
+6 -6
View File
@@ -25,7 +25,7 @@ class NetworkTests(IntegrationTestCase):
'hash_function': 'sha256',
'hosts': {},
'protocol_max': '0.99.0',
'protocol_min': '0.52.0',
'protocol_min': '0.54.0',
'pruning': None,
'description': '',
'payment_address': '',
@@ -44,7 +44,7 @@ class NetworkTests(IntegrationTestCase):
'hash_function': 'sha256',
'hosts': {},
'protocol_max': '0.99.0',
'protocol_min': '0.52.0',
'protocol_min': '0.54.0',
'pruning': None,
'description': 'Fastest server in the west.',
'payment_address': address,
@@ -54,8 +54,6 @@ class NetworkTests(IntegrationTestCase):
class ReconnectTests(IntegrationTestCase):
VERBOSITY = logging.WARN
async def test_multiple_servers(self):
# we have a secondary node that connects later, so
node2 = SPVNode(self.conductor.spv_module, node_number=2)
@@ -80,7 +78,7 @@ class ReconnectTests(IntegrationTestCase):
await self.ledger.stop()
initial_height = self.ledger.local_height_including_downloaded_height
await self.blockchain.generate(100)
while self.conductor.spv_node.server.bp.height < initial_height + 99: # off by 1
while self.conductor.spv_node.server.session_mgr.notified_height < initial_height + 99: # off by 1
await asyncio.sleep(0.1)
self.assertEqual(initial_height, self.ledger.local_height_including_downloaded_height)
# locks header processing so we make sure we are the only ones modifying it
@@ -147,7 +145,9 @@ class ServerPickingTestCase(AsyncioTestCase):
class FakeSession(RPCSession):
async def handle_request(self, request):
await asyncio.sleep(latency)
return {"height": 1}
if request.method == 'server.version':
return tuple(request.args)
return {'height': 1}
server = await self.loop.create_server(lambda: FakeSession(), host='127.0.0.1', port=port)
self.addCleanup(server.close)
return '127.0.0.1', port
+2 -1
View File
@@ -11,7 +11,7 @@ from lbry.dht.node import Node
from lbry.dht.peer import PeerManager, make_kademlia_peer
from lbry.dht.blob_announcer import BlobAnnouncer
from lbry.extras.daemon.storage import SQLiteStorage
from unittest import skip
class TestBlobAnnouncer(AsyncioTestCase):
async def setup_node(self, peer_addresses, address, node_id):
@@ -75,6 +75,7 @@ class TestBlobAnnouncer(AsyncioTestCase):
await peer.ping()
return peer
@skip("Something from a previous test is leaking into this test and causing it to fail intermittently")
async def test_announce_blobs(self):
blob1 = binascii.hexlify(b'1' * 48).decode()
blob2 = binascii.hexlify(b'2' * 48).decode()
+251 -28
View File
@@ -3,9 +3,11 @@ import ecdsa
import hashlib
import logging
from binascii import hexlify
from lbry.wallet.constants import COIN, NULL_HASH32
from typing import List, Tuple
from lbry.wallet.constants import COIN, NULL_HASH32
from lbry.schema.claim import Claim
from lbry.schema.result import Censor
from lbry.wallet.server.db import reader, writer
from lbry.wallet.server.coin import LBCRegTest
from lbry.wallet.server.db.trending import TRENDING_WINDOW
@@ -28,6 +30,15 @@ def get_tx():
return Transaction().add_inputs([get_input()])
def search(**constraints) -> List:
return reader.search_claims(Censor(), **constraints)
def censored_search(**constraints) -> Tuple[List, Censor]:
rows, _, _, _, censor = reader.search(constraints)
return rows, censor
class TestSQLDB(unittest.TestCase):
query_timeout = 0.25
@@ -36,10 +47,16 @@ class TestSQLDB(unittest.TestCase):
self.daemon_height = 1
self.coin = LBCRegTest()
db_url = 'file:test_sqldb?mode=memory&cache=shared'
self.sql = writer.SQLDB(self, db_url)
self.sql = writer.SQLDB(self, db_url, [], [])
self.addCleanup(self.sql.close)
self.sql.open()
reader.initializer(logging.getLogger(__name__), db_url, 'regtest', self.query_timeout)
reader.initializer(
logging.getLogger(__name__), db_url, 'regtest',
self.query_timeout, block_and_filter=(
self.sql.blocked_streams, self.sql.blocked_channels,
self.sql.filtered_streams, self.sql.filtered_channels
)
)
self.addCleanup(reader.cleanup)
self.timer = Timer('BlockProcessor')
self._current_height = 0
@@ -74,9 +91,9 @@ class TestSQLDB(unittest.TestCase):
Input.spend(channel)
)
def get_stream(self, title, amount, name='foo', channel=None):
def get_stream(self, title, amount, name='foo', channel=None, **kwargs):
claim = Claim()
claim.stream.title = title
claim.stream.update(title=title, **kwargs)
result = self._make_tx(Output.pay_claim_name_pubkey_hash(amount, name, claim, b'abc'))
if channel:
result[0].outputs[0].sign(channel)
@@ -96,6 +113,14 @@ class TestSQLDB(unittest.TestCase):
result[0]._reset()
return result
def get_repost(self, claim_id, amount, channel):
claim = Claim()
claim.repost.reference.claim_id = claim_id
result = self._make_tx(Output.pay_claim_name_pubkey_hash(amount, 'repost', claim, b'abc'))
result[0].outputs[0].sign(channel)
result[0]._reset()
return result
def get_abandon(self, tx):
claim = Transaction(tx[0].raw).outputs[0]
return self._make_tx(
@@ -319,7 +344,7 @@ class TestClaimtrie(TestSQLDB):
advance, state = self.advance, self.state
stream = self.get_stream('Claim A', 10*COIN)
advance(10, [stream, self.get_stream_update(stream, 11*COIN)])
self.assertTrue(reader._search())
self.assertTrue(search()[0])
def test_double_updates_in_same_block(self):
advance, state = self.advance, self.state
@@ -327,13 +352,13 @@ class TestClaimtrie(TestSQLDB):
advance(10, [stream])
update = self.get_stream_update(stream, 11*COIN)
advance(20, [update, self.get_stream_update(update, 9*COIN)])
self.assertTrue(reader._search())
self.assertTrue(search()[0])
def test_create_and_abandon_in_same_block(self):
advance, state = self.advance, self.state
stream = self.get_stream('Claim A', 10*COIN)
advance(10, [stream, self.get_abandon(stream)])
self.assertFalse(reader._search())
self.assertFalse(search())
def test_update_and_abandon_in_same_block(self):
advance, state = self.advance, self.state
@@ -341,14 +366,14 @@ class TestClaimtrie(TestSQLDB):
advance(10, [stream])
update = self.get_stream_update(stream, 11*COIN)
advance(20, [update, self.get_abandon(update)])
self.assertFalse(reader._search())
self.assertFalse(search())
def test_create_update_and_delete_in_same_block(self):
advance, state = self.advance, self.state
stream = self.get_stream('Claim A', 10*COIN)
update = self.get_stream_update(stream, 11*COIN)
advance(10, [stream, update, self.get_abandon(update)])
self.assertFalse(reader._search())
self.assertFalse(search())
def test_support_added_and_removed_in_same_block(self):
advance, state = self.advance, self.state
@@ -356,7 +381,7 @@ class TestClaimtrie(TestSQLDB):
advance(10, [stream])
support = self.get_support(stream, COIN)
advance(20, [support, self.get_abandon(support)])
self.assertEqual(reader._search()[0]['support_amount'], 0)
self.assertEqual(search()[0]['support_amount'], 0)
@staticmethod
def _get_x_with_claim_id_prefix(getter, prefix, cached_iteration=None, **kwargs):
@@ -385,7 +410,7 @@ class TestClaimtrie(TestSQLDB):
txo_chan_ab = tx_chan_ab[0].outputs[0]
advance(1, [tx_chan_a])
advance(2, [tx_chan_ab])
r_ab, r_a = reader._search(order_by=['creation_height'], limit=2)
(r_ab, r_a) = search(order_by=['creation_height'], limit=2)
self.assertEqual("@foo#a", r_a['short_url'])
self.assertEqual("@foo#ab", r_ab['short_url'])
self.assertIsNone(r_a['canonical_url'])
@@ -398,7 +423,7 @@ class TestClaimtrie(TestSQLDB):
tx_abc = self.get_stream_with_claim_id_prefix('abc', 65)
advance(3, [tx_a])
advance(4, [tx_ab, tx_abc])
r_abc, r_ab, r_a = reader._search(order_by=['creation_height', 'tx_position'], limit=3)
(r_abc, r_ab, r_a) = search(order_by=['creation_height', 'tx_position'], limit=3)
self.assertEqual("foo#a", r_a['short_url'])
self.assertEqual("foo#ab", r_ab['short_url'])
self.assertEqual("foo#abc", r_abc['short_url'])
@@ -412,51 +437,51 @@ class TestClaimtrie(TestSQLDB):
ab2_claim = tx_ab2[0].outputs[0]
advance(6, [tx_a2])
advance(7, [tx_ab2])
r_ab2, r_a2 = reader._search(order_by=['creation_height'], limit=2)
(r_ab2, r_a2) = search(order_by=['creation_height'], limit=2)
self.assertEqual(f"foo#{a2_claim.claim_id[:2]}", r_a2['short_url'])
self.assertEqual(f"foo#{ab2_claim.claim_id[:4]}", r_ab2['short_url'])
self.assertEqual("@foo#a/foo#a", r_a2['canonical_url'])
self.assertEqual("@foo#a/foo#ab", r_ab2['canonical_url'])
self.assertEqual(2, reader._search(claim_id=txo_chan_a.claim_id, limit=1)[0]['claims_in_channel'])
self.assertEqual(2, search(claim_id=txo_chan_a.claim_id, limit=1)[0]['claims_in_channel'])
# change channel public key, invaliding stream claim signatures
advance(8, [self.get_channel_update(txo_chan_a, COIN, key=b'a')])
r_ab2, r_a2 = reader._search(order_by=['creation_height'], limit=2)
(r_ab2, r_a2) = search(order_by=['creation_height'], limit=2)
self.assertEqual(f"foo#{a2_claim.claim_id[:2]}", r_a2['short_url'])
self.assertEqual(f"foo#{ab2_claim.claim_id[:4]}", r_ab2['short_url'])
self.assertIsNone(r_a2['canonical_url'])
self.assertIsNone(r_ab2['canonical_url'])
self.assertEqual(0, reader._search(claim_id=txo_chan_a.claim_id, limit=1)[0]['claims_in_channel'])
self.assertEqual(0, search(claim_id=txo_chan_a.claim_id, limit=1)[0]['claims_in_channel'])
# reinstate previous channel public key (previous stream claim signatures become valid again)
channel_update = self.get_channel_update(txo_chan_a, COIN, key=b'c')
advance(9, [channel_update])
r_ab2, r_a2 = reader._search(order_by=['creation_height'], limit=2)
(r_ab2, r_a2) = search(order_by=['creation_height'], limit=2)
self.assertEqual(f"foo#{a2_claim.claim_id[:2]}", r_a2['short_url'])
self.assertEqual(f"foo#{ab2_claim.claim_id[:4]}", r_ab2['short_url'])
self.assertEqual("@foo#a/foo#a", r_a2['canonical_url'])
self.assertEqual("@foo#a/foo#ab", r_ab2['canonical_url'])
self.assertEqual(2, reader._search(claim_id=txo_chan_a.claim_id, limit=1)[0]['claims_in_channel'])
self.assertEqual(0, reader._search(claim_id=txo_chan_ab.claim_id, limit=1)[0]['claims_in_channel'])
self.assertEqual(2, search(claim_id=txo_chan_a.claim_id, limit=1)[0]['claims_in_channel'])
self.assertEqual(0, search(claim_id=txo_chan_ab.claim_id, limit=1)[0]['claims_in_channel'])
# change channel of stream
self.assertEqual("@foo#a/foo#ab", reader._search(claim_id=ab2_claim.claim_id, limit=1)[0]['canonical_url'])
self.assertEqual("@foo#a/foo#ab", search(claim_id=ab2_claim.claim_id, limit=1)[0]['canonical_url'])
tx_ab2 = self.get_stream_update(tx_ab2, COIN, txo_chan_ab)
advance(10, [tx_ab2])
self.assertEqual("@foo#ab/foo#a", reader._search(claim_id=ab2_claim.claim_id, limit=1)[0]['canonical_url'])
self.assertEqual("@foo#ab/foo#a", search(claim_id=ab2_claim.claim_id, limit=1)[0]['canonical_url'])
# TODO: currently there is a bug where stream leaving a channel does not update that channels claims count
self.assertEqual(2, reader._search(claim_id=txo_chan_a.claim_id, limit=1)[0]['claims_in_channel'])
self.assertEqual(2, search(claim_id=txo_chan_a.claim_id, limit=1)[0]['claims_in_channel'])
# TODO: after bug is fixed remove test above and add test below
#self.assertEqual(1, reader._search(claim_id=txo_chan_a.claim_id, limit=1)[0]['claims_in_channel'])
self.assertEqual(1, reader._search(claim_id=txo_chan_ab.claim_id, limit=1)[0]['claims_in_channel'])
#self.assertEqual(1, search(claim_id=txo_chan_a.claim_id, limit=1)[0]['claims_in_channel'])
self.assertEqual(1, search(claim_id=txo_chan_ab.claim_id, limit=1)[0]['claims_in_channel'])
# claim abandon updates claims_in_channel
advance(11, [self.get_abandon(tx_ab2)])
self.assertEqual(0, reader._search(claim_id=txo_chan_ab.claim_id, limit=1)[0]['claims_in_channel'])
self.assertEqual(0, search(claim_id=txo_chan_ab.claim_id, limit=1)[0]['claims_in_channel'])
# delete channel, invaliding stream claim signatures
advance(12, [self.get_abandon(channel_update)])
r_a2, = reader._search(order_by=['creation_height'], limit=1)
(r_a2,) = search(order_by=['creation_height'], limit=1)
self.assertEqual(f"foo#{a2_claim.claim_id[:2]}", r_a2['short_url'])
self.assertIsNone(r_a2['canonical_url'])
@@ -514,7 +539,7 @@ class TestTrending(TestSQLDB):
self.get_support(up_medium, (20+(window*(2 if window == 7 else 1)))*COIN),
self.get_support(up_biggly, (20+(window*(3 if window == 7 else 1)))*COIN),
])
results = reader._search(order_by=['trending_local'])
results = search(order_by=['trending_local'])
self.assertEqual([c.claim_id for c in claims], [hexlify(c['claim_hash'][::-1]).decode() for c in results])
self.assertEqual([10, 6, 2, 0, -2], [int(c['trending_local']) for c in results])
self.assertEqual([53, 38, -32, 0, -6], [int(c['trending_global']) for c in results])
@@ -526,3 +551,201 @@ class TestTrending(TestSQLDB):
self.advance(1, [problematic])
self.advance(TRENDING_WINDOW, [self.get_support(problematic, 53000000000)])
self.advance(TRENDING_WINDOW * 2, [self.get_support(problematic, 500000000)])
class TestContentBlocking(TestSQLDB):
def test_blocking_and_filtering(self):
# content claims and channels
tx0 = self.get_channel('A Channel', COIN, '@channel1')
regular_channel = tx0[0].outputs[0]
tx1 = self.get_stream('Claim One', COIN, 'claim1')
tx2 = self.get_stream('Claim Two', COIN, 'claim2', regular_channel)
tx3 = self.get_stream('Claim Three', COIN, 'claim3')
self.advance(1, [tx0, tx1, tx2, tx3])
claim1, claim2, claim3 = tx1[0].outputs[0], tx2[0].outputs[0], tx3[0].outputs[0]
# block and filter channels
tx0 = self.get_channel('Blocking Channel', COIN, '@block')
tx1 = self.get_channel('Filtering Channel', COIN, '@filter')
blocking_channel = tx0[0].outputs[0]
filtering_channel = tx1[0].outputs[0]
self.sql.blocking_channel_hashes.add(blocking_channel.claim_hash)
self.sql.filtering_channel_hashes.add(filtering_channel.claim_hash)
self.advance(2, [tx0, tx1])
self.assertEqual({}, dict(self.sql.blocked_streams))
self.assertEqual({}, dict(self.sql.blocked_channels))
self.assertEqual({}, dict(self.sql.filtered_streams))
self.assertEqual({}, dict(self.sql.filtered_channels))
# nothing blocked
results, _ = reader.resolve([
claim1.claim_name, claim2.claim_name,
claim3.claim_name, regular_channel.claim_name
])
self.assertEqual(claim1.claim_hash, results[0]['claim_hash'])
self.assertEqual(claim2.claim_hash, results[1]['claim_hash'])
self.assertEqual(claim3.claim_hash, results[2]['claim_hash'])
self.assertEqual(regular_channel.claim_hash, results[3]['claim_hash'])
# nothing filtered
results, censor = censored_search()
self.assertEqual(6, len(results))
self.assertEqual(0, censor.total)
self.assertEqual({}, censor.censored)
# block claim reposted to blocking channel, also gets filtered
repost_tx1 = self.get_repost(claim1.claim_id, COIN, blocking_channel)
repost1 = repost_tx1[0].outputs[0]
self.advance(3, [repost_tx1])
self.assertEqual(
{repost1.claim.repost.reference.claim_hash: blocking_channel.claim_hash},
dict(self.sql.blocked_streams)
)
self.assertEqual({}, dict(self.sql.blocked_channels))
self.assertEqual(
{repost1.claim.repost.reference.claim_hash: blocking_channel.claim_hash},
dict(self.sql.filtered_streams)
)
self.assertEqual({}, dict(self.sql.filtered_channels))
# claim is blocked from results by direct repost
results, censor = censored_search(text='Claim')
self.assertEqual(2, len(results))
self.assertEqual(claim2.claim_hash, results[0]['claim_hash'])
self.assertEqual(claim3.claim_hash, results[1]['claim_hash'])
self.assertEqual(1, censor.total)
self.assertEqual({blocking_channel.claim_hash: 1}, censor.censored)
results, _ = reader.resolve([claim1.claim_name])
self.assertEqual('Could not find stream in "claim1".', results[0].args[0])
results, _ = reader.resolve([
claim2.claim_name, regular_channel.claim_name # claim2 and channel still resolved
])
self.assertEqual(claim2.claim_hash, results[0]['claim_hash'])
self.assertEqual(regular_channel.claim_hash, results[1]['claim_hash'])
# block claim indirectly by blocking its parent channel
repost_tx2 = self.get_repost(regular_channel.claim_id, COIN, blocking_channel)
repost2 = repost_tx2[0].outputs[0]
self.advance(4, [repost_tx2])
self.assertEqual(
{repost1.claim.repost.reference.claim_hash: blocking_channel.claim_hash},
dict(self.sql.blocked_streams)
)
self.assertEqual(
{repost2.claim.repost.reference.claim_hash: blocking_channel.claim_hash},
dict(self.sql.blocked_channels)
)
self.assertEqual(
{repost1.claim.repost.reference.claim_hash: blocking_channel.claim_hash},
dict(self.sql.filtered_streams)
)
self.assertEqual(
{repost2.claim.repost.reference.claim_hash: blocking_channel.claim_hash},
dict(self.sql.filtered_channels)
)
# claim in blocked channel is filtered from search and can't resolve
results, censor = censored_search(text='Claim')
self.assertEqual(1, len(results))
self.assertEqual(claim3.claim_hash, results[0]['claim_hash'])
self.assertEqual(2, censor.total)
self.assertEqual({blocking_channel.claim_hash: 2}, censor.censored)
results, _ = reader.resolve([
claim2.claim_name, regular_channel.claim_name # claim2 and channel don't resolve
])
self.assertEqual('Could not find stream in "claim2".', results[0].args[0])
self.assertEqual('Could not find channel in "@channel1".', results[1].args[0])
results, _ = reader.resolve([claim3.claim_name]) # claim3 still resolved
self.assertEqual(claim3.claim_hash, results[0]['claim_hash'])
# filtered claim is only filtered and not blocked
repost_tx3 = self.get_repost(claim3.claim_id, COIN, filtering_channel)
repost3 = repost_tx3[0].outputs[0]
self.advance(5, [repost_tx3])
self.assertEqual(
{repost1.claim.repost.reference.claim_hash: blocking_channel.claim_hash},
dict(self.sql.blocked_streams)
)
self.assertEqual(
{repost2.claim.repost.reference.claim_hash: blocking_channel.claim_hash},
dict(self.sql.blocked_channels)
)
self.assertEqual(
{repost1.claim.repost.reference.claim_hash: blocking_channel.claim_hash,
repost3.claim.repost.reference.claim_hash: filtering_channel.claim_hash},
dict(self.sql.filtered_streams)
)
self.assertEqual(
{repost2.claim.repost.reference.claim_hash: blocking_channel.claim_hash},
dict(self.sql.filtered_channels)
)
# filtered claim doesn't return in search but is resolveable
results, censor = censored_search(text='Claim')
self.assertEqual(0, len(results))
self.assertEqual(3, censor.total)
self.assertEqual({blocking_channel.claim_hash: 2, filtering_channel.claim_hash: 1}, censor.censored)
results, _ = reader.resolve([claim3.claim_name]) # claim3 still resolved
self.assertEqual(claim3.claim_hash, results[0]['claim_hash'])
# abandon unblocks content
self.advance(6, [
self.get_abandon(repost_tx1),
self.get_abandon(repost_tx2),
self.get_abandon(repost_tx3)
])
self.assertEqual({}, dict(self.sql.blocked_streams))
self.assertEqual({}, dict(self.sql.blocked_channels))
self.assertEqual({}, dict(self.sql.filtered_streams))
self.assertEqual({}, dict(self.sql.filtered_channels))
results, censor = censored_search(text='Claim')
self.assertEqual(3, len(results))
self.assertEqual(0, censor.total)
results, censor = censored_search()
self.assertEqual(6, len(results))
self.assertEqual(0, censor.total)
results, _ = reader.resolve([
claim1.claim_name, claim2.claim_name,
claim3.claim_name, regular_channel.claim_name
])
self.assertEqual(claim1.claim_hash, results[0]['claim_hash'])
self.assertEqual(claim2.claim_hash, results[1]['claim_hash'])
self.assertEqual(claim3.claim_hash, results[2]['claim_hash'])
self.assertEqual(regular_channel.claim_hash, results[3]['claim_hash'])
def test_pagination(self):
one, two, three, four, five, six, seven, filter_channel = self.advance(1, [
self.get_stream('One', COIN),
self.get_stream('Two', COIN),
self.get_stream('Three', COIN),
self.get_stream('Four', COIN),
self.get_stream('Five', COIN),
self.get_stream('Six', COIN),
self.get_stream('Seven', COIN),
self.get_channel('Filtering Channel', COIN, '@filter'),
])
self.sql.filtering_channel_hashes.add(filter_channel.claim_hash)
# nothing filtered
results, censor = censored_search(order_by='^height', offset=1, limit=3)
self.assertEqual(3, len(results))
self.assertEqual(
[two.claim_hash, three.claim_hash, four.claim_hash],
[r['claim_hash'] for r in results]
)
self.assertEqual(0, censor.total)
# content filtered
repost1, repost2 = self.advance(2, [
self.get_repost(one.claim_id, COIN, filter_channel),
self.get_repost(two.claim_id, COIN, filter_channel),
])
results, censor = censored_search(order_by='^height', offset=1, limit=3)
self.assertEqual(3, len(results))
self.assertEqual(
[four.claim_hash, five.claim_hash, six.claim_hash],
[r['claim_hash'] for r in results]
)
self.assertEqual(2, censor.total)
self.assertEqual({filter_channel.claim_hash: 2}, censor.censored)
+3
View File
@@ -375,6 +375,9 @@ class TestQueries(AsyncioTestCase):
self.assertListEqual([0, 3, 2, 1], [tx.height for tx in txs])
self.assertListEqual([tx4.id, tx3.id, tx2.id, tx1.id], [tx.id for tx in txs])
async def test_empty_history(self):
self.assertEqual((None, []), await self.ledger.get_local_status_and_history(''))
class TestUpgrade(AsyncioTestCase):
+15 -1
View File
@@ -39,6 +39,14 @@ class TestAESEncryptDecrypt(TestCase):
with self.assertRaises(InvalidPasswordError):
aes_decrypt('notbubblegum', aes_encrypt('bubblegum', self.message))
def test_edge_case_invalid_password_valid_padding_invalid_unicode(self):
with self.assertRaises(InvalidPasswordError):
aes_decrypt(
'notbubblegum',
'gy3/mNq3FWB/xAXirOQnlAqQLuvhLGXZaeGBUIg1w6yY4PDLDT7BU83XOfBsJol'
'uWU5zEU4+upOFH35HDqyV8EMQhcKSufN9WkT1izEbFtweBUTK8nTSkV7NBppE1Jaz'
)
def test_better_encrypt_decrypt(self):
self.assertEqual(
b'valuable value',
@@ -46,9 +54,15 @@ class TestAESEncryptDecrypt(TestCase):
'super secret',
better_aes_encrypt('super secret', b'valuable value')))
def test_better_decrypt_error(self):
@mock.patch('os.urandom', side_effect=lambda i: b'd'*i)
def test_better_decrypt_error(self, _):
with self.assertRaises(InvalidPasswordError):
better_aes_decrypt(
'super secret but wrong',
better_aes_encrypt('super secret', b'valuable value')
)
def test_edge_case_invalid_password_valid_everything(self):
value = b'czo4MTkyOjE2OjE6VrwsN8FSJlegxHVEQePoyjWT1k8yAXBCUbbGCFKcsNY='
self.assertEqual(b'valuable value', better_aes_decrypt('super secret', value))
self.assertNotEqual(b'valuable value', better_aes_decrypt('super secret but wrong', value))