Compare commits
119
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82cdc8c86a | ||
|
|
3f6493dc5c | ||
|
|
fb4d60f02f | ||
|
|
df60fa7ab2 | ||
|
|
7051c332a1 | ||
|
|
0f2a0b7c97 | ||
|
|
bb6ef42d0c | ||
|
|
3c591d4968 | ||
|
|
cf356a8e35 | ||
|
|
3a0ce58cda | ||
|
|
2d7038dc18 | ||
|
|
25a0e67841 | ||
|
|
be64209292 | ||
|
|
0006cb1c27 | ||
|
|
836d38ed2a | ||
|
|
ec71017785 | ||
|
|
faf9449107 | ||
|
|
f93bbd6bc3 | ||
|
|
ca12d655ea | ||
|
|
72e486791b | ||
|
|
874c28bd88 | ||
|
|
aa7c0a3544 | ||
|
|
3624a3b450 | ||
|
|
c4c50699cc | ||
|
|
6a3d760cfe | ||
|
|
8ceaf66a81 | ||
|
|
fdd2562f32 | ||
|
|
28457021f8 | ||
|
|
459716bd6e | ||
|
|
41e0e6762c | ||
|
|
a5ee60c1c9 | ||
|
|
1391c1d607 | ||
|
|
8e5d47061f | ||
|
|
28ea43c89e | ||
|
|
59adcfe1a1 | ||
|
|
cb38ba12a7 | ||
|
|
dc8e146aa1 | ||
|
|
9200f5b516 | ||
|
|
5c1026c745 | ||
|
|
95e8c85aa9 | ||
|
|
0d179d67a3 | ||
|
|
99ce40f736 | ||
|
|
d2315f4fd7 | ||
|
|
6370404985 | ||
|
|
1ed38fff6f | ||
|
|
ba48713219 | ||
|
|
dfc1e6a2b9 | ||
|
|
4237331222 | ||
|
|
223bcdc261 | ||
|
|
087124ce42 | ||
|
|
c5cfd8f40e | ||
|
|
b70a23a10a | ||
|
|
ccf55bcd01 | ||
|
|
d227660d6c | ||
|
|
ca6202fc19 | ||
|
|
f6b5a40813 | ||
|
|
69c0cefe5e | ||
|
|
ad8772e191 | ||
|
|
e095767bc6 | ||
|
|
610f19bea1 | ||
|
|
4637559c6e | ||
|
|
766dcff6c6 | ||
|
|
b30dc39e37 | ||
|
|
a23178633a | ||
|
|
7c074e1cd4 | ||
|
|
4a8b96a6d2 | ||
|
|
290a206012 | ||
|
|
7b86b3843f | ||
|
|
553adb2ad0 | ||
|
|
cc55a78fb4 | ||
|
|
bd1df09098 | ||
|
|
c61fae05d6 | ||
|
|
e3cb5bfa07 | ||
|
|
09f6034f2f | ||
|
|
63b8a76bf6 | ||
|
|
5fe536a058 | ||
|
|
342184e532 | ||
|
|
e5c169ddf8 | ||
|
|
622ba2b0e3 | ||
|
|
fbfe8f8d14 | ||
|
|
3c96fda59b | ||
|
|
7cb03dde44 | ||
|
|
db34f89251 | ||
|
|
98b9972fa5 | ||
|
|
dd5507036f | ||
|
|
75da209de1 | ||
|
|
bb8a2bfff7 | ||
|
|
a7f8febed7 | ||
|
|
21d291531e | ||
|
|
d133fa0d74 | ||
|
|
2653a9447b | ||
|
|
bc04903741 | ||
|
|
5501418727 | ||
|
|
2737b3635f | ||
|
|
e29688530d | ||
|
|
2eec26b648 | ||
|
|
d4d1d87680 | ||
|
|
869be3e361 | ||
|
|
15376c19be | ||
|
|
f92b610a03 | ||
|
|
268f6447cb | ||
|
|
ed93c647d2 | ||
|
|
f60db358ee | ||
|
|
ad6bd840a9 | ||
|
|
0fa9e8d9f5 | ||
|
|
481e265ec7 | ||
|
|
583833017b | ||
|
|
d50ebcf9eb | ||
|
|
c448531551 | ||
|
|
81ddf7e1d2 | ||
|
|
180035296e | ||
|
|
afe24a3e65 | ||
|
|
9058201de0 | ||
|
|
49a54f8a13 | ||
|
|
5cebc7f5cd | ||
|
|
4e7e475a5e | ||
|
|
f8a5bc94e5 | ||
|
|
6b0b441329 | ||
|
|
1c8aad7a07 |
No files matched your search
+4
-128
@@ -1,4 +1,3 @@
|
||||
sudo: required
|
||||
dist: xenial
|
||||
language: python
|
||||
python: "3.7"
|
||||
@@ -6,136 +5,13 @@ python: "3.7"
|
||||
jobs:
|
||||
include:
|
||||
|
||||
- stage: code quality
|
||||
name: "pylint & mypy"
|
||||
install:
|
||||
- make install
|
||||
script: make lint
|
||||
|
||||
- stage: test
|
||||
name: "LBRY Unit Tests"
|
||||
install:
|
||||
- make install
|
||||
script:
|
||||
- cd lbry && HOME=/tmp coverage run -p --source=lbry -m unittest discover -vv tests.unit
|
||||
after_success:
|
||||
- coverage combine lbry/
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
- name: "LBRY Integration Tests"
|
||||
install:
|
||||
- pip install coverage tox-travis
|
||||
- sudo mount -o mode=1777,nosuid,nodev -t tmpfs tmpfs /tmp
|
||||
script: cd lbry && tox
|
||||
after_success:
|
||||
- coverage combine lbry
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
- &torba-tests
|
||||
name: "Torba Unit Tests"
|
||||
env: TESTTYPE=unit
|
||||
install:
|
||||
- pip install coverage tox-travis
|
||||
script: cd torba && tox
|
||||
after_success:
|
||||
- coverage combine torba/tests
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
- <<: *torba-tests
|
||||
name: "Torba Integration Tests"
|
||||
env: TESTTYPE=integration
|
||||
|
||||
- name: "Run Examples"
|
||||
install:
|
||||
- make install
|
||||
script:
|
||||
- cd lbry && HOME=/tmp coverage run -p --source=lbry scripts/generate_json_api.py
|
||||
after_success:
|
||||
- coverage combine lbry
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
- &build
|
||||
stage: build
|
||||
name: "Linux"
|
||||
env: OS=linux
|
||||
install:
|
||||
- pip install pyinstaller awscli
|
||||
- cd torba && pip install -e . && cd ..
|
||||
- cd lbry
|
||||
- python scripts/set_build.py
|
||||
- pip install -e .
|
||||
script:
|
||||
- pyinstaller -F -n lbrynet lbry/extras/cli.py
|
||||
- cd dist
|
||||
- chmod +x lbrynet
|
||||
- zip -j lbrynet-${OS}.zip lbrynet
|
||||
- shasum -a 256 -b lbrynet-${OS}.zip
|
||||
- ./lbrynet --version
|
||||
after_success:
|
||||
- aws configure set aws_access_key_id $ARTIFACTS_KEY
|
||||
- aws configure set aws_secret_access_key $ARTIFACTS_SECRET
|
||||
- aws configure set region us-east-1
|
||||
- export S3_PATH="daemon/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}_branch-${TRAVIS_BRANCH}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG})"
|
||||
- aws s3 cp lbrynet-${OS}.zip s3://build.lbry.io/${S3_PATH}/lbrynet-${OS}.zip
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
secure: "unnR+aSJ1937Cl1PyBBZzGuZvV5W5TGcXELhXTgyOeeI6FgO/j80qmbNxJDA7qdFH/hvVicQFWoflhZu2dxN5rYP5BQJW3q3XoOLY3XAc1s1vicFkwqn3TIfdFiJTz+/D9eBUBBhHKeYFxm3M+thvklTLgjKl6fflh14NfGuNTevK9yQke8wewW3f9UmFTo1qNOPF1OsTZRbwua6oQYa59P+KukoPt4Dsu1VtILtTkj7hfEsUL79cjotwO3gkhYftxbl/xeDSZWOt+9Nhb8ZKmQG/uDx4JiTMm5lWRk4QB7pUujZ1CftxCYWz/lJx9nuJpdCOgP624tcHymErNlD+vGLwMTNslcXGYkAJH6xvGyxBJ+Obc8vRVnZbRM26BfH34TcPK1ueRxHSrDUbzMIIUsgcoZAxBuim8uDPp+K7bGqiygzSs2vQfr9U5Jhe9/F8sPdtNctfJZEfgmthNTeVFjyNsGIfIt754uGSfACqM7wDLh6fbKx7M+FHlNyOdvYCrbKUOAYXmTikYIpVDvlaaeMO+N+uW8Rhvm1j+JU7CVwhMavLySaPVc6Dt5OxiMMmxw9mVrjW9bBPjS5AkrS5MOA13T5wapoLzH6+gE92U4HzA6ilMcwRaQPSFnK2JU7tzyt2Wy1PH4MjHowXI2WyICG1x510dD3tX1P/1px8ro="
|
||||
file: lbrynet-${OS}.zip
|
||||
skip_cleanup: true
|
||||
overwrite: true
|
||||
draft: true
|
||||
on:
|
||||
tags: true
|
||||
|
||||
- <<: *build
|
||||
name: "Mac"
|
||||
os: osx
|
||||
osx_image: xcode8.3
|
||||
language: shell
|
||||
env: OS=mac
|
||||
before_install:
|
||||
- brew upgrade python || true
|
||||
- pip3 install --user --upgrade pip virtualenv
|
||||
- /Users/travis/Library/Python/3.7/bin/virtualenv $HOME/venv
|
||||
- source $HOME/venv/bin/activate
|
||||
before_cache:
|
||||
- brew cleanup
|
||||
|
||||
- <<: *build
|
||||
name: "Windows"
|
||||
os: windows
|
||||
language: shell
|
||||
env:
|
||||
- OS=windows
|
||||
- PATH=/c/Python37:/c/Python37/Scripts:/C/Windows/System32/downlevel:$PATH
|
||||
before_install:
|
||||
- choco install python --version=3.7.4 --x86
|
||||
- python -m pip install --upgrade pip
|
||||
- pip install pywin32
|
||||
script:
|
||||
- pyinstaller --additional-hooks-dir=scripts/. --icon=icons/lbry256.ico -F -n lbrynet lbry/extras/cli.py
|
||||
- cd dist
|
||||
- 7z a -tzip lbrynet-windows.zip lbrynet.exe
|
||||
- sha256sum -b lbrynet-windows.zip
|
||||
- ./lbrynet.exe --version
|
||||
- if: tag IS present
|
||||
stage: build
|
||||
name: "Wallet Server Docker Image - Tagged Release"
|
||||
- stage: build
|
||||
name: "Wallet Server Docker Image - Segwit Fix"
|
||||
script:
|
||||
- set -e
|
||||
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
||||
- travis_retry docker build -t lbry/wallet-server:$TRAVIS_TAG -f lbry/scripts/Dockerfile.wallet_server .
|
||||
- docker push lbry/wallet-server:$TRAVIS_TAG
|
||||
|
||||
- if: tag IS blank AND branch = master AND NOT type IN (pull_request)
|
||||
stage: build
|
||||
name: "Wallet Server Docker Image - Master"
|
||||
script:
|
||||
- set -e
|
||||
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
|
||||
- travis_retry docker build -t lbry/wallet-server:master -f lbry/scripts/Dockerfile.wallet_server .
|
||||
- docker push lbry/wallet-server:master
|
||||
- travis_retry docker build -t lbry/wallet-server:segwit -f lbry/scripts/Dockerfile.wallet_server .
|
||||
- docker push lbry/wallet-server:segwit
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
||||
@@ -1,307 +0,0 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="no-js">
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
|
||||
|
||||
|
||||
|
||||
<meta name="lang:clipboard.copy" content="Copy to clipboard">
|
||||
|
||||
<meta name="lang:clipboard.copied" content="Copied to clipboard">
|
||||
|
||||
<meta name="lang:search.language" content="en">
|
||||
|
||||
<meta name="lang:search.pipeline.stopwords" content="True">
|
||||
|
||||
<meta name="lang:search.pipeline.trimmer" content="True">
|
||||
|
||||
<meta name="lang:search.result.none" content="No matching documents">
|
||||
|
||||
<meta name="lang:search.result.one" content="1 matching document">
|
||||
|
||||
<meta name="lang:search.result.other" content="# matching documents">
|
||||
|
||||
<meta name="lang:search.tokenizer" content="[\s\-]+">
|
||||
|
||||
<link rel="shortcut icon" href="/assets/images/favicon.png">
|
||||
<meta name="generator" content="mkdocs-0.17.3, mkdocs-material-2.7.0">
|
||||
|
||||
|
||||
|
||||
<title>LBRY</title>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/assets/stylesheets/application.78aab2dc.css">
|
||||
|
||||
<link rel="stylesheet" href="/assets/stylesheets/application-palette.6079476c.css">
|
||||
|
||||
|
||||
|
||||
<script src="/assets/javascripts/modernizr.1aa3b519.js"></script>
|
||||
|
||||
|
||||
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
|
||||
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono">
|
||||
<style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
|
||||
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body dir="ltr" data-md-color-primary="teal" data-md-color-accent="green">
|
||||
|
||||
<svg class="md-svg">
|
||||
<defs>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448"
|
||||
viewBox="0 0 416 448" id="github">
|
||||
<path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19-18.125
|
||||
8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19 18.125-8.5
|
||||
18.125 8.5 10.75 19 3.125 20.5zM320 304q0 10-3.125 20.5t-10.75
|
||||
19-18.125 8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19
|
||||
18.125-8.5 18.125 8.5 10.75 19 3.125 20.5zM360
|
||||
304q0-30-17.25-51t-46.75-21q-10.25 0-48.75 5.25-17.75 2.75-39.25
|
||||
2.75t-39.25-2.75q-38-5.25-48.75-5.25-29.5 0-46.75 21t-17.25 51q0 22 8
|
||||
38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0
|
||||
37.25-1.75t35-7.375 30.5-15 20.25-25.75 8-38.375zM416 260q0 51.75-15.25
|
||||
82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5-41.75
|
||||
1.125q-19.5 0-35.5-0.75t-36.875-3.125-38.125-7.5-34.25-12.875-30.25-20.25-21.5-28.75q-15.5-30.75-15.5-82.75
|
||||
0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25
|
||||
30.875q36.75-8.75 77.25-8.75 37 0 70 8 26.25-20.5
|
||||
46.75-30.25t47.25-9.75q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34
|
||||
99.5z" />
|
||||
</svg>
|
||||
|
||||
</defs>
|
||||
</svg>
|
||||
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="drawer">
|
||||
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="search">
|
||||
<label class="md-overlay" data-md-component="overlay" for="drawer"></label>
|
||||
|
||||
|
||||
<header class="md-header" data-md-component="header">
|
||||
<nav class="md-header-nav md-grid">
|
||||
<div class="md-flex">
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
<a href="/" title="LBRY" class="md-header-nav__button md-logo">
|
||||
|
||||
<img src="https://s3.amazonaws.com/files.lbry.io/logo-square-white-bookonly.png" alt="LBRY logo" width="24" height="24">
|
||||
|
||||
</a>
|
||||
</div>
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
<label class="md-icon md-icon--menu md-header-nav__button" for="drawer"></label>
|
||||
</div>
|
||||
<div class="md-flex__cell md-flex__cell--stretch">
|
||||
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
|
||||
|
||||
|
||||
<span class="md-header-nav__topic">
|
||||
LBRY
|
||||
</span>
|
||||
<span class="md-header-nav__topic">
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
|
||||
|
||||
<label class="md-icon md-icon--search md-header-nav__button" for="search"></label>
|
||||
|
||||
<div class="md-search" data-md-component="search" role="dialog">
|
||||
<label class="md-search__overlay" for="search"></label>
|
||||
<div class="md-search__inner" role="search">
|
||||
<form class="md-search__form" name="search">
|
||||
<input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
|
||||
<label class="md-icon md-search__icon" for="search"></label>
|
||||
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
|
||||

|
||||
</button>
|
||||
</form>
|
||||
<div class="md-search__output">
|
||||
<div class="md-search__scrollwrap" data-md-scrollfix>
|
||||
<div class="md-search-result" data-md-component="result">
|
||||
<div class="md-search-result__meta">
|
||||
Type to start searching
|
||||
</div>
|
||||
<ol class="md-search-result__list"></ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
<div class="md-header-nav__source">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/lbryio/lbry/" title="Go to repository" class="md-source" data-md-source="github">
|
||||
|
||||
<div class="md-source__icon">
|
||||
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||
<use xlink:href="#github" width="24" height="24"></use>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<div class="md-source__repository">
|
||||
GitHub
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<div class="md-container">
|
||||
|
||||
|
||||
|
||||
|
||||
<main class="md-main">
|
||||
<div class="md-main__inner md-grid" data-md-component="container">
|
||||
|
||||
|
||||
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
|
||||
<div class="md-sidebar__scrollwrap">
|
||||
<div class="md-sidebar__inner">
|
||||
<nav class="md-nav md-nav--primary" data-md-level="0">
|
||||
<label class="md-nav__title md-nav__title--site" for="drawer">
|
||||
<span class="md-nav__button md-logo">
|
||||
|
||||
<img src="https://s3.amazonaws.com/files.lbry.io/logo-square-white-bookonly.png" alt="LBRY logo" width="48" height="48">
|
||||
|
||||
</span>
|
||||
LBRY
|
||||
</label>
|
||||
|
||||
<div class="md-nav__source">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/lbryio/lbry/" title="Go to repository" class="md-source" data-md-source="github">
|
||||
|
||||
<div class="md-source__icon">
|
||||
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||
<use xlink:href="#github" width="24" height="24"></use>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<div class="md-source__repository">
|
||||
GitHub
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<ul class="md-nav__list" data-md-scrollfix>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="/" title="API" class="md-nav__link">
|
||||
API
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="/cli/" title="CLI" class="md-nav__link">
|
||||
CLI
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="md-content">
|
||||
<article class="md-content__inner md-typeset">
|
||||
|
||||
<h1>404 - Not found</h1>
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
<footer class="md-footer">
|
||||
|
||||
<div class="md-footer-meta md-typeset">
|
||||
<div class="md-footer-meta__inner md-grid">
|
||||
<div class="md-footer-copyright">
|
||||
|
||||
powered by
|
||||
<a href="http://www.mkdocs.org">MkDocs</a>
|
||||
and
|
||||
<a href="https://squidfunk.github.io/mkdocs-material/">
|
||||
Material for MkDocs</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/assets/javascripts/application.8eb9be28.js"></script>
|
||||
|
||||
<script>app.initialize({version:"0.17.3",url:{base:""}})</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>!function(e,a,t,n,o,c,i){e.GoogleAnalyticsObject=o,e.ga=e.ga||function(){(e.ga.q=e.ga.q||[]).push(arguments)},e.ga.l=1*new Date,c=a.createElement(t),i=a.getElementsByTagName(t)[0],c.async=1,c.src="https://www.google-analytics.com/analytics.js",i.parentNode.insertBefore(c,i)}(window,document,"script",0,"ga"),ga("create","UA-60403362-1","auto"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(e){e.host!=document.location.host&&e.addEventListener("click",function(){var a=e.getAttribute("data-md-action")||"follow";ga("send","event","outbound",a,e.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+161
-113
@@ -41,10 +41,10 @@
|
||||
"examples": [
|
||||
{
|
||||
"title": "Get a file",
|
||||
"curl": "curl -d'{\"method\": \"get\", \"params\": {\"uri\": \"astream#c011186b47f0499392fdd22d73a2ec5426b8556f\"}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet get astream#c011186b47f0499392fdd22d73a2ec5426b8556f",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"get\", \"params\": {\"uri\": \"astream#c011186b47f0499392fdd22d73a2ec5426b8556f\"}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"confirmations\": 3,\n \"content_fee\": null,\n \"download_directory\": \"/tmp/tmppl4ona5o\",\n \"download_path\": \"/tmp/tmppl4ona5o/tmp5h1lifqx\",\n \"file_name\": \"tmp5h1lifqx\",\n \"height\": 214,\n \"key\": \"0fed669177b7d4889715b0522ad6f103\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp5h1lifqx\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"aa2721a8f22f2c166a8f5722adf6b96c9e4d142033719a5adedf9d11db235607:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01d3419c789f3367513a7e0058af1abbfbf6049f2b9792102b78fcfdc53716733ffce3fca52fdeb3971fd08970bf4d1c0e1c61e1c7409b65f9ae0326773cec1417748ca581c1cbb6ecaf6f892ac84d8350cadce0fe0a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d703568316c69667178180b22186170706c69636174696f6e2f6f637465742d73747265616d323004e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"ead8d80c803c7eea3c9d6f2575b6734c93af8d6ecbbf7b19458e564d1e7f5463ae71e638d7dfdc9f57e709482bdfec3d\",\n \"stream_name\": \"tmp5h1lifqx\",\n \"streaming_url\": \"http://localhost:5280/stream/04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"suggested_file_name\": \"tmp5h1lifqx\",\n \"timestamp\": 1571238738,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"aa2721a8f22f2c166a8f5722adf6b96c9e4d142033719a5adedf9d11db235607\",\n \"written_bytes\": 11\n }\n}"
|
||||
"curl": "curl -d'{\"method\": \"get\", \"params\": {\"uri\": \"astream#06d4639a98ad7c343529553088427759e683fb1a\"}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet get astream#06d4639a98ad7c343529553088427759e683fb1a",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"get\", \"params\": {\"uri\": \"astream#06d4639a98ad7c343529553088427759e683fb1a\"}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"confirmations\": 3,\n \"content_fee\": null,\n \"download_directory\": \"/tmp/tmpl6ahaz1t\",\n \"download_path\": \"/tmp/tmpl6ahaz1t/tmplrrcjagu\",\n \"file_name\": \"tmplrrcjagu\",\n \"height\": 214,\n \"key\": \"1a078b5ba203620985456bb511c186f8\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmplrrcjagu\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"2526d91622485c951d894b7bd55d231a756a907cf597f7bf2e7d86488dc91bd8:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01921a1dd1a3816a4014ee84e7818b190ca0371c77c319ec7834afe2c37a33b524594e00ef7fb835b4d9d9a75d0e01f0d547dfdf2d012d019d02a48b5cbb7f1c1dab1bb4411b6f52dc1e3b0526a26f7642ae49a5880a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d706c7272636a616775180b22186170706c69636174696f6e2f6f637465742d73747265616d32304206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"5eaf3e55853a497d98fda6b65ed72abc275ad1952c1b95ddd8f33460a61111607670cf382231497e93a457cd30ef7ef8\",\n \"stream_name\": \"tmplrrcjagu\",\n \"streaming_url\": \"http://localhost:5280/stream/4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"suggested_file_name\": \"tmplrrcjagu\",\n \"timestamp\": 1572065729,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"2526d91622485c951d894b7bd55d231a756a907cf597f7bf2e7d86488dc91bd8\",\n \"written_bytes\": 11\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -225,10 +225,10 @@
|
||||
"examples": [
|
||||
{
|
||||
"title": "Publish a file",
|
||||
"curl": "curl -d'{\"method\": \"publish\", \"params\": {\"name\": \"a-new-stream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmph4xyq79u\", \"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/tmph4xyq79u",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"publish\", \"params\": {\"name\": \"a-new-stream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmph4xyq79u\", \"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\": \"010000000181505245d7d35675af19d701fcad8ae5c14a67811dbdaf4ce73ccf8001287661010000006b4830450221008747caa2fc713bebcc30c9dfd6d6b60ee51a18970b2babf0968b41e0645c303b022017f306dba16a70ebfd05e78226997ee6ff2ca63cf49987ea92abfef832d48390012103df8678597e4d6b38b58f5a6fad26137f6a28f709c2bcbffe58e0f3424f3a6824ffffffff0200e1f50500000000bfb50c612d6e65772d73747265616d4c94000a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d706834787971373975180b22186170706c69636174696f6e2f6f637465742d73747265616d323070b8dff584a902490200bb12dcd9e26b19a0f39ab9f88081feab9771ff0291432d4af477b2aba75a51150e12432ed4666d7576a91420462a2025c78b6d04449cdc310492c89fd2173788ace0b46217000000001976a914a400f5d79f8e0b492fbac2d6666f713bd9bd6ff388ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mx65ZKvF4XK8kbychCzHUyTrbHdX3LaRA3\",\n \"amount\": \"4.947555\",\n \"confirmations\": 4,\n \"height\": 215,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1571238738,\n \"txid\": \"6176280180cf3ce74cafbd1d81674ac1e58aadfc01d719af7556d3d745525081\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"miTbyK19e5Mifkw3GviKECMuB7SD8uNajP\",\n \"amount\": \"1.0\",\n \"claim_id\": \"82bb19a6ed8ce2b575a8df6e89e617b93851dcc6\",\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#82bb19a6ed8ce2b575a8df6e89e617b93851dcc6\",\n \"timestamp\": null,\n \"txid\": \"1077c79e835c0cf0e50aa64bcdc31b0f05c281166288bbf34c9bc19e4b09f1fb\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmph4xyq79u\",\n \"sd_hash\": \"70b8dff584a902490200bb12dcd9e26b19a0f39ab9f88081feab9771ff0291432d4af477b2aba75a51150e12432ed466\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mvU8GEnbv1idD7cFAwudn69Udz3iESw8VX\",\n \"amount\": \"3.923448\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"1077c79e835c0cf0e50aa64bcdc31b0f05c281166288bbf34c9bc19e4b09f1fb\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.024107\",\n \"total_input\": \"4.947555\",\n \"total_output\": \"4.923448\",\n \"txid\": \"1077c79e835c0cf0e50aa64bcdc31b0f05c281166288bbf34c9bc19e4b09f1fb\"\n }\n}"
|
||||
"curl": "curl -d'{\"method\": \"publish\", \"params\": {\"name\": \"a-new-stream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp0c13jk13\", \"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/tmp0c13jk13",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"publish\", \"params\": {\"name\": \"a-new-stream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp0c13jk13\", \"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\": \"0100000001536218973b7b67ffbdc4eb6733b8535f640720ee87141d25021ebea712501619010000006b483045022100e1b7b4d812140e72e26d05865f4644113ae9cbf182d84f40e9b28be352bedbf602207efbe23b35dbd838696ef395350f3f0b8c0a18d0b1b0cccc1af9a05e13724e5701210239704fa17f9f9b91d6f0741f749e335dbc050114714bc70344b0d2ba52937993ffffffff0200e1f50500000000bfb50c612d6e65772d73747265616d4c94000a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d70306331336a6b3133180b22186170706c69636174696f6e2f6f637465742d73747265616d3230c2419043b95e338a3738add22ce584c5e7cb065048c2f12f37317cfaa755369000ba1c23f2c28f5e3c0c3459e55a5ae76d7576a9144a067687c2387cf2e9ec1c906288d0487d8e35f988ace0b46217000000001976a9141f926c3b8898a908259a3c01378210620d33a2a988ac00000000\",\n \"inputs\": [\n {\n \"address\": \"n11FKZ7BKs6iMcVMYSPuApCxhA5ybQ8rc1\",\n \"amount\": \"4.947555\",\n \"confirmations\": 4,\n \"height\": 215,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1572065729,\n \"txid\": \"19165012a7be1e02251d1487ee2007645f53b83367ebc4bdff677b3b97186253\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mnGN3JmiBDqSa5bMx8BrZE4FUVGjVh863E\",\n \"amount\": \"1.0\",\n \"claim_id\": \"1d32f4b24160cf496ac96cb45ecb894830fea852\",\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#1d32f4b24160cf496ac96cb45ecb894830fea852\",\n \"timestamp\": null,\n \"txid\": \"2a09b614c7a330a7343859c35266422c3bed6e091e7118589aa0bf3fc8ee6e54\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp0c13jk13\",\n \"sd_hash\": \"c2419043b95e338a3738add22ce584c5e7cb065048c2f12f37317cfaa755369000ba1c23f2c28f5e3c0c3459e55a5ae7\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"miPtedjQMgYb2vSwnSMCJUd837BrbL5a9R\",\n \"amount\": \"3.923448\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"2a09b614c7a330a7343859c35266422c3bed6e091e7118589aa0bf3fc8ee6e54\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.024107\",\n \"total_input\": \"4.947555\",\n \"total_output\": \"4.923448\",\n \"txid\": \"2a09b614c7a330a7343859c35266422c3bed6e091e7118589aa0bf3fc8ee6e54\"\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -247,10 +247,10 @@
|
||||
"examples": [
|
||||
{
|
||||
"title": "Resolve a claim",
|
||||
"curl": "curl -d'{\"method\": \"resolve\", \"params\": {\"urls\": [\"astream#c011186b47f0499392fdd22d73a2ec5426b8556f\"]}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet resolve astream#c011186b47f0499392fdd22d73a2ec5426b8556f",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"resolve\", \"params\": {\"urls\": [\"astream#c011186b47f0499392fdd22d73a2ec5426b8556f\"]}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"astream#c011186b47f0499392fdd22d73a2ec5426b8556f\": {\n \"address\": \"miY8Ni6D11cwYEDZYYfdcKfyUwp4xCdws8\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#2/astream#c\",\n \"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\",\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\": 1571238738,\n \"effective_amount\": \"1.0\",\n \"expiration_height\": 263187,\n \"is_controlling\": true,\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#c011186b47f0499392fdd22d73a2ec5426b8556f\",\n \"short_url\": \"lbry://astream#c\",\n \"signing_channel\": {\n \"address\": \"mwgNXQtcY3oWpQrtWZWLJRqLeTRCNVVCTe\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#2\",\n \"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\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\": 1571238737,\n \"effective_amount\": \"1.0\",\n \"expiration_height\": 263183,\n \"is_controlling\": true,\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#2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"short_url\": \"lbry://@channel#2\",\n \"timestamp\": 1571238737,\n \"txid\": \"8133769b1fa22eab219f162dee518a7dd96565b047133ec7ad51896127c5482f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec\",\n \"public_key_id\": \"mt1Qr1ftwmkeWG8KVuBiPgDkAzkxAkhvpY\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1571238738,\n \"txid\": \"aa2721a8f22f2c166a8f5722adf6b96c9e4d142033719a5adedf9d11db235607\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp5h1lifqx\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n }\n}"
|
||||
"curl": "curl -d'{\"method\": \"resolve\", \"params\": {\"urls\": [\"astream#06d4639a98ad7c343529553088427759e683fb1a\"]}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet resolve astream#06d4639a98ad7c343529553088427759e683fb1a",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"resolve\", \"params\": {\"urls\": [\"astream#06d4639a98ad7c343529553088427759e683fb1a\"]}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"astream#06d4639a98ad7c343529553088427759e683fb1a\": {\n \"address\": \"mgNr4oaV5EZb1GgkTp6hG38QMHik6pBWjx\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#7/astream#0\",\n \"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\",\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\": 1572065729,\n \"effective_amount\": \"1.0\",\n \"expiration_height\": 263187,\n \"is_controlling\": true,\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#06d4639a98ad7c343529553088427759e683fb1a\",\n \"short_url\": \"lbry://astream#0\",\n \"signing_channel\": {\n \"address\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#7\",\n \"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\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\": 1572065728,\n \"effective_amount\": \"1.0\",\n \"expiration_height\": 263183,\n \"is_controlling\": true,\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#771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"short_url\": \"lbry://@channel#7\",\n \"timestamp\": 1572065728,\n \"txid\": \"d17deb4ccaa5e692bb51b04547266e95b32a9b0144cd9bba4b50df7037d994e2\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d\",\n \"public_key_id\": \"mzWH9q8CpEZHdpVW3VDu37eQRKwtp2mtHU\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1572065729,\n \"txid\": \"2526d91622485c951d894b7bd55d231a756a907cf597f7bf2e7d86488dc91bd8\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmplrrcjagu\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -272,7 +272,7 @@
|
||||
"curl": "curl -d'{\"method\": \"status\", \"params\": {}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet status",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"status\", \"params\": {}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"blob_manager\": {\n \"connections\": {\n \"incoming_bps\": {},\n \"outgoing_bps\": {},\n \"time\": 388184.158997449,\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\": \"5Y77dj4w9ZYpC3cJsYNUT69Wqu18bmciLsoKRswmRbQL56mtC2Hp4z7zbG9CBdwcPY\",\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 \"blockchain_headers\": 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 \"best_blockhash\": \"2bcf4a972ea760294b1c7a86698f6c63a064b429fcc4801286a866dbd1d54667\",\n \"blocks\": 206,\n \"blocks_behind\": 0,\n \"connected_servers\": [\n {\n \"host\": \"localhost\",\n \"latency\": 0.01,\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\": \"4usEmYTLLjgxgveeVoHBWUGiXxyfwTXFjrXdpPU9pnT794o2QpF6V6Fi5KgAmSm3kh\",\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 \"blockchain_headers\": 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 \"best_blockhash\": \"f15efa51f8d6101450011807011e75e7cdb1bdcbc120d0d07aa8650955c68db2\",\n \"blocks\": 206,\n \"blocks_behind\": 0,\n \"connected_servers\": [\n {\n \"host\": \"localhost\",\n \"latency\": 0.01,\n \"port\": 50002\n }\n ]\n }\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -294,7 +294,7 @@
|
||||
"curl": "curl -d'{\"method\": \"version\", \"params\": {}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet version",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"version\", \"params\": {}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"build\": \"dev\",\n \"desktop\": \"GNOME\",\n \"distro\": {\n \"codename\": \"xenial\",\n \"id\": \"ubuntu\",\n \"like\": \"debian\",\n \"version\": \"16.04\",\n \"version_parts\": {\n \"build_number\": \"\",\n \"major\": \"16\",\n \"minor\": \"04\"\n }\n },\n \"lbrynet_version\": \"0.43.0\",\n \"os_release\": \"4.4.0-116-generic\",\n \"os_system\": \"Linux\",\n \"platform\": \"Linux-4.4.0-116-generic-x86_64-with-Ubuntu-16.04-xenial\",\n \"processor\": \"x86_64\",\n \"python_version\": \"3.7.4\",\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.43.4\",\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.4\",\n \"torba_version\": \"0.5.7\"\n }\n}"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -348,10 +348,10 @@
|
||||
"examples": [
|
||||
{
|
||||
"title": "Add an account from seed",
|
||||
"curl": "curl -d'{\"method\": \"account_add\", \"params\": {\"account_name\": \"new account\", \"seed\": \"drastic model curious weapon language crush wrong spy whisper labor elite never\", \"single_key\": false}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet account add \"new account\" --seed=\"drastic model curious weapon language crush wrong spy whisper labor elite never\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_add\", \"params\": {\"account_name\": \"new account\", \"seed\": \"drastic model curious weapon language crush wrong spy whisper labor elite never\", \"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\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1571238704.9340613,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPfGJvwZyd6WDNjkrqnr2LCHUWD7AWp4tURDpZSPqFoqy1FGM4arnuSqGvUL6TeMA6imGekHtX1QwEZFP29sGGMWenveG2qbv\",\n \"public_key\": \"tpubD6NzVbkrYhZ4YjLiqDeDVusVJnNmxBDEmb5HVdCpELgsFi5L4neqzLasRP7BWXh4ysQLJ62Z5CggDHXeAmPkMNrsSBu6N75uzXxLaYTPDHz\",\n \"seed\": \"drastic model curious weapon language crush wrong spy whisper labor elite never\"\n }\n}"
|
||||
"curl": "curl -d'{\"method\": \"account_add\", \"params\": {\"account_name\": \"new account\", \"seed\": \"horn destroy weird walk toast shell weapon during key pen scene photo\", \"single_key\": false}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet account add \"new account\" --seed=\"horn destroy weird walk toast shell weapon during key pen scene photo\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_add\", \"params\": {\"account_name\": \"new account\", \"seed\": \"horn destroy weird walk toast shell weapon during key pen scene photo\", \"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\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1572065695.7791708,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPdcZFS15hfe9it9EhtdeUAtpbWCspJYKcCwD4Q4QogV61SYagNthxXxnPrxQZT3JnRBTmyJdQJUNpUQRNF3Lecwo7k3WUcUX\",\n \"public_key\": \"tpubD6NzVbkrYhZ4X5b3KekJ53oqTAke3xqNkCRNniv7ip813RTq2TEPryhscgjVNpBURCaCPJFAYwBsLdr9hWGUHLcaU74DvhbdXTKqEg4Xgza\",\n \"seed\": \"horn destroy weird walk toast shell weapon during key pen scene photo\"\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -395,9 +395,9 @@
|
||||
},
|
||||
{
|
||||
"title": "Get balance for specific account by id",
|
||||
"curl": "curl -d'{\"method\": \"account_balance\", \"params\": {\"account_id\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\", \"reserved_subtotals\": false}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet account balance \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_balance\", \"params\": {\"account_id\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\", \"reserved_subtotals\": false}}).json()",
|
||||
"curl": "curl -d'{\"method\": \"account_balance\", \"params\": {\"account_id\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\", \"reserved_subtotals\": false}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet account balance \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_balance\", \"params\": {\"account_id\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\", \"reserved_subtotals\": false}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"available\": \"2.0\",\n \"reserved\": \"0.0\",\n \"reserved_subtotals\": null,\n \"total\": \"2.0\"\n }\n}"
|
||||
}
|
||||
]
|
||||
@@ -432,7 +432,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\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1571238704.7281725,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPfGJvwZyd6WDNjkrqnr2LCHUWD7AWp4tURDpZSPqFoqy1FGM4arnuSqGvUL6TeMA6imGekHtX1QwEZFP29sGGMWenveG2qbv\",\n \"public_key\": \"tpubD6NzVbkrYhZ4YjLiqDeDVusVJnNmxBDEmb5HVdCpELgsFi5L4neqzLasRP7BWXh4ysQLJ62Z5CggDHXeAmPkMNrsSBu6N75uzXxLaYTPDHz\",\n \"seed\": \"drastic model curious weapon language crush wrong spy whisper labor elite never\"\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\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1572065695.612447,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPdcZFS15hfe9it9EhtdeUAtpbWCspJYKcCwD4Q4QogV61SYagNthxXxnPrxQZT3JnRBTmyJdQJUNpUQRNF3Lecwo7k3WUcUX\",\n \"public_key\": \"tpubD6NzVbkrYhZ4X5b3KekJ53oqTAke3xqNkCRNniv7ip813RTq2TEPryhscgjVNpBURCaCPJFAYwBsLdr9hWGUHLcaU74DvhbdXTKqEg4Xgza\",\n \"seed\": \"horn destroy weird walk toast shell weapon during key pen scene photo\"\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -487,24 +487,24 @@
|
||||
"examples": [
|
||||
{
|
||||
"title": "Transfer 2 LBC from default account to specific account",
|
||||
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"to_account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet account fund --to_account=\"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\" --amount=2.0 --broadcast",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000012a2d4d3f8e6d07bd3426e56dd37bc676d9b41b475b89a16641a19f5c01ecf09f010000006a4730440220646316b376aac4f8c6b7caa2df43826f78f840d7e789f26873e2c18fa2f8a19c02206556cfe7affe33acb6be8a5f19b4397cb87fa0c4f00502c79df17ef111393da801210262cdc19e281f5797bc4a37e5ac88731e8b30fb03edc8115a670afc9ba0a81930ffffffff0200c2eb0b000000001976a9140156d196c4fc4424210fc4b4c5f64f1e3376e8b388ac90d7ae2f000000001976a914f8a94b8ca292c753cedd6458e41de88b92fa2d4088ac00000000\",\n \"inputs\": [\n {\n \"address\": \"myrBDH4gYYrJTdzJjtmweZuV5JfBXD7omH\",\n \"amount\": \"10.0\",\n \"confirmations\": 6,\n \"height\": 201,\n \"is_change\": false,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1571238736,\n \"txid\": \"9ff0ec015c9fa14166a1895b471bb4d976c67bd36de52634bd076d8e3f4d2d2a\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mfe2yWquHbZGuzZBcnM1h7ezpDpkXCTySN\",\n \"amount\": \"2.0\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"e438343e911dd64ba32806f0ac15a21af32750752148a93d77b003c6577e621c\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"n4BkgTZV2xNeusnQR7zDz4qNYsqMScMFpN\",\n \"amount\": \"7.999876\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"e438343e911dd64ba32806f0ac15a21af32750752148a93d77b003c6577e621c\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000124\",\n \"total_input\": \"10.0\",\n \"total_output\": \"9.999876\",\n \"txid\": \"e438343e911dd64ba32806f0ac15a21af32750752148a93d77b003c6577e621c\"\n }\n}"
|
||||
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"to_account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet account fund --to_account=\"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\" --amount=2.0 --broadcast",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001eb40dbff6b2d27cb6578bd38dfb965c344a0a1ebc40e800236ff1b7371543a6b010000006b483045022100eefd5e245e100707753d1ceeaf580ae2dfd993ef7b7a6ed5d118cdda8caf57e20220781ed74d1e95c09df3a4c99a20bec681924cff04791a5106304030bc0e422d42012103757612eacb471a5cad44a23d0dbdcb8938753f91a74659fad368f4e69235a9b2ffffffff0200c2eb0b000000001976a9140b0577786de3123352b47316e04db6da6019ad5788ac90d7ae2f000000001976a9148af8f4fed6f8c10816ff7cd111a94fa11dd77acf88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"n2TTSHGBrja1oB4gFAUeXy1hgFeEiNn8qb\",\n \"amount\": \"10.0\",\n \"confirmations\": 6,\n \"height\": 201,\n \"is_change\": false,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1572065727,\n \"txid\": \"6b3a5471731bff3602800ec4eba1a044c365b9df38bd7865cb272d6bffdb40eb\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mgXEGziF2d8bzRm6ayCkYxfqsJMkJAwoBU\",\n \"amount\": \"2.0\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"677bd42ee87a97473f5d142c6f5ed3af5c3fb0f15046a1ed794296a51168c00f\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mtBmnN1xnZj1gFwBwabrRe7bTCM1VXT961\",\n \"amount\": \"7.999876\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"677bd42ee87a97473f5d142c6f5ed3af5c3fb0f15046a1ed794296a51168c00f\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000124\",\n \"total_input\": \"10.0\",\n \"total_output\": \"9.999876\",\n \"txid\": \"677bd42ee87a97473f5d142c6f5ed3af5c3fb0f15046a1ed794296a51168c00f\"\n }\n}"
|
||||
},
|
||||
{
|
||||
"title": "Spread LBC between multiple addresses",
|
||||
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"to_account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\", \"from_account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet account fund --to_account=\"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\" --from_account=\"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\" --amount=1.5 --outputs=2 --broadcast",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\", \"from_account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000011c627e57c603b0773da94821755027f31aa215acf00628a34bd61d913e3438e4000000006b483045022100e2dacb2fa0527d2f28d1d24eb68f29b77fe8f5a873b7a18b1b34fb94a803f8f302206375c73f76ef590e5ec0498050d9d0fd4bec8a28ec3ef057ad38ca304aaaa74b01210243bdf4a8e7c3d424a69b0e6d2ab3bd9de500b2e5bf210869a91f3f7f1d9d8437ffffffff03c0687804000000001976a91470292324a689e56fb7be3705bbf9342d02b00a6388acc0687804000000001976a91470292324a689e56fb7be3705bbf9342d02b00a6388ac6cb9fa02000000001976a91470292324a689e56fb7be3705bbf9342d02b00a6388ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mfe2yWquHbZGuzZBcnM1h7ezpDpkXCTySN\",\n \"amount\": \"2.0\",\n \"confirmations\": 1,\n \"height\": 207,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 0,\n \"timestamp\": 1571238737,\n \"txid\": \"e438343e911dd64ba32806f0ac15a21af32750752148a93d77b003c6577e621c\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mqk1FomiNA88HZrxNP7Gc79TJ8D3QoXRfw\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"971648ca2e4675ec0aa9b2fd05c4faed5ebbc579ed3b4f3e4370784594587c25\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mqk1FomiNA88HZrxNP7Gc79TJ8D3QoXRfw\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"971648ca2e4675ec0aa9b2fd05c4faed5ebbc579ed3b4f3e4370784594587c25\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mqk1FomiNA88HZrxNP7Gc79TJ8D3QoXRfw\",\n \"amount\": \"0.499859\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 2,\n \"timestamp\": null,\n \"txid\": \"971648ca2e4675ec0aa9b2fd05c4faed5ebbc579ed3b4f3e4370784594587c25\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000141\",\n \"total_input\": \"2.0\",\n \"total_output\": \"1.999859\",\n \"txid\": \"971648ca2e4675ec0aa9b2fd05c4faed5ebbc579ed3b4f3e4370784594587c25\"\n }\n}"
|
||||
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"to_account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\", \"from_account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet account fund --to_account=\"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\" --from_account=\"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\" --amount=1.5 --outputs=2 --broadcast",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\", \"from_account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000010fc06811a5964279eda14650f1b03f5cafd35e6f2c145d3f47977ae82ed47b67000000006a473044022078301f97fcc37f0dd52021293a8f5dc4ff40028866c8501fe6d8322d0ec5bf6e02202e5950ab3fafc58f0aeb895ca7274ea9ec62902c9e1e9b78cd6f2e626529f8110121034ba9506052dfd68bd1d220214dcc1979fffc19d1503a5b4b9d5576a147030aefffffffff03c0687804000000001976a9140b0577786de3123352b47316e04db6da6019ad5788acc0687804000000001976a9140b0577786de3123352b47316e04db6da6019ad5788ac6cb9fa02000000001976a914f3ac243c09c39cb208c8f089fe605d75455cca3c88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mgXEGziF2d8bzRm6ayCkYxfqsJMkJAwoBU\",\n \"amount\": \"2.0\",\n \"confirmations\": 1,\n \"height\": 207,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 0,\n \"timestamp\": 1572065728,\n \"txid\": \"677bd42ee87a97473f5d142c6f5ed3af5c3fb0f15046a1ed794296a51168c00f\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mgXEGziF2d8bzRm6ayCkYxfqsJMkJAwoBU\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"d57de5982fd46edaba0a720a1f69f22a165ca05a3eeaee592e68a7e05133ae6d\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mgXEGziF2d8bzRm6ayCkYxfqsJMkJAwoBU\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"d57de5982fd46edaba0a720a1f69f22a165ca05a3eeaee592e68a7e05133ae6d\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"n3jNiGmrtzdHoVwZL2uH9yz83m8XRUs12H\",\n \"amount\": \"0.499859\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 2,\n \"timestamp\": null,\n \"txid\": \"d57de5982fd46edaba0a720a1f69f22a165ca05a3eeaee592e68a7e05133ae6d\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000141\",\n \"total_input\": \"2.0\",\n \"total_output\": \"1.999859\",\n \"txid\": \"d57de5982fd46edaba0a720a1f69f22a165ca05a3eeaee592e68a7e05133ae6d\"\n }\n}"
|
||||
},
|
||||
{
|
||||
"title": "Transfer all LBC to a specified account",
|
||||
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"from_account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\", \"everything\": true, \"broadcast\": true}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet account fund --from_account=\"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\" --everything --broadcast",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"from_account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\", \"everything\": true, \"broadcast\": true}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000003257c5894457870433e4f3bed79c5bb5eedfac405fdb2a90aec75462eca481697000000006a47304402206748f3d21600d39d1278925611132f5d41fa58598ab30a563a4f8f73eef971a3022076fa2d3b2a5b3af56f2393ec96628194cc895a5760142de6783ef53a0a0d59d3012102147227bbe98f7702aeb098e386e4c9f118e37d4103901559287ec704fc3a9a8cffffffff257c5894457870433e4f3bed79c5bb5eedfac405fdb2a90aec75462eca481697010000006b483045022100dfc0b7ee1e7bc6cadacb57caebc8340bb391fd050ff96b5b607160cb390fa1e6022046d043e09abdf03e4ff9d3b99c8dac8575f5bbdda06d2026e0f5259169fb9126012102147227bbe98f7702aeb098e386e4c9f118e37d4103901559287ec704fc3a9a8cffffffff257c5894457870433e4f3bed79c5bb5eedfac405fdb2a90aec75462eca481697020000006a47304402206af09161e399be11455c5394d4d3fc13100151389cb970bee8b6efbc74afa75d022043dd968fcd41cc8e0d13d5a0d042fa4874fb57c81e9491912bcab2d3bf55b779012102147227bbe98f7702aeb098e386e4c9f118e37d4103901559287ec704fc3a9a8cffffffff015027eb0b000000001976a91413b1f79654e2e73cc9d6b8bfcc16fe98d0b7621f88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mqk1FomiNA88HZrxNP7Gc79TJ8D3QoXRfw\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 0,\n \"timestamp\": 1571238737,\n \"txid\": \"971648ca2e4675ec0aa9b2fd05c4faed5ebbc579ed3b4f3e4370784594587c25\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mqk1FomiNA88HZrxNP7Gc79TJ8D3QoXRfw\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1571238737,\n \"txid\": \"971648ca2e4675ec0aa9b2fd05c4faed5ebbc579ed3b4f3e4370784594587c25\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mqk1FomiNA88HZrxNP7Gc79TJ8D3QoXRfw\",\n \"amount\": \"0.499859\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 2,\n \"timestamp\": 1571238737,\n \"txid\": \"971648ca2e4675ec0aa9b2fd05c4faed5ebbc579ed3b4f3e4370784594587c25\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mhK6L59USiby9g31qP2JpNm2QFjSvzMhU4\",\n \"amount\": \"1.999604\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"8091b20c9f0af24599c4e41f286649885ad367d32bfdbfea1206e589cc38c382\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000255\",\n \"total_input\": \"1.999859\",\n \"total_output\": \"1.999604\",\n \"txid\": \"8091b20c9f0af24599c4e41f286649885ad367d32bfdbfea1206e589cc38c382\"\n }\n}"
|
||||
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"from_account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\", \"everything\": true, \"broadcast\": true}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet account fund --from_account=\"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\" --everything --broadcast",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"from_account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\", \"everything\": true, \"broadcast\": true}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000036dae3351e0a7682e59eeea3e5aa05c162af2691f0a720abada6ed42f98e57dd5000000006b483045022100e30bcdc12245a15b6da3cdf21cf11dd2f04462d5c131bc3da86818ae28991bae02204538fe7590b64a958eaf01ba2acbcf0157d31b23245d7241f993a5484938962d0121034ba9506052dfd68bd1d220214dcc1979fffc19d1503a5b4b9d5576a147030aefffffffff6dae3351e0a7682e59eeea3e5aa05c162af2691f0a720abada6ed42f98e57dd5010000006b483045022100ae52879cf95f360c627709da74ce9cf7445ba5b2fe756da8b21dc2811ef495680220106e9be93b98b3cfe32ad6b146eb6eab0b326287428fc27e7f98436ee2fce8630121034ba9506052dfd68bd1d220214dcc1979fffc19d1503a5b4b9d5576a147030aefffffffff6dae3351e0a7682e59eeea3e5aa05c162af2691f0a720abada6ed42f98e57dd5020000006a47304402204f57021c7298805ad5abd0ba6107d4e8800cc878da028ef25a099e8fa6ad9a6902203f91f94e2f8e4526dca11cf233a84ffe77c1441d11eff876646e1b53abd024e5012103b429513d82a39765b2e5215b8f0e514502ff9e8a3c87a9045ddb7ea8960cc14fffffffff015027eb0b000000001976a914275f15da77f0e910227c88e4b0520d5ce576742588ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mgXEGziF2d8bzRm6ayCkYxfqsJMkJAwoBU\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 0,\n \"timestamp\": 1572065728,\n \"txid\": \"d57de5982fd46edaba0a720a1f69f22a165ca05a3eeaee592e68a7e05133ae6d\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mgXEGziF2d8bzRm6ayCkYxfqsJMkJAwoBU\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1572065728,\n \"txid\": \"d57de5982fd46edaba0a720a1f69f22a165ca05a3eeaee592e68a7e05133ae6d\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"n3jNiGmrtzdHoVwZL2uH9yz83m8XRUs12H\",\n \"amount\": \"0.499859\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 2,\n \"timestamp\": 1572065728,\n \"txid\": \"d57de5982fd46edaba0a720a1f69f22a165ca05a3eeaee592e68a7e05133ae6d\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mj78ZBXmcPQ2uRYVaRRHtY3CYC7QKSqTc6\",\n \"amount\": \"1.999604\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"4bcaf690bceaf6d0c3382d2cd1b8eaf05d8d944427d17473442ab02fd339f922\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000255\",\n \"total_input\": \"1.999859\",\n \"total_output\": \"1.999604\",\n \"txid\": \"4bcaf690bceaf6d0c3382d2cd1b8eaf05d8d944427d17473442ab02fd339f922\"\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -541,16 +541,28 @@
|
||||
"type": "bool",
|
||||
"description": "show the seed for the account",
|
||||
"is_required": false
|
||||
},
|
||||
{
|
||||
"name": "page",
|
||||
"type": "int",
|
||||
"description": "page to return during paginating",
|
||||
"is_required": false
|
||||
},
|
||||
{
|
||||
"name": "page_size",
|
||||
"type": "int",
|
||||
"description": "number of items on page during pagination",
|
||||
"is_required": false
|
||||
}
|
||||
],
|
||||
"returns": " [\n {\n \"id\": \"account_id\",\n \"is_default\": \"this account is used by default\",\n \"ledger\": \"name of crypto currency and network\",\n \"name\": \"optional account name\",\n \"seed\": \"human friendly words from which account can be recreated\",\n \"encrypted\": \"if account is encrypted\",\n \"private_key\": \"extended private key\",\n \"public_key\": \"extended public key\",\n \"address_generator\": \"settings for generating addresses\",\n \"modified_on\": \"date of last modification to account settings\"\n }\n ]",
|
||||
"returns": " {\n \"page\": \"Page number of the current items.\",\n \"page_size\": \"Number of items to show on a page.\",\n \"total_pages\": \"Total number of pages.\",\n \"total_items\": \"Total number of items.\",\n \"items\": [\n {\n \"id\": \"account_id\",\n \"is_default\": \"this account is used by default\",\n \"ledger\": \"name of crypto currency and network\",\n \"name\": \"optional account name\",\n \"seed\": \"human friendly words from which account can be recreated\",\n \"encrypted\": \"if account is encrypted\",\n \"private_key\": \"extended private key\",\n \"public_key\": \"extended public key\",\n \"address_generator\": \"settings for generating addresses\",\n \"modified_on\": \"date of last modification to account settings\"\n }\n ]\n }",
|
||||
"examples": [
|
||||
{
|
||||
"title": "List your accounts",
|
||||
"curl": "curl -d'{\"method\": \"account_list\", \"params\": {\"include_claims\": false, \"show_seed\": false}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet account list",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_list\", \"params\": {\"include_claims\": false, \"show_seed\": false}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"lbc_regtest\": [\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\": \"n3bEdKkGNM2C5MaXqiQqQVK1ouvBeLHFWr\",\n \"is_default\": true,\n \"name\": \"Account #n3bEdKkGNM2C5MaXqiQqQVK1ouvBeLHFWr\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XYigvZNaCGXztmz3j59qFZ7PfeRYYRhaLWWZeaFisLc8mTmNCfWsopnu3cc1Zywt9VkT8Eskk8BnAweBnX6w4uz3shGQENn\",\n \"satoshis\": 1000000000\n }\n ]\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\": \"mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"is_default\": true,\n \"ledger\": \"lbc_regtest\",\n \"name\": \"Account #mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"public_key\": \"tpubD6NzVbkrYhZ4WoXGpM9c6D4r5hXRXVz4dYcEbrie1mZsSHJE3sSgx2pKDu4eshfDaj9JPWTygwXMgHcVrA7xoRPvkSCmudEnfMq4x2Bbqh8\",\n \"satoshis\": 1000000000\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -595,10 +607,10 @@
|
||||
"examples": [
|
||||
{
|
||||
"title": "Remove an account",
|
||||
"curl": "curl -d'{\"method\": \"account_remove\", \"params\": {\"account_id\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\"}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet account remove mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_remove\", \"params\": {\"account_id\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\"}}).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\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1571238704.7281725,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPfGJvwZyd6WDNjkrqnr2LCHUWD7AWp4tURDpZSPqFoqy1FGM4arnuSqGvUL6TeMA6imGekHtX1QwEZFP29sGGMWenveG2qbv\",\n \"public_key\": \"tpubD6NzVbkrYhZ4YjLiqDeDVusVJnNmxBDEmb5HVdCpELgsFi5L4neqzLasRP7BWXh4ysQLJ62Z5CggDHXeAmPkMNrsSBu6N75uzXxLaYTPDHz\",\n \"seed\": \"drastic model curious weapon language crush wrong spy whisper labor elite never\"\n }\n}"
|
||||
"curl": "curl -d'{\"method\": \"account_remove\", \"params\": {\"account_id\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\"}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet account remove msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_remove\", \"params\": {\"account_id\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\"}}).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\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1572065695.612447,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPdcZFS15hfe9it9EhtdeUAtpbWCspJYKcCwD4Q4QogV61SYagNthxXxnPrxQZT3JnRBTmyJdQJUNpUQRNF3Lecwo7k3WUcUX\",\n \"public_key\": \"tpubD6NzVbkrYhZ4X5b3KekJ53oqTAke3xqNkCRNniv7ip813RTq2TEPryhscgjVNpBURCaCPJFAYwBsLdr9hWGUHLcaU74DvhbdXTKqEg4Xgza\",\n \"seed\": \"horn destroy weird walk toast shell weapon during key pen scene photo\"\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -685,10 +697,10 @@
|
||||
"examples": [
|
||||
{
|
||||
"title": "Modify maximum number of times a change address can be reused",
|
||||
"curl": "curl -d'{\"method\": \"account_set\", \"params\": {\"account_id\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\", \"default\": false, \"change_max_uses\": 10}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet account set mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV --change_max_uses=10",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_set\", \"params\": {\"account_id\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\", \"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\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1571238705.0105007,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPfGJvwZyd6WDNjkrqnr2LCHUWD7AWp4tURDpZSPqFoqy1FGM4arnuSqGvUL6TeMA6imGekHtX1QwEZFP29sGGMWenveG2qbv\",\n \"public_key\": \"tpubD6NzVbkrYhZ4YjLiqDeDVusVJnNmxBDEmb5HVdCpELgsFi5L4neqzLasRP7BWXh4ysQLJ62Z5CggDHXeAmPkMNrsSBu6N75uzXxLaYTPDHz\",\n \"seed\": \"drastic model curious weapon language crush wrong spy whisper labor elite never\"\n }\n}"
|
||||
"curl": "curl -d'{\"method\": \"account_set\", \"params\": {\"account_id\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\", \"default\": false, \"change_max_uses\": 10}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet account set msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW --change_max_uses=10",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_set\", \"params\": {\"account_id\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\", \"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\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1572065695.8479288,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPdcZFS15hfe9it9EhtdeUAtpbWCspJYKcCwD4Q4QogV61SYagNthxXxnPrxQZT3JnRBTmyJdQJUNpUQRNF3Lecwo7k3WUcUX\",\n \"public_key\": \"tpubD6NzVbkrYhZ4X5b3KekJ53oqTAke3xqNkCRNniv7ip813RTq2TEPryhscgjVNpBURCaCPJFAYwBsLdr9hWGUHLcaU74DvhbdXTKqEg4Xgza\",\n \"seed\": \"horn destroy weird walk toast shell weapon during key pen scene photo\"\n }\n}"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -724,9 +736,9 @@
|
||||
"examples": [
|
||||
{
|
||||
"title": "Check if address is mine",
|
||||
"curl": "curl -d'{\"method\": \"address_is_mine\", \"params\": {\"address\": \"mfyjzur5kkyBg5YDhx4UiAabb2rx2xMsE3\"}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet address is_mine mfyjzur5kkyBg5YDhx4UiAabb2rx2xMsE3",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_is_mine\", \"params\": {\"address\": \"mfyjzur5kkyBg5YDhx4UiAabb2rx2xMsE3\"}}).json()",
|
||||
"curl": "curl -d'{\"method\": \"address_is_mine\", \"params\": {\"address\": \"mnGN3JmiBDqSa5bMx8BrZE4FUVGjVh863E\"}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet address is_mine mnGN3JmiBDqSa5bMx8BrZE4FUVGjVh863E",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_is_mine\", \"params\": {\"address\": \"mnGN3JmiBDqSa5bMx8BrZE4FUVGjVh863E\"}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": true\n}"
|
||||
}
|
||||
]
|
||||
@@ -773,14 +785,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 {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mfYNAfU3cTUGWwy4aG9MLnFaDF8VcceF5e\",\n \"pubkey\": \"tpubDA9GDAntyJu4K6z8Bsi95GPw5FWeyh1MMNxN7WLyhZSHRHAQ1eHWmTur1ULo7Gqa2iS1L9Rc2w2TLCXZsiN6tfX4xfkYhzRboirfSpJygNU\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mfe2yWquHbZGuzZBcnM1h7ezpDpkXCTySN\",\n \"pubkey\": \"tpubDA9GDAntyJu4EvpC1MceQmRCKi8iYFdMU5pyB2HfXGuyBksrcS5qGhdPRxN5peuYKv77T4g9XePbaEHgbfxkzacfComAjRisbHA8qJgVX1h\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mfwN3xEhEbjUTLMRx2sJd1FTmexU1rPu9s\",\n \"pubkey\": \"tpubDA9GDAntyJu4J6SvmJM5env2f124q5Y32CCUMA4KYt249iQJHTz1H4HkY2sLMUqssgBKU7BXPPbc7U2ZQYtXPvosRvzJMstsnnT36R3XS8R\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mhgKgpRQ9B8JhHYN4f77ejB3eJqAEHPYiQ\",\n \"pubkey\": \"tpubDA9GDAntyJu53Buf37KHfs7rKaekLy9QbuZwerEX6irDq1m7ojfxPW2QkJJDVCQYgKRmngv6otY3batqV2h8xQXGMsPeqreJJxdBPTAwUEL\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mhqg6NA2M9T8dPwiuQcVuG61sQSBbSp9Ls\",\n \"pubkey\": \"tpubDA9GDAntyJu4NY6xbhXCVj1knLFWfjeNd8xxn5cRY3rzK1kiVJTiHpNztmXukKSf3Pu2Sc28x6WZ6hZrBxawK9njdP1siARKa64AjeEw7XY\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mixdDvkzVtMhHxP455y3U9BxPVUYpVqfGJ\",\n \"pubkey\": \"tpubDA9GDAntyJu4MvKEP6pFaqQgqmjQ4iYq5D6a8SdnScHKpRUXDKWdxXNskP3nd8HrtCBJZPoTSSMvC4RayuvLaqKnqLPgaNukfbr73XARXCn\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mkA1WgwFbgchsdEq2BKmYWeaQxL6FjCW45\",\n \"pubkey\": \"tpubDA9GDAntyJu4sc9ziqCDTS54EHH5ki9uJ1YfmjoR7zeJccgXtVm5yQxV2nA1Y6SS9HxFzBtDquSbKK8quyGGGSZWvEK1dQstRfzbGANi3UN\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mkvJ8MD3DX7SsBbJVgsVWit7KSxkmNvP4m\",\n \"pubkey\": \"tpubDA9GDAntyJu4pz8ia68bFAEZ3dHR3CYVvtafJbCnpQWsB3SFCPBgfU9VdJQjnh7hkqk81KoQ87VLJyW3HydAfzUzscorstE3Fu3RrL6m8nu\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mnJVfoJKGW5QwTAxAKUogiStGqGMi9HNy5\",\n \"pubkey\": \"tpubDA9GDAntyJu4RBBie6encrd8Y8A68DZ8FWfKVGCj8Be5PVkdVLyfV48vW1p8ee33qTcBtELUPi6g12JFfFbEg1Sw5JF5k8HGAp42w3We18X\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mnUehAF1b4RfdyxmCLXj4jp7VU3DpiEgNb\",\n \"pubkey\": \"tpubDA9GDAntyJu4XHGJptXuRsUTHWwARWHqTbhddU8kA66V8yqs4nywt1HJbhaAySMWRra2nN5Ajmxf1egHqDZo1WRpAySbNh4UPkYshpwsFc8\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mpCcvL57WTbWJjFtygEVj3t8G4aphqZvT6\",\n \"pubkey\": \"tpubDA9GDAntyJu4LiJmctWWofyrehLxAM5aQ7TS9W5dufVszQDBejoZHpJVuRV4sdwzxZ2XAeNPafdscD3YfcNE923aexNx6gjCwM2PfQv1fJq\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mqk1FomiNA88HZrxNP7Gc79TJ8D3QoXRfw\",\n \"pubkey\": \"tpubDA9GDAntyJu4GmAPiKBUWoGj6C2EMnmgtV6CbTgpsS9t2BZqVJqqaKvcbPoiSadXghaMddU4NMBzaGqverv2k8Y46ycHBafFzj5rz33ni4z\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"ms6a57pGmU4AYCKt47Coy9m8bZ6ANyBbY8\",\n \"pubkey\": \"tpubDA9GDAntyJu55r3BFjh4XXdzUc3AmBxNng6CYLm5H2Ktnq8QuKC4TKmGCrcnFhk9iCShyGXLLMrFHeezunFzRfUDNsrxTAevdojYEp2hDW2\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mu56hCrA8M5BWCHhkmQrh7rqWkK7QRs16T\",\n \"pubkey\": \"tpubDA9GDAntyJu4vpqWb4x2iyLRshPjnTsatFwPDuzSnPrQV1uHCHWGNi8jsvRu7jnPcnLWQASh3amX3ezDwxeKX4DdYoXaUYzzpmPGkXb2RGD\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"muTpCvgtsoHyckenmY2xomphtAGH5kLEJS\",\n \"pubkey\": \"tpubDA9GDAntyJu4jR3pxJ5zGLzow77PCeNNzaTaFTGfCeQJN4pDqouPWsmagQ6MBUENszEBc8oo4RCRTH8j26Mas7d5p8SBS1sziWjfcx6YkpA\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"muXAwAWJ4ZmhRsce8AfDzLBBsS7Ji8UuHg\",\n \"pubkey\": \"tpubDA9GDAntyJu4UKVpFxLDPz4oLNzAM56fKrBHNjt9tDBgMYGGU9NGTXiMhtDTnuZcS4qaxzeDh1QkqitgX22sjBueJoaqBzXiDX6Da4BdhWa\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mwtoiYVnswqRLUz7mmng3f8NPNXSN4AWxW\",\n \"pubkey\": \"tpubDA9GDAntyJu4dYBRhCysuYpELVPDMx3iLine truncated
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"account\": \"mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"address\": \"mgNr4oaV5EZb1GgkTp6hG38QMHik6pBWjx\",\n \"pubkey\": \"tpubDA9GDAntyJu4hf5WteoD7nKkqVhJVwLj4TdPNpsJXvjeUPiqDapHMnN78FreKtcXUArDQCnmQ7v22RU9WntTHUReS1NUaV3xBYVPCPBtMVA\",\n \"used_times\": 0\n },\n {\n \"account\": \"mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"address\": \"mgRWDJejZivGjNCa9injz5TXumasPPSHMx\",\n \"pubkey\": \"tpubDA9GDAntyJu4QXkgLBWwYE4u7hfDsQJfxRfu8Y1dqwf4iyRd6T2WJ8gfhcqnxVHjQqeMRk5jJQYbyR3Deok8j2ygosVp353vmMJPGjG6cag\",\n \"used_times\": 0\n },\n {\n \"account\": \"mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"address\": \"mh21U13TSKAhyAoH2o4Ycf9uMKgLUAdniz\",\n \"pubkey\": \"tpubDA9GDAntyJu51hcbX7q2MiQPeBjgYbZSF5AV51F888eifDtTFM9L98ze6hmF749MJXbbtMRxWRi5U8B4qR89qD8S82k3T2Nopyfvt6jgJyg\",\n \"used_times\": 0\n },\n {\n \"account\": \"mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"address\": \"mj78ZBXmcPQ2uRYVaRRHtY3CYC7QKSqTc6\",\n \"pubkey\": \"tpubDA9GDAntyJu4SEUhd6fSS4yTXxXhj7iNFqdTBMZCCzUkAD4FY7VgtmGB7yHHyGqtpHW9fKJXyW2Ez6upaSjFzogrdeBRVU3MWnEipoLcZmK\",\n \"used_times\": 0\n },\n {\n \"account\": \"mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"address\": \"mkgXt6aYhEaycR2ZPszPaAJ8FYcjtV76rX\",\n \"pubkey\": \"tpubDA9GDAntyJu52FVbHSTwypc2D98SFkztyBj2KUzZqK5rrwhuEbiW9UpsGEUd2ampXFoV7kkFViC8NHapezDsQRiXZpUnfm2MsknH4G2nx9e\",\n \"used_times\": 0\n },\n {\n \"account\": \"mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"address\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"pubkey\": \"tpubDA9GDAntyJu4P2qBQ1Xp4SAri3wz73G4yZY47T43VYnLptBcJnvcFSogHEa6X6iQEohs9mv4LrAyUhqRS2W5hWokqP3uMHwwdpEkfNwjQAc\",\n \"used_times\": 0\n },\n {\n \"account\": \"mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"address\": \"mmL92G4QN7dj5XJknobmBgCWZLH7fzqf3z\",\n \"pubkey\": \"tpubDA9GDAntyJu4FbMXh7piDZMTk7qDRSBoE5yayLKhV1N2mcoaNBAK7LwT4WBsJd2rRfhy5DD5hZ4qxaP5FgJaBqf65mDsqgd9coQPcPJtqiB\",\n \"used_times\": 0\n },\n {\n \"account\": \"mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"address\": \"mnGN3JmiBDqSa5bMx8BrZE4FUVGjVh863E\",\n \"pubkey\": \"tpubDA9GDAntyJu4GgpfZMVYjf1qAp1af4W98MdYsPUR1o4irMwiHarZNKWk7sEmXs9nrefKdpV6TzKBxHYwWm1pFH2DDXPMqM4x6Jv1jwQf36H\",\n \"used_times\": 0\n },\n {\n \"account\": \"mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"address\": \"mnPqmmN9hjuT1H9NtxjNfY77xU1wqySrUg\",\n \"pubkey\": \"tpubDA9GDAntyJu4snsmnvygNik66AbhfGXxs7aaTvLjbgDtTYr6y1L5t7B8xFhV41LGHRwey3vmvxb7Ra5QaAuLAm21WYmJ4BxJHdrXEr2BSHZ\",\n \"used_times\": 0\n },\n {\n \"account\": \"mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"address\": \"moU1xp74aVh9zF9nDnSfmV4RFUDnTywtLE\",\n \"pubkey\": \"tpubDA9GDAntyJu55y5goYbwg5osSCqA4noP1oDFR6KDuL8XQ1tW5woXPDRsbvUXWQ6dj4wQz6w6RB72VmZmACXg5XcE4LzwnBG2NAprcwYEu8q\",\n \"used_times\": 0\n },\n {\n \"account\": \"mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"address\": \"mocxzuAQDiH9maSP8TNss2UqfDk4LmkRzR\",\n \"pubkey\": \"tpubDA9GDAntyJu4eoSAhQG8UwTKJBgpJC6Zoyy9cDtyLLKob9xJe9cDvu9f8GkHCQrUAHeLpMy6g3Mtvu4EvJKGe3NBGRLNffBifgNKfHK6DR1\",\n \"used_times\": 0\n },\n {\n \"account\": \"mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"address\": \"mqKgz7yQfGHsMWvxvL4zP7NWKgSfz9exCr\",\n \"pubkey\": \"tpubDA9GDAntyJu4HG3Wnct6tpMWrtXUSKjpHPMtDi9EvE5BUr9i2bw6fvNeQ4ik1oqjouCFFP8EmLQkeZjNcXco6f4mhJs14bmtHyJu1PvSXax\",\n \"used_times\": 0\n },\n {\n \"account\": \"mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"address\": \"mtBmnN1xnZj1gFwBwabrRe7bTCM1VXT961\",\n \"pubkey\": \"tpubDA9GDAntyJu4KZJWWFWD1X2ztrjZSZbb11ZUanxQXX73xegiYQZWXchZcfyzhVdwm8XjBbz6KDEo7rgqBeLmpcVvHkeV7AcBQU6MVHLWwh9\",\n \"used_times\": 0\n },\n {\n \"account\": \"mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"address\": \"mu3QP3SyXuEKqzBd7u8G68W4qPwi1CihpY\",\n \"pubkey\": \"tpubDA9GDAntyJu4jUF3eAx3jrwfWqPzziDzVp3jrGrpNvi3c5hQYVHS3CmZEehcxmFrDCLSMqdsxQLvDwUbKxiD1qSkJ3VrNpeArvZXejq6jRc\",\n \"used_times\": 0\n },\n {\n \"account\": \"mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"address\": \"muuS4xFsNhKT2xrrHYXbUBqsjoVFbXRNNk\",\n \"pubkey\": \"tpubDA9GDAntyJu4qR9i2bFuwvRZmJy2txYoTKVfetWPq2AA2PEmpwkp8WvHoEdy4MYgrumMsgtAtoBxxww4Mxk3fkQ5VfS7r6HrD5Mob2f5kZn\",\n \"used_times\": 0\n },\n {\n \"account\": \"mg7Gcwkej1uBfgwt7ZX3mApCfKKmjTCay5\",\n \"address\": \"mx52jPthqfxgBHRRsDmMnjvCMTqa6pZohi\",\n \"pubkey\": \"tpubDA9GDAntyJu4mTpZKoe1uNFZNJeGjLeqDhUco8Cv2BLUboKvnhSTVdobo5sfGrUburZiGYC22A7ZZpugSPzJuH8HAeZLsKvuuTCh3ZBFQ1S\",\n \"Line truncated
|
||||
},
|
||||
{
|
||||
"title": "List addresses in specified account",
|
||||
"curl": "curl -d'{\"method\": \"address_list\", \"params\": {\"account_id\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\"}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet address list --account_id=\"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_list\", \"params\": {\"account_id\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\"}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": [\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mfYNAfU3cTUGWwy4aG9MLnFaDF8VcceF5e\",\n \"pubkey\": \"tpubDA9GDAntyJu4K6z8Bsi95GPw5FWeyh1MMNxN7WLyhZSHRHAQ1eHWmTur1ULo7Gqa2iS1L9Rc2w2TLCXZsiN6tfX4xfkYhzRboirfSpJygNU\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mfe2yWquHbZGuzZBcnM1h7ezpDpkXCTySN\",\n \"pubkey\": \"tpubDA9GDAntyJu4EvpC1MceQmRCKi8iYFdMU5pyB2HfXGuyBksrcS5qGhdPRxN5peuYKv77T4g9XePbaEHgbfxkzacfComAjRisbHA8qJgVX1h\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mfwN3xEhEbjUTLMRx2sJd1FTmexU1rPu9s\",\n \"pubkey\": \"tpubDA9GDAntyJu4J6SvmJM5env2f124q5Y32CCUMA4KYt249iQJHTz1H4HkY2sLMUqssgBKU7BXPPbc7U2ZQYtXPvosRvzJMstsnnT36R3XS8R\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mhgKgpRQ9B8JhHYN4f77ejB3eJqAEHPYiQ\",\n \"pubkey\": \"tpubDA9GDAntyJu53Buf37KHfs7rKaekLy9QbuZwerEX6irDq1m7ojfxPW2QkJJDVCQYgKRmngv6otY3batqV2h8xQXGMsPeqreJJxdBPTAwUEL\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mhqg6NA2M9T8dPwiuQcVuG61sQSBbSp9Ls\",\n \"pubkey\": \"tpubDA9GDAntyJu4NY6xbhXCVj1knLFWfjeNd8xxn5cRY3rzK1kiVJTiHpNztmXukKSf3Pu2Sc28x6WZ6hZrBxawK9njdP1siARKa64AjeEw7XY\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mixdDvkzVtMhHxP455y3U9BxPVUYpVqfGJ\",\n \"pubkey\": \"tpubDA9GDAntyJu4MvKEP6pFaqQgqmjQ4iYq5D6a8SdnScHKpRUXDKWdxXNskP3nd8HrtCBJZPoTSSMvC4RayuvLaqKnqLPgaNukfbr73XARXCn\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mkA1WgwFbgchsdEq2BKmYWeaQxL6FjCW45\",\n \"pubkey\": \"tpubDA9GDAntyJu4sc9ziqCDTS54EHH5ki9uJ1YfmjoR7zeJccgXtVm5yQxV2nA1Y6SS9HxFzBtDquSbKK8quyGGGSZWvEK1dQstRfzbGANi3UN\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mkvJ8MD3DX7SsBbJVgsVWit7KSxkmNvP4m\",\n \"pubkey\": \"tpubDA9GDAntyJu4pz8ia68bFAEZ3dHR3CYVvtafJbCnpQWsB3SFCPBgfU9VdJQjnh7hkqk81KoQ87VLJyW3HydAfzUzscorstE3Fu3RrL6m8nu\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mnJVfoJKGW5QwTAxAKUogiStGqGMi9HNy5\",\n \"pubkey\": \"tpubDA9GDAntyJu4RBBie6encrd8Y8A68DZ8FWfKVGCj8Be5PVkdVLyfV48vW1p8ee33qTcBtELUPi6g12JFfFbEg1Sw5JF5k8HGAp42w3We18X\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mnUehAF1b4RfdyxmCLXj4jp7VU3DpiEgNb\",\n \"pubkey\": \"tpubDA9GDAntyJu4XHGJptXuRsUTHWwARWHqTbhddU8kA66V8yqs4nywt1HJbhaAySMWRra2nN5Ajmxf1egHqDZo1WRpAySbNh4UPkYshpwsFc8\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mpCcvL57WTbWJjFtygEVj3t8G4aphqZvT6\",\n \"pubkey\": \"tpubDA9GDAntyJu4LiJmctWWofyrehLxAM5aQ7TS9W5dufVszQDBejoZHpJVuRV4sdwzxZ2XAeNPafdscD3YfcNE923aexNx6gjCwM2PfQv1fJq\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mqk1FomiNA88HZrxNP7Gc79TJ8D3QoXRfw\",\n \"pubkey\": \"tpubDA9GDAntyJu4GmAPiKBUWoGj6C2EMnmgtV6CbTgpsS9t2BZqVJqqaKvcbPoiSadXghaMddU4NMBzaGqverv2k8Y46ycHBafFzj5rz33ni4z\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"ms6a57pGmU4AYCKt47Coy9m8bZ6ANyBbY8\",\n \"pubkey\": \"tpubDA9GDAntyJu55r3BFjh4XXdzUc3AmBxNng6CYLm5H2Ktnq8QuKC4TKmGCrcnFhk9iCShyGXLLMrFHeezunFzRfUDNsrxTAevdojYEp2hDW2\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mu56hCrA8M5BWCHhkmQrh7rqWkK7QRs16T\",\n \"pubkey\": \"tpubDA9GDAntyJu4vpqWb4x2iyLRshPjnTsatFwPDuzSnPrQV1uHCHWGNi8jsvRu7jnPcnLWQASh3amX3ezDwxeKX4DdYoXaUYzzpmPGkXb2RGD\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"muTpCvgtsoHyckenmY2xomphtAGH5kLEJS\",\n \"pubkey\": \"tpubDA9GDAntyJu4jR3pxJ5zGLzow77PCeNNzaTaFTGfCeQJN4pDqouPWsmagQ6MBUENszEBc8oo4RCRTH8j26Mas7d5p8SBS1sziWjfcx6YkpA\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"muXAwAWJ4ZmhRsce8AfDzLBBsS7Ji8UuHg\",\n \"pubkey\": \"tpubDA9GDAntyJu4UKVpFxLDPz4oLNzAM56fKrBHNjt9tDBgMYGGU9NGTXiMhtDTnuZcS4qaxzeDh1QkqitgX22sjBueJoaqBzXiDX6Da4BdhWa\",\n \"used_times\": 0\n },\n {\n \"account\": \"mhEEGvZLKogxRp6mHgbWjfKXmN9eFF7xnV\",\n \"address\": \"mwtoiYVnswqRLUz7mmng3f8NPNXSN4AWxW\",\n \"pubkey\": \"tpubDA9GDAntyJu4dYBRhCysuYpELVPDMx3iLine truncated
|
||||
"curl": "curl -d'{\"method\": \"address_list\", \"params\": {\"account_id\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\"}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet address list --account_id=\"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_list\", \"params\": {\"account_id\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\"}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"address\": \"mfYmjb767fwcQEEg9JAfio3tntwWNjKcDM\",\n \"pubkey\": \"tpubDA9GDAntyJu4hsBoehPcg9Q3Yaaj8g8zzAw7ihUmNSpBQ6FiVZiyA55fNH6aE2F1KAizSh5pNTfFzL7u42X3AkhCU1vmK8xjcb6SX95Fwbn\",\n \"used_times\": 0\n },\n {\n \"account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"address\": \"mgXEGziF2d8bzRm6ayCkYxfqsJMkJAwoBU\",\n \"pubkey\": \"tpubDA9GDAntyJu4NKUhJ5JBm9isBmG18G1rn99QYeqKzPbX8eoY34K5c6ffy8ZsWhGpWqewws4pxxNtDuK2J5jfbhV2k3Yo5R2XsjHP8LuNaZp\",\n \"used_times\": 0\n },\n {\n \"account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"address\": \"mgnH6q4rhzmXoK19QYCSVkT5Z5upv4ayL3\",\n \"pubkey\": \"tpubDA9GDAntyJu4TSibjnPiCkr1pCSiDxeMQ38mAmBa5h4CYYmxgp3xBNo6rg274st5AffPczqMCJYj62s4A73UrDY58eb7Du9UibVG49oHumi\",\n \"used_times\": 0\n },\n {\n \"account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"address\": \"mgsBH4Q2kLDhHqpL5QxoBGbnsTRSqeLW9k\",\n \"pubkey\": \"tpubDA9GDAntyJu4UDSiywVFBSqTGN39A3HsXV851H6WRNtiiUKBBNW5vpdPK99xdhWGJ9Ca2Fpk24arfXas14o9q5u4CzGgTf6o88VwrektyAa\",\n \"used_times\": 0\n },\n {\n \"account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"address\": \"mhPRoHzppxCmWEjSCjPSPGA1jh4GfHhm2k\",\n \"pubkey\": \"tpubDA9GDAntyJu4kS19mFVsPe3aCT6ajTTGZAQRtGw14BRFkYUCd5LSfwYz1QkNqG6GqvCQySP4qgroEUAMcfoChkzi4q1riU7qwGG29JUkEG2\",\n \"used_times\": 0\n },\n {\n \"account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"address\": \"mjgGqVK1reumaWsJPD4W9p6uUmq2U2GFTA\",\n \"pubkey\": \"tpubDA9GDAntyJu4cFF47b72rDbjnsvgCc7UarzAfeRnZXfSivXUrpSn6ZDXCJTLJiVJmfU8gNttAw7x9hspzNeYFZhzhMnSCLm7n2pZH3oNXR2\",\n \"used_times\": 0\n },\n {\n \"account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"address\": \"mm2imDmzMdZ1W3QTp9EcS33DG73CkFkMrU\",\n \"pubkey\": \"tpubDA9GDAntyJu4KLzz1GGQ9THB7ZDkXHXSVXFo6ePz4cdersZzQf1ja529V4imkrXXc9xACJWehbgmHc9VzBjh1qpsH8D84roeH1ueUqVPcH6\",\n \"used_times\": 0\n },\n {\n \"account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"address\": \"mmUUzg5PeBMEPtzpYrEsdhWWTXpGHU4He3\",\n \"pubkey\": \"tpubDA9GDAntyJu4xQKfdMgBeAYuFYZ2SyMQYzMdLSwhoPimGBtqXBCQSVdZcWzSw64kqZQHB1aa2eeEYU9FzwsnmQtPNuUup2v6tTr4518aoHb\",\n \"used_times\": 0\n },\n {\n \"account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"address\": \"mmjj3hM448sQ17yxRCEorHdUJ1BwPAHAGX\",\n \"pubkey\": \"tpubDA9GDAntyJu4WPs77CiBsARhpdthGoMo7LsMD35YRYLavcThAx1YZJZparw648XWNPV1zVUj9EBi66gCxipfjSpejeF873PMDJFP4moWrER\",\n \"used_times\": 0\n },\n {\n \"account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"address\": \"mo42rUxQVRZDHGTwQpyYXGjX21gwbUimgU\",\n \"pubkey\": \"tpubDA9GDAntyJu4YqD1oRvSa8jF1gUNVeUCA5g3o6o9TWsDAYnCVr9jmweKHeBtC15JUyCyWPn5WD3oRrJ11g6Xsy6pCabfBuKgeiftVFoJJiY\",\n \"used_times\": 0\n },\n {\n \"account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"address\": \"mpJaXnK31EKtRsb2gnbLYvnx3ianDanav8\",\n \"pubkey\": \"tpubDA9GDAntyJu4MRLzrHe3Voo1DXwqH5V9bwrE8MzyAuDroKhBzN8VnfpsKKXaFFWfpVTCUVoNwCR3amAbtKtf7qGRvZdLHZCpU4JW99tXd6W\",\n \"used_times\": 0\n },\n {\n \"account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"address\": \"mqzRMchGhAWhE2yUicheRtBjSe9qtE6MUB\",\n \"pubkey\": \"tpubDA9GDAntyJu4HpQGjfmjt837jAgc9WrswML7sYzmLTRfh6bRga6tYaX8Curd7vJD7Jkckaz1ykKER56UqQHAE8EavYDJhY6WRj41ZAeb4CZ\",\n \"used_times\": 0\n },\n {\n \"account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"address\": \"mrEUqt5FY6RmdLoAeHLt7UXvQH1XQrArP1\",\n \"pubkey\": \"tpubDA9GDAntyJu4R6XEzGLepqVULLnvTiBGM9WMypA4EBKybN1YxTLJmxprynNNJJZ2DP8T8DdsRvMUX3iomgng3LMD5Q3BJtfWpNLQ2aNd1Gy\",\n \"used_times\": 0\n },\n {\n \"account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"address\": \"ms529tV4Qgy3rmyRZRFsBte5et34u5jst9\",\n \"pubkey\": \"tpubDA9GDAntyJu4H9BbZt7F4xn68n9dUFeFCdGQ6br2AAS7YjdfK435wdQeBeobocfz3y5CAxMdsgu1zyRmTL3xbz3XLcDvXMgU6fLaFVcPgnt\",\n \"used_times\": 0\n },\n {\n \"account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"address\": \"mtBjVjoGWCpzbQT1NzZDfSrn95TeJG1ji1\",\n \"pubkey\": \"tpubDA9GDAntyJu4Fdpx7Tcb5vBqydXH9BMNk9XNZSuhHZWhZHsgEL8p89FibADSsEZ3gGdqkyspztHbrprSgW3nwFqNtmHvoWVHZED3wvGXuMZ\",\n \"used_times\": 0\n },\n {\n \"account\": \"msG8sk5GWMXHHywtmR1Ej49YSW31aW2vuW\",\n \"address\": \"mtkS5xt3u4763mxSXuw1HkVcRnDoMES4aX\",\n \"pubkey\": \"tpubDA9GDAntyJu4dFafTbp4793eHxNFfZVAdJTHu2Q577vYLyCq3PBYh1etrhTMLeqrdH1bGuddrPFQ28WTHQhgWzc7JQxN5DiMvsgjANSjTQ1\",\n \"Line truncated
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -808,7 +820,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\": \"mfyjzur5kkyBg5YDhx4UiAabb2rx2xMsE3\"\n}"
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": \"mnGN3JmiBDqSa5bMx8BrZE4FUVGjVh863E\"\n}"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -858,10 +870,10 @@
|
||||
"examples": [
|
||||
{
|
||||
"title": "Delete a blob",
|
||||
"curl": "curl -d'{\"method\": \"blob_delete\", \"params\": {\"blob_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\"}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet blob delete 04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"blob_delete\", \"params\": {\"blob_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\"}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": \"Deleted 04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\"\n}"
|
||||
"curl": "curl -d'{\"method\": \"blob_delete\", \"params\": {\"blob_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\"}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet blob delete 4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"blob_delete\", \"params\": {\"blob_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\"}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": \"Deleted 4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\"\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -920,15 +932,15 @@
|
||||
"is_required": false
|
||||
},
|
||||
{
|
||||
"name": "page_size",
|
||||
"name": "page",
|
||||
"type": "int",
|
||||
"description": "results page size",
|
||||
"description": "page to return during paginating",
|
||||
"is_required": false
|
||||
},
|
||||
{
|
||||
"name": "page",
|
||||
"name": "page_size",
|
||||
"type": "int",
|
||||
"description": "page of results to return",
|
||||
"description": "number of items on page during pagination",
|
||||
"is_required": false
|
||||
}
|
||||
],
|
||||
@@ -939,7 +951,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 \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"dc724381cf9fe8f3e0a0a971345dd83ebe7e6e76089bc34c7b94bc3ab00daa23f8de7a7cc35c0f1ade6bbfdb269328d5\",\n \"776756ff093fa5d222076c94f4b0e167e1f189aaa063deb3700ac4ffcbb5d8f50888f02e32e462115305aa2c48520885\",\n \"e70b50e665ea448a5fd1e082c133528259b653b95c83b896e913ebba66daa0cdc63ffbd686bfe5621a8db21c9c9ff591\"\n ]\n}"
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"f0990acb4582a282b953393716db3cf0292607a715935100883d73ef6578ce2ea270fc487afd87becb4e52d326e25015\",\n \"3dbc940eb80e8d3aa8f40e1c8dd26968e27a9bdd602d23500b61f5bd91c513858ea4e1d90df735542f81aabeefa11636\",\n \"812d10679b60acb070e03a83594a6ae0525f70eab8973f40e31efbb0d66d06f81ed2da91c0ba698629586bc3d1cd6f62\"\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 4,\n \"total_pages\": 1\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1020,10 +1032,10 @@
|
||||
"examples": [
|
||||
{
|
||||
"title": "Abandon a channel claim",
|
||||
"curl": "curl -d'{\"method\": \"channel_abandon\", \"params\": {\"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\", \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet channel abandon 2b9f04f6fbbb1aaf58007e3a5167339f789c41d3",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_abandon\", \"params\": {\"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\", \"preview\": false, \"blocking\": false}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000012f48c527618951adc73e1347b06565d97d8a51ee2d169f21ab2ea21f9b763381000000006a473044022010d5d5a0382513e26981376da72e3a69b4c283af61602c9f6b2933e12cd93e5e0220341dd399bdc80cbd94b04f7db6163732a98420d3b18d5ee3181955deb3263d37012102c78c4b466b16d99ec2a0c38c236925b1fa4e73918bb740ba9c2dd17a11742259ffffffff0134b7f505000000001976a9143c2edd73c3f26e301dfe98820974e69aad8812ea88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mwgNXQtcY3oWpQrtWZWLJRqLeTRCNVVCTe\",\n \"amount\": \"1.0\",\n \"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\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#2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"timestamp\": 1571238737,\n \"txid\": \"8133769b1fa22eab219f162dee518a7dd96565b047133ec7ad51896127c5482f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec\",\n \"public_key_id\": \"mt1Qr1ftwmkeWG8KVuBiPgDkAzkxAkhvpY\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mm1AyocQcxBmZUm8X4KN7w4yM8m96J9FY2\",\n \"amount\": \"0.999893\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"08d10283a51c0c520558b8ebf71f7b85fd1f4e75f9f0a94c7c5cec5101e106a9\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000107\",\n \"total_input\": \"1.0\",\n \"total_output\": \"0.999893\",\n \"txid\": \"08d10283a51c0c520558b8ebf71f7b85fd1f4e75f9f0a94c7c5cec5101e106a9\"\n }\n}"
|
||||
"curl": "curl -d'{\"method\": \"channel_abandon\", \"params\": {\"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\", \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet channel abandon 771c37a00c198b81e784ee14406a81a3d11d1a92",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_abandon\", \"params\": {\"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\", \"preview\": false, \"blocking\": false}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001e294d93770df504bba9bcd44019b2ab3956e264745b051bb92e6a5ca4ceb7dd1000000006b483045022100a3dc9d5cafb11365731fdd5437b23bb0523698841609355785d073c4b19bb8f9022047b9d85cd1720e090d1034507f7f9d9988bd4c8bd60c58a23d399b177f7fa7b10121027b4b97c18faa08a4171c6f0056371a019ce5badefde3c844f975572c89db95b5ffffffff0134b7f505000000001976a9145baaab46dcebb6d36b6375382178d9137a1c139688ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"amount\": \"1.0\",\n \"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\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#771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"timestamp\": 1572065728,\n \"txid\": \"d17deb4ccaa5e692bb51b04547266e95b32a9b0144cd9bba4b50df7037d994e2\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d\",\n \"public_key_id\": \"mzWH9q8CpEZHdpVW3VDu37eQRKwtp2mtHU\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"moseEobAQx6Wt3h1GajTh68fqD1m37gBpC\",\n \"amount\": \"0.999893\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"cb991eeb1d79b557c4715f2b62ee0b4d2124b7e83fb4253a35615bf9c2d48d11\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000107\",\n \"total_input\": \"1.0\",\n \"total_output\": \"0.999893\",\n \"txid\": \"cb991eeb1d79b557c4715f2b62ee0b4d2124b7e83fb4253a35615bf9c2d48d11\"\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1153,14 +1165,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\": \"01000000011c627e57c603b0773da94821755027f31aa215acf00628a34bd61d913e3438e4010000006a4730440220526501acbddf7b8193faf75f58bfd6fa2c5abf4d2e1f4f9c086cb21cc42884c80220383f4d9ed6b43cf8c2b7026359b798b007f9652c508fdd5eef51c7866f06a3890121039d0cd4ef1ba1be927fcf33368be83a3de89ba2039efd987087296da4c1e4e557ffffffff0200e1f5050000000084b508406368616e6e656c4c5d00125a0a583056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec6d7576a914b149fb8f0354ef198b41d7dc59ed9a4c4065b37988acc462a029000000001976a9146a7a5af2adcb0e498acbc9c1580ba58c8423edf488ac00000000\",\n \"inputs\": [\n {\n \"address\": \"n4BkgTZV2xNeusnQR7zDz4qNYsqMScMFpN\",\n \"amount\": \"7.999876\",\n \"confirmations\": 2,\n \"height\": 207,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1571238737,\n \"txid\": \"e438343e911dd64ba32806f0ac15a21af32750752148a93d77b003c6577e621c\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mwgNXQtcY3oWpQrtWZWLJRqLeTRCNVVCTe\",\n \"amount\": \"1.0\",\n \"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\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#2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"timestamp\": null,\n \"txid\": \"991c7a0ee460881c74b66c6adf048ea8d63f4de36db15b951cb5578d25977a20\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec\",\n \"public_key_id\": \"mt1Qr1ftwmkeWG8KVuBiPgDkAzkxAkhvpY\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mqDxVnFJechdp4F4cVHKt5onNecc2dYGQP\",\n \"amount\": \"6.983769\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"991c7a0ee460881c74b66c6adf048ea8d63f4de36db15b951cb5578d25977a20\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.016107\",\n \"total_input\": \"7.999876\",\n \"total_output\": \"7.983769\",\n \"txid\": \"991c7a0ee460881c74b66c6adf048ea8d63f4de36db15b951cb5578d25977a20\"\n }\n}"
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000010fc06811a5964279eda14650f1b03f5cafd35e6f2c145d3f47977ae82ed47b67010000006b4830450221009dcffc0a4985b28966df194b8b9f1d0aef5cdedf90679f486a13a7ac4d869101022037a87cec1907e55f250c95e65886338fda245a78bf67f56fa8104d3264ae98ee01210231d84e50685cf5b8169b1d76cb61fe976bdeec0a70f63971240a51468848b6d3ffffffff0200e1f5050000000084b508406368616e6e656c4c5d00125a0a583056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d6d7576a91439842b697cebf5599245e9612027a1f2b6e02b2688acc462a029000000001976a914275f15da77f0e910227c88e4b0520d5ce576742588ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mtBmnN1xnZj1gFwBwabrRe7bTCM1VXT961\",\n \"amount\": \"7.999876\",\n \"confirmations\": 2,\n \"height\": 207,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1572065728,\n \"txid\": \"677bd42ee87a97473f5d142c6f5ed3af5c3fb0f15046a1ed794296a51168c00f\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"amount\": \"1.0\",\n \"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\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#771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"timestamp\": null,\n \"txid\": \"3a921676025be04c97d34d1e6207605bfe91eb358fd3026b20c7e665abafb9b0\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d\",\n \"public_key_id\": \"mzWH9q8CpEZHdpVW3VDu37eQRKwtp2mtHU\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mj78ZBXmcPQ2uRYVaRRHtY3CYC7QKSqTc6\",\n \"amount\": \"6.983769\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"3a921676025be04c97d34d1e6207605bfe91eb358fd3026b20c7e665abafb9b0\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.016107\",\n \"total_input\": \"7.999876\",\n \"total_output\": \"7.983769\",\n \"txid\": \"3a921676025be04c97d34d1e6207605bfe91eb358fd3026b20c7e665abafb9b0\"\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\": \"01000000012f48c527618951adc73e1347b06565d97d8a51ee2d169f21ab2ea21f9b763381010000006a4730440220096be41209cf2cf7a326416b44eeb7b90d2ee5e66ce2b6cf23c4c4e88d0bc32a02207f8511af071028d4d1c18b2c8d24da624a601705e103579a08dbe0ac79ffe9ca0121038b4b78c5608ac2c38a87dc75a65583ebec0710d86234047aefd80c58bbc47549ffffffff0200e1f50500000000fd5001b50b406269676368616e6e656c4d25010012ab010a583056301006072a8648ce3d020106052b8104000a03420004913516977130c11c007f3f03b989e285d7819e87ef0081db836ea77f4f6b30ae72e142d489fb0f24dceaed1b512e588de70186df44a0a0b2de895454a57d758f121663726561746f7240736d616c6c6d656469612e636f6d1a15687474703a2f2f736d616c6c6d656469612e636f6d22202a1e687474703a2f2f736d616c6c6d656469612e636f6d2f6c6f676f2e6a7067420b426967204368616e6e656c4a1e41206368616e6e656c2077697468206c6f7473206f6620766964656f732e52202a1e687474703a2f2f736d616c6c6d656469612e636f6d2f6c6f676f2e6a70675a056d757369635a0361727462050883011820620308ab016a0208206a0908e9011a044b6979766d7576a9148d669513928185cd6d120aff9f7867d34db8505f88ace221d305000000001976a914e86ef8191aa516e8a21723806345a0cd1d0f2ae888ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mvnQKeWXrBFsnman3ekbTYfM9M57TD6JnF\",\n \"amount\": \"1.9993355\",\n \"confirmations\": 1,\n \"height\": 210,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1571238737,\n \"txid\": \"8133769b1fa22eab219f162dee518a7dd96565b047133ec7ad51896127c5482f\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mtQcTeVvcERC4MfPcV4uqa5cxVD6wDnKW3\",\n \"amount\": \"1.0\",\n \"claim_id\": \"781d79c6676a8c32f1a29c5841f0772e2c68e11a\",\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#781d79c6676a8c32f1a29c5841f0772e2c68e11a\",\n \"timestamp\": null,\n \"txid\": \"be18fe4749b0225be27839ebb6463fb3c8e42968bbf3f81c7c969c163ab1d0ab\",\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\": \"3056301006072a8648ce3d020106052b8104000a03420004913516977130c11c007f3f03b989e285d7819e87ef0081db836ea77f4f6b30ae72e142d489fb0f24dceaed1b512e588de70186df44a0a0b2de895454a57d758f\",\n \"public_key_id\": \"mtmCqZ6buBWvrSybGwujzooVaCb8tNeM5y\",\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\": \"n2hwzq3j937oBARJtLLWCagiq69Vu9ZuGi\",\n \"amount\": \"0.9772285\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"be18fe4749b0225be27839ebb6463fb3c8e42968bbf3f81c7c969c163ab1d0ab\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.022107\",\n \"total_input\": \"1.9993355\",\n \"total_output\": \"1.9772285\",\n \"txid\": \"be18fe4749b0225be27839ebb6463fb3c8e42968bbf3f81c7c969c163ab1d0ab\"\n }\n}"
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001e294d93770df504bba9bcd44019b2ab3956e264745b051bb92e6a5ca4ceb7dd1010000006a47304402201e8b0b0541507a27168b4627943cb431af2983a148e1ffd6a897727c4b73b2460220683d9d23252543c608f0141c2c772930963ea0c035c678dd7e2d67f7adb317b9012103984f1a40be8ce80f8ddf28bb822fcad1edada28c5ff97f9229a343aa25ab7488ffffffff0200e1f50500000000fd5001b50b406269676368616e6e656c4d25010012ab010a583056301006072a8648ce3d020106052b8104000a0342000408fe7c090218a14d762aae3444157d34e77093def916406f11926e1c1fd8432783dd1054f55e2b779f079933e36de44154882b8e80e14b21516a1974406a17be121663726561746f7240736d616c6c6d656469612e636f6d1a15687474703a2f2f736d616c6c6d656469612e636f6d22202a1e687474703a2f2f736d616c6c6d656469612e636f6d2f6c6f676f2e6a7067420b426967204368616e6e656c4a1e41206368616e6e656c2077697468206c6f7473206f6620766964656f732e52202a1e687474703a2f2f736d616c6c6d656469612e636f6d2f6c6f676f2e6a70675a056d757369635a0361727462050883011820620308ab016a0208206a0908e9011a044b6979766d7576a914f1d467d214a341c115f0643ef3fcded0e5461ec488ace221d305000000001976a914c86c1523eefbf2f109a950e47b1d3faffb54a25f88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"n3pq6NofK4d2HpZNrixrFKXav3815jYA2s\",\n \"amount\": \"1.9993355\",\n \"confirmations\": 1,\n \"height\": 210,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1572065728,\n \"txid\": \"d17deb4ccaa5e692bb51b04547266e95b32a9b0144cd9bba4b50df7037d994e2\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"n3ZdbUsqvGMgdDCmp8vLh8JJZWT9PYDDeW\",\n \"amount\": \"1.0\",\n \"claim_id\": \"9330a4cfebf2c60bed5f25f0cb5bf0b5ed10233f\",\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#9330a4cfebf2c60bed5f25f0cb5bf0b5ed10233f\",\n \"timestamp\": null,\n \"txid\": \"a59b4032b77d05bc54ca7c82be46e9ab9d4b5896fef8c2ff30eaf56b2d59d1f3\",\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\": \"3056301006072a8648ce3d020106052b8104000a0342000408fe7c090218a14d762aae3444157d34e77093def916406f11926e1c1fd8432783dd1054f55e2b779f079933e36de44154882b8e80e14b21516a1974406a17be\",\n \"public_key_id\": \"mw187dYsy6qZDzaaB8nYUD22GWczRV8YVs\",\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\": \"myngv8TWUh7JiAnEGcDc6ME9NUFyJQaY3V\",\n \"amount\": \"0.9772285\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"a59b4032b77d05bc54ca7c82be46e9ab9d4b5896fef8c2ff30eaf56b2d59d1f3\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.022107\",\n \"total_input\": \"1.9993355\",\n \"total_output\": \"1.9772285\",\n \"txid\": \"a59b4032b77d05bc54ca7c82be46e9ab9d4b5896fef8c2ff30eaf56b2d59d1f3\"\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1252,14 +1264,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 {\n \"address\": \"mwgNXQtcY3oWpQrtWZWLJRqLeTRCNVVCTe\",\n \"amount\": \"1.0\",\n \"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\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#2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"timestamp\": 1571238737,\n \"txid\": \"991c7a0ee460881c74b66c6adf048ea8d63f4de36db15b951cb5578d25977a20\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec\",\n \"public_key_id\": \"mt1Qr1ftwmkeWG8KVuBiPgDkAzkxAkhvpY\"\n },\n \"value_type\": \"channel\"\n }\n ]\n}"
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"amount\": \"1.0\",\n \"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\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#771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"timestamp\": 1572065728,\n \"txid\": \"3a921676025be04c97d34d1e6207605bfe91eb358fd3026b20c7e665abafb9b0\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d\",\n \"public_key_id\": \"mzWH9q8CpEZHdpVW3VDu37eQRKwtp2mtHU\"\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\": \"mwgNXQtcY3oWpQrtWZWLJRqLeTRCNVVCTe\",\n \"amount\": \"1.0\",\n \"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\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#2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"timestamp\": 1571238737,\n \"txid\": \"991c7a0ee460881c74b66c6adf048ea8d63f4de36db15b951cb5578d25977a20\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec\",\n \"public_key_id\": \"mt1Qr1ftwmkeWG8KVuBiPgDkAzkxAkhvpY\"\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\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"amount\": \"1.0\",\n \"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\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#771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"timestamp\": 1572065728,\n \"txid\": \"3a921676025be04c97d34d1e6207605bfe91eb358fd3026b20c7e665abafb9b0\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d\",\n \"public_key_id\": \"mzWH9q8CpEZHdpVW3VDu37eQRKwtp2mtHU\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1416,10 +1428,10 @@
|
||||
"examples": [
|
||||
{
|
||||
"title": "Update a channel claim",
|
||||
"curl": "curl -d'{\"method\": \"channel_update\", \"params\": {\"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\", \"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 2b9f04f6fbbb1aaf58007e3a5167339f789c41d3 --title=\"New Channel\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_update\", \"params\": {\"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\", \"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\": \"0100000002207a97258d57b51c955bb16de34d3fd6a88e04df6a6cb6741c8860e40e7a1c99000000006b483045022100ec88dc1cf42bd93120fc907f2bf2c2b1c90d20b29f15ac0da49fd1d94c07623502203f1b2a5f67f486b14c1c3ba06bcc4980c0576b077021ff60765adeb43c23e090012102c78c4b466b16d99ec2a0c38c236925b1fa4e73918bb740ba9c2dd17a11742259ffffffff82c338cc89e50612eabffd2bd367d35a884966281fe4c49945f20a9f0cb29180000000006b4830450221008e3eb18f2c5a2b6b8d9807bd6ac89c59e2d9ee9c98b0ba928bd263aead7570970220255d44758064c69593e1d6677af51aa95901d6438daf1bed21c386a87b5c3a180121020ae5fee00a2ea92d92c92ca8eacea85ea59bbc2fa6adc47a6093f13e23a50b22ffffffff0200e1f50500000000a6b708406368616e6e656c14d3419c789f3367513a7e0058af1abbfbf6049f2b4c6a00125a0a583056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec420b4e6577204368616e6e656c6d6d76a914b149fb8f0354ef198b41d7dc59ed9a4c4065b37988ac6ebeea0b000000001976a914a775da52baa7e417481a5aa7e1765040b973a85288ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mwgNXQtcY3oWpQrtWZWLJRqLeTRCNVVCTe\",\n \"amount\": \"1.0\",\n \"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\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#2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"timestamp\": 1571238737,\n \"txid\": \"991c7a0ee460881c74b66c6adf048ea8d63f4de36db15b951cb5578d25977a20\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec\",\n \"public_key_id\": \"mt1Qr1ftwmkeWG8KVuBiPgDkAzkxAkhvpY\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mhK6L59USiby9g31qP2JpNm2QFjSvzMhU4\",\n \"amount\": \"1.999604\",\n \"confirmations\": 1,\n \"height\": 209,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 0,\n \"timestamp\": 1571238737,\n \"txid\": \"8091b20c9f0af24599c4e41f286649885ad367d32bfdbfea1206e589cc38c382\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mwgNXQtcY3oWpQrtWZWLJRqLeTRCNVVCTe\",\n \"amount\": \"1.0\",\n \"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\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#2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"timestamp\": null,\n \"txid\": \"8133769b1fa22eab219f162dee518a7dd96565b047133ec7ad51896127c5482f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec\",\n \"public_key_id\": \"mt1Qr1ftwmkeWG8KVuBiPgDkAzkxAkhvpY\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mvnQKeWXrBFsnman3ekbTYfM9M57TD6JnF\",\n \"amount\": \"1.9993355\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"8133769b1fa22eab219f162dee518a7dd96565b047133ec7ad51896127c5482f\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.0002685\",\n \"total_input\": \"2.999604\",\n \"total_output\": \"2.9993355\",\n \"txid\": \"8133769b1fa22eab219f162dee518a7dd96565b047133ec7ad51896127c5482f\"\n }\n}"
|
||||
"curl": "curl -d'{\"method\": \"channel_update\", \"params\": {\"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\", \"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 771c37a00c198b81e784ee14406a81a3d11d1a92 --title=\"New Channel\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_update\", \"params\": {\"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\", \"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\": \"0100000002b0b9afab65e6c7206b02d38f35eb91fe5b6007621e4dd3974ce05b027616923a000000006a473044022033d4079b1ed0da2486e1a276d5a3a48317fa20f85f3b696abb59a770f37ca6cd02203aa3012b9372e2324152fa1b0883623f15b03a496ae46130a2ddc7821bbee65b0121027b4b97c18faa08a4171c6f0056371a019ce5badefde3c844f975572c89db95b5ffffffff22f939d32fb02a447374d12744948d5df0eab8d12c2d38c3d0f6eabc90f6ca4b000000006b483045022100895e2bc79533c9240e3a0dcb425d4ee2014733232c6a690844565557a7fe6472022003a92aa08730e5cd1bd31e4dd2e2668e045e5d1441120c1cf0934da020d3d05a012102de8cdfe610e3982d2216faeb333847e6ff10c0e9771900ab48b89d0c86cdc105ffffffff0200e1f50500000000a6b708406368616e6e656c14921a1dd1a3816a4014ee84e7818b190ca0371c774c6a00125a0a583056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d420b4e6577204368616e6e656c6d6d76a91439842b697cebf5599245e9612027a1f2b6e02b2688ac6ebeea0b000000001976a914f4b43e416f71e8dfde9d233a614fdb6b4eda235788ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"amount\": \"1.0\",\n \"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\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#771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"timestamp\": 1572065728,\n \"txid\": \"3a921676025be04c97d34d1e6207605bfe91eb358fd3026b20c7e665abafb9b0\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d\",\n \"public_key_id\": \"mzWH9q8CpEZHdpVW3VDu37eQRKwtp2mtHU\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mj78ZBXmcPQ2uRYVaRRHtY3CYC7QKSqTc6\",\n \"amount\": \"1.999604\",\n \"confirmations\": 1,\n \"height\": 209,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 0,\n \"timestamp\": 1572065728,\n \"txid\": \"4bcaf690bceaf6d0c3382d2cd1b8eaf05d8d944427d17473442ab02fd339f922\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"amount\": \"1.0\",\n \"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\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#771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"timestamp\": null,\n \"txid\": \"d17deb4ccaa5e692bb51b04547266e95b32a9b0144cd9bba4b50df7037d994e2\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d\",\n \"public_key_id\": \"mzWH9q8CpEZHdpVW3VDu37eQRKwtp2mtHU\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"n3pq6NofK4d2HpZNrixrFKXav3815jYA2s\",\n \"amount\": \"1.9993355\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"d17deb4ccaa5e692bb51b04547266e95b32a9b0144cd9bba4b50df7037d994e2\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.0002685\",\n \"total_input\": \"2.999604\",\n \"total_output\": \"2.9993355\",\n \"txid\": \"d17deb4ccaa5e692bb51b04547266e95b32a9b0144cd9bba4b50df7037d994e2\"\n }\n}"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1464,14 +1476,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 {\n \"address\": \"miY8Ni6D11cwYEDZYYfdcKfyUwp4xCdws8\",\n \"amount\": \"1.0\",\n \"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\",\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#c011186b47f0499392fdd22d73a2ec5426b8556f\",\n \"signing_channel\": {\n \"address\": \"mwgNXQtcY3oWpQrtWZWLJRqLeTRCNVVCTe\",\n \"amount\": \"1.0\",\n \"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\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#2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"timestamp\": 1571238737,\n \"txid\": \"8133769b1fa22eab219f162dee518a7dd96565b047133ec7ad51896127c5482f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec\",\n \"public_key_id\": \"mt1Qr1ftwmkeWG8KVuBiPgDkAzkxAkhvpY\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1571238738,\n \"txid\": \"aa2721a8f22f2c166a8f5722adf6b96c9e4d142033719a5adedf9d11db235607\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp5h1lifqx\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mwgNXQtcY3oWpQrtWZWLJRqLeTRCNVVCTe\",\n \"amount\": \"1.0\",\n \"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\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#2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"timestamp\": 1571238737,\n \"txid\": \"8133769b1fa22eab219f162dee518a7dd96565b047133ec7ad51896127c5482f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec\",\n \"public_key_id\": \"mt1Qr1ftwmkeWG8KVuBiPgDkAzkxAkhvpY\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n }\n ]\n}"
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mgNr4oaV5EZb1GgkTp6hG38QMHik6pBWjx\",\n \"amount\": \"1.0\",\n \"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\",\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#06d4639a98ad7c343529553088427759e683fb1a\",\n \"signing_channel\": {\n \"address\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"amount\": \"1.0\",\n \"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\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#771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"timestamp\": 1572065728,\n \"txid\": \"d17deb4ccaa5e692bb51b04547266e95b32a9b0144cd9bba4b50df7037d994e2\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d\",\n \"public_key_id\": \"mzWH9q8CpEZHdpVW3VDu37eQRKwtp2mtHU\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1572065729,\n \"txid\": \"2526d91622485c951d894b7bd55d231a756a907cf597f7bf2e7d86488dc91bd8\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmplrrcjagu\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"amount\": \"1.0\",\n \"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\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#771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"timestamp\": 1572065728,\n \"txid\": \"d17deb4ccaa5e692bb51b04547266e95b32a9b0144cd9bba4b50df7037d994e2\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d\",\n \"public_key_id\": \"mzWH9q8CpEZHdpVW3VDu37eQRKwtp2mtHU\",\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\": \"miY8Ni6D11cwYEDZYYfdcKfyUwp4xCdws8\",\n \"amount\": \"1.0\",\n \"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\",\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#c011186b47f0499392fdd22d73a2ec5426b8556f\",\n \"signing_channel\": {\n \"address\": \"mwgNXQtcY3oWpQrtWZWLJRqLeTRCNVVCTe\",\n \"amount\": \"1.0\",\n \"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\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#2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"timestamp\": 1571238737,\n \"txid\": \"8133769b1fa22eab219f162dee518a7dd96565b047133ec7ad51896127c5482f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec\",\n \"public_key_id\": \"mt1Qr1ftwmkeWG8KVuBiPgDkAzkxAkhvpY\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1571238738,\n \"txid\": \"aa2721a8f22f2c166a8f5722adf6b96c9e4d142033719a5adedf9d11db235607\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp5h1lifqx\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mwgNXQtcY3oWpQrtWZWLJRqLeTRCNVVCTe\",\n \"amount\": \"1.0\",\n \"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\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#2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"timestamp\": 1571238737,\n \"txid\": \"8133769b1fa22eab219f162dee518a7dd96565b047133ec7ad51896127c5482f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec\",\n \"public_key_id\": \"mt1Qr1ftwmkeWG8KVuBiPgDkAzkxAkhvpY\",\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\": \"mgNr4oaV5EZb1GgkTp6hG38QMHik6pBWjx\",\n \"amount\": \"1.0\",\n \"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\",\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#06d4639a98ad7c343529553088427759e683fb1a\",\n \"signing_channel\": {\n \"address\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"amount\": \"1.0\",\n \"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\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#771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"timestamp\": 1572065728,\n \"txid\": \"d17deb4ccaa5e692bb51b04547266e95b32a9b0144cd9bba4b50df7037d994e2\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d\",\n \"public_key_id\": \"mzWH9q8CpEZHdpVW3VDu37eQRKwtp2mtHU\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1572065729,\n \"txid\": \"2526d91622485c951d894b7bd55d231a756a907cf597f7bf2e7d86488dc91bd8\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmplrrcjagu\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"amount\": \"1.0\",\n \"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\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#771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"timestamp\": 1572065728,\n \"txid\": \"d17deb4ccaa5e692bb51b04547266e95b32a9b0144cd9bba4b50df7037d994e2\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d\",\n \"public_key_id\": \"mzWH9q8CpEZHdpVW3VDu37eQRKwtp2mtHU\",\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}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1751,14 +1763,14 @@
|
||||
"curl": "curl -d'{\"method\": \"claim_search\", \"params\": {\"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\": {\"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 \"items\": [\n {\n \"address\": \"miY8Ni6D11cwYEDZYYfdcKfyUwp4xCdws8\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#2/astream#c\",\n \"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\",\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\": 1571238738,\n \"effective_amount\": \"1.0\",\n \"expiration_height\": 263187,\n \"is_controlling\": true,\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#c011186b47f0499392fdd22d73a2ec5426b8556f\",\n \"short_url\": \"lbry://astream#c\",\n \"signing_channel\": {\n \"address\": \"mwgNXQtcY3oWpQrtWZWLJRqLeTRCNVVCTe\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#2\",\n \"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\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\": 1571238737,\n \"effective_amount\": \"1.0\",\n \"expiration_height\": 263183,\n \"is_controlling\": true,\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#2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"short_url\": \"lbry://@channel#2\",\n \"timestamp\": 1571238737,\n \"txid\": \"8133769b1fa22eab219f162dee518a7dd96565b047133ec7ad51896127c5482f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec\",\n \"public_key_id\": \"mt1Qr1ftwmkeWG8KVuBiPgDkAzkxAkhvpY\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1571238738,\n \"txid\": \"aa2721a8f22f2c166a8f5722adf6b96c9e4d142033719a5adedf9d11db235607\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp5h1lifqx\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ],\n \"page\": 1,\n \"page_size\": 10,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}"
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mgNr4oaV5EZb1GgkTp6hG38QMHik6pBWjx\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#7/astream#0\",\n \"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\",\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\": 1572065729,\n \"effective_amount\": \"1.0\",\n \"expiration_height\": 263187,\n \"is_controlling\": true,\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#06d4639a98ad7c343529553088427759e683fb1a\",\n \"short_url\": \"lbry://astream#0\",\n \"signing_channel\": {\n \"address\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#7\",\n \"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\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\": 1572065728,\n \"effective_amount\": \"1.0\",\n \"expiration_height\": 263183,\n \"is_controlling\": true,\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#771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"short_url\": \"lbry://@channel#7\",\n \"timestamp\": 1572065728,\n \"txid\": \"d17deb4ccaa5e692bb51b04547266e95b32a9b0144cd9bba4b50df7037d994e2\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d\",\n \"public_key_id\": \"mzWH9q8CpEZHdpVW3VDu37eQRKwtp2mtHU\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1572065729,\n \"txid\": \"2526d91622485c951d894b7bd55d231a756a907cf597f7bf2e7d86488dc91bd8\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmplrrcjagu\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\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\", \"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\", \"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 \"items\": [\n {\n \"address\": \"miY8Ni6D11cwYEDZYYfdcKfyUwp4xCdws8\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#2/astream#c\",\n \"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\",\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\": 1571238738,\n \"effective_amount\": \"1.0\",\n \"expiration_height\": 263187,\n \"is_controlling\": true,\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#c011186b47f0499392fdd22d73a2ec5426b8556f\",\n \"short_url\": \"lbry://astream#c\",\n \"signing_channel\": {\n \"address\": \"mwgNXQtcY3oWpQrtWZWLJRqLeTRCNVVCTe\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#2\",\n \"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\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\": 1571238737,\n \"effective_amount\": \"1.0\",\n \"expiration_height\": 263183,\n \"is_controlling\": true,\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#2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"short_url\": \"lbry://@channel#2\",\n \"timestamp\": 1571238737,\n \"txid\": \"8133769b1fa22eab219f162dee518a7dd96565b047133ec7ad51896127c5482f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec\",\n \"public_key_id\": \"mt1Qr1ftwmkeWG8KVuBiPgDkAzkxAkhvpY\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1571238738,\n \"txid\": \"aa2721a8f22f2c166a8f5722adf6b96c9e4d142033719a5adedf9d11db235607\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp5h1lifqx\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ],\n \"page\": 1,\n \"page_size\": 10,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}"
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mgNr4oaV5EZb1GgkTp6hG38QMHik6pBWjx\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#7/astream#0\",\n \"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\",\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\": 1572065729,\n \"effective_amount\": \"1.0\",\n \"expiration_height\": 263187,\n \"is_controlling\": true,\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#06d4639a98ad7c343529553088427759e683fb1a\",\n \"short_url\": \"lbry://astream#0\",\n \"signing_channel\": {\n \"address\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#7\",\n \"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\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\": 1572065728,\n \"effective_amount\": \"1.0\",\n \"expiration_height\": 263183,\n \"is_controlling\": true,\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#771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"short_url\": \"lbry://@channel#7\",\n \"timestamp\": 1572065728,\n \"txid\": \"d17deb4ccaa5e692bb51b04547266e95b32a9b0144cd9bba4b50df7037d994e2\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d\",\n \"public_key_id\": \"mzWH9q8CpEZHdpVW3VDu37eQRKwtp2mtHU\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1572065729,\n \"txid\": \"2526d91622485c951d894b7bd55d231a756a907cf597f7bf2e7d86488dc91bd8\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmplrrcjagu\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\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}"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1999,9 +2011,9 @@
|
||||
"examples": [
|
||||
{
|
||||
"title": "Delete a file",
|
||||
"curl": "curl -d'{\"method\": \"file_delete\", \"params\": {\"delete_from_download_dir\": false, \"delete_all\": false, \"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\"}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet file delete --claim_id=\"c011186b47f0499392fdd22d73a2ec5426b8556f\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_delete\", \"params\": {\"delete_from_download_dir\": false, \"delete_all\": false, \"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\"}}).json()",
|
||||
"curl": "curl -d'{\"method\": \"file_delete\", \"params\": {\"delete_from_download_dir\": false, \"delete_all\": false, \"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\"}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet file delete --claim_id=\"06d4639a98ad7c343529553088427759e683fb1a\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_delete\", \"params\": {\"delete_from_download_dir\": false, \"delete_all\": false, \"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\"}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": true\n}"
|
||||
}
|
||||
]
|
||||
@@ -2099,23 +2111,35 @@
|
||||
"type": "str",
|
||||
"description": "logical comparison, (eq | ne | g | ge | l | le)",
|
||||
"is_required": false
|
||||
},
|
||||
{
|
||||
"name": "page",
|
||||
"type": "int",
|
||||
"description": "page to return during paginating",
|
||||
"is_required": false
|
||||
},
|
||||
{
|
||||
"name": "page_size",
|
||||
"type": "int",
|
||||
"description": "number of items on page during pagination",
|
||||
"is_required": false
|
||||
}
|
||||
],
|
||||
"returns": " [\n {\n \"streaming_url\": \"(str) url to stream the file using range requests\",\n \"completed\": \"(bool) true if download is completed\",\n \"file_name\": \"(str) name of file\",\n \"download_directory\": \"(str) download directory\",\n \"points_paid\": \"(float) credit paid to download file\",\n \"stopped\": \"(bool) true if download is stopped\",\n \"stream_hash\": \"(str) stream hash of file\",\n \"stream_name\": \"(str) stream name\",\n \"suggested_file_name\": \"(str) suggested file name\",\n \"sd_hash\": \"(str) sd hash of file\",\n \"download_path\": \"(str) download path of file\",\n \"mime_type\": \"(str) mime type of file\",\n \"key\": \"(str) key attached to file\",\n \"total_bytes_lower_bound\": \"(int) lower bound file size in bytes\",\n \"total_bytes\": \"(int) file upper bound size in bytes\",\n \"written_bytes\": \"(int) written size in bytes\",\n \"blobs_completed\": \"(int) number of fully downloaded blobs\",\n \"blobs_in_stream\": \"(int) total blobs on stream\",\n \"blobs_remaining\": \"(int) total blobs remaining to download\",\n \"status\": \"(str) downloader status\",\n \"claim_id\": \"(str) None if claim is not found else the claim id\",\n \"txid\": \"(str) None if claim is not found else the transaction id\",\n \"nout\": \"(int) None if claim is not found else the transaction output index\",\n \"outpoint\": \"(str) None if claim is not found else the tx and output\",\n \"metadata\": \"(dict) None if claim is not found else the claim metadata\",\n \"channel_claim_id\": \"(str) None if claim is not found or not signed\",\n \"channel_name\": \"(str) None if claim is not found or not signed\",\n \"claim_name\": \"(str) None if claim is not found else the claim name\"\n }\n ]",
|
||||
"returns": " {\n \"page\": \"Page number of the current items.\",\n \"page_size\": \"Number of items to show on a page.\",\n \"total_pages\": \"Total number of pages.\",\n \"total_items\": \"Total number of items.\",\n \"items\": [\n {\n \"streaming_url\": \"(str) url to stream the file using range requests\",\n \"completed\": \"(bool) true if download is completed\",\n \"file_name\": \"(str) name of file\",\n \"download_directory\": \"(str) download directory\",\n \"points_paid\": \"(float) credit paid to download file\",\n \"stopped\": \"(bool) true if download is stopped\",\n \"stream_hash\": \"(str) stream hash of file\",\n \"stream_name\": \"(str) stream name\",\n \"suggested_file_name\": \"(str) suggested file name\",\n \"sd_hash\": \"(str) sd hash of file\",\n \"download_path\": \"(str) download path of file\",\n \"mime_type\": \"(str) mime type of file\",\n \"key\": \"(str) key attached to file\",\n \"total_bytes_lower_bound\": \"(int) lower bound file size in bytes\",\n \"total_bytes\": \"(int) file upper bound size in bytes\",\n \"written_bytes\": \"(int) written size in bytes\",\n \"blobs_completed\": \"(int) number of fully downloaded blobs\",\n \"blobs_in_stream\": \"(int) total blobs on stream\",\n \"blobs_remaining\": \"(int) total blobs remaining to download\",\n \"status\": \"(str) downloader status\",\n \"claim_id\": \"(str) None if claim is not found else the claim id\",\n \"txid\": \"(str) None if claim is not found else the transaction id\",\n \"nout\": \"(int) None if claim is not found else the transaction output index\",\n \"outpoint\": \"(str) None if claim is not found else the tx and output\",\n \"metadata\": \"(dict) None if claim is not found else the claim metadata\",\n \"channel_claim_id\": \"(str) None if claim is not found or not signed\",\n \"channel_name\": \"(str) None if claim is not found or not signed\",\n \"claim_name\": \"(str) None if claim is not found else the claim name\"\n }\n ]\n }",
|
||||
"examples": [
|
||||
{
|
||||
"title": "List local files",
|
||||
"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 {\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\",\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\": \"0fed669177b7d4889715b0522ad6f103\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp5h1lifqx\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"aa2721a8f22f2c166a8f5722adf6b96c9e4d142033719a5adedf9d11db235607:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01d3419c789f3367513a7e0058af1abbfbf6049f2b9792102b78fcfdc53716733ffce3fca52fdeb3971fd08970bf4d1c0e1c61e1c7409b65f9ae0326773cec1417748ca581c1cbb6ecaf6f892ac84d8350cadce0fe0a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d703568316c69667178180b22186170706c69636174696f6e2f6f637465742d73747265616d323004e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"ead8d80c803c7eea3c9d6f2575b6734c93af8d6ecbbf7b19458e564d1e7f5463ae71e638d7dfdc9f57e709482bdfec3d\",\n \"stream_name\": \"tmp5h1lifqx\",\n \"streaming_url\": \"http://localhost:5280/stream/04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"suggested_file_name\": \"tmp5h1lifqx\",\n \"timestamp\": null,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"aa2721a8f22f2c166a8f5722adf6b96c9e4d142033719a5adedf9d11db235607\",\n \"written_bytes\": 0\n },\n {\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"9c6953cf591f7a3da181bf219c2320143da4624f\",\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\": \"70db0fefb7af8e5304b321dd53d8c343\",\n \"metadata\": {\n \"author\": \"Picaso\",\n \"description\": \"A blank PNG that is 5x7.\",\n \"fee\": {\n \"address\": \"n1CmdQDFBA3TWqx86QkV18xXkSTVMxXw7a\",\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\": \"1571238714\",\n \"source\": {\n \"hash\": \"6c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545\",\n \"media_type\": \"image/png\",\n \"name\": \"tmpvc8a6jnd.png\",\n \"sd_hash\": \"dc724381cf9fe8f3e0a0a971345dd83ebe7e6e76089bc34c7b94bc3ab00daa23f8de7a7cc35c0f1ade6bbfdb269328d5\",\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\": \"6176280180cf3ce74cafbd1d81674ac1e58aadfc01d719af7556d3d745525081:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01d3419c789f3367513a7e0058af1abbfbf6049f2b8d658916a8071989a0988f94d43906186d08f387a2ed6054842cd633eae0c2d53b5008fd900d2a0b754b710b786f3edcc872ccfadabc91ad279bb59fa62f72f00ae6010a82010a306c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85Line truncated
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\",\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\": \"1a078b5ba203620985456bb511c186f8\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmplrrcjagu\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"2526d91622485c951d894b7bd55d231a756a907cf597f7bf2e7d86488dc91bd8:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01921a1dd1a3816a4014ee84e7818b190ca0371c77c319ec7834afe2c37a33b524594e00ef7fb835b4d9d9a75d0e01f0d547dfdf2d012d019d02a48b5cbb7f1c1dab1bb4411b6f52dc1e3b0526a26f7642ae49a5880a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d706c7272636a616775180b22186170706c69636174696f6e2f6f637465742d73747265616d32304206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"5eaf3e55853a497d98fda6b65ed72abc275ad1952c1b95ddd8f33460a61111607670cf382231497e93a457cd30ef7ef8\",\n \"stream_name\": \"tmplrrcjagu\",\n \"streaming_url\": \"http://localhost:5280/stream/4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"suggested_file_name\": \"tmplrrcjagu\",\n \"timestamp\": null,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"2526d91622485c951d894b7bd55d231a756a907cf597f7bf2e7d86488dc91bd8\",\n \"written_bytes\": 0\n },\n {\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"12ed4261a8538a0ae1053b26b1f763e52e806639\",\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\": \"f6348193d86725238763e9a8dfc8ca04\",\n \"metadata\": {\n \"author\": \"Picaso\",\n \"description\": \"A blank PNG that is 5x7.\",\n \"fee\": {\n \"address\": \"mu3QP3SyXuEKqzBd7u8G68W4qPwi1CihpY\",\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\": \"1572065704\",\n \"source\": {\n \"hash\": \"6c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545\",\n \"media_type\": \"image/png\",\n \"name\": \"tmpe5iqj3cn.png\",\n \"sd_hash\": \"812d10679b60acb070e03a83594a6ae0525f70eab8973f40e31efbb0d66d06f81ed2da91c0ba698629586bc3d1cd6f62\",\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\": \"19165012a7be1e02251d1487ee2007645f53b83367ebc4bdff677b3b97186253:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01921a1dd1a3816a4Line truncated
|
||||
},
|
||||
{
|
||||
"title": "List files matching a parameter",
|
||||
"curl": "curl -d'{\"method\": \"file_list\", \"params\": {\"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\", \"reverse\": false}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet file list --claim_id=\"c011186b47f0499392fdd22d73a2ec5426b8556f\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_list\", \"params\": {\"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\", \"reverse\": false}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": [\n {\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\",\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\": \"0fed669177b7d4889715b0522ad6f103\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp5h1lifqx\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"aa2721a8f22f2c166a8f5722adf6b96c9e4d142033719a5adedf9d11db235607:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01d3419c789f3367513a7e0058af1abbfbf6049f2b9792102b78fcfdc53716733ffce3fca52fdeb3971fd08970bf4d1c0e1c61e1c7409b65f9ae0326773cec1417748ca581c1cbb6ecaf6f892ac84d8350cadce0fe0a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d703568316c69667178180b22186170706c69636174696f6e2f6f637465742d73747265616d323004e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"ead8d80c803c7eea3c9d6f2575b6734c93af8d6ecbbf7b19458e564d1e7f5463ae71e638d7dfdc9f57e709482bdfec3d\",\n \"stream_name\": \"tmp5h1lifqx\",\n \"streaming_url\": \"http://localhost:5280/stream/04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"suggested_file_name\": \"tmp5h1lifqx\",\n \"timestamp\": 1571238738,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"aa2721a8f22f2c166a8f5722adf6b96c9e4d142033719a5adedf9d11db235607\",\n \"written_bytes\": 0\n }\n ]\n}"
|
||||
"curl": "curl -d'{\"method\": \"file_list\", \"params\": {\"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\", \"reverse\": false}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet file list --claim_id=\"06d4639a98ad7c343529553088427759e683fb1a\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_list\", \"params\": {\"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\", \"reverse\": false}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\",\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\": \"1a078b5ba203620985456bb511c186f8\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmplrrcjagu\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"2526d91622485c951d894b7bd55d231a756a907cf597f7bf2e7d86488dc91bd8:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01921a1dd1a3816a4014ee84e7818b190ca0371c77c319ec7834afe2c37a33b524594e00ef7fb835b4d9d9a75d0e01f0d547dfdf2d012d019d02a48b5cbb7f1c1dab1bb4411b6f52dc1e3b0526a26f7642ae49a5880a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d706c7272636a616775180b22186170706c69636174696f6e2f6f637465742d73747265616d32304206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"5eaf3e55853a497d98fda6b65ed72abc275ad1952c1b95ddd8f33460a61111607670cf382231497e93a457cd30ef7ef8\",\n \"stream_name\": \"tmplrrcjagu\",\n \"streaming_url\": \"http://localhost:5280/stream/4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"suggested_file_name\": \"tmplrrcjagu\",\n \"timestamp\": 1572065729,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"2526d91622485c951d894b7bd55d231a756a907cf597f7bf2e7d86488dc91bd8\",\n \"written_bytes\": 0\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2232,10 +2256,10 @@
|
||||
"examples": [
|
||||
{
|
||||
"title": "Save a file to the downloads directory",
|
||||
"curl": "curl -d'{\"method\": \"file_save\", \"params\": {\"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\"}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet file save --sd_hash=\"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_save\", \"params\": {\"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\"}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\",\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\": \"0fed669177b7d4889715b0522ad6f103\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp5h1lifqx\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"aa2721a8f22f2c166a8f5722adf6b96c9e4d142033719a5adedf9d11db235607:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01d3419c789f3367513a7e0058af1abbfbf6049f2b9792102b78fcfdc53716733ffce3fca52fdeb3971fd08970bf4d1c0e1c61e1c7409b65f9ae0326773cec1417748ca581c1cbb6ecaf6f892ac84d8350cadce0fe0a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d703568316c69667178180b22186170706c69636174696f6e2f6f637465742d73747265616d323004e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"status\": \"running\",\n \"stopped\": false,\n \"stream_hash\": \"ead8d80c803c7eea3c9d6f2575b6734c93af8d6ecbbf7b19458e564d1e7f5463ae71e638d7dfdc9f57e709482bdfec3d\",\n \"stream_name\": \"tmp5h1lifqx\",\n \"streaming_url\": \"http://localhost:5280/stream/04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"suggested_file_name\": \"tmp5h1lifqx\",\n \"timestamp\": 1571238738,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"aa2721a8f22f2c166a8f5722adf6b96c9e4d142033719a5adedf9d11db235607\",\n \"written_bytes\": 0\n }\n}"
|
||||
"curl": "curl -d'{\"method\": \"file_save\", \"params\": {\"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\"}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet file save --sd_hash=\"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_save\", \"params\": {\"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\"}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\",\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\": \"1a078b5ba203620985456bb511c186f8\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmplrrcjagu\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"2526d91622485c951d894b7bd55d231a756a907cf597f7bf2e7d86488dc91bd8:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01921a1dd1a3816a4014ee84e7818b190ca0371c77c319ec7834afe2c37a33b524594e00ef7fb835b4d9d9a75d0e01f0d547dfdf2d012d019d02a48b5cbb7f1c1dab1bb4411b6f52dc1e3b0526a26f7642ae49a5880a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d706c7272636a616775180b22186170706c69636174696f6e2f6f637465742d73747265616d32304206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"status\": \"running\",\n \"stopped\": false,\n \"stream_hash\": \"5eaf3e55853a497d98fda6b65ed72abc275ad1952c1b95ddd8f33460a61111607670cf382231497e93a457cd30ef7ef8\",\n \"stream_name\": \"tmplrrcjagu\",\n \"streaming_url\": \"http://localhost:5280/stream/4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"suggested_file_name\": \"tmplrrcjagu\",\n \"timestamp\": 1572065729,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"2526d91622485c951d894b7bd55d231a756a907cf597f7bf2e7d86488dc91bd8\",\n \"written_bytes\": 0\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2297,6 +2321,18 @@
|
||||
"type": "int",
|
||||
"description": "the number of search probes in a row that don't find any new peers before giving up and returning",
|
||||
"is_required": false
|
||||
},
|
||||
{
|
||||
"name": "page",
|
||||
"type": "int",
|
||||
"description": "page to return during paginating",
|
||||
"is_required": false
|
||||
},
|
||||
{
|
||||
"name": "page_size",
|
||||
"type": "int",
|
||||
"description": "number of items on page during pagination",
|
||||
"is_required": false
|
||||
}
|
||||
],
|
||||
"returns": "(list) List of contact dictionaries {'address': <peer ip>, 'udp_port': <dht port>, 'tcp_port': <peer port>,\n 'node_id': <peer node id>}",
|
||||
@@ -2392,7 +2428,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/lex/.local/share/lbry/lbrynet/daemon_settings.yml\",\n \"data_dir\": \"/tmp/tmppl4ona5o\",\n \"download_dir\": \"/tmp/tmppl4ona5o\",\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/tmppl4ona5o\",\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/tmpl6ahaz1t\",\n \"download_dir\": \"/tmp/tmpl6ahaz1t\",\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/tmpl6ahaz1t\",\n \"wallets\": [\n \"default_wallet\"\n ]\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2467,10 +2503,10 @@
|
||||
"examples": [
|
||||
{
|
||||
"title": "Abandon a stream claim",
|
||||
"curl": "curl -d'{\"method\": \"stream_abandon\", \"params\": {\"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\", \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet stream abandon c011186b47f0499392fdd22d73a2ec5426b8556f",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_abandon\", \"params\": {\"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\", \"preview\": false, \"blocking\": false}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001075623db119ddfde5a9a713320144d9e6cb9f6ad22578f6a162c2ff2a82127aa000000006a47304402205a17ce07692e4b2a8eae031e6e760a328a09613b52690351a0fe66a49fd2955402204305ddbc2ca8325a64fb2694ecb5023dcf185ac525ea1f95b30ff6bb4ff8861b0121037754fd75d8dd6527a6e6b63fb433384953c3b777e87d157100f6f524af3bbe10ffffffff0134b7f505000000001976a91493d12c125fe496432dc7878cf1fcbc4b8a6d724e88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"miY8Ni6D11cwYEDZYYfdcKfyUwp4xCdws8\",\n \"amount\": \"1.0\",\n \"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\",\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#c011186b47f0499392fdd22d73a2ec5426b8556f\",\n \"timestamp\": 1571238738,\n \"txid\": \"aa2721a8f22f2c166a8f5722adf6b96c9e4d142033719a5adedf9d11db235607\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp5h1lifqx\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mtzYCnjFV21bDA3fPzqM7pXJF2mTgunyqG\",\n \"amount\": \"0.999893\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"34cd040b4dcb8a5c661558247d8e474ee5fc5b46366397bf49b607d79e547094\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000107\",\n \"total_input\": \"1.0\",\n \"total_output\": \"0.999893\",\n \"txid\": \"34cd040b4dcb8a5c661558247d8e474ee5fc5b46366397bf49b607d79e547094\"\n }\n}"
|
||||
"curl": "curl -d'{\"method\": \"stream_abandon\", \"params\": {\"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\", \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet stream abandon 06d4639a98ad7c343529553088427759e683fb1a",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_abandon\", \"params\": {\"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\", \"preview\": false, \"blocking\": false}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001d81bc98d48867d2ebff797f57c906a751a235dd57b4b891d955c482216d92625000000006a4730440220149ed407671bb84dd0e412b2e51d67e283fe87bc5fc73e01d6c1d24c8295f11002205cfddc91b4dad0b186d127096402f1e7213bc54a51a6c0e14940985030960a83012102f80ddc9181a8fc9e9401806f0c0402a085480be6b65841a030580f242661761dffffffff0134b7f505000000001976a9147accd75b55b97b040d43a1ec22d61e1a04c64c3188ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mgNr4oaV5EZb1GgkTp6hG38QMHik6pBWjx\",\n \"amount\": \"1.0\",\n \"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\",\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#06d4639a98ad7c343529553088427759e683fb1a\",\n \"timestamp\": 1572065729,\n \"txid\": \"2526d91622485c951d894b7bd55d231a756a907cf597f7bf2e7d86488dc91bd8\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmplrrcjagu\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mriG85MzTsSyUoh5SpMLtVMveeTgQiBYNn\",\n \"amount\": \"0.999893\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"d5292cd61085b328aba4d5d62e929f5a711df5f3cdd53c3bbc2ade213c212486\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000107\",\n \"total_input\": \"1.0\",\n \"total_output\": \"0.999893\",\n \"txid\": \"d5292cd61085b328aba4d5d62e929f5a711df5f3cdd53c3bbc2ade213c212486\"\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2671,17 +2707,17 @@
|
||||
"examples": [
|
||||
{
|
||||
"title": "Create a stream claim without metadata",
|
||||
"curl": "curl -d'{\"method\": \"stream_create\", \"params\": {\"name\": \"astream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp5h1lifqx\", \"tags\": [], \"languages\": [], \"locations\": [], \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet stream create astream 1.0 /tmp/tmp5h1lifqx",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_create\", \"params\": {\"name\": \"astream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp5h1lifqx\", \"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\": \"0100000001207a97258d57b51c955bb16de34d3fd6a88e04df6a6cb6741c8860e40e7a1c99010000006a47304402201f110f1b75e8edf7243c30a0c2db0e48f0b6e2ce8df3f63621eb0400e8cb53f602204da34a81b68aec6f0c290d405ea2faebc517f220357ca76c90fac1bf1fac3e84012103f72a2ba59a45d0a51b41845b2cf0e87a4652b2dc5e753dbcb7cb3b3278ccafebffffffff0200e1f50500000000bab5076173747265616d4c94000a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d703568316c69667178180b22186170706c69636174696f6e2f6f637465742d73747265616d323004e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b6d7576a914212135387508b03786740b73da22090129803bb188ac38fb9423000000001976a914384d1c3f371fe24d9d8858cbf420dd0241ff062f88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mqDxVnFJechdp4F4cVHKt5onNecc2dYGQP\",\n \"amount\": \"6.983769\",\n \"confirmations\": 4,\n \"height\": 209,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1571238737,\n \"txid\": \"991c7a0ee460881c74b66c6adf048ea8d63f4de36db15b951cb5578d25977a20\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"miY8Ni6D11cwYEDZYYfdcKfyUwp4xCdws8\",\n \"amount\": \"1.0\",\n \"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\",\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#c011186b47f0499392fdd22d73a2ec5426b8556f\",\n \"timestamp\": null,\n \"txid\": \"2baef9fce2b326e018b0e79edd85adbdf8b8218a0ba30c8dde4a72d572217ac3\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp5h1lifqx\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mkeeWWvvasih8pxvgSEkA1c2rBd49axpTc\",\n \"amount\": \"5.969662\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"2baef9fce2b326e018b0e79edd85adbdf8b8218a0ba30c8dde4a72d572217ac3\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.014107\",\n \"total_input\": \"6.983769\",\n \"total_output\": \"6.969662\",\n \"txid\": \"2baef9fce2b326e018b0e79edd85adbdf8b8218a0ba30c8dde4a72d572217ac3\"\n }\n}"
|
||||
"curl": "curl -d'{\"method\": \"stream_create\", \"params\": {\"name\": \"astream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmplrrcjagu\", \"tags\": [], \"languages\": [], \"locations\": [], \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet stream create astream 1.0 /tmp/tmplrrcjagu",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_create\", \"params\": {\"name\": \"astream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmplrrcjagu\", \"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\": \"0100000001b0b9afab65e6c7206b02d38f35eb91fe5b6007621e4dd3974ce05b027616923a010000006a473044022049e75be8aef80bdd5506e6f41d8486e4929e15d8219d08712446c028d8676f2502204754a018f65fdaf4c252b94b9bca37e006d7792805f1438adc6d596b8336cc24012102de8cdfe610e3982d2216faeb333847e6ff10c0e9771900ab48b89d0c86cdc105ffffffff0200e1f50500000000bab5076173747265616d4c94000a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d706c7272636a616775180b22186170706c69636174696f6e2f6f637465742d73747265616d32304206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e6d7576a914096f994d9d57fc82a386fe8880b16764710dd46a88ac38fb9423000000001976a914f9294aeb9903c3ce84cfc14525731170272945a488ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mj78ZBXmcPQ2uRYVaRRHtY3CYC7QKSqTc6\",\n \"amount\": \"6.983769\",\n \"confirmations\": 4,\n \"height\": 209,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1572065728,\n \"txid\": \"3a921676025be04c97d34d1e6207605bfe91eb358fd3026b20c7e665abafb9b0\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mgNr4oaV5EZb1GgkTp6hG38QMHik6pBWjx\",\n \"amount\": \"1.0\",\n \"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\",\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#06d4639a98ad7c343529553088427759e683fb1a\",\n \"timestamp\": null,\n \"txid\": \"493742a13be4277789e9f26758511c05fe0d90ecf54bf70d7dd8b0a9f4ebc9ec\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmplrrcjagu\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"n4EQ1tDoSqHiKz9Ectfs7Ko222wxJbsYDv\",\n \"amount\": \"5.969662\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"493742a13be4277789e9f26758511c05fe0d90ecf54bf70d7dd8b0a9f4ebc9ec\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.014107\",\n \"total_input\": \"6.983769\",\n \"total_output\": \"6.969662\",\n \"txid\": \"493742a13be4277789e9f26758511c05fe0d90ecf54bf70d7dd8b0a9f4ebc9ec\"\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/tmpvc8a6jnd.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\": 1571238714, \"channel_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\", \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet stream create blank-image 1.0 /tmp/tmpvc8a6jnd.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=1571238714 --channel_id=\"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_create\", \"params\": {\"name\": \"blank-image\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpvc8a6jnd.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\": 1571238714, \"channel_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\", \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001c37a2172d5724ade8d0ca30b8a21b8f8bdad85dd9ee7b018e026b3e2fcf9ae2b010000006b483045022100a33077ec29c33231ac47a049770b75ecee1d78021d6ad54f1e2aad34ee45929002207f7797f5c6dd3951eecf9f96d9e0cf90a98d337fdebb72134071d071fad53bae012102ca6f62237a93eee2192504dec55482e23ffe87699abba1635208bc368ce7d2cfffffffff0200e1f50500000000fddc01b50b626c616e6b2d696d6167654db10101d3419c789f3367513a7e0058af1abbfbf6049f2b8d658916a8071989a0988f94d43906186d08f387a2ed6054842cd633eae0c2d53b5008fd900d2a0b754b710b786f3edcc872ccfadabc91ad279bb59fa62f72f00ae6010a82010a306c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545120f746d7076633861366a6e642e706e6718632209696d6167652f706e673230dc724381cf9fe8f3e0a0a971345dd83ebe7e6e76089bc34c7b94bc3ab00daa23f8de7a7cc35c0f1ade6bbfdb269328d5120650696361736f1a0d5075626c696320446f6d61696e2218687474703a2f2f7075626c69632d646f6d61696e2e6f726728bae69ced053222080112196fd7f21fdd96ca7b622fbabaeb1930b734282fa4864708edb5188087a70e520408051007420b426c616e6b20496d6167654a184120626c616e6b20504e472074686174206973203578372e52252a23687474703a2f2f736d616c6c6d656469612e636f6d2f7468756d626e61696c2e6a70675a05626c616e6b5a03617274620208016a1308ec0112024e481a0a4d616e636865737465726d7576a914d7f21fdd96ca7b622fbabaeb1930b734282fa48688acac5e7d1d000000001976a914b5c5cd6a0ea0a56d809d39c65403568beff49ade88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mkeeWWvvasih8pxvgSEkA1c2rBd49axpTc\",\n \"amount\": \"5.969662\",\n \"confirmations\": 2,\n \"height\": 213,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1571238738,\n \"txid\": \"2baef9fce2b326e018b0e79edd85adbdf8b8218a0ba30c8dde4a72d572217ac3\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"n1CmdQDFBA3TWqx86QkV18xXkSTVMxXw7a\",\n \"amount\": \"1.0\",\n \"claim_id\": \"9c6953cf591f7a3da181bf219c2320143da4624f\",\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#9c6953cf591f7a3da181bf219c2320143da4624f\",\n \"signing_channel\": {\n \"address\": \"mwgNXQtcY3oWpQrtWZWLJRqLeTRCNVVCTe\",\n \"amount\": \"1.0\",\n \"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\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#2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"timestamp\": 1571238737,\n \"txid\": \"8133769b1fa22eab219f162dee518a7dd96565b047133ec7ad51896127c5482f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec\",\n \"public_key_id\": \"mt1Qr1ftwmkeWG8KVuBiPgDkAzkxAkhvpY\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": null,\n \"txid\": \"6176280180cf3ce74cafbd1d81674ac1e58aadfc01d719af7556d3d745525081\",\n \"type\": \"claim\",\n \"value\": {\n \"author\": \"Picaso\",\n \"description\": \"A blank PNG that is 5x7.\",\n \"fee\": {\n \"address\": \"n1CmdQDFBA3TWqx86QkV18xXkSTVMxXw7a\",\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\": \"1571238714\",\n \"source\": {\n \"hash\": \"6c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545\",\n \"media_type\": \"image/png\",\n \"name\": \"tmpvc8a6jnd.png\",\n \"sd_hash\": \"dc724381cf9fe8f3e0a0a971345dd83ebe7e6e76089bc34c7b94bc3ab00daa23f8de7a7cc35c0f1ade6bbfdb269328d5\",\n \"size\": \"99\"\n },\n \"strLine truncated
|
||||
"curl": "curl -d'{\"method\": \"stream_create\", \"params\": {\"name\": \"blank-image\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpe5iqj3cn.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\": 1572065704, \"channel_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\", \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet stream create blank-image 1.0 /tmp/tmpe5iqj3cn.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=1572065704 --channel_id=\"771c37a00c198b81e784ee14406a81a3d11d1a92\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_create\", \"params\": {\"name\": \"blank-image\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpe5iqj3cn.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\": 1572065704, \"channel_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\", \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001ecc9ebf4a9b0d87d0df74bf5ec900dfe051c515867f2e9897727e43ba1423749010000006b483045022100b7615ea38224ebb5bb7ab6aaeea008f219044d21cc04e75c27471c29d19c2ec3022062b438d70478107defa0e12ae5dffc8ed992deac88e53de23420427cce34a3f20121021e556d33328ed8ebea04fcae64a74f77c868527f339214a984ba8330eb1c39c9ffffffff0200e1f50500000000fddc01b50b626c616e6b2d696d6167654db10101921a1dd1a3816a4014ee84e7818b190ca0371c77f40b1c8ea5ae5cfc5e124e58ed5639501371f5a7c5f76f7929cdd5a3a1be453b58dfeeaa31065c6aee3d3c671f2f7b7c11272703477de6fb6c36c939132684890ae6010a82010a306c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545120f746d70653569716a33636e2e706e6718632209696d6167652f706e673230812d10679b60acb070e03a83594a6ae0525f70eab8973f40e31efbb0d66d06f81ed2da91c0ba698629586bc3d1cd6f62120650696361736f1a0d5075626c696320446f6d61696e2218687474703a2f2f7075626c69632d646f6d61696e2e6f726728a8a3cfed053222080112196f945be3b9c50766d9e46a865a51db625a8307fac4ca33a9bd188087a70e520408051007420b426c616e6b20496d6167654a184120626c616e6b20504e472074686174206973203578372e52252a23687474703a2f2f736d616c6c6d656469612e636f6d2f7468756d626e61696c2e6a70675a05626c616e6b5a03617274620208016a1308ec0112024e481a0a4d616e636865737465726d7576a914945be3b9c50766d9e46a865a51db625a8307fac488acac5e7d1d000000001976a914d5c43fd22f6af13803dacbcd074d3b7ea924753388ac00000000\",\n \"inputs\": [\n {\n \"address\": \"n4EQ1tDoSqHiKz9Ectfs7Ko222wxJbsYDv\",\n \"amount\": \"5.969662\",\n \"confirmations\": 2,\n \"height\": 213,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1572065729,\n \"txid\": \"493742a13be4277789e9f26758511c05fe0d90ecf54bf70d7dd8b0a9f4ebc9ec\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mu3QP3SyXuEKqzBd7u8G68W4qPwi1CihpY\",\n \"amount\": \"1.0\",\n \"claim_id\": \"12ed4261a8538a0ae1053b26b1f763e52e806639\",\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#12ed4261a8538a0ae1053b26b1f763e52e806639\",\n \"signing_channel\": {\n \"address\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"amount\": \"1.0\",\n \"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\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#771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"timestamp\": 1572065728,\n \"txid\": \"d17deb4ccaa5e692bb51b04547266e95b32a9b0144cd9bba4b50df7037d994e2\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d\",\n \"public_key_id\": \"mzWH9q8CpEZHdpVW3VDu37eQRKwtp2mtHU\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": null,\n \"txid\": \"19165012a7be1e02251d1487ee2007645f53b83367ebc4bdff677b3b97186253\",\n \"type\": \"claim\",\n \"value\": {\n \"author\": \"Picaso\",\n \"description\": \"A blank PNG that is 5x7.\",\n \"fee\": {\n \"address\": \"mu3QP3SyXuEKqzBd7u8G68W4qPwi1CihpY\",\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\": \"1572065704\",\n \"source\": {\n \"hash\": \"6c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545\",\n \"media_type\": \"image/png\",\n \"name\": \"tmpe5iqj3cn.png\",\n \"sd_hash\": \"812d10679b60acb070e03a83594a6ae0525f70eab8973f40e31efbb0d66d06f81ed2da91c0ba698629586bc3d1cd6f62\",\n \"size\": \"99\"\n },\n \"strLine truncated
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2721,14 +2757,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 {\n \"address\": \"miY8Ni6D11cwYEDZYYfdcKfyUwp4xCdws8\",\n \"amount\": \"1.0\",\n \"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\",\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#c011186b47f0499392fdd22d73a2ec5426b8556f\",\n \"signing_channel\": {\n \"address\": \"mwgNXQtcY3oWpQrtWZWLJRqLeTRCNVVCTe\",\n \"amount\": \"1.0\",\n \"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\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#2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"timestamp\": 1571238737,\n \"txid\": \"8133769b1fa22eab219f162dee518a7dd96565b047133ec7ad51896127c5482f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec\",\n \"public_key_id\": \"mt1Qr1ftwmkeWG8KVuBiPgDkAzkxAkhvpY\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1571238738,\n \"txid\": \"aa2721a8f22f2c166a8f5722adf6b96c9e4d142033719a5adedf9d11db235607\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp5h1lifqx\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ]\n}"
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"mgNr4oaV5EZb1GgkTp6hG38QMHik6pBWjx\",\n \"amount\": \"1.0\",\n \"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\",\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#06d4639a98ad7c343529553088427759e683fb1a\",\n \"signing_channel\": {\n \"address\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"amount\": \"1.0\",\n \"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\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#771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"timestamp\": 1572065728,\n \"txid\": \"d17deb4ccaa5e692bb51b04547266e95b32a9b0144cd9bba4b50df7037d994e2\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d\",\n \"public_key_id\": \"mzWH9q8CpEZHdpVW3VDu37eQRKwtp2mtHU\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1572065729,\n \"txid\": \"2526d91622485c951d894b7bd55d231a756a907cf597f7bf2e7d86488dc91bd8\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmplrrcjagu\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\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\": \"miY8Ni6D11cwYEDZYYfdcKfyUwp4xCdws8\",\n \"amount\": \"1.0\",\n \"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\",\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#c011186b47f0499392fdd22d73a2ec5426b8556f\",\n \"signing_channel\": {\n \"address\": \"mwgNXQtcY3oWpQrtWZWLJRqLeTRCNVVCTe\",\n \"amount\": \"1.0\",\n \"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\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#2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"timestamp\": 1571238737,\n \"txid\": \"8133769b1fa22eab219f162dee518a7dd96565b047133ec7ad51896127c5482f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec\",\n \"public_key_id\": \"mt1Qr1ftwmkeWG8KVuBiPgDkAzkxAkhvpY\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1571238738,\n \"txid\": \"aa2721a8f22f2c166a8f5722adf6b96c9e4d142033719a5adedf9d11db235607\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp5h1lifqx\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\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\": \"mgNr4oaV5EZb1GgkTp6hG38QMHik6pBWjx\",\n \"amount\": \"1.0\",\n \"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\",\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#06d4639a98ad7c343529553088427759e683fb1a\",\n \"signing_channel\": {\n \"address\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"amount\": \"1.0\",\n \"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\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#771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"timestamp\": 1572065728,\n \"txid\": \"d17deb4ccaa5e692bb51b04547266e95b32a9b0144cd9bba4b50df7037d994e2\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d\",\n \"public_key_id\": \"mzWH9q8CpEZHdpVW3VDu37eQRKwtp2mtHU\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1572065729,\n \"txid\": \"2526d91622485c951d894b7bd55d231a756a907cf597f7bf2e7d86488dc91bd8\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmplrrcjagu\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\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}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -2963,10 +2999,10 @@
|
||||
"examples": [
|
||||
{
|
||||
"title": "Update a stream claim to add channel",
|
||||
"curl": "curl -d'{\"method\": \"stream_update\", \"params\": {\"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\", \"clear_fee\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"channel_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\", \"clear_channel\": false, \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false, \"replace\": false}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet stream update c011186b47f0499392fdd22d73a2ec5426b8556f --channel_id=\"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_update\", \"params\": {\"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\", \"clear_fee\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"channel_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\", \"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\": \"0100000002c37a2172d5724ade8d0ca30b8a21b8f8bdad85dd9ee7b018e026b3e2fcf9ae2b000000006a473044022011286199290fc7f2b1dcd0f01a08513931ee81699e22039a2ae051df1743ef9a022049f5fd40b1ff44757899bf7bb4aaaf113e80c6849365db3dae0063181b1cb8530121037754fd75d8dd6527a6e6b63fb433384953c3b777e87d157100f6f524af3bbe10ffffffffabd0b13a169c967c1cf8f3bb6829e4c8b33f46b6eb3978e25b22b04947fe18be010000006a473044022073acb6b65279f15e0b7b8541c76e4f8bd6b16eb4c8cfb32f502dbb11b87fcdb302200aee950778e1d0bf564d2f6dcacbd79d5793bc266980699a80ea37df2514083d01210316bd5e87a8bbf2c7cae024e16b86d3b2015e2ce3429c76db8b8a66d45f64abc5ffffffff0200e1f50500000000fd2301b7076173747265616d146f55b82654eca2732dd2fd929349f0476b1811c04ce801d3419c789f3367513a7e0058af1abbfbf6049f2b9792102b78fcfdc53716733ffce3fca52fdeb3971fd08970bf4d1c0e1c61e1c7409b65f9ae0326773cec1417748ca581c1cbb6ecaf6f892ac84d8350cadce0fe0a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d703568316c69667178180b22186170706c69636174696f6e2f6f637465742d73747265616d323004e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b6d6d76a914212135387508b03786740b73da22090129803bb188ac32a0d205000000001976a9140de8b7add05eafd06a4af98b30f3ed220fa5ae0a88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"miY8Ni6D11cwYEDZYYfdcKfyUwp4xCdws8\",\n \"amount\": \"1.0\",\n \"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\",\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#c011186b47f0499392fdd22d73a2ec5426b8556f\",\n \"timestamp\": 1571238738,\n \"txid\": \"2baef9fce2b326e018b0e79edd85adbdf8b8218a0ba30c8dde4a72d572217ac3\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp5h1lifqx\",\n \"sd_hash\": \"04e9db196a385f94d715879f730bc91851daad43e8d1fdbdd1d98409741b98c19e1700602f2abc1e1c9847cea42d286b\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"n2hwzq3j937oBARJtLLWCagiq69Vu9ZuGi\",\n \"amount\": \"0.9772285\",\n \"confirmations\": 3,\n \"height\": 211,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1571238737,\n \"txid\": \"be18fe4749b0225be27839ebb6463fb3c8e42968bbf3f81c7c969c163ab1d0ab\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"miY8Ni6D11cwYEDZYYfdcKfyUwp4xCdws8\",\n \"amount\": \"1.0\",\n \"claim_id\": \"c011186b47f0499392fdd22d73a2ec5426b8556f\",\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#c011186b47f0499392fdd22d73a2ec5426b8556f\",\n \"signing_channel\": {\n \"address\": \"mwgNXQtcY3oWpQrtWZWLJRqLeTRCNVVCTe\",\n \"amount\": \"1.0\",\n \"claim_id\": \"2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\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#2b9f04f6fbbb1aaf58007e3a5167339f789c41d3\",\n \"timestamp\": 1571238737,\n \"txid\": \"8133769b1fa22eab219f162dee518a7dd96565b047133ec7ad51896127c5482f\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c3c376e28a4da84d03a5cf9d0f5c43a200b156c3835bb8d0ab6a06bcce36540398550b51984b32a1352eee764f9320efce8086d04f628a19ae0eefc80033baec\",\n \"public_key_id\": \"mt1Qr1ftwmkeWG8KVuBiPgDkAzkxAkhvpY\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": null,\n \"txid\": \"aa2721a8f22f2c166a8f5722adf6b96c9e4d142033719a5adedf9d11db235607\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n Line truncated
|
||||
"curl": "curl -d'{\"method\": \"stream_update\", \"params\": {\"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\", \"clear_fee\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"channel_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\", \"clear_channel\": false, \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false, \"replace\": false}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet stream update 06d4639a98ad7c343529553088427759e683fb1a --channel_id=\"771c37a00c198b81e784ee14406a81a3d11d1a92\"",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_update\", \"params\": {\"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\", \"clear_fee\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"channel_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\", \"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\": \"0100000002ecc9ebf4a9b0d87d0df74bf5ec900dfe051c515867f2e9897727e43ba1423749000000006b48304502210087f4c4517d233ce40e1f1f813a1fb38ec76a4ad6332999b93df0896c45e6678b02206952b39a19c120c3e5ace18e17cbbb566a0dc73a0c6cc69ebf1ffbe4de3a74f0012102f80ddc9181a8fc9e9401806f0c0402a085480be6b65841a030580f242661761dfffffffff3d1592d6bf5ea30ffc2f8fe96584b9dabe946be827cca54bc057db732409ba5010000006a47304402205ae78ab8de5b34f87b9784db7268eb156121ee4310ad5f57968ced1c164956e7022017bf7badd5ad4c07359570165169fd8d303cbebc78a332fb9628d3795867a0bf012103c3fceea893726e3e6579fbd723fbdb5658e47bf3a019f52f211b96a445ee0b26ffffffff0200e1f50500000000fd2301b7076173747265616d141afb83e65977428830552935347cad989a63d4064ce801921a1dd1a3816a4014ee84e7818b190ca0371c77c319ec7834afe2c37a33b524594e00ef7fb835b4d9d9a75d0e01f0d547dfdf2d012d019d02a48b5cbb7f1c1dab1bb4411b6f52dc1e3b0526a26f7642ae49a5880a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d706c7272636a616775180b22186170706c69636174696f6e2f6f637465742d73747265616d32304206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e6d6d76a914096f994d9d57fc82a386fe8880b16764710dd46a88ac32a0d205000000001976a9146b8fe71d4413918b3b063cf6e266fe3a99a94f5388ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mgNr4oaV5EZb1GgkTp6hG38QMHik6pBWjx\",\n \"amount\": \"1.0\",\n \"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\",\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#06d4639a98ad7c343529553088427759e683fb1a\",\n \"timestamp\": 1572065729,\n \"txid\": \"493742a13be4277789e9f26758511c05fe0d90ecf54bf70d7dd8b0a9f4ebc9ec\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmplrrcjagu\",\n \"sd_hash\": \"4206b03fb9e9d1cf9c83a0d1413b1a299242d9aedd2838a54c48e527932e5d932c52f9c2b58f4ce8dc32c721586ade4e\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"myngv8TWUh7JiAnEGcDc6ME9NUFyJQaY3V\",\n \"amount\": \"0.9772285\",\n \"confirmations\": 3,\n \"height\": 211,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1572065728,\n \"txid\": \"a59b4032b77d05bc54ca7c82be46e9ab9d4b5896fef8c2ff30eaf56b2d59d1f3\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mgNr4oaV5EZb1GgkTp6hG38QMHik6pBWjx\",\n \"amount\": \"1.0\",\n \"claim_id\": \"06d4639a98ad7c343529553088427759e683fb1a\",\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#06d4639a98ad7c343529553088427759e683fb1a\",\n \"signing_channel\": {\n \"address\": \"mkm59HsNt5aFWW65caqt5EA2P7Cdt4YdTd\",\n \"amount\": \"1.0\",\n \"claim_id\": \"771c37a00c198b81e784ee14406a81a3d11d1a92\",\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#771c37a00c198b81e784ee14406a81a3d11d1a92\",\n \"timestamp\": 1572065728,\n \"txid\": \"d17deb4ccaa5e692bb51b04547266e95b32a9b0144cd9bba4b50df7037d994e2\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004c2a4c6250287f65adaeafb8c599b492566378911da7479f7a417599883ff7659123e346e737b9ad00c99690bb229abcdf3e39a34b28749437f864506fb50503d\",\n \"public_key_id\": \"mzWH9q8CpEZHdpVW3VDu37eQRKwtp2mtHU\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": null,\n \"txid\": \"2526d91622485c951d894b7bd55d231a756a907cf597f7bf2e7d86488dc91bd8\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n Line truncated
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -3211,7 +3247,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 {\n \"abandon_info\": [],\n \"claim_info\": [],\n \"confirmations\": 1,\n \"date\": \"2019-10-16 11:12\",\n \"fee\": \"-0.000124\",\n \"support_info\": [],\n \"timestamp\": 1571238737,\n \"txid\": \"e438343e911dd64ba32806f0ac15a21af32750752148a93d77b003c6577e621c\",\n \"update_info\": [],\n \"value\": \"0.0\"\n },\n {\n \"abandon_info\": [],\n \"claim_info\": [],\n \"confirmations\": 7,\n \"date\": \"2019-10-16 11:12\",\n \"fee\": \"0.0\",\n \"support_info\": [],\n \"timestamp\": 1571238736,\n \"txid\": \"9ff0ec015c9fa14166a1895b471bb4d976c67bd36de52634bd076d8e3f4d2d2a\",\n \"update_info\": [],\n \"value\": \"10.0\"\n }\n ]\n}"
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"abandon_info\": [],\n \"claim_info\": [],\n \"confirmations\": 1,\n \"date\": \"2019-10-26 00:55\",\n \"fee\": \"-0.000124\",\n \"support_info\": [],\n \"timestamp\": 1572065728,\n \"txid\": \"677bd42ee87a97473f5d142c6f5ed3af5c3fb0f15046a1ed794296a51168c00f\",\n \"update_info\": [],\n \"value\": \"0.0\"\n },\n {\n \"abandon_info\": [],\n \"claim_info\": [],\n \"confirmations\": 7,\n \"date\": \"2019-10-26 00:55\",\n \"fee\": \"0.0\",\n \"support_info\": [],\n \"timestamp\": 1572065727,\n \"txid\": \"6b3a5471731bff3602800ec4eba1a044c365b9df38bd7865cb272d6bffdb40eb\",\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}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -3406,16 +3442,28 @@
|
||||
"type": "str",
|
||||
"description": "show specific wallet only",
|
||||
"is_required": false
|
||||
},
|
||||
{
|
||||
"name": "page",
|
||||
"type": "int",
|
||||
"description": "page to return during paginating",
|
||||
"is_required": false
|
||||
},
|
||||
{
|
||||
"name": "page_size",
|
||||
"type": "int",
|
||||
"description": "number of items on page during pagination",
|
||||
"is_required": false
|
||||
}
|
||||
],
|
||||
"returns": " [\n {\n \"id\": \"wallet_id\",\n \"name\": \"optional wallet name\"\n }\n ]",
|
||||
"returns": " {\n \"page\": \"Page number of the current items.\",\n \"page_size\": \"Number of items to show on a page.\",\n \"total_pages\": \"Total number of pages.\",\n \"total_items\": \"Total number of items.\",\n \"items\": [\n {\n \"id\": \"wallet_id\",\n \"name\": \"optional wallet name\"\n }\n ]\n }",
|
||||
"examples": [
|
||||
{
|
||||
"title": "List your wallets",
|
||||
"curl": "curl -d'{\"method\": \"wallet_list\", \"params\": {}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet wallet list",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"wallet_list\", \"params\": {}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": [\n {\n \"id\": \"my_wallet.json\",\n \"name\": \"Wallet\"\n }\n ]\n}"
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"id\": \"my_wallet.json\",\n \"name\": \"Wallet\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 521 B |
@@ -1,20 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="352" height="448"
|
||||
viewBox="0 0 352 448" id="bitbucket">
|
||||
<path fill="currentColor" d="M203.75 214.75q2 15.75-12.625 25.25t-27.875
|
||||
1.5q-9.75-4.25-13.375-14.5t-0.125-20.5 13-14.5q9-4.5 18.125-3t16 8.875
|
||||
6.875 16.875zM231.5 209.5q-3.5-26.75-28.25-41t-49.25-3.25q-15.75
|
||||
7-25.125 22.125t-8.625 32.375q1 22.75 19.375 38.75t41.375 14q22.75-2
|
||||
38-21t12.5-42zM291.25
|
||||
74q-5-6.75-14-11.125t-14.5-5.5-17.75-3.125q-72.75-11.75-141.5 0.5-10.75
|
||||
1.75-16.5 3t-13.75 5.5-12.5 10.75q7.5 7 19 11.375t18.375 5.5 21.875
|
||||
2.875q57 7.25 112 0.25 15.75-2 22.375-3t18.125-5.375 18.75-11.625zM305.5
|
||||
332.75q-2 6.5-3.875 19.125t-3.5 21-7.125 17.5-14.5 14.125q-21.5
|
||||
12-47.375 17.875t-50.5 5.5-50.375-4.625q-11.5-2-20.375-4.5t-19.125-6.75-18.25-10.875-13-15.375q-6.25-24-14.25-73l1.5-4
|
||||
4.5-2.25q55.75 37 126.625 37t126.875-37q5.25 1.5 6 5.75t-1.25 11.25-2
|
||||
9.25zM350.75 92.5q-6.5 41.75-27.75 163.75-1.25 7.5-6.75 14t-10.875
|
||||
10-13.625 7.75q-63 31.5-152.5
|
||||
22-62-6.75-98.5-34.75-3.75-3-6.375-6.625t-4.25-8.75-2.25-8.5-1.5-9.875-1.375-8.75q-2.25-12.5-6.625-37.5t-7-40.375-5.875-36.875-5.5-39.5q0.75-6.5
|
||||
4.375-12.125t7.875-9.375 11.25-7.5 11.5-5.625 12-4.625q31.25-11.5
|
||||
78.25-16 94.75-9.25 169 12.5 38.75 11.5 53.75 30.5 4 5 4.125
|
||||
12.75t-1.375 13.5z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -1,18 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448"
|
||||
viewBox="0 0 416 448" id="github">
|
||||
<path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19-18.125
|
||||
8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19 18.125-8.5
|
||||
18.125 8.5 10.75 19 3.125 20.5zM320 304q0 10-3.125 20.5t-10.75
|
||||
19-18.125 8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19
|
||||
18.125-8.5 18.125 8.5 10.75 19 3.125 20.5zM360
|
||||
304q0-30-17.25-51t-46.75-21q-10.25 0-48.75 5.25-17.75 2.75-39.25
|
||||
2.75t-39.25-2.75q-38-5.25-48.75-5.25-29.5 0-46.75 21t-17.25 51q0 22 8
|
||||
38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0
|
||||
37.25-1.75t35-7.375 30.5-15 20.25-25.75 8-38.375zM416 260q0 51.75-15.25
|
||||
82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5-41.75
|
||||
1.125q-19.5 0-35.5-0.75t-36.875-3.125-38.125-7.5-34.25-12.875-30.25-20.25-21.5-28.75q-15.5-30.75-15.5-82.75
|
||||
0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25
|
||||
30.875q36.75-8.75 77.25-8.75 37 0 70 8 26.25-20.5
|
||||
46.75-30.25t47.25-9.75q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34
|
||||
99.5z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -1,38 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500"
|
||||
viewBox="0 0 500 500" id="gitlab">
|
||||
<g transform="translate(156.197863, 1.160267)">
|
||||
<path fill="currentColor"
|
||||
d="M93.667,473.347L93.667,473.347l90.684-279.097H2.983L93.667,
|
||||
473.347L93.667,473.347z" />
|
||||
</g>
|
||||
<g transform="translate(28.531199, 1.160800)" opacity="0.7">
|
||||
<path fill="currentColor"
|
||||
d="M221.333,473.345L130.649,194.25H3.557L221.333,473.345L221.333,
|
||||
473.345z" />
|
||||
</g>
|
||||
<g transform="translate(0.088533, 0.255867)" opacity="0.5">
|
||||
<path fill="currentColor"
|
||||
d="M32,195.155L32,195.155L4.441,279.97c-2.513,7.735,0.24,16.21,6.821,
|
||||
20.99l238.514,173.29 L32,195.155L32,195.155z" />
|
||||
</g>
|
||||
<g transform="translate(29.421866, 280.255593)">
|
||||
<path fill="currentColor"
|
||||
d="M2.667-84.844h127.092L75.14-252.942c-2.811-8.649-15.047-8.649-17.856,
|
||||
0L2.667-84.844 L2.667-84.844z" />
|
||||
</g>
|
||||
<g transform="translate(247.197860, 1.160800)" opacity="0.7">
|
||||
<path fill="currentColor"
|
||||
d="M2.667,473.345L93.351,194.25h127.092L2.667,473.345L2.667,
|
||||
473.345z" />
|
||||
</g>
|
||||
<g transform="translate(246.307061, 0.255867)" opacity="0.5">
|
||||
<path fill="currentColor"
|
||||
d="M221.334,195.155L221.334,195.155l27.559,84.815c2.514,7.735-0.24,
|
||||
16.21-6.821,20.99 L3.557,474.25L221.334,195.155L221.334,195.155z" />
|
||||
</g>
|
||||
<g transform="translate(336.973725, 280.255593)">
|
||||
<path fill="currentColor"
|
||||
d="M130.667-84.844H3.575l54.618-168.098c2.811-8.649,15.047-8.649,
|
||||
17.856,0L130.667-84.844 L130.667-84.844z" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
@@ -1 +0,0 @@
|
||||
!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t,n){"use strict";t.__esModule=!0,t.default={createElement:function(e,t){var n=document.createElement(e);t&&Array.prototype.forEach.call(Object.keys(t),function(e){n.setAttribute(e,t[e])});for(var r=arguments.length,i=Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return function e(t){Array.prototype.forEach.call(t,function(t){"string"==typeof t||"number"==typeof t?n.textContent+=t:Array.isArray(t)?e(t):void 0!==t.__html?n.innerHTML+=t.__html:t instanceof Node&&n.appendChild(t)})}(i),n}},e.exports=t.default},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof fetch?fetch.bind():function(e,t){return t=t||{},new Promise(function(n,r){function i(){var e,t=[],n=[],r={};return o.getAllResponseHeaders().replace(/^(.*?):\s*([\s\S]*?)$/gm,function(i,o,a){t.push(o=o.toLowerCase()),n.push([o,a]),e=r[o],r[o]=e?e+","+a:a}),{ok:1==(o.status/200|0),status:o.status,statusText:o.statusText,url:o.responseURL,clone:i,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(o.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([o.response]))},headers:{keys:function(){return t},entries:function(){return n},get:function(e){return r[e.toLowerCase()]},has:function(e){return e.toLowerCase()in r}}}}var o=new XMLHttpRequest;o.open(t.method||"get",e);for(var a in t.headers)o.setRequestHeader(a,t.headers[a]);o.withCredentials="include"==t.credentials,o.onload=function(){n(i())},o.onerror=r,o.send(t.body)})};t.default=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(t,n,i){var o=this;r(this,e),this.els_=Array.prototype.slice.call("string"==typeof t?document.querySelectorAll(t):[].concat(t)),this.handler_="function"==typeof i?{update:i}:i,this.events_=[].concat(n),this.update_=function(e){return o.handler_.update(e)}}return e.prototype.listen=function(){var e=this;this.els_.forEach(function(t){e.events_.forEach(function(n){t.addEventListener(n,e.update_,!1)})}),"function"==typeof this.handler_.setup&&this.handler_.setup()},e.prototype.unlisten=function(){var e=this;this.els_.forEach(function(t){e.events_.forEach(function(n){t.removeEventListener(n,e.update_)})}),"function"==typeof this.handler_.reset&&this.handler_.reset()},e}();t.default=i},,,function(e,t,n){"use strict";(function(e){function r(e){return e&&e.__esModule?e:{default:e}}function i(t){new f.default.Event.Listener(document,"DOMContentLoaded",function(){if(!(document.body instanceof HTMLElement))throw new ReferenceError;l.default.attach(document.body),Modernizr.addTest("ios",function(){return!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)});var t=document.querySelectorAll("table:not([class])");if(Array.prototype.forEach.call(t,function(t){var n=e.createElement("div",{class:"md-typeset__scrollwrap"},e.createElement("div",{class:"md-typeset__table"}));t.nextSibling?t.parentNode.insertBefore(n,t.nextSibling):t.parentNode.appendChild(n),n.children[0].appendChild(t)}),c.default.isSupported()){var n=document.querySelectorAll(".codehilite > pre, pre > code");Array.prototype.forEach.call(n,function(t,n){var r="__code_"+n,i=e.createElement("button",{class:"md-clipboard",title:h("clipboard.copy"),"data-clipboard-target":"#"+r+" pre, #"+r+" code"},e.createElement("span",{class:"md-clipboard__message"})),o=t.parentNode;o.id=r,o.insertBefore(i,t)});new c.default(".md-clipboard").on("success",function(e){var t=e.trigger.querySelector(".md-clipboard__message");if(!(t instanceof HTMLElement))throw new ReferenceError;e.clearSelection(),t.dataset.mdTimer&&clearTimeout(parseInt(t.dataset.mdTimer,10)),t.classList.add("md-clipboard__message--active"),t.innerHTML=h("clipboard.copied"),t.dataset.mdTimer=setTimeout(function(){t.classList.remove("md-clipboard__message--active"),t.dataset.mdTimer=""},2e3).toString()})}if(!Modernizr.details){var r=document.querySelectorAll("details > summary");Array.prototype.forEach.call(r,function(e){e.addEventListener("click",function(e){var t=e.target.parentNode;t.hasAttribute("open")?t.removeAttribute("open"):t.setAttribute("open","")})})}var i=function(){if(document.location.hash){var e=document.getElementById(document.location.hash.substring(1));if(!Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,i,n;e.da=function(){this.pipeline.reset(),this.pipeline.add(e.da.trimmer,e.da.stopWordFilter,e.da.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.da.stemmer))},e.da.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.da.trimmer=e.trimmerSupport.generateTrimmer(e.da.wordCharacters),e.Pipeline.registerFunction(e.da.trimmer,"trimmer-da"),e.da.stemmer=(r=e.stemmerSupport.Among,i=e.stemmerSupport.SnowballProgram,n=new function(){var e,n,t,s=[new r("hed",-1,1),new r("ethed",0,1),new r("ered",-1,1),new r("e",-1,1),new r("erede",3,1),new r("ende",3,1),new r("erende",5,1),new r("ene",3,1),new r("erne",3,1),new r("ere",3,1),new r("en",-1,1),new r("heden",10,1),new r("eren",10,1),new r("er",-1,1),new r("heder",13,1),new r("erer",13,1),new r("s",-1,2),new r("heds",16,1),new r("es",16,1),new r("endes",18,1),new r("erendes",19,1),new r("enes",18,1),new r("ernes",18,1),new r("eres",18,1),new r("ens",16,1),new r("hedens",24,1),new r("erens",24,1),new r("ers",16,1),new r("ets",16,1),new r("erets",28,1),new r("et",-1,1),new r("eret",30,1)],o=[new r("gd",-1,-1),new r("dt",-1,-1),new r("gt",-1,-1),new r("kt",-1,-1)],a=[new r("ig",-1,1),new r("lig",0,1),new r("elig",1,1),new r("els",-1,1),new r("løst",-1,2)],d=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],u=[239,254,42,3,0,0,0,0,0,0,0,0,0,0,0,0,16],c=new i;function l(){var e,r=c.limit-c.cursor;c.cursor>=n&&(e=c.limit_backward,c.limit_backward=n,c.ket=c.cursor,c.find_among_b(o,4)?(c.bra=c.cursor,c.limit_backward=e,c.cursor=c.limit-r,c.cursor>c.limit_backward&&(c.cursor--,c.bra=c.cursor,c.slice_del())):c.limit_backward=e)}this.setCurrent=function(e){c.setCurrent(e)},this.getCurrent=function(){return c.getCurrent()},this.stem=function(){var r,i=c.cursor;return function(){var r,i=c.cursor+3;if(n=c.limit,0<=i&&i<=c.limit){for(e=i;;){if(r=c.cursor,c.in_grouping(d,97,248)){c.cursor=r;break}if(c.cursor=r,r>=c.limit)return;c.cursor++}for(;!c.out_grouping(d,97,248);){if(c.cursor>=c.limit)return;c.cursor++}(n=c.cursor)<e&&(n=e)}}(),c.limit_backward=i,c.cursor=c.limit,function(){var e,r;if(c.cursor>=n&&(r=c.limit_backward,c.limit_backward=n,c.ket=c.cursor,e=c.find_among_b(s,32),c.limit_backward=r,e))switch(c.bra=c.cursor,e){case 1:c.slice_del();break;case 2:c.in_grouping_b(u,97,229)&&c.slice_del()}}(),c.cursor=c.limit,l(),c.cursor=c.limit,function(){var e,r,i,t=c.limit-c.cursor;if(c.ket=c.cursor,c.eq_s_b(2,"st")&&(c.bra=c.cursor,c.eq_s_b(2,"ig")&&c.slice_del()),c.cursor=c.limit-t,c.cursor>=n&&(r=c.limit_backward,c.limit_backward=n,c.ket=c.cursor,e=c.find_among_b(a,5),c.limit_backward=r,e))switch(c.bra=c.cursor,e){case 1:c.slice_del(),i=c.limit-c.cursor,l(),c.cursor=c.limit-i;break;case 2:c.slice_from("løs")}}(),c.cursor=c.limit,c.cursor>=n&&(r=c.limit_backward,c.limit_backward=n,c.ket=c.cursor,c.out_grouping_b(d,97,248)?(c.bra=c.cursor,t=c.slice_to(t),c.limit_backward=r,c.eq_v_b(t)&&c.slice_del()):c.limit_backward=r),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return n.setCurrent(e),n.stem(),n.getCurrent()}):(n.setCurrent(e),n.stem(),n.getCurrent())}),e.Pipeline.registerFunction(e.da.stemmer,"stemmer-da"),e.da.stopWordFilter=e.generateStopWordFilter("ad af alle alt anden at blev blive bliver da de dem den denne der deres det dette dig din disse dog du efter eller en end er et for fra ham han hans har havde have hende hendes her hos hun hvad hvis hvor i ikke ind jeg jer jo kunne man mange med meget men mig min mine mit mod ned noget nogle nu når og også om op os over på selv sig sin sine sit skal skulle som sådan thi til ud under var vi vil ville vor være været".split(" ")),e.Pipeline.registerFunction(e.da.stopWordFilter,"stopWordFilter-da")}});
|
||||
@@ -1 +0,0 @@
|
||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,n,i;e.de=function(){this.pipeline.reset(),this.pipeline.add(e.de.trimmer,e.de.stopWordFilter,e.de.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.de.stemmer))},e.de.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.de.trimmer=e.trimmerSupport.generateTrimmer(e.de.wordCharacters),e.Pipeline.registerFunction(e.de.trimmer,"trimmer-de"),e.de.stemmer=(r=e.stemmerSupport.Among,n=e.stemmerSupport.SnowballProgram,i=new function(){var e,i,s,t=[new r("",-1,6),new r("U",0,2),new r("Y",0,1),new r("ä",0,3),new r("ö",0,4),new r("ü",0,5)],o=[new r("e",-1,2),new r("em",-1,1),new r("en",-1,2),new r("ern",-1,1),new r("er",-1,1),new r("s",-1,3),new r("es",5,2)],c=[new r("en",-1,1),new r("er",-1,1),new r("st",-1,2),new r("est",2,1)],u=[new r("ig",-1,1),new r("lich",-1,1)],a=[new r("end",-1,1),new r("ig",-1,2),new r("ung",-1,1),new r("lich",-1,3),new r("isch",-1,2),new r("ik",-1,2),new r("heit",-1,3),new r("keit",-1,4)],d=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,8,0,32,8],l=[117,30,5],m=[117,30,4],h=new n;function w(e,r,n){return!(!h.eq_s(1,e)||(h.ket=h.cursor,!h.in_grouping(d,97,252)))&&(h.slice_from(r),h.cursor=n,!0)}function f(){for(;!h.in_grouping(d,97,252);){if(h.cursor>=h.limit)return!0;h.cursor++}for(;!h.out_grouping(d,97,252);){if(h.cursor>=h.limit)return!0;h.cursor++}return!1}function b(){return s<=h.cursor}function _(){return i<=h.cursor}this.setCurrent=function(e){h.setCurrent(e)},this.getCurrent=function(){return h.getCurrent()},this.stem=function(){var r=h.cursor;return function(){for(var e,r,n,i,s=h.cursor;;)if(e=h.cursor,h.bra=e,h.eq_s(1,"ß"))h.ket=h.cursor,h.slice_from("ss");else{if(e>=h.limit)break;h.cursor=e+1}for(h.cursor=s;;)for(r=h.cursor;;){if(n=h.cursor,h.in_grouping(d,97,252)){if(i=h.cursor,h.bra=i,w("u","U",n))break;if(h.cursor=i,w("y","Y",n))break}if(n>=h.limit)return void(h.cursor=r);h.cursor=n+1}}(),h.cursor=r,function(){s=h.limit,i=s;var r=h.cursor+3;0<=r&&r<=h.limit&&(e=r,f()||((s=h.cursor)<e&&(s=e),f()||(i=h.cursor)))}(),h.limit_backward=r,h.cursor=h.limit,function(){var e,r,n,i,s=h.limit-h.cursor;if(h.ket=h.cursor,(e=h.find_among_b(o,7))&&(h.bra=h.cursor,b()))switch(e){case 1:h.slice_del();break;case 2:h.slice_del(),h.ket=h.cursor,h.eq_s_b(1,"s")&&(h.bra=h.cursor,h.eq_s_b(3,"nis")&&h.slice_del());break;case 3:h.in_grouping_b(l,98,116)&&h.slice_del()}if(h.cursor=h.limit-s,h.ket=h.cursor,(e=h.find_among_b(c,4))&&(h.bra=h.cursor,b()))switch(e){case 1:h.slice_del();break;case 2:if(h.in_grouping_b(m,98,116)){var t=h.cursor-3;h.limit_backward<=t&&t<=h.limit&&(h.cursor=t,h.slice_del())}}if(h.cursor=h.limit-s,h.ket=h.cursor,(e=h.find_among_b(a,8))&&(h.bra=h.cursor,_()))switch(e){case 1:h.slice_del(),h.ket=h.cursor,h.eq_s_b(2,"ig")&&(h.bra=h.cursor,r=h.limit-h.cursor,h.eq_s_b(1,"e")||(h.cursor=h.limit-r,_()&&h.slice_del()));break;case 2:n=h.limit-h.cursor,h.eq_s_b(1,"e")||(h.cursor=h.limit-n,h.slice_del());break;case 3:if(h.slice_del(),h.ket=h.cursor,i=h.limit-h.cursor,!h.eq_s_b(2,"er")&&(h.cursor=h.limit-i,!h.eq_s_b(2,"en")))break;h.bra=h.cursor,b()&&h.slice_del();break;case 4:h.slice_del(),h.ket=h.cursor,(e=h.find_among_b(u,2))&&(h.bra=h.cursor,_()&&1==e&&h.slice_del())}}(),h.cursor=h.limit_backward,function(){for(var e,r;;){if(r=h.cursor,h.bra=r,!(e=h.find_among(t,6)))return;switch(h.ket=h.cursor,e){case 1:h.slice_from("y");break;case 2:case 5:h.slice_from("u");break;case 3:h.slice_from("a");break;case 4:h.slice_from("o");break;case 6:if(h.cursor>=h.limit)return;h.cursor++}}}(),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}):(i.setCurrent(e),i.stem(),i.getCurrent())}),e.Pipeline.registerFunction(e.de.stemmer,"stemmer-de"),e.de.stopWordFilter=e.generateStopWordFilter("aber alle allem allen aller alles als also am an ander andere anderem anderen anderer anderes anderm andern anderr anders auch auf aus bei bin bis bist da damit dann das dasselbe dazu daß dein deine deinem deinen deiner deines dem demselben den denn denselben der derer derselbe derselben des desselben dessen dich die dies diese dieselbe dieselben diesem diesen dieser dieses dir doch dort du durch ein eine einem einen einer eines einig einige einigem einigen einiger einiges einmal er es etwas euch euer eure eurem euren eurer eures für gegen gewesen hab habe haben hat hatte hatten hier hin hinter ich ihm ihn ihnen ihr ihre ihrem ihren ihrer ihres im in indem ins ist jede jedem jedenLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
!function(r,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():e()(r.lunr)}(this,function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var e,i,n;r.du=function(){this.pipeline.reset(),this.pipeline.add(r.du.trimmer,r.du.stopWordFilter,r.du.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(r.du.stemmer))},r.du.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",r.du.trimmer=r.trimmerSupport.generateTrimmer(r.du.wordCharacters),r.Pipeline.registerFunction(r.du.trimmer,"trimmer-du"),r.du.stemmer=(e=r.stemmerSupport.Among,i=r.stemmerSupport.SnowballProgram,n=new function(){var r,n,o,t=[new e("",-1,6),new e("á",0,1),new e("ä",0,1),new e("é",0,2),new e("ë",0,2),new e("í",0,3),new e("ï",0,3),new e("ó",0,4),new e("ö",0,4),new e("ú",0,5),new e("ü",0,5)],s=[new e("",-1,3),new e("I",0,2),new e("Y",0,1)],u=[new e("dd",-1,-1),new e("kk",-1,-1),new e("tt",-1,-1)],c=[new e("ene",-1,2),new e("se",-1,3),new e("en",-1,2),new e("heden",2,1),new e("s",-1,3)],a=[new e("end",-1,1),new e("ig",-1,2),new e("ing",-1,1),new e("lijk",-1,3),new e("baar",-1,4),new e("bar",-1,5)],l=[new e("aa",-1,-1),new e("ee",-1,-1),new e("oo",-1,-1),new e("uu",-1,-1)],m=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,128],d=[1,0,0,17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,128],f=[17,67,16,1,0,0,0,0,0,0,0,0,0,0,0,0,128],_=new i;function w(r){return _.cursor=r,r>=_.limit||(_.cursor++,!1)}function b(){for(;!_.in_grouping(m,97,232);){if(_.cursor>=_.limit)return!0;_.cursor++}for(;!_.out_grouping(m,97,232);){if(_.cursor>=_.limit)return!0;_.cursor++}return!1}function p(){return n<=_.cursor}function g(){return r<=_.cursor}function h(){var r=_.limit-_.cursor;_.find_among_b(u,3)&&(_.cursor=_.limit-r,_.ket=_.cursor,_.cursor>_.limit_backward&&(_.cursor--,_.bra=_.cursor,_.slice_del()))}function k(){var r;o=!1,_.ket=_.cursor,_.eq_s_b(1,"e")&&(_.bra=_.cursor,p()&&(r=_.limit-_.cursor,_.out_grouping_b(m,97,232)&&(_.cursor=_.limit-r,_.slice_del(),o=!0,h())))}function v(){var r;p()&&(r=_.limit-_.cursor,_.out_grouping_b(m,97,232)&&(_.cursor=_.limit-r,_.eq_s_b(3,"gem")||(_.cursor=_.limit-r,_.slice_del(),h())))}this.setCurrent=function(r){_.setCurrent(r)},this.getCurrent=function(){return _.getCurrent()},this.stem=function(){var e=_.cursor;return function(){for(var r,e,i,n=_.cursor;;){if(_.bra=_.cursor,r=_.find_among(t,11))switch(_.ket=_.cursor,r){case 1:_.slice_from("a");continue;case 2:_.slice_from("e");continue;case 3:_.slice_from("i");continue;case 4:_.slice_from("o");continue;case 5:_.slice_from("u");continue;case 6:if(_.cursor>=_.limit)break;_.cursor++;continue}break}for(_.cursor=n,_.bra=n,_.eq_s(1,"y")?(_.ket=_.cursor,_.slice_from("Y")):_.cursor=n;;)if(e=_.cursor,_.in_grouping(m,97,232)){if(i=_.cursor,_.bra=i,_.eq_s(1,"i"))_.ket=_.cursor,_.in_grouping(m,97,232)&&(_.slice_from("I"),_.cursor=e);else if(_.cursor=i,_.eq_s(1,"y"))_.ket=_.cursor,_.slice_from("Y"),_.cursor=e;else if(w(e))break}else if(w(e))break}(),_.cursor=e,n=_.limit,r=n,b()||((n=_.cursor)<3&&(n=3),b()||(r=_.cursor)),_.limit_backward=e,_.cursor=_.limit,function(){var r,e,i,n,t,s,u=_.limit-_.cursor;if(_.ket=_.cursor,r=_.find_among_b(c,5))switch(_.bra=_.cursor,r){case 1:p()&&_.slice_from("heid");break;case 2:v();break;case 3:p()&&_.out_grouping_b(f,97,232)&&_.slice_del()}if(_.cursor=_.limit-u,k(),_.cursor=_.limit-u,_.ket=_.cursor,_.eq_s_b(4,"heid")&&(_.bra=_.cursor,g()&&(e=_.limit-_.cursor,_.eq_s_b(1,"c")||(_.cursor=_.limit-e,_.slice_del(),_.ket=_.cursor,_.eq_s_b(2,"en")&&(_.bra=_.cursor,v())))),_.cursor=_.limit-u,_.ket=_.cursor,r=_.find_among_b(a,6))switch(_.bra=_.cursor,r){case 1:if(g()){if(_.slice_del(),i=_.limit-_.cursor,_.ket=_.cursor,_.eq_s_b(2,"ig")&&(_.bra=_.cursor,g()&&(n=_.limit-_.cursor,!_.eq_s_b(1,"e")))){_.cursor=_.limit-n,_.slice_del();break}_.cursor=_.limit-i,h()}break;case 2:g()&&(t=_.limit-_.cursor,_.eq_s_b(1,"e")||(_.cursor=_.limit-t,_.slice_del()));break;case 3:g()&&(_.slice_del(),k());break;case 4:g()&&_.slice_del();break;case 5:g()&&o&&_.slice_del()}_.cursor=_.limit-u,_.out_grouping_b(d,73,232)&&(s=_.limit-_.cursor,_.find_among_b(l,4)&&_.out_grouping_b(m,97,232)&&(_.cursor=_.limit-s,_.ket=_.cursor,_.cursor>_.limit_backward&&(_.cursor--,_.bra=_.cursor,_.slice_del())))}(),_.cursor=_.limit_backward,function(){for(var r;;)if(_.bra=_.cursor,r=_.find_among(s,3))switch(_.ket=_.cursor,r){case 1:_.slice_from("y");break;case 2:_.slice_from("i");break;case 3:if(_.cursor>=_.limit)return;_.cursor++}}(),!0}},function(r){return"function"==typeof r.update?r.update(function(r){return n.setCurrent(r),n.stem(),n.getCurrent()}):(n.setCurrent(r),n.stem(),n.getCurrent())}),r.PLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
!function(e,s){"function"==typeof define&&define.amd?define(s):"object"==typeof exports?module.exports=s():s()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var s,r,n;e.es=function(){this.pipeline.reset(),this.pipeline.add(e.es.trimmer,e.es.stopWordFilter,e.es.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.es.stemmer))},e.es.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.es.trimmer=e.trimmerSupport.generateTrimmer(e.es.wordCharacters),e.Pipeline.registerFunction(e.es.trimmer,"trimmer-es"),e.es.stemmer=(s=e.stemmerSupport.Among,r=e.stemmerSupport.SnowballProgram,n=new function(){var e,n,i,a=[new s("",-1,6),new s("á",0,1),new s("é",0,2),new s("í",0,3),new s("ó",0,4),new s("ú",0,5)],t=[new s("la",-1,-1),new s("sela",0,-1),new s("le",-1,-1),new s("me",-1,-1),new s("se",-1,-1),new s("lo",-1,-1),new s("selo",5,-1),new s("las",-1,-1),new s("selas",7,-1),new s("les",-1,-1),new s("los",-1,-1),new s("selos",10,-1),new s("nos",-1,-1)],o=[new s("ando",-1,6),new s("iendo",-1,6),new s("yendo",-1,7),new s("ándo",-1,2),new s("iéndo",-1,1),new s("ar",-1,6),new s("er",-1,6),new s("ir",-1,6),new s("ár",-1,3),new s("ér",-1,4),new s("ír",-1,5)],u=[new s("ic",-1,-1),new s("ad",-1,-1),new s("os",-1,-1),new s("iv",-1,1)],w=[new s("able",-1,1),new s("ible",-1,1),new s("ante",-1,1)],c=[new s("ic",-1,1),new s("abil",-1,1),new s("iv",-1,1)],m=[new s("ica",-1,1),new s("ancia",-1,2),new s("encia",-1,5),new s("adora",-1,2),new s("osa",-1,1),new s("ista",-1,1),new s("iva",-1,9),new s("anza",-1,1),new s("logía",-1,3),new s("idad",-1,8),new s("able",-1,1),new s("ible",-1,1),new s("ante",-1,2),new s("mente",-1,7),new s("amente",13,6),new s("ación",-1,2),new s("ución",-1,4),new s("ico",-1,1),new s("ismo",-1,1),new s("oso",-1,1),new s("amiento",-1,1),new s("imiento",-1,1),new s("ivo",-1,9),new s("ador",-1,2),new s("icas",-1,1),new s("ancias",-1,2),new s("encias",-1,5),new s("adoras",-1,2),new s("osas",-1,1),new s("istas",-1,1),new s("ivas",-1,9),new s("anzas",-1,1),new s("logías",-1,3),new s("idades",-1,8),new s("ables",-1,1),new s("ibles",-1,1),new s("aciones",-1,2),new s("uciones",-1,4),new s("adores",-1,2),new s("antes",-1,2),new s("icos",-1,1),new s("ismos",-1,1),new s("osos",-1,1),new s("amientos",-1,1),new s("imientos",-1,1),new s("ivos",-1,9)],l=[new s("ya",-1,1),new s("ye",-1,1),new s("yan",-1,1),new s("yen",-1,1),new s("yeron",-1,1),new s("yendo",-1,1),new s("yo",-1,1),new s("yas",-1,1),new s("yes",-1,1),new s("yais",-1,1),new s("yamos",-1,1),new s("yó",-1,1)],d=[new s("aba",-1,2),new s("ada",-1,2),new s("ida",-1,2),new s("ara",-1,2),new s("iera",-1,2),new s("ía",-1,2),new s("aría",5,2),new s("ería",5,2),new s("iría",5,2),new s("ad",-1,2),new s("ed",-1,2),new s("id",-1,2),new s("ase",-1,2),new s("iese",-1,2),new s("aste",-1,2),new s("iste",-1,2),new s("an",-1,2),new s("aban",16,2),new s("aran",16,2),new s("ieran",16,2),new s("ían",16,2),new s("arían",20,2),new s("erían",20,2),new s("irían",20,2),new s("en",-1,1),new s("asen",24,2),new s("iesen",24,2),new s("aron",-1,2),new s("ieron",-1,2),new s("arán",-1,2),new s("erán",-1,2),new s("irán",-1,2),new s("ado",-1,2),new s("ido",-1,2),new s("ando",-1,2),new s("iendo",-1,2),new s("ar",-1,2),new s("er",-1,2),new s("ir",-1,2),new s("as",-1,2),new s("abas",39,2),new s("adas",39,2),new s("idas",39,2),new s("aras",39,2),new s("ieras",39,2),new s("ías",39,2),new s("arías",45,2),new s("erías",45,2),new s("irías",45,2),new s("es",-1,1),new s("ases",49,2),new s("ieses",49,2),new s("abais",-1,2),new s("arais",-1,2),new s("ierais",-1,2),new s("íais",-1,2),new s("aríais",55,2),new s("eríais",55,2),new s("iríais",55,2),new s("aseis",-1,2),new s("ieseis",-1,2),new s("asteis",-1,2),new s("isteis",-1,2),new s("áis",-1,2),new s("éis",-1,1),new s("aréis",64,2),new s("eréis",64,2),new s("iréis",64,2),new s("ados",-1,2),new s("idos",-1,2),new s("amos",-1,2),new s("ábamos",70,2),new s("áramos",70,2),new s("iéramos",70,2),new s("íamos",70,2),new s("aríamos",74,2),new s("eríamos",74,2),new s("iríamos",74,2),new s("emos",-1,1),new s("aremos",78,2),new s("eremos",78,2),new s("iremos",78,2),new s("ásemos",78,2),new s("iésemos",78,2),new s("imos",-1,2),new s("arás",-1,2),new s("erás",-1,2),new s("irás",-1,2),new s("ís",-1,2),new s("ará",-1,2),new s("erá",-1,2),new s("irá",-1,2),new s("aré",-1,2),new s("eré",-1,2),new s("iré",-1,2),new s("ió",-1,2)],b=[new s("a",-1,1),new s("e",-1,2),new s("o",-1,1),new s("os",-1,1),new s("á",-1,1),new s("é",-1,2),new s("í",-1,1),new s("ó",-1,1)],f=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,1,17,4,1Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
!function(i,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():e()(i.lunr)}(this,function(){return function(i){if(void 0===i)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===i.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var e,r,n;i.fi=function(){this.pipeline.reset(),this.pipeline.add(i.fi.trimmer,i.fi.stopWordFilter,i.fi.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(i.fi.stemmer))},i.fi.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",i.fi.trimmer=i.trimmerSupport.generateTrimmer(i.fi.wordCharacters),i.Pipeline.registerFunction(i.fi.trimmer,"trimmer-fi"),i.fi.stemmer=(e=i.stemmerSupport.Among,r=i.stemmerSupport.SnowballProgram,n=new function(){var i,n,t,s,l=[new e("pa",-1,1),new e("sti",-1,2),new e("kaan",-1,1),new e("han",-1,1),new e("kin",-1,1),new e("hän",-1,1),new e("kään",-1,1),new e("ko",-1,1),new e("pä",-1,1),new e("kö",-1,1)],o=[new e("lla",-1,-1),new e("na",-1,-1),new e("ssa",-1,-1),new e("ta",-1,-1),new e("lta",3,-1),new e("sta",3,-1)],a=[new e("llä",-1,-1),new e("nä",-1,-1),new e("ssä",-1,-1),new e("tä",-1,-1),new e("ltä",3,-1),new e("stä",3,-1)],u=[new e("lle",-1,-1),new e("ine",-1,-1)],c=[new e("nsa",-1,3),new e("mme",-1,3),new e("nne",-1,3),new e("ni",-1,2),new e("si",-1,1),new e("an",-1,4),new e("en",-1,6),new e("än",-1,5),new e("nsä",-1,3)],m=[new e("aa",-1,-1),new e("ee",-1,-1),new e("ii",-1,-1),new e("oo",-1,-1),new e("uu",-1,-1),new e("ää",-1,-1),new e("öö",-1,-1)],w=[new e("a",-1,8),new e("lla",0,-1),new e("na",0,-1),new e("ssa",0,-1),new e("ta",0,-1),new e("lta",4,-1),new e("sta",4,-1),new e("tta",4,9),new e("lle",-1,-1),new e("ine",-1,-1),new e("ksi",-1,-1),new e("n",-1,7),new e("han",11,1),new e("den",11,-1,C),new e("seen",11,-1,v),new e("hen",11,2),new e("tten",11,-1,C),new e("hin",11,3),new e("siin",11,-1,C),new e("hon",11,4),new e("hän",11,5),new e("hön",11,6),new e("ä",-1,8),new e("llä",22,-1),new e("nä",22,-1),new e("ssä",22,-1),new e("tä",22,-1),new e("ltä",26,-1),new e("stä",26,-1),new e("ttä",26,9)],_=[new e("eja",-1,-1),new e("mma",-1,1),new e("imma",1,-1),new e("mpa",-1,1),new e("impa",3,-1),new e("mmi",-1,1),new e("immi",5,-1),new e("mpi",-1,1),new e("impi",7,-1),new e("ejä",-1,-1),new e("mmä",-1,1),new e("immä",10,-1),new e("mpä",-1,1),new e("impä",12,-1)],k=[new e("i",-1,-1),new e("j",-1,-1)],b=[new e("mma",-1,1),new e("imma",0,-1)],d=[17,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8],f=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,8,0,32],h=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,32],p=[17,97,24,1,0,0,0,0,0,0,0,0,0,0,0,0,8,0,32],g=new r;function j(){for(var i;i=g.cursor,!g.in_grouping(f,97,246);){if(g.cursor=i,i>=g.limit)return!0;g.cursor++}for(g.cursor=i;!g.out_grouping(f,97,246);){if(g.cursor>=g.limit)return!0;g.cursor++}return!1}function q(){var i,e;if(g.cursor>=s)if(e=g.limit_backward,g.limit_backward=s,g.ket=g.cursor,i=g.find_among_b(l,10)){switch(g.bra=g.cursor,g.limit_backward=e,i){case 1:if(!g.in_grouping_b(p,97,246))return;break;case 2:if(!(t<=g.cursor))return}g.slice_del()}else g.limit_backward=e}function v(){return g.find_among_b(m,7)}function C(){return g.eq_s_b(1,"i")&&g.in_grouping_b(h,97,246)}this.setCurrent=function(i){g.setCurrent(i)},this.getCurrent=function(){return g.getCurrent()},this.stem=function(){var e,r=g.cursor;return s=g.limit,t=s,j()||(s=g.cursor,j()||(t=g.cursor)),i=!1,g.limit_backward=r,g.cursor=g.limit,q(),g.cursor=g.limit,function(){var i,e,r;if(g.cursor>=s)if(e=g.limit_backward,g.limit_backward=s,g.ket=g.cursor,i=g.find_among_b(c,9))switch(g.bra=g.cursor,g.limit_backward=e,i){case 1:r=g.limit-g.cursor,g.eq_s_b(1,"k")||(g.cursor=g.limit-r,g.slice_del());break;case 2:g.slice_del(),g.ket=g.cursor,g.eq_s_b(3,"kse")&&(g.bra=g.cursor,g.slice_from("ksi"));break;case 3:g.slice_del();break;case 4:g.find_among_b(o,6)&&g.slice_del();break;case 5:g.find_among_b(a,6)&&g.slice_del();break;case 6:g.find_among_b(u,2)&&g.slice_del()}else g.limit_backward=e}(),g.cursor=g.limit,function(){var e,r,n;if(g.cursor>=s)if(r=g.limit_backward,g.limit_backward=s,g.ket=g.cursor,e=g.find_among_b(w,30)){switch(g.bra=g.cursor,g.limit_backward=r,e){case 1:if(!g.eq_s_b(1,"a"))return;break;case 2:case 9:if(!g.eq_s_b(1,"e"))return;break;case 3:if(!g.eq_s_b(1,"i"))return;break;case 4:if(!g.eq_s_b(1,"o"))return;break;case 5:if(!g.eq_s_b(1,"ä"))return;break;case 6:if(!g.eq_s_b(1,"ö"))return;break;case 7:if(n=g.limit-g.cursor,!v()&&(g.cursor=g.limit-n,!g.eq_s_b(2,"ie"))){g.cursor=g.limit-n;break}if(g.cursor=g.limit-n,g.cursor<=g.limit_backward){g.cursor=g.limit-n;break}g.cursor--,g.bra=g.cursor;break;case 8:if(!g.in_grouping_b(f,97,246)||!g.out_grouping_b(f,97,246))return}g.slice_del(),i=!0}else g.limiLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,s,i;e.fr=function(){this.pipeline.reset(),this.pipeline.add(e.fr.trimmer,e.fr.stopWordFilter,e.fr.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.fr.stemmer))},e.fr.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.fr.trimmer=e.trimmerSupport.generateTrimmer(e.fr.wordCharacters),e.Pipeline.registerFunction(e.fr.trimmer,"trimmer-fr"),e.fr.stemmer=(r=e.stemmerSupport.Among,s=e.stemmerSupport.SnowballProgram,i=new function(){var e,i,n,t=[new r("col",-1,-1),new r("par",-1,-1),new r("tap",-1,-1)],u=[new r("",-1,4),new r("I",0,1),new r("U",0,2),new r("Y",0,3)],o=[new r("iqU",-1,3),new r("abl",-1,3),new r("Ièr",-1,4),new r("ièr",-1,4),new r("eus",-1,2),new r("iv",-1,1)],c=[new r("ic",-1,2),new r("abil",-1,1),new r("iv",-1,3)],a=[new r("iqUe",-1,1),new r("atrice",-1,2),new r("ance",-1,1),new r("ence",-1,5),new r("logie",-1,3),new r("able",-1,1),new r("isme",-1,1),new r("euse",-1,11),new r("iste",-1,1),new r("ive",-1,8),new r("if",-1,8),new r("usion",-1,4),new r("ation",-1,2),new r("ution",-1,4),new r("ateur",-1,2),new r("iqUes",-1,1),new r("atrices",-1,2),new r("ances",-1,1),new r("ences",-1,5),new r("logies",-1,3),new r("ables",-1,1),new r("ismes",-1,1),new r("euses",-1,11),new r("istes",-1,1),new r("ives",-1,8),new r("ifs",-1,8),new r("usions",-1,4),new r("ations",-1,2),new r("utions",-1,4),new r("ateurs",-1,2),new r("ments",-1,15),new r("ements",30,6),new r("issements",31,12),new r("ités",-1,7),new r("ment",-1,15),new r("ement",34,6),new r("issement",35,12),new r("amment",34,13),new r("emment",34,14),new r("aux",-1,10),new r("eaux",39,9),new r("eux",-1,1),new r("ité",-1,7)],l=[new r("ira",-1,1),new r("ie",-1,1),new r("isse",-1,1),new r("issante",-1,1),new r("i",-1,1),new r("irai",4,1),new r("ir",-1,1),new r("iras",-1,1),new r("ies",-1,1),new r("îmes",-1,1),new r("isses",-1,1),new r("issantes",-1,1),new r("îtes",-1,1),new r("is",-1,1),new r("irais",13,1),new r("issais",13,1),new r("irions",-1,1),new r("issions",-1,1),new r("irons",-1,1),new r("issons",-1,1),new r("issants",-1,1),new r("it",-1,1),new r("irait",21,1),new r("issait",21,1),new r("issant",-1,1),new r("iraIent",-1,1),new r("issaIent",-1,1),new r("irent",-1,1),new r("issent",-1,1),new r("iront",-1,1),new r("ît",-1,1),new r("iriez",-1,1),new r("issiez",-1,1),new r("irez",-1,1),new r("issez",-1,1)],w=[new r("a",-1,3),new r("era",0,2),new r("asse",-1,3),new r("ante",-1,3),new r("ée",-1,2),new r("ai",-1,3),new r("erai",5,2),new r("er",-1,2),new r("as",-1,3),new r("eras",8,2),new r("âmes",-1,3),new r("asses",-1,3),new r("antes",-1,3),new r("âtes",-1,3),new r("ées",-1,2),new r("ais",-1,3),new r("erais",15,2),new r("ions",-1,1),new r("erions",17,2),new r("assions",17,3),new r("erons",-1,2),new r("ants",-1,3),new r("és",-1,2),new r("ait",-1,3),new r("erait",23,2),new r("ant",-1,3),new r("aIent",-1,3),new r("eraIent",26,2),new r("èrent",-1,2),new r("assent",-1,3),new r("eront",-1,2),new r("ât",-1,3),new r("ez",-1,2),new r("iez",32,2),new r("eriez",33,2),new r("assiez",33,3),new r("erez",32,2),new r("é",-1,2)],f=[new r("e",-1,3),new r("Ière",0,2),new r("ière",0,2),new r("ion",-1,1),new r("Ier",-1,2),new r("ier",-1,2),new r("ë",-1,4)],m=[new r("ell",-1,-1),new r("eill",-1,-1),new r("enn",-1,-1),new r("onn",-1,-1),new r("ett",-1,-1)],_=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,128,130,103,8,5],b=[1,65,20,0,0,0,0,0,0,0,0,0,0,0,0,0,128],d=new s;function k(e,r,s){return!(!d.eq_s(1,e)||(d.ket=d.cursor,!d.in_grouping(_,97,251)))&&(d.slice_from(r),d.cursor=s,!0)}function p(e,r,s){return!!d.eq_s(1,e)&&(d.ket=d.cursor,d.slice_from(r),d.cursor=s,!0)}function g(){for(;!d.in_grouping(_,97,251);){if(d.cursor>=d.limit)return!0;d.cursor++}for(;!d.out_grouping(_,97,251);){if(d.cursor>=d.limit)return!0;d.cursor++}return!1}function q(){return n<=d.cursor}function v(){return i<=d.cursor}function h(){return e<=d.cursor}function z(){if(!function(){var e,r;if(d.ket=d.cursor,e=d.find_among_b(a,43)){switch(d.bra=d.cursor,e){case 1:if(!h())return!1;d.slice_del();break;case 2:if(!h())return!1;d.slice_del(),d.ket=d.cursor,d.eq_s_b(2,"ic")&&(d.bra=d.cursor,h()?d.slice_del():d.slice_from("iqU"));break;case 3:if(!h())return!1;d.slice_from("log");break;case 4:if(!h())return!1;d.slice_from("u");break;case 5:if(!h())return!1;d.slice_from("ent");break;case 6:if(!q())return!1;if(d.slice_del(),d.ket=d.cursor,e=d.find_among_b(o,6))switch(d.bra=d.cursor,e){case 1:h()&&(d.slice_del(),d.ket=d.cursor,d.eq_s_Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
!function(e,n){"function"==typeof define&&define.amd?define(n):"object"==typeof exports?module.exports=n():n()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var n,r,i;e.hu=function(){this.pipeline.reset(),this.pipeline.add(e.hu.trimmer,e.hu.stopWordFilter,e.hu.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.hu.stemmer))},e.hu.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.hu.trimmer=e.trimmerSupport.generateTrimmer(e.hu.wordCharacters),e.Pipeline.registerFunction(e.hu.trimmer,"trimmer-hu"),e.hu.stemmer=(n=e.stemmerSupport.Among,r=e.stemmerSupport.SnowballProgram,i=new function(){var e,i=[new n("cs",-1,-1),new n("dzs",-1,-1),new n("gy",-1,-1),new n("ly",-1,-1),new n("ny",-1,-1),new n("sz",-1,-1),new n("ty",-1,-1),new n("zs",-1,-1)],a=[new n("á",-1,1),new n("é",-1,2)],t=[new n("bb",-1,-1),new n("cc",-1,-1),new n("dd",-1,-1),new n("ff",-1,-1),new n("gg",-1,-1),new n("jj",-1,-1),new n("kk",-1,-1),new n("ll",-1,-1),new n("mm",-1,-1),new n("nn",-1,-1),new n("pp",-1,-1),new n("rr",-1,-1),new n("ccs",-1,-1),new n("ss",-1,-1),new n("zzs",-1,-1),new n("tt",-1,-1),new n("vv",-1,-1),new n("ggy",-1,-1),new n("lly",-1,-1),new n("nny",-1,-1),new n("tty",-1,-1),new n("ssz",-1,-1),new n("zz",-1,-1)],s=[new n("al",-1,1),new n("el",-1,2)],c=[new n("ba",-1,-1),new n("ra",-1,-1),new n("be",-1,-1),new n("re",-1,-1),new n("ig",-1,-1),new n("nak",-1,-1),new n("nek",-1,-1),new n("val",-1,-1),new n("vel",-1,-1),new n("ul",-1,-1),new n("nál",-1,-1),new n("nél",-1,-1),new n("ból",-1,-1),new n("ról",-1,-1),new n("tól",-1,-1),new n("bõl",-1,-1),new n("rõl",-1,-1),new n("tõl",-1,-1),new n("ül",-1,-1),new n("n",-1,-1),new n("an",19,-1),new n("ban",20,-1),new n("en",19,-1),new n("ben",22,-1),new n("képpen",22,-1),new n("on",19,-1),new n("ön",19,-1),new n("képp",-1,-1),new n("kor",-1,-1),new n("t",-1,-1),new n("at",29,-1),new n("et",29,-1),new n("ként",29,-1),new n("anként",32,-1),new n("enként",32,-1),new n("onként",32,-1),new n("ot",29,-1),new n("ért",29,-1),new n("öt",29,-1),new n("hez",-1,-1),new n("hoz",-1,-1),new n("höz",-1,-1),new n("vá",-1,-1),new n("vé",-1,-1)],w=[new n("án",-1,2),new n("én",-1,1),new n("ánként",-1,3)],o=[new n("stul",-1,2),new n("astul",0,1),new n("ástul",0,3),new n("stül",-1,2),new n("estül",3,1),new n("éstül",3,4)],l=[new n("á",-1,1),new n("é",-1,2)],u=[new n("k",-1,7),new n("ak",0,4),new n("ek",0,6),new n("ok",0,5),new n("ák",0,1),new n("ék",0,2),new n("ök",0,3)],m=[new n("éi",-1,7),new n("áéi",0,6),new n("ééi",0,5),new n("é",-1,9),new n("ké",3,4),new n("aké",4,1),new n("eké",4,1),new n("oké",4,1),new n("áké",4,3),new n("éké",4,2),new n("öké",4,1),new n("éé",3,8)],k=[new n("a",-1,18),new n("ja",0,17),new n("d",-1,16),new n("ad",2,13),new n("ed",2,13),new n("od",2,13),new n("ád",2,14),new n("éd",2,15),new n("öd",2,13),new n("e",-1,18),new n("je",9,17),new n("nk",-1,4),new n("unk",11,1),new n("ánk",11,2),new n("énk",11,3),new n("ünk",11,1),new n("uk",-1,8),new n("juk",16,7),new n("ájuk",17,5),new n("ük",-1,8),new n("jük",19,7),new n("éjük",20,6),new n("m",-1,12),new n("am",22,9),new n("em",22,9),new n("om",22,9),new n("ám",22,10),new n("ém",22,11),new n("o",-1,18),new n("á",-1,19),new n("é",-1,20)],f=[new n("id",-1,10),new n("aid",0,9),new n("jaid",1,6),new n("eid",0,9),new n("jeid",3,6),new n("áid",0,7),new n("éid",0,8),new n("i",-1,15),new n("ai",7,14),new n("jai",8,11),new n("ei",7,14),new n("jei",10,11),new n("ái",7,12),new n("éi",7,13),new n("itek",-1,24),new n("eitek",14,21),new n("jeitek",15,20),new n("éitek",14,23),new n("ik",-1,29),new n("aik",18,26),new n("jaik",19,25),new n("eik",18,26),new n("jeik",21,25),new n("áik",18,27),new n("éik",18,28),new n("ink",-1,20),new n("aink",25,17),new n("jaink",26,16),new n("eink",25,17),new n("jeink",28,16),new n("áink",25,18),new n("éink",25,19),new n("aitok",-1,21),new n("jaitok",32,20),new n("áitok",-1,22),new n("im",-1,5),new n("aim",35,4),new n("jaim",36,1),new n("eim",35,4),new n("jeim",38,1),new n("áim",35,2),new n("éim",35,3)],b=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,1,17,52,14],d=new r;function g(){return e<=d.cursor}function h(){var e=d.limit-d.cursor;return!!d.find_among_b(t,23)&&(d.cursor=d.limit-e,!0)}function p(){if(d.cursor>d.limit_backward){d.cursor--,d.ket=d.cursor;var e=d.cursor-1;d.limit_backward<=e&&e<=d.limit&&(d.cursor=e,d.bra=e,d.slice_del())}}function _(){d.ket=d.cursor,d.find_among_b(c,44)&&(d.bra=d.cursor,g()&&(d.slice_del(),function(){var e;if(d.ket=d.cursor,(e=d.find_among_b(a,2))&&(d.bra=d.cursor,g()))switch(e){case 1:d.slice_from(Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,i,n;e.it=function(){this.pipeline.reset(),this.pipeline.add(e.it.trimmer,e.it.stopWordFilter,e.it.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.it.stemmer))},e.it.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.it.trimmer=e.trimmerSupport.generateTrimmer(e.it.wordCharacters),e.Pipeline.registerFunction(e.it.trimmer,"trimmer-it"),e.it.stemmer=(r=e.stemmerSupport.Among,i=e.stemmerSupport.SnowballProgram,n=new function(){var e,n,o,t=[new r("",-1,7),new r("qu",0,6),new r("á",0,1),new r("é",0,2),new r("í",0,3),new r("ó",0,4),new r("ú",0,5)],s=[new r("",-1,3),new r("I",0,1),new r("U",0,2)],a=[new r("la",-1,-1),new r("cela",0,-1),new r("gliela",0,-1),new r("mela",0,-1),new r("tela",0,-1),new r("vela",0,-1),new r("le",-1,-1),new r("cele",6,-1),new r("gliele",6,-1),new r("mele",6,-1),new r("tele",6,-1),new r("vele",6,-1),new r("ne",-1,-1),new r("cene",12,-1),new r("gliene",12,-1),new r("mene",12,-1),new r("sene",12,-1),new r("tene",12,-1),new r("vene",12,-1),new r("ci",-1,-1),new r("li",-1,-1),new r("celi",20,-1),new r("glieli",20,-1),new r("meli",20,-1),new r("teli",20,-1),new r("veli",20,-1),new r("gli",20,-1),new r("mi",-1,-1),new r("si",-1,-1),new r("ti",-1,-1),new r("vi",-1,-1),new r("lo",-1,-1),new r("celo",31,-1),new r("glielo",31,-1),new r("melo",31,-1),new r("telo",31,-1),new r("velo",31,-1)],u=[new r("ando",-1,1),new r("endo",-1,1),new r("ar",-1,2),new r("er",-1,2),new r("ir",-1,2)],c=[new r("ic",-1,-1),new r("abil",-1,-1),new r("os",-1,-1),new r("iv",-1,1)],w=[new r("ic",-1,1),new r("abil",-1,1),new r("iv",-1,1)],l=[new r("ica",-1,1),new r("logia",-1,3),new r("osa",-1,1),new r("ista",-1,1),new r("iva",-1,9),new r("anza",-1,1),new r("enza",-1,5),new r("ice",-1,1),new r("atrice",7,1),new r("iche",-1,1),new r("logie",-1,3),new r("abile",-1,1),new r("ibile",-1,1),new r("usione",-1,4),new r("azione",-1,2),new r("uzione",-1,4),new r("atore",-1,2),new r("ose",-1,1),new r("ante",-1,1),new r("mente",-1,1),new r("amente",19,7),new r("iste",-1,1),new r("ive",-1,9),new r("anze",-1,1),new r("enze",-1,5),new r("ici",-1,1),new r("atrici",25,1),new r("ichi",-1,1),new r("abili",-1,1),new r("ibili",-1,1),new r("ismi",-1,1),new r("usioni",-1,4),new r("azioni",-1,2),new r("uzioni",-1,4),new r("atori",-1,2),new r("osi",-1,1),new r("anti",-1,1),new r("amenti",-1,6),new r("imenti",-1,6),new r("isti",-1,1),new r("ivi",-1,9),new r("ico",-1,1),new r("ismo",-1,1),new r("oso",-1,1),new r("amento",-1,6),new r("imento",-1,6),new r("ivo",-1,9),new r("ità",-1,8),new r("istà",-1,1),new r("istè",-1,1),new r("istì",-1,1)],m=[new r("isca",-1,1),new r("enda",-1,1),new r("ata",-1,1),new r("ita",-1,1),new r("uta",-1,1),new r("ava",-1,1),new r("eva",-1,1),new r("iva",-1,1),new r("erebbe",-1,1),new r("irebbe",-1,1),new r("isce",-1,1),new r("ende",-1,1),new r("are",-1,1),new r("ere",-1,1),new r("ire",-1,1),new r("asse",-1,1),new r("ate",-1,1),new r("avate",16,1),new r("evate",16,1),new r("ivate",16,1),new r("ete",-1,1),new r("erete",20,1),new r("irete",20,1),new r("ite",-1,1),new r("ereste",-1,1),new r("ireste",-1,1),new r("ute",-1,1),new r("erai",-1,1),new r("irai",-1,1),new r("isci",-1,1),new r("endi",-1,1),new r("erei",-1,1),new r("irei",-1,1),new r("assi",-1,1),new r("ati",-1,1),new r("iti",-1,1),new r("eresti",-1,1),new r("iresti",-1,1),new r("uti",-1,1),new r("avi",-1,1),new r("evi",-1,1),new r("ivi",-1,1),new r("isco",-1,1),new r("ando",-1,1),new r("endo",-1,1),new r("Yamo",-1,1),new r("iamo",-1,1),new r("avamo",-1,1),new r("evamo",-1,1),new r("ivamo",-1,1),new r("eremo",-1,1),new r("iremo",-1,1),new r("assimo",-1,1),new r("ammo",-1,1),new r("emmo",-1,1),new r("eremmo",54,1),new r("iremmo",54,1),new r("immo",-1,1),new r("ano",-1,1),new r("iscano",58,1),new r("avano",58,1),new r("evano",58,1),new r("ivano",58,1),new r("eranno",-1,1),new r("iranno",-1,1),new r("ono",-1,1),new r("iscono",65,1),new r("arono",65,1),new r("erono",65,1),new r("irono",65,1),new r("erebbero",-1,1),new r("irebbero",-1,1),new r("assero",-1,1),new r("essero",-1,1),new r("issero",-1,1),new r("ato",-1,1),new r("ito",-1,1),new r("uto",-1,1),new r("avo",-1,1),new r("evo",-1,1),new r("ivo",-1,1),new r("ar",-1,1),new r("ir",-1,1),new r("erà",-1,1),new r("irà",-1,1),new r("erò",-1,1),new r("irò",-1,1)],f=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,128,128,8,2,1],v=[17,65,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,8,2],b=[17],d=new i;function _(e,r,i){return!(!d.eq_s(1,e)||(d.ket=d.cursor,!dLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r="2"==e.version[0];e.jp=function(){this.pipeline.reset(),this.pipeline.add(e.jp.stopWordFilter,e.jp.stemmer),r?this.tokenizer=e.jp.tokenizer:(e.tokenizer&&(e.tokenizer=e.jp.tokenizer),this.tokenizerFn&&(this.tokenizerFn=e.jp.tokenizer))};var t=new e.TinySegmenter;e.jp.tokenizer=function(n){if(!arguments.length||null==n||null==n)return[];if(Array.isArray(n))return n.map(function(t){return r?new e.Token(t.toLowerCase()):t.toLowerCase()});for(var i=n.toString().toLowerCase().replace(/^\s+/,""),o=i.length-1;o>=0;o--)if(/\S/.test(i.charAt(o))){i=i.substring(0,o+1);break}return t.segment(i).filter(function(e){return!!e}).map(function(t){return r?new e.Token(t):t})},e.jp.stemmer=function(e){return e},e.Pipeline.registerFunction(e.jp.stemmer,"stemmer-jp"),e.jp.wordCharacters="一二三四五六七八九十百千万億兆一-龠々〆ヵヶぁ-んァ-ヴーア-ン゙a-zA-Za-zA-Z0-90-9",e.jp.stopWordFilter=function(t){if(-1===e.jp.stopWordFilter.stopWords.indexOf(r?t.toString():t))return t},e.jp.stopWordFilter=e.generateStopWordFilter("これ それ あれ この その あの ここ そこ あそこ こちら どこ だれ なに なん 何 私 貴方 貴方方 我々 私達 あの人 あのかた 彼女 彼 です あります おります います は が の に を で え から まで より も どの と し それで しかし".split(" ")),e.Pipeline.registerFunction(e.jp.stopWordFilter,"stopWordFilter-jp")}});
|
||||
@@ -1 +0,0 @@
|
||||
!function(e,i){"function"==typeof define&&define.amd?define(i):"object"==typeof exports?module.exports=i():i()(e.lunr)}(this,function(){return function(e){e.multiLanguage=function(){for(var i=Array.prototype.slice.call(arguments),t=i.join("-"),r="",n=[],s=[],p=0;p<i.length;++p)"en"==i[p]?(r+="\\w",n.unshift(e.stopWordFilter),n.push(e.stemmer),s.push(e.stemmer)):(r+=e[i[p]].wordCharacters,n.unshift(e[i[p]].stopWordFilter),n.push(e[i[p]].stemmer),s.push(e[i[p]].stemmer));var o=e.trimmerSupport.generateTrimmer(r);return e.Pipeline.registerFunction(o,"lunr-multi-trimmer-"+t),n.unshift(o),function(){this.pipeline.reset(),this.pipeline.add.apply(this.pipeline,n),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add.apply(this.searchPipeline,s))}}}});
|
||||
@@ -1 +0,0 @@
|
||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,n,i;e.no=function(){this.pipeline.reset(),this.pipeline.add(e.no.trimmer,e.no.stopWordFilter,e.no.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.no.stemmer))},e.no.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.no.trimmer=e.trimmerSupport.generateTrimmer(e.no.wordCharacters),e.Pipeline.registerFunction(e.no.trimmer,"trimmer-no"),e.no.stemmer=(r=e.stemmerSupport.Among,n=e.stemmerSupport.SnowballProgram,i=new function(){var e,i,t=[new r("a",-1,1),new r("e",-1,1),new r("ede",1,1),new r("ande",1,1),new r("ende",1,1),new r("ane",1,1),new r("ene",1,1),new r("hetene",6,1),new r("erte",1,3),new r("en",-1,1),new r("heten",9,1),new r("ar",-1,1),new r("er",-1,1),new r("heter",12,1),new r("s",-1,2),new r("as",14,1),new r("es",14,1),new r("edes",16,1),new r("endes",16,1),new r("enes",16,1),new r("hetenes",19,1),new r("ens",14,1),new r("hetens",21,1),new r("ers",14,1),new r("ets",14,1),new r("et",-1,1),new r("het",25,1),new r("ert",-1,3),new r("ast",-1,1)],o=[new r("dt",-1,-1),new r("vt",-1,-1)],s=[new r("leg",-1,1),new r("eleg",0,1),new r("ig",-1,1),new r("eig",2,1),new r("lig",2,1),new r("elig",4,1),new r("els",-1,1),new r("lov",-1,1),new r("elov",7,1),new r("slov",7,1),new r("hetslov",9,1)],a=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],m=[119,125,149,1],l=new n;this.setCurrent=function(e){l.setCurrent(e)},this.getCurrent=function(){return l.getCurrent()},this.stem=function(){var r,n,u,d,c=l.cursor;return function(){var r,n=l.cursor+3;if(i=l.limit,0<=n||n<=l.limit){for(e=n;;){if(r=l.cursor,l.in_grouping(a,97,248)){l.cursor=r;break}if(r>=l.limit)return;l.cursor=r+1}for(;!l.out_grouping(a,97,248);){if(l.cursor>=l.limit)return;l.cursor++}(i=l.cursor)<e&&(i=e)}}(),l.limit_backward=c,l.cursor=l.limit,function(){var e,r,n;if(l.cursor>=i&&(r=l.limit_backward,l.limit_backward=i,l.ket=l.cursor,e=l.find_among_b(t,29),l.limit_backward=r,e))switch(l.bra=l.cursor,e){case 1:l.slice_del();break;case 2:n=l.limit-l.cursor,l.in_grouping_b(m,98,122)?l.slice_del():(l.cursor=l.limit-n,l.eq_s_b(1,"k")&&l.out_grouping_b(a,97,248)&&l.slice_del());break;case 3:l.slice_from("er")}}(),l.cursor=l.limit,n=l.limit-l.cursor,l.cursor>=i&&(r=l.limit_backward,l.limit_backward=i,l.ket=l.cursor,l.find_among_b(o,2)?(l.bra=l.cursor,l.limit_backward=r,l.cursor=l.limit-n,l.cursor>l.limit_backward&&(l.cursor--,l.bra=l.cursor,l.slice_del())):l.limit_backward=r),l.cursor=l.limit,l.cursor>=i&&(d=l.limit_backward,l.limit_backward=i,l.ket=l.cursor,(u=l.find_among_b(s,11))?(l.bra=l.cursor,l.limit_backward=d,1==u&&l.slice_del()):l.limit_backward=d),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}):(i.setCurrent(e),i.stem(),i.getCurrent())}),e.Pipeline.registerFunction(e.no.stemmer,"stemmer-no"),e.no.stopWordFilter=e.generateStopWordFilter("alle at av bare begge ble blei bli blir blitt både båe da de deg dei deim deira deires dem den denne der dere deres det dette di din disse ditt du dykk dykkar då eg ein eit eitt eller elles en enn er et ett etter for fordi fra før ha hadde han hans har hennar henne hennes her hjå ho hoe honom hoss hossen hun hva hvem hver hvilke hvilken hvis hvor hvordan hvorfor i ikke ikkje ikkje ingen ingi inkje inn inni ja jeg kan kom korleis korso kun kunne kva kvar kvarhelst kven kvi kvifor man mange me med medan meg meget mellom men mi min mine mitt mot mykje ned no noe noen noka noko nokon nokor nokre nå når og også om opp oss over på samme seg selv si si sia sidan siden sin sine sitt sjøl skal skulle slik so som som somme somt så sånn til um upp ut uten var vart varte ved vere verte vi vil ville vore vors vort vår være være vært å".split(" ")),e.Pipeline.registerFunction(e.no.stopWordFilter,"stopWordFilter-no")}});
|
||||
@@ -1 +0,0 @@
|
||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,s,n;e.pt=function(){this.pipeline.reset(),this.pipeline.add(e.pt.trimmer,e.pt.stopWordFilter,e.pt.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.pt.stemmer))},e.pt.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.pt.trimmer=e.trimmerSupport.generateTrimmer(e.pt.wordCharacters),e.Pipeline.registerFunction(e.pt.trimmer,"trimmer-pt"),e.pt.stemmer=(r=e.stemmerSupport.Among,s=e.stemmerSupport.SnowballProgram,n=new function(){var e,n,i,o=[new r("",-1,3),new r("ã",0,1),new r("õ",0,2)],a=[new r("",-1,3),new r("a~",0,1),new r("o~",0,2)],t=[new r("ic",-1,-1),new r("ad",-1,-1),new r("os",-1,-1),new r("iv",-1,1)],u=[new r("ante",-1,1),new r("avel",-1,1),new r("ível",-1,1)],w=[new r("ic",-1,1),new r("abil",-1,1),new r("iv",-1,1)],m=[new r("ica",-1,1),new r("ância",-1,1),new r("ência",-1,4),new r("ira",-1,9),new r("adora",-1,1),new r("osa",-1,1),new r("ista",-1,1),new r("iva",-1,8),new r("eza",-1,1),new r("logía",-1,2),new r("idade",-1,7),new r("ante",-1,1),new r("mente",-1,6),new r("amente",12,5),new r("ável",-1,1),new r("ível",-1,1),new r("ución",-1,3),new r("ico",-1,1),new r("ismo",-1,1),new r("oso",-1,1),new r("amento",-1,1),new r("imento",-1,1),new r("ivo",-1,8),new r("aça~o",-1,1),new r("ador",-1,1),new r("icas",-1,1),new r("ências",-1,4),new r("iras",-1,9),new r("adoras",-1,1),new r("osas",-1,1),new r("istas",-1,1),new r("ivas",-1,8),new r("ezas",-1,1),new r("logías",-1,2),new r("idades",-1,7),new r("uciones",-1,3),new r("adores",-1,1),new r("antes",-1,1),new r("aço~es",-1,1),new r("icos",-1,1),new r("ismos",-1,1),new r("osos",-1,1),new r("amentos",-1,1),new r("imentos",-1,1),new r("ivos",-1,8)],c=[new r("ada",-1,1),new r("ida",-1,1),new r("ia",-1,1),new r("aria",2,1),new r("eria",2,1),new r("iria",2,1),new r("ara",-1,1),new r("era",-1,1),new r("ira",-1,1),new r("ava",-1,1),new r("asse",-1,1),new r("esse",-1,1),new r("isse",-1,1),new r("aste",-1,1),new r("este",-1,1),new r("iste",-1,1),new r("ei",-1,1),new r("arei",16,1),new r("erei",16,1),new r("irei",16,1),new r("am",-1,1),new r("iam",20,1),new r("ariam",21,1),new r("eriam",21,1),new r("iriam",21,1),new r("aram",20,1),new r("eram",20,1),new r("iram",20,1),new r("avam",20,1),new r("em",-1,1),new r("arem",29,1),new r("erem",29,1),new r("irem",29,1),new r("assem",29,1),new r("essem",29,1),new r("issem",29,1),new r("ado",-1,1),new r("ido",-1,1),new r("ando",-1,1),new r("endo",-1,1),new r("indo",-1,1),new r("ara~o",-1,1),new r("era~o",-1,1),new r("ira~o",-1,1),new r("ar",-1,1),new r("er",-1,1),new r("ir",-1,1),new r("as",-1,1),new r("adas",47,1),new r("idas",47,1),new r("ias",47,1),new r("arias",50,1),new r("erias",50,1),new r("irias",50,1),new r("aras",47,1),new r("eras",47,1),new r("iras",47,1),new r("avas",47,1),new r("es",-1,1),new r("ardes",58,1),new r("erdes",58,1),new r("irdes",58,1),new r("ares",58,1),new r("eres",58,1),new r("ires",58,1),new r("asses",58,1),new r("esses",58,1),new r("isses",58,1),new r("astes",58,1),new r("estes",58,1),new r("istes",58,1),new r("is",-1,1),new r("ais",71,1),new r("eis",71,1),new r("areis",73,1),new r("ereis",73,1),new r("ireis",73,1),new r("áreis",73,1),new r("éreis",73,1),new r("íreis",73,1),new r("ásseis",73,1),new r("ésseis",73,1),new r("ísseis",73,1),new r("áveis",73,1),new r("íeis",73,1),new r("aríeis",84,1),new r("eríeis",84,1),new r("iríeis",84,1),new r("ados",-1,1),new r("idos",-1,1),new r("amos",-1,1),new r("áramos",90,1),new r("éramos",90,1),new r("íramos",90,1),new r("ávamos",90,1),new r("íamos",90,1),new r("aríamos",95,1),new r("eríamos",95,1),new r("iríamos",95,1),new r("emos",-1,1),new r("aremos",99,1),new r("eremos",99,1),new r("iremos",99,1),new r("ássemos",99,1),new r("êssemos",99,1),new r("íssemos",99,1),new r("imos",-1,1),new r("armos",-1,1),new r("ermos",-1,1),new r("irmos",-1,1),new r("ámos",-1,1),new r("arás",-1,1),new r("erás",-1,1),new r("irás",-1,1),new r("eu",-1,1),new r("iu",-1,1),new r("ou",-1,1),new r("ará",-1,1),new r("erá",-1,1),new r("irá",-1,1)],l=[new r("a",-1,1),new r("i",-1,1),new r("o",-1,1),new r("os",-1,1),new r("á",-1,1),new r("í",-1,1),new r("ó",-1,1)],f=[new r("e",-1,1),new r("ç",-1,2),new r("é",-1,1),new r("ê",-1,1)],d=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,3,19,12,2],v=new s;function p(){if(v.out_grouping(d,97,250)){for(;!v.in_grouping(d,97,250);){if(v.cursor>=v.limit)return!0;v.cursor++}return!1}return!0}function _(){var e,r,s=v.cursor;if(v.in_groupLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
!function(e,i){"function"==typeof define&&define.amd?define(i):"object"==typeof exports?module.exports=i():i()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var i,r,n;e.ro=function(){this.pipeline.reset(),this.pipeline.add(e.ro.trimmer,e.ro.stopWordFilter,e.ro.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.ro.stemmer))},e.ro.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.ro.trimmer=e.trimmerSupport.generateTrimmer(e.ro.wordCharacters),e.Pipeline.registerFunction(e.ro.trimmer,"trimmer-ro"),e.ro.stemmer=(i=e.stemmerSupport.Among,r=e.stemmerSupport.SnowballProgram,n=new function(){var e,n,t,a,o=[new i("",-1,3),new i("I",0,1),new i("U",0,2)],s=[new i("ea",-1,3),new i("aţia",-1,7),new i("aua",-1,2),new i("iua",-1,4),new i("aţie",-1,7),new i("ele",-1,3),new i("ile",-1,5),new i("iile",6,4),new i("iei",-1,4),new i("atei",-1,6),new i("ii",-1,4),new i("ului",-1,1),new i("ul",-1,1),new i("elor",-1,3),new i("ilor",-1,4),new i("iilor",14,4)],c=[new i("icala",-1,4),new i("iciva",-1,4),new i("ativa",-1,5),new i("itiva",-1,6),new i("icale",-1,4),new i("aţiune",-1,5),new i("iţiune",-1,6),new i("atoare",-1,5),new i("itoare",-1,6),new i("ătoare",-1,5),new i("icitate",-1,4),new i("abilitate",-1,1),new i("ibilitate",-1,2),new i("ivitate",-1,3),new i("icive",-1,4),new i("ative",-1,5),new i("itive",-1,6),new i("icali",-1,4),new i("atori",-1,5),new i("icatori",18,4),new i("itori",-1,6),new i("ători",-1,5),new i("icitati",-1,4),new i("abilitati",-1,1),new i("ivitati",-1,3),new i("icivi",-1,4),new i("ativi",-1,5),new i("itivi",-1,6),new i("icităi",-1,4),new i("abilităi",-1,1),new i("ivităi",-1,3),new i("icităţi",-1,4),new i("abilităţi",-1,1),new i("ivităţi",-1,3),new i("ical",-1,4),new i("ator",-1,5),new i("icator",35,4),new i("itor",-1,6),new i("ător",-1,5),new i("iciv",-1,4),new i("ativ",-1,5),new i("itiv",-1,6),new i("icală",-1,4),new i("icivă",-1,4),new i("ativă",-1,5),new i("itivă",-1,6)],u=[new i("ica",-1,1),new i("abila",-1,1),new i("ibila",-1,1),new i("oasa",-1,1),new i("ata",-1,1),new i("ita",-1,1),new i("anta",-1,1),new i("ista",-1,3),new i("uta",-1,1),new i("iva",-1,1),new i("ic",-1,1),new i("ice",-1,1),new i("abile",-1,1),new i("ibile",-1,1),new i("isme",-1,3),new i("iune",-1,2),new i("oase",-1,1),new i("ate",-1,1),new i("itate",17,1),new i("ite",-1,1),new i("ante",-1,1),new i("iste",-1,3),new i("ute",-1,1),new i("ive",-1,1),new i("ici",-1,1),new i("abili",-1,1),new i("ibili",-1,1),new i("iuni",-1,2),new i("atori",-1,1),new i("osi",-1,1),new i("ati",-1,1),new i("itati",30,1),new i("iti",-1,1),new i("anti",-1,1),new i("isti",-1,3),new i("uti",-1,1),new i("işti",-1,3),new i("ivi",-1,1),new i("ităi",-1,1),new i("oşi",-1,1),new i("ităţi",-1,1),new i("abil",-1,1),new i("ibil",-1,1),new i("ism",-1,3),new i("ator",-1,1),new i("os",-1,1),new i("at",-1,1),new i("it",-1,1),new i("ant",-1,1),new i("ist",-1,3),new i("ut",-1,1),new i("iv",-1,1),new i("ică",-1,1),new i("abilă",-1,1),new i("ibilă",-1,1),new i("oasă",-1,1),new i("ată",-1,1),new i("ită",-1,1),new i("antă",-1,1),new i("istă",-1,3),new i("ută",-1,1),new i("ivă",-1,1)],w=[new i("ea",-1,1),new i("ia",-1,1),new i("esc",-1,1),new i("ăsc",-1,1),new i("ind",-1,1),new i("ând",-1,1),new i("are",-1,1),new i("ere",-1,1),new i("ire",-1,1),new i("âre",-1,1),new i("se",-1,2),new i("ase",10,1),new i("sese",10,2),new i("ise",10,1),new i("use",10,1),new i("âse",10,1),new i("eşte",-1,1),new i("ăşte",-1,1),new i("eze",-1,1),new i("ai",-1,1),new i("eai",19,1),new i("iai",19,1),new i("sei",-1,2),new i("eşti",-1,1),new i("ăşti",-1,1),new i("ui",-1,1),new i("ezi",-1,1),new i("âi",-1,1),new i("aşi",-1,1),new i("seşi",-1,2),new i("aseşi",29,1),new i("seseşi",29,2),new i("iseşi",29,1),new i("useşi",29,1),new i("âseşi",29,1),new i("işi",-1,1),new i("uşi",-1,1),new i("âşi",-1,1),new i("aţi",-1,2),new i("eaţi",38,1),new i("iaţi",38,1),new i("eţi",-1,2),new i("iţi",-1,2),new i("âţi",-1,2),new i("arăţi",-1,1),new i("serăţi",-1,2),new i("aserăţi",45,1),new i("seserăţi",45,2),new i("iserăţi",45,1),new i("userăţi",45,1),new i("âserăţi",45,1),new i("irăţi",-1,1),new i("urăţi",-1,1),new i("ârăţi",-1,1),new i("am",-1,1),new i("eam",54,1),new i("iam",54,1),new i("em",-1,2),new i("asem",57,1),new i("sesem",57,2),new i("isem",57,1),new i("usem",57,1),new i("âsem",57,1),new i("im",-1,2),new i("âm",-1,2),new i("ăm",-1,2),new i("arăm",65,1),new i("serăm",65,2),new i("aserăm",67,1),new i("seserăm",67,2),new i("iserăm",67,1),new i("userăm",67,1),new i("âserăm",67,1),new i("irăm",65,1),newLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
!function(e,n){"function"==typeof define&&define.amd?define(n):"object"==typeof exports?module.exports=n():n()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var n,r,t;e.ru=function(){this.pipeline.reset(),this.pipeline.add(e.ru.trimmer,e.ru.stopWordFilter,e.ru.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.ru.stemmer))},e.ru.wordCharacters="Ѐ-҄҇-ԯᴫᵸⷠ-ⷿꙀ-ꚟ︮︯",e.ru.trimmer=e.trimmerSupport.generateTrimmer(e.ru.wordCharacters),e.Pipeline.registerFunction(e.ru.trimmer,"trimmer-ru"),e.ru.stemmer=(n=e.stemmerSupport.Among,r=e.stemmerSupport.SnowballProgram,t=new function(){var e,t,w=[new n("в",-1,1),new n("ив",0,2),new n("ыв",0,2),new n("вши",-1,1),new n("ивши",3,2),new n("ывши",3,2),new n("вшись",-1,1),new n("ившись",6,2),new n("ывшись",6,2)],i=[new n("ее",-1,1),new n("ие",-1,1),new n("ое",-1,1),new n("ые",-1,1),new n("ими",-1,1),new n("ыми",-1,1),new n("ей",-1,1),new n("ий",-1,1),new n("ой",-1,1),new n("ый",-1,1),new n("ем",-1,1),new n("им",-1,1),new n("ом",-1,1),new n("ым",-1,1),new n("его",-1,1),new n("ого",-1,1),new n("ему",-1,1),new n("ому",-1,1),new n("их",-1,1),new n("ых",-1,1),new n("ею",-1,1),new n("ою",-1,1),new n("ую",-1,1),new n("юю",-1,1),new n("ая",-1,1),new n("яя",-1,1)],u=[new n("ем",-1,1),new n("нн",-1,1),new n("вш",-1,1),new n("ивш",2,2),new n("ывш",2,2),new n("щ",-1,1),new n("ющ",5,1),new n("ующ",6,2)],s=[new n("сь",-1,1),new n("ся",-1,1)],o=[new n("ла",-1,1),new n("ила",0,2),new n("ыла",0,2),new n("на",-1,1),new n("ена",3,2),new n("ете",-1,1),new n("ите",-1,2),new n("йте",-1,1),new n("ейте",7,2),new n("уйте",7,2),new n("ли",-1,1),new n("или",10,2),new n("ыли",10,2),new n("й",-1,1),new n("ей",13,2),new n("уй",13,2),new n("л",-1,1),new n("ил",16,2),new n("ыл",16,2),new n("ем",-1,1),new n("им",-1,2),new n("ым",-1,2),new n("н",-1,1),new n("ен",22,2),new n("ло",-1,1),new n("ило",24,2),new n("ыло",24,2),new n("но",-1,1),new n("ено",27,2),new n("нно",27,1),new n("ет",-1,1),new n("ует",30,2),new n("ит",-1,2),new n("ыт",-1,2),new n("ют",-1,1),new n("уют",34,2),new n("ят",-1,2),new n("ны",-1,1),new n("ены",37,2),new n("ть",-1,1),new n("ить",39,2),new n("ыть",39,2),new n("ешь",-1,1),new n("ишь",-1,2),new n("ю",-1,2),new n("ую",44,2)],c=[new n("а",-1,1),new n("ев",-1,1),new n("ов",-1,1),new n("е",-1,1),new n("ие",3,1),new n("ье",3,1),new n("и",-1,1),new n("еи",6,1),new n("ии",6,1),new n("ами",6,1),new n("ями",6,1),new n("иями",10,1),new n("й",-1,1),new n("ей",12,1),new n("ией",13,1),new n("ий",12,1),new n("ой",12,1),new n("ам",-1,1),new n("ем",-1,1),new n("ием",18,1),new n("ом",-1,1),new n("ям",-1,1),new n("иям",21,1),new n("о",-1,1),new n("у",-1,1),new n("ах",-1,1),new n("ях",-1,1),new n("иях",26,1),new n("ы",-1,1),new n("ь",-1,1),new n("ю",-1,1),new n("ию",30,1),new n("ью",30,1),new n("я",-1,1),new n("ия",33,1),new n("ья",33,1)],m=[new n("ост",-1,1),new n("ость",-1,1)],l=[new n("ейше",-1,1),new n("н",-1,2),new n("ейш",-1,1),new n("ь",-1,3)],f=[33,65,8,232],a=new r;function p(){for(;!a.in_grouping(f,1072,1103);){if(a.cursor>=a.limit)return!1;a.cursor++}return!0}function d(){for(;!a.out_grouping(f,1072,1103);){if(a.cursor>=a.limit)return!1;a.cursor++}return!0}function _(e,n){var r,t;if(a.ket=a.cursor,r=a.find_among_b(e,n)){switch(a.bra=a.cursor,r){case 1:if(t=a.limit-a.cursor,!a.eq_s_b(1,"а")&&(a.cursor=a.limit-t,!a.eq_s_b(1,"я")))return!1;case 2:a.slice_del()}return!0}return!1}function b(e,n){var r;return a.ket=a.cursor,!!(r=a.find_among_b(e,n))&&(a.bra=a.cursor,1==r&&a.slice_del(),!0)}function h(){return!!b(i,26)&&(_(u,8),!0)}function g(){var n;a.ket=a.cursor,(n=a.find_among_b(m,2))&&(a.bra=a.cursor,e<=a.cursor&&1==n&&a.slice_del())}this.setCurrent=function(e){a.setCurrent(e)},this.getCurrent=function(){return a.getCurrent()},this.stem=function(){return t=a.limit,e=t,p()&&(t=a.cursor,d()&&p()&&d()&&(e=a.cursor)),a.cursor=a.limit,!(a.cursor<t)&&(a.limit_backward=t,_(w,9)||(a.cursor=a.limit,b(s,2)||(a.cursor=a.limit),h()||(a.cursor=a.limit,_(o,46)||(a.cursor=a.limit,b(c,36)))),a.cursor=a.limit,a.ket=a.cursor,a.eq_s_b(1,"и")?(a.bra=a.cursor,a.slice_del()):a.cursor=a.limit,g(),a.cursor=a.limit,function(){var e;if(a.ket=a.cursor,e=a.find_among_b(l,4))switch(a.bra=a.cursor,e){case 1:if(a.slice_del(),a.ket=a.cursor,!a.eq_s_b(1,"н"))break;a.bra=a.cursor;case 2:if(!a.eq_s_b(1,"н"))break;case 3:a.slice_del()}}(),!0)}},function(e){return"function"==typeof e.update?e.update(function(e){return t.setCLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
!function(r,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(r.lunr)}(this,function(){return function(r){r.stemmerSupport={Among:function(r,t,i,s){if(this.toCharArray=function(r){for(var t=r.length,i=new Array(t),s=0;s<t;s++)i[s]=r.charCodeAt(s);return i},!r&&""!=r||!t&&0!=t||!i)throw"Bad Among initialisation: s:"+r+", substring_i: "+t+", result: "+i;this.s_size=r.length,this.s=this.toCharArray(r),this.substring_i=t,this.result=i,this.method=s},SnowballProgram:function(){var r;return{bra:0,ket:0,limit:0,cursor:0,limit_backward:0,setCurrent:function(t){r=t,this.cursor=0,this.limit=t.length,this.limit_backward=0,this.bra=this.cursor,this.ket=this.limit},getCurrent:function(){var t=r;return r=null,t},in_grouping:function(t,i,s){if(this.cursor<this.limit){var e=r.charCodeAt(this.cursor);if(e<=s&&e>=i&&t[(e-=i)>>3]&1<<(7&e))return this.cursor++,!0}return!1},in_grouping_b:function(t,i,s){if(this.cursor>this.limit_backward){var e=r.charCodeAt(this.cursor-1);if(e<=s&&e>=i&&t[(e-=i)>>3]&1<<(7&e))return this.cursor--,!0}return!1},out_grouping:function(t,i,s){if(this.cursor<this.limit){var e=r.charCodeAt(this.cursor);if(e>s||e<i)return this.cursor++,!0;if(!(t[(e-=i)>>3]&1<<(7&e)))return this.cursor++,!0}return!1},out_grouping_b:function(t,i,s){if(this.cursor>this.limit_backward){var e=r.charCodeAt(this.cursor-1);if(e>s||e<i)return this.cursor--,!0;if(!(t[(e-=i)>>3]&1<<(7&e)))return this.cursor--,!0}return!1},eq_s:function(t,i){if(this.limit-this.cursor<t)return!1;for(var s=0;s<t;s++)if(r.charCodeAt(this.cursor+s)!=i.charCodeAt(s))return!1;return this.cursor+=t,!0},eq_s_b:function(t,i){if(this.cursor-this.limit_backward<t)return!1;for(var s=0;s<t;s++)if(r.charCodeAt(this.cursor-t+s)!=i.charCodeAt(s))return!1;return this.cursor-=t,!0},find_among:function(t,i){for(var s=0,e=i,n=this.cursor,u=this.limit,o=0,h=0,c=!1;;){for(var a=s+(e-s>>1),f=0,l=o<h?o:h,_=t[a],m=l;m<_.s_size;m++){if(n+l==u){f=-1;break}if(f=r.charCodeAt(n+l)-_.s[m])break;l++}if(f<0?(e=a,h=l):(s=a,o=l),e-s<=1){if(s>0||e==s||c)break;c=!0}}for(;;){if(o>=(_=t[s]).s_size){if(this.cursor=n+_.s_size,!_.method)return _.result;var b=_.method();if(this.cursor=n+_.s_size,b)return _.result}if((s=_.substring_i)<0)return 0}},find_among_b:function(t,i){for(var s=0,e=i,n=this.cursor,u=this.limit_backward,o=0,h=0,c=!1;;){for(var a=s+(e-s>>1),f=0,l=o<h?o:h,_=(m=t[a]).s_size-1-l;_>=0;_--){if(n-l==u){f=-1;break}if(f=r.charCodeAt(n-1-l)-m.s[_])break;l++}if(f<0?(e=a,h=l):(s=a,o=l),e-s<=1){if(s>0||e==s||c)break;c=!0}}for(;;){var m;if(o>=(m=t[s]).s_size){if(this.cursor=n-m.s_size,!m.method)return m.result;var b=m.method();if(this.cursor=n-m.s_size,b)return m.result}if((s=m.substring_i)<0)return 0}},replace_s:function(t,i,s){var e=s.length-(i-t),n=r.substring(0,t),u=r.substring(i);return r=n+s+u,this.limit+=e,this.cursor>=i?this.cursor+=e:this.cursor>t&&(this.cursor=t),e},slice_check:function(){if(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>r.length)throw"faulty slice operation"},slice_from:function(r){this.slice_check(),this.replace_s(this.bra,this.ket,r)},slice_del:function(){this.slice_from("")},insert:function(r,t,i){var s=this.replace_s(r,t,i);r<=this.bra&&(this.bra+=s),r<=this.ket&&(this.ket+=s)},slice_to:function(){return this.slice_check(),r.substring(this.bra,this.ket)},eq_v_b:function(r){return this.eq_s_b(r.length,r)}}}},r.trimmerSupport={generateTrimmer:function(r){var t=new RegExp("^[^"+r+"]+"),i=new RegExp("[^"+r+"]+$");return function(r){return"function"==typeof r.update?r.update(function(r){return r.replace(t,"").replace(i,"")}):r.replace(t,"").replace(i,"")}}}}});
|
||||
@@ -1 +0,0 @@
|
||||
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,n,t;e.sv=function(){this.pipeline.reset(),this.pipeline.add(e.sv.trimmer,e.sv.stopWordFilter,e.sv.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.sv.stemmer))},e.sv.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.sv.trimmer=e.trimmerSupport.generateTrimmer(e.sv.wordCharacters),e.Pipeline.registerFunction(e.sv.trimmer,"trimmer-sv"),e.sv.stemmer=(r=e.stemmerSupport.Among,n=e.stemmerSupport.SnowballProgram,t=new function(){var e,t,i=[new r("a",-1,1),new r("arna",0,1),new r("erna",0,1),new r("heterna",2,1),new r("orna",0,1),new r("ad",-1,1),new r("e",-1,1),new r("ade",6,1),new r("ande",6,1),new r("arne",6,1),new r("are",6,1),new r("aste",6,1),new r("en",-1,1),new r("anden",12,1),new r("aren",12,1),new r("heten",12,1),new r("ern",-1,1),new r("ar",-1,1),new r("er",-1,1),new r("heter",18,1),new r("or",-1,1),new r("s",-1,2),new r("as",21,1),new r("arnas",22,1),new r("ernas",22,1),new r("ornas",22,1),new r("es",21,1),new r("ades",26,1),new r("andes",26,1),new r("ens",21,1),new r("arens",29,1),new r("hetens",29,1),new r("erns",21,1),new r("at",-1,1),new r("andet",-1,1),new r("het",-1,1),new r("ast",-1,1)],s=[new r("dd",-1,-1),new r("gd",-1,-1),new r("nn",-1,-1),new r("dt",-1,-1),new r("gt",-1,-1),new r("kt",-1,-1),new r("tt",-1,-1)],a=[new r("ig",-1,1),new r("lig",0,1),new r("els",-1,1),new r("fullt",-1,3),new r("löst",-1,2)],o=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,24,0,32],u=[119,127,149],m=new n;this.setCurrent=function(e){m.setCurrent(e)},this.getCurrent=function(){return m.getCurrent()},this.stem=function(){var r,n=m.cursor;return function(){var r,n=m.cursor+3;if(t=m.limit,0<=n||n<=m.limit){for(e=n;;){if(r=m.cursor,m.in_grouping(o,97,246)){m.cursor=r;break}if(m.cursor=r,m.cursor>=m.limit)return;m.cursor++}for(;!m.out_grouping(o,97,246);){if(m.cursor>=m.limit)return;m.cursor++}(t=m.cursor)<e&&(t=e)}}(),m.limit_backward=n,m.cursor=m.limit,function(){var e,r=m.limit_backward;if(m.cursor>=t&&(m.limit_backward=t,m.cursor=m.limit,m.ket=m.cursor,e=m.find_among_b(i,37),m.limit_backward=r,e))switch(m.bra=m.cursor,e){case 1:m.slice_del();break;case 2:m.in_grouping_b(u,98,121)&&m.slice_del()}}(),m.cursor=m.limit,r=m.limit_backward,m.cursor>=t&&(m.limit_backward=t,m.cursor=m.limit,m.find_among_b(s,7)&&(m.cursor=m.limit,m.ket=m.cursor,m.cursor>m.limit_backward&&(m.bra=--m.cursor,m.slice_del())),m.limit_backward=r),m.cursor=m.limit,function(){var e,r;if(m.cursor>=t){if(r=m.limit_backward,m.limit_backward=t,m.cursor=m.limit,m.ket=m.cursor,e=m.find_among_b(a,5))switch(m.bra=m.cursor,e){case 1:m.slice_del();break;case 2:m.slice_from("lös");break;case 3:m.slice_from("full")}m.limit_backward=r}}(),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return t.setCurrent(e),t.stem(),t.getCurrent()}):(t.setCurrent(e),t.stem(),t.getCurrent())}),e.Pipeline.registerFunction(e.sv.stemmer,"stemmer-sv"),e.sv.stopWordFilter=e.generateStopWordFilter("alla allt att av blev bli blir blivit de dem den denna deras dess dessa det detta dig din dina ditt du där då efter ej eller en er era ert ett från för ha hade han hans har henne hennes hon honom hur här i icke ingen inom inte jag ju kan kunde man med mellan men mig min mina mitt mot mycket ni nu när någon något några och om oss på samma sedan sig sin sina sitta själv skulle som så sådan sådana sådant till under upp ut utan vad var vara varför varit varje vars vart vem vi vid vilka vilkas vilken vilket vår våra vårt än är åt över".split(" ")),e.Pipeline.registerFunction(e.sv.stopWordFilter,"stopWordFilter-sv")}});
|
||||
@@ -1 +0,0 @@
|
||||
!function(r,i){"function"==typeof define&&define.amd?define(i):"object"==typeof exports?module.exports=i():i()(r.lunr)}(this,function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var i,e,n;r.tr=function(){this.pipeline.reset(),this.pipeline.add(r.tr.trimmer,r.tr.stopWordFilter,r.tr.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(r.tr.stemmer))},r.tr.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",r.tr.trimmer=r.trimmerSupport.generateTrimmer(r.tr.wordCharacters),r.Pipeline.registerFunction(r.tr.trimmer,"trimmer-tr"),r.tr.stemmer=(i=r.stemmerSupport.Among,e=r.stemmerSupport.SnowballProgram,n=new function(){var r,n=[new i("m",-1,-1),new i("n",-1,-1),new i("miz",-1,-1),new i("niz",-1,-1),new i("muz",-1,-1),new i("nuz",-1,-1),new i("müz",-1,-1),new i("nüz",-1,-1),new i("mız",-1,-1),new i("nız",-1,-1)],t=[new i("leri",-1,-1),new i("ları",-1,-1)],u=[new i("ni",-1,-1),new i("nu",-1,-1),new i("nü",-1,-1),new i("nı",-1,-1)],o=[new i("in",-1,-1),new i("un",-1,-1),new i("ün",-1,-1),new i("ın",-1,-1)],s=[new i("a",-1,-1),new i("e",-1,-1)],c=[new i("na",-1,-1),new i("ne",-1,-1)],l=[new i("da",-1,-1),new i("ta",-1,-1),new i("de",-1,-1),new i("te",-1,-1)],a=[new i("nda",-1,-1),new i("nde",-1,-1)],m=[new i("dan",-1,-1),new i("tan",-1,-1),new i("den",-1,-1),new i("ten",-1,-1)],d=[new i("ndan",-1,-1),new i("nden",-1,-1)],f=[new i("la",-1,-1),new i("le",-1,-1)],b=[new i("ca",-1,-1),new i("ce",-1,-1)],w=[new i("im",-1,-1),new i("um",-1,-1),new i("üm",-1,-1),new i("ım",-1,-1)],_=[new i("sin",-1,-1),new i("sun",-1,-1),new i("sün",-1,-1),new i("sın",-1,-1)],k=[new i("iz",-1,-1),new i("uz",-1,-1),new i("üz",-1,-1),new i("ız",-1,-1)],p=[new i("siniz",-1,-1),new i("sunuz",-1,-1),new i("sünüz",-1,-1),new i("sınız",-1,-1)],g=[new i("lar",-1,-1),new i("ler",-1,-1)],y=[new i("niz",-1,-1),new i("nuz",-1,-1),new i("nüz",-1,-1),new i("nız",-1,-1)],z=[new i("dir",-1,-1),new i("tir",-1,-1),new i("dur",-1,-1),new i("tur",-1,-1),new i("dür",-1,-1),new i("tür",-1,-1),new i("dır",-1,-1),new i("tır",-1,-1)],h=[new i("casına",-1,-1),new i("cesine",-1,-1)],v=[new i("di",-1,-1),new i("ti",-1,-1),new i("dik",-1,-1),new i("tik",-1,-1),new i("duk",-1,-1),new i("tuk",-1,-1),new i("dük",-1,-1),new i("tük",-1,-1),new i("dık",-1,-1),new i("tık",-1,-1),new i("dim",-1,-1),new i("tim",-1,-1),new i("dum",-1,-1),new i("tum",-1,-1),new i("düm",-1,-1),new i("tüm",-1,-1),new i("dım",-1,-1),new i("tım",-1,-1),new i("din",-1,-1),new i("tin",-1,-1),new i("dun",-1,-1),new i("tun",-1,-1),new i("dün",-1,-1),new i("tün",-1,-1),new i("dın",-1,-1),new i("tın",-1,-1),new i("du",-1,-1),new i("tu",-1,-1),new i("dü",-1,-1),new i("tü",-1,-1),new i("dı",-1,-1),new i("tı",-1,-1)],q=[new i("sa",-1,-1),new i("se",-1,-1),new i("sak",-1,-1),new i("sek",-1,-1),new i("sam",-1,-1),new i("sem",-1,-1),new i("san",-1,-1),new i("sen",-1,-1)],C=[new i("miş",-1,-1),new i("muş",-1,-1),new i("müş",-1,-1),new i("mış",-1,-1)],P=[new i("b",-1,1),new i("c",-1,2),new i("d",-1,3),new i("ğ",-1,4)],F=[17,65,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,8,0,0,0,0,0,0,1],S=[1,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,1],W=[65],L=[65],x=[["a",[1,64,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],97,305],["e",[17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130],101,252],["ı",[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],97,305],["i",[17],101,105],["o",W,111,117],["ö",L,246,252],["u",W,111,117]],A=new e;function E(r,i,e){for(;;){var n=A.limit-A.cursor;if(A.in_grouping_b(r,i,e)){A.cursor=A.limit-n;break}if(A.cursor=A.limit-n,A.cursor<=A.limit_backward)return!1;A.cursor--}return!0}function j(){var r,i;r=A.limit-A.cursor,E(F,97,305);for(var e=0;e<x.length;e++){i=A.limit-A.cursor;var n=x[e];if(A.eq_s_b(1,n[0])&&E(n[1],n[2],n[3]))return A.cursor=A.limit-r,!0;A.cursor=A.limit-i}return A.cursor=A.limit-i,!(!A.eq_s_b(1,"ü")||!E(L,246,252))&&(A.cursor=A.limit-r,!0)}function T(r,i){var e,n=A.limit-A.cursor;return r()&&(A.cursor=A.limit-n,A.cursor>A.limit_backward&&(A.cursor--,e=A.limit-A.cursor,i()))?(A.cursor=A.limit-e,!0):(A.cursor=A.limit-n,r()?(A.cursor=A.limit-n,!1):(A.cursor=A.limit-n,!(A.cursor<=A.limit_backward)&&(A.cursor--,!!i()&&(A.cursor=A.limit-n,!0))))}function Z(r){return T(r,function(){return A.in_grouping_b(F,97,305)})}function B(){return Z(function(){return A.eq_s_b(1,"n")})}function D(){return Z(function(){return A.eq_s_b(1,"y")})}function G(){return A.find_among_b(n,10)&&T(function(){return A.in_grouping_b(S,105,305)},function(){return A.out_grouping_b(F,97,305)})}function H(){return j()&&A.in_grouping_b(S,105,305)&&Z(function(){return A.eq_sLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
!function(_,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(_.lunr)}(this,function(){return function(_){function t(){var _={"[一二三四五六七八九十百千万億兆]":"M","[一-龠々〆ヵヶ]":"H","[ぁ-ん]":"I","[ァ-ヴーア-ン゙ー]":"K","[a-zA-Za-zA-Z]":"A","[0-90-9]":"N"};for(var t in this.chartype_=[],_){var H=new RegExp;H.compile(t),this.chartype_.push([H,_[t]])}return this.BIAS__=-332,this.BC1__={HH:6,II:2461,KH:406,OH:-1378},this.BC2__={AA:-3267,AI:2744,AN:-878,HH:-4070,HM:-1711,HN:4012,HO:3761,IA:1327,IH:-1184,II:-1332,IK:1721,IO:5492,KI:3831,KK:-8741,MH:-3132,MK:3334,OO:-2920},this.BC3__={HH:996,HI:626,HK:-721,HN:-1307,HO:-836,IH:-301,KK:2762,MK:1079,MM:4034,OA:-1652,OH:266},this.BP1__={BB:295,OB:304,OO:-125,UB:352},this.BP2__={BO:60,OO:-1762},this.BQ1__={BHH:1150,BHM:1521,BII:-1158,BIM:886,BMH:1208,BNH:449,BOH:-91,BOO:-2597,OHI:451,OIH:-296,OKA:1851,OKH:-1020,OKK:904,OOO:2965},this.BQ2__={BHH:118,BHI:-1159,BHM:466,BIH:-919,BKK:-1720,BKO:864,OHH:-1139,OHM:-181,OIH:153,UHI:-1146},this.BQ3__={BHH:-792,BHI:2664,BII:-299,BKI:419,BMH:937,BMM:8335,BNN:998,BOH:775,OHH:2174,OHM:439,OII:280,OKH:1798,OKI:-793,OKO:-2242,OMH:-2402,OOO:11699},this.BQ4__={BHH:-3895,BIH:3761,BII:-4654,BIK:1348,BKK:-1806,BMI:-3385,BOO:-12396,OAH:926,OHH:266,OHK:-2036,ONN:-973},this.BW1__={",と":660,",同":727,"B1あ":1404,"B1同":542,"、と":660,"、同":727,"」と":1682,"あっ":1505,"いう":1743,"いっ":-2055,"いる":672,"うし":-4817,"うん":665,"から":3472,"がら":600,"こう":-790,"こと":2083,"こん":-1262,"さら":-4143,"さん":4573,"した":2641,"して":1104,"すで":-3399,"そこ":1977,"それ":-871,"たち":1122,"ため":601,"った":3463,"つい":-802,"てい":805,"てき":1249,"でき":1127,"です":3445,"では":844,"とい":-4915,"とみ":1922,"どこ":3887,"ない":5713,"なっ":3015,"など":7379,"なん":-1113,"にし":2468,"には":1498,"にも":1671,"に対":-912,"の一":-501,"の中":741,"ませ":2448,"まで":1711,"まま":2600,"まる":-2155,"やむ":-1947,"よっ":-2565,"れた":2369,"れで":-913,"をし":1860,"を見":731,"亡く":-1886,"京都":2558,"取り":-2784,"大き":-2604,"大阪":1497,"平方":-2314,"引き":-1336,"日本":-195,"本当":-2423,"毎日":-2113,"目指":-724,"B1あ":1404,"B1同":542,"」と":1682},this.BW2__={"..":-11822,11:-669,"――":-5730,"−−":-13175,"いう":-1609,"うか":2490,"かし":-1350,"かも":-602,"から":-7194,"かれ":4612,"がい":853,"がら":-3198,"きた":1941,"くな":-1597,"こと":-8392,"この":-4193,"させ":4533,"され":13168,"さん":-3977,"しい":-1819,"しか":-545,"した":5078,"して":972,"しな":939,"その":-3744,"たい":-1253,"たた":-662,"ただ":-3857,"たち":-786,"たと":1224,"たは":-939,"った":4589,"って":1647,"っと":-2094,"てい":6144,"てき":3640,"てく":2551,"ては":-3110,"ても":-3065,"でい":2666,"でき":-1528,"でし":-3828,"です":-4761,"でも":-4203,"とい":1890,"とこ":-1746,"とと":-2279,"との":720,"とみ":5168,"とも":-3941,"ない":-2488,"なが":-1313,"など":-6509,"なの":2614,"なん":3099,"にお":-1615,"にし":2748,"にな":2454,"によ":-7236,"に対":-14943,"に従":-4688,"に関":-11388,"のか":2093,"ので":-7059,"のに":-6041,"のの":-6125,"はい":1073,"はが":-1033,"はず":-2532,"ばれ":1813,"まし":-1316,"まで":-6621,"まれ":5409,"めて":-3153,"もい":2230,"もの":-10713,"らか":-944,"らし":-1611,"らに":-1897,"りし":651,"りま":1620,"れた":4270,"れて":849,"れば":4114,"ろう":6067,"われ":7901,"を通":-11877,"んだ":728,"んな":-4115,"一人":602,"一方":-1375,"一日":970,"一部":-1051,"上が":-4479,"会社":-1116,"出て":2163,"分の":-7758,"同党":970,"同日":-913,"大阪":-2471,"委員":-1250,"少な":-1050,"年度":-8669,"年間":-1626,"府県":-2363,"手権":-1982,"新聞":-4066,"日新":-722,"日本":-7068,"日米":3372,"曜日":-601,"朝鮮":-2355,"本人":-2697,"東京":-1543,"然と":-1384,"社会":-1276,"立て":-990,"第に":-1612,"米国":-4268,"11":-669},this.BW3__={"あた":-2194,"あり":719,"ある":3846,"い.":-1185,"い。":-1185,"いい":5308,"いえ":2079,"いく":3029,"いた":2056,"いっ":1883,"いる":5600,"いわ":1527,"うち":1117,"うと":4798,"えと":1454,"か.":2857,"か。":2857,"かけ":-743,"かっ":-4098,"かに":-669,"から":6520,"かり":-2670,"が,":1816,"が、":1816,"がき":-4855,"がけ":-1127,"がっ":-913,"がら":-4977,"がり":-2064,"きた":1645,"けど":1374,"こと":7397,"この":1542,"ころ":-2757,"さい":-714,"さを":976,"し,":1557,"し、":1557,"しい":-3714,"した":3562,"して":1449,"しな":2608,"しま":1200,"す.":-1310,"す。":-1310,"する":6521,"ず,":3426,"ず、":3426,"ずに":841,"そう":428,"た.":8875,"た。":8875,"たい":-594,"たの":812,"たり":-1183,"たる":-853,"だ.":4098,"だ。":4098,"だっ":1004,"った":-4748,"って":300,"てい":6240,"てお":855,"てLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}({4:function(e,t,n){"use strict";n(5)},5:function(e,t){!function(t){!function(e,t,n){function r(e,t){return typeof e===t}function o(e){var t=_.className,n=C._config.classPrefix||"";if(T&&(t=t.baseVal),C._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}C._config.enableClasses&&(t+=" "+n+e.join(" "+n),T?_.className.baseVal=t:_.className=t)}function i(e,t){if("object"==typeof e)for(var n in e)b(e,n)&&i(n,e[n]);else{e=e.toLowerCase();var r=e.split("."),s=C[r[0]];if(2==r.length&&(s=s[r[1]]),void 0!==s)return C;t="function"==typeof t?t():t,1==r.length?C[r[0]]=t:(!C[r[0]]||C[r[0]]instanceof Boolean||(C[r[0]]=new Boolean(C[r[0]])),C[r[0]][r[1]]=t),o([(t&&0!=t?"":"no-")+r.join("-")]),C._trigger(e,t)}return C}function s(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):T?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function a(){var e=t.body;return e||(e=s(T?"svg":"body"),e.fake=!0),e}function u(e,n,r,o){var i,u,l,f,c="modernizr",d=s("div"),p=a();if(parseInt(r,10))for(;r--;)l=s("div"),l.id=o?o[r]:c+(r+1),d.appendChild(l);return i=s("style"),i.type="text/css",i.id="s"+c,(p.fake?p:d).appendChild(i),p.appendChild(d),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(t.createTextNode(e)),d.id=c,p.fake&&(p.style.background="",p.style.overflow="hidden",f=_.style.overflow,_.style.overflow="hidden",_.appendChild(p)),u=n(d,e),p.fake?(p.parentNode.removeChild(p),_.style.overflow=f,_.offsetHeight):d.parentNode.removeChild(d),!!u}function l(e,t){return!!~(""+e).indexOf(t)}function f(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function c(t,n,r){var o;if("getComputedStyle"in e){o=getComputedStyle.call(e,t,n);var i=e.console;if(null!==o)r&&(o=o.getPropertyValue(r));else if(i){var s=i.error?"error":"log";i[s].call(i,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}}else o=!n&&t.currentStyle&&t.currentStyle[r];return o}function d(t,r){var o=t.length;if("CSS"in e&&"supports"in e.CSS){for(;o--;)if(e.CSS.supports(f(t[o]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var i=[];o--;)i.push("("+f(t[o])+":"+r+")");return i=i.join(" or "),u("@supports ("+i+") { #modernizr { position: absolute; } }",function(e){return"absolute"==c(e,null,"position")})}return n}function p(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function h(e,t,o,i){function a(){f&&(delete j.style,delete j.modElem)}if(i=!r(i,"undefined")&&i,!r(o,"undefined")){var u=d(e,o);if(!r(u,"undefined"))return u}for(var f,c,h,m,v,g=["modernizr","tspan","samp"];!j.style&&g.length;)f=!0,j.modElem=s(g.shift()),j.style=j.modElem.style;for(h=e.length,c=0;h>c;c++)if(m=e[c],v=j.style[m],l(m,"-")&&(m=p(m)),j.style[m]!==n){if(i||r(o,"undefined"))return a(),"pfx"!=t||m;try{j.style[m]=o}catch(e){}if(j.style[m]!=v)return a(),"pfx"!=t||m}return a(),!1}function m(e,t){return function(){return e.apply(t,arguments)}}function v(e,t,n){var o;for(var i in e)if(e[i]in t)return!1===n?e[i]:(o=t[e[i]],r(o,"function")?m(o,n||t):o);return!1}function g(e,t,n,o,i){var s=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+k.join(s+" ")+s).split(" ");return r(t,"string")||r(t,"undefined")?h(a,t,o,i):(a=(e+" "+A.join(s+" ")+s).split(" "),v(a,t,n))}function y(e,t,r){return g(e,n,n,t,r)}var w=[],S={_version:"3.5.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){w.push({name:e,fn:t,options:n})},addAsyncTest:function(e){w.push({name:null,fn:e})}},C=function(){};C.prototype=S,C=new C;var b,x=[],_=t.documentElement,T="svg"===_.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;b=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),S._l={},S.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),C.hasOwnProperty(e)&&setTimeout(function(){C._trigger(e,C[e])},0)},S._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e;for(e=0;e<n.length;e++)(0,n[e])(t)},0),delete this._l[e]}},C._q.push(function(){S.addTest=i}),C.addTest("json","JSON"in e&&"parse"in JSON&&"stringify"in JSON),C.addTest("svg",!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect);var P=S.testStylesLine truncated
|
||||
@@ -1,2 +0,0 @@
|
||||
button[data-md-color-accent],button[data-md-color-primary]{width:13rem;margin-bottom:.4rem;padding:2.4rem .8rem .4rem;transition:background-color .25s,opacity .25s;border-radius:.2rem;color:#fff;font-size:1.28rem;text-align:left;cursor:pointer}button[data-md-color-accent]:hover,button[data-md-color-primary]:hover{opacity:.75}button[data-md-color-primary=red]{background-color:#ef5350}[data-md-color-primary=red] .md-typeset a{color:#ef5350}[data-md-color-primary=red] .md-header,[data-md-color-primary=red] .md-hero{background-color:#ef5350}[data-md-color-primary=red] .md-nav__link--active,[data-md-color-primary=red] .md-nav__link:active{color:#ef5350}[data-md-color-primary=red] .md-nav__item--nested>.md-nav__link{color:inherit}button[data-md-color-primary=pink]{background-color:#e91e63}[data-md-color-primary=pink] .md-typeset a{color:#e91e63}[data-md-color-primary=pink] .md-header,[data-md-color-primary=pink] .md-hero{background-color:#e91e63}[data-md-color-primary=pink] .md-nav__link--active,[data-md-color-primary=pink] .md-nav__link:active{color:#e91e63}[data-md-color-primary=pink] .md-nav__item--nested>.md-nav__link{color:inherit}button[data-md-color-primary=purple]{background-color:#ab47bc}[data-md-color-primary=purple] .md-typeset a{color:#ab47bc}[data-md-color-primary=purple] .md-header,[data-md-color-primary=purple] .md-hero{background-color:#ab47bc}[data-md-color-primary=purple] .md-nav__link--active,[data-md-color-primary=purple] .md-nav__link:active{color:#ab47bc}[data-md-color-primary=purple] .md-nav__item--nested>.md-nav__link{color:inherit}button[data-md-color-primary=deep-purple]{background-color:#7e57c2}[data-md-color-primary=deep-purple] .md-typeset a{color:#7e57c2}[data-md-color-primary=deep-purple] .md-header,[data-md-color-primary=deep-purple] .md-hero{background-color:#7e57c2}[data-md-color-primary=deep-purple] .md-nav__link--active,[data-md-color-primary=deep-purple] .md-nav__link:active{color:#7e57c2}[data-md-color-primary=deep-purple] .md-nav__item--nested>.md-nav__link{color:inherit}button[data-md-color-primary=indigo]{background-color:#3f51b5}[data-md-color-primary=indigo] .md-typeset a{color:#3f51b5}[data-md-color-primary=indigo] .md-header,[data-md-color-primary=indigo] .md-hero{background-color:#3f51b5}[data-md-color-primary=indigo] .md-nav__link--active,[data-md-color-primary=indigo] .md-nav__link:active{color:#3f51b5}[data-md-color-primary=indigo] .md-nav__item--nested>.md-nav__link{color:inherit}button[data-md-color-primary=blue]{background-color:#2196f3}[data-md-color-primary=blue] .md-typeset a{color:#2196f3}[data-md-color-primary=blue] .md-header,[data-md-color-primary=blue] .md-hero{background-color:#2196f3}[data-md-color-primary=blue] .md-nav__link--active,[data-md-color-primary=blue] .md-nav__link:active{color:#2196f3}[data-md-color-primary=blue] .md-nav__item--nested>.md-nav__link{color:inherit}button[data-md-color-primary=light-blue]{background-color:#03a9f4}[data-md-color-primary=light-blue] .md-typeset a{color:#03a9f4}[data-md-color-primary=light-blue] .md-header,[data-md-color-primary=light-blue] .md-hero{background-color:#03a9f4}[data-md-color-primary=light-blue] .md-nav__link--active,[data-md-color-primary=light-blue] .md-nav__link:active{color:#03a9f4}[data-md-color-primary=light-blue] .md-nav__item--nested>.md-nav__link{color:inherit}button[data-md-color-primary=cyan]{background-color:#00bcd4}[data-md-color-primary=cyan] .md-typeset a{color:#00bcd4}[data-md-color-primary=cyan] .md-header,[data-md-color-primary=cyan] .md-hero{background-color:#00bcd4}[data-md-color-primary=cyan] .md-nav__link--active,[data-md-color-primary=cyan] .md-nav__link:active{color:#00bcd4}[data-md-color-primary=cyan] .md-nav__item--nested>.md-nav__link{color:inherit}button[data-md-color-primary=teal]{background-color:#009688}[data-md-color-primary=teal] .md-typeset a{color:#009688}[data-md-color-primary=teal] .md-header,[data-md-color-primary=teal] .md-hero{background-color:#009688}[data-md-color-primary=teal] .md-nav__link--active,[data-md-color-primary=teal] .md-nav__link:active{color:#009688}[data-md-color-primary=teal] .md-nav__item--nested>.md-nav__link{color:inherit}button[data-md-color-primary=green]{background-color:#4caf50}[data-md-color-primary=green] .md-typeset a{color:#4caf50}[data-md-color-primary=green] .md-header,[data-md-color-primary=green] .md-hero{background-color:#4caf50}[data-md-color-primary=green] .md-nav__link--active,[data-md-color-primary=green] .md-nav__link:active{color:#4caf50}[data-md-color-primary=green] .md-nav__item--nested>.md-nav__link{color:inherit}button[data-md-color-primary=light-green]{background-color:#7cb342}[data-md-color-primary=light-green] .md-typeset a{color:#7cb342}[data-md-color-primary=light-green] .md-header,[data-md-color-primary=light-green] .md-hero{background-color:#7cb342}[data-md-color-primary=light-green] .md-nav__link--active,[data-md-color-primary=light-green] .md-nav__link:active{color:#7cb342}[data-md-color-primary=light-green] Line truncated
|
||||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJhc3NldHMvc3R5bGVzaGVldHMvYXBwbGljYXRpb24tcGFsZXR0ZS42MDc5NDc2Yy5jc3MiLCJzb3VyY2VSb290IjoiIn0=*/
|
||||
@@ -1,2 +0,0 @@
|
||||
html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}html{-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none}body{margin:0}hr{overflow:visible;box-sizing:content-box}a{-webkit-text-decoration-skip:objects}a,button,input,label{-webkit-tap-highlight-color:transparent}a{color:inherit;text-decoration:none}small,sub,sup{font-size:80%}sub,sup{position:relative;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}table{border-collapse:separate;border-spacing:0}td,th{font-weight:400;vertical-align:top}button{margin:0;padding:0;border:0;outline-style:none;background:transparent;font-size:inherit}input{border:0;outline:0}.md-clipboard:before,.md-icon,.md-nav__button,.md-nav__link:after,.md-nav__title:before,.md-search-result__article--document:before,.md-source-file:before,.md-typeset .admonition>.admonition-title:before,.md-typeset .admonition>summary:before,.md-typeset .critic.comment:before,.md-typeset .footnote-backref,.md-typeset .task-list-control .task-list-indicator:before,.md-typeset details>.admonition-title:before,.md-typeset details>summary:before,.md-typeset summary:after{font-family:Material Icons;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none;white-space:nowrap;speak:none;word-wrap:normal;direction:ltr}.md-content__icon,.md-footer-nav__button,.md-header-nav__button,.md-nav__button,.md-nav__title:before,.md-search-result__article--document:before{display:inline-block;margin:.4rem;padding:.8rem;font-size:2.4rem;cursor:pointer}.md-icon--arrow-back:before{content:"\E5C4"}.md-icon--arrow-forward:before{content:"\E5C8"}.md-icon--menu:before{content:"\E5D2"}.md-icon--search:before{content:"\E8B6"}[dir=rtl] .md-icon--arrow-back:before{content:"\E5C8"}[dir=rtl] .md-icon--arrow-forward:before{content:"\E5C4"}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body,input{color:rgba(0,0,0,.87);-webkit-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";font-family:Helvetica Neue,Helvetica,Arial,sans-serif}code,kbd,pre{color:rgba(0,0,0,.87);-webkit-font-feature-settings:"kern";font-feature-settings:"kern";font-family:Courier New,Courier,monospace}.md-typeset{font-size:1.6rem;line-height:1.6;-webkit-print-color-adjust:exact}.md-typeset blockquote,.md-typeset ol,.md-typeset p,.md-typeset ul{margin:1em 0}.md-typeset h1{margin:0 0 4rem;color:rgba(0,0,0,.54);font-size:3.125rem;line-height:1.3}.md-typeset h1,.md-typeset h2{font-weight:300;letter-spacing:-.01em}.md-typeset h2{margin:4rem 0 1.6rem;font-size:2.5rem;line-height:1.4}.md-typeset h3{margin:3.2rem 0 1.6rem;font-size:2rem;font-weight:400;letter-spacing:-.01em;line-height:1.5}.md-typeset h2+h3{margin-top:1.6rem}.md-typeset h4{font-size:1.6rem}.md-typeset h4,.md-typeset h5,.md-typeset h6{margin:1.6rem 0;font-weight:700;letter-spacing:-.01em}.md-typeset h5,.md-typeset h6{color:rgba(0,0,0,.54);font-size:1.28rem}.md-typeset h5{text-transform:uppercase}.md-typeset hr{margin:1.5em 0;border-bottom:.1rem dotted rgba(0,0,0,.26)}.md-typeset a{color:#3f51b5;word-break:break-word}.md-typeset a,.md-typeset a:before{transition:color .125s}.md-typeset a:active,.md-typeset a:hover{color:#536dfe}.md-typeset code,.md-typeset pre{background-color:hsla(0,0%,93%,.5);color:#37474f;font-size:85%;direction:ltr}.md-typeset code{margin:0 .29412em;padding:.07353em 0;border-radius:.2rem;box-shadow:.29412em 0 0 hsla(0,0%,93%,.5),-.29412em 0 0 hsla(0,0%,93%,.5);word-break:break-word;-webkit-box-decoration-break:clone;box-decoration-break:clone}.md-typeset h1 code,.md-typeset h2 code,.md-typeset h3 code,.md-typeset h4 code,.md-typeset h5 code,.md-typeset h6 code{margin:0;background-color:transparent;box-shadow:none}.md-typeset a>code{margin:inherit;padding:inherit;border-radius:none;background-color:inherit;color:inherit;box-shadow:none}.md-typeset pre{position:relative;margin:1em 0;border-radius:.2rem;line-height:1.4;-webkit-overflow-scrolling:touch}.md-typeset pre>code{display:block;margin:0;padding:1.05rem 1.2rem;background-color:transparent;font-size:inherit;box-shadow:none;-webkit-box-decoration-break:none;box-decoration-break:none;overflow:auto}.md-typeset pre>code::-webkit-scrollbar{width:.4rem;height:.4rem}.md-typeset pre>code::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.26)}.md-typeset pre>code::-webkit-scrollbar-thumb:hover{background-color:#536dfe}.md-typeset kbd{padding:0 .29412em;border:.1rem solid #c9c9c9;border-radius:.3rem;border-bottom-color:#bcbcbc;background-color:#fcfcfc;color:#555;font-size:85%;box-shadow:0 .1rem 0 #b0b0b0;word-break:break-word}.md-typeset mark{margin:0 .25em;padding:.0625em 0;border-radius:.2rem;background-color:rgba(255,235,59,.5);box-shadow:.25em 0 0 rgba(255,235,59,.5),-.25em 0 0 rgba(255,235,59,.5);word-break:break-word;-webkit-box-decoration-break:clone;box-decoration-break:clone}.md-typeset abbr{border-bottom:.1rem dotted rgba(0,0,0,.54);text-decoration:noneLine truncated
|
||||
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJhc3NldHMvc3R5bGVzaGVldHMvYXBwbGljYXRpb24uNzhhYWIyZGMuY3NzIiwic291cmNlUm9vdCI6IiJ9*/
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,584 +0,0 @@
|
||||
{
|
||||
"docs": [
|
||||
{
|
||||
"location": "/",
|
||||
"text": "LBRY JSON-RPC API Documentation\n\n\nblob_announce\n\n\nAnnounce blobs to the DHT\n\nArgs:\n 'blob_hash' : (str) announce a blob, specified by blob_hash\n 'stream_hash' : (str) announce all blobs associated with\n stream_hash\n 'sd_hash' : (str) announce all blobs associated with\n sd_hash and the sd_hash itself\n\nReturns:\n (bool) true if successful\n\n\n\n\nblob_availability\n\n\nGet blob availability\n\nArgs:\n 'blob_hash' : (str) check availability for this blob hash\n 'search_timeout' : (int) how long to search for peers for the blob\n in the dht\n 'blob_timeout' : (int) how long to try downloading from a peer\n\nReturns:\n (dict) {\n \nis_available\n: \nbool, true if blob is available from a peer from peer list\n\n \nreachable_peers\n: [\nip\n:\nport\n],\n \nunreachable_peers\n: [\nip\n:\nport\n]\n }\n\n\n\n\nblob_delete\n\n\nDelete a blob\n\nArgs:\n 'blob_hash' : (str) blob hash of the blob to delete\n\nReturns:\n (str) Success/fail message\n\n\n\n\nblob_get\n\n\nDownload and return a blob\n\nArgs:\n 'blob_hash' (required) : (str) blob hash of the blob to get\n 'timeout' : (int) timeout in number of seconds\n 'encoding' : (str) by default no attempt at decoding\n is made, can be set to one of the\n following decoders:\n 'json'\n 'payment_rate_manager' : (str) if not given the default payment rate\n manager will be used.\n supported alternative rate managers:\n 'only-free'\n\nReturns:\n (str) Success/Fail message or (dict) decoded data\n\n\n\n\nblob_list\n\n\nReturns blob hashes. If not given filters, returns all blobs known by the blob manager\n\nArgs:\n 'needed' : (bool) only return needed blobs\n 'finished' : (bool) only return finished blobs\n 'uri' : (str) filter blobs by stream in a uri\n 'stream_hash' : (str) filter blobs by stream hash\n 'sd_hash' : (str) filter blobs by sd hash\n 'page_size' : (int) results page size\n 'page' : (int) page of results to return\n\nReturns:\n (list) List of blob hashes\n\n\n\n\nblob_reflect\n\n\nReflects specified blobs\n\nArgs:\n 'reflector_server' : (str) reflector address\n\nReturns:\n (list) reflected blob hashes\n\n\n\n\nblob_reflect_all\n\n\nReflects all saved blobs\n\nArgs:\n None\n\nReturns:\n (bool) true if successful\n\n\n\n\nblock_show\n\n\nGet contents of a block\n\nArgs:\n 'blockhash' (required) : (str) hash of the block to look up\n 'height' (required) : (int) height of the block to look up\n\nReturns:\n (dict) Requested block\n\n\n\n\nchannel_export\n\n\nExport serialized channel signing information for a given certificate claim id\n\nArgs:\n 'claim_id' (required) : (str) Claim ID to export information about\n\nReturns:\n (str) Serialized certificate information\n\n\n\n\nchannel_import\n\n\nImport serialized channel signing information (to allow signing new claims to the channel)\n\nArgs:\n 'serialized_certificate_info' (required) : (str) certificate info\n\nReturns:\n (dict) Result dictionary\n\n\n\n\nchannel_list\n\n\nGet certificate claim infos for channels that can be published to\n\nArgs:\n None\n\nReturns:\n (list) ClaimDict, includes 'is_mine' field to indicate if the certificate claim\n is in the wallet.\n\n\n\n\nchannel_new\n\n\nGenerate a publisher key and create a new '@' prefixed certificate claim\n\nArgs:\n 'channel_name' (required) : (str) name of the channel prefixed with '@'\n 'amount' (required) : (float) bid amount on the channel\n\nReturns:\n (dict) Dictionary containing result of the claim\n {\n 'tx' : (str) hex encoded transaction\n 'txid' : (str) txid of resulting claim\n 'nout' : (int) nout of the resulting claim\n 'fee' : (float) fee paid for the claim transaction\n 'claim_id' : (str) claim ID of the resulting claim\n }\n\n\n\n\nclaim_abandon\n\n\nAbandon a name and reclaim credits from the claim\n\nArgs:\n 'claim_id' : (str) claim_id of the claim to abandon\n 'txid' : (str) txid of the claim to abandon\n 'nout' : (int) nout of the claim to abandon\n\nReturns:\n (dict) Dictionary containing result of the claim\n {\n txid : (str) txid of resulting transaction\n fee : (float) fee paid for the transaction\n }\n\n\n\n\nclaim_list\n\n\nList current claims and information about them for a given name\n\nArgs:\n 'name' (required) : (str) name of the claim to list info about\n\nReturns:\n (dict) State Line truncated
|
||||
"title": "API"
|
||||
},
|
||||
{
|
||||
"location": "/#lbry-json-rpc-api-documentation",
|
||||
"text": "",
|
||||
"title": "LBRY JSON-RPC API Documentation"
|
||||
},
|
||||
{
|
||||
"location": "/#blob_announce",
|
||||
"text": "Announce blobs to the DHT\n\nArgs:\n 'blob_hash' : (str) announce a blob, specified by blob_hash\n 'stream_hash' : (str) announce all blobs associated with\n stream_hash\n 'sd_hash' : (str) announce all blobs associated with\n sd_hash and the sd_hash itself\n\nReturns:\n (bool) true if successful",
|
||||
"title": "blob_announce"
|
||||
},
|
||||
{
|
||||
"location": "/#blob_availability",
|
||||
"text": "Get blob availability\n\nArgs:\n 'blob_hash' : (str) check availability for this blob hash\n 'search_timeout' : (int) how long to search for peers for the blob\n in the dht\n 'blob_timeout' : (int) how long to try downloading from a peer\n\nReturns:\n (dict) {\n is_available : bool, true if blob is available from a peer from peer list \n reachable_peers : [ ip : port ],\n unreachable_peers : [ ip : port ]\n }",
|
||||
"title": "blob_availability"
|
||||
},
|
||||
{
|
||||
"location": "/#blob_delete",
|
||||
"text": "Delete a blob\n\nArgs:\n 'blob_hash' : (str) blob hash of the blob to delete\n\nReturns:\n (str) Success/fail message",
|
||||
"title": "blob_delete"
|
||||
},
|
||||
{
|
||||
"location": "/#blob_get",
|
||||
"text": "Download and return a blob\n\nArgs:\n 'blob_hash' (required) : (str) blob hash of the blob to get\n 'timeout' : (int) timeout in number of seconds\n 'encoding' : (str) by default no attempt at decoding\n is made, can be set to one of the\n following decoders:\n 'json'\n 'payment_rate_manager' : (str) if not given the default payment rate\n manager will be used.\n supported alternative rate managers:\n 'only-free'\n\nReturns:\n (str) Success/Fail message or (dict) decoded data",
|
||||
"title": "blob_get"
|
||||
},
|
||||
{
|
||||
"location": "/#blob_list",
|
||||
"text": "Returns blob hashes. If not given filters, returns all blobs known by the blob manager\n\nArgs:\n 'needed' : (bool) only return needed blobs\n 'finished' : (bool) only return finished blobs\n 'uri' : (str) filter blobs by stream in a uri\n 'stream_hash' : (str) filter blobs by stream hash\n 'sd_hash' : (str) filter blobs by sd hash\n 'page_size' : (int) results page size\n 'page' : (int) page of results to return\n\nReturns:\n (list) List of blob hashes",
|
||||
"title": "blob_list"
|
||||
},
|
||||
{
|
||||
"location": "/#blob_reflect",
|
||||
"text": "Reflects specified blobs\n\nArgs:\n 'reflector_server' : (str) reflector address\n\nReturns:\n (list) reflected blob hashes",
|
||||
"title": "blob_reflect"
|
||||
},
|
||||
{
|
||||
"location": "/#blob_reflect_all",
|
||||
"text": "Reflects all saved blobs\n\nArgs:\n None\n\nReturns:\n (bool) true if successful",
|
||||
"title": "blob_reflect_all"
|
||||
},
|
||||
{
|
||||
"location": "/#block_show",
|
||||
"text": "Get contents of a block\n\nArgs:\n 'blockhash' (required) : (str) hash of the block to look up\n 'height' (required) : (int) height of the block to look up\n\nReturns:\n (dict) Requested block",
|
||||
"title": "block_show"
|
||||
},
|
||||
{
|
||||
"location": "/#channel_export",
|
||||
"text": "Export serialized channel signing information for a given certificate claim id\n\nArgs:\n 'claim_id' (required) : (str) Claim ID to export information about\n\nReturns:\n (str) Serialized certificate information",
|
||||
"title": "channel_export"
|
||||
},
|
||||
{
|
||||
"location": "/#channel_import",
|
||||
"text": "Import serialized channel signing information (to allow signing new claims to the channel)\n\nArgs:\n 'serialized_certificate_info' (required) : (str) certificate info\n\nReturns:\n (dict) Result dictionary",
|
||||
"title": "channel_import"
|
||||
},
|
||||
{
|
||||
"location": "/#channel_list",
|
||||
"text": "Get certificate claim infos for channels that can be published to\n\nArgs:\n None\n\nReturns:\n (list) ClaimDict, includes 'is_mine' field to indicate if the certificate claim\n is in the wallet.",
|
||||
"title": "channel_list"
|
||||
},
|
||||
{
|
||||
"location": "/#channel_new",
|
||||
"text": "Generate a publisher key and create a new '@' prefixed certificate claim\n\nArgs:\n 'channel_name' (required) : (str) name of the channel prefixed with '@'\n 'amount' (required) : (float) bid amount on the channel\n\nReturns:\n (dict) Dictionary containing result of the claim\n {\n 'tx' : (str) hex encoded transaction\n 'txid' : (str) txid of resulting claim\n 'nout' : (int) nout of the resulting claim\n 'fee' : (float) fee paid for the claim transaction\n 'claim_id' : (str) claim ID of the resulting claim\n }",
|
||||
"title": "channel_new"
|
||||
},
|
||||
{
|
||||
"location": "/#claim_abandon",
|
||||
"text": "Abandon a name and reclaim credits from the claim\n\nArgs:\n 'claim_id' : (str) claim_id of the claim to abandon\n 'txid' : (str) txid of the claim to abandon\n 'nout' : (int) nout of the claim to abandon\n\nReturns:\n (dict) Dictionary containing result of the claim\n {\n txid : (str) txid of resulting transaction\n fee : (float) fee paid for the transaction\n }",
|
||||
"title": "claim_abandon"
|
||||
},
|
||||
{
|
||||
"location": "/#claim_list",
|
||||
"text": "List current claims and information about them for a given name\n\nArgs:\n 'name' (required) : (str) name of the claim to list info about\n\nReturns:\n (dict) State of claims assigned for the name\n {\n 'claims': (list) list of claims for the name\n [\n {\n 'amount': (float) amount assigned to the claim\n 'effective_amount': (float) total amount assigned to the claim,\n including supports\n 'claim_id': (str) claim ID of the claim\n 'height': (int) height of block containing the claim\n 'txid': (str) txid of the claim\n 'nout': (int) nout of the claim\n 'permanent_url': (str) permanent url of the claim,\n 'supports': (list) a list of supports attached to the claim\n 'value': (str) the value of the claim\n },\n ]\n 'supports_without_claims': (list) supports without any claims attached to them\n 'last_takeover_height': (int) the height of last takeover for the name\n }",
|
||||
"title": "claim_list"
|
||||
},
|
||||
{
|
||||
"location": "/#claim_list_by_channel",
|
||||
"text": "Get paginated claims in a channel specified by a channel uri\n\nArgs:\n 'uri' (required) : (str) uri of the channel\n 'uris' : (list) uris of the channel\n 'page' : (int) which page of results to return where page 1 is the first\n page, defaults to no pages\n 'page_size' : (int) number of results in a page, default of 10\n\nReturns:\n {\n resolved channel uri: {\n If there was an error:\n 'error': (str) error message\n\n 'claims_in_channel': the total number of results for the channel,\n\n If a page of results was requested:\n 'returned_page': page number returned,\n 'claims_in_channel': [\n {\n 'absolute_channel_position': (int) claim index number in sorted list of\n claims which assert to be part of the\n channel\n 'address': (str) claim address,\n 'amount': (float) claim amount,\n 'effective_amount': (float) claim amount including supports,\n 'claim_id': (str) claim id,\n 'claim_sequence': (int) claim sequence number,\n 'decoded_claim': (bool) whether or not the claim value was decoded,\n 'height': (int) claim height,\n 'depth': (int) claim depth,\n 'has_signature': (bool) included if decoded_claim\n 'name': (str) claim name,\n 'supports: (list) list of supports [{'txid': (str) txid,\n 'nout': (int) nout,\n 'amount': (float) amount}],\n 'txid': (str) claim txid,\n 'nout': (str) claim nout,\n 'signature_is_valid': (bool), included if has_signature,\n 'value': ClaimDict if decoded, otherwise hex string\n }\n ],\n }\n }",
|
||||
"title": "claim_list_by_channel"
|
||||
},
|
||||
{
|
||||
"location": "/#claim_list_mine",
|
||||
"text": "List my name claims\n\nArgs:\n None\n\nReturns:\n (list) List of name claims owned by user\n [\n {\n 'address': (str) address that owns the claim\n 'amount': (float) amount assigned to the claim\n 'blocks_to_expiration': (int) number of blocks until it expires\n 'category': (str) claim , update , or support \n 'claim_id': (str) claim ID of the claim\n 'confirmations': (int) number of blocks of confirmations for the claim\n 'expiration_height': (int) the block height which the claim will expire\n 'expired': (bool) true if expired, false otherwise\n 'height': (int) height of the block containing the claim\n 'is_spent': (bool) true if claim is abandoned, false otherwise\n 'name': (str) name of the claim\n 'permanent_url': (str) permanent url of the claim,\n 'txid': (str) txid of the claim\n 'nout': (int) nout of the claim\n 'value': (str) value of the claim\n },\n ]",
|
||||
"title": "claim_list_mine"
|
||||
},
|
||||
{
|
||||
"location": "/#claim_new_support",
|
||||
"text": "Support a name claim\n\nArgs:\n 'name' (required) : (str) name of the claim to support\n 'claim_id' (required) : (str) claim_id of the claim to support\n 'amount' (required) : (float) amount of support\n\nReturns:\n (dict) Dictionary containing result of the claim\n {\n txid : (str) txid of resulting support claim\n nout : (int) nout of the resulting support claim\n fee : (float) fee paid for the transaction\n }",
|
||||
"title": "claim_new_support"
|
||||
},
|
||||
{
|
||||
"location": "/#claim_renew",
|
||||
"text": "Renew claim(s) or support(s)\n\nArgs:\n 'outpoint' (required) : (str) outpoint of the claim to renew\n 'height' (required) : (str) update claims expiring before or at this block height\n\nReturns:\n (dict) Dictionary where key is the the original claim's outpoint and\n value is the result of the renewal\n {\n outpoint:{\n\n 'tx' : (str) hex encoded transaction\n 'txid' : (str) txid of resulting claim\n 'nout' : (int) nout of the resulting claim\n 'fee' : (float) fee paid for the claim transaction\n 'claim_id' : (str) claim ID of the resulting claim\n },\n }",
|
||||
"title": "claim_renew"
|
||||
},
|
||||
{
|
||||
"location": "/#claim_send_to_address",
|
||||
"text": "Send a name claim to an address\n\nArgs:\n 'claim_id' (required) : (str) claim_id to send\n 'address' (required) : (str) address to send the claim to\n 'amount' : (int) Amount of credits to claim name for, defaults to the current amount\n on the claim\n\nReturns:\n (dict) Dictionary containing result of the claim\n {\n 'tx' : (str) hex encoded transaction\n 'txid' : (str) txid of resulting claim\n 'nout' : (int) nout of the resulting claim\n 'fee' : (float) fee paid for the claim transaction\n 'claim_id' : (str) claim ID of the resulting claim\n }",
|
||||
"title": "claim_send_to_address"
|
||||
},
|
||||
{
|
||||
"location": "/#claim_show",
|
||||
"text": "Resolve claim info from txid/nout or with claim ID\n\nArgs:\n 'txid' : (str) look for claim with this txid, nout must\n also be specified\n 'nout' : (int) look for claim with this nout, txid must\n also be specified\n 'claim_id' : (str) look for claim with this claim id\n\nReturns:\n (dict) Dictionary containing claim info as below,\n\n {\n 'txid': (str) txid of claim\n 'nout': (int) nout of claim\n 'amount': (float) amount of claim\n 'value': (str) value of claim\n 'height' : (int) height of claim takeover\n 'claim_id': (str) claim ID of claim\n 'supports': (list) list of supports associated with claim\n }\n\n if claim cannot be resolved, dictionary as below will be returned\n\n {\n 'error': (str) reason for error\n }",
|
||||
"title": "claim_show"
|
||||
},
|
||||
{
|
||||
"location": "/#cli_test_command",
|
||||
"text": "This command is only for testing the CLI argument parsing\nArgs:\n 'a_arg' : (bool) a arg\n 'b_arg' : (bool) b arg\n 'pos_arg' (required) : (int) pos arg\n 'pos_args' : (int) pos args\n 'pos_arg2' : (int) pos arg 2\n 'pos_arg3' : (int) pos arg 3\n\nReturns:\n pos args",
|
||||
"title": "cli_test_command"
|
||||
},
|
||||
{
|
||||
"location": "/#commands",
|
||||
"text": "Return a list of available commands\n\nArgs:\n None\n\nReturns:\n (list) list of available commands",
|
||||
"title": "commands"
|
||||
},
|
||||
{
|
||||
"location": "/#daemon_stop",
|
||||
"text": "Stop lbrynet-daemon\n\nArgs:\n None\n\nReturns:\n (string) Shutdown message",
|
||||
"title": "daemon_stop"
|
||||
},
|
||||
{
|
||||
"location": "/#file_delete",
|
||||
"text": "Delete a LBRY file\n\nArgs:\n 'delete_from_download_dir' : (bool) delete file from download directory,\n instead of just deleting blobs\n 'delete_all' : (bool) if there are multiple matching files,\n allow the deletion of multiple files.\n Otherwise do not delete anything.\n 'sd_hash' : (str) delete by file sd hash\n 'file_name' : (str) delete by file name in downloads folder\n 'stream_hash' : (str) delete by file stream hash\n 'rowid' : (int) delete by file row id\n 'claim_id' : (str) delete by file claim id\n 'txid' : (str) delete by file claim txid\n 'nout' : (int) delete by file claim nout\n 'claim_name' : (str) delete by file claim name\n 'channel_claim_id' : (str) delete by file channel claim id\n 'channel_name' : (str) delete by file channel claim name\n\nReturns:\n (bool) true if deletion was successful",
|
||||
"title": "file_delete"
|
||||
},
|
||||
{
|
||||
"location": "/#file_list",
|
||||
"text": "List files limited by optional filters\n\nArgs:\n 'sd_hash' : (str) get file with matching sd hash\n 'file_name' : (str) get file with matching file name in the\n downloads folder\n 'stream_hash' : (str) get file with matching stream hash\n 'rowid' : (int) get file with matching row id\n 'claim_id' : (str) get file with matching claim id\n 'outpoint' : (str) get file with matching claim outpoint\n 'txid' : (str) get file with matching claim txid\n 'nout' : (int) get file with matching claim nout\n 'channel_claim_id' : (str) get file with matching channel claim id\n 'channel_name' : (str) get file with matching channel name\n 'claim_name' : (str) get file with matching claim name\n 'full_status' : (bool) full status, populate the\n 'message' and 'size' fields\n 'sort' : (str) sort by any property, like 'file_name'\n or 'metadata.author'; to specify direction\n append ',asc' or ',desc'\n\nReturns:\n (list) List of files\n\n [\n {\n 'completed': (bool) true if download is completed,\n 'file_name': (str) name of file,\n 'download_directory': (str) download directory,\n 'points_paid': (float) credit paid to download file,\n 'stopped': (bool) true if download is stopped,\n 'stream_hash': (str) stream hash of file,\n 'stream_name': (str) stream name ,\n 'suggested_file_name': (str) suggested file name,\n 'sd_hash': (str) sd hash of file,\n 'download_path': (str) download path of file,\n 'mime_type': (str) mime type of file,\n 'key': (str) key attached to file,\n 'total_bytes': (int) file size in bytes, None if full_status is false,\n 'written_bytes': (int) written size in bytes,\n 'blobs_completed': (int) num_completed, None if full_status is false,\n 'blobs_in_stream': (int) None if full_status is false,\n 'status': (str) downloader status, None if full_status is false,\n 'claim_id': (str) None if full_status is false or if claim is not found,\n 'outpoint': (str) None if full_status is false or if claim is not found,\n 'txid': (str) None if full_status is false or if claim is not found,\n 'nout': (int) None if full_status is false or if claim is not found,\n 'metadata': (dict) None if full_status is false or if claim is not found,\n 'channel_claim_id': (str) None if full_status is false or if claim is not found or signed,\n 'channel_name': (str) None if full_status is false or if claim is not found or signed,\n 'claim_name': (str) None if full_status is false or if claim is not found\n },\n ]",
|
||||
"title": "file_list"
|
||||
},
|
||||
{
|
||||
"location": "/#file_reflect",
|
||||
"text": "Reflect all the blobs in a file matching the filter criteria\n\nArgs:\n 'sd_hash' : (str) get file with matching sd hash\n 'file_name' : (str) get file with matching file name in the\n downloads folder\n 'stream_hash' : (str) get file with matching stream hash\n 'rowid' : (int) get file with matching row id\n 'reflector' : (str) reflector server, ip address or url\n by default choose a server from the config\n\nReturns:\n (list) list of blobs reflected",
|
||||
"title": "file_reflect"
|
||||
},
|
||||
{
|
||||
"location": "/#file_set_status",
|
||||
"text": "Start or stop downloading a file\n\nArgs:\n 'status' (required) : (str) one of start or stop \n 'sd_hash' : (str) set status of file with matching sd hash\n 'file_name' : (str) set status of file with matching file name in the\n downloads folder\n 'stream_hash' : (str) set status of file with matching stream hash\n 'rowid' : (int) set status of file with matching row id\n\nReturns:\n (str) Confirmation message",
|
||||
"title": "file_set_status"
|
||||
},
|
||||
{
|
||||
"location": "/#get",
|
||||
"text": "Download stream from a LBRY name.\n\nArgs:\n 'uri' : (str) uri of the content to download\n 'file_name' : (str) specified name for the downloaded file\n 'timeout' : (int) download timeout in number of seconds\n\nReturns:\n (dict) Dictionary containing information about the stream\n {\n 'completed': (bool) true if download is completed,\n 'file_name': (str) name of file,\n 'download_directory': (str) download directory,\n 'points_paid': (float) credit paid to download file,\n 'stopped': (bool) true if download is stopped,\n 'stream_hash': (str) stream hash of file,\n 'stream_name': (str) stream name ,\n 'suggested_file_name': (str) suggested file name,\n 'sd_hash': (str) sd hash of file,\n 'download_path': (str) download path of file,\n 'mime_type': (str) mime type of file,\n 'key': (str) key attached to file,\n 'total_bytes': (int) file size in bytes, None if full_status is false,\n 'written_bytes': (int) written size in bytes,\n 'blobs_completed': (int) num_completed, None if full_status is false,\n 'blobs_in_stream': (int) None if full_status is false,\n 'status': (str) downloader status, None if full_status is false,\n 'claim_id': (str) claim id,\n 'outpoint': (str) claim outpoint string,\n 'txid': (str) claim txid,\n 'nout': (int) claim nout,\n 'metadata': (dict) claim metadata,\n 'channel_claim_id': (str) None if claim is not signed\n 'channel_name': (str) None if claim is not signed\n 'claim_name': (str) claim name\n }",
|
||||
"title": "get"
|
||||
},
|
||||
{
|
||||
"location": "/#help",
|
||||
"text": "Return a useful message for an API command\n\nArgs:\n 'command' : (str) command to retrieve documentation for\n\nReturns:\n (str) Help message",
|
||||
"title": "help"
|
||||
},
|
||||
{
|
||||
"location": "/#peer_list",
|
||||
"text": "Get peers for blob hash\n\nArgs:\n 'blob_hash' (required) : (str) find available peers for this blob hash\n 'timeout' : (int) peer search timeout in seconds\n\nReturns:\n (list) List of contact dictionaries {'host': peer ip , 'port': peer port , 'node_id': peer node id }",
|
||||
"title": "peer_list"
|
||||
},
|
||||
{
|
||||
"location": "/#peer_ping",
|
||||
"text": "Send a kademlia ping to the specified peer. If address and port are provided the peer is directly pinged,\nif not provided the peer is located first.\n\nArgs:\n 'address' : (str) ip address of the peer\n 'port' : (int) udp port of the peer\n\nReturns:\n (str) pong, or {'error': error message } if an error is encountered",
|
||||
"title": "peer_ping"
|
||||
},
|
||||
{
|
||||
"location": "/#publish",
|
||||
"text": "Make a new name claim and publish associated data to lbrynet,\nupdate over existing claim if user already has a claim for name.\n\nFields required in the final Metadata are:\n 'title'\n 'description'\n 'author'\n 'language'\n 'license'\n 'nsfw'\n\nMetadata can be set by either using the metadata argument or by setting individual arguments\nfee, title, description, author, language, license, license_url, thumbnail, preview, nsfw,\nor sources. Individual arguments will overwrite the fields specified in metadata argument.\n\nArgs:\n 'name' (required) : (str) name of the content\n 'bid' (required) : (decimal) amount to back the claim\n 'metadata' : (dict) ClaimDict to associate with the claim.\n 'file_path' : (str) path to file to be associated with name. If provided,\n a lbry stream of this file will be used in 'sources'.\n If no path is given but a sources dict is provided,\n it will be used. If neither are provided, an\n error is raised.\n 'fee' : (dict) Dictionary representing key fee to download content:\n {\n 'currency': currency_symbol,\n 'amount': decimal,\n 'address': str, optional\n }\n supported currencies: LBC, USD, BTC\n If an address is not provided a new one will be\n automatically generated. Default fee is zero.\n 'title' : (str) title of the publication\n 'description' : (str) description of the publication\n 'author' : (str) author of the publication\n 'language' : (str) language of the publication\n 'license' : (str) publication license\n 'license_url' : (str) publication license url\n 'thumbnail' : (str) thumbnail url\n 'preview' : (str) preview url\n 'nsfw' : (bool) whether the content is nsfw\n 'sources' : (str) {'lbry_sd_hash': sd_hash} specifies sd hash of file\n 'channel_name' : (str) name of the publisher channel name in the wallet\n 'channel_id' : (str) claim id of the publisher channel, does not check\n for channel claim being in the wallet. This allows\n publishing to a channel where only the certificate\n private key is in the wallet.\n 'claim_address' : (str) address where the claim is sent to, if not specified\n new address will automatically be created\n\nReturns:\n (dict) Dictionary containing result of the claim\n {\n 'tx' : (str) hex encoded transaction\n 'txid' : (str) txid of resulting claim\n 'nout' : (int) nout of the resulting claim\n 'fee' : (decimal) fee paid for the claim transaction\n 'claim_id' : (str) claim ID of the resulting claim\n }",
|
||||
"title": "publish"
|
||||
},
|
||||
{
|
||||
"location": "/#report_bug",
|
||||
"text": "Report a bug to slack\n\nArgs:\n 'message' (required) : (str) Description of the bug\n\nReturns:\n (bool) true if successful",
|
||||
"title": "report_bug"
|
||||
},
|
||||
{
|
||||
"location": "/#resolve",
|
||||
"text": "Resolve given LBRY URIs\n\nArgs:\n 'force' : (bool) force refresh and ignore cache\n 'uri' (required) : (str) uri to resolve\n 'uris' : (list) uris to resolve\n\nReturns:\n Dictionary of results, keyed by uri\n ' uri ': {\n If a resolution error occurs:\n 'error': Error message\n\n If the uri resolves to a channel or a claim in a channel:\n 'certificate': {\n 'address': (str) claim address,\n 'amount': (float) claim amount,\n 'effective_amount': (float) claim amount including supports,\n 'claim_id': (str) claim id,\n 'claim_sequence': (int) claim sequence number,\n 'decoded_claim': (bool) whether or not the claim value was decoded,\n 'height': (int) claim height,\n 'depth': (int) claim depth,\n 'has_signature': (bool) included if decoded_claim\n 'name': (str) claim name,\n 'permanent_url': (str) permanent url of the certificate claim,\n 'supports: (list) list of supports [{'txid': (str) txid,\n 'nout': (int) nout,\n 'amount': (float) amount}],\n 'txid': (str) claim txid,\n 'nout': (str) claim nout,\n 'signature_is_valid': (bool), included if has_signature,\n 'value': ClaimDict if decoded, otherwise hex string\n }\n\n If the uri resolves to a channel:\n 'claims_in_channel': (int) number of claims in the channel,\n\n If the uri resolves to a claim:\n 'claim': {\n 'address': (str) claim address,\n 'amount': (float) claim amount,\n 'effective_amount': (float) claim amount including supports,\n 'claim_id': (str) claim id,\n 'claim_sequence': (int) claim sequence number,\n 'decoded_claim': (bool) whether or not the claim value was decoded,\n 'height': (int) claim height,\n 'depth': (int) claim depth,\n 'has_signature': (bool) included if decoded_claim\n 'name': (str) claim name,\n 'permanent_url': (str) permanent url of the claim,\n 'channel_name': (str) channel name if claim is in a channel\n 'supports: (list) list of supports [{'txid': (str) txid,\n 'nout': (int) nout,\n 'amount': (float) amount}]\n 'txid': (str) claim txid,\n 'nout': (str) claim nout,\n 'signature_is_valid': (bool), included if has_signature,\n 'value': ClaimDict if decoded, otherwise hex string\n }\n }",
|
||||
"title": "resolve"
|
||||
},
|
||||
{
|
||||
"location": "/#resolve_name",
|
||||
"text": "Resolve stream info from a LBRY name\n\nArgs:\n 'name' (required) : (str) the name to resolve\n 'force' : (bool) force refresh and do not check cache\n\nReturns:\n (dict) Metadata dictionary from name claim, None if the name is not\n resolvable",
|
||||
"title": "resolve_name"
|
||||
},
|
||||
{
|
||||
"location": "/#routing_table_get",
|
||||
"text": "Get DHT routing information\n\nArgs:\n None\n\nReturns:\n (dict) dictionary containing routing and contact information\n {\n buckets : {\n bucket index : [\n {\n address : (str) peer address,\n port : (int) peer udp port\n node_id : (str) peer node id,\n blobs : (list) blob hashes announced by peer\n }\n ]\n },\n contacts : (list) contact node ids,\n blob_hashes : (list) all of the blob hashes stored by peers in the list of buckets,\n node_id : (str) the local dht node id\n }",
|
||||
"title": "routing_table_get"
|
||||
},
|
||||
{
|
||||
"location": "/#settings_get",
|
||||
"text": "Get daemon settings\n\nArgs:\n None\n\nReturns:\n (dict) Dictionary of daemon settings\n See ADJUSTABLE_SETTINGS in lbrynet/conf.py for full list of settings",
|
||||
"title": "settings_get"
|
||||
},
|
||||
{
|
||||
"location": "/#settings_set",
|
||||
"text": "Set daemon settings\n\nArgs:\n 'download_directory' : (str) path of download directory\n 'data_rate' : (float) 0.0001\n 'download_timeout' : (int) 180\n 'peer_port' : (int) 3333\n 'max_key_fee' : (dict) maximum key fee for downloads,\n in the format:\n {\n 'currency': currency_symbol ,\n 'amount': amount \n }.\n In the CLI, it must be an escaped JSON string\n Supported currency symbols: LBC, USD, BTC\n 'disable_max_key_fee' : (bool) False\n 'use_upnp' : (bool) True\n 'run_reflector_server' : (bool) False\n 'cache_time' : (int) 150\n 'reflect_uploads' : (bool) True\n 'share_usage_data' : (bool) True\n 'peer_search_timeout' : (int) 3\n 'sd_download_timeout' : (int) 3\n 'auto_renew_claim_height_delta' : (int) 0\n claims set to expire within this many blocks will be\n automatically renewed after startup (if set to 0, renews\n will not be made automatically)\n\nReturns:\n (dict) Updated dictionary of daemon settings",
|
||||
"title": "settings_set"
|
||||
},
|
||||
{
|
||||
"location": "/#status",
|
||||
"text": "Get daemon status\n\nArgs:\n None\n\nReturns:\n (dict) lbrynet-daemon status\n {\n 'installation_id': (str) installation id - base58,\n 'is_running': (bool),\n 'is_first_run': bool,\n 'skipped_components': (list) [names of skipped components (str)],\n 'startup_status': { Does not include components which have been skipped\n 'database': (bool),\n 'wallet': (bool),\n 'session': (bool),\n 'dht': (bool),\n 'hash_announcer': (bool),\n 'stream_identifier': (bool),\n 'file_manager': (bool),\n 'blob_manager': (bool),\n 'blockchain_headers': (bool),\n 'peer_protocol_server': (bool),\n 'reflector': (bool),\n 'upnp': (bool),\n 'exchange_rate_manager': (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 },\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 },\n 'hash_announcer': {\n 'announce_queue_size': (int) number of blobs currently queued to be announced\n },\n 'file_manager': {\n 'managed_files': (int) count of files in the file manager,\n }\n }",
|
||||
"title": "status"
|
||||
},
|
||||
{
|
||||
"location": "/#stream_availability",
|
||||
"text": "Get stream availability for lbry uri\n\nArgs:\n 'uri' (required) : (str) check availability for this uri\n 'search_timeout' : (int) how long to search for peers for the blob\n in the dht\n 'blob_timeout' : (int) how long to try downloading from a peer\n\nReturns:\n (dict) {\n 'is_available': bool ,\n 'did_decode': bool ,\n 'did_resolve': bool ,\n 'is_stream': bool ,\n 'num_blobs_in_stream': int ,\n 'sd_hash': str ,\n 'sd_blob_availability': dict see `blob_availability`,\n 'head_blob_hash': str ,\n 'head_blob_availability': dict see `blob_availability`,\n 'use_upnp': bool ,\n 'upnp_redirect_is_set': bool ,\n 'error': None | str error message\n }",
|
||||
"title": "stream_availability"
|
||||
},
|
||||
{
|
||||
"location": "/#stream_cost_estimate",
|
||||
"text": "Get estimated cost for a lbry stream\n\nArgs:\n 'uri' (required) : (str) uri to use\n 'size' : (float) stream size in bytes. if provided an sd blob won't be\n downloaded.\n\nReturns:\n (float) Estimated cost in lbry credits, returns None if uri is not\n resolvable",
|
||||
"title": "stream_cost_estimate"
|
||||
},
|
||||
{
|
||||
"location": "/#transaction_list",
|
||||
"text": "List transactions belonging to wallet\n\nArgs:\n None\n\nReturns:\n (list) List of transactions\n\n {\n claim_info : (list) claim info if in txn [{\n address : (str) address of claim,\n balance_delta : (float) bid amount,\n amount : (float) claim amount,\n claim_id : (str) claim id,\n claim_name : (str) claim name,\n nout : (int) nout\n }],\n abandon_info : (list) abandon info if in txn [{\n address : (str) address of abandoned claim,\n balance_delta : (float) returned amount,\n amount : (float) claim amount,\n claim_id : (str) claim id,\n claim_name : (str) claim name,\n nout : (int) nout\n }],\n confirmations : (int) number of confirmations for the txn,\n date : (str) date and time of txn,\n fee : (float) txn fee,\n support_info : (list) support info if in txn [{\n address : (str) address of support,\n balance_delta : (float) support amount,\n amount : (float) support amount,\n claim_id : (str) claim id,\n claim_name : (str) claim name,\n is_tip : (bool),\n nout : (int) nout\n }],\n timestamp : (int) timestamp,\n txid : (str) txn id,\n update_info : (list) update info if in txn [{\n address : (str) address of claim,\n balance_delta : (float) credited/debited\n amount : (float) absolute amount,\n claim_id : (str) claim id,\n claim_name : (str) claim name,\n nout : (int) nout\n }],\n value : (float) value of txn\n }",
|
||||
"title": "transaction_list"
|
||||
},
|
||||
{
|
||||
"location": "/#transaction_show",
|
||||
"text": "Get a decoded transaction from a txid\n\nArgs:\n 'txid' (required) : (str) txid of the transaction\n\nReturns:\n (dict) JSON formatted transaction",
|
||||
"title": "transaction_show"
|
||||
},
|
||||
{
|
||||
"location": "/#utxo_list",
|
||||
"text": "List unspent transaction outputs\n\nArgs:\n None\n\nReturns:\n (list) List of unspent transaction outputs (UTXOs)\n [\n {\n address : (str) the output address\n amount : (float) unspent amount\n height : (int) block height\n is_claim : (bool) is the tx a claim\n is_coinbase : (bool) is the tx a coinbase tx\n is_support : (bool) is the tx a support\n is_update : (bool) is the tx an update\n nout : (int) nout of the output\n txid : (str) txid of the output\n },\n ...\n ]",
|
||||
"title": "utxo_list"
|
||||
},
|
||||
{
|
||||
"location": "/#version",
|
||||
"text": "Get lbry version information\n\nArgs:\n None\n\nReturns:\n (dict) Dictionary of lbry version information\n {\n 'build': (str) build type (e.g. dev , rc , release ),\n 'ip': (str) remote ip, if available,\n 'lbrynet_version': (str) lbrynet_version,\n 'lbryum_version': (str) lbryum_version,\n 'lbryschema_version': (str) lbryschema_version,\n 'os_release': (str) os release string\n 'os_system': (str) os name\n 'platform': (str) platform string\n 'processor': (str) processor type,\n 'python_version': (str) python version,\n }",
|
||||
"title": "version"
|
||||
},
|
||||
{
|
||||
"location": "/#wallet_balance",
|
||||
"text": "Return the balance of the wallet\n\nArgs:\n 'address' : (str) If provided only the balance for this\n address will be given\n 'include_unconfirmed' : (bool) Include unconfirmed\n\nReturns:\n (float) amount of lbry credits in wallet",
|
||||
"title": "wallet_balance"
|
||||
},
|
||||
{
|
||||
"location": "/#wallet_decrypt",
|
||||
"text": "Decrypt an encrypted wallet, this will remove the wallet password\n\nArgs:\n None\n\nReturns:\n (bool) true if wallet is decrypted, otherwise false",
|
||||
"title": "wallet_decrypt"
|
||||
},
|
||||
{
|
||||
"location": "/#wallet_encrypt",
|
||||
"text": "Encrypt a wallet with a password, if the wallet is already encrypted this will update\nthe password\n\nArgs:\n 'new_password' (required) : (str) password string to be used for encrypting wallet\n\nReturns:\n (bool) true if wallet is decrypted, otherwise false",
|
||||
"title": "wallet_encrypt"
|
||||
},
|
||||
{
|
||||
"location": "/#wallet_is_address_mine",
|
||||
"text": "Checks if an address is associated with the current wallet.\n\nArgs:\n 'address' (required) : (str) address to check\n\nReturns:\n (bool) true, if address is associated with current wallet",
|
||||
"title": "wallet_is_address_mine"
|
||||
},
|
||||
{
|
||||
"location": "/#wallet_list",
|
||||
"text": "List wallet addresses\n\nArgs:\n None\n\nReturns:\n List of wallet addresses",
|
||||
"title": "wallet_list"
|
||||
},
|
||||
{
|
||||
"location": "/#wallet_new_address",
|
||||
"text": "Generate a new wallet address\n\nArgs:\n None\n\nReturns:\n (str) New wallet address in base58",
|
||||
"title": "wallet_new_address"
|
||||
},
|
||||
{
|
||||
"location": "/#wallet_prefill_addresses",
|
||||
"text": "Create new addresses, each containing `amount` credits\n\nArgs:\n 'no_broadcast' : (bool) whether to broadcast or not\n 'num_addresses' (required) : (int) num of addresses to create\n 'amount' (required) : (float) initial amount in each address\n\nReturns:\n (dict) the resulting transaction",
|
||||
"title": "wallet_prefill_addresses"
|
||||
},
|
||||
{
|
||||
"location": "/#wallet_public_key",
|
||||
"text": "Get public key from wallet address\n\nArgs:\n 'address' (required) : (str) address for which to get the public key\n\nReturns:\n (list) list of public keys associated with address.\n Could contain more than one public key if multisig.",
|
||||
"title": "wallet_public_key"
|
||||
},
|
||||
{
|
||||
"location": "/#wallet_send",
|
||||
"text": "Send credits. If given an address, send credits to it. If given a claim id, send a tip\nto the owner of a claim specified by uri. A tip is a claim support where the recipient\nof the support is the claim address for the claim being supported.\n\nArgs:\n 'amount' (required) : (Decimal) amount of credit to send\n 'address' (required) : (str) address to send credits to\n 'claim_id' (required) : (str) claim_id of the claim to send to tip to\n\nReturns:\n If sending to an address:\n (bool) true if payment successfully scheduled\n\n If sending a claim tip:\n (dict) Dictionary containing the result of the support\n {\n txid : (str) txid of resulting support claim\n nout : (int) nout of the resulting support claim\n fee : (float) fee paid for the transaction\n }",
|
||||
"title": "wallet_send"
|
||||
},
|
||||
{
|
||||
"location": "/#wallet_unlock",
|
||||
"text": "Unlock an encrypted wallet\n\nArgs:\n 'password' (required) : (str) password for unlocking wallet\n\nReturns:\n (bool) true if wallet is unlocked, otherwise false",
|
||||
"title": "wallet_unlock"
|
||||
},
|
||||
{
|
||||
"location": "/#wallet_unused_address",
|
||||
"text": "Return an address containing no balance, will create\na new address if there is none.\n\nArgs:\n None\n\nReturns:\n (str) Unused wallet address in base58",
|
||||
"title": "wallet_unused_address"
|
||||
},
|
||||
{
|
||||
"location": "/cli/",
|
||||
"text": "LBRY JSON-RPC API Documentation\n\n\nblob_announce\n\n\nAnnounce blobs to the DHT\n\nUsage:\n blob_announce [\nblob_hash\n | --blob_hash=\nblob_hash\n]\n [\nstream_hash\n | --stream_hash=\nstream_hash\n] | [\nsd_hash\n | --sd_hash=\nsd_hash\n]\n\n\nOptions:\n --blob_hash=\nblob_hash\n : (str) announce a blob, specified by blob_hash\n --stream_hash=\nstream_hash\n : (str) announce all blobs associated with\n stream_hash\n --sd_hash=\nsd_hash\n : (str) announce all blobs associated with\n sd_hash and the sd_hash itself\n\nReturns:\n (bool) true if successful\n\n\n\n\nblob_availability\n\n\nGet blob availability\n\nUsage:\n blob_availability (\nblob_hash\n) [\nsearch_timeout\n | --search_timeout=\nsearch_timeout\n]\n [\nblob_timeout\n | --blob_timeout=\nblob_timeout\n]\n\n\nOptions:\n --blob_hash=\nblob_hash\n : (str) check availability for this blob hash\n --search_timeout=\nsearch_timeout\n : (int) how long to search for peers for the blob\n in the dht\n --blob_timeout=\nblob_timeout\n : (int) how long to try downloading from a peer\n\nReturns:\n (dict) {\n \nis_available\n: \nbool, true if blob is available from a peer from peer list\n\n \nreachable_peers\n: [\nip\n:\nport\n],\n \nunreachable_peers\n: [\nip\n:\nport\n]\n }\n\n\n\n\nblob_delete\n\n\nDelete a blob\n\nUsage:\n blob_delete (\nblob_hash\n | --blob_hash=\nblob_hash)\n\n\nOptions:\n --blob_hash=\nblob_hash\n : (str) blob hash of the blob to delete\n\nReturns:\n (str) Success/fail message\n\n\n\n\nblob_get\n\n\nDownload and return a blob\n\nUsage:\n blob_get (\nblob_hash\n | --blob_hash=\nblob_hash\n) [--timeout=\ntimeout\n]\n [--encoding=\nencoding\n] [--payment_rate_manager=\npayment_rate_manager\n]\n\n\nOptions:\n --blob_hash=\nblob_hash\n : (str) blob hash of the blob to get\n --timeout=\ntimeout\n : (int) timeout in number of seconds\n --encoding=\nencoding\n : (str) by default no attempt at decoding\n is made, can be set to one of the\n following decoders:\n 'json'\n --payment_rate_manager=\npayment_rate_manager\n : (str) if not given the default payment rate\n manager will be used.\n supported alternative rate managers:\n 'only-free'\n\nReturns:\n (str) Success/Fail message or (dict) decoded data\n\n\n\n\nblob_list\n\n\nReturns blob hashes. If not given filters, returns all blobs known by the blob manager\n\nUsage:\n blob_list [--needed] [--finished] [\nuri\n | --uri=\nuri\n]\n [\nstream_hash\n | --stream_hash=\nstream_hash\n]\n [\nsd_hash\n | --sd_hash=\nsd_hash\n]\n [\npage_size\n | --page_size=\npage_size\n]\n [\npage\n | --page=\npage\n]\n\n\nOptions:\n --needed : (bool) only return needed blobs\n --finished : (bool) only return finished blobs\n --uri=\nuri\n : (str) filter blobs by stream in a uri\n --stream_hash=\nstream_hash\n : (str) filter blobs by stream hash\n --sd_hash=\nsd_hash\n : (str) filter blobs by sd hash\n --page_size=\npage_size\n : (int) results page size\n --page=\npage\n : (int) page of results to return\n\nReturns:\n (list) List of blob hashes\n\n\n\n\nblob_reflect\n\n\nReflects specified blobs\n\nUsage:\n blob_reflect (\nblob_hashes\n...) [--reflector_server=\nreflector_server\n]\n\n\nOptions:\n --reflector_server=\nreflector_server\n : (str) reflector address\n\nReturns:\n (list) reflected blob hashes\n\n\n\n\nblob_reflect_all\n\n\nReflects all saved blobs\n\nUsage:\n blob_reflect_all\n\n\nOptions:\n None\n\nReturns:\n (bool) true if successful\n\n\n\n\nblock_show\n\n\nGet contents of a block\n\nUsage:\n block_show (\nblockhash\n | --blockhash=\nblockhash\n) | (\nheight\n | --height=\nheight\n)\n\n\nOptions:\n --blockhash=\nblockhash\n : (str) hash of the block to look up\n --height=\nheight\n : (int) height of the block to look up\n\nReturns:\n (dict) Requested block\n\n\n\n\nchannel_export\n\n\nExport serialized channel signing information for a given certificate claim id\n\nUsage:\n channel_export (\nclaim_id\n | --claim_id=\nclaim_id\n)\n\n\nOptions:\n --claim_id=\nclaim_id\n : (str) Claim ID to export informatiLine truncated
|
||||
"title": "CLI"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#lbry-json-rpc-api-documentation",
|
||||
"text": "",
|
||||
"title": "LBRY JSON-RPC API Documentation"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#blob_announce",
|
||||
"text": "Announce blobs to the DHT\n\nUsage:\n blob_announce [ blob_hash | --blob_hash= blob_hash ]\n [ stream_hash | --stream_hash= stream_hash ] | [ sd_hash | --sd_hash= sd_hash ]\n\n\nOptions:\n --blob_hash= blob_hash : (str) announce a blob, specified by blob_hash\n --stream_hash= stream_hash : (str) announce all blobs associated with\n stream_hash\n --sd_hash= sd_hash : (str) announce all blobs associated with\n sd_hash and the sd_hash itself\n\nReturns:\n (bool) true if successful",
|
||||
"title": "blob_announce"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#blob_availability",
|
||||
"text": "Get blob availability\n\nUsage:\n blob_availability ( blob_hash ) [ search_timeout | --search_timeout= search_timeout ]\n [ blob_timeout | --blob_timeout= blob_timeout ]\n\n\nOptions:\n --blob_hash= blob_hash : (str) check availability for this blob hash\n --search_timeout= search_timeout : (int) how long to search for peers for the blob\n in the dht\n --blob_timeout= blob_timeout : (int) how long to try downloading from a peer\n\nReturns:\n (dict) {\n is_available : bool, true if blob is available from a peer from peer list \n reachable_peers : [ ip : port ],\n unreachable_peers : [ ip : port ]\n }",
|
||||
"title": "blob_availability"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#blob_delete",
|
||||
"text": "Delete a blob\n\nUsage:\n blob_delete ( blob_hash | --blob_hash= blob_hash)\n\n\nOptions:\n --blob_hash= blob_hash : (str) blob hash of the blob to delete\n\nReturns:\n (str) Success/fail message",
|
||||
"title": "blob_delete"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#blob_get",
|
||||
"text": "Download and return a blob\n\nUsage:\n blob_get ( blob_hash | --blob_hash= blob_hash ) [--timeout= timeout ]\n [--encoding= encoding ] [--payment_rate_manager= payment_rate_manager ]\n\n\nOptions:\n --blob_hash= blob_hash : (str) blob hash of the blob to get\n --timeout= timeout : (int) timeout in number of seconds\n --encoding= encoding : (str) by default no attempt at decoding\n is made, can be set to one of the\n following decoders:\n 'json'\n --payment_rate_manager= payment_rate_manager : (str) if not given the default payment rate\n manager will be used.\n supported alternative rate managers:\n 'only-free'\n\nReturns:\n (str) Success/Fail message or (dict) decoded data",
|
||||
"title": "blob_get"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#blob_list",
|
||||
"text": "Returns blob hashes. If not given filters, returns all blobs known by the blob manager\n\nUsage:\n blob_list [--needed] [--finished] [ uri | --uri= uri ]\n [ stream_hash | --stream_hash= stream_hash ]\n [ sd_hash | --sd_hash= sd_hash ]\n [ page_size | --page_size= page_size ]\n [ page | --page= page ]\n\n\nOptions:\n --needed : (bool) only return needed blobs\n --finished : (bool) only return finished blobs\n --uri= uri : (str) filter blobs by stream in a uri\n --stream_hash= stream_hash : (str) filter blobs by stream hash\n --sd_hash= sd_hash : (str) filter blobs by sd hash\n --page_size= page_size : (int) results page size\n --page= page : (int) page of results to return\n\nReturns:\n (list) List of blob hashes",
|
||||
"title": "blob_list"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#blob_reflect",
|
||||
"text": "Reflects specified blobs\n\nUsage:\n blob_reflect ( blob_hashes ...) [--reflector_server= reflector_server ]\n\n\nOptions:\n --reflector_server= reflector_server : (str) reflector address\n\nReturns:\n (list) reflected blob hashes",
|
||||
"title": "blob_reflect"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#blob_reflect_all",
|
||||
"text": "Reflects all saved blobs\n\nUsage:\n blob_reflect_all\n\n\nOptions:\n None\n\nReturns:\n (bool) true if successful",
|
||||
"title": "blob_reflect_all"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#block_show",
|
||||
"text": "Get contents of a block\n\nUsage:\n block_show ( blockhash | --blockhash= blockhash ) | ( height | --height= height )\n\n\nOptions:\n --blockhash= blockhash : (str) hash of the block to look up\n --height= height : (int) height of the block to look up\n\nReturns:\n (dict) Requested block",
|
||||
"title": "block_show"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#channel_export",
|
||||
"text": "Export serialized channel signing information for a given certificate claim id\n\nUsage:\n channel_export ( claim_id | --claim_id= claim_id )\n\n\nOptions:\n --claim_id= claim_id : (str) Claim ID to export information about\n\nReturns:\n (str) Serialized certificate information",
|
||||
"title": "channel_export"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#channel_import",
|
||||
"text": "Import serialized channel signing information (to allow signing new claims to the channel)\n\nUsage:\n channel_import ( serialized_certificate_info | --serialized_certificate_info= serialized_certificate_info )\n\n\nOptions:\n --serialized_certificate_info= serialized_certificate_info : (str) certificate info\n\nReturns:\n (dict) Result dictionary",
|
||||
"title": "channel_import"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#channel_list",
|
||||
"text": "Get certificate claim infos for channels that can be published to\n\nUsage:\n channel_list\n\n\nOptions:\n None\n\nReturns:\n (list) ClaimDict, includes 'is_mine' field to indicate if the certificate claim\n is in the wallet.",
|
||||
"title": "channel_list"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#channel_new",
|
||||
"text": "Generate a publisher key and create a new '@' prefixed certificate claim\n\nUsage:\n channel_new ( channel_name | --channel_name= channel_name )\n ( amount | --amount= amount )\n\n\nOptions:\n --channel_name= channel_name : (str) name of the channel prefixed with '@'\n --amount= amount : (float) bid amount on the channel\n\nReturns:\n (dict) Dictionary containing result of the claim\n {\n 'tx' : (str) hex encoded transaction\n 'txid' : (str) txid of resulting claim\n 'nout' : (int) nout of the resulting claim\n 'fee' : (float) fee paid for the claim transaction\n 'claim_id' : (str) claim ID of the resulting claim\n }",
|
||||
"title": "channel_new"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#claim_abandon",
|
||||
"text": "Abandon a name and reclaim credits from the claim\n\nUsage:\n claim_abandon [ claim_id | --claim_id= claim_id ]\n [ txid | --txid= txid ] [ nout | --nout= nout ]\n\n\nOptions:\n --claim_id= claim_id : (str) claim_id of the claim to abandon\n --txid= txid : (str) txid of the claim to abandon\n --nout= nout : (int) nout of the claim to abandon\n\nReturns:\n (dict) Dictionary containing result of the claim\n {\n txid : (str) txid of resulting transaction\n fee : (float) fee paid for the transaction\n }",
|
||||
"title": "claim_abandon"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#claim_list",
|
||||
"text": "List current claims and information about them for a given name\n\nUsage:\n claim_list ( name | --name= name )\n\n\nOptions:\n --name= name : (str) name of the claim to list info about\n\nReturns:\n (dict) State of claims assigned for the name\n {\n 'claims': (list) list of claims for the name\n [\n {\n 'amount': (float) amount assigned to the claim\n 'effective_amount': (float) total amount assigned to the claim,\n including supports\n 'claim_id': (str) claim ID of the claim\n 'height': (int) height of block containing the claim\n 'txid': (str) txid of the claim\n 'nout': (int) nout of the claim\n 'permanent_url': (str) permanent url of the claim,\n 'supports': (list) a list of supports attached to the claim\n 'value': (str) the value of the claim\n },\n ]\n 'supports_without_claims': (list) supports without any claims attached to them\n 'last_takeover_height': (int) the height of last takeover for the name\n }",
|
||||
"title": "claim_list"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#claim_list_by_channel",
|
||||
"text": "Get paginated claims in a channel specified by a channel uri\n\nUsage:\n claim_list_by_channel ( uri | --uri= uri ) [ uris ...] [--page= page ]\n [--page_size= page_size ]\n\n\nOptions:\n --uri= uri : (str) uri of the channel\n --uris= uris : (list) uris of the channel\n --page= page : (int) which page of results to return where page 1 is the first\n page, defaults to no pages\n --page_size= page_size : (int) number of results in a page, default of 10\n\nReturns:\n {\n resolved channel uri: {\n If there was an error:\n 'error': (str) error message\n\n 'claims_in_channel': the total number of results for the channel,\n\n If a page of results was requested:\n 'returned_page': page number returned,\n 'claims_in_channel': [\n {\n 'absolute_channel_position': (int) claim index number in sorted list of\n claims which assert to be part of the\n channel\n 'address': (str) claim address,\n 'amount': (float) claim amount,\n 'effective_amount': (float) claim amount including supports,\n 'claim_id': (str) claim id,\n 'claim_sequence': (int) claim sequence number,\n 'decoded_claim': (bool) whether or not the claim value was decoded,\n 'height': (int) claim height,\n 'depth': (int) claim depth,\n 'has_signature': (bool) included if decoded_claim\n 'name': (str) claim name,\n 'supports: (list) list of supports [{'txid': (str) txid,\n 'nout': (int) nout,\n 'amount': (float) amount}],\n 'txid': (str) claim txid,\n 'nout': (str) claim nout,\n 'signature_is_valid': (bool), included if has_signature,\n 'value': ClaimDict if decoded, otherwise hex string\n }\n ],\n }\n }",
|
||||
"title": "claim_list_by_channel"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#claim_list_mine",
|
||||
"text": "List my name claims\n\nUsage:\n claim_list_mine\n\n\nOptions:\n None\n\nReturns:\n (list) List of name claims owned by user\n [\n {\n 'address': (str) address that owns the claim\n 'amount': (float) amount assigned to the claim\n 'blocks_to_expiration': (int) number of blocks until it expires\n 'category': (str) claim , update , or support \n 'claim_id': (str) claim ID of the claim\n 'confirmations': (int) number of blocks of confirmations for the claim\n 'expiration_height': (int) the block height which the claim will expire\n 'expired': (bool) true if expired, false otherwise\n 'height': (int) height of the block containing the claim\n 'is_spent': (bool) true if claim is abandoned, false otherwise\n 'name': (str) name of the claim\n 'permanent_url': (str) permanent url of the claim,\n 'txid': (str) txid of the claim\n 'nout': (int) nout of the claim\n 'value': (str) value of the claim\n },\n ]",
|
||||
"title": "claim_list_mine"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#claim_new_support",
|
||||
"text": "Support a name claim\n\nUsage:\n claim_new_support ( name | --name= name ) ( claim_id | --claim_id= claim_id )\n ( amount | --amount= amount )\n\n\nOptions:\n --name= name : (str) name of the claim to support\n --claim_id= claim_id : (str) claim_id of the claim to support\n --amount= amount : (float) amount of support\n\nReturns:\n (dict) Dictionary containing result of the claim\n {\n txid : (str) txid of resulting support claim\n nout : (int) nout of the resulting support claim\n fee : (float) fee paid for the transaction\n }",
|
||||
"title": "claim_new_support"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#claim_renew",
|
||||
"text": "Renew claim(s) or support(s)\n\nUsage:\n claim_renew ( outpoint | --outpoint= outpoint ) | ( height | --height= height )\n\n\nOptions:\n --outpoint= outpoint : (str) outpoint of the claim to renew\n --height= height : (str) update claims expiring before or at this block height\n\nReturns:\n (dict) Dictionary where key is the the original claim's outpoint and\n value is the result of the renewal\n {\n outpoint:{\n\n 'tx' : (str) hex encoded transaction\n 'txid' : (str) txid of resulting claim\n 'nout' : (int) nout of the resulting claim\n 'fee' : (float) fee paid for the claim transaction\n 'claim_id' : (str) claim ID of the resulting claim\n },\n }",
|
||||
"title": "claim_renew"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#claim_send_to_address",
|
||||
"text": "Send a name claim to an address\n\nUsage:\n claim_send_to_address ( claim_id | --claim_id= claim_id )\n ( address | --address= address )\n [ amount | --amount= amount ]\n\n\nOptions:\n --claim_id= claim_id : (str) claim_id to send\n --address= address : (str) address to send the claim to\n --amount amount : (int) Amount of credits to claim name for, defaults to the current amount\n on the claim\n\nReturns:\n (dict) Dictionary containing result of the claim\n {\n 'tx' : (str) hex encoded transaction\n 'txid' : (str) txid of resulting claim\n 'nout' : (int) nout of the resulting claim\n 'fee' : (float) fee paid for the claim transaction\n 'claim_id' : (str) claim ID of the resulting claim\n }",
|
||||
"title": "claim_send_to_address"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#claim_show",
|
||||
"text": "Resolve claim info from txid/nout or with claim ID\n\nUsage:\n claim_show [ txid | --txid= txid ] [ nout | --nout= nout ]\n [ claim_id | --claim_id= claim_id ]\n\n\nOptions:\n --txid= txid : (str) look for claim with this txid, nout must\n also be specified\n --nout= nout : (int) look for claim with this nout, txid must\n also be specified\n --claim_id= claim_id : (str) look for claim with this claim id\n\nReturns:\n (dict) Dictionary containing claim info as below,\n\n {\n 'txid': (str) txid of claim\n 'nout': (int) nout of claim\n 'amount': (float) amount of claim\n 'value': (str) value of claim\n 'height' : (int) height of claim takeover\n 'claim_id': (str) claim ID of claim\n 'supports': (list) list of supports associated with claim\n }\n\n if claim cannot be resolved, dictionary as below will be returned\n\n {\n 'error': (str) reason for error\n }",
|
||||
"title": "claim_show"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#cli_test_command",
|
||||
"text": "This command is only for testing the CLI argument parsing\nUsage:\n cli_test_command [--a_arg] [--b_arg] ( pos_arg | --pos_arg= pos_arg )\n [ pos_args ...] [--pos_arg2= pos_arg2 ]\n [--pos_arg3= pos_arg3 ]\n\n\nOptions:\n --a_arg : (bool) a arg\n --b_arg : (bool) b arg\n --pos_arg= pos_arg : (int) pos arg\n --pos_args= pos_args : (int) pos args\n --pos_arg2= pos_arg2 : (int) pos arg 2\n --pos_arg3= pos_arg3 : (int) pos arg 3\n\nReturns:\n pos args",
|
||||
"title": "cli_test_command"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#commands",
|
||||
"text": "Return a list of available commands\n\nUsage:\n commands\n\n\nOptions:\n None\n\nReturns:\n (list) list of available commands",
|
||||
"title": "commands"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#daemon_stop",
|
||||
"text": "Stop lbrynet-daemon\n\nUsage:\n daemon_stop\n\n\nOptions:\n None\n\nReturns:\n (string) Shutdown message",
|
||||
"title": "daemon_stop"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#file_delete",
|
||||
"text": "Delete a LBRY file\n\nUsage:\n file_delete [--delete_from_download_dir] [--delete_all] [--sd_hash= sd_hash ] [--file_name= file_name ]\n [--stream_hash= stream_hash ] [--rowid= rowid ] [--claim_id= claim_id ] [--txid= txid ]\n [--nout= nout ] [--claim_name= claim_name ] [--channel_claim_id= channel_claim_id ]\n [--channel_name= channel_name ]\n\n\nOptions:\n --delete_from_download_dir : (bool) delete file from download directory,\n instead of just deleting blobs\n --delete_all : (bool) if there are multiple matching files,\n allow the deletion of multiple files.\n Otherwise do not delete anything.\n --sd_hash= sd_hash : (str) delete by file sd hash\n --file_name file_name : (str) delete by file name in downloads folder\n --stream_hash= stream_hash : (str) delete by file stream hash\n --rowid= rowid : (int) delete by file row id\n --claim_id= claim_id : (str) delete by file claim id\n --txid= txid : (str) delete by file claim txid\n --nout= nout : (int) delete by file claim nout\n --claim_name= claim_name : (str) delete by file claim name\n --channel_claim_id= channel_claim_id : (str) delete by file channel claim id\n --channel_name= channel_name : (str) delete by file channel claim name\n\nReturns:\n (bool) true if deletion was successful",
|
||||
"title": "file_delete"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#file_list",
|
||||
"text": "List files limited by optional filters\n\nUsage:\n file_list [--sd_hash= sd_hash ] [--file_name= file_name ] [--stream_hash= stream_hash ]\n [--rowid= rowid ] [--claim_id= claim_id ] [--outpoint= outpoint ] [--txid= txid ] [--nout= nout ]\n [--channel_claim_id= channel_claim_id ] [--channel_name= channel_name ]\n [--claim_name= claim_name ] [--full_status] [--sort= sort_method ...]\n\n\nOptions:\n --sd_hash= sd_hash : (str) get file with matching sd hash\n --file_name= file_name : (str) get file with matching file name in the\n downloads folder\n --stream_hash= stream_hash : (str) get file with matching stream hash\n --rowid= rowid : (int) get file with matching row id\n --claim_id= claim_id : (str) get file with matching claim id\n --outpoint= outpoint : (str) get file with matching claim outpoint\n --txid= txid : (str) get file with matching claim txid\n --nout= nout : (int) get file with matching claim nout\n --channel_claim_id= channel_claim_id : (str) get file with matching channel claim id\n --channel_name= channel_name : (str) get file with matching channel name\n --claim_name= claim_name : (str) get file with matching claim name\n --full_status : (bool) full status, populate the\n 'message' and 'size' fields\n --sort= sort_method : (str) sort by any property, like 'file_name'\n or 'metadata.author'; to specify direction\n append ',asc' or ',desc'\n\nReturns:\n (list) List of files\n\n [\n {\n 'completed': (bool) true if download is completed,\n 'file_name': (str) name of file,\n 'download_directory': (str) download directory,\n 'points_paid': (float) credit paid to download file,\n 'stopped': (bool) true if download is stopped,\n 'stream_hash': (str) stream hash of file,\n 'stream_name': (str) stream name ,\n 'suggested_file_name': (str) suggested file name,\n 'sd_hash': (str) sd hash of file,\n 'download_path': (str) download path of file,\n 'mime_type': (str) mime type of file,\n 'key': (str) key attached to file,\n 'total_bytes': (int) file size in bytes, None if full_status is false,\n 'written_bytes': (int) written size in bytes,\n 'blobs_completed': (int) num_completed, None if full_status is false,\n 'blobs_in_stream': (int) None if full_status is false,\n 'status': (str) downloader status, None if full_status is false,\n 'claim_id': (str) None if full_status is false or if claim is not found,\n 'outpoint': (str) None if full_status is false or if claim is not found,\n 'txid': (str) None if full_status is false or if claim is not found,\n 'nout': (int) None if full_status is false or if claim is not found,\n 'metadata': (dict) None if full_status is false or if claim is not found,\n 'channel_claim_id': (str) None if full_status is false or if claim is not found or signed,\n 'channel_name': (str) None if full_status is false or if claim is not found or signed,\n 'claim_name': (str) None if full_status is false or if claim is not found\n },\n ]",
|
||||
"title": "file_list"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#file_reflect",
|
||||
"text": "Reflect all the blobs in a file matching the filter criteria\n\nUsage:\n file_reflect [--sd_hash= sd_hash ] [--file_name= file_name ]\n [--stream_hash= stream_hash ] [--rowid= rowid ]\n [--reflector= reflector ]\n\n\nOptions:\n --sd_hash= sd_hash : (str) get file with matching sd hash\n --file_name= file_name : (str) get file with matching file name in the\n downloads folder\n --stream_hash= stream_hash : (str) get file with matching stream hash\n --rowid= rowid : (int) get file with matching row id\n --reflector= reflector : (str) reflector server, ip address or url\n by default choose a server from the config\n\nReturns:\n (list) list of blobs reflected",
|
||||
"title": "file_reflect"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#file_set_status",
|
||||
"text": "Start or stop downloading a file\n\nUsage:\n file_set_status ( status | --status= status ) [--sd_hash= sd_hash ]\n [--file_name= file_name ] [--stream_hash= stream_hash ] [--rowid= rowid ]\n\n\nOptions:\n --status= status : (str) one of start or stop \n --sd_hash= sd_hash : (str) set status of file with matching sd hash\n --file_name= file_name : (str) set status of file with matching file name in the\n downloads folder\n --stream_hash= stream_hash : (str) set status of file with matching stream hash\n --rowid= rowid : (int) set status of file with matching row id\n\nReturns:\n (str) Confirmation message",
|
||||
"title": "file_set_status"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#get",
|
||||
"text": "Download stream from a LBRY name.\n\nUsage:\n get uri [ file_name | --file_name= file_name ] [ timeout | --timeout= timeout ]\n\n\n\nOptions:\n --uri= uri : (str) uri of the content to download\n --file_name= file_name : (str) specified name for the downloaded file\n --timeout= timeout : (int) download timeout in number of seconds\n\nReturns:\n (dict) Dictionary containing information about the stream\n {\n 'completed': (bool) true if download is completed,\n 'file_name': (str) name of file,\n 'download_directory': (str) download directory,\n 'points_paid': (float) credit paid to download file,\n 'stopped': (bool) true if download is stopped,\n 'stream_hash': (str) stream hash of file,\n 'stream_name': (str) stream name ,\n 'suggested_file_name': (str) suggested file name,\n 'sd_hash': (str) sd hash of file,\n 'download_path': (str) download path of file,\n 'mime_type': (str) mime type of file,\n 'key': (str) key attached to file,\n 'total_bytes': (int) file size in bytes, None if full_status is false,\n 'written_bytes': (int) written size in bytes,\n 'blobs_completed': (int) num_completed, None if full_status is false,\n 'blobs_in_stream': (int) None if full_status is false,\n 'status': (str) downloader status, None if full_status is false,\n 'claim_id': (str) claim id,\n 'outpoint': (str) claim outpoint string,\n 'txid': (str) claim txid,\n 'nout': (int) claim nout,\n 'metadata': (dict) claim metadata,\n 'channel_claim_id': (str) None if claim is not signed\n 'channel_name': (str) None if claim is not signed\n 'claim_name': (str) claim name\n }",
|
||||
"title": "get"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#help",
|
||||
"text": "Return a useful message for an API command\n\nUsage:\n help [ command | --command= command ]\n\n\nOptions:\n --command= command : (str) command to retrieve documentation for\n\nReturns:\n (str) Help message",
|
||||
"title": "help"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#peer_list",
|
||||
"text": "Get peers for blob hash\n\nUsage:\n peer_list ( blob_hash | --blob_hash= blob_hash ) [ timeout | --timeout= timeout ]\n\n\nOptions:\n --blob_hash= blob_hash : (str) find available peers for this blob hash\n --timeout= timeout : (int) peer search timeout in seconds\n\nReturns:\n (list) List of contact dictionaries {'host': peer ip , 'port': peer port , 'node_id': peer node id }",
|
||||
"title": "peer_list"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#peer_ping",
|
||||
"text": "Send a kademlia ping to the specified peer. If address and port are provided the peer is directly pinged,\nif not provided the peer is located first.\n\nUsage:\n peer_ping ( node_id | --node_id= node_id ) [ address | --address= address ] [ port | --port= port ]\n\n\nOptions:\n --address= address : (str) ip address of the peer\n --port= port : (int) udp port of the peer\n\nReturns:\n (str) pong, or {'error': error message } if an error is encountered",
|
||||
"title": "peer_ping"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#publish",
|
||||
"text": "Make a new name claim and publish associated data to lbrynet,\nupdate over existing claim if user already has a claim for name.\n\nFields required in the final Metadata are:\n 'title'\n 'description'\n 'author'\n 'language'\n 'license'\n 'nsfw'\n\nMetadata can be set by either using the metadata argument or by setting individual arguments\nfee, title, description, author, language, license, license_url, thumbnail, preview, nsfw,\nor sources. Individual arguments will overwrite the fields specified in metadata argument.\n\nUsage:\n publish ( name | --name= name ) ( bid | --bid= bid ) [--metadata= metadata ]\n [--file_path= file_path ] [--fee= fee ] [--title= title ]\n [--description= description ] [--author= author ] [--language= language ]\n [--license= license ] [--license_url= license_url ] [--thumbnail= thumbnail ]\n [--preview= preview ] [--nsfw= nsfw ] [--sources= sources ]\n [--channel_name= channel_name ] [--channel_id= channel_id ]\n [--claim_address= claim_address ] [--change_address= change_address ]\n\n\nOptions:\n --name= name : (str) name of the content\n --bid= bid : (decimal) amount to back the claim\n --metadata= metadata : (dict) ClaimDict to associate with the claim.\n --file_path= file_path : (str) path to file to be associated with name. If provided,\n a lbry stream of this file will be used in 'sources'.\n If no path is given but a sources dict is provided,\n it will be used. If neither are provided, an\n error is raised.\n --fee= fee : (dict) Dictionary representing key fee to download content:\n {\n 'currency': currency_symbol,\n 'amount': decimal,\n 'address': str, optional\n }\n supported currencies: LBC, USD, BTC\n If an address is not provided a new one will be\n automatically generated. Default fee is zero.\n --title= title : (str) title of the publication\n --description= description : (str) description of the publication\n --author= author : (str) author of the publication\n --language= language : (str) language of the publication\n --license= license : (str) publication license\n --license_url= license_url : (str) publication license url\n --thumbnail= thumbnail : (str) thumbnail url\n --preview= preview : (str) preview url\n --nsfw= nsfw : (bool) whether the content is nsfw\n --sources= sources : (str) {'lbry_sd_hash': sd_hash} specifies sd hash of file\n --channel_name= channel_name : (str) name of the publisher channel name in the wallet\n --channel_id= channel_id : (str) claim id of the publisher channel, does not check\n for channel claim being in the wallet. This allows\n publishing to a channel where only the certificate\n private key is in the wallet.\n --claim_address= claim_address : (str) address where the claim is sent to, if not specified\n new address will automatically be created\n\nReturns:\n (dict) Dictionary containing result of the claim\n {\n 'tx' : (str) hex encoded transaction\n 'txid' : (str) txid of resulting claim\n 'nout' : (int) nout of the resulting claim\n 'fee' : (decimal) fee paid for the claim transaction\n 'claim_id' : (str) claim ID of the resulting claim\n }",
|
||||
"title": "publish"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#report_bug",
|
||||
"text": "Report a bug to slack\n\nUsage:\n report_bug ( message | --message= message )\n\n\nOptions:\n --message= message : (str) Description of the bug\n\nReturns:\n (bool) true if successful",
|
||||
"title": "report_bug"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#resolve",
|
||||
"text": "Resolve given LBRY URIs\n\nUsage:\n resolve [--force] ( uri | --uri= uri ) [ uris ...]\n\n\nOptions:\n --force : (bool) force refresh and ignore cache\n --uri= uri : (str) uri to resolve\n --uris= uris : (list) uris to resolve\n\nReturns:\n Dictionary of results, keyed by uri\n ' uri ': {\n If a resolution error occurs:\n 'error': Error message\n\n If the uri resolves to a channel or a claim in a channel:\n 'certificate': {\n 'address': (str) claim address,\n 'amount': (float) claim amount,\n 'effective_amount': (float) claim amount including supports,\n 'claim_id': (str) claim id,\n 'claim_sequence': (int) claim sequence number,\n 'decoded_claim': (bool) whether or not the claim value was decoded,\n 'height': (int) claim height,\n 'depth': (int) claim depth,\n 'has_signature': (bool) included if decoded_claim\n 'name': (str) claim name,\n 'permanent_url': (str) permanent url of the certificate claim,\n 'supports: (list) list of supports [{'txid': (str) txid,\n 'nout': (int) nout,\n 'amount': (float) amount}],\n 'txid': (str) claim txid,\n 'nout': (str) claim nout,\n 'signature_is_valid': (bool), included if has_signature,\n 'value': ClaimDict if decoded, otherwise hex string\n }\n\n If the uri resolves to a channel:\n 'claims_in_channel': (int) number of claims in the channel,\n\n If the uri resolves to a claim:\n 'claim': {\n 'address': (str) claim address,\n 'amount': (float) claim amount,\n 'effective_amount': (float) claim amount including supports,\n 'claim_id': (str) claim id,\n 'claim_sequence': (int) claim sequence number,\n 'decoded_claim': (bool) whether or not the claim value was decoded,\n 'height': (int) claim height,\n 'depth': (int) claim depth,\n 'has_signature': (bool) included if decoded_claim\n 'name': (str) claim name,\n 'permanent_url': (str) permanent url of the claim,\n 'channel_name': (str) channel name if claim is in a channel\n 'supports: (list) list of supports [{'txid': (str) txid,\n 'nout': (int) nout,\n 'amount': (float) amount}]\n 'txid': (str) claim txid,\n 'nout': (str) claim nout,\n 'signature_is_valid': (bool), included if has_signature,\n 'value': ClaimDict if decoded, otherwise hex string\n }\n }",
|
||||
"title": "resolve"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#resolve_name",
|
||||
"text": "Resolve stream info from a LBRY name\n\nUsage:\n resolve_name ( name | --name= name ) [--force]\n\n\nOptions:\n --name= name : (str) the name to resolve\n --force : (bool) force refresh and do not check cache\n\nReturns:\n (dict) Metadata dictionary from name claim, None if the name is not\n resolvable",
|
||||
"title": "resolve_name"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#routing_table_get",
|
||||
"text": "Get DHT routing information\n\nUsage:\n routing_table_get\n\n\nOptions:\n None\n\nReturns:\n (dict) dictionary containing routing and contact information\n {\n buckets : {\n bucket index : [\n {\n address : (str) peer address,\n port : (int) peer udp port\n node_id : (str) peer node id,\n blobs : (list) blob hashes announced by peer\n }\n ]\n },\n contacts : (list) contact node ids,\n blob_hashes : (list) all of the blob hashes stored by peers in the list of buckets,\n node_id : (str) the local dht node id\n }",
|
||||
"title": "routing_table_get"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#settings_get",
|
||||
"text": "Get daemon settings\n\nUsage:\n settings_get\n\n\nOptions:\n None\n\nReturns:\n (dict) Dictionary of daemon settings\n See ADJUSTABLE_SETTINGS in lbrynet/conf.py for full list of settings",
|
||||
"title": "settings_get"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#settings_set",
|
||||
"text": "Set daemon settings\n\nUsage:\n settings_set [--download_directory= download_directory ]\n [--data_rate= data_rate ]\n [--download_timeout= download_timeout ]\n [--peer_port= peer_port ]\n [--max_key_fee= max_key_fee ]\n [--disable_max_key_fee= disable_max_key_fee ]\n [--use_upnp= use_upnp ]\n [--run_reflector_server= run_reflector_server ]\n [--cache_time= cache_time ]\n [--reflect_uploads= reflect_uploads ]\n [--share_usage_data= share_usage_data ]\n [--peer_search_timeout= peer_search_timeout ]\n [--sd_download_timeout= sd_download_timeout ]\n [--auto_renew_claim_height_delta= auto_renew_claim_height_delta ]\n\n\nOptions:\n --download_directory= download_directory : (str) path of download directory\n --data_rate= data_rate : (float) 0.0001\n --download_timeout= download_timeout : (int) 180\n --peer_port= peer_port : (int) 3333\n --max_key_fee= max_key_fee : (dict) maximum key fee for downloads,\n in the format:\n {\n 'currency': currency_symbol ,\n 'amount': amount \n }.\n In the CLI, it must be an escaped JSON string\n Supported currency symbols: LBC, USD, BTC\n --disable_max_key_fee= disable_max_key_fee : (bool) False\n --use_upnp= use_upnp : (bool) True\n --run_reflector_server= run_reflector_server : (bool) False\n --cache_time= cache_time : (int) 150\n --reflect_uploads= reflect_uploads : (bool) True\n --share_usage_data= share_usage_data : (bool) True\n --peer_search_timeout= peer_search_timeout : (int) 3\n --sd_download_timeout= sd_download_timeout : (int) 3\n --auto_renew_claim_height_delta= auto_renew_claim_height_delta : (int) 0\n claims set to expire within this many blocks will be\n automatically renewed after startup (if set to 0, renews\n will not be made automatically)\n\nReturns:\n (dict) Updated dictionary of daemon settings",
|
||||
"title": "settings_set"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#status",
|
||||
"text": "Get daemon status\n\nUsage:\n status\n\n\nOptions:\n None\n\nReturns:\n (dict) lbrynet-daemon status\n {\n 'installation_id': (str) installation id - base58,\n 'is_running': (bool),\n 'is_first_run': bool,\n 'skipped_components': (list) [names of skipped components (str)],\n 'startup_status': { Does not include components which have been skipped\n 'database': (bool),\n 'wallet': (bool),\n 'session': (bool),\n 'dht': (bool),\n 'hash_announcer': (bool),\n 'stream_identifier': (bool),\n 'file_manager': (bool),\n 'blob_manager': (bool),\n 'blockchain_headers': (bool),\n 'peer_protocol_server': (bool),\n 'reflector': (bool),\n 'upnp': (bool),\n 'exchange_rate_manager': (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 },\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 },\n 'hash_announcer': {\n 'announce_queue_size': (int) number of blobs currently queued to be announced\n },\n 'file_manager': {\n 'managed_files': (int) count of files in the file manager,\n }\n }",
|
||||
"title": "status"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#stream_availability",
|
||||
"text": "Get stream availability for lbry uri\n\nUsage:\n stream_availability ( uri | --uri= uri )\n [ search_timeout | --search_timeout= search_timeout ]\n [ blob_timeout | --blob_timeout= blob_timeout ]\n\n\nOptions:\n --uri= uri : (str) check availability for this uri\n --search_timeout= search_timeout : (int) how long to search for peers for the blob\n in the dht\n --blob_timeout= blob_timeout : (int) how long to try downloading from a peer\n\nReturns:\n (dict) {\n 'is_available': bool ,\n 'did_decode': bool ,\n 'did_resolve': bool ,\n 'is_stream': bool ,\n 'num_blobs_in_stream': int ,\n 'sd_hash': str ,\n 'sd_blob_availability': dict see `blob_availability`,\n 'head_blob_hash': str ,\n 'head_blob_availability': dict see `blob_availability`,\n 'use_upnp': bool ,\n 'upnp_redirect_is_set': bool ,\n 'error': None | str error message\n }",
|
||||
"title": "stream_availability"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#stream_cost_estimate",
|
||||
"text": "Get estimated cost for a lbry stream\n\nUsage:\n stream_cost_estimate ( uri | --uri= uri ) [ size | --size= size ]\n\n\nOptions:\n --uri= uri : (str) uri to use\n --size= size : (float) stream size in bytes. if provided an sd blob won't be\n downloaded.\n\nReturns:\n (float) Estimated cost in lbry credits, returns None if uri is not\n resolvable",
|
||||
"title": "stream_cost_estimate"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#transaction_list",
|
||||
"text": "List transactions belonging to wallet\n\nUsage:\n transaction_list\n\n\nOptions:\n None\n\nReturns:\n (list) List of transactions\n\n {\n claim_info : (list) claim info if in txn [{\n address : (str) address of claim,\n balance_delta : (float) bid amount,\n amount : (float) claim amount,\n claim_id : (str) claim id,\n claim_name : (str) claim name,\n nout : (int) nout\n }],\n abandon_info : (list) abandon info if in txn [{\n address : (str) address of abandoned claim,\n balance_delta : (float) returned amount,\n amount : (float) claim amount,\n claim_id : (str) claim id,\n claim_name : (str) claim name,\n nout : (int) nout\n }],\n confirmations : (int) number of confirmations for the txn,\n date : (str) date and time of txn,\n fee : (float) txn fee,\n support_info : (list) support info if in txn [{\n address : (str) address of support,\n balance_delta : (float) support amount,\n amount : (float) support amount,\n claim_id : (str) claim id,\n claim_name : (str) claim name,\n is_tip : (bool),\n nout : (int) nout\n }],\n timestamp : (int) timestamp,\n txid : (str) txn id,\n update_info : (list) update info if in txn [{\n address : (str) address of claim,\n balance_delta : (float) credited/debited\n amount : (float) absolute amount,\n claim_id : (str) claim id,\n claim_name : (str) claim name,\n nout : (int) nout\n }],\n value : (float) value of txn\n }",
|
||||
"title": "transaction_list"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#transaction_show",
|
||||
"text": "Get a decoded transaction from a txid\n\nUsage:\n transaction_show ( txid | --txid= txid )\n\n\nOptions:\n --txid= txid : (str) txid of the transaction\n\nReturns:\n (dict) JSON formatted transaction",
|
||||
"title": "transaction_show"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#utxo_list",
|
||||
"text": "List unspent transaction outputs\n\nUsage:\n utxo_list\n\n\nOptions:\n None\n\nReturns:\n (list) List of unspent transaction outputs (UTXOs)\n [\n {\n address : (str) the output address\n amount : (float) unspent amount\n height : (int) block height\n is_claim : (bool) is the tx a claim\n is_coinbase : (bool) is the tx a coinbase tx\n is_support : (bool) is the tx a support\n is_update : (bool) is the tx an update\n nout : (int) nout of the output\n txid : (str) txid of the output\n },\n ...\n ]",
|
||||
"title": "utxo_list"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#version",
|
||||
"text": "Get lbry version information\n\nUsage:\n version\n\n\nOptions:\n None\n\nReturns:\n (dict) Dictionary of lbry version information\n {\n 'build': (str) build type (e.g. dev , rc , release ),\n 'ip': (str) remote ip, if available,\n 'lbrynet_version': (str) lbrynet_version,\n 'lbryum_version': (str) lbryum_version,\n 'lbryschema_version': (str) lbryschema_version,\n 'os_release': (str) os release string\n 'os_system': (str) os name\n 'platform': (str) platform string\n 'processor': (str) processor type,\n 'python_version': (str) python version,\n }",
|
||||
"title": "version"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#wallet_balance",
|
||||
"text": "Return the balance of the wallet\n\nUsage:\n wallet_balance [ address | --address= address ] [--include_unconfirmed]\n\n\nOptions:\n --address= address : (str) If provided only the balance for this\n address will be given\n --include_unconfirmed : (bool) Include unconfirmed\n\nReturns:\n (float) amount of lbry credits in wallet",
|
||||
"title": "wallet_balance"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#wallet_decrypt",
|
||||
"text": "Decrypt an encrypted wallet, this will remove the wallet password\n\nUsage:\n wallet_decrypt\n\n\nOptions:\n None\n\nReturns:\n (bool) true if wallet is decrypted, otherwise false",
|
||||
"title": "wallet_decrypt"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#wallet_encrypt",
|
||||
"text": "Encrypt a wallet with a password, if the wallet is already encrypted this will update\nthe password\n\nUsage:\n wallet_encrypt ( new_password | --new_password= new_password )\n\n\nOptions:\n --new_password= new_password : (str) password string to be used for encrypting wallet\n\nReturns:\n (bool) true if wallet is decrypted, otherwise false",
|
||||
"title": "wallet_encrypt"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#wallet_is_address_mine",
|
||||
"text": "Checks if an address is associated with the current wallet.\n\nUsage:\n wallet_is_address_mine ( address | --address= address )\n\n\nOptions:\n --address= address : (str) address to check\n\nReturns:\n (bool) true, if address is associated with current wallet",
|
||||
"title": "wallet_is_address_mine"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#wallet_list",
|
||||
"text": "List wallet addresses\n\nUsage:\n wallet_list\n\n\nOptions:\n None\n\nReturns:\n List of wallet addresses",
|
||||
"title": "wallet_list"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#wallet_new_address",
|
||||
"text": "Generate a new wallet address\n\nUsage:\n wallet_new_address\n\n\nOptions:\n None\n\nReturns:\n (str) New wallet address in base58",
|
||||
"title": "wallet_new_address"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#wallet_prefill_addresses",
|
||||
"text": "Create new addresses, each containing `amount` credits\n\nUsage:\n wallet_prefill_addresses [--no_broadcast]\n ( num_addresses | --num_addresses= num_addresses )\n ( amount | --amount= amount )\n\n\nOptions:\n --no_broadcast : (bool) whether to broadcast or not\n --num_addresses= num_addresses : (int) num of addresses to create\n --amount= amount : (float) initial amount in each address\n\nReturns:\n (dict) the resulting transaction",
|
||||
"title": "wallet_prefill_addresses"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#wallet_public_key",
|
||||
"text": "Get public key from wallet address\n\nUsage:\n wallet_public_key ( address | --address= address )\n\n\nOptions:\n --address= address : (str) address for which to get the public key\n\nReturns:\n (list) list of public keys associated with address.\n Could contain more than one public key if multisig.",
|
||||
"title": "wallet_public_key"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#wallet_send",
|
||||
"text": "Send credits. If given an address, send credits to it. If given a claim id, send a tip\nto the owner of a claim specified by uri. A tip is a claim support where the recipient\nof the support is the claim address for the claim being supported.\n\nUsage:\n wallet_send ( amount | --amount= amount )\n (( address | --address= address ) | ( claim_id | --claim_id= claim_id ))\n\n\nOptions:\n --amount= amount : (Decimal) amount of credit to send\n --address= address : (str) address to send credits to\n --claim_id= claim_id : (str) claim_id of the claim to send to tip to\n\nReturns:\n If sending to an address:\n (bool) true if payment successfully scheduled\n\n If sending a claim tip:\n (dict) Dictionary containing the result of the support\n {\n txid : (str) txid of resulting support claim\n nout : (int) nout of the resulting support claim\n fee : (float) fee paid for the transaction\n }",
|
||||
"title": "wallet_send"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#wallet_unlock",
|
||||
"text": "Unlock an encrypted wallet\n\nUsage:\n wallet_unlock ( password | --password= password )\n\n\nOptions:\n --password= password : (str) password for unlocking wallet\n\nReturns:\n (bool) true if wallet is unlocked, otherwise false",
|
||||
"title": "wallet_unlock"
|
||||
},
|
||||
{
|
||||
"location": "/cli/#wallet_unused_address",
|
||||
"text": "Return an address containing no balance, will create\na new address if there is none.\n\nUsage:\n wallet_unused_address\n\n\nOptions:\n None\n\nReturns:\n (str) Unused wallet address in base58",
|
||||
"title": "wallet_unused_address"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
__name__ = "lbry"
|
||||
__version__ = "0.43.2"
|
||||
__version__ = "0.46.1"
|
||||
version = tuple(__version__.split('.'))
|
||||
|
||||
@@ -33,13 +33,13 @@ class HashBlobWriter:
|
||||
def write(self, data: bytes):
|
||||
expected_length = self.get_length()
|
||||
if not expected_length:
|
||||
raise IOError("unknown blob length")
|
||||
raise OSError("unknown blob length")
|
||||
if self.buffer is None:
|
||||
log.warning("writer has already been closed")
|
||||
if not self.finished.done():
|
||||
self.finished.cancel()
|
||||
return
|
||||
raise IOError('I/O operation on closed file')
|
||||
raise OSError('I/O operation on closed file')
|
||||
|
||||
self._hashsum.update(data)
|
||||
self.len_so_far += len(data)
|
||||
|
||||
@@ -86,7 +86,7 @@ class BlobExchangeClientProtocol(asyncio.Protocol):
|
||||
self._blob_bytes_received += len(data)
|
||||
try:
|
||||
self.writer.write(data)
|
||||
except IOError as err:
|
||||
except OSError as err:
|
||||
log.error("error downloading blob from %s:%i: %s", self.peer_address, self.peer_port, err)
|
||||
if self._response_fut and not self._response_fut.done():
|
||||
self._response_fut.set_exception(err)
|
||||
|
||||
@@ -75,10 +75,10 @@ class BlobDownloader:
|
||||
|
||||
def clearbanned(self):
|
||||
now = self.loop.time()
|
||||
self.ignored = dict((
|
||||
(peer, when) for (peer, when) in self.ignored.items()
|
||||
self.ignored = {
|
||||
peer: when for (peer, when) in self.ignored.items()
|
||||
if (now - when) < min(30.0, (self.failures.get(peer, 0) ** self.BAN_FACTOR))
|
||||
))
|
||||
}
|
||||
|
||||
@cache_concurrent
|
||||
async def download_blob(self, blob_hash: str, length: typing.Optional[int] = None,
|
||||
|
||||
@@ -81,10 +81,10 @@ class BlobServerProtocol(asyncio.Protocol):
|
||||
responses.append(BlobPaymentAddressResponse(lbrycrd_address=self.lbrycrd_address))
|
||||
availability_request = request.get_availability_request()
|
||||
if availability_request:
|
||||
responses.append(BlobAvailabilityResponse(available_blobs=list(set((
|
||||
responses.append(BlobAvailabilityResponse(available_blobs=list(set(
|
||||
filter(lambda blob_hash: blob_hash in self.blob_manager.completed_blob_hashes,
|
||||
availability_request.requested_blobs)
|
||||
)))))
|
||||
))))
|
||||
price_request = request.get_price_request()
|
||||
if price_request:
|
||||
responses.append(BlobPriceResponse(blob_data_payment_rate='RATE_ACCEPTED'))
|
||||
|
||||
+4
-4
@@ -14,7 +14,7 @@ from torba.client.coinselection import STRATEGIES
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
NOT_SET = type(str('NOT_SET'), (object,), {})
|
||||
NOT_SET = type('NOT_SET', (object,), {})
|
||||
T = typing.TypeVar('T')
|
||||
|
||||
CURRENCIES = {
|
||||
@@ -630,7 +630,7 @@ class Config(CLIConfig):
|
||||
|
||||
|
||||
def get_windows_directories() -> typing.Tuple[str, str, str]:
|
||||
from lbry.winpaths import get_path, FOLDERID, UserHandle
|
||||
from lbry.winpaths import get_path, FOLDERID, UserHandle # pylint: disable=import-outside-toplevel
|
||||
|
||||
download_dir = get_path(FOLDERID.Downloads, UserHandle.current)
|
||||
|
||||
@@ -659,9 +659,9 @@ def get_linux_directories() -> typing.Tuple[str, str, str]:
|
||||
try:
|
||||
with open(os.path.join(user_config_dir(), 'user-dirs.dirs'), 'r') as xdg:
|
||||
down_dir = re.search(r'XDG_DOWNLOAD_DIR=(.+)', xdg.read()).group(1)
|
||||
down_dir = re.sub('\$HOME', os.getenv('HOME') or os.path.expanduser("~/"), down_dir)
|
||||
down_dir = re.sub(r'\$HOME', os.getenv('HOME') or os.path.expanduser("~/"), down_dir)
|
||||
download_dir = re.sub('\"', '', down_dir)
|
||||
except EnvironmentError:
|
||||
except OSError:
|
||||
download_dir = os.getenv('XDG_DOWNLOAD_DIR')
|
||||
if not download_dir:
|
||||
download_dir = os.path.expanduser('~/Downloads')
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import time
|
||||
import asyncio
|
||||
import typing
|
||||
import collections
|
||||
@@ -18,6 +19,8 @@ class ConnectionManager:
|
||||
self.incoming: typing.DefaultDict[str, int] = collections.defaultdict(int)
|
||||
self.outgoing_connected: typing.Set[str] = set()
|
||||
self.outgoing: typing.DefaultDict[str, int] = collections.defaultdict(int)
|
||||
self._max_incoming_mbs = 0.0
|
||||
self._max_outgoing_mbs = 0.0
|
||||
self._status = {}
|
||||
self._running = False
|
||||
self._task: typing.Optional[asyncio.Task] = None
|
||||
@@ -58,29 +61,32 @@ class ConnectionManager:
|
||||
'total_outgoing_mbs': 0.0,
|
||||
'total_sent': 0,
|
||||
'total_received': 0,
|
||||
'time': self.loop.time()
|
||||
'max_incoming_mbs': 0.0,
|
||||
'max_outgoing_mbs': 0.0
|
||||
}
|
||||
|
||||
while True:
|
||||
last = self.loop.time()
|
||||
await asyncio.sleep(5, loop=self.loop)
|
||||
last = time.perf_counter()
|
||||
await asyncio.sleep(0.1, loop=self.loop)
|
||||
self._status['incoming_bps'].clear()
|
||||
self._status['outgoing_bps'].clear()
|
||||
now = self.loop.time()
|
||||
now = time.perf_counter()
|
||||
while self.outgoing:
|
||||
k, v = self.outgoing.popitem()
|
||||
self._status['total_sent'] += v
|
||||
self._status['outgoing_bps'][k] = v / (now - last)
|
||||
while self.incoming:
|
||||
k, v = self.incoming.popitem()
|
||||
self._status['total_received'] += v
|
||||
self._status['incoming_bps'][k] = v / (now - last)
|
||||
self._status['total_outgoing_mbs'] = int(sum(list(self._status['outgoing_bps'].values())
|
||||
)) / 1000000.0
|
||||
self._status['total_incoming_mbs'] = int(sum(list(self._status['incoming_bps'].values())
|
||||
)) / 1000000.0
|
||||
self._status['total_sent'] += sum(list(self._status['outgoing_bps'].values()))
|
||||
self._status['total_received'] += sum(list(self._status['incoming_bps'].values()))
|
||||
|
||||
self._status['time'] = now
|
||||
self._max_incoming_mbs = max(self._max_incoming_mbs, self._status['total_incoming_mbs'])
|
||||
self._max_outgoing_mbs = max(self._max_outgoing_mbs, self._status['total_outgoing_mbs'])
|
||||
self._status['max_incoming_mbs'] = self._max_incoming_mbs
|
||||
self._status['max_outgoing_mbs'] = self._max_outgoing_mbs
|
||||
|
||||
def stop(self):
|
||||
if self._task:
|
||||
|
||||
@@ -664,6 +664,9 @@ class KademliaProtocol(DatagramProtocol):
|
||||
log.error("Unexpected response: %s" % err)
|
||||
return peer.node_id, False
|
||||
except RemoteException as err:
|
||||
if 'findValue() takes exactly 2 arguments (5 given)' in str(err):
|
||||
log.debug("peer %s:%i is running an incompatible version of lbrynet", peer.address, peer.udp_port)
|
||||
return peer.node_id, False
|
||||
if 'Invalid token' not in str(err):
|
||||
log.exception("Unexpected error while storing blob_hash")
|
||||
return peer.node_id, False
|
||||
|
||||
@@ -7,9 +7,13 @@ REQUEST_TYPE = 0
|
||||
RESPONSE_TYPE = 1
|
||||
ERROR_TYPE = 2
|
||||
|
||||
OPTIONAL_ARG_OFFSET = 100
|
||||
|
||||
# bencode representation of argument keys
|
||||
PAGE_KEY = b'p'
|
||||
|
||||
OPTIONAL_FIELDS = ()
|
||||
|
||||
|
||||
class KademliaDatagramBase:
|
||||
"""
|
||||
@@ -18,7 +22,7 @@ class KademliaDatagramBase:
|
||||
these correspond to the packet_type, rpc_id, and node_id args
|
||||
"""
|
||||
|
||||
fields = [
|
||||
required_fields = [
|
||||
'packet_type',
|
||||
'rpc_id',
|
||||
'node_id'
|
||||
@@ -38,13 +42,18 @@ class KademliaDatagramBase:
|
||||
self.node_id = node_id
|
||||
|
||||
def bencode(self) -> bytes:
|
||||
return bencode({
|
||||
i: getattr(self, k) for i, k in enumerate(self.fields)
|
||||
})
|
||||
datagram = {
|
||||
i: getattr(self, k) for i, k in enumerate(self.required_fields)
|
||||
}
|
||||
for i, k in enumerate(OPTIONAL_FIELDS):
|
||||
v = getattr(self, k, None)
|
||||
if v is not None:
|
||||
datagram[i + OPTIONAL_ARG_OFFSET] = v
|
||||
return bencode(datagram)
|
||||
|
||||
|
||||
class RequestDatagram(KademliaDatagramBase):
|
||||
fields = [
|
||||
required_fields = [
|
||||
'packet_type',
|
||||
'rpc_id',
|
||||
'node_id',
|
||||
@@ -104,7 +113,7 @@ class RequestDatagram(KademliaDatagramBase):
|
||||
|
||||
|
||||
class ResponseDatagram(KademliaDatagramBase):
|
||||
fields = [
|
||||
required_fields = [
|
||||
'packet_type',
|
||||
'rpc_id',
|
||||
'node_id',
|
||||
@@ -119,7 +128,7 @@ class ResponseDatagram(KademliaDatagramBase):
|
||||
|
||||
|
||||
class ErrorDatagram(KademliaDatagramBase):
|
||||
fields = [
|
||||
required_fields = [
|
||||
'packet_type',
|
||||
'rpc_id',
|
||||
'node_id',
|
||||
@@ -148,12 +157,15 @@ def decode_datagram(datagram: bytes) -> typing.Union[RequestDatagram, ResponseDa
|
||||
else:
|
||||
raise ValueError("invalid datagram type")
|
||||
datagram_class = msg_types[datagram_type]
|
||||
return datagram_class(**{
|
||||
k: primitive[i] # pylint: disable=unsubscriptable-object
|
||||
for i, k in enumerate(datagram_class.fields)
|
||||
if i in primitive # pylint: disable=unsupported-membership-test
|
||||
}
|
||||
)
|
||||
decoded = {
|
||||
k: primitive[i] # pylint: disable=unsubscriptable-object
|
||||
for i, k in enumerate(datagram_class.required_fields)
|
||||
if i in primitive # pylint: disable=unsupported-membership-test
|
||||
}
|
||||
for i, k in enumerate(OPTIONAL_FIELDS):
|
||||
if i + OPTIONAL_ARG_OFFSET in primitive:
|
||||
decoded[i + OPTIONAL_ARG_OFFSET] = primitive[i + OPTIONAL_ARG_OFFSET]
|
||||
return datagram_class(**decoded)
|
||||
|
||||
|
||||
def make_compact_ip(address: str) -> bytearray:
|
||||
|
||||
+23
-22
@@ -7,10 +7,10 @@ import asyncio
|
||||
import argparse
|
||||
import logging
|
||||
import logging.handlers
|
||||
from docopt import docopt
|
||||
|
||||
import aiohttp
|
||||
from aiohttp.web import GracefulExit
|
||||
from docopt import docopt
|
||||
|
||||
from lbry import __version__ as lbrynet_version
|
||||
from lbry.extras.daemon.loggly_handler import get_loggly_handler
|
||||
@@ -18,7 +18,6 @@ from lbry.conf import Config, CLIConfig
|
||||
from lbry.extras.daemon.Daemon import Daemon
|
||||
|
||||
log = logging.getLogger('lbry')
|
||||
log.addHandler(logging.NullHandler())
|
||||
|
||||
|
||||
def display(data):
|
||||
@@ -143,7 +142,7 @@ class ArgumentParser(argparse.ArgumentParser):
|
||||
|
||||
def error(self, message):
|
||||
self.print_help(argparse._sys.stderr)
|
||||
self.exit(2, '\n'+message+'\n')
|
||||
self.exit(2, f"\n{message}\n")
|
||||
|
||||
|
||||
class HelpFormatter(argparse.HelpFormatter):
|
||||
@@ -221,43 +220,44 @@ def ensure_directory_exists(path: str):
|
||||
pathlib.Path(path).mkdir(parents=True, exist_ok=True)
|
||||
|
||||
|
||||
def setup_logging(args: argparse.Namespace, conf: Config, loop: asyncio.AbstractEventLoop):
|
||||
default_formatter = logging.Formatter("%(asctime)s %(levelname)-8s %(name)s:%(lineno)d: %(message)s")
|
||||
file_handler = logging.handlers.RotatingFileHandler(
|
||||
conf.log_file_path, maxBytes=2097152, backupCount=5
|
||||
)
|
||||
file_handler.setFormatter(default_formatter)
|
||||
log.addHandler(file_handler)
|
||||
logging.getLogger('torba').addHandler(file_handler)
|
||||
LOG_MODULES = ('lbry', 'torba', 'aioupnp')
|
||||
|
||||
|
||||
def setup_logging(logger: logging.Logger, args: argparse.Namespace, conf: Config):
|
||||
default_formatter = logging.Formatter("%(asctime)s %(levelname)-8s %(name)s:%(lineno)d: %(message)s")
|
||||
file_handler = logging.handlers.RotatingFileHandler(conf.log_file_path, maxBytes=2097152, backupCount=5)
|
||||
file_handler.setFormatter(default_formatter)
|
||||
for module_name in LOG_MODULES:
|
||||
logger.getChild(module_name).addHandler(file_handler)
|
||||
if not args.quiet:
|
||||
handler = logging.StreamHandler()
|
||||
handler.setFormatter(default_formatter)
|
||||
log.addHandler(handler)
|
||||
logging.getLogger('torba').addHandler(handler)
|
||||
logging.getLogger('torba').setLevel(logging.INFO)
|
||||
for module_name in LOG_MODULES:
|
||||
logger.getChild(module_name).addHandler(handler)
|
||||
|
||||
logging.getLogger('aioupnp').setLevel(logging.WARNING)
|
||||
logging.getLogger('aiohttp').setLevel(logging.CRITICAL)
|
||||
logger.getChild('lbry').setLevel(logging.INFO)
|
||||
logger.getChild('torba').setLevel(logging.INFO)
|
||||
logger.getChild('aioupnp').setLevel(logging.WARNING)
|
||||
logger.getChild('aiohttp').setLevel(logging.CRITICAL)
|
||||
|
||||
log.setLevel(logging.INFO)
|
||||
if args.verbose is not None:
|
||||
loop.set_debug(True)
|
||||
if len(args.verbose) > 0:
|
||||
for module in args.verbose:
|
||||
logging.getLogger(module).setLevel(logging.DEBUG)
|
||||
logger.getChild(module).setLevel(logging.DEBUG)
|
||||
else:
|
||||
log.setLevel(logging.DEBUG)
|
||||
logger.getChild('lbry').setLevel(logging.DEBUG)
|
||||
|
||||
if conf.share_usage_data:
|
||||
loggly_handler = get_loggly_handler()
|
||||
loggly_handler.setLevel(logging.ERROR)
|
||||
log.addHandler(loggly_handler)
|
||||
logger.getChild('lbry').addHandler(loggly_handler)
|
||||
|
||||
|
||||
def run_daemon(args: argparse.Namespace, conf: Config):
|
||||
loop = asyncio.get_event_loop()
|
||||
setup_logging(args, conf, loop)
|
||||
if args.verbose is not None:
|
||||
loop.set_debug(True)
|
||||
setup_logging(logging.getLogger(), args, conf)
|
||||
daemon = Daemon(conf)
|
||||
|
||||
def __exit():
|
||||
@@ -276,6 +276,7 @@ def run_daemon(args: argparse.Namespace, conf: Config):
|
||||
pass
|
||||
finally:
|
||||
loop.run_until_complete(daemon.stop())
|
||||
logging.shutdown()
|
||||
|
||||
if hasattr(loop, 'shutdown_asyncgens'):
|
||||
loop.run_until_complete(loop.shutdown_asyncgens())
|
||||
|
||||
@@ -52,7 +52,7 @@ class DatabaseComponent(Component):
|
||||
|
||||
@staticmethod
|
||||
def get_current_db_revision():
|
||||
return 11
|
||||
return 12
|
||||
|
||||
@property
|
||||
def revision_filename(self):
|
||||
@@ -67,7 +67,7 @@ class DatabaseComponent(Component):
|
||||
log.info("Loading databases")
|
||||
|
||||
if not os.path.exists(self.revision_filename):
|
||||
log.warning("db_revision file not found. Creating it")
|
||||
log.info("db_revision file not found. Creating it")
|
||||
self._write_db_revision_file(self.get_current_db_revision())
|
||||
|
||||
# check the db migration and run any needed migrations
|
||||
@@ -79,7 +79,7 @@ class DatabaseComponent(Component):
|
||||
'Your database is revision %i, expected %i' %
|
||||
(old_revision, self.get_current_db_revision()))
|
||||
if old_revision < self.get_current_db_revision():
|
||||
from lbry.extras.daemon.migrator import dbmigrator
|
||||
from lbry.extras.daemon.migrator import dbmigrator # pylint: disable=import-outside-toplevel
|
||||
log.info("Upgrading your databases (revision %i to %i)", old_revision, self.get_current_db_revision())
|
||||
await asyncio.get_event_loop().run_in_executor(
|
||||
None, dbmigrator.migrate_db, self.conf, old_revision, self.get_current_db_revision()
|
||||
@@ -339,7 +339,6 @@ class DHTComponent(Component):
|
||||
self.external_udp_port = upnp_component.upnp_redirects.get("UDP", self.conf.udp_port)
|
||||
external_ip = upnp_component.external_ip
|
||||
if not external_ip:
|
||||
log.warning("UPnP component failed to get external ip")
|
||||
external_ip = await utils.get_external_ip()
|
||||
if not external_ip:
|
||||
log.warning("failed to get external ip")
|
||||
@@ -577,6 +576,10 @@ class UPnPComponent(Component):
|
||||
log.debug("set up upnp port redirects for gateway: %s", self.upnp.gateway.manufacturer_string)
|
||||
else:
|
||||
log.error("failed to setup upnp")
|
||||
if not self.external_ip:
|
||||
self.external_ip = await utils.get_external_ip()
|
||||
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()
|
||||
|
||||
@@ -111,6 +111,7 @@ CONNECTION_MESSAGES = {
|
||||
|
||||
SHORT_ID_LEN = 20
|
||||
MAX_UPDATE_FEE_ESTIMATE = 0.3
|
||||
DEFAULT_PAGE_SIZE = 20
|
||||
|
||||
|
||||
def encode_pagination_doc(items):
|
||||
@@ -123,21 +124,38 @@ def encode_pagination_doc(items):
|
||||
}
|
||||
|
||||
|
||||
async def maybe_paginate(get_records: Callable, get_record_count: Callable,
|
||||
page: Optional[int], page_size: Optional[int], **constraints):
|
||||
if None not in (page, page_size):
|
||||
constraints.update({
|
||||
"offset": page_size * (page - 1),
|
||||
"limit": page_size
|
||||
})
|
||||
total_items = await get_record_count(**constraints)
|
||||
return {
|
||||
"items": await get_records(**constraints),
|
||||
"total_pages": int((total_items + (page_size - 1)) / page_size),
|
||||
"total_items": total_items,
|
||||
"page": page, "page_size": page_size
|
||||
}
|
||||
return await get_records(**constraints)
|
||||
async def paginate_rows(get_records: Callable, get_record_count: Callable,
|
||||
page: Optional[int], page_size: Optional[int], **constraints):
|
||||
page = max(1, page or 1)
|
||||
page_size = max(1, page_size or DEFAULT_PAGE_SIZE)
|
||||
constraints.update({
|
||||
"offset": page_size * (page - 1),
|
||||
"limit": page_size
|
||||
})
|
||||
items = await get_records(**constraints)
|
||||
total_items = await get_record_count(**constraints)
|
||||
return {
|
||||
"items": items,
|
||||
"total_pages": int((total_items + (page_size - 1)) / page_size),
|
||||
"total_items": total_items,
|
||||
"page": page, "page_size": page_size
|
||||
}
|
||||
|
||||
|
||||
def paginate_list(items: List, page: Optional[int], page_size: Optional[int]):
|
||||
page = max(1, page or 1)
|
||||
page_size = max(1, page_size or DEFAULT_PAGE_SIZE)
|
||||
total_items = len(items)
|
||||
offset = page_size * (page - 1)
|
||||
subitems = []
|
||||
if offset <= total_items:
|
||||
subitems = items[offset:offset+page_size]
|
||||
return {
|
||||
"items": subitems,
|
||||
"total_pages": int((total_items + (page_size - 1)) / page_size),
|
||||
"total_items": total_items,
|
||||
"page": page, "page_size": page_size
|
||||
}
|
||||
|
||||
|
||||
def sort_claim_results(claims):
|
||||
@@ -448,16 +466,13 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
self.component_startup_task = asyncio.create_task(self.component_manager.start())
|
||||
await self.component_startup_task
|
||||
|
||||
async def stop(self, shutdown_runner=True):
|
||||
async def stop(self):
|
||||
if self.component_startup_task is not None:
|
||||
if self.component_startup_task.done():
|
||||
await self.component_manager.stop()
|
||||
else:
|
||||
self.component_startup_task.cancel()
|
||||
log.info("stopped api components")
|
||||
if shutdown_runner:
|
||||
await self.rpc_runner.shutdown()
|
||||
await self.streaming_runner.shutdown()
|
||||
await self.rpc_runner.cleanup()
|
||||
await self.streaming_runner.cleanup()
|
||||
log.info("stopped api server")
|
||||
@@ -643,7 +658,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
Resolve a name and return the estimated stream cost
|
||||
"""
|
||||
|
||||
resolved = await self.resolve(uri)
|
||||
resolved = await self.resolve([], uri)
|
||||
if resolved:
|
||||
claim_response = resolved[uri]
|
||||
else:
|
||||
@@ -822,15 +837,16 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
return platform_info
|
||||
|
||||
@requires(WALLET_COMPONENT)
|
||||
async def jsonrpc_resolve(self, urls: typing.Union[str, list]):
|
||||
async def jsonrpc_resolve(self, urls: typing.Union[str, list], wallet_id=None):
|
||||
"""
|
||||
Get the claim that a URL refers to.
|
||||
|
||||
Usage:
|
||||
resolve <urls>...
|
||||
resolve <urls>... [--wallet_id=<wallet_id>]
|
||||
|
||||
Options:
|
||||
--urls=<urls> : (str, list) one or more urls to resolve
|
||||
--urls=<urls> : (str, list) one or more urls to resolve
|
||||
--wallet_id=<wallet_id> : (str) wallet to check for claim purchase reciepts
|
||||
|
||||
Returns:
|
||||
Dictionary of results, keyed by url
|
||||
@@ -888,6 +904,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
}
|
||||
}
|
||||
"""
|
||||
wallet = self.wallet_manager.get_wallet_or_default(wallet_id)
|
||||
|
||||
if isinstance(urls, str):
|
||||
urls = [urls]
|
||||
@@ -902,7 +919,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
except ValueError:
|
||||
results[u] = {"error": f"{u} is not a valid url"}
|
||||
|
||||
resolved = await self.resolve(list(valid_urls))
|
||||
resolved = await self.resolve(wallet.accounts, list(valid_urls))
|
||||
|
||||
for resolved_uri in resolved:
|
||||
results[resolved_uri] = resolved[resolved_uri] if resolved[resolved_uri] is not None else \
|
||||
@@ -912,14 +929,15 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
|
||||
@requires(WALLET_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT, BLOB_COMPONENT, DATABASE_COMPONENT,
|
||||
STREAM_MANAGER_COMPONENT)
|
||||
async def jsonrpc_get(self, uri, file_name=None, download_directory=None, timeout=None, save_file=None):
|
||||
async def jsonrpc_get(
|
||||
self, uri, file_name=None, download_directory=None, timeout=None, save_file=None, wallet_id=None):
|
||||
"""
|
||||
Download stream from a LBRY name.
|
||||
|
||||
Usage:
|
||||
get <uri> [<file_name> | --file_name=<file_name>]
|
||||
[<download_directory> | --download_directory=<download_directory>] [<timeout> | --timeout=<timeout>]
|
||||
[--save_file=<save_file>]
|
||||
[--save_file=<save_file>] [--wallet_id=<wallet_id>]
|
||||
|
||||
|
||||
Options:
|
||||
@@ -928,14 +946,17 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
--download_directory=<download_directory> : (str) full path to the directory to download into
|
||||
--timeout=<timeout> : (int) download timeout in number of seconds
|
||||
--save_file=<save_file> : (bool) save the file to the downloads directory
|
||||
--wallet_id=<wallet_id> : (str) wallet to check for claim purchase reciepts
|
||||
|
||||
Returns: {File}
|
||||
"""
|
||||
wallet = self.wallet_manager.get_wallet_or_default(wallet_id)
|
||||
if download_directory and not os.path.isdir(download_directory):
|
||||
return {"error": f"specified download directory \"{download_directory}\" does not exist"}
|
||||
try:
|
||||
stream = await self.stream_manager.download_stream_from_uri(
|
||||
uri, self.exchange_rate_manager, timeout, file_name, download_directory, save_file=save_file
|
||||
uri, self.exchange_rate_manager, timeout, file_name, download_directory,
|
||||
save_file=save_file, wallet=wallet
|
||||
)
|
||||
if not stream:
|
||||
raise DownloadSDTimeout(uri)
|
||||
@@ -1035,21 +1056,23 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
"""
|
||||
|
||||
@requires("wallet")
|
||||
def jsonrpc_wallet_list(self, wallet_id=None):
|
||||
def jsonrpc_wallet_list(self, wallet_id=None, page=None, page_size=None):
|
||||
"""
|
||||
List wallets.
|
||||
|
||||
Usage:
|
||||
wallet_list [--wallet_id=<wallet_id>]
|
||||
wallet_list [--wallet_id=<wallet_id>] [--page=<page>] [--page_size=<page_size>]
|
||||
|
||||
Options:
|
||||
--wallet_id=<wallet_id> : (str) show specific wallet only
|
||||
--page=<page> : (int) page to return during paginating
|
||||
--page_size=<page_size> : (int) number of items on page during pagination
|
||||
|
||||
Returns: {List[Wallet]}
|
||||
Returns: {Paginated[Wallet]}
|
||||
"""
|
||||
if wallet_id:
|
||||
return [self.wallet_manager.get_wallet_or_error(wallet_id)]
|
||||
return self.wallet_manager.wallets
|
||||
return paginate_list([self.wallet_manager.get_wallet_or_error(wallet_id)], 1, 1)
|
||||
return paginate_list(self.wallet_manager.wallets, page, page_size)
|
||||
|
||||
@requires("wallet")
|
||||
async def jsonrpc_wallet_create(
|
||||
@@ -1110,10 +1133,14 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
raise Exception(f"Wallet at path '{wallet_path}' is already loaded.")
|
||||
if not os.path.exists(wallet_path):
|
||||
raise Exception(f"Wallet at path '{wallet_path}' was not found.")
|
||||
return self.wallet_manager.import_wallet(wallet_path)
|
||||
wallet = self.wallet_manager.import_wallet(wallet_path)
|
||||
if self.ledger.network.is_connected:
|
||||
for account in wallet.accounts:
|
||||
await self.ledger.subscribe_account(account)
|
||||
return wallet
|
||||
|
||||
@requires("wallet")
|
||||
def jsonrpc_wallet_remove(self, wallet_id):
|
||||
async def jsonrpc_wallet_remove(self, wallet_id):
|
||||
"""
|
||||
Remove an existing wallet.
|
||||
|
||||
@@ -1125,32 +1152,31 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
|
||||
Returns: {Wallet}
|
||||
"""
|
||||
wallet = self.wallet_manager.get_wallet_or_default(wallet_id)
|
||||
wallet = self.wallet_manager.get_wallet_or_error(wallet_id)
|
||||
self.wallet_manager.wallets.remove(wallet)
|
||||
for account in wallet.accounts:
|
||||
await self.ledger.unsubscribe_account(account)
|
||||
return wallet
|
||||
|
||||
@requires("wallet")
|
||||
async def jsonrpc_wallet_balance(self, wallet_id=None, confirmations=0, reserved_subtotals=False):
|
||||
async def jsonrpc_wallet_balance(self, wallet_id=None, confirmations=0):
|
||||
"""
|
||||
Return the balance of a wallet
|
||||
|
||||
Usage:
|
||||
wallet_balance [--wallet_id=<wallet_id>] [--confirmations=<confirmations>] [--reserved_subtotals]
|
||||
wallet_balance [--wallet_id=<wallet_id>] [--confirmations=<confirmations>]
|
||||
|
||||
Options:
|
||||
--wallet_id=<wallet_id> : (str) balance for specific wallet
|
||||
--confirmations=<confirmations> : (int) Only include transactions with this many
|
||||
confirmed blocks.
|
||||
--reserved_subtotals : (bool) Include detailed reserved balances on
|
||||
claims, tips and supports.
|
||||
|
||||
Returns:
|
||||
(decimal) amount of lbry credits in wallet
|
||||
"""
|
||||
wallet = self.wallet_manager.get_wallet_or_default(wallet_id)
|
||||
balance = await self.ledger.get_detailed_balance(
|
||||
accounts=wallet.accounts, confirmations=confirmations,
|
||||
reserved_subtotals=reserved_subtotals
|
||||
accounts=wallet.accounts, confirmations=confirmations
|
||||
)
|
||||
return dict_values_to_lbc(balance)
|
||||
|
||||
@@ -1297,8 +1323,9 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
"""
|
||||
|
||||
@requires("wallet")
|
||||
def jsonrpc_account_list(self, account_id=None, wallet_id=None, confirmations=0,
|
||||
include_claims=False, show_seed=False):
|
||||
async def jsonrpc_account_list(
|
||||
self, account_id=None, wallet_id=None, confirmations=0,
|
||||
include_claims=False, show_seed=False, page=None, page_size=None):
|
||||
"""
|
||||
List details of all of the accounts or a specific account.
|
||||
|
||||
@@ -1306,6 +1333,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
account_list [<account_id>] [--wallet_id=<wallet_id>]
|
||||
[--confirmations=<confirmations>]
|
||||
[--include_claims] [--show_seed]
|
||||
[--page=<page>] [--page_size=<page_size>]
|
||||
|
||||
Options:
|
||||
--account_id=<account_id> : (str) If provided only the balance for this
|
||||
@@ -1315,8 +1343,10 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
--include_claims : (bool) include claims, requires than a
|
||||
LBC account is specified (default: false)
|
||||
--show_seed : (bool) show the seed for the account
|
||||
--page=<page> : (int) page to return during paginating
|
||||
--page_size=<page_size> : (int) number of items on page during pagination
|
||||
|
||||
Returns: {List[Account]}
|
||||
Returns: {Paginated[Account]}
|
||||
"""
|
||||
kwargs = {
|
||||
'confirmations': confirmations,
|
||||
@@ -1324,18 +1354,18 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
}
|
||||
wallet = self.wallet_manager.get_wallet_or_default(wallet_id)
|
||||
if account_id:
|
||||
return wallet.get_account_or_error(account_id).get_details(**kwargs)
|
||||
return paginate_list([await wallet.get_account_or_error(account_id).get_details(**kwargs)], 1, 1)
|
||||
else:
|
||||
return wallet.get_detailed_accounts(**kwargs)
|
||||
return paginate_list(await wallet.get_detailed_accounts(**kwargs), page, page_size)
|
||||
|
||||
@requires("wallet")
|
||||
async def jsonrpc_account_balance(self, account_id=None, wallet_id=None, confirmations=0, reserved_subtotals=False):
|
||||
async def jsonrpc_account_balance(self, account_id=None, wallet_id=None, confirmations=0):
|
||||
"""
|
||||
Return the balance of an account
|
||||
|
||||
Usage:
|
||||
account_balance [<account_id>] [<address> | --address=<address>] [--wallet_id=<wallet_id>]
|
||||
[<confirmations> | --confirmations=<confirmations>] [--reserved_subtotals]
|
||||
[<confirmations> | --confirmations=<confirmations>]
|
||||
|
||||
Options:
|
||||
--account_id=<account_id> : (str) If provided only the balance for this
|
||||
@@ -1343,8 +1373,6 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
--wallet_id=<wallet_id> : (str) balance for specific wallet
|
||||
--confirmations=<confirmations> : (int) Only include transactions with this many
|
||||
confirmed blocks.
|
||||
--reserved_subtotals : (bool) Include detailed reserved balances on
|
||||
claims, tips and supports.
|
||||
|
||||
Returns:
|
||||
(decimal) amount of lbry credits in wallet
|
||||
@@ -1352,7 +1380,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
wallet = self.wallet_manager.get_wallet_or_default(wallet_id)
|
||||
account = wallet.get_account_or_default(account_id)
|
||||
balance = await account.get_detailed_balance(
|
||||
confirmations=confirmations, reserved_subtotals=reserved_subtotals
|
||||
confirmations=confirmations, reserved_subtotals=True
|
||||
)
|
||||
return dict_values_to_lbc(balance)
|
||||
|
||||
@@ -1710,7 +1738,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
constraints['accounts'] = [wallet.get_account_or_error(account_id)]
|
||||
else:
|
||||
constraints['accounts'] = wallet.accounts
|
||||
return maybe_paginate(
|
||||
return paginate_rows(
|
||||
self.ledger.get_addresses,
|
||||
self.ledger.get_address_count,
|
||||
page, page_size, **constraints
|
||||
@@ -1739,17 +1767,21 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
"""
|
||||
|
||||
@requires(STREAM_MANAGER_COMPONENT)
|
||||
def jsonrpc_file_list(self, sort=None, reverse=False, comparison=None, **kwargs):
|
||||
async def jsonrpc_file_list(
|
||||
self, sort=None, reverse=False, comparison=None,
|
||||
wallet_id=None, page=None, page_size=None, **kwargs):
|
||||
"""
|
||||
List files limited by optional filters
|
||||
|
||||
Usage:
|
||||
file_list [--sd_hash=<sd_hash>] [--file_name=<file_name>] [--stream_hash=<stream_hash>]
|
||||
[--rowid=<rowid>] [--claim_id=<claim_id>] [--outpoint=<outpoint>] [--txid=<txid>] [--nout=<nout>]
|
||||
[--rowid=<rowid>] [--added_on=<added_on>] [--claim_id=<claim_id>]
|
||||
[--outpoint=<outpoint>] [--txid=<txid>] [--nout=<nout>]
|
||||
[--channel_claim_id=<channel_claim_id>] [--channel_name=<channel_name>]
|
||||
[--claim_name=<claim_name>] [--blobs_in_stream=<blobs_in_stream>]
|
||||
[--blobs_remaining=<blobs_remaining>] [--sort=<sort_by>]
|
||||
[--comparison=<comparison>] [--full_status=<full_status>] [--reverse]
|
||||
[--page=<page>] [--page_size=<page_size>] [--wallet_id=<wallet_id>]
|
||||
|
||||
Options:
|
||||
--sd_hash=<sd_hash> : (str) get file with matching sd hash
|
||||
@@ -1757,6 +1789,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
downloads folder
|
||||
--stream_hash=<stream_hash> : (str) get file with matching stream hash
|
||||
--rowid=<rowid> : (int) get file with matching row id
|
||||
--added_on=<added_on> : (int) get file with matching time of insertion
|
||||
--claim_id=<claim_id> : (str) get file with matching claim id
|
||||
--outpoint=<outpoint> : (str) get file with matching claim outpoint
|
||||
--txid=<txid> : (str) get file with matching claim txid
|
||||
@@ -1768,14 +1801,29 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
--blobs_remaining=<blobs_remaining> : (int) amount of remaining blobs to download
|
||||
--sort=<sort_by> : (str) field to sort by (one of the above filter fields)
|
||||
--comparison=<comparison> : (str) logical comparison, (eq | ne | g | ge | l | le)
|
||||
--page=<page> : (int) page to return during paginating
|
||||
--page_size=<page_size> : (int) number of items on page during pagination
|
||||
--wallet_id=<wallet_id> : (str) add purchase receipts from this wallet
|
||||
|
||||
Returns: {List[File]}
|
||||
Returns: {Paginated[File]}
|
||||
"""
|
||||
wallet = self.wallet_manager.get_wallet_or_default(wallet_id)
|
||||
sort = sort or 'rowid'
|
||||
comparison = comparison or 'eq'
|
||||
return self.stream_manager.get_filtered_streams(
|
||||
sort, reverse, comparison, **kwargs
|
||||
paginated = paginate_list(
|
||||
self.stream_manager.get_filtered_streams(sort, reverse, comparison, **kwargs), page, page_size
|
||||
)
|
||||
if paginated['items']:
|
||||
receipts = {
|
||||
txo.purchased_claim_id: txo for txo in
|
||||
await self.ledger.db.get_purchases(
|
||||
accounts=wallet.accounts,
|
||||
purchased_claim_id__in=[s.claim_id for s in paginated['items']]
|
||||
)
|
||||
}
|
||||
for stream in paginated['items']:
|
||||
stream.purchase_receipt = receipts.get(stream.claim_id)
|
||||
return paginated
|
||||
|
||||
@requires(STREAM_MANAGER_COMPONENT)
|
||||
async def jsonrpc_file_set_status(self, status, **kwargs):
|
||||
@@ -1911,6 +1959,100 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
await stream.save_file(file_name, download_directory)
|
||||
return stream
|
||||
|
||||
PURCHASE_DOC = """
|
||||
List and make purchases of claims.
|
||||
"""
|
||||
|
||||
@requires(WALLET_COMPONENT)
|
||||
def jsonrpc_purchase_list(
|
||||
self, claim_id=None, resolve=False, account_id=None, wallet_id=None, page=None, page_size=None):
|
||||
"""
|
||||
List my claim purchases.
|
||||
|
||||
Usage:
|
||||
purchase_list [<claim_id> | --claim_id=<claim_id>] [--resolve]
|
||||
[--account_id=<account_id>] [--wallet_id=<wallet_id>]
|
||||
[--page=<page>] [--page_size=<page_size>]
|
||||
|
||||
Options:
|
||||
--claim_id=<claim_id> : (str) purchases for specific claim
|
||||
--resolve : (str) include resolved claim information
|
||||
--account_id=<account_id> : (str) id of the account to query
|
||||
--wallet_id=<wallet_id> : (str) restrict results to specific wallet
|
||||
--page=<page> : (int) page to return during paginating
|
||||
--page_size=<page_size> : (int) number of items on page during pagination
|
||||
|
||||
Returns: {Paginated[Output]}
|
||||
"""
|
||||
wallet = self.wallet_manager.get_wallet_or_default(wallet_id)
|
||||
constraints = {
|
||||
"wallet": wallet,
|
||||
"accounts": [wallet.get_account_or_error(account_id)] if account_id else wallet.accounts,
|
||||
"resolve": resolve,
|
||||
}
|
||||
if claim_id:
|
||||
constraints["purchased_claim_id"] = claim_id
|
||||
return paginate_rows(
|
||||
self.ledger.get_purchases,
|
||||
self.ledger.get_purchase_count,
|
||||
page, page_size, **constraints
|
||||
)
|
||||
|
||||
@requires(WALLET_COMPONENT)
|
||||
async def jsonrpc_purchase_create(
|
||||
self, claim_id=None, url=None, wallet_id=None, funding_account_ids=None,
|
||||
allow_duplicate_purchase=False, override_max_key_fee=False, preview=False, blocking=False):
|
||||
"""
|
||||
Purchase a claim.
|
||||
|
||||
Usage:
|
||||
purchase_create (--claim_id=<claim_id> | --url=<url>) [--wallet_id=<wallet_id>]
|
||||
[--funding_account_ids=<funding_account_ids>...]
|
||||
[--allow_duplicate_purchase] [--override_max_key_fee] [--preview] [--blocking]
|
||||
|
||||
Options:
|
||||
--claim_id=<claim_id> : (str) id of claim to purchase
|
||||
--url=<url> : (str) lookup claim to purchase by url
|
||||
--wallet_id=<wallet_id> : (str) restrict operation to specific wallet
|
||||
--funding_account_ids=<funding_account_ids>: (list) ids of accounts to fund this transaction
|
||||
--allow_duplicate_purchase : (bool) allow purchasing claim_id you already own
|
||||
--override_max_key_fee : (bool) ignore max key fee for this purchase
|
||||
--preview : (bool) do not broadcast the transaction
|
||||
--blocking : (bool) wait until transaction is in mempool
|
||||
|
||||
Returns: {Transaction}
|
||||
"""
|
||||
wallet = self.wallet_manager.get_wallet_or_default(wallet_id)
|
||||
assert not wallet.is_locked, "Cannot spend funds with locked wallet, unlock first."
|
||||
accounts = wallet.get_accounts_or_all(funding_account_ids)
|
||||
txo = None
|
||||
if claim_id:
|
||||
txo = await self.ledger.get_claim_by_claim_id(accounts, claim_id)
|
||||
if not isinstance(txo, Output) or not txo.is_claim:
|
||||
raise Exception(f"Could not find claim with claim_id '{claim_id}'. ")
|
||||
elif url:
|
||||
txo = (await self.ledger.resolve(accounts, [url]))[url]
|
||||
if not isinstance(txo, Output) or not txo.is_claim:
|
||||
raise Exception(f"Could not find claim with url '{url}'. ")
|
||||
else:
|
||||
raise Exception(f"Missing argument claim_id or url. ")
|
||||
if not allow_duplicate_purchase and txo.purchase_receipt:
|
||||
raise Exception(
|
||||
f"You already have a purchase for claim_id '{claim_id}'. "
|
||||
f"Use --allow-duplicate-purchase flag to override."
|
||||
)
|
||||
claim = txo.claim
|
||||
if not claim.is_stream or not claim.stream.has_fee:
|
||||
raise Exception(f"Claim '{claim_id}' does not have a purchase price.")
|
||||
tx = await self.wallet_manager.create_purchase_transaction(
|
||||
accounts, txo, self.exchange_rate_manager, override_max_key_fee
|
||||
)
|
||||
if not preview:
|
||||
await self.broadcast_or_release(tx, blocking)
|
||||
else:
|
||||
await self.ledger.release_tx(tx)
|
||||
return tx
|
||||
|
||||
CLAIM_DOC = """
|
||||
List and search all types of claims.
|
||||
"""
|
||||
@@ -1940,7 +2082,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
else:
|
||||
claims = partial(self.ledger.get_claims, wallet=wallet, accounts=wallet.accounts)
|
||||
claim_count = partial(self.ledger.get_claim_count, wallet=wallet, accounts=wallet.accounts)
|
||||
return maybe_paginate(claims, claim_count, page, page_size)
|
||||
return paginate_rows(claims, claim_count, page, page_size)
|
||||
|
||||
@requires(WALLET_COMPONENT)
|
||||
async def jsonrpc_claim_search(self, **kwargs):
|
||||
@@ -1952,7 +2094,8 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
eg. --height=">400000" would limit results to only claims above 400k block height.
|
||||
|
||||
Usage:
|
||||
claim_search [<name> | --name=<name>] [--claim_id=<claim_id>] [--txid=<txid>] [--nout=<nout>]
|
||||
claim_search [<name> | --name=<name>] [--txid=<txid>] [--nout=<nout>]
|
||||
[--claim_id=<claim_id> | --claim_ids=<claim_ids>...]
|
||||
[--channel=<channel> |
|
||||
[[--channel_ids=<channel_ids>...] [--not_channel_ids=<not_channel_ids>...]]]
|
||||
[--has_channel_signature] [--valid_channel_signature | --invalid_channel_signature]
|
||||
@@ -1972,10 +2115,12 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
[--any_locations=<any_locations>...] [--all_locations=<all_locations>...]
|
||||
[--not_locations=<not_locations>...]
|
||||
[--order_by=<order_by>...] [--page=<page>] [--page_size=<page_size>]
|
||||
[--wallet_id=<wallet_id>]
|
||||
|
||||
Options:
|
||||
--name=<name> : (str) claim name (normalized)
|
||||
--claim_id=<claim_id> : (str) full or partial claim id
|
||||
--claim_ids=<claim_ids> : (list) list of full claim ids
|
||||
--txid=<txid> : (str) transaction id
|
||||
--nout=<nout> : (str) position in the transaction
|
||||
--channel=<channel> : (str) claims signed by this channel (argument is
|
||||
@@ -2065,16 +2210,20 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
'trending_local', 'trending_global', 'activation_height'
|
||||
--no_totals : (bool) do not calculate the total number of pages and items in result set
|
||||
(significant performance boost)
|
||||
--wallet_id=<wallet_id> : (str) wallet to check for claim purchase reciepts
|
||||
|
||||
Returns: {Paginated[Output]}
|
||||
"""
|
||||
wallet = self.wallet_manager.get_wallet_or_default(kwargs.pop('wallet_id', None))
|
||||
if {'claim_id', 'claim_ids'}.issubset(kwargs):
|
||||
raise ValueError("Only 'claim_id' or 'claim_ids' is allowed, not both.")
|
||||
if kwargs.pop('valid_channel_signature', False):
|
||||
kwargs['signature_valid'] = 1
|
||||
if kwargs.pop('invalid_channel_signature', False):
|
||||
kwargs['signature_valid'] = 0
|
||||
page_num, page_size = abs(kwargs.pop('page', 1)), min(abs(kwargs.pop('page_size', 10)), 50)
|
||||
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, offset, total = await self.ledger.claim_search(**kwargs)
|
||||
txos, offset, total = await self.ledger.claim_search(wallet.accounts, **kwargs)
|
||||
result = {"items": txos, "page": page_num, "page_size": page_size}
|
||||
if not kwargs.pop('no_totals', False):
|
||||
result['total_pages'] = int((total + (page_size - 1)) / page_size)
|
||||
@@ -2445,7 +2594,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
else:
|
||||
channels = partial(self.ledger.get_channels, wallet=wallet, accounts=wallet.accounts)
|
||||
channel_count = partial(self.ledger.get_channel_count, wallet=wallet, accounts=wallet.accounts)
|
||||
return maybe_paginate(channels, channel_count, page, page_size)
|
||||
return paginate_rows(channels, channel_count, page, page_size)
|
||||
|
||||
@requires(WALLET_COMPONENT)
|
||||
async def jsonrpc_channel_export(self, channel_id=None, channel_name=None, account_id=None, wallet_id=None):
|
||||
@@ -2497,6 +2646,8 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
Returns:
|
||||
(dict) Result dictionary
|
||||
"""
|
||||
wallet = self.wallet_manager.get_wallet_or_default(wallet_id)
|
||||
|
||||
decoded = base58.b58decode(channel_data)
|
||||
data = json.loads(decoded)
|
||||
channel_private_key = ecdsa.SigningKey.from_pem(
|
||||
@@ -2507,12 +2658,11 @@ 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(
|
||||
public_key_id=self.ledger.public_key_to_address(public_key_der)
|
||||
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:
|
||||
holding_address = channels[0].get_address(self.ledger)
|
||||
|
||||
wallet = self.wallet_manager.get_wallet_or_default(wallet_id)
|
||||
account: LBCAccount = await self.ledger.get_account_for_address(wallet, holding_address)
|
||||
if account:
|
||||
# Case 1: channel holding address is in one of the accounts we already have
|
||||
@@ -3100,7 +3250,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
else:
|
||||
streams = partial(self.ledger.get_streams, wallet=wallet, accounts=wallet.accounts)
|
||||
stream_count = partial(self.ledger.get_stream_count, wallet=wallet, accounts=wallet.accounts)
|
||||
return maybe_paginate(streams, stream_count, page, page_size)
|
||||
return paginate_rows(streams, stream_count, page, page_size)
|
||||
|
||||
@requires(WALLET_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT, BLOB_COMPONENT,
|
||||
DHT_COMPONENT, DATABASE_COMPONENT)
|
||||
@@ -3127,7 +3277,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
@requires(WALLET_COMPONENT)
|
||||
async def jsonrpc_support_create(
|
||||
self, claim_id, amount, tip=False, account_id=None, wallet_id=None, funding_account_ids=None,
|
||||
preview=False, blocking=False):
|
||||
channel_id=None, preview=False, blocking=False):
|
||||
"""
|
||||
Create a support or a tip for name claim.
|
||||
|
||||
@@ -3151,15 +3301,16 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
wallet = self.wallet_manager.get_wallet_or_default(wallet_id)
|
||||
assert not wallet.is_locked, "Cannot spend funds with locked wallet, unlock first."
|
||||
funding_accounts = wallet.get_accounts_or_all(funding_account_ids)
|
||||
channel = await self.get_channel_or_none(wallet, None, channel_id, None, for_signing=True)
|
||||
amount = self.get_dewies_or_error("amount", amount)
|
||||
claim = await self.ledger.get_claim_by_claim_id(claim_id)
|
||||
claim = await self.ledger.get_claim_by_claim_id(wallet.accounts, claim_id)
|
||||
claim_address = claim.get_address(self.ledger)
|
||||
if not tip:
|
||||
account = wallet.get_account_or_default(account_id)
|
||||
claim_address = await account.receiving.get_or_create_usable_address()
|
||||
|
||||
tx = await Transaction.support(
|
||||
claim.claim_name, claim_id, amount, claim_address, funding_accounts, funding_accounts[0]
|
||||
claim.claim_name, claim_id, amount, claim_address, funding_accounts, funding_accounts[0], channel
|
||||
)
|
||||
|
||||
if not preview:
|
||||
@@ -3203,7 +3354,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
else:
|
||||
supports = partial(self.ledger.get_supports, wallet=wallet, accounts=wallet.accounts)
|
||||
support_count = partial(self.ledger.get_support_count, wallet=wallet, accounts=wallet.accounts)
|
||||
return maybe_paginate(supports, support_count, page, page_size)
|
||||
return paginate_rows(supports, support_count, page, page_size)
|
||||
|
||||
@requires(WALLET_COMPONENT)
|
||||
async def jsonrpc_support_abandon(
|
||||
@@ -3353,7 +3504,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
self.ledger.get_transaction_history, wallet=wallet, accounts=wallet.accounts)
|
||||
transaction_count = partial(
|
||||
self.ledger.get_transaction_history_count, wallet=wallet, accounts=wallet.accounts)
|
||||
return maybe_paginate(transactions, transaction_count, page, page_size)
|
||||
return paginate_rows(transactions, transaction_count, page, page_size)
|
||||
|
||||
@requires(WALLET_COMPONENT)
|
||||
def jsonrpc_transaction_show(self, txid):
|
||||
@@ -3399,7 +3550,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
else:
|
||||
utxos = partial(self.ledger.get_utxos, wallet=wallet, accounts=wallet.accounts)
|
||||
utxo_count = partial(self.ledger.get_utxo_count, wallet=wallet, accounts=wallet.accounts)
|
||||
return maybe_paginate(utxos, utxo_count, page, page_size)
|
||||
return paginate_rows(utxos, utxo_count, page, page_size)
|
||||
|
||||
@requires(WALLET_COMPONENT)
|
||||
async def jsonrpc_utxo_release(self, account_id=None, wallet_id=None):
|
||||
@@ -3484,19 +3635,22 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
"""
|
||||
|
||||
@requires(DHT_COMPONENT)
|
||||
async def jsonrpc_peer_list(self, blob_hash, search_bottom_out_limit=None):
|
||||
async def jsonrpc_peer_list(self, blob_hash, search_bottom_out_limit=None, page=None, page_size=None):
|
||||
"""
|
||||
Get peers for blob hash
|
||||
|
||||
Usage:
|
||||
peer_list (<blob_hash> | --blob_hash=<blob_hash>)
|
||||
[<search_bottom_out_limit> | --search_bottom_out_limit=<search_bottom_out_limit>]
|
||||
[<search_bottom_out_limit> | --search_bottom_out_limit=<search_bottom_out_limit>]
|
||||
[--page=<page>] [--page_size=<page_size>]
|
||||
|
||||
Options:
|
||||
--blob_hash=<blob_hash> : (str) find available peers for this blob hash
|
||||
--search_bottom_out_limit=<search_bottom_out_limit> : (int) the number of search probes in a row
|
||||
that don't find any new peers
|
||||
before giving up and returning
|
||||
--page=<page> : (int) page to return during paginating
|
||||
--page_size=<page_size> : (int) number of items on page during pagination
|
||||
|
||||
Returns:
|
||||
(list) List of contact dictionaries {'address': <peer ip>, 'udp_port': <dht port>, 'tcp_port': <peer port>,
|
||||
@@ -3525,7 +3679,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
}
|
||||
for peer in peers
|
||||
]
|
||||
return results
|
||||
return paginate_list(results, page, page_size)
|
||||
|
||||
@requires(DATABASE_COMPONENT)
|
||||
async def jsonrpc_blob_announce(self, blob_hash=None, stream_hash=None, sd_hash=None):
|
||||
@@ -3563,7 +3717,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
|
||||
@requires(BLOB_COMPONENT, WALLET_COMPONENT)
|
||||
async def jsonrpc_blob_list(self, uri=None, stream_hash=None, sd_hash=None, needed=None,
|
||||
finished=None, page_size=None, page=None):
|
||||
finished=None, page=None, page_size=None):
|
||||
"""
|
||||
Returns blob hashes. If not given filters, returns all blobs known by the blob manager
|
||||
|
||||
@@ -3571,8 +3725,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
blob_list [--needed] [--finished] [<uri> | --uri=<uri>]
|
||||
[<stream_hash> | --stream_hash=<stream_hash>]
|
||||
[<sd_hash> | --sd_hash=<sd_hash>]
|
||||
[<page_size> | --page_size=<page_size>]
|
||||
[<page> | --page=<page>]
|
||||
[--page=<page>] [--page_size=<page_size>]
|
||||
|
||||
Options:
|
||||
--needed : (bool) only return needed blobs
|
||||
@@ -3580,8 +3733,8 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
--uri=<uri> : (str) filter blobs by stream in a uri
|
||||
--stream_hash=<stream_hash> : (str) filter blobs by stream hash
|
||||
--sd_hash=<sd_hash> : (str) filter blobs by sd hash
|
||||
--page_size=<page_size> : (int) results page size
|
||||
--page=<page> : (int) page of results to return
|
||||
--page=<page> : (int) page to return during paginating
|
||||
--page_size=<page_size> : (int) number of items on page during pagination
|
||||
|
||||
Returns:
|
||||
(list) List of blob hashes
|
||||
@@ -3589,7 +3742,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
|
||||
if uri or stream_hash or sd_hash:
|
||||
if uri:
|
||||
metadata = (await self.resolve(uri))[uri]
|
||||
metadata = (await self.resolve([], uri))[uri]
|
||||
sd_hash = utils.get_sd_hash(metadata)
|
||||
stream_hash = await self.storage.get_stream_hash_for_sd_hash(sd_hash)
|
||||
elif stream_hash:
|
||||
@@ -3609,11 +3762,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
blobs = [blob_hash for blob_hash in blobs if not self.blob_manager.is_blob_verified(blob_hash)]
|
||||
if finished:
|
||||
blobs = [blob_hash for blob_hash in blobs if self.blob_manager.is_blob_verified(blob_hash)]
|
||||
page_size = page_size or len(blobs)
|
||||
page = page or 0
|
||||
start_index = page * page_size
|
||||
stop_index = start_index + page_size
|
||||
return blobs[start_index:stop_index]
|
||||
return paginate_list(blobs, page, page_size)
|
||||
|
||||
@requires(BLOB_COMPONENT)
|
||||
async def jsonrpc_blob_reflect(self, blob_hashes, reflector_server=None):
|
||||
@@ -3832,7 +3981,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
channel_url = comment.get('channel_url')
|
||||
if not channel_url:
|
||||
continue
|
||||
resolve_response = await self.resolve([channel_url])
|
||||
resolve_response = await self.resolve([], [channel_url])
|
||||
if isinstance(resolve_response[channel_url], Output):
|
||||
comment['is_channel_signature_valid'] = comment_client.is_comment_signed_by_channel(
|
||||
comment, resolve_response[channel_url]
|
||||
@@ -3963,7 +4112,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
self.conf.comment_server, 'get_comments_by_id', comment_ids=comment_ids
|
||||
)
|
||||
claim_ids = {comment['claim_id'] for comment in comments}
|
||||
claims = {cid: await self.ledger.get_claim_by_claim_id(claim_id=cid) for cid in claim_ids}
|
||||
claims = {cid: await self.ledger.get_claim_by_claim_id(wallet.accounts, claim_id=cid) for cid in claim_ids}
|
||||
pieces = []
|
||||
for comment in comments:
|
||||
claim = claims.get(comment['claim_id'])
|
||||
@@ -3981,13 +4130,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
return await comment_client.jsonrpc_post(self.conf.comment_server, 'hide_comments', pieces=pieces)
|
||||
|
||||
async def broadcast_or_release(self, tx, blocking=False):
|
||||
try:
|
||||
await self.ledger.broadcast(tx)
|
||||
if blocking:
|
||||
await self.ledger.wait(tx)
|
||||
except:
|
||||
await self.ledger.release_tx(tx)
|
||||
raise
|
||||
await self.wallet_manager.broadcast_or_release(tx, blocking)
|
||||
|
||||
def valid_address_or_error(self, address):
|
||||
try:
|
||||
@@ -4080,11 +4223,11 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||
except ValueError as e:
|
||||
raise ValueError(f"Invalid value for '{argument}': {e.args[0]}")
|
||||
|
||||
async def resolve(self, urls):
|
||||
results = await self.ledger.resolve(urls)
|
||||
async def resolve(self, accounts, urls):
|
||||
results = await self.ledger.resolve(accounts, urls)
|
||||
if results:
|
||||
try:
|
||||
claims = self.stream_manager._convert_to_old_resolve_output(results)
|
||||
claims = self.stream_manager._convert_to_old_resolve_output(self.wallet_manager, results)
|
||||
await self.storage.save_claims_for_resolve([
|
||||
value for value in claims.values() if 'error' not in value
|
||||
])
|
||||
@@ -4117,7 +4260,7 @@ def get_loggly_query_string(installation_id):
|
||||
now = utils.now()
|
||||
yesterday = now - utils.timedelta(days=1)
|
||||
params = {
|
||||
'terms': 'json.installation_id:{}*'.format(installation_id[:SHORT_ID_LEN]),
|
||||
'terms': f'json.installation_id:{installation_id[:SHORT_ID_LEN]}*',
|
||||
'from': loggly_time_string(yesterday),
|
||||
'to': loggly_time_string(now)
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
from lbry.extras.daemon import Components # register Component classes
|
||||
@@ -7,6 +7,7 @@ from typing import Optional
|
||||
from aiohttp.client_exceptions import ClientError
|
||||
from lbry.error import InvalidExchangeRateResponse, CurrencyConversionError
|
||||
from lbry.utils import aiohttp_request
|
||||
from lbry.wallet.dewies import lbc_to_dewies
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -26,8 +27,7 @@ class ExchangeRate:
|
||||
self.ts = ts
|
||||
|
||||
def __repr__(self):
|
||||
out = "Currency pair:{}, spot:{}, ts:{}".format(
|
||||
self.currency_pair, self.spot, self.ts)
|
||||
out = f"Currency pair:{self.currency_pair}, spot:{self.spot}, ts:{self.ts}"
|
||||
return out
|
||||
|
||||
def as_dict(self):
|
||||
@@ -223,19 +223,23 @@ class ExchangeRateManager:
|
||||
rates = [market.rate for market in self.market_feeds]
|
||||
log.debug("Converting %f %s to %s, rates: %s" % (amount, from_currency, to_currency, rates))
|
||||
if from_currency == to_currency:
|
||||
return amount
|
||||
return round(amount, 8)
|
||||
|
||||
for market in self.market_feeds:
|
||||
if (market.rate_is_initialized() and market.is_online() and
|
||||
market.rate.currency_pair == (from_currency, to_currency)):
|
||||
return amount * Decimal(market.rate.spot)
|
||||
return round(amount * Decimal(market.rate.spot), 8)
|
||||
for market in self.market_feeds:
|
||||
if (market.rate_is_initialized() and market.is_online() and
|
||||
market.rate.currency_pair[0] == from_currency):
|
||||
return self.convert_currency(
|
||||
market.rate.currency_pair[1], to_currency, amount * Decimal(market.rate.spot))
|
||||
return round(self.convert_currency(
|
||||
market.rate.currency_pair[1], to_currency, amount * Decimal(market.rate.spot)), 8)
|
||||
raise CurrencyConversionError(
|
||||
f'Unable to convert {amount} from {from_currency} to {to_currency}')
|
||||
|
||||
def to_dewies(self, currency, amount) -> int:
|
||||
converted = self.convert_currency(currency, "LBC", amount)
|
||||
return lbc_to_dewies(str(converted))
|
||||
|
||||
def fee_dict(self):
|
||||
return {market: market.rate.as_dict() for market in self.market_feeds}
|
||||
@@ -38,6 +38,7 @@ def encode_txo_doc():
|
||||
'permanent_url': "when type is 'claim' or 'support', this is the long permanent claim URL",
|
||||
'signing_channel': "for signed claims only, metadata of signing channel",
|
||||
'is_channel_signature_valid': "for signed claims only, whether signature is valid",
|
||||
'purchase_receipt': "metadata for the purchase transaction associated with this claim"
|
||||
}
|
||||
|
||||
|
||||
@@ -152,6 +153,8 @@ class JSONResponseEncoder(JSONEncoder):
|
||||
}
|
||||
|
||||
def encode_output(self, txo, check_signature=True):
|
||||
if not txo:
|
||||
return
|
||||
tx_height = txo.tx_ref.height
|
||||
best_height = self.ledger.headers.height
|
||||
output = {
|
||||
@@ -159,7 +162,7 @@ class JSONResponseEncoder(JSONEncoder):
|
||||
'nout': txo.position,
|
||||
'height': tx_height,
|
||||
'amount': dewies_to_lbc(txo.amount),
|
||||
'address': txo.get_address(self.ledger),
|
||||
'address': txo.get_address(self.ledger) if txo.has_address else None,
|
||||
'confirmations': (best_height+1) - tx_height if tx_height > 0 else tx_height,
|
||||
'timestamp': self.ledger.headers[tx_height]['timestamp'] if 0 < tx_height <= best_height else None
|
||||
}
|
||||
@@ -176,6 +179,13 @@ class JSONResponseEncoder(JSONEncoder):
|
||||
output['claim_op'] = 'update'
|
||||
elif txo.script.is_support_claim:
|
||||
output['type'] = 'support'
|
||||
elif txo.script.is_return_data:
|
||||
output['type'] = 'data'
|
||||
elif txo.purchase is not None:
|
||||
output['type'] = 'purchase'
|
||||
output['claim_id'] = txo.purchased_claim_id
|
||||
if txo.purchased_claim is not None:
|
||||
output['claim'] = self.encode_output(txo.purchased_claim)
|
||||
else:
|
||||
output['type'] = 'payment'
|
||||
|
||||
@@ -197,6 +207,8 @@ class JSONResponseEncoder(JSONEncoder):
|
||||
output['value_type'] = txo.claim.claim_type
|
||||
if self.include_protobuf:
|
||||
output['protobuf'] = hexlify(txo.claim.to_bytes())
|
||||
if txo.purchase_receipt is not None:
|
||||
output['purchase_receipt'] = self.encode_output(txo.purchase_receipt)
|
||||
if txo.claim.is_channel:
|
||||
output['has_signing_key'] = txo.has_private_key
|
||||
if check_signature and txo.claim.is_signed:
|
||||
@@ -273,6 +285,8 @@ class JSONResponseEncoder(JSONEncoder):
|
||||
'channel_name': managed_stream.channel_name,
|
||||
'claim_name': managed_stream.claim_name,
|
||||
'content_fee': managed_stream.content_fee,
|
||||
'purchase_receipt': self.encode_output(managed_stream.purchase_receipt),
|
||||
'added_on': managed_stream.added_on,
|
||||
'height': tx_height,
|
||||
'confirmations': (best_height + 1) - tx_height if tx_height > 0 else tx_height,
|
||||
'timestamp': self.ledger.headers[tx_height]['timestamp'] if 0 < tx_height <= best_height else None
|
||||
|
||||
@@ -67,6 +67,14 @@ class HTTPSLogglyHandler(logging.Handler):
|
||||
def emit(self, record):
|
||||
asyncio.ensure_future(self._emit(record))
|
||||
|
||||
def close(self):
|
||||
super().close()
|
||||
try:
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.run_until_complete(self._session.close())
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
||||
|
||||
def get_loggly_handler():
|
||||
handler = HTTPSLogglyHandler(LOGGLY_TOKEN)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# pylint: skip-file
|
||||
import os
|
||||
import sys
|
||||
import logging
|
||||
@@ -28,12 +29,14 @@ def migrate_db(conf, start, end):
|
||||
from .migrate9to10 import do_migration
|
||||
elif current == 10:
|
||||
from .migrate10to11 import do_migration
|
||||
elif current == 11:
|
||||
from .migrate11to12 import do_migration
|
||||
else:
|
||||
raise Exception("DB migration of version {} to {} is not available".format(current, current+1))
|
||||
raise Exception(f"DB migration of version {current} to {current+1} is not available")
|
||||
try:
|
||||
do_migration(conf)
|
||||
except Exception as err:
|
||||
log.info("failed to migrate database: %s", str(err))
|
||||
except Exception:
|
||||
log.exception("failed to migrate database")
|
||||
if os.path.exists(os.path.join(conf.data_dir, "lbrynet.sqlite")):
|
||||
backup_name = f"rev_{current}_unmigrated_database"
|
||||
count = 0
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
import sqlite3
|
||||
import os
|
||||
import time
|
||||
|
||||
|
||||
def do_migration(conf):
|
||||
db_path = os.path.join(conf.data_dir, 'lbrynet.sqlite')
|
||||
connection = sqlite3.connect(db_path)
|
||||
connection.row_factory = sqlite3.Row
|
||||
cursor = connection.cursor()
|
||||
|
||||
current_columns = []
|
||||
for col_info in cursor.execute("pragma table_info('file');").fetchall():
|
||||
current_columns.append(col_info[1])
|
||||
|
||||
if 'added_on' in current_columns:
|
||||
connection.close()
|
||||
print('already migrated')
|
||||
return
|
||||
|
||||
# follow 12 step schema change procedure
|
||||
cursor.execute("pragma foreign_keys=off")
|
||||
|
||||
# we don't have any indexes, views or triggers, so step 3 is skipped.
|
||||
cursor.execute("drop table if exists new_file")
|
||||
cursor.execute("""
|
||||
create table if not exists new_file (
|
||||
stream_hash text not null primary key references stream,
|
||||
file_name text,
|
||||
download_directory text,
|
||||
blob_data_rate text not null,
|
||||
status text not null,
|
||||
saved_file integer not null,
|
||||
content_fee text,
|
||||
added_on integer not null
|
||||
);
|
||||
|
||||
|
||||
""")
|
||||
|
||||
# step 5: transfer content from old to new
|
||||
select = "select * from file"
|
||||
for (stream_hash, file_name, download_dir, blob_rate, status, saved_file, fee) \
|
||||
in cursor.execute(select).fetchall():
|
||||
added_on = int(time.time())
|
||||
cursor.execute(
|
||||
"insert into new_file values (?, ?, ?, ?, ?, ?, ?, ?)",
|
||||
(stream_hash, file_name, download_dir, blob_rate, status, saved_file, fee, added_on)
|
||||
)
|
||||
|
||||
# step 6: drop old table
|
||||
cursor.execute("drop table file")
|
||||
|
||||
# step 7: rename new table to old table
|
||||
cursor.execute("alter table new_file rename to file")
|
||||
|
||||
# step 8: we aren't using indexes, views or triggers so skip
|
||||
# step 9: no views so skip
|
||||
# step 10: foreign key check
|
||||
cursor.execute("pragma foreign_key_check;")
|
||||
|
||||
# step 11: commit transaction
|
||||
connection.commit()
|
||||
|
||||
# step 12: re-enable foreign keys
|
||||
connection.execute("pragma foreign_keys=on;")
|
||||
|
||||
# done :)
|
||||
connection.close()
|
||||
@@ -286,7 +286,7 @@ def do_migration(conf):
|
||||
_add_recovered_blobs(blobs, damaged_sd, sd_length) # pylint: disable=no-value-for-parameter
|
||||
_import_file(*file_args[damaged_sd])
|
||||
damaged_stream_sds.remove(damaged_sd)
|
||||
except (OSError, ValueError, TypeError, IOError, AssertionError, sqlite3.IntegrityError):
|
||||
except (OSError, ValueError, TypeError, AssertionError, sqlite3.IntegrityError):
|
||||
continue
|
||||
|
||||
log.info("migrated %i files", new_db.execute("select count(*) from file").fetchone()[0])
|
||||
|
||||
@@ -94,8 +94,7 @@ def _batched_select(transaction, query, parameters, batch_size=900):
|
||||
for start_index in range(0, len(parameters), batch_size):
|
||||
current_batch = parameters[start_index:start_index+batch_size]
|
||||
bind = "({})".format(','.join(['?'] * len(current_batch)))
|
||||
for result in transaction.execute(query.format(bind), current_batch):
|
||||
yield result
|
||||
yield from transaction.execute(query.format(bind), current_batch)
|
||||
|
||||
|
||||
def get_all_lbry_files(transaction: sqlite3.Connection) -> typing.List[typing.Dict]:
|
||||
@@ -104,8 +103,8 @@ def get_all_lbry_files(transaction: sqlite3.Connection) -> typing.List[typing.Di
|
||||
stream_hashes = tuple(
|
||||
stream_hash for (stream_hash,) in transaction.execute("select stream_hash from file").fetchall()
|
||||
)
|
||||
for (rowid, stream_hash, file_name, download_dir, data_rate, status, saved_file, raw_content_fee, _,
|
||||
sd_hash, stream_key, stream_name, suggested_file_name, *claim_args) in _batched_select(
|
||||
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.* "
|
||||
"from file inner join stream on file.stream_hash=stream.stream_hash "
|
||||
"inner join content_claim cc on file.stream_hash=cc.stream_hash "
|
||||
@@ -120,6 +119,7 @@ def get_all_lbry_files(transaction: sqlite3.Connection) -> typing.List[typing.Di
|
||||
files.append(
|
||||
{
|
||||
"rowid": rowid,
|
||||
"added_on": added_on,
|
||||
"stream_hash": stream_hash,
|
||||
"file_name": file_name, # hex
|
||||
"download_directory": download_dir, # hex
|
||||
@@ -181,17 +181,20 @@ def delete_stream(transaction: sqlite3.Connection, descriptor: 'StreamDescriptor
|
||||
|
||||
def store_file(transaction: sqlite3.Connection, stream_hash: str, file_name: typing.Optional[str],
|
||||
download_directory: typing.Optional[str], data_payment_rate: float, status: str,
|
||||
content_fee: typing.Optional[Transaction]) -> int:
|
||||
content_fee: typing.Optional[Transaction], added_on: typing.Optional[int] = None) -> int:
|
||||
if not file_name and not download_directory:
|
||||
encoded_file_name, encoded_download_dir = None, None
|
||||
else:
|
||||
encoded_file_name = binascii.hexlify(file_name.encode()).decode()
|
||||
encoded_download_dir = binascii.hexlify(download_directory.encode()).decode()
|
||||
time_added = added_on or int(time.time())
|
||||
transaction.execute(
|
||||
"insert or replace into file values (?, ?, ?, ?, ?, ?, ?)",
|
||||
"insert or replace into file values (?, ?, ?, ?, ?, ?, ?, ?)",
|
||||
(stream_hash, encoded_file_name, encoded_download_dir, data_payment_rate, status,
|
||||
1 if (file_name and download_directory and os.path.isfile(os.path.join(download_directory, file_name))) else 0,
|
||||
None if not content_fee else binascii.hexlify(content_fee.raw).decode())
|
||||
None if not content_fee else binascii.hexlify(content_fee.raw).decode(),
|
||||
time_added
|
||||
)
|
||||
).fetchall()
|
||||
|
||||
return transaction.execute("select rowid from file where stream_hash=?", (stream_hash, )).fetchone()[0]
|
||||
@@ -247,7 +250,8 @@ class SQLiteStorage(SQLiteMixin):
|
||||
blob_data_rate real not null,
|
||||
status text not null,
|
||||
saved_file integer not null,
|
||||
content_fee text
|
||||
content_fee text,
|
||||
added_on integer not null
|
||||
);
|
||||
|
||||
create table if not exists content_claim (
|
||||
@@ -449,18 +453,20 @@ class SQLiteStorage(SQLiteMixin):
|
||||
|
||||
def save_downloaded_file(self, stream_hash: str, file_name: typing.Optional[str],
|
||||
download_directory: typing.Optional[str], data_payment_rate: float,
|
||||
content_fee: typing.Optional[Transaction] = None) -> typing.Awaitable[int]:
|
||||
content_fee: typing.Optional[Transaction] = None,
|
||||
added_on: typing.Optional[int] = None) -> typing.Awaitable[int]:
|
||||
return self.save_published_file(
|
||||
stream_hash, file_name, download_directory, data_payment_rate, status="running",
|
||||
content_fee=content_fee
|
||||
content_fee=content_fee, added_on=added_on
|
||||
)
|
||||
|
||||
def save_published_file(self, stream_hash: str, file_name: typing.Optional[str],
|
||||
download_directory: typing.Optional[str], data_payment_rate: float,
|
||||
status: str = "finished",
|
||||
content_fee: typing.Optional[Transaction] = None) -> typing.Awaitable[int]:
|
||||
content_fee: typing.Optional[Transaction] = None,
|
||||
added_on: typing.Optional[int] = None) -> typing.Awaitable[int]:
|
||||
return self.db.run(store_file, stream_hash, file_name, download_directory, data_payment_rate, status,
|
||||
content_fee)
|
||||
content_fee, added_on)
|
||||
|
||||
async def update_manually_removed_files_since_last_run(self):
|
||||
"""
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2016-2017 Ionuț Arțăriși <ionut@artarisi.eu>
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
||||
@@ -13,6 +13,7 @@ from torba.client.constants import COIN
|
||||
|
||||
from lbry.schema.mime_types import guess_media_type
|
||||
from lbry.schema.base import Metadata, BaseMessageList
|
||||
from lbry.schema.tags import clean_tags, normalize_tag
|
||||
from lbry.schema.types.v2.claim_pb2 import (
|
||||
Fee as FeeMessage,
|
||||
Location as LocationMessage,
|
||||
@@ -533,3 +534,13 @@ class LocationList(BaseMessageList[Location]):
|
||||
|
||||
def append(self, value):
|
||||
self.add().from_value(value)
|
||||
|
||||
|
||||
class TagList(BaseMessageList[str]):
|
||||
__slots__ = ()
|
||||
item_class = str
|
||||
|
||||
def append(self, tag: str):
|
||||
tag = normalize_tag(tag)
|
||||
if tag and tag not in self.message:
|
||||
self.message.append(tag)
|
||||
@@ -119,3 +119,6 @@ class BaseMessageList(Metadata, Generic[I]):
|
||||
|
||||
def __delitem__(self, key):
|
||||
del self._message[key]
|
||||
|
||||
def __eq__(self, other) -> bool:
|
||||
return self._message == other
|
||||
@@ -13,7 +13,7 @@ from lbry.schema.base import Signable
|
||||
from lbry.schema.mime_types import guess_media_type, guess_stream_type
|
||||
from lbry.schema.attrs import (
|
||||
Source, Playable, Dimmensional, Fee, Image, Video, Audio,
|
||||
LanguageList, LocationList, ClaimList, ClaimReference
|
||||
LanguageList, LocationList, ClaimList, ClaimReference, TagList
|
||||
)
|
||||
from lbry.schema.types.v2.claim_pb2 import Claim as ClaimMessage
|
||||
|
||||
@@ -164,8 +164,8 @@ class BaseClaim:
|
||||
return Source(self.claim.message.thumbnail)
|
||||
|
||||
@property
|
||||
def tags(self) -> List:
|
||||
return self.claim.message.tags
|
||||
def tags(self) -> List[str]:
|
||||
return TagList(self.claim.message.tags)
|
||||
|
||||
@property
|
||||
def languages(self) -> LanguageList:
|
||||
@@ -232,6 +232,9 @@ class Stream(BaseClaim):
|
||||
if 'file_size' in kwargs:
|
||||
self.source.size = kwargs.pop('file_size')
|
||||
|
||||
if self.stream_type is not None and self.stream_type != stream_type:
|
||||
self.message.ClearField(self.stream_type)
|
||||
|
||||
if stream_type in ('image', 'video', 'audio'):
|
||||
media = getattr(self, stream_type)
|
||||
media_args = {'file_metadata': None}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
from google.protobuf.message import DecodeError
|
||||
from google.protobuf.json_format import MessageToDict
|
||||
from lbry.schema.types.v2.purchase_pb2 import Purchase as PurchaseMessage
|
||||
from .attrs import ClaimReference
|
||||
|
||||
|
||||
class Purchase(ClaimReference):
|
||||
|
||||
START_BYTE = ord('P')
|
||||
|
||||
__slots__ = ()
|
||||
|
||||
def __init__(self, claim_id=None):
|
||||
super().__init__(PurchaseMessage())
|
||||
if claim_id is not None:
|
||||
self.claim_id = claim_id
|
||||
|
||||
def to_dict(self):
|
||||
return MessageToDict(self.message)
|
||||
|
||||
def to_message_bytes(self) -> bytes:
|
||||
return self.message.SerializeToString()
|
||||
|
||||
def to_bytes(self) -> bytes:
|
||||
pieces = bytearray()
|
||||
pieces.append(self.START_BYTE)
|
||||
pieces.extend(self.to_message_bytes())
|
||||
return bytes(pieces)
|
||||
|
||||
@classmethod
|
||||
def has_start_byte(cls, data: bytes):
|
||||
return data and data[0] == cls.START_BYTE
|
||||
|
||||
@classmethod
|
||||
def from_bytes(cls, data: bytes):
|
||||
purchase = cls()
|
||||
if purchase.has_start_byte(data):
|
||||
purchase.message.ParseFromString(data[1:])
|
||||
else:
|
||||
raise DecodeError('Message does not start with correct byte.')
|
||||
return purchase
|
||||
|
||||
def __len__(self):
|
||||
return len(self.to_bytes())
|
||||
|
||||
def __bytes__(self):
|
||||
return self.to_bytes()
|
||||
@@ -10,4 +10,4 @@ def normalize_tag(tag: str):
|
||||
|
||||
|
||||
def clean_tags(tags: List[str]):
|
||||
return [tag for tag in set(normalize_tag(tag) for tag in tags) if tag]
|
||||
return [tag for tag in {normalize_tag(tag) for tag in tags} if tag]
|
||||
@@ -19,7 +19,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
package='pb',
|
||||
syntax='proto3',
|
||||
serialized_options=None,
|
||||
serialized_pb=_b('\n\x0b\x63laim.proto\x12\x02pb\"\xab\x02\n\x05\x43laim\x12\x1c\n\x06stream\x18\x01 \x01(\x0b\x32\n.pb.StreamH\x00\x12\x1e\n\x07\x63hannel\x18\x02 \x01(\x0b\x32\x0b.pb.ChannelH\x00\x12#\n\ncollection\x18\x03 \x01(\x0b\x32\r.pb.ClaimListH\x00\x12$\n\x06repost\x18\x04 \x01(\x0b\x32\x12.pb.ClaimReferenceH\x00\x12\r\n\x05title\x18\x08 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\t \x01(\t\x12\x1d\n\tthumbnail\x18\n \x01(\x0b\x32\n.pb.Source\x12\x0c\n\x04tags\x18\x0b \x03(\t\x12\x1f\n\tlanguages\x18\x0c \x03(\x0b\x32\x0c.pb.Language\x12\x1f\n\tlocations\x18\r \x03(\x0b\x32\x0c.pb.LocationB\x06\n\x04type\"\x84\x02\n\x06Stream\x12\x1a\n\x06source\x18\x01 \x01(\x0b\x32\n.pb.Source\x12\x0e\n\x06\x61uthor\x18\x02 \x01(\t\x12\x0f\n\x07license\x18\x03 \x01(\t\x12\x13\n\x0blicense_url\x18\x04 \x01(\t\x12\x14\n\x0crelease_time\x18\x05 \x01(\x03\x12\x14\n\x03\x66\x65\x65\x18\x06 \x01(\x0b\x32\x07.pb.Fee\x12\x1a\n\x05image\x18\n \x01(\x0b\x32\t.pb.ImageH\x00\x12\x1a\n\x05video\x18\x0b \x01(\x0b\x32\t.pb.VideoH\x00\x12\x1a\n\x05\x61udio\x18\x0c \x01(\x0b\x32\t.pb.AudioH\x00\x12 \n\x08software\x18\r \x01(\x0b\x32\x0c.pb.SoftwareH\x00\x42\x06\n\x04type\"}\n\x07\x43hannel\x12\x12\n\npublic_key\x18\x01 \x01(\x0c\x12\r\n\x05\x65mail\x18\x02 \x01(\t\x12\x13\n\x0bwebsite_url\x18\x03 \x01(\t\x12\x19\n\x05\x63over\x18\x04 \x01(\x0b\x32\n.pb.Source\x12\x1f\n\x08\x66\x65\x61tured\x18\x05 \x01(\x0b\x32\r.pb.ClaimList\"$\n\x0e\x43laimReference\x12\x12\n\nclaim_hash\x18\x01 \x01(\x0c\"\x90\x01\n\tClaimList\x12)\n\tlist_type\x18\x01 \x01(\x0e\x32\x16.pb.ClaimList.ListType\x12,\n\x10\x63laim_references\x18\x02 \x03(\x0b\x32\x12.pb.ClaimReference\"*\n\x08ListType\x12\x0e\n\nCOLLECTION\x10\x00\x12\x0e\n\nDERIVATION\x10\x02\"d\n\x06Source\x12\x0c\n\x04hash\x18\x01 \x01(\x0c\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04size\x18\x03 \x01(\x04\x12\x12\n\nmedia_type\x18\x04 \x01(\t\x12\x0b\n\x03url\x18\x05 \x01(\t\x12\x0f\n\x07sd_hash\x18\x06 \x01(\x0c\"\x87\x01\n\x03\x46\x65\x65\x12\"\n\x08\x63urrency\x18\x01 \x01(\x0e\x32\x10.pb.Fee.Currency\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x03 \x01(\x04\";\n\x08\x43urrency\x12\x14\n\x10UNKNOWN_CURRENCY\x10\x00\x12\x07\n\x03LBC\x10\x01\x12\x07\n\x03\x42TC\x10\x02\x12\x07\n\x03USD\x10\x03\"&\n\x05Image\x12\r\n\x05width\x18\x01 \x01(\r\x12\x0e\n\x06height\x18\x02 \x01(\r\"R\n\x05Video\x12\r\n\x05width\x18\x01 \x01(\r\x12\x0e\n\x06height\x18\x02 \x01(\r\x12\x10\n\x08\x64uration\x18\x03 \x01(\r\x12\x18\n\x05\x61udio\x18\x0f \x01(\x0b\x32\t.pb.Audio\"\x19\n\x05\x41udio\x12\x10\n\x08\x64uration\x18\x01 \x01(\r\"l\n\x08Software\x12\n\n\x02os\x18\x01 \x01(\t\"T\n\x02OS\x12\x0e\n\nUNKNOWN_OS\x10\x00\x12\x07\n\x03\x41NY\x10\x01\x12\t\n\x05LINUX\x10\x02\x12\x0b\n\x07WINDOWS\x10\x03\x12\x07\n\x03MAC\x10\x04\x12\x0b\n\x07\x41NDROID\x10\x05\x12\x07\n\x03IOS\x10\x06\"\xc7\x1d\n\x08Language\x12\'\n\x08language\x18\x01 \x01(\x0e\x32\x15.pb.Language.Language\x12#\n\x06script\x18\x02 \x01(\x0e\x32\x13.pb.Language.Script\x12$\n\x06region\x18\x03 \x01(\x0e\x32\x14.pb.Location.Country\"\x99\x0c\n\x08Language\x12\x14\n\x10UNKNOWN_LANGUAGE\x10\x00\x12\x06\n\x02\x65n\x10\x01\x12\x06\n\x02\x61\x61\x10\x02\x12\x06\n\x02\x61\x62\x10\x03\x12\x06\n\x02\x61\x65\x10\x04\x12\x06\n\x02\x61\x66\x10\x05\x12\x06\n\x02\x61k\x10\x06\x12\x06\n\x02\x61m\x10\x07\x12\x06\n\x02\x61n\x10\x08\x12\x06\n\x02\x61r\x10\t\x12\x06\n\x02\x61s\x10\n\x12\x06\n\x02\x61v\x10\x0b\x12\x06\n\x02\x61y\x10\x0c\x12\x06\n\x02\x61z\x10\r\x12\x06\n\x02\x62\x61\x10\x0e\x12\x06\n\x02\x62\x65\x10\x0f\x12\x06\n\x02\x62g\x10\x10\x12\x06\n\x02\x62h\x10\x11\x12\x06\n\x02\x62i\x10\x12\x12\x06\n\x02\x62m\x10\x13\x12\x06\n\x02\x62n\x10\x14\x12\x06\n\x02\x62o\x10\x15\x12\x06\n\x02\x62r\x10\x16\x12\x06\n\x02\x62s\x10\x17\x12\x06\n\x02\x63\x61\x10\x18\x12\x06\n\x02\x63\x65\x10\x19\x12\x06\n\x02\x63h\x10\x1a\x12\x06\n\x02\x63o\x10\x1b\x12\x06\n\x02\x63r\x10\x1c\x12\x06\n\x02\x63s\x10\x1d\x12\x06\n\x02\x63u\x10\x1e\x12\x06\n\x02\x63v\x10\x1f\x12\x06\n\x02\x63y\x10 \x12\x06\n\x02\x64\x61\x10!\x12\x06\n\x02\x64\x65\x10\"\x12\x06\n\x02\x64v\x10#\x12\x06\n\x02\x64z\x10$\x12\x06\n\x02\x65\x65\x10%\x12\x06\n\x02\x65l\x10&\x12\x06\n\x02\x65o\x10\'\x12\x06\n\x02\x65s\x10(\x12\x06\n\x02\x65t\x10)\x12\x06\n\x02\x65u\x10*\x12\x06\n\x02\x66\x61\x10+\x12\x06\n\x02\x66\x66\x10,\x12\x06\n\x02\x66i\x10-\x12\x06\n\x02\x66j\x10.\x12\x06\n\x02\x66o\x10/\x12\x06\n\x02\x66r\x10\x30\x12\x06\n\x02\x66y\x10\x31\x12\x06\n\x02ga\x10\x32\x12\x06\n\x02gd\x10\x33\x12\x06\n\x02gl\x10\x34\x12\x06\n\x02gn\x10\x35\x12\x06\n\x02gu\x10\x36\x12\x06\n\x02gv\x10\x37\x12\x06\n\x02ha\x10\x38\x12\x06\n\x02he\x10\x39\x12\x06\n\x02hi\x10:\x12\x06\n\x02ho\x10;\x12\x06\n\x02hr\x10<\x12\x06\n\x02ht\x10=\x12\x06\n\x02hu\x10>\x12\x06\n\x02hy\x10?\x12\x06\n\x02hz\x10@\x12\x06\n\x02ia\x10\x41\x12\x06\n\x02id\x10\x42\x12\x06\n\x02ie\x10\x43\x12\x06\n\x02ig\x10\x44\x12\x06\n\x02ii\x10\x45\x12\x06\n\x02ik\x10\x46\x12\x06\n\x02io\x10G\x12\x06\n\x02is\x10H\x12\x06\n\x02it\x10I\x12\x0Line truncated
|
||||
serialized_pb=_b('\n\x0b\x63laim.proto\x12\x02pb\"\xab\x02\n\x05\x43laim\x12\x1c\n\x06stream\x18\x01 \x01(\x0b\x32\n.pb.StreamH\x00\x12\x1e\n\x07\x63hannel\x18\x02 \x01(\x0b\x32\x0b.pb.ChannelH\x00\x12#\n\ncollection\x18\x03 \x01(\x0b\x32\r.pb.ClaimListH\x00\x12$\n\x06repost\x18\x04 \x01(\x0b\x32\x12.pb.ClaimReferenceH\x00\x12\r\n\x05title\x18\x08 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\t \x01(\t\x12\x1d\n\tthumbnail\x18\n \x01(\x0b\x32\n.pb.Source\x12\x0c\n\x04tags\x18\x0b \x03(\t\x12\x1f\n\tlanguages\x18\x0c \x03(\x0b\x32\x0c.pb.Language\x12\x1f\n\tlocations\x18\r \x03(\x0b\x32\x0c.pb.LocationB\x06\n\x04type\"\x84\x02\n\x06Stream\x12\x1a\n\x06source\x18\x01 \x01(\x0b\x32\n.pb.Source\x12\x0e\n\x06\x61uthor\x18\x02 \x01(\t\x12\x0f\n\x07license\x18\x03 \x01(\t\x12\x13\n\x0blicense_url\x18\x04 \x01(\t\x12\x14\n\x0crelease_time\x18\x05 \x01(\x03\x12\x14\n\x03\x66\x65\x65\x18\x06 \x01(\x0b\x32\x07.pb.Fee\x12\x1a\n\x05image\x18\n \x01(\x0b\x32\t.pb.ImageH\x00\x12\x1a\n\x05video\x18\x0b \x01(\x0b\x32\t.pb.VideoH\x00\x12\x1a\n\x05\x61udio\x18\x0c \x01(\x0b\x32\t.pb.AudioH\x00\x12 \n\x08software\x18\r \x01(\x0b\x32\x0c.pb.SoftwareH\x00\x42\x06\n\x04type\"}\n\x07\x43hannel\x12\x12\n\npublic_key\x18\x01 \x01(\x0c\x12\r\n\x05\x65mail\x18\x02 \x01(\t\x12\x13\n\x0bwebsite_url\x18\x03 \x01(\t\x12\x19\n\x05\x63over\x18\x04 \x01(\x0b\x32\n.pb.Source\x12\x1f\n\x08\x66\x65\x61tured\x18\x05 \x01(\x0b\x32\r.pb.ClaimList\"$\n\x0e\x43laimReference\x12\x12\n\nclaim_hash\x18\x01 \x01(\x0c\"\x90\x01\n\tClaimList\x12)\n\tlist_type\x18\x01 \x01(\x0e\x32\x16.pb.ClaimList.ListType\x12,\n\x10\x63laim_references\x18\x02 \x03(\x0b\x32\x12.pb.ClaimReference\"*\n\x08ListType\x12\x0e\n\nCOLLECTION\x10\x00\x12\x0e\n\nDERIVATION\x10\x02\"y\n\x06Source\x12\x0c\n\x04hash\x18\x01 \x01(\x0c\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04size\x18\x03 \x01(\x04\x12\x12\n\nmedia_type\x18\x04 \x01(\t\x12\x0b\n\x03url\x18\x05 \x01(\t\x12\x0f\n\x07sd_hash\x18\x06 \x01(\x0c\x12\x13\n\x0b\x62t_infohash\x18\x07 \x01(\x0c\"\x87\x01\n\x03\x46\x65\x65\x12\"\n\x08\x63urrency\x18\x01 \x01(\x0e\x32\x10.pb.Fee.Currency\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x03 \x01(\x04\";\n\x08\x43urrency\x12\x14\n\x10UNKNOWN_CURRENCY\x10\x00\x12\x07\n\x03LBC\x10\x01\x12\x07\n\x03\x42TC\x10\x02\x12\x07\n\x03USD\x10\x03\"&\n\x05Image\x12\r\n\x05width\x18\x01 \x01(\r\x12\x0e\n\x06height\x18\x02 \x01(\r\"R\n\x05Video\x12\r\n\x05width\x18\x01 \x01(\r\x12\x0e\n\x06height\x18\x02 \x01(\r\x12\x10\n\x08\x64uration\x18\x03 \x01(\r\x12\x18\n\x05\x61udio\x18\x0f \x01(\x0b\x32\t.pb.Audio\"\x19\n\x05\x41udio\x12\x10\n\x08\x64uration\x18\x01 \x01(\r\"l\n\x08Software\x12\n\n\x02os\x18\x01 \x01(\t\"T\n\x02OS\x12\x0e\n\nUNKNOWN_OS\x10\x00\x12\x07\n\x03\x41NY\x10\x01\x12\t\n\x05LINUX\x10\x02\x12\x0b\n\x07WINDOWS\x10\x03\x12\x07\n\x03MAC\x10\x04\x12\x0b\n\x07\x41NDROID\x10\x05\x12\x07\n\x03IOS\x10\x06\"\xc7\x1d\n\x08Language\x12\'\n\x08language\x18\x01 \x01(\x0e\x32\x15.pb.Language.Language\x12#\n\x06script\x18\x02 \x01(\x0e\x32\x13.pb.Language.Script\x12$\n\x06region\x18\x03 \x01(\x0e\x32\x14.pb.Location.Country\"\x99\x0c\n\x08Language\x12\x14\n\x10UNKNOWN_LANGUAGE\x10\x00\x12\x06\n\x02\x65n\x10\x01\x12\x06\n\x02\x61\x61\x10\x02\x12\x06\n\x02\x61\x62\x10\x03\x12\x06\n\x02\x61\x65\x10\x04\x12\x06\n\x02\x61\x66\x10\x05\x12\x06\n\x02\x61k\x10\x06\x12\x06\n\x02\x61m\x10\x07\x12\x06\n\x02\x61n\x10\x08\x12\x06\n\x02\x61r\x10\t\x12\x06\n\x02\x61s\x10\n\x12\x06\n\x02\x61v\x10\x0b\x12\x06\n\x02\x61y\x10\x0c\x12\x06\n\x02\x61z\x10\r\x12\x06\n\x02\x62\x61\x10\x0e\x12\x06\n\x02\x62\x65\x10\x0f\x12\x06\n\x02\x62g\x10\x10\x12\x06\n\x02\x62h\x10\x11\x12\x06\n\x02\x62i\x10\x12\x12\x06\n\x02\x62m\x10\x13\x12\x06\n\x02\x62n\x10\x14\x12\x06\n\x02\x62o\x10\x15\x12\x06\n\x02\x62r\x10\x16\x12\x06\n\x02\x62s\x10\x17\x12\x06\n\x02\x63\x61\x10\x18\x12\x06\n\x02\x63\x65\x10\x19\x12\x06\n\x02\x63h\x10\x1a\x12\x06\n\x02\x63o\x10\x1b\x12\x06\n\x02\x63r\x10\x1c\x12\x06\n\x02\x63s\x10\x1d\x12\x06\n\x02\x63u\x10\x1e\x12\x06\n\x02\x63v\x10\x1f\x12\x06\n\x02\x63y\x10 \x12\x06\n\x02\x64\x61\x10!\x12\x06\n\x02\x64\x65\x10\"\x12\x06\n\x02\x64v\x10#\x12\x06\n\x02\x64z\x10$\x12\x06\n\x02\x65\x65\x10%\x12\x06\n\x02\x65l\x10&\x12\x06\n\x02\x65o\x10\'\x12\x06\n\x02\x65s\x10(\x12\x06\n\x02\x65t\x10)\x12\x06\n\x02\x65u\x10*\x12\x06\n\x02\x66\x61\x10+\x12\x06\n\x02\x66\x66\x10,\x12\x06\n\x02\x66i\x10-\x12\x06\n\x02\x66j\x10.\x12\x06\n\x02\x66o\x10/\x12\x06\n\x02\x66r\x10\x30\x12\x06\n\x02\x66y\x10\x31\x12\x06\n\x02ga\x10\x32\x12\x06\n\x02gd\x10\x33\x12\x06\n\x02gl\x10\x34\x12\x06\n\x02gn\x10\x35\x12\x06\n\x02gu\x10\x36\x12\x06\n\x02gv\x10\x37\x12\x06\n\x02ha\x10\x38\x12\x06\n\x02he\x10\x39\x12\x06\n\x02hi\x10:\x12\x06\n\x02ho\x10;\x12\x06\n\x02hr\x10<\x12\x06\n\x02ht\x10=\x12\x06\n\x02hu\x10>\x12\x06\n\x02hy\x10?\x12\x06\n\x02hz\x10@\x12\x06\n\x02ia\x10\x41\x12\x06\n\x02id\x10\x42\x12\x06\n\x02ie\x10\x43\x12\x06\n\x02ig\x10\x44\x12\x06\n\x02ii\x10\x45\x12\x06\n\x02ik\x10\x46\x12\x06\n\x02io\x10G\x1Line truncated
|
||||
)
|
||||
|
||||
|
||||
@@ -71,8 +71,8 @@ _FEE_CURRENCY = _descriptor.EnumDescriptor(
|
||||
],
|
||||
containing_type=None,
|
||||
serialized_options=None,
|
||||
serialized_start=1075,
|
||||
serialized_end=1134,
|
||||
serialized_start=1096,
|
||||
serialized_end=1155,
|
||||
)
|
||||
_sym_db.RegisterEnumDescriptor(_FEE_CURRENCY)
|
||||
|
||||
@@ -113,8 +113,8 @@ _SOFTWARE_OS = _descriptor.EnumDescriptor(
|
||||
],
|
||||
containing_type=None,
|
||||
serialized_options=None,
|
||||
serialized_start=1311,
|
||||
serialized_end=1395,
|
||||
serialized_start=1332,
|
||||
serialized_end=1416,
|
||||
)
|
||||
_sym_db.RegisterEnumDescriptor(_SOFTWARE_OS)
|
||||
|
||||
@@ -867,8 +867,8 @@ _LANGUAGE_LANGUAGE = _descriptor.EnumDescriptor(
|
||||
],
|
||||
containing_type=None,
|
||||
serialized_options=None,
|
||||
serialized_start=1527,
|
||||
serialized_end=3088,
|
||||
serialized_start=1548,
|
||||
serialized_end=3109,
|
||||
)
|
||||
_sym_db.RegisterEnumDescriptor(_LANGUAGE_LANGUAGE)
|
||||
|
||||
@@ -1681,8 +1681,8 @@ _LANGUAGE_SCRIPT = _descriptor.EnumDescriptor(
|
||||
],
|
||||
containing_type=None,
|
||||
serialized_options=None,
|
||||
serialized_start=3091,
|
||||
serialized_end=5181,
|
||||
serialized_start=3112,
|
||||
serialized_end=5202,
|
||||
)
|
||||
_sym_db.RegisterEnumDescriptor(_LANGUAGE_SCRIPT)
|
||||
|
||||
@@ -3815,8 +3815,8 @@ _LOCATION_COUNTRY = _descriptor.EnumDescriptor(
|
||||
],
|
||||
containing_type=None,
|
||||
serialized_options=None,
|
||||
serialized_start=5316,
|
||||
serialized_end=10540,
|
||||
serialized_start=5337,
|
||||
serialized_end=10561,
|
||||
)
|
||||
_sym_db.RegisterEnumDescriptor(_LOCATION_COUNTRY)
|
||||
|
||||
@@ -4193,6 +4193,13 @@ _SOURCE = _descriptor.Descriptor(
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='bt_infohash', full_name='pb.Source.bt_infohash', index=6,
|
||||
number=7, 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,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
@@ -4206,7 +4213,7 @@ _SOURCE = _descriptor.Descriptor(
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=896,
|
||||
serialized_end=996,
|
||||
serialized_end=1017,
|
||||
)
|
||||
|
||||
|
||||
@@ -4251,8 +4258,8 @@ _FEE = _descriptor.Descriptor(
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=999,
|
||||
serialized_end=1134,
|
||||
serialized_start=1020,
|
||||
serialized_end=1155,
|
||||
)
|
||||
|
||||
|
||||
@@ -4289,8 +4296,8 @@ _IMAGE = _descriptor.Descriptor(
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=1136,
|
||||
serialized_end=1174,
|
||||
serialized_start=1157,
|
||||
serialized_end=1195,
|
||||
)
|
||||
|
||||
|
||||
@@ -4341,8 +4348,8 @@ _VIDEO = _descriptor.Descriptor(
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=1176,
|
||||
serialized_end=1258,
|
||||
serialized_start=1197,
|
||||
serialized_end=1279,
|
||||
)
|
||||
|
||||
|
||||
@@ -4372,8 +4379,8 @@ _AUDIO = _descriptor.Descriptor(
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=1260,
|
||||
serialized_end=1285,
|
||||
serialized_start=1281,
|
||||
serialized_end=1306,
|
||||
)
|
||||
|
||||
|
||||
@@ -4404,8 +4411,8 @@ _SOFTWARE = _descriptor.Descriptor(
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=1287,
|
||||
serialized_end=1395,
|
||||
serialized_start=1308,
|
||||
serialized_end=1416,
|
||||
)
|
||||
|
||||
|
||||
@@ -4451,8 +4458,8 @@ _LANGUAGE = _descriptor.Descriptor(
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=1398,
|
||||
serialized_end=5181,
|
||||
serialized_start=1419,
|
||||
serialized_end=5202,
|
||||
)
|
||||
|
||||
|
||||
@@ -4518,8 +4525,8 @@ _LOCATION = _descriptor.Descriptor(
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=5184,
|
||||
serialized_end=10540,
|
||||
serialized_start=5205,
|
||||
serialized_end=10561,
|
||||
)
|
||||
|
||||
_CLAIM.fields_by_name['stream'].message_type = _STREAM
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: purchase.proto
|
||||
|
||||
import sys
|
||||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
||||
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
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
|
||||
|
||||
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')
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
_PURCHASE = _descriptor.Descriptor(
|
||||
name='Purchase',
|
||||
full_name='pb.Purchase',
|
||||
filename=None,
|
||||
file=DESCRIPTOR,
|
||||
containing_type=None,
|
||||
fields=[
|
||||
_descriptor.FieldDescriptor(
|
||||
name='claim_hash', full_name='pb.Purchase.claim_hash', index=0,
|
||||
number=1, 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,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
nested_types=[],
|
||||
enum_types=[
|
||||
],
|
||||
serialized_options=None,
|
||||
is_extendable=False,
|
||||
syntax='proto3',
|
||||
extension_ranges=[],
|
||||
oneofs=[
|
||||
],
|
||||
serialized_start=22,
|
||||
serialized_end=52,
|
||||
)
|
||||
|
||||
DESCRIPTOR.message_types_by_name['Purchase'] = _PURCHASE
|
||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||
|
||||
Purchase = _reflection.GeneratedProtocolMessageType('Purchase', (_message.Message,), dict(
|
||||
DESCRIPTOR = _PURCHASE,
|
||||
__module__ = 'purchase_pb2'
|
||||
# @@protoc_insertion_point(class_scope:pb.Purchase)
|
||||
))
|
||||
_sym_db.RegisterMessage(Purchase)
|
||||
|
||||
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
@@ -4,6 +4,7 @@ import binascii
|
||||
import logging
|
||||
import typing
|
||||
import asyncio
|
||||
import re
|
||||
from collections import OrderedDict
|
||||
from cryptography.hazmat.primitives.ciphers.algorithms import AES
|
||||
from lbry.blob import MAX_BLOB_SIZE
|
||||
@@ -14,6 +15,17 @@ from lbry.error import InvalidStreamDescriptorError
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
RE_ILLEGAL_FILENAME_CHARS = re.compile(
|
||||
'('
|
||||
'[<>:"/\\\|\?\*]+|' # Illegal characters
|
||||
'[\\x00-\\x1F]+|' # All characters in range 0-31
|
||||
'[ \t]*(\.)+[ \t]*$|' # Dots at the end
|
||||
'(^[ \t]+|[ \t]+$)|' # Leading and trailing whitespace
|
||||
'^CON$|^PRN$|^AUX$|' # Illegal names
|
||||
'^NUL$|^COM[1-9]$|^LPT[1-9]$' # ...
|
||||
')'
|
||||
)
|
||||
|
||||
|
||||
def format_sd_info(stream_name: str, key: str, suggested_file_name: str, stream_hash: str,
|
||||
blobs: typing.List[typing.Dict]) -> typing.Dict:
|
||||
@@ -46,6 +58,20 @@ def file_reader(file_path: str):
|
||||
offset += bytes_to_read
|
||||
|
||||
|
||||
def sanitize_file_name(dirty_name: str, default_file_name: str = 'lbry_download'):
|
||||
file_name, ext = os.path.splitext(dirty_name)
|
||||
file_name = re.sub(RE_ILLEGAL_FILENAME_CHARS, '', file_name)
|
||||
ext = re.sub(RE_ILLEGAL_FILENAME_CHARS, '', ext)
|
||||
|
||||
if not file_name:
|
||||
log.warning('Unable to sanitize file name for %s, returning default value %s', dirty_name, default_file_name)
|
||||
file_name = default_file_name
|
||||
if len(ext) > 1:
|
||||
file_name += ext
|
||||
|
||||
return file_name
|
||||
|
||||
|
||||
class StreamDescriptor:
|
||||
__slots__ = [
|
||||
'loop',
|
||||
@@ -227,16 +253,17 @@ class StreamDescriptor:
|
||||
blobs.append(blob_info)
|
||||
blobs.append(
|
||||
BlobInfo(len(blobs), 0, binascii.hexlify(next(iv_generator)).decode())) # add the stream terminator
|
||||
file_name = os.path.basename(file_path)
|
||||
suggested_file_name = sanitize_file_name(file_name)
|
||||
descriptor = cls(
|
||||
loop, blob_dir, os.path.basename(file_path), binascii.hexlify(key).decode(), os.path.basename(file_path),
|
||||
blobs
|
||||
loop, blob_dir, file_name, binascii.hexlify(key).decode(), suggested_file_name, blobs
|
||||
)
|
||||
sd_blob = await descriptor.make_sd_blob(old_sort=old_sort, blob_completed_callback=blob_completed_callback)
|
||||
descriptor.sd_hash = sd_blob.blob_hash
|
||||
return descriptor
|
||||
|
||||
def lower_bound_decrypted_length(self) -> int:
|
||||
length = sum((blob.length - 1 for blob in self.blobs[:-2]))
|
||||
length = sum(blob.length - 1 for blob in self.blobs[:-2])
|
||||
return length + self.blobs[-2].length - (AES.block_size // 8)
|
||||
|
||||
def upper_bound_decrypted_length(self) -> int:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import os
|
||||
import asyncio
|
||||
import time
|
||||
import typing
|
||||
import logging
|
||||
import binascii
|
||||
@@ -8,7 +9,7 @@ from lbry.utils import generate_id
|
||||
from lbry.error import DownloadSDTimeout
|
||||
from lbry.schema.mime_types import guess_media_type
|
||||
from lbry.stream.downloader import StreamDownloader
|
||||
from lbry.stream.descriptor import StreamDescriptor
|
||||
from lbry.stream.descriptor import StreamDescriptor, sanitize_file_name
|
||||
from lbry.stream.reflector.client import StreamReflectorClient
|
||||
from lbry.extras.daemon.storage import StoredStreamClaim
|
||||
from lbry.blob import MAX_BLOB_SIZE
|
||||
@@ -54,11 +55,13 @@ class ManagedStream:
|
||||
'sd_hash',
|
||||
'download_directory',
|
||||
'_file_name',
|
||||
'_added_on',
|
||||
'_status',
|
||||
'stream_claim_info',
|
||||
'download_id',
|
||||
'rowid',
|
||||
'content_fee',
|
||||
'purchase_receipt',
|
||||
'downloader',
|
||||
'analytics_manager',
|
||||
'fully_reflected',
|
||||
@@ -79,7 +82,8 @@ class ManagedStream:
|
||||
download_id: typing.Optional[str] = None, rowid: typing.Optional[int] = None,
|
||||
descriptor: typing.Optional[StreamDescriptor] = None,
|
||||
content_fee: typing.Optional['Transaction'] = None,
|
||||
analytics_manager: typing.Optional['AnalyticsManager'] = None):
|
||||
analytics_manager: typing.Optional['AnalyticsManager'] = None,
|
||||
added_on: typing.Optional[int] = None):
|
||||
self.loop = loop
|
||||
self.config = config
|
||||
self.blob_manager = blob_manager
|
||||
@@ -91,6 +95,8 @@ class ManagedStream:
|
||||
self.download_id = download_id or binascii.hexlify(generate_id()).decode()
|
||||
self.rowid = rowid
|
||||
self.content_fee = content_fee
|
||||
self.purchase_receipt = None
|
||||
self._added_on = added_on
|
||||
self.downloader = StreamDownloader(self.loop, self.config, self.blob_manager, sd_hash, descriptor)
|
||||
self.analytics_manager = analytics_manager
|
||||
|
||||
@@ -117,6 +123,10 @@ class ManagedStream:
|
||||
def file_name(self) -> typing.Optional[str]:
|
||||
return self._file_name or (self.descriptor.suggested_file_name if self.descriptor else None)
|
||||
|
||||
@property
|
||||
def added_on(self) -> typing.Optional[int]:
|
||||
return self._added_on
|
||||
|
||||
@property
|
||||
def status(self) -> str:
|
||||
return self._status
|
||||
@@ -253,8 +263,9 @@ class ManagedStream:
|
||||
file_name, download_dir = self._file_name, self.download_directory
|
||||
else:
|
||||
file_name, download_dir = None, None
|
||||
self._added_on = int(time.time())
|
||||
self.rowid = await self.blob_manager.storage.save_downloaded_file(
|
||||
self.stream_hash, file_name, download_dir, 0.0
|
||||
self.stream_hash, file_name, download_dir, 0.0, added_on=self._added_on
|
||||
)
|
||||
if self.status != self.STATUS_RUNNING:
|
||||
await self.update_status(self.STATUS_RUNNING)
|
||||
@@ -386,7 +397,7 @@ class ManagedStream:
|
||||
os.mkdir(self.download_directory)
|
||||
self._file_name = await get_next_available_file_name(
|
||||
self.loop, self.download_directory,
|
||||
file_name or self.descriptor.suggested_file_name
|
||||
file_name or self._file_name or sanitize_file_name(self.descriptor.suggested_file_name)
|
||||
)
|
||||
await self.blob_manager.storage.change_file_download_dir_and_file_name(
|
||||
self.stream_hash, self.download_directory, self.file_name
|
||||
@@ -423,6 +434,8 @@ class ManagedStream:
|
||||
we_have = [
|
||||
blob_hash for blob_hash in needed if blob_hash in self.blob_manager.completed_blob_hashes
|
||||
]
|
||||
log.info("we have %i/%i needed blobs needed by reflector for lbry://%s#%s", len(we_have), len(needed),
|
||||
self.claim_name, self.claim_id)
|
||||
for blob_hash in we_have:
|
||||
await protocol.send_blob(blob_hash)
|
||||
sent.append(blob_hash)
|
||||
|
||||
@@ -71,7 +71,7 @@ class StreamReflectorClient(asyncio.Protocol):
|
||||
raise ValueError("Need protocol version number!")
|
||||
server_version = int(response_dict['version'])
|
||||
if server_version != REFLECTOR_V2:
|
||||
raise ValueError("I can't handle protocol version {}!".format(server_version))
|
||||
raise ValueError(f"I can't handle protocol version {server_version}!")
|
||||
return
|
||||
|
||||
async def send_descriptor(self) -> typing.Tuple[bool, typing.List[str]]: # returns a list of needed blob hashes
|
||||
@@ -98,8 +98,6 @@ class StreamReflectorClient(asyncio.Protocol):
|
||||
self.reflected_blobs.append(sd_blob.blob_hash)
|
||||
else:
|
||||
log.warning("Reflector failed to receive descriptor %s", sd_blob.blob_hash[:8])
|
||||
if needed:
|
||||
log.info("Reflector needs %i blobs for %s", len(needed), sd_blob.blob_hash[:8])
|
||||
return sent_sd, needed
|
||||
|
||||
async def send_blob(self, blob_hash: str):
|
||||
|
||||
@@ -37,7 +37,7 @@ class ReflectorServerProtocol(asyncio.Protocol):
|
||||
if self.incoming.is_set():
|
||||
try:
|
||||
self.writer.write(data)
|
||||
except IOError as err:
|
||||
except OSError as err:
|
||||
log.error("error receiving blob: %s", err)
|
||||
self.transport.close()
|
||||
return
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import os
|
||||
import asyncio
|
||||
import typing
|
||||
import binascii
|
||||
import logging
|
||||
import random
|
||||
from decimal import Decimal
|
||||
import typing
|
||||
from typing import Optional
|
||||
from aiohttp.web import Request
|
||||
from lbry.error import ResolveError, InvalidStreamDescriptorError, KeyFeeAboveMaxAllowed, InsufficientFundsError
|
||||
from lbry.error import ResolveError, InvalidStreamDescriptorError
|
||||
from lbry.error import ResolveTimeout, DownloadDataTimeout
|
||||
from lbry.utils import cache_concurrent
|
||||
from lbry.stream.descriptor import StreamDescriptor
|
||||
from lbry.stream.managed_stream import ManagedStream
|
||||
from lbry.schema.claim import Claim
|
||||
from lbry.schema.url import URL
|
||||
from lbry.extras.daemon.storage import lbc_to_dewies, dewies_to_lbc
|
||||
from lbry.wallet.dewies import dewies_to_lbc
|
||||
from lbry.wallet.transaction import Output
|
||||
if typing.TYPE_CHECKING:
|
||||
from lbry.conf import Config
|
||||
@@ -24,6 +24,7 @@ if typing.TYPE_CHECKING:
|
||||
from lbry.wallet import LbryWalletManager
|
||||
from lbry.wallet.transaction import Transaction
|
||||
from lbry.extras.daemon.exchange_rate_manager import ExchangeRateManager
|
||||
from torba.client.wallet import Wallet
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -31,6 +32,7 @@ filter_fields = [
|
||||
'rowid',
|
||||
'status',
|
||||
'file_name',
|
||||
'added_on',
|
||||
'sd_hash',
|
||||
'stream_hash',
|
||||
'claim_name',
|
||||
@@ -56,7 +58,7 @@ comparison_operators = {
|
||||
}
|
||||
|
||||
|
||||
def path_or_none(p) -> typing.Optional[str]:
|
||||
def path_or_none(p) -> Optional[str]:
|
||||
if not p:
|
||||
return
|
||||
return binascii.unhexlify(p).decode()
|
||||
@@ -64,18 +66,18 @@ def path_or_none(p) -> typing.Optional[str]:
|
||||
|
||||
class StreamManager:
|
||||
def __init__(self, loop: asyncio.AbstractEventLoop, config: 'Config', blob_manager: 'BlobManager',
|
||||
wallet: 'LbryWalletManager', storage: 'SQLiteStorage', node: typing.Optional['Node'],
|
||||
analytics_manager: typing.Optional['AnalyticsManager'] = None):
|
||||
wallet_manager: 'LbryWalletManager', storage: 'SQLiteStorage', node: Optional['Node'],
|
||||
analytics_manager: Optional['AnalyticsManager'] = None):
|
||||
self.loop = loop
|
||||
self.config = config
|
||||
self.blob_manager = blob_manager
|
||||
self.wallet = wallet
|
||||
self.wallet_manager = wallet_manager
|
||||
self.storage = storage
|
||||
self.node = node
|
||||
self.analytics_manager = analytics_manager
|
||||
self.streams: typing.Dict[str, ManagedStream] = {}
|
||||
self.resume_saving_task: typing.Optional[asyncio.Task] = None
|
||||
self.re_reflect_task: typing.Optional[asyncio.Task] = None
|
||||
self.resume_saving_task: Optional[asyncio.Task] = None
|
||||
self.re_reflect_task: Optional[asyncio.Task] = None
|
||||
self.update_stream_finished_futs: typing.List[asyncio.Future] = []
|
||||
self.running_reflector_uploads: typing.List[asyncio.Task] = []
|
||||
self.started = asyncio.Event(loop=self.loop)
|
||||
@@ -89,7 +91,7 @@ class StreamManager:
|
||||
|
||||
async def recover_stream(sd_hash: str, stream_hash: str, stream_name: str,
|
||||
suggested_file_name: str, key: str,
|
||||
content_fee: typing.Optional['Transaction']) -> typing.Optional[StreamDescriptor]:
|
||||
content_fee: Optional['Transaction']) -> Optional[StreamDescriptor]:
|
||||
sd_blob = self.blob_manager.get_blob(sd_hash)
|
||||
blobs = await self.storage.get_blobs_for_stream(stream_hash)
|
||||
descriptor = await StreamDescriptor.recover(
|
||||
@@ -113,9 +115,10 @@ class StreamManager:
|
||||
# if self.blob_manager._save_blobs:
|
||||
# log.info("Recovered %i/%i attempted streams", len(to_restore), len(file_infos))
|
||||
|
||||
async def add_stream(self, rowid: int, sd_hash: str, file_name: typing.Optional[str],
|
||||
download_directory: typing.Optional[str], status: str,
|
||||
claim: typing.Optional['StoredStreamClaim'], content_fee: typing.Optional['Transaction']):
|
||||
async def add_stream(self, rowid: int, sd_hash: str, file_name: Optional[str],
|
||||
download_directory: Optional[str], status: str,
|
||||
claim: Optional['StoredStreamClaim'], content_fee: Optional['Transaction'],
|
||||
added_on: Optional[int]):
|
||||
try:
|
||||
descriptor = await self.blob_manager.get_stream_descriptor(sd_hash)
|
||||
except InvalidStreamDescriptorError as err:
|
||||
@@ -124,7 +127,7 @@ class StreamManager:
|
||||
stream = ManagedStream(
|
||||
self.loop, self.config, self.blob_manager, descriptor.sd_hash, download_directory, file_name, status,
|
||||
claim, content_fee=content_fee, rowid=rowid, descriptor=descriptor,
|
||||
analytics_manager=self.analytics_manager
|
||||
analytics_manager=self.analytics_manager, added_on=added_on
|
||||
)
|
||||
self.streams[sd_hash] = stream
|
||||
self.storage.content_claim_callbacks[stream.stream_hash] = lambda: self._update_content_claim(stream)
|
||||
@@ -156,13 +159,14 @@ class StreamManager:
|
||||
add_stream_tasks.append(self.loop.create_task(self.add_stream(
|
||||
file_info['rowid'], file_info['sd_hash'], file_name,
|
||||
download_directory, file_info['status'],
|
||||
file_info['claim'], file_info['content_fee']
|
||||
file_info['claim'], file_info['content_fee'],
|
||||
file_info['added_on']
|
||||
)))
|
||||
if add_stream_tasks:
|
||||
await asyncio.gather(*add_stream_tasks, loop=self.loop)
|
||||
log.info("Started stream manager with %i files", len(self.streams))
|
||||
if not self.node:
|
||||
log.warning("no DHT node given, resuming downloads trusting that we can contact reflector")
|
||||
log.info("no DHT node given, resuming downloads trusting that we can contact reflector")
|
||||
if to_resume_saving:
|
||||
self.resume_saving_task = self.loop.create_task(self.resume(to_resume_saving))
|
||||
|
||||
@@ -213,8 +217,8 @@ class StreamManager:
|
||||
self.started.clear()
|
||||
log.info("finished stopping the stream manager")
|
||||
|
||||
async def create_stream(self, file_path: str, key: typing.Optional[bytes] = None,
|
||||
iv_generator: typing.Optional[typing.Generator[bytes, None, None]] = None) -> ManagedStream:
|
||||
async def create_stream(self, file_path: str, key: Optional[bytes] = None,
|
||||
iv_generator: Optional[typing.Generator[bytes, None, None]] = None) -> ManagedStream:
|
||||
stream = await ManagedStream.create(self.loop, self.config, self.blob_manager, file_path, key, iv_generator)
|
||||
self.streams[stream.sd_hash] = stream
|
||||
self.storage.content_claim_callbacks[stream.stream_hash] = lambda: self._update_content_claim(stream)
|
||||
@@ -228,7 +232,7 @@ class StreamManager:
|
||||
)
|
||||
return stream
|
||||
|
||||
async def delete_stream(self, stream: ManagedStream, delete_file: typing.Optional[bool] = False):
|
||||
async def delete_stream(self, stream: ManagedStream, delete_file: Optional[bool] = False):
|
||||
stream.stop_tasks()
|
||||
if stream.sd_hash in self.streams:
|
||||
del self.streams[stream.sd_hash]
|
||||
@@ -238,13 +242,13 @@ class StreamManager:
|
||||
if delete_file and stream.output_file_exists:
|
||||
os.remove(stream.full_path)
|
||||
|
||||
def get_stream_by_stream_hash(self, stream_hash: str) -> typing.Optional[ManagedStream]:
|
||||
def get_stream_by_stream_hash(self, stream_hash: str) -> Optional[ManagedStream]:
|
||||
streams = tuple(filter(lambda stream: stream.stream_hash == stream_hash, self.streams.values()))
|
||||
if streams:
|
||||
return streams[0]
|
||||
|
||||
def get_filtered_streams(self, sort_by: typing.Optional[str] = None, reverse: typing.Optional[bool] = False,
|
||||
comparison: typing.Optional[str] = None,
|
||||
def get_filtered_streams(self, sort_by: Optional[str] = None, reverse: Optional[bool] = False,
|
||||
comparison: Optional[str] = None,
|
||||
**search_by) -> typing.List[ManagedStream]:
|
||||
"""
|
||||
Get a list of filtered and sorted ManagedStream objects
|
||||
@@ -280,7 +284,7 @@ class StreamManager:
|
||||
return streams
|
||||
|
||||
async def _check_update_or_replace(self, outpoint: str, claim_id: str, claim: Claim) -> typing.Tuple[
|
||||
typing.Optional[ManagedStream], typing.Optional[ManagedStream]]:
|
||||
Optional[ManagedStream], Optional[ManagedStream]]:
|
||||
existing = self.get_filtered_streams(outpoint=outpoint)
|
||||
if existing:
|
||||
return existing[0], None
|
||||
@@ -301,12 +305,13 @@ class StreamManager:
|
||||
return None, existing_for_claim_id[0]
|
||||
return None, None
|
||||
|
||||
def _convert_to_old_resolve_output(self, resolves):
|
||||
@staticmethod
|
||||
def _convert_to_old_resolve_output(wallet_manager, resolves):
|
||||
result = {}
|
||||
for url, txo in resolves.items():
|
||||
if isinstance(txo, Output):
|
||||
tx_height = txo.tx_ref.height
|
||||
best_height = self.wallet.ledger.headers.height
|
||||
best_height = wallet_manager.ledger.headers.height
|
||||
result[url] = {
|
||||
'name': txo.claim_name,
|
||||
'value': txo.claim,
|
||||
@@ -319,9 +324,9 @@ class StreamManager:
|
||||
'height': tx_height,
|
||||
'confirmations': (best_height+1) - tx_height if tx_height > 0 else tx_height,
|
||||
'claim_sequence': -1,
|
||||
'address': txo.get_address(self.wallet.ledger),
|
||||
'address': txo.get_address(wallet_manager.ledger),
|
||||
'valid_at_height': txo.meta.get('activation_height', None),
|
||||
'timestamp': self.wallet.ledger.headers[tx_height]['timestamp'],
|
||||
'timestamp': wallet_manager.ledger.headers[tx_height]['timestamp'],
|
||||
'supports': []
|
||||
}
|
||||
else:
|
||||
@@ -330,15 +335,19 @@ class StreamManager:
|
||||
|
||||
@cache_concurrent
|
||||
async def download_stream_from_uri(self, uri, exchange_rate_manager: 'ExchangeRateManager',
|
||||
timeout: typing.Optional[float] = None,
|
||||
file_name: typing.Optional[str] = None,
|
||||
download_directory: typing.Optional[str] = None,
|
||||
save_file: typing.Optional[bool] = None,
|
||||
resolve_timeout: float = 3.0) -> ManagedStream:
|
||||
timeout: Optional[float] = None,
|
||||
file_name: Optional[str] = None,
|
||||
download_directory: Optional[str] = None,
|
||||
save_file: Optional[bool] = None,
|
||||
resolve_timeout: float = 3.0,
|
||||
wallet: Optional['Wallet'] = None) -> ManagedStream:
|
||||
manager = self.wallet_manager
|
||||
wallet = wallet or manager.default_wallet
|
||||
timeout = timeout or self.config.download_timeout
|
||||
start_time = self.loop.time()
|
||||
resolved_time = None
|
||||
stream = None
|
||||
txo: Optional[Output] = None
|
||||
error = None
|
||||
outpoint = None
|
||||
if save_file is None:
|
||||
@@ -350,19 +359,23 @@ class StreamManager:
|
||||
else:
|
||||
download_directory = None
|
||||
|
||||
payment = None
|
||||
try:
|
||||
# resolve the claim
|
||||
if not URL.parse(uri).has_stream:
|
||||
raise ResolveError("cannot download a channel claim, specify a /path")
|
||||
try:
|
||||
resolved_result = self._convert_to_old_resolve_output(
|
||||
await asyncio.wait_for(self.wallet.ledger.resolve([uri]), resolve_timeout)
|
||||
response = await asyncio.wait_for(
|
||||
manager.ledger.resolve(wallet.accounts, [uri]),
|
||||
resolve_timeout
|
||||
)
|
||||
resolved_result = self._convert_to_old_resolve_output(manager, response)
|
||||
except asyncio.TimeoutError:
|
||||
raise ResolveTimeout(uri)
|
||||
except Exception as err:
|
||||
if isinstance(err, asyncio.CancelledError):
|
||||
raise
|
||||
log.exception("Unexpected error resolving stream:")
|
||||
raise ResolveError(f"Unexpected error resolving stream: {str(err)}")
|
||||
await self.storage.save_claims_for_resolve([
|
||||
value for value in resolved_result.values() if 'error' not in value
|
||||
@@ -373,12 +386,13 @@ class StreamManager:
|
||||
raise ResolveError(f"Failed to resolve stream at '{uri}'")
|
||||
if 'error' in resolved:
|
||||
raise ResolveError(f"error resolving stream: {resolved['error']}")
|
||||
txo = response[uri]
|
||||
|
||||
claim = Claim.from_bytes(binascii.unhexlify(resolved['protobuf']))
|
||||
outpoint = f"{resolved['txid']}:{resolved['nout']}"
|
||||
resolved_time = self.loop.time() - start_time
|
||||
|
||||
# resume or update an existing stream, if the stream changed download it and delete the old one after
|
||||
# resume or update an existing stream, if the stream changed: download it and delete the old one after
|
||||
updated_stream, to_replace = await self._check_update_or_replace(outpoint, resolved['claim_id'], claim)
|
||||
if updated_stream:
|
||||
log.info("already have stream for %s", uri)
|
||||
@@ -391,31 +405,14 @@ class StreamManager:
|
||||
)
|
||||
return updated_stream
|
||||
|
||||
content_fee = None
|
||||
fee_amount, fee_address = None, None
|
||||
|
||||
# check that the fee is payable
|
||||
if not to_replace and claim.stream.has_fee and claim.stream.fee.amount:
|
||||
fee_amount = round(exchange_rate_manager.convert_currency(
|
||||
claim.stream.fee.currency, "LBC", claim.stream.fee.amount
|
||||
), 5)
|
||||
max_fee_amount = round(exchange_rate_manager.convert_currency(
|
||||
self.config.max_key_fee['currency'], "LBC", Decimal(self.config.max_key_fee['amount'])
|
||||
), 5) if self.config.max_key_fee else None
|
||||
if max_fee_amount and fee_amount > max_fee_amount:
|
||||
msg = f"fee of {fee_amount} exceeds max configured to allow of {max_fee_amount}"
|
||||
log.warning(msg)
|
||||
raise KeyFeeAboveMaxAllowed(msg)
|
||||
balance = await self.wallet.default_account.get_balance()
|
||||
if lbc_to_dewies(str(fee_amount)) > balance:
|
||||
msg = f"fee of {fee_amount} exceeds max available balance"
|
||||
log.warning(msg)
|
||||
raise InsufficientFundsError(msg)
|
||||
fee_address = claim.stream.fee.address or resolved['address']
|
||||
if not to_replace and txo.has_price and not txo.purchase_receipt:
|
||||
payment = await manager.create_purchase_transaction(
|
||||
wallet.accounts, txo, exchange_rate_manager
|
||||
)
|
||||
|
||||
stream = ManagedStream(
|
||||
self.loop, self.config, self.blob_manager, claim.stream.source.sd_hash, download_directory,
|
||||
file_name, ManagedStream.STATUS_RUNNING, content_fee=content_fee,
|
||||
file_name, ManagedStream.STATUS_RUNNING, content_fee=payment,
|
||||
analytics_manager=self.analytics_manager
|
||||
)
|
||||
log.info("starting download for %s", uri)
|
||||
@@ -425,11 +422,11 @@ class StreamManager:
|
||||
stream.set_claim(resolved, claim)
|
||||
if to_replace: # delete old stream now that the replacement has started downloading
|
||||
await self.delete_stream(to_replace)
|
||||
elif fee_address:
|
||||
stream.content_fee = await self.wallet.send_amount_to_address(
|
||||
lbc_to_dewies(str(fee_amount)), fee_address.encode('latin1')
|
||||
)
|
||||
log.info("paid fee of %s for %s", fee_amount, uri)
|
||||
|
||||
if payment is not None:
|
||||
await manager.broadcast_or_release(payment)
|
||||
payment = None # to avoid releasing in `finally` later
|
||||
log.info("paid fee of %s for %s", dewies_to_lbc(stream.content_fee.outputs[0].amount), uri)
|
||||
await self.storage.save_content_fee(stream.stream_hash, stream.content_fee)
|
||||
|
||||
self.streams[stream.sd_hash] = stream
|
||||
@@ -443,12 +440,16 @@ class StreamManager:
|
||||
error = DownloadDataTimeout(stream.sd_hash)
|
||||
raise error
|
||||
except Exception as err: # forgive data timeout, don't delete stream
|
||||
log.exception("Unexpected error downloading stream:")
|
||||
error = err
|
||||
raise
|
||||
finally:
|
||||
if payment is not None:
|
||||
# payment is set to None after broadcasting, if we're here an exception probably happened
|
||||
await manager.ledger.release_tx(payment)
|
||||
if self.analytics_manager and (error or (stream and (stream.downloader.time_to_descriptor or
|
||||
stream.downloader.time_to_first_bytes))):
|
||||
server = self.wallet.ledger.network.client.server
|
||||
server = self.wallet_manager.ledger.network.client.server
|
||||
self.loop.create_task(
|
||||
self.analytics_manager.send_time_to_first_bytes(
|
||||
resolved_time, self.loop.time() - start_time, None if not stream else stream.download_id,
|
||||
|
||||
+67
-87
@@ -1,3 +1,4 @@
|
||||
import os
|
||||
import json
|
||||
import shutil
|
||||
import tempfile
|
||||
@@ -12,19 +13,26 @@ from lbry.conf import Config
|
||||
from lbry.extras.daemon.Daemon import Daemon, jsonrpc_dumps_pretty
|
||||
from lbry.wallet import LbryWalletManager
|
||||
from lbry.wallet.account import Account
|
||||
from lbry.wallet.transaction import Transaction
|
||||
from lbry.extras.daemon.Components import Component, WalletComponent
|
||||
from lbry.extras.daemon.Components import (
|
||||
DHT_COMPONENT, HASH_ANNOUNCER_COMPONENT, PEER_PROTOCOL_SERVER_COMPONENT,
|
||||
UPNP_COMPONENT, EXCHANGE_RATE_MANAGER_COMPONENT
|
||||
)
|
||||
from lbry.extras.daemon.ComponentManager import ComponentManager
|
||||
from lbry.extras.daemon.exchange_rate_manager import ExchangeRateManager as BaseExchangeRateManager
|
||||
from lbry.extras.daemon.storage import SQLiteStorage
|
||||
from lbry.blob.blob_manager import BlobManager
|
||||
from lbry.stream.reflector.server import ReflectorServer
|
||||
from lbry.blob_exchange.server import BlobServer
|
||||
|
||||
|
||||
class ExchangeRateManager:
|
||||
class FakeExchangeRateManager(BaseExchangeRateManager):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
for i, feed in enumerate(self.market_feeds):
|
||||
feed._save_price(i+1)
|
||||
|
||||
def start(self):
|
||||
pass
|
||||
@@ -32,22 +40,16 @@ class ExchangeRateManager:
|
||||
def stop(self):
|
||||
pass
|
||||
|
||||
def convert_currency(self, from_currency, to_currency, amount):
|
||||
return amount
|
||||
|
||||
def fee_dict(self):
|
||||
return {}
|
||||
|
||||
|
||||
class ExchangeRateManagerComponent(Component):
|
||||
component_name = EXCHANGE_RATE_MANAGER_COMPONENT
|
||||
|
||||
def __init__(self, component_manager):
|
||||
super().__init__(component_manager)
|
||||
self.exchange_rate_manager = ExchangeRateManager()
|
||||
self.exchange_rate_manager = FakeExchangeRateManager()
|
||||
|
||||
@property
|
||||
def component(self) -> ExchangeRateManager:
|
||||
def component(self) -> BaseExchangeRateManager:
|
||||
return self.exchange_rate_manager
|
||||
|
||||
async def start(self):
|
||||
@@ -106,7 +108,7 @@ class CommandTestCase(IntegrationTestCase):
|
||||
await wallet_node.stop(cleanup=True)
|
||||
for daemon in self.daemons:
|
||||
daemon.component_manager.get_component('wallet')._running = False
|
||||
await daemon.stop(shutdown_runner=False)
|
||||
await daemon.stop()
|
||||
|
||||
async def add_daemon(self, wallet_node=None, seed=None):
|
||||
if wallet_node is None:
|
||||
@@ -119,10 +121,14 @@ class CommandTestCase(IntegrationTestCase):
|
||||
await wallet_node.start(self.conductor.spv_node, seed=seed)
|
||||
self.extra_wallet_nodes.append(wallet_node)
|
||||
|
||||
upload_dir = os.path.join(wallet_node.data_path, 'uploads')
|
||||
os.mkdir(upload_dir)
|
||||
|
||||
conf = Config()
|
||||
conf.data_dir = wallet_node.data_path
|
||||
conf.wallet_dir = wallet_node.data_path
|
||||
conf.download_dir = wallet_node.data_path
|
||||
conf.upload_dir = upload_dir # not a real conf setting
|
||||
conf.share_usage_data = False
|
||||
conf.use_upnp = False
|
||||
conf.reflect_streams = True
|
||||
@@ -135,6 +141,7 @@ class CommandTestCase(IntegrationTestCase):
|
||||
DHT_COMPONENT, UPNP_COMPONENT, HASH_ANNOUNCER_COMPONENT,
|
||||
PEER_PROTOCOL_SERVER_COMPONENT
|
||||
]
|
||||
wallet_node.manager.config = conf
|
||||
|
||||
def wallet_maker(component_manager):
|
||||
wallet_component = WalletComponent(component_manager)
|
||||
@@ -197,107 +204,74 @@ class CommandTestCase(IntegrationTestCase):
|
||||
""" Synchronous version of `out` method. """
|
||||
return json.loads(jsonrpc_dumps_pretty(value, ledger=self.ledger))['result']
|
||||
|
||||
async def stream_create(self, name='hovercraft', bid='1.0', data=b'hi!', confirm=True, **kwargs):
|
||||
file = tempfile.NamedTemporaryFile()
|
||||
|
||||
def cleanup():
|
||||
try:
|
||||
file.close()
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
self.addCleanup(cleanup)
|
||||
file.write(data)
|
||||
file.flush()
|
||||
claim = await self.out(
|
||||
self.daemon.jsonrpc_stream_create(name, bid, file_path=file.name, **kwargs)
|
||||
)
|
||||
self.assertEqual(claim['outputs'][0]['name'], name)
|
||||
async def confirm_and_render(self, awaitable, confirm) -> Transaction:
|
||||
tx = await awaitable
|
||||
if confirm:
|
||||
await self.on_transaction_dict(claim)
|
||||
await self.ledger.wait(tx)
|
||||
await self.generate(1)
|
||||
await self.on_transaction_dict(claim)
|
||||
return claim
|
||||
await self.ledger.wait(tx)
|
||||
return self.sout(tx)
|
||||
|
||||
async def stream_update(self, claim_id, data=None, confirm=True, **kwargs):
|
||||
if data:
|
||||
file = tempfile.NamedTemporaryFile()
|
||||
def create_upload_file(self, data, prefix=None, suffix=None):
|
||||
file_path = tempfile.mktemp(prefix=prefix or "tmp", suffix=suffix or "", dir=self.daemon.conf.upload_dir)
|
||||
with open(file_path, 'w+b') as file:
|
||||
file.write(data)
|
||||
file.flush()
|
||||
return file.name
|
||||
|
||||
def cleanup():
|
||||
try:
|
||||
file.close()
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
async def stream_create(
|
||||
self, name='hovercraft', bid='1.0', file_path=None,
|
||||
data=b'hi!', confirm=True, prefix=None, suffix=None, **kwargs):
|
||||
if file_path is None:
|
||||
file_path = self.create_upload_file(data=data, prefix=prefix, suffix=suffix)
|
||||
return await self.confirm_and_render(
|
||||
self.daemon.jsonrpc_stream_create(name, bid, file_path=file_path, **kwargs), confirm
|
||||
)
|
||||
|
||||
self.addCleanup(cleanup)
|
||||
claim = await self.out(
|
||||
self.daemon.jsonrpc_stream_update(claim_id, file_path=file.name, **kwargs)
|
||||
async def stream_update(
|
||||
self, claim_id, data=None, prefix=None, suffix=None, confirm=True, **kwargs):
|
||||
if data is not None:
|
||||
file_path = self.create_upload_file(data=data, prefix=prefix, suffix=suffix)
|
||||
return await self.confirm_and_render(
|
||||
self.daemon.jsonrpc_stream_update(claim_id, file_path=file_path, **kwargs), confirm
|
||||
)
|
||||
else:
|
||||
claim = await self.out(self.daemon.jsonrpc_stream_update(claim_id, **kwargs))
|
||||
self.assertIsNotNone(claim['outputs'][0]['name'])
|
||||
if confirm:
|
||||
await self.on_transaction_dict(claim)
|
||||
await self.generate(1)
|
||||
await self.on_transaction_dict(claim)
|
||||
return claim
|
||||
return await self.confirm_and_render(
|
||||
self.daemon.jsonrpc_stream_update(claim_id, **kwargs), confirm
|
||||
)
|
||||
|
||||
async def stream_abandon(self, *args, confirm=True, **kwargs):
|
||||
if 'blocking' not in kwargs:
|
||||
kwargs['blocking'] = False
|
||||
tx = await self.out(self.daemon.jsonrpc_stream_abandon(*args, **kwargs))
|
||||
if confirm:
|
||||
await self.on_transaction_dict(tx)
|
||||
await self.generate(1)
|
||||
await self.on_transaction_dict(tx)
|
||||
return tx
|
||||
return await self.confirm_and_render(
|
||||
self.daemon.jsonrpc_stream_abandon(*args, **kwargs), confirm
|
||||
)
|
||||
|
||||
async def publish(self, name, *args, confirm=True, **kwargs):
|
||||
claim = await self.out(self.daemon.jsonrpc_publish(name, *args, **kwargs))
|
||||
self.assertEqual(claim['outputs'][0]['name'], name)
|
||||
if confirm:
|
||||
await self.on_transaction_dict(claim)
|
||||
await self.generate(1)
|
||||
await self.on_transaction_dict(claim)
|
||||
return claim
|
||||
return await self.confirm_and_render(
|
||||
self.daemon.jsonrpc_publish(name, *args, **kwargs), confirm
|
||||
)
|
||||
|
||||
async def channel_create(self, name='@arena', bid='1.0', confirm=True, **kwargs):
|
||||
channel = await self.out(self.daemon.jsonrpc_channel_create(name, bid, **kwargs))
|
||||
self.assertEqual(channel['outputs'][0]['name'], name)
|
||||
if confirm:
|
||||
await self.on_transaction_dict(channel)
|
||||
await self.generate(1)
|
||||
await self.on_transaction_dict(channel)
|
||||
return channel
|
||||
return await self.confirm_and_render(
|
||||
self.daemon.jsonrpc_channel_create(name, bid, **kwargs), confirm
|
||||
)
|
||||
|
||||
async def channel_update(self, claim_id, confirm=True, **kwargs):
|
||||
channel = await self.out(self.daemon.jsonrpc_channel_update(claim_id, **kwargs))
|
||||
self.assertTrue(channel['outputs'][0]['name'].startswith('@'))
|
||||
if confirm:
|
||||
await self.on_transaction_dict(channel)
|
||||
await self.generate(1)
|
||||
await self.on_transaction_dict(channel)
|
||||
return channel
|
||||
return await self.confirm_and_render(
|
||||
self.daemon.jsonrpc_channel_update(claim_id, **kwargs), confirm
|
||||
)
|
||||
|
||||
async def channel_abandon(self, *args, confirm=True, **kwargs):
|
||||
if 'blocking' not in kwargs:
|
||||
kwargs['blocking'] = False
|
||||
tx = await self.out(self.daemon.jsonrpc_channel_abandon(*args, **kwargs))
|
||||
if confirm:
|
||||
await self.on_transaction_dict(tx)
|
||||
await self.generate(1)
|
||||
await self.on_transaction_dict(tx)
|
||||
return tx
|
||||
return await self.confirm_and_render(
|
||||
self.daemon.jsonrpc_channel_abandon(*args, **kwargs), confirm
|
||||
)
|
||||
|
||||
async def support_create(self, claim_id, bid='1.0', confirm=True, **kwargs):
|
||||
tx = await self.out(self.daemon.jsonrpc_support_create(claim_id, bid, **kwargs))
|
||||
if confirm:
|
||||
await self.on_transaction_dict(tx)
|
||||
await self.generate(1)
|
||||
await self.on_transaction_dict(tx)
|
||||
return tx
|
||||
return await self.confirm_and_render(
|
||||
self.daemon.jsonrpc_support_create(claim_id, bid, **kwargs), confirm
|
||||
)
|
||||
|
||||
async def resolve(self, uri):
|
||||
return await self.out(self.daemon.jsonrpc_resolve(uri))
|
||||
@@ -305,6 +279,12 @@ class CommandTestCase(IntegrationTestCase):
|
||||
async def claim_search(self, **kwargs):
|
||||
return (await self.out(self.daemon.jsonrpc_claim_search(**kwargs)))['items']
|
||||
|
||||
async def file_list(self, *args, **kwargs):
|
||||
return (await self.out(self.daemon.jsonrpc_file_list(*args, **kwargs)))['items']
|
||||
|
||||
@staticmethod
|
||||
def get_claim_id(tx):
|
||||
return tx['outputs'][0]['claim_id']
|
||||
|
||||
def assertItemCount(self, result, count):
|
||||
self.assertEqual(result['total_items'], count)
|
||||
@@ -3,6 +3,7 @@ __node_cli__ = 'lbrycrd-cli'
|
||||
__node_bin__ = ''
|
||||
__node_url__ = (
|
||||
'https://github.com/lbryio/lbrycrd/releases/download/v0.17.2.1/lbrycrd-linux.zip'
|
||||
# 'https://github.com/lbryio/lbrycrd/releases/download/v0.17.3.1/lbrycrd-linux-1731.zip'
|
||||
)
|
||||
__spvserver__ = 'lbry.wallet.server.coin.LBCRegTest'
|
||||
|
||||
|
||||
@@ -62,15 +62,24 @@ class Account(BaseAccount):
|
||||
private_key = ecdsa.SigningKey.from_pem(private_key_pem, hashfunc=sha256)
|
||||
public_key_der = private_key.get_verifying_key().to_der()
|
||||
channel_keys[self.ledger.public_key_to_address(public_key_der)] = private_key_pem
|
||||
self.channel_keys = channel_keys
|
||||
self.wallet.save()
|
||||
if self.channel_keys != channel_keys:
|
||||
self.channel_keys = channel_keys
|
||||
self.wallet.save()
|
||||
|
||||
async def save_max_gap(self):
|
||||
if issubclass(self.address_generator, HierarchicalDeterministic):
|
||||
gap = await self.get_max_gap()
|
||||
self.receiving.gap = max(20, gap['max_receiving_gap'] + 1)
|
||||
self.change.gap = max(6, gap['max_change_gap'] + 1)
|
||||
self.wallet.save()
|
||||
gap_changed = False
|
||||
new_receiving_gap = max(20, gap['max_receiving_gap'] + 1)
|
||||
if self.receiving.gap != new_receiving_gap:
|
||||
self.receiving.gap = new_receiving_gap
|
||||
gap_changed = True
|
||||
new_change_gap = max(6, gap['max_change_gap'] + 1)
|
||||
if self.change.gap != new_change_gap:
|
||||
self.change.gap = new_change_gap
|
||||
gap_changed = True
|
||||
if gap_changed:
|
||||
self.wallet.save()
|
||||
|
||||
def get_balance(self, confirmations=0, include_claims=False, **constraints):
|
||||
if not include_claims:
|
||||
|
||||
@@ -50,12 +50,12 @@ def verify_proof(proof, root_hash, name):
|
||||
raise InvalidProofError("did not find the alleged child")
|
||||
if i == 0 and 'txhash' in proof and 'nOut' in proof and 'last takeover height' in proof:
|
||||
if len(proof['txhash']) != 64:
|
||||
raise InvalidProofError("txhash was invalid: {}".format(proof['txhash']))
|
||||
raise InvalidProofError(f"txhash was invalid: {proof['txhash']}")
|
||||
if not isinstance(proof['nOut'], int):
|
||||
raise InvalidProofError("nOut was invalid: {}".format(proof['nOut']))
|
||||
raise InvalidProofError(f"nOut was invalid: {proof['nOut']}")
|
||||
if not isinstance(proof['last takeover height'], int):
|
||||
raise InvalidProofError(
|
||||
'last takeover height was invalid: {}'.format(proof['last takeover height']))
|
||||
f"last takeover height was invalid: {proof['last takeover height']}")
|
||||
to_hash += get_hash_for_outpoint(
|
||||
binascii.unhexlify(proof['txhash'])[::-1],
|
||||
proof['nOut'],
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
TXO_TYPES = {
|
||||
"stream": 1,
|
||||
"channel": 2,
|
||||
"support": 3
|
||||
"support": 3,
|
||||
"purchase": 4
|
||||
}
|
||||
@@ -8,6 +8,20 @@ from lbry.wallet.constants import TXO_TYPES
|
||||
|
||||
class WalletDatabase(BaseDatabase):
|
||||
|
||||
SCHEMA_VERSION = f"{BaseDatabase.SCHEMA_VERSION}+1"
|
||||
|
||||
CREATE_TX_TABLE = """
|
||||
create table if not exists tx (
|
||||
txid text primary key,
|
||||
raw blob not null,
|
||||
height integer not null,
|
||||
position integer not null,
|
||||
is_verified boolean not null default 0,
|
||||
purchased_claim_id text
|
||||
);
|
||||
create index if not exists tx_purchased_claim_id_idx on tx (purchased_claim_id);
|
||||
"""
|
||||
|
||||
CREATE_TXO_TABLE = """
|
||||
create table if not exists txo (
|
||||
txid text references tx,
|
||||
@@ -22,6 +36,7 @@ class WalletDatabase(BaseDatabase):
|
||||
claim_id text,
|
||||
claim_name text
|
||||
);
|
||||
create index if not exists txo_txid_idx on txo (txid);
|
||||
create index if not exists txo_address_idx on txo (address);
|
||||
create index if not exists txo_claim_id_idx on txo (claim_id);
|
||||
create index if not exists txo_txo_type_idx on txo (txo_type);
|
||||
@@ -31,11 +46,19 @@ class WalletDatabase(BaseDatabase):
|
||||
BaseDatabase.PRAGMAS +
|
||||
BaseDatabase.CREATE_ACCOUNT_TABLE +
|
||||
BaseDatabase.CREATE_PUBKEY_ADDRESS_TABLE +
|
||||
BaseDatabase.CREATE_TX_TABLE +
|
||||
CREATE_TX_TABLE +
|
||||
CREATE_TXO_TABLE +
|
||||
BaseDatabase.CREATE_TXI_TABLE
|
||||
)
|
||||
|
||||
def tx_to_row(self, tx):
|
||||
row = super().tx_to_row(tx)
|
||||
txos = tx.outputs
|
||||
if len(txos) >= 2 and txos[1].can_decode_purchase_data:
|
||||
txos[0].purchase = txos[1]
|
||||
row['purchased_claim_id'] = txos[1].purchase_data.claim_id
|
||||
return row
|
||||
|
||||
def txo_to_row(self, tx, address, txo):
|
||||
row = super().txo_to_row(tx, address, txo)
|
||||
if txo.is_claim:
|
||||
@@ -45,11 +68,45 @@ class WalletDatabase(BaseDatabase):
|
||||
row['txo_type'] = TXO_TYPES['stream']
|
||||
elif txo.is_support:
|
||||
row['txo_type'] = TXO_TYPES['support']
|
||||
elif txo.purchase is not None:
|
||||
row['txo_type'] = TXO_TYPES['purchase']
|
||||
row['claim_id'] = txo.purchased_claim_id
|
||||
if txo.script.is_claim_involved:
|
||||
row['claim_id'] = txo.claim_id
|
||||
row['claim_name'] = txo.claim_name
|
||||
return row
|
||||
|
||||
async def get_transactions(self, **constraints):
|
||||
txs = await super().get_transactions(**constraints)
|
||||
for tx in txs:
|
||||
txos = tx.outputs
|
||||
if len(txos) >= 2 and txos[1].can_decode_purchase_data:
|
||||
txos[0].purchase = txos[1]
|
||||
return txs
|
||||
|
||||
@staticmethod
|
||||
def constrain_purchases(constraints):
|
||||
accounts = constraints.pop('accounts', None)
|
||||
assert accounts, "'accounts' argument required to find purchases"
|
||||
if not {'purchased_claim_id', 'purchased_claim_id__in'}.intersection(constraints):
|
||||
constraints['purchased_claim_id__is_not_null'] = True
|
||||
constraints.update({
|
||||
f'$account{i}': a.public_key.address for i, a in enumerate(accounts)
|
||||
})
|
||||
account_values = ', '.join([f':$account{i}' for i in range(len(accounts))])
|
||||
constraints['txid__in'] = f"""
|
||||
SELECT txid FROM txi JOIN account_address USING (address)
|
||||
WHERE account_address.account IN ({account_values})
|
||||
"""
|
||||
|
||||
async def get_purchases(self, **constraints):
|
||||
self.constrain_purchases(constraints)
|
||||
return [tx.outputs[0] for tx in await self.get_transactions(**constraints)]
|
||||
|
||||
def get_purchase_count(self, **constraints):
|
||||
self.constrain_purchases(constraints)
|
||||
return self.get_transaction_count(**constraints)
|
||||
|
||||
async def get_txos(self, wallet=None, no_tx=False, **constraints) -> List[Output]:
|
||||
txos = await super().get_txos(wallet=wallet, no_tx=no_tx, **constraints)
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ def lbc_to_dewies(lbc: str) -> int:
|
||||
return coins_to_satoshis(lbc)
|
||||
except ValueError:
|
||||
raise ValueError(textwrap.dedent(
|
||||
"""
|
||||
f"""
|
||||
Decimal inputs require a value in the ones place and in the tenths place
|
||||
separated by a period. The value provided, '{}', is not of the correct
|
||||
separated by a period. The value provided, '{lbc}', is not of the correct
|
||||
format.
|
||||
|
||||
The following are examples of valid decimal inputs:
|
||||
@@ -25,7 +25,7 @@ def lbc_to_dewies(lbc: str) -> int:
|
||||
83
|
||||
.456
|
||||
123.
|
||||
""".format(lbc)
|
||||
"""
|
||||
))
|
||||
|
||||
|
||||
@@ -34,9 +34,12 @@ def dewies_to_lbc(dewies) -> str:
|
||||
|
||||
|
||||
def dict_values_to_lbc(d):
|
||||
lbc_dict = {}
|
||||
for key, value in d.items():
|
||||
if isinstance(value, int):
|
||||
d[key] = dewies_to_lbc(value)
|
||||
lbc_dict[key] = dewies_to_lbc(value)
|
||||
elif isinstance(value, dict):
|
||||
dict_values_to_lbc(value)
|
||||
return d
|
||||
lbc_dict[key] = dict_values_to_lbc(value)
|
||||
else:
|
||||
lbc_dict[key] = value
|
||||
return lbc_dict
|
||||
+89
-27
@@ -5,7 +5,8 @@ from functools import partial
|
||||
from typing import Tuple, List
|
||||
from datetime import datetime
|
||||
|
||||
from torba.client.baseledger import BaseLedger
|
||||
import pylru
|
||||
from torba.client.baseledger import BaseLedger, TransactionEvent
|
||||
from torba.client.baseaccount import SingleKey
|
||||
from lbry.schema.result import Outputs
|
||||
from lbry.schema.url import URL
|
||||
@@ -52,17 +53,36 @@ class MainNetLedger(BaseLedger):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fee_per_name_char = self.config.get('fee_per_name_char', self.default_fee_per_name_char)
|
||||
self._balance_cache = pylru.lrucache(100000)
|
||||
|
||||
async def _inflate_outputs(self, query):
|
||||
async def _inflate_outputs(self, query, accounts):
|
||||
outputs = Outputs.from_base64(await query)
|
||||
txs = []
|
||||
if len(outputs.txs) > 0:
|
||||
txs = await asyncio.gather(*(self.cache_transaction(*tx) for tx in outputs.txs))
|
||||
txs: List[Transaction] = await asyncio.gather(*(
|
||||
self.cache_transaction(*tx) for tx in outputs.txs
|
||||
))
|
||||
if accounts:
|
||||
priced_claims = []
|
||||
for tx in txs:
|
||||
for txo in tx.outputs:
|
||||
if txo.has_price:
|
||||
priced_claims.append(txo)
|
||||
if priced_claims:
|
||||
receipts = {
|
||||
txo.purchased_claim_id: txo for txo in
|
||||
await self.db.get_purchases(
|
||||
accounts=accounts,
|
||||
purchased_claim_id__in=[c.claim_id for c in priced_claims]
|
||||
)
|
||||
}
|
||||
for txo in priced_claims:
|
||||
txo.purchase_receipt = receipts.get(txo.claim_id)
|
||||
return outputs.inflate(txs), outputs.offset, outputs.total
|
||||
|
||||
async def resolve(self, urls):
|
||||
async def resolve(self, accounts, urls):
|
||||
resolve = partial(self.network.retriable_call, self.network.resolve)
|
||||
txos = (await self._inflate_outputs(resolve(urls)))[0]
|
||||
txos = (await self._inflate_outputs(resolve(urls), accounts))[0]
|
||||
assert len(urls) == len(txos), "Mismatch between urls requested for resolve and responses received."
|
||||
result = {}
|
||||
for url, txo in zip(urls, txos):
|
||||
@@ -75,11 +95,11 @@ class MainNetLedger(BaseLedger):
|
||||
result[url] = {'error': f'{url} did not resolve to a claim'}
|
||||
return result
|
||||
|
||||
async def claim_search(self, **kwargs) -> Tuple[List[Output], int, int]:
|
||||
return await self._inflate_outputs(self.network.claim_search(**kwargs))
|
||||
async def claim_search(self, accounts, **kwargs) -> Tuple[List[Output], int, int]:
|
||||
return await self._inflate_outputs(self.network.claim_search(**kwargs), accounts)
|
||||
|
||||
async def get_claim_by_claim_id(self, claim_id) -> Output:
|
||||
for claim in (await self.claim_search(claim_id=claim_id))[0]:
|
||||
async def get_claim_by_claim_id(self, accounts, claim_id) -> Output:
|
||||
for claim in (await self.claim_search(accounts, claim_id=claim_id))[0]:
|
||||
return claim
|
||||
|
||||
async def start(self):
|
||||
@@ -87,6 +107,7 @@ class MainNetLedger(BaseLedger):
|
||||
await asyncio.gather(*(a.maybe_migrate_certificates() for a in self.accounts))
|
||||
await asyncio.gather(*(a.save_max_gap() for a in self.accounts))
|
||||
await self._report_state()
|
||||
self.on_transaction.listen(self._reset_balance_cache)
|
||||
|
||||
async def _report_state(self):
|
||||
try:
|
||||
@@ -99,8 +120,8 @@ class MainNetLedger(BaseLedger):
|
||||
"%d channels, %d certificates and %d claims",
|
||||
account.id, balance, channel_count, len(account.channel_keys), claim_count)
|
||||
else:
|
||||
total_receiving = len((await account.receiving.get_addresses()))
|
||||
total_change = len((await account.change.get_addresses()))
|
||||
total_receiving = len(await account.receiving.get_addresses())
|
||||
total_change = len(await account.change.get_addresses())
|
||||
log.info("Loaded account %s with %s LBC, %d receiving addresses (gap: %d), "
|
||||
"%d change addresses (gap: %d), %d channels, %d certificates and %d claims. ",
|
||||
account.id, balance, total_receiving, account.receiving.gap, total_change,
|
||||
@@ -110,6 +131,14 @@ class MainNetLedger(BaseLedger):
|
||||
'Failed to display wallet state, please file issue '
|
||||
'for this bug along with the traceback you see below:')
|
||||
|
||||
async def _reset_balance_cache(self, e: TransactionEvent):
|
||||
account_ids = [
|
||||
r['account'] for r in await self.db.get_addresses(('account',), address=e.address)
|
||||
]
|
||||
for account_id in account_ids:
|
||||
if account_id in self._balance_cache:
|
||||
del self._balance_cache[account_id]
|
||||
|
||||
@staticmethod
|
||||
def constraint_spending_utxos(constraints):
|
||||
constraints['txo_type'] = 0
|
||||
@@ -122,6 +151,23 @@ class MainNetLedger(BaseLedger):
|
||||
self.constraint_spending_utxos(constraints)
|
||||
return super().get_utxo_count(**constraints)
|
||||
|
||||
async def get_purchases(self, resolve=False, **constraints):
|
||||
purchases = await self.db.get_purchases(**constraints)
|
||||
if resolve:
|
||||
claim_ids = [p.purchased_claim_id for p in purchases]
|
||||
try:
|
||||
resolved, _, _ = await self.claim_search([], claim_ids=claim_ids)
|
||||
except:
|
||||
log.exception("Resolve failed while looking up purchased claim ids:")
|
||||
resolved = []
|
||||
lookup = {claim.claim_id: claim for claim in resolved}
|
||||
for purchase in purchases:
|
||||
purchase.purchased_claim = lookup.get(purchase.purchased_claim_id)
|
||||
return purchases
|
||||
|
||||
def get_purchase_count(self, resolve=False, **constraints):
|
||||
return self.db.get_purchase_count(**constraints)
|
||||
|
||||
def get_claims(self, **constraints):
|
||||
return self.db.get_claims(**constraints)
|
||||
|
||||
@@ -147,7 +193,7 @@ class MainNetLedger(BaseLedger):
|
||||
return self.db.get_support_count(**constraints)
|
||||
|
||||
async def get_transaction_history(self, **constraints):
|
||||
txs = await self.db.get_transactions(**constraints)
|
||||
txs: List[Transaction] = await self.db.get_transactions(**constraints)
|
||||
headers = self.headers
|
||||
history = []
|
||||
for tx in txs:
|
||||
@@ -160,7 +206,8 @@ class MainNetLedger(BaseLedger):
|
||||
'claim_info': [],
|
||||
'update_info': [],
|
||||
'support_info': [],
|
||||
'abandon_info': []
|
||||
'abandon_info': [],
|
||||
'purchase_info': []
|
||||
}
|
||||
is_my_inputs = all([txi.is_my_account for txi in tx.inputs])
|
||||
if is_my_inputs:
|
||||
@@ -238,27 +285,42 @@ class MainNetLedger(BaseLedger):
|
||||
'claim_name': txo.claim_name,
|
||||
'nout': txo.position
|
||||
})
|
||||
for txo in tx.any_purchase_outputs:
|
||||
item['purchase_info'].append({
|
||||
'address': txo.get_address(self),
|
||||
'balance_delta': dewies_to_lbc(txo.amount if not is_my_inputs else -txo.amount),
|
||||
'amount': dewies_to_lbc(txo.amount),
|
||||
'claim_id': txo.purchased_claim_id,
|
||||
'nout': txo.position
|
||||
})
|
||||
history.append(item)
|
||||
return history
|
||||
|
||||
def get_transaction_history_count(self, **constraints):
|
||||
return self.db.get_transaction_count(**constraints)
|
||||
|
||||
@staticmethod
|
||||
async def get_detailed_balance(accounts, confirmations=0, reserved_subtotals=False):
|
||||
result = {}
|
||||
async def get_detailed_balance(self, accounts, confirmations=0):
|
||||
result = {
|
||||
'total': 0,
|
||||
'available': 0,
|
||||
'reserved': 0,
|
||||
'reserved_subtotals': {
|
||||
'claims': 0,
|
||||
'supports': 0,
|
||||
'tips': 0
|
||||
}
|
||||
}
|
||||
for account in accounts:
|
||||
balance = await account.get_detailed_balance(confirmations, reserved_subtotals)
|
||||
if result:
|
||||
for key, value in balance.items():
|
||||
if key == 'reserved_subtotals':
|
||||
if value is not None:
|
||||
for subkey, subvalue in value.items():
|
||||
result['reserved_subtotals'][subkey] += subvalue
|
||||
else:
|
||||
result[key] += value
|
||||
else:
|
||||
result = balance
|
||||
balance = self._balance_cache.get(account.id)
|
||||
if not balance:
|
||||
balance = self._balance_cache[account.id] =\
|
||||
await account.get_detailed_balance(confirmations, reserved_subtotals=True)
|
||||
for key, value in balance.items():
|
||||
if key == 'reserved_subtotals':
|
||||
for subkey, subvalue in value.items():
|
||||
result['reserved_subtotals'][subkey] += subvalue
|
||||
else:
|
||||
result[key] += value
|
||||
return result
|
||||
|
||||
|
||||
|
||||
+54
-18
@@ -2,15 +2,20 @@ import os
|
||||
import json
|
||||
import logging
|
||||
from binascii import unhexlify
|
||||
|
||||
from typing import Optional, List
|
||||
from decimal import Decimal
|
||||
|
||||
from torba.client.basemanager import BaseWalletManager
|
||||
from torba.client.wallet import ENCRYPT_ON_DISK
|
||||
from torba.rpc.jsonrpc import CodeMessageError
|
||||
|
||||
from lbry.error import KeyFeeAboveMaxAllowed
|
||||
from lbry.wallet.dewies import dewies_to_lbc
|
||||
from lbry.wallet.account import Account
|
||||
from lbry.wallet.ledger import MainNetLedger
|
||||
from lbry.wallet.transaction import Transaction
|
||||
from lbry.wallet.transaction import Transaction, Output
|
||||
from lbry.wallet.database import WalletDatabase
|
||||
from lbry.extras.daemon.exchange_rate_manager import ExchangeRateManager
|
||||
from lbry.conf import Config
|
||||
|
||||
|
||||
@@ -19,6 +24,10 @@ log = logging.getLogger(__name__)
|
||||
|
||||
class LbryWalletManager(BaseWalletManager):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.config: Optional[Config] = None
|
||||
|
||||
@property
|
||||
def ledger(self) -> MainNetLedger:
|
||||
return self.default_account.ledger
|
||||
@@ -77,7 +86,7 @@ class LbryWalletManager(BaseWalletManager):
|
||||
while os.path.isfile(backup_path_template % i):
|
||||
i += 1
|
||||
os.rename(path, backup_path_template % i)
|
||||
temp_path = "{}.tmp.{}".format(path, os.getpid())
|
||||
temp_path = f"{path}.tmp.{os.getpid()}"
|
||||
with open(temp_path, "w") as f:
|
||||
f.write(migrated_json)
|
||||
f.flush()
|
||||
@@ -87,21 +96,21 @@ class LbryWalletManager(BaseWalletManager):
|
||||
return receiving_addresses, change_addresses
|
||||
|
||||
@classmethod
|
||||
async def from_lbrynet_config(cls, settings: Config):
|
||||
async def from_lbrynet_config(cls, config: Config):
|
||||
|
||||
ledger_id = {
|
||||
'lbrycrd_main': 'lbc_mainnet',
|
||||
'lbrycrd_testnet': 'lbc_testnet',
|
||||
'lbrycrd_regtest': 'lbc_regtest'
|
||||
}[settings.blockchain_name]
|
||||
}[config.blockchain_name]
|
||||
|
||||
ledger_config = {
|
||||
'auto_connect': True,
|
||||
'default_servers': settings.lbryum_servers,
|
||||
'data_path': settings.wallet_dir,
|
||||
'default_servers': config.lbryum_servers,
|
||||
'data_path': config.wallet_dir,
|
||||
}
|
||||
|
||||
wallets_directory = os.path.join(settings.wallet_dir, 'wallets')
|
||||
wallets_directory = os.path.join(config.wallet_dir, 'wallets')
|
||||
if not os.path.exists(wallets_directory):
|
||||
os.mkdir(wallets_directory)
|
||||
|
||||
@@ -112,11 +121,12 @@ class LbryWalletManager(BaseWalletManager):
|
||||
manager = cls.from_config({
|
||||
'ledgers': {ledger_id: ledger_config},
|
||||
'wallets': [
|
||||
os.path.join(wallets_directory, wallet_file) for wallet_file in settings.wallets
|
||||
os.path.join(wallets_directory, wallet_file) for wallet_file in config.wallets
|
||||
]
|
||||
})
|
||||
manager.config = config
|
||||
ledger = manager.get_or_create_ledger(ledger_id)
|
||||
ledger.coin_selection_strategy = settings.coin_selection_strategy
|
||||
ledger.coin_selection_strategy = config.coin_selection_strategy
|
||||
default_wallet = manager.default_wallet
|
||||
if default_wallet.default_account is None:
|
||||
log.info('Wallet at %s is empty, generating a default account.', default_wallet.id)
|
||||
@@ -137,9 +147,9 @@ class LbryWalletManager(BaseWalletManager):
|
||||
|
||||
async def _migrate_addresses(self, receiving_addresses: set, change_addresses: set):
|
||||
async with self.default_account.receiving.address_generator_lock:
|
||||
migrated_receiving = set((await self.default_account.receiving._generate_keys(0, len(receiving_addresses))))
|
||||
migrated_receiving = set(await self.default_account.receiving._generate_keys(0, len(receiving_addresses)))
|
||||
async with self.default_account.change.address_generator_lock:
|
||||
migrated_change = set((await self.default_account.change._generate_keys(0, len(change_addresses))))
|
||||
migrated_change = set(await self.default_account.change._generate_keys(0, len(change_addresses)))
|
||||
receiving_addresses = set(map(self.default_account.ledger.public_key_to_address, receiving_addresses))
|
||||
change_addresses = set(map(self.default_account.ledger.public_key_to_address, change_addresses))
|
||||
if not any(change_addresses.difference(migrated_change)):
|
||||
@@ -161,12 +171,6 @@ class LbryWalletManager(BaseWalletManager):
|
||||
def get_unused_address(self):
|
||||
return self.default_account.receiving.get_or_create_usable_address()
|
||||
|
||||
async def send_amount_to_address(self, amount: int, destination_address: bytes, account=None):
|
||||
account = account or self.default_account
|
||||
tx = await Transaction.pay(amount, destination_address, [account], account)
|
||||
await account.ledger.broadcast(tx)
|
||||
return tx
|
||||
|
||||
async def get_transaction(self, txid):
|
||||
tx = await self.db.get_transaction(txid=txid)
|
||||
if not tx:
|
||||
@@ -180,3 +184,35 @@ class LbryWalletManager(BaseWalletManager):
|
||||
tx = self.ledger.transaction_class(unhexlify(raw))
|
||||
await self.ledger.maybe_verify_transaction(tx, height)
|
||||
return tx
|
||||
|
||||
async def create_purchase_transaction(
|
||||
self, accounts: List[Account], txo: Output, exchange: ExchangeRateManager, override_max_key_fee=False):
|
||||
fee = txo.claim.stream.fee
|
||||
fee_amount = exchange.to_dewies(fee.currency, fee.amount)
|
||||
if not override_max_key_fee and self.config.max_key_fee:
|
||||
max_fee = self.config.max_key_fee
|
||||
max_fee_amount = exchange.to_dewies(max_fee['currency'], Decimal(max_fee['amount']))
|
||||
if max_fee_amount and fee_amount > max_fee_amount:
|
||||
error_fee = f"{dewies_to_lbc(fee_amount)} LBC"
|
||||
if fee.currency != 'LBC':
|
||||
error_fee += f" ({fee.amount} {fee.currency})"
|
||||
error_max_fee = f"{dewies_to_lbc(max_fee_amount)} LBC"
|
||||
if max_fee['currency'] != 'LBC':
|
||||
error_max_fee += f" ({max_fee['amount']} {max_fee['currency']})"
|
||||
raise KeyFeeAboveMaxAllowed(
|
||||
f"Purchase price of {error_fee} exceeds maximum "
|
||||
f"configured price of {error_max_fee}."
|
||||
)
|
||||
fee_address = fee.address or txo.get_address(self.ledger)
|
||||
return await Transaction.purchase(
|
||||
txo.claim_id, fee_amount, fee_address, accounts, accounts[0]
|
||||
)
|
||||
|
||||
async def broadcast_or_release(self, tx, blocking=False):
|
||||
try:
|
||||
await self.ledger.broadcast(tx)
|
||||
if blocking:
|
||||
await self.ledger.wait(tx)
|
||||
except:
|
||||
await self.ledger.release_tx(tx)
|
||||
raise
|
||||
@@ -42,6 +42,17 @@ class OutputScript(BaseOutputScript):
|
||||
SUPPORT_CLAIM_OPCODES + BaseOutputScript.PAY_SCRIPT_HASH.opcodes
|
||||
))
|
||||
|
||||
SUPPORT_CLAIM_DATA_OPCODES = (
|
||||
OP_SUPPORT_CLAIM, PUSH_SINGLE('claim_name'), PUSH_SINGLE('claim_id'), PUSH_SINGLE('support'),
|
||||
OP_2DROP, OP_2DROP
|
||||
)
|
||||
SUPPORT_CLAIM_DATA_PUBKEY = Template('support_claim+data+pay_pubkey_hash', (
|
||||
SUPPORT_CLAIM_DATA_OPCODES + BaseOutputScript.PAY_PUBKEY_HASH.opcodes
|
||||
))
|
||||
SUPPORT_CLAIM_DATA_SCRIPT = Template('support_claim+data+pay_script_hash', (
|
||||
SUPPORT_CLAIM_DATA_OPCODES + BaseOutputScript.PAY_SCRIPT_HASH.opcodes
|
||||
))
|
||||
|
||||
UPDATE_CLAIM_OPCODES = (
|
||||
OP_UPDATE_CLAIM, PUSH_SINGLE('claim_name'), PUSH_SINGLE('claim_id'), PUSH_SINGLE('claim'),
|
||||
OP_2DROP, OP_2DROP
|
||||
@@ -73,6 +84,8 @@ class OutputScript(BaseOutputScript):
|
||||
CLAIM_NAME_SCRIPT,
|
||||
SUPPORT_CLAIM_PUBKEY,
|
||||
SUPPORT_CLAIM_SCRIPT,
|
||||
SUPPORT_CLAIM_DATA_PUBKEY,
|
||||
SUPPORT_CLAIM_DATA_SCRIPT,
|
||||
UPDATE_CLAIM_PUBKEY,
|
||||
UPDATE_CLAIM_SCRIPT,
|
||||
SELL_CLAIM, SELL_SCRIPT,
|
||||
@@ -104,6 +117,16 @@ class OutputScript(BaseOutputScript):
|
||||
'pubkey_hash': pubkey_hash
|
||||
})
|
||||
|
||||
@classmethod
|
||||
def pay_support_data_pubkey_hash(
|
||||
cls, claim_name: bytes, claim_id: bytes, support: bytes, pubkey_hash: bytes):
|
||||
return cls(template=cls.SUPPORT_CLAIM_DATA_PUBKEY, values={
|
||||
'claim_name': claim_name,
|
||||
'claim_id': claim_id,
|
||||
'support': support,
|
||||
'pubkey_hash': pubkey_hash
|
||||
})
|
||||
|
||||
@classmethod
|
||||
def sell_script(cls, price):
|
||||
return cls(template=cls.SELL_SCRIPT, values={
|
||||
|
||||
@@ -1,22 +1,25 @@
|
||||
import struct
|
||||
from hashlib import sha256
|
||||
|
||||
from lbry.wallet.script import OutputScript
|
||||
from torba.server.script import ScriptPubKey, OpCodes
|
||||
from torba.server.util import cachedproperty
|
||||
from torba.server.hash import hash_to_hex_str, HASHX_LEN
|
||||
from hashlib import sha256
|
||||
from torba.server.coins import Coin, CoinError
|
||||
from torba.server.tx import DeserializerSegWit
|
||||
|
||||
from lbry.wallet.script import OutputScript
|
||||
from .session import LBRYElectrumX, LBRYSessionManager
|
||||
from .block_processor import LBRYBlockProcessor
|
||||
from .daemon import LBCDaemon
|
||||
from .db.writer import LBRYDB
|
||||
|
||||
|
||||
class LBC(Coin):
|
||||
from .session import LBRYElectrumX, LBRYSessionManager
|
||||
from .block_processor import LBRYBlockProcessor
|
||||
from .daemon import LBCDaemon
|
||||
from .db.writer import LBRYDB
|
||||
DAEMON = LBCDaemon
|
||||
SESSIONCLS = LBRYElectrumX
|
||||
BLOCK_PROCESSOR = LBRYBlockProcessor
|
||||
SESSION_MANAGER = LBRYSessionManager
|
||||
DESERIALIZER = DeserializerSegWit
|
||||
DB = LBRYDB
|
||||
NAME = "LBRY"
|
||||
SHORTNAME = "LBC"
|
||||
@@ -47,8 +50,7 @@ class LBC(Coin):
|
||||
header = cls.block_header(block, 0)
|
||||
header_hex_hash = hash_to_hex_str(cls.header_hash(header))
|
||||
if header_hex_hash != cls.GENESIS_HASH:
|
||||
raise CoinError('genesis block has hash {} expected {}'
|
||||
.format(header_hex_hash, cls.GENESIS_HASH))
|
||||
raise CoinError(f'genesis block has hash {header_hex_hash} expected {cls.GENESIS_HASH}')
|
||||
|
||||
return block
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ INTEGER_PARAMS = {
|
||||
}
|
||||
|
||||
SEARCH_PARAMS = {
|
||||
'name', 'claim_id', 'txid', 'nout', 'channel', 'channel_ids', 'not_channel_ids',
|
||||
'name', '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',
|
||||
'any_tags', 'all_tags', 'not_tags',
|
||||
@@ -226,6 +226,8 @@ def _get_claims(cols, for_count=False, **constraints) -> Tuple[str, Dict]:
|
||||
constraints['claim.claim_id'] = claim_id
|
||||
else:
|
||||
constraints['claim.claim_id__like'] = f'{claim_id[:40]}%'
|
||||
elif 'claim_ids' in constraints:
|
||||
constraints['claim.claim_id__in'] = constraints.pop('claim_ids')
|
||||
|
||||
if 'name' in constraints:
|
||||
constraints['claim.normalized'] = normalize_name(constraints.pop('name'))
|
||||
@@ -397,7 +399,7 @@ def resolve_url(raw_url):
|
||||
if set(query) == {'name'}:
|
||||
query['is_controlling'] = True
|
||||
else:
|
||||
query['order_by'] = ['^height']
|
||||
query['order_by'] = ['^creation_height']
|
||||
matches = _search(**query, limit=1)
|
||||
if matches:
|
||||
channel = matches[0]
|
||||
|
||||
@@ -5,7 +5,7 @@ TRENDING_WINDOW = 134
|
||||
|
||||
# TRENDING_DATA_POINTS says how many samples to use for the trending algorithm
|
||||
# i.e. only consider claims from the most recent (TRENDING_WINDOW * TRENDING_DATA_POINTS) blocks
|
||||
TRENDING_DATA_POINTS = 7
|
||||
TRENDING_DATA_POINTS = 28
|
||||
|
||||
CREATE_TREND_TABLE = """
|
||||
create table if not exists trend (
|
||||
|
||||
@@ -122,6 +122,7 @@ class SQLDB:
|
||||
create unique index if not exists claim_effective_amount_idx on claim (effective_amount, claim_hash, release_time);
|
||||
create unique index if not exists claim_release_time_idx on claim (release_time, claim_hash);
|
||||
create unique index if not exists claim_trending_global_mixed_idx on claim (trending_global, trending_mixed, claim_hash);
|
||||
create unique index if not exists claim_trending_group_mixed_idx on claim (trending_group, trending_mixed, claim_hash);
|
||||
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);
|
||||
@@ -189,7 +190,7 @@ class SQLDB:
|
||||
constraints: Union[list, tuple]) -> Tuple[str, list]:
|
||||
columns, values = [], []
|
||||
for column, value in data.items():
|
||||
columns.append("{} = ?".format(column))
|
||||
columns.append(f"{column} = ?")
|
||||
values.append(value)
|
||||
values.extend(constraints)
|
||||
return f"UPDATE {table} SET {', '.join(columns)} WHERE {where}", values
|
||||
@@ -319,7 +320,7 @@ class SQLDB:
|
||||
for table in ('claim', 'support', 'claimtrie'):
|
||||
self.execute(*self._delete_sql(table, {'claim_hash__in': binary_claim_hashes}))
|
||||
self._clear_claim_metadata(binary_claim_hashes)
|
||||
return set(r['channel_hash'] for r in affected_channels)
|
||||
return {r['channel_hash'] for r in affected_channels}
|
||||
return set()
|
||||
|
||||
def _clear_claim_metadata(self, binary_claim_hashes: List[sqlite3.Binary]):
|
||||
@@ -472,11 +473,11 @@ class SQLDB:
|
||||
channel_hash=:channel_hash, signature=:signature, signature_digest=:signature_digest,
|
||||
signature_valid=:signature_valid,
|
||||
channel_join=CASE
|
||||
WHEN signature_valid=1 AND :signature_valid=1 THEN channel_join
|
||||
WHEN signature_valid=1 AND :signature_valid=1 AND channel_hash=:channel_hash THEN channel_join
|
||||
WHEN :signature_valid=1 THEN {height}
|
||||
END,
|
||||
canonical_url=CASE
|
||||
WHEN signature_valid=1 AND :signature_valid=1 THEN canonical_url
|
||||
WHEN signature_valid=1 AND :signature_valid=1 AND channel_hash=:channel_hash THEN canonical_url
|
||||
WHEN :signature_valid=1 THEN
|
||||
(SELECT short_url FROM claim WHERE claim_hash=:channel_hash)||'/'||
|
||||
claim_name||COALESCE(
|
||||
@@ -648,7 +649,7 @@ class SQLDB:
|
||||
body_timer = timer.add_timer('body')
|
||||
for position, (etx, txid) in enumerate(all_txs):
|
||||
tx = timer.run(
|
||||
Transaction, etx.serialize(), height=height, position=position
|
||||
Transaction, etx.raw, height=height, position=position
|
||||
)
|
||||
# Inputs
|
||||
spent_claims, spent_supports, spent_others = timer.run(
|
||||
|
||||
@@ -16,6 +16,7 @@ from lbry.wallet.server.db.writer import LBRYDB
|
||||
from lbry.wallet.server.db import reader
|
||||
from lbry.wallet.server.websocket import AdminWebSocket
|
||||
from lbry.wallet.server.metrics import ServerLoadData, APICallMetrics
|
||||
from lbry import __version__ as sdk_version
|
||||
|
||||
|
||||
class ResultCacheItem:
|
||||
@@ -94,6 +95,7 @@ class LBRYElectrumX(ElectrumX):
|
||||
PROTOCOL_MIN = (0, 0) # temporary, for supporting 0.10 protocol
|
||||
max_errors = math.inf # don't disconnect people for errors! let them happen...
|
||||
session_mgr: LBRYSessionManager
|
||||
version = sdk_version
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
@@ -14,6 +14,7 @@ from cryptography.exceptions import InvalidSignature
|
||||
from torba.client.basetransaction import BaseTransaction, BaseInput, BaseOutput, ReadOnlyList
|
||||
from torba.client.hash import hash160, sha256, Base58
|
||||
from lbry.schema.claim import Claim
|
||||
from lbry.schema.purchase import Purchase
|
||||
from lbry.schema.url import normalize_name
|
||||
from lbry.wallet.account import Account
|
||||
from lbry.wallet.script import InputScript, OutputScript
|
||||
@@ -28,13 +29,19 @@ class Output(BaseOutput):
|
||||
script: OutputScript
|
||||
script_class = OutputScript
|
||||
|
||||
__slots__ = 'channel', 'private_key', 'meta'
|
||||
__slots__ = (
|
||||
'channel', 'private_key', 'meta',
|
||||
'purchase', 'purchased_claim', 'purchase_receipt',
|
||||
)
|
||||
|
||||
def __init__(self, *args, channel: Optional['Output'] = None,
|
||||
private_key: Optional[str] = None, **kwargs) -> None:
|
||||
super().__init__(*args, **kwargs)
|
||||
self.channel = channel
|
||||
self.private_key = private_key
|
||||
self.purchase: 'Output' = None # txo containing purchase metadata
|
||||
self.purchased_claim: 'Output' = None # resolved claim pointed to by purchase
|
||||
self.purchase_receipt: 'Output' = None # txo representing purchase receipt for this claim
|
||||
self.meta = {}
|
||||
|
||||
def update_annotations(self, annotated):
|
||||
@@ -188,10 +195,60 @@ class Output(BaseOutput):
|
||||
return cls(amount, script)
|
||||
|
||||
@classmethod
|
||||
def purchase_claim_pubkey_hash(cls, amount: int, claim_id: str, pubkey_hash: bytes) -> 'Output':
|
||||
script = cls.script_class.purchase_claim_pubkey_hash(unhexlify(claim_id)[::-1], pubkey_hash)
|
||||
def pay_support_data_pubkey_hash(
|
||||
cls, amount: int, claim_name: str, claim_id: str, support: bytes, pubkey_hash: bytes) -> 'Output':
|
||||
script = OutputScript.pay_support_data_pubkey_hash(
|
||||
claim_name.encode(), unhexlify(claim_id)[::-1], support, pubkey_hash
|
||||
)
|
||||
return cls(amount, script)
|
||||
|
||||
@classmethod
|
||||
def add_purchase_data(cls, purchase: Purchase) -> 'Output':
|
||||
script = cls.script_class.return_data(purchase)
|
||||
return cls(0, script)
|
||||
|
||||
@property
|
||||
def is_purchase_data(self) -> bool:
|
||||
return self.script.is_return_data and (
|
||||
isinstance(self.script.values['data'], Purchase) or
|
||||
Purchase.has_start_byte(self.script.values['data'])
|
||||
)
|
||||
|
||||
@property
|
||||
def purchase_data(self) -> Purchase:
|
||||
if self.is_purchase_data:
|
||||
if not isinstance(self.script.values['data'], Purchase):
|
||||
self.script.values['data'] = Purchase.from_bytes(self.script.values['data'])
|
||||
return self.script.values['data']
|
||||
raise ValueError('Output does not have purchase data.')
|
||||
|
||||
@property
|
||||
def can_decode_purchase_data(self):
|
||||
try:
|
||||
return self.purchase_data
|
||||
except:
|
||||
return False
|
||||
|
||||
@property
|
||||
def purchased_claim_id(self):
|
||||
if self.purchase is not None:
|
||||
return self.purchase.purchase_data.claim_id
|
||||
if self.purchased_claim is not None:
|
||||
return self.purchased_claim.claim_id
|
||||
|
||||
@property
|
||||
def has_price(self):
|
||||
if self.can_decode_claim:
|
||||
claim = self.claim
|
||||
if claim.is_stream:
|
||||
stream = claim.stream
|
||||
return stream.has_fee and stream.fee.amount and stream.fee.amount > 0
|
||||
return False
|
||||
|
||||
@property
|
||||
def price(self):
|
||||
return self.claim.stream.fee
|
||||
|
||||
|
||||
class Transaction(BaseTransaction):
|
||||
|
||||
@@ -238,21 +295,25 @@ class Transaction(BaseTransaction):
|
||||
|
||||
@classmethod
|
||||
def support(cls, claim_name: str, claim_id: str, amount: int, holding_address: str,
|
||||
funding_accounts: List[Account], change_account: Account):
|
||||
funding_accounts: List[Account], change_account: Account, signing_channel: Output = None):
|
||||
ledger, wallet = cls.ensure_all_have_same_ledger_and_wallet(funding_accounts, change_account)
|
||||
support_output = Output.pay_support_pubkey_hash(
|
||||
amount, claim_name, claim_id, ledger.address_to_hash160(holding_address)
|
||||
)
|
||||
if signing_channel:
|
||||
support_output = Output.pay_support_data_pubkey_hash(
|
||||
amount, claim_name, claim_id, b'beef', ledger.address_to_hash160(holding_address)
|
||||
)
|
||||
else:
|
||||
support_output = Output.pay_support_pubkey_hash(
|
||||
amount, claim_name, claim_id, ledger.address_to_hash160(holding_address)
|
||||
)
|
||||
return cls.create([], [support_output], funding_accounts, change_account)
|
||||
|
||||
@classmethod
|
||||
def purchase(cls, claim: Output, amount: int, merchant_address: bytes,
|
||||
def purchase(cls, claim_id: str, amount: int, merchant_address: bytes,
|
||||
funding_accounts: List[Account], change_account: Account):
|
||||
ledger, wallet = cls.ensure_all_have_same_ledger_and_wallet(funding_accounts, change_account)
|
||||
claim_output = Output.purchase_claim_pubkey_hash(
|
||||
amount, claim.claim_id, ledger.address_to_hash160(merchant_address)
|
||||
)
|
||||
return cls.create([], [claim_output], funding_accounts, change_account)
|
||||
payment = Output.pay_pubkey_hash(amount, ledger.address_to_hash160(merchant_address))
|
||||
data = Output.add_purchase_data(Purchase(claim_id))
|
||||
return cls.create([], [payment, data], funding_accounts, change_account)
|
||||
|
||||
@property
|
||||
def my_inputs(self):
|
||||
@@ -270,6 +331,11 @@ class Transaction(BaseTransaction):
|
||||
if not txo.is_my_account and f(txo.script):
|
||||
yield txo
|
||||
|
||||
def _filter_any_outputs(self, f):
|
||||
for txo in self.outputs:
|
||||
if f(txo):
|
||||
yield txo
|
||||
|
||||
@property
|
||||
def my_claim_outputs(self):
|
||||
return self._filter_my_outputs(lambda s: s.is_claim_name)
|
||||
@@ -282,6 +348,10 @@ class Transaction(BaseTransaction):
|
||||
def my_support_outputs(self):
|
||||
return self._filter_my_outputs(lambda s: s.is_support_claim)
|
||||
|
||||
@property
|
||||
def any_purchase_outputs(self):
|
||||
return self._filter_any_outputs(lambda o: o.purchase is not None)
|
||||
|
||||
@property
|
||||
def other_support_outputs(self):
|
||||
return self._filter_other_outputs(lambda s: s.is_support_claim)
|
||||
|
||||
@@ -32,7 +32,7 @@ async def main(blob_hash: str, url: str):
|
||||
host = host_info[0][4][0]
|
||||
|
||||
storage = SQLiteStorage(conf, os.path.join(conf.data_dir, "lbrynet.sqlite"))
|
||||
blob_manager = BlobManager(loop, os.path.join(conf.data_dir, "blobfiles"), storage)
|
||||
blob_manager = BlobManager(loop, os.path.join(conf.data_dir, "blobfiles"), storage, conf)
|
||||
await storage.open()
|
||||
await blob_manager.setup()
|
||||
|
||||
|
||||
@@ -325,10 +325,10 @@ class Examples(CommandTestCase):
|
||||
|
||||
# files
|
||||
|
||||
file_list_result = await r(
|
||||
file_list_result = (await r(
|
||||
'List local files',
|
||||
'file', 'list'
|
||||
)
|
||||
))['items']
|
||||
file_uri = f"{file_list_result[0]['claim_name']}#{file_list_result[0]['claim_id']}"
|
||||
await r(
|
||||
'Resolve a claim',
|
||||
@@ -364,7 +364,7 @@ class Examples(CommandTestCase):
|
||||
|
||||
await r(
|
||||
'Delete a blob',
|
||||
'blob', 'delete', f"{bloblist[0]}"
|
||||
'blob', 'delete', f"{bloblist['items'][0]}"
|
||||
)
|
||||
|
||||
# abandon all the things
|
||||
@@ -408,9 +408,9 @@ def get_examples():
|
||||
|
||||
|
||||
SECTIONS = re.compile("(.*?)Usage:(.*?)Options:(.*?)Returns:(.*)", re.DOTALL)
|
||||
REQUIRED_OPTIONS = re.compile("\(<(.*?)>.*?\)")
|
||||
REQUIRED_OPTIONS = re.compile(r"\(<(.*?)>.*?\)")
|
||||
ARGUMENT_NAME = re.compile("--([^=]+)")
|
||||
ARGUMENT_TYPE = re.compile("\s*\((.*?)\)(.*)")
|
||||
ARGUMENT_TYPE = re.compile(r"\s*\((.*?)\)(.*)")
|
||||
|
||||
|
||||
def get_return_def(returns):
|
||||
|
||||
@@ -135,6 +135,7 @@ def release(args):
|
||||
incompats = []
|
||||
release_texts = []
|
||||
unlabeled = []
|
||||
fixups = []
|
||||
areas = {}
|
||||
for pr in gh.search_issues(f"merged:>={previous_release._json_data['created_at']} repo:lbryio/lbry-sdk"):
|
||||
area_labels = list(get_labels(pr, 'area'))
|
||||
@@ -145,7 +146,9 @@ def release(args):
|
||||
incompats.append(f' * [{area_name}] {incompat.strip()} ({pr.html_url})')
|
||||
for release_text in get_release_text(pr.body or ""):
|
||||
release_texts.append(f'{release_text.strip()} ({pr.html_url})')
|
||||
if type_label != 'fixup':
|
||||
if type_label == 'fixup':
|
||||
fixups.append(f' * {pr.title} ({pr.html_url}) by {pr.user["login"]}')
|
||||
else:
|
||||
area = areas.setdefault(area_name, [])
|
||||
area.append(f' * [{type_label}] {pr.title} ({pr.html_url}) by {pr.user["login"]}')
|
||||
else:
|
||||
@@ -183,6 +186,11 @@ def release(args):
|
||||
for skipped in unlabeled:
|
||||
print(skipped)
|
||||
|
||||
if fixups:
|
||||
print('The following PRs were marked as fixups and not included in changelog:')
|
||||
for skipped in fixups:
|
||||
print(skipped)
|
||||
|
||||
if args.confirm:
|
||||
|
||||
commit = version_file.update(
|
||||
|
||||
@@ -14,9 +14,9 @@ def get_build_type(travis_tag=None):
|
||||
if not travis_tag:
|
||||
return "qa"
|
||||
log.debug("getting build type for tag: \"%s\"", travis_tag)
|
||||
if re.match('v\d+\.\d+\.\d+rc\d+$', travis_tag):
|
||||
if re.match(r'v\d+\.\d+\.\d+rc\d+$', travis_tag):
|
||||
return 'rc'
|
||||
elif re.match('v\d+\.\d+\.\d+$', travis_tag):
|
||||
elif re.match(r'v\d+\.\d+\.\d+$', travis_tag):
|
||||
return 'release'
|
||||
return 'qa'
|
||||
|
||||
@@ -29,7 +29,7 @@ def main():
|
||||
build_type = get_build_type(os.environ.get('TRAVIS_TAG', None))
|
||||
log.debug("setting build type=%s, build commit=%s", build_type, travis_commit)
|
||||
with open(build_type_path, 'w') as f:
|
||||
f.write("BUILD = \"{}\"\nBUILD_COMMIT = \"{}\"\n".format(build_type, travis_commit))
|
||||
f.write(f"BUILD = \"{build_type}\"\nBUILD_COMMIT = \"{travis_commit}\"\n")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -24,20 +24,20 @@ async def report_to_slack(output, webhook):
|
||||
|
||||
def confidence(times, z, plus_err=True):
|
||||
mean = sum(times) / len(times)
|
||||
standard_dev = (sum(((t - sum(times) / len(times)) ** 2.0 for t in times)) / len(times)) ** 0.5
|
||||
standard_dev = (sum((t - sum(times) / len(times)) ** 2.0 for t in times) / len(times)) ** 0.5
|
||||
err = (z * standard_dev) / (len(times) ** 0.5)
|
||||
return f"{round((mean + err) if plus_err else (mean - err), 3)}"
|
||||
|
||||
|
||||
def variance(times):
|
||||
mean = sum(times) / len(times)
|
||||
return round(sum(((i - mean) ** 2.0 for i in times)) / (len(times) - 1), 3)
|
||||
return round(sum((i - mean) ** 2.0 for i in times) / (len(times) - 1), 3)
|
||||
|
||||
|
||||
async def wait_for_done(conf, claim_name, timeout):
|
||||
blobs_completed, last_completed = 0, time.perf_counter()
|
||||
while True:
|
||||
file = (await daemon_rpc(conf, "file_list", claim_name=claim_name))[0]
|
||||
file = (await daemon_rpc(conf, "file_list", claim_name=claim_name))['items'][0]
|
||||
if file['status'] in ['finished', 'stopped']:
|
||||
return True, file['blobs_completed'], file['blobs_in_stream']
|
||||
elif blobs_completed < int(file['blobs_completed']):
|
||||
@@ -59,12 +59,26 @@ async def main(cmd_args=None):
|
||||
kwargs = {
|
||||
'page': page,
|
||||
'claim_type': 'stream',
|
||||
'any_tags': [
|
||||
'art',
|
||||
'automotive',
|
||||
'blockchain',
|
||||
'comedy',
|
||||
'economics',
|
||||
'education',
|
||||
'gaming',
|
||||
'music',
|
||||
'news',
|
||||
'science',
|
||||
'sports',
|
||||
'technology',
|
||||
],
|
||||
'order_by': ['trending_global', 'trending_mixed'],
|
||||
'no_totals': True
|
||||
}
|
||||
|
||||
# if not cmd_args.allow_fees:
|
||||
# kwargs['fee_amount'] = 0
|
||||
if not cmd_args.allow_fees:
|
||||
kwargs['fee_amount'] = 0
|
||||
|
||||
response = await daemon_rpc(
|
||||
conf, 'claim_search', **kwargs
|
||||
|
||||
@@ -6,7 +6,7 @@ SNAPSHOT_URL="${SNAPSHOT_URL:-}" #off by default. latest snapshot at https://lbr
|
||||
|
||||
if [[ -n "$SNAPSHOT_URL" ]] && [[ ! -f /database/claims.db ]]; then
|
||||
echo "Downloading wallet snapshot from $SNAPSHOT_URL"
|
||||
wget -O wallet_snapshot.tar.bz2 "$SNAPSHOT_URL"
|
||||
wget --no-verbose -O wallet_snapshot.tar.bz2 "$SNAPSHOT_URL"
|
||||
echo "Extracting snapshot..."
|
||||
tar xvjf wallet_snapshot.tar.bz2 --directory /database
|
||||
rm wallet_snapshot.tar.bz2
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@ setup(
|
||||
install_requires=[
|
||||
'torba',
|
||||
'aiohttp==3.5.4',
|
||||
'aioupnp==0.0.14',
|
||||
'aioupnp==0.0.15',
|
||||
'appdirs==1.4.3',
|
||||
'certifi>=2018.11.29',
|
||||
'colorama==0.3.7',
|
||||
@@ -35,7 +35,7 @@ setup(
|
||||
'cryptography==2.5',
|
||||
'protobuf==3.6.1',
|
||||
'msgpack==0.6.1',
|
||||
'ecdsa==0.13',
|
||||
'ecdsa==0.13.3',
|
||||
'pyyaml==4.2b1',
|
||||
'docopt==0.6.2',
|
||||
'hachoir',
|
||||
|
||||
@@ -23,7 +23,7 @@ def get_time_accelerator(loop: asyncio.AbstractEventLoop,
|
||||
async def accelerate_time(seconds: float) -> None:
|
||||
nonlocal _time
|
||||
if seconds < 0:
|
||||
raise ValueError('Cannot go back in time ({} seconds)'.format(seconds))
|
||||
raise ValueError(f'Cannot go back in time ({seconds} seconds)')
|
||||
_time += seconds
|
||||
await past_events()
|
||||
await asyncio.sleep(0)
|
||||
|
||||
@@ -7,61 +7,61 @@ from lbry.wallet.account import Account
|
||||
|
||||
|
||||
def extract(d, keys):
|
||||
return dict((k, d[k]) for k in keys)
|
||||
return {k: d[k] for k in keys}
|
||||
|
||||
|
||||
class AccountManagement(CommandTestCase):
|
||||
async def test_account_list_set_create_remove_add(self):
|
||||
# check initial account
|
||||
response = await self.daemon.jsonrpc_account_list()
|
||||
self.assertEqual(len(response['lbc_regtest']), 1)
|
||||
accounts = await self.daemon.jsonrpc_account_list()
|
||||
self.assertItemCount(accounts, 1)
|
||||
|
||||
# change account name and gap
|
||||
account_id = response['lbc_regtest'][0]['id']
|
||||
account_id = accounts['items'][0]['id']
|
||||
self.daemon.jsonrpc_account_set(
|
||||
account_id=account_id, new_name='test account',
|
||||
receiving_gap=95, receiving_max_uses=96,
|
||||
change_gap=97, change_max_uses=98
|
||||
)
|
||||
response = (await self.daemon.jsonrpc_account_list())['lbc_regtest'][0]
|
||||
self.assertEqual(response['name'], 'test account')
|
||||
accounts = (await self.daemon.jsonrpc_account_list())['items'][0]
|
||||
self.assertEqual(accounts['name'], 'test account')
|
||||
self.assertEqual(
|
||||
response['address_generator']['receiving'],
|
||||
accounts['address_generator']['receiving'],
|
||||
{'gap': 95, 'maximum_uses_per_address': 96}
|
||||
)
|
||||
self.assertEqual(
|
||||
response['address_generator']['change'],
|
||||
accounts['address_generator']['change'],
|
||||
{'gap': 97, 'maximum_uses_per_address': 98}
|
||||
)
|
||||
|
||||
# create another account
|
||||
await self.daemon.jsonrpc_account_create('second account')
|
||||
response = await self.daemon.jsonrpc_account_list()
|
||||
self.assertEqual(len(response['lbc_regtest']), 2)
|
||||
self.assertEqual(response['lbc_regtest'][1]['name'], 'second account')
|
||||
account_id2 = response['lbc_regtest'][1]['id']
|
||||
accounts = await self.daemon.jsonrpc_account_list()
|
||||
self.assertItemCount(accounts, 2)
|
||||
self.assertEqual(accounts['items'][1]['name'], 'second account')
|
||||
account_id2 = accounts['items'][1]['id']
|
||||
|
||||
# make new account the default
|
||||
self.daemon.jsonrpc_account_set(account_id=account_id2, default=True)
|
||||
response = await self.daemon.jsonrpc_account_list(show_seed=True)
|
||||
self.assertEqual(response['lbc_regtest'][0]['name'], 'second account')
|
||||
accounts = await self.daemon.jsonrpc_account_list(show_seed=True)
|
||||
self.assertEqual(accounts['items'][0]['name'], 'second account')
|
||||
|
||||
account_seed = response['lbc_regtest'][1]['seed']
|
||||
account_seed = accounts['items'][1]['seed']
|
||||
|
||||
# remove account
|
||||
self.daemon.jsonrpc_account_remove(response['lbc_regtest'][1]['id'])
|
||||
response = await self.daemon.jsonrpc_account_list()
|
||||
self.assertEqual(len(response['lbc_regtest']), 1)
|
||||
self.daemon.jsonrpc_account_remove(accounts['items'][1]['id'])
|
||||
accounts = await self.daemon.jsonrpc_account_list()
|
||||
self.assertItemCount(accounts, 1)
|
||||
|
||||
# add account
|
||||
await self.daemon.jsonrpc_account_add('recreated account', seed=account_seed)
|
||||
response = await self.daemon.jsonrpc_account_list()
|
||||
self.assertEqual(len(response['lbc_regtest']), 2)
|
||||
self.assertEqual(response['lbc_regtest'][1]['name'], 'recreated account')
|
||||
accounts = await self.daemon.jsonrpc_account_list()
|
||||
self.assertItemCount(accounts, 2)
|
||||
self.assertEqual(accounts['items'][1]['name'], 'recreated account')
|
||||
|
||||
# list specific account
|
||||
response = await self.daemon.jsonrpc_account_list(account_id, include_claims=True)
|
||||
self.assertEqual(response['name'], 'recreated account')
|
||||
accounts = await self.daemon.jsonrpc_account_list(account_id, include_claims=True)
|
||||
self.assertEqual(accounts['items'][0]['name'], 'recreated account')
|
||||
|
||||
async def test_wallet_migration(self):
|
||||
# null certificates should get deleted
|
||||
@@ -75,10 +75,10 @@ class AccountManagement(CommandTestCase):
|
||||
self.assertEqual(list(self.account.channel_keys.keys()), [keys[2]])
|
||||
|
||||
async def assertFindsClaims(self, claim_names, awaitable):
|
||||
self.assertEqual(claim_names, [txo.claim_name for txo in await awaitable])
|
||||
self.assertEqual(claim_names, [txo.claim_name for txo in (await awaitable)['items']])
|
||||
|
||||
async def assertOutputAmount(self, amounts, awaitable):
|
||||
self.assertEqual(amounts, [dewies_to_lbc(txo.amount) for txo in await awaitable])
|
||||
self.assertEqual(amounts, [dewies_to_lbc(txo.amount) for txo in (await awaitable)['items']])
|
||||
|
||||
async def test_commands_across_accounts(self):
|
||||
channel_list = self.daemon.jsonrpc_channel_list
|
||||
@@ -131,12 +131,13 @@ class AccountManagement(CommandTestCase):
|
||||
support2 = await self.support_create(
|
||||
self.get_claim_id(stream2), '0.01', account_id=second_account.id, funding_account_ids=[default_account.id]
|
||||
)
|
||||
self.assertEqual([support2['txid'], support1['txid']], [txo.tx_ref.id for txo in await support_list()])
|
||||
self.assertEqual([support1['txid']], [txo.tx_ref.id for txo in await support_list(account_id=default_account.id)])
|
||||
self.assertEqual([support2['txid']], [txo.tx_ref.id for txo in await support_list(account_id=second_account.id)])
|
||||
self.assertEqual([support2['txid'], support1['txid']], [txo.tx_ref.id for txo in (await support_list())['items']])
|
||||
self.assertEqual([support1['txid']], [txo.tx_ref.id for txo in (await support_list(account_id=default_account.id))['items']])
|
||||
self.assertEqual([support2['txid']], [txo.tx_ref.id for txo in (await support_list(account_id=second_account.id))['items']])
|
||||
|
||||
history = await self.daemon.jsonrpc_transaction_list()
|
||||
self.assertEqual(len(history), 8)
|
||||
self.assertItemCount(history, 8)
|
||||
history = history['items']
|
||||
self.assertEqual(extract(history[0]['support_info'][0], ['claim_name', 'is_tip', 'amount', 'balance_delta']), {
|
||||
'claim_name': 'stream-in-account2',
|
||||
'is_tip': False,
|
||||
|
||||
@@ -23,8 +23,8 @@ class EpicAdventuresOfChris45(CommandTestCase):
|
||||
|
||||
# Do we have it locally?
|
||||
channels = await self.out(self.daemon.jsonrpc_channel_list())
|
||||
self.assertEqual(len(channels), 1)
|
||||
self.assertEqual(channels[0]['name'], '@spam')
|
||||
self.assertItemCount(channels, 1)
|
||||
self.assertEqual(channels['items'][0]['name'], '@spam')
|
||||
|
||||
# As the new channel claim travels through the intertubes and makes its
|
||||
# way into the mempool and then a block and then into the claimtrie,
|
||||
|
||||
@@ -7,6 +7,7 @@ from urllib.request import urlopen
|
||||
|
||||
from torba.client.errors import InsufficientFundsError
|
||||
|
||||
from lbry.extras.daemon.Daemon import DEFAULT_PAGE_SIZE
|
||||
from lbry.testcase import CommandTestCase
|
||||
from lbry.wallet.transaction import Transaction
|
||||
|
||||
@@ -19,6 +20,12 @@ class ClaimTestCase(CommandTestCase):
|
||||
files_directory = os.path.join(os.path.dirname(__file__), 'files')
|
||||
video_file_url = 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4'
|
||||
video_file_name = os.path.join(files_directory, 'ForBiggerEscapes.mp4')
|
||||
image_data = unhexlify(
|
||||
b'89504e470d0a1a0a0000000d49484452000000050000000708020000004fc'
|
||||
b'510b9000000097048597300000b1300000b1301009a9c1800000015494441'
|
||||
b'5408d763fcffff3f031260624005d4e603004c45030b5286e9ea000000004'
|
||||
b'9454e44ae426082'
|
||||
)
|
||||
|
||||
def setUp(self):
|
||||
if not os.path.exists(self.video_file_name):
|
||||
@@ -29,38 +36,6 @@ class ClaimTestCase(CommandTestCase):
|
||||
open(self.video_file_name, 'wb') as video_file:
|
||||
video_file.write(response.read())
|
||||
|
||||
async def image_stream_create(self, name='blank-image', bid='1.0', confirm=True):
|
||||
with tempfile.NamedTemporaryFile(suffix='.png') as file:
|
||||
file.write(unhexlify(
|
||||
b'89504e470d0a1a0a0000000d49484452000000050000000708020000004fc'
|
||||
b'510b9000000097048597300000b1300000b1301009a9c1800000015494441'
|
||||
b'5408d763fcffff3f031260624005d4e603004c45030b5286e9ea000000004'
|
||||
b'9454e44ae426082'
|
||||
))
|
||||
file.flush()
|
||||
tx = await self.out(
|
||||
self.daemon.jsonrpc_stream_create(
|
||||
name, bid, file_path=file.name
|
||||
)
|
||||
)
|
||||
if confirm:
|
||||
await self.on_transaction_dict(tx)
|
||||
await self.generate(1)
|
||||
await self.on_transaction_dict(tx)
|
||||
return tx
|
||||
|
||||
async def video_stream_create(self, name='chrome', bid='1.0', confirm=True):
|
||||
tx = await self.out(
|
||||
self.daemon.jsonrpc_stream_create(
|
||||
name, bid, file_path=self.video_file_name
|
||||
)
|
||||
)
|
||||
if confirm:
|
||||
await self.on_transaction_dict(tx)
|
||||
await self.generate(1)
|
||||
await self.on_transaction_dict(tx)
|
||||
return tx
|
||||
|
||||
|
||||
class ClaimSearchCommand(ClaimTestCase):
|
||||
|
||||
@@ -73,15 +48,15 @@ class ClaimSearchCommand(ClaimTestCase):
|
||||
await self.confirm_tx(tx.id)
|
||||
# 4 claims per block, 3 blocks. Sorted by height (descending) then claim name (ascending).
|
||||
self.streams = []
|
||||
for j in range(3):
|
||||
for j in range(4):
|
||||
same_height_claims = []
|
||||
for k in range(3):
|
||||
for k in range(5):
|
||||
claim_tx = await self.stream_create(
|
||||
f'c{j}-{k}', '0.000001', channel_id=self.channel_id, confirm=False)
|
||||
same_height_claims.append(claim_tx['outputs'][0]['name'])
|
||||
await self.on_transaction_dict(claim_tx)
|
||||
claim_tx = await self.stream_create(
|
||||
f'c{j}-4', '0.000001', channel_id=self.channel_id, confirm=True)
|
||||
f'c{j}-6', '0.000001', channel_id=self.channel_id, confirm=True)
|
||||
same_height_claims.append(claim_tx['outputs'][0]['name'])
|
||||
self.streams = same_height_claims + self.streams
|
||||
|
||||
@@ -166,29 +141,42 @@ class ClaimSearchCommand(ClaimTestCase):
|
||||
await self.create_channel()
|
||||
await self.create_lots_of_streams()
|
||||
|
||||
page = await self.claim_search(page_size=20, channel='@abc', order_by=['height', '^name'])
|
||||
# with and without totals
|
||||
results = await self.daemon.jsonrpc_claim_search()
|
||||
self.assertEqual(results['total_pages'], 2)
|
||||
self.assertEqual(results['total_items'], 25)
|
||||
results = await self.daemon.jsonrpc_claim_search(no_totals=True)
|
||||
self.assertNotIn('total_pages', results)
|
||||
self.assertNotIn('total_items', results)
|
||||
|
||||
# defaults
|
||||
page = await self.claim_search(channel='@abc', order_by=['height', '^name'])
|
||||
page_claim_ids = [item['name'] for item in page]
|
||||
self.assertEqual(page_claim_ids, self.streams[:DEFAULT_PAGE_SIZE])
|
||||
|
||||
# page with default page_size
|
||||
page = await self.claim_search(page=2, channel='@abc', order_by=['height', '^name'])
|
||||
page_claim_ids = [item['name'] for item in page]
|
||||
self.assertEqual(page_claim_ids, self.streams[DEFAULT_PAGE_SIZE:(DEFAULT_PAGE_SIZE*2)])
|
||||
|
||||
# page_size larger than dataset
|
||||
page = await self.claim_search(page_size=50, channel='@abc', order_by=['height', '^name'])
|
||||
page_claim_ids = [item['name'] for item in page]
|
||||
self.assertEqual(page_claim_ids, self.streams)
|
||||
|
||||
# page_size less than dataset
|
||||
page = await self.claim_search(page_size=6, channel='@abc', order_by=['height', '^name'])
|
||||
page_claim_ids = [item['name'] for item in page]
|
||||
self.assertEqual(page_claim_ids, self.streams[:6])
|
||||
|
||||
# page and page_size
|
||||
page = await self.claim_search(page=2, page_size=6, channel='@abc', order_by=['height', '^name'])
|
||||
page_claim_ids = [item['name'] for item in page]
|
||||
self.assertEqual(page_claim_ids, self.streams[6:])
|
||||
self.assertEqual(page_claim_ids, self.streams[6:12])
|
||||
|
||||
out_of_bounds = await self.claim_search(page=2, page_size=20, channel='@abc')
|
||||
out_of_bounds = await self.claim_search(page=4, page_size=20, channel='@abc')
|
||||
self.assertEqual(out_of_bounds, [])
|
||||
|
||||
results = await self.daemon.jsonrpc_claim_search()
|
||||
self.assertEqual(results['total_pages'], 2)
|
||||
self.assertEqual(results['total_items'], 13)
|
||||
|
||||
results = await self.daemon.jsonrpc_claim_search(no_totals=True)
|
||||
self.assertNotIn('total_pages', results)
|
||||
self.assertNotIn('total_items', results)
|
||||
|
||||
async def test_tag_search(self):
|
||||
claim1 = await self.stream_create('claim1', tags=['aBc'])
|
||||
claim2 = await self.stream_create('claim2', tags=['#abc', 'def'])
|
||||
@@ -319,8 +307,8 @@ class ClaimSearchCommand(ClaimTestCase):
|
||||
await self.confirm_tx(tx.id)
|
||||
|
||||
octet = await self.stream_create()
|
||||
video = await self.video_stream_create()
|
||||
image = await self.image_stream_create()
|
||||
video = await self.stream_create('chrome', file_path=self.video_file_name)
|
||||
image = await self.stream_create('blank-image', data=self.image_data, suffix='.png')
|
||||
channel = await self.channel_create()
|
||||
unknown = self.sout(tx)
|
||||
|
||||
@@ -346,7 +334,7 @@ class ChannelCommands(CommandTestCase):
|
||||
async def test_create_channel_names(self):
|
||||
# claim new name
|
||||
await self.channel_create('@foo')
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_channel_list()), 1)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_channel_list(), 1)
|
||||
await self.assertBalance(self.account, '8.991893')
|
||||
|
||||
# fail to claim duplicate
|
||||
@@ -358,19 +346,19 @@ class ChannelCommands(CommandTestCase):
|
||||
await self.channel_create('foo')
|
||||
|
||||
# nothing's changed after failed attempts
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_channel_list()), 1)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_channel_list(), 1)
|
||||
await self.assertBalance(self.account, '8.991893')
|
||||
|
||||
# succeed overriding duplicate restriction
|
||||
await self.channel_create('@foo', allow_duplicate_name=True)
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_channel_list()), 2)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_channel_list(), 2)
|
||||
await self.assertBalance(self.account, '7.983786')
|
||||
|
||||
async def test_channel_bids(self):
|
||||
# enough funds
|
||||
tx = await self.channel_create('@foo', '5.0')
|
||||
claim_id = self.get_claim_id(tx)
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_channel_list()), 1)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_channel_list(), 1)
|
||||
await self.assertBalance(self.account, '4.991893')
|
||||
|
||||
# bid preserved on update
|
||||
@@ -387,14 +375,14 @@ class ChannelCommands(CommandTestCase):
|
||||
with self.assertRaisesRegex(
|
||||
InsufficientFundsError, "Not enough funds to cover this transaction."):
|
||||
await self.channel_create('@foo2', '9.0')
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_channel_list()), 1)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_channel_list(), 1)
|
||||
await self.assertBalance(self.account, '5.991447')
|
||||
|
||||
# spend exactly amount available, no change
|
||||
tx = await self.channel_create('@foo3', '5.981266')
|
||||
await self.assertBalance(self.account, '0.0')
|
||||
self.assertEqual(len(tx['outputs']), 1) # no change
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_channel_list()), 2)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_channel_list(), 2)
|
||||
|
||||
async def test_setting_channel_fields(self):
|
||||
values = {
|
||||
@@ -471,16 +459,16 @@ class ChannelCommands(CommandTestCase):
|
||||
account2_id, account2 = new_account['id'], self.wallet.get_account_or_error(new_account['id'])
|
||||
|
||||
# before moving
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_channel_list()), 3)
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_channel_list(account_id=account2_id)), 0)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_channel_list(), 3)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_channel_list(account_id=account2_id), 0)
|
||||
|
||||
other_address = await account2.receiving.get_or_create_usable_address()
|
||||
tx = await self.out(self.channel_update(claim_id, claim_address=other_address))
|
||||
|
||||
# after moving
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_channel_list()), 3)
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_channel_list(account_id=self.account.id)), 2)
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_channel_list(account_id=account2_id)), 1)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_channel_list(), 3)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_channel_list(account_id=self.account.id), 2)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_channel_list(account_id=account2_id), 1)
|
||||
|
||||
async def test_channel_export_import_before_sending_channel(self):
|
||||
# export
|
||||
@@ -491,9 +479,9 @@ class ChannelCommands(CommandTestCase):
|
||||
|
||||
# import
|
||||
daemon2 = await self.add_daemon()
|
||||
self.assertEqual(0, len(await daemon2.jsonrpc_channel_list()))
|
||||
self.assertItemCount(await daemon2.jsonrpc_channel_list(), 0)
|
||||
await daemon2.jsonrpc_channel_import(exported_data)
|
||||
channels = await daemon2.jsonrpc_channel_list()
|
||||
channels = (await daemon2.jsonrpc_channel_list())['items']
|
||||
self.assertEqual(1, len(channels))
|
||||
self.assertEqual(channel_private_key.to_string(), channels[0].private_key.to_string())
|
||||
|
||||
@@ -515,21 +503,35 @@ class ChannelCommands(CommandTestCase):
|
||||
await self.channel_update(self.get_claim_id(channel), bid='2.0', account_id=self.account.id)
|
||||
# channel is in account2
|
||||
await self.channel_update(self.get_claim_id(channel), bid='2.0', account_id=account2.id)
|
||||
result = await self.out(self.daemon.jsonrpc_channel_list())
|
||||
result = (await self.out(self.daemon.jsonrpc_channel_list()))['items']
|
||||
self.assertEqual(result[0]['amount'], '2.0')
|
||||
# check all accounts for channel
|
||||
await self.channel_update(self.get_claim_id(channel), bid='3.0')
|
||||
result = await self.out(self.daemon.jsonrpc_channel_list())
|
||||
result = (await self.out(self.daemon.jsonrpc_channel_list()))['items']
|
||||
self.assertEqual(result[0]['amount'], '3.0')
|
||||
await self.channel_abandon(self.get_claim_id(channel))
|
||||
|
||||
async def test_tag_normalization(self):
|
||||
tx1 = await self.channel_create('@abc', '1.0', tags=['aBc', ' ABC ', 'xYZ ', 'xyz'])
|
||||
claim_id = self.get_claim_id(tx1)
|
||||
self.assertCountEqual(tx1['outputs'][0]['value']['tags'], ['abc', 'xyz'])
|
||||
|
||||
tx2 = await self.channel_update(claim_id, tags=[' pqr', 'PQr '])
|
||||
self.assertCountEqual(tx2['outputs'][0]['value']['tags'], ['abc', 'xyz', 'pqr'])
|
||||
|
||||
tx3 = await self.channel_update(claim_id, tags=' pqr')
|
||||
self.assertCountEqual(tx3['outputs'][0]['value']['tags'], ['abc', 'xyz', 'pqr'])
|
||||
|
||||
tx4 = await self.channel_update(claim_id, tags=[' pqr', 'PQr '], clear_tags=True)
|
||||
self.assertEqual(tx4['outputs'][0]['value']['tags'], ['pqr'])
|
||||
|
||||
|
||||
class StreamCommands(ClaimTestCase):
|
||||
|
||||
async def test_create_stream_names(self):
|
||||
# claim new name
|
||||
await self.stream_create('foo')
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_claim_list()), 1)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_claim_list(), 1)
|
||||
await self.assertBalance(self.account, '8.993893')
|
||||
|
||||
# fail to claim duplicate
|
||||
@@ -542,19 +544,19 @@ class StreamCommands(ClaimTestCase):
|
||||
Exception, "Stream names cannot start with '@' symbol."):
|
||||
await self.stream_create('@foo')
|
||||
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_claim_list()), 1)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_claim_list(), 1)
|
||||
await self.assertBalance(self.account, '8.993893')
|
||||
|
||||
# succeed overriding duplicate restriction
|
||||
await self.stream_create('foo', allow_duplicate_name=True)
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_claim_list()), 2)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_claim_list(), 2)
|
||||
await self.assertBalance(self.account, '7.987786')
|
||||
|
||||
async def test_stream_bids(self):
|
||||
# enough funds
|
||||
tx = await self.stream_create('foo', '2.0')
|
||||
claim_id = self.get_claim_id(tx)
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_claim_list()), 1)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_claim_list(), 1)
|
||||
await self.assertBalance(self.account, '7.993893')
|
||||
|
||||
# bid preserved on update
|
||||
@@ -571,14 +573,14 @@ class StreamCommands(ClaimTestCase):
|
||||
with self.assertRaisesRegex(
|
||||
InsufficientFundsError, "Not enough funds to cover this transaction."):
|
||||
await self.stream_create('foo2', '9.0')
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_claim_list()), 1)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_claim_list(), 1)
|
||||
await self.assertBalance(self.account, '6.993319')
|
||||
|
||||
# spend exactly amount available, no change
|
||||
tx = await self.stream_create('foo3', '6.98523')
|
||||
await self.assertBalance(self.account, '0.0')
|
||||
self.assertEqual(len(tx['outputs']), 1) # no change
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_claim_list()), 2)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_claim_list(), 2)
|
||||
|
||||
async def test_stream_update_and_abandon_across_accounts(self):
|
||||
account2 = await self.daemon.jsonrpc_account_create('second account')
|
||||
@@ -588,11 +590,11 @@ class StreamCommands(ClaimTestCase):
|
||||
await self.stream_update(self.get_claim_id(stream), bid='2.0', account_id=self.account.id)
|
||||
# stream is in account2
|
||||
await self.stream_update(self.get_claim_id(stream), bid='2.0', account_id=account2.id)
|
||||
result = await self.out(self.daemon.jsonrpc_stream_list())
|
||||
result = (await self.out(self.daemon.jsonrpc_stream_list()))['items']
|
||||
self.assertEqual(result[0]['amount'], '2.0')
|
||||
# check all accounts for stream
|
||||
await self.stream_update(self.get_claim_id(stream), bid='3.0')
|
||||
result = await self.out(self.daemon.jsonrpc_stream_list())
|
||||
result = (await self.out(self.daemon.jsonrpc_stream_list()))['items']
|
||||
self.assertEqual(result[0]['amount'], '3.0')
|
||||
await self.stream_abandon(self.get_claim_id(stream))
|
||||
|
||||
@@ -616,18 +618,18 @@ class StreamCommands(ClaimTestCase):
|
||||
baz_id = self.get_claim_id(baz_tx)
|
||||
|
||||
channels = await self.out(self.daemon.jsonrpc_channel_list(account1_id))
|
||||
self.assertEqual(len(channels), 1)
|
||||
self.assertEqual(channels[0]['name'], '@spam')
|
||||
self.assertItemCount(channels, 1)
|
||||
self.assertEqual(channels['items'][0]['name'], '@spam')
|
||||
self.assertEqual(channels, await self.out(self.daemon.jsonrpc_channel_list(account1_id)))
|
||||
|
||||
channels = await self.out(self.daemon.jsonrpc_channel_list(account2_id))
|
||||
self.assertEqual(len(channels), 1)
|
||||
self.assertEqual(channels[0]['name'], '@baz')
|
||||
self.assertItemCount(channels, 1)
|
||||
self.assertEqual(channels['items'][0]['name'], '@baz')
|
||||
|
||||
channels = await self.out(self.daemon.jsonrpc_channel_list())
|
||||
self.assertEqual(len(channels), 2)
|
||||
self.assertEqual(channels[0]['name'], '@baz')
|
||||
self.assertEqual(channels[1]['name'], '@spam')
|
||||
self.assertItemCount(channels, 2)
|
||||
self.assertEqual(channels['items'][0]['name'], '@baz')
|
||||
self.assertEqual(channels['items'][1]['name'], '@spam')
|
||||
|
||||
# defaults to using all accounts to lookup channel
|
||||
await self.stream_create('hovercraft1', '0.1', channel_id=baz_id)
|
||||
@@ -670,14 +672,14 @@ class StreamCommands(ClaimTestCase):
|
||||
tx = await self.out(self.stream_create(title='created'))
|
||||
txo = tx['outputs'][0]
|
||||
claim_id, expected = txo['claim_id'], txo['value']
|
||||
files = self.sout(self.daemon.jsonrpc_file_list())
|
||||
files = await self.file_list()
|
||||
self.assertEqual(1, len(files))
|
||||
self.assertEqual(tx['txid'], files[0]['txid'])
|
||||
self.assertEqual(expected, files[0]['metadata'])
|
||||
|
||||
# update with metadata-only changes
|
||||
tx = await self.out(self.stream_update(claim_id, title='update 1'))
|
||||
files = self.sout(self.daemon.jsonrpc_file_list())
|
||||
files = await self.file_list()
|
||||
expected['title'] = 'update 1'
|
||||
self.assertEqual(1, len(files))
|
||||
self.assertEqual(tx['txid'], files[0]['txid'])
|
||||
@@ -686,7 +688,7 @@ class StreamCommands(ClaimTestCase):
|
||||
# update with new data
|
||||
tx = await self.out(self.stream_update(claim_id, title='update 2', data=b'updated data'))
|
||||
expected = tx['outputs'][0]['value']
|
||||
files = self.sout(self.daemon.jsonrpc_file_list())
|
||||
files = await self.file_list()
|
||||
self.assertEqual(1, len(files))
|
||||
self.assertEqual(tx['txid'], files[0]['txid'])
|
||||
self.assertEqual(expected, files[0]['metadata'])
|
||||
@@ -819,17 +821,17 @@ class StreamCommands(ClaimTestCase):
|
||||
account2_id, account2 = new_account['id'], self.wallet.get_account_or_error(new_account['id'])
|
||||
|
||||
# before sending
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_claim_list()), 4)
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_claim_list(account_id=self.account.id)), 4)
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_claim_list(account_id=account2_id)), 0)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_claim_list(), 4)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_claim_list(account_id=self.account.id), 4)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_claim_list(account_id=account2_id), 0)
|
||||
|
||||
other_address = await account2.receiving.get_or_create_usable_address()
|
||||
tx = await self.out(self.stream_update(claim_id, claim_address=other_address))
|
||||
|
||||
# after sending
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_claim_list()), 4)
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_claim_list(account_id=self.account.id)), 3)
|
||||
self.assertEqual(len(await self.daemon.jsonrpc_claim_list(account_id=account2_id)), 1)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_claim_list(), 4)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_claim_list(account_id=self.account.id), 3)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_claim_list(account_id=account2_id), 1)
|
||||
|
||||
async def test_setting_fee_fields(self):
|
||||
tx = await self.out(self.stream_create('paid-stream'))
|
||||
@@ -912,7 +914,7 @@ class StreamCommands(ClaimTestCase):
|
||||
await self.stream_update(claim_id, fee_address=fee_address, replace=True)
|
||||
|
||||
async def test_automatic_type_and_metadata_detection_for_image(self):
|
||||
txo = (await self.image_stream_create())['outputs'][0]
|
||||
txo = (await self.stream_create('blank-image', data=self.image_data, suffix='.png'))['outputs'][0]
|
||||
self.assertEqual(
|
||||
txo['value'], {
|
||||
'source': {
|
||||
@@ -931,7 +933,7 @@ class StreamCommands(ClaimTestCase):
|
||||
)
|
||||
|
||||
async def test_automatic_type_and_metadata_detection_for_video(self):
|
||||
txo = (await self.video_stream_create())['outputs'][0]
|
||||
txo = (await self.stream_create('chrome', file_path=self.video_file_name))['outputs'][0]
|
||||
self.assertEqual(
|
||||
txo['value'], {
|
||||
'source': {
|
||||
@@ -975,6 +977,31 @@ class StreamCommands(ClaimTestCase):
|
||||
}
|
||||
)
|
||||
|
||||
async def test_update_file_type(self):
|
||||
video_txo = (await self.stream_create('chrome', file_path=self.video_file_name))['outputs'][0]
|
||||
self.assertSetEqual(set(video_txo['value']), {'source', 'stream_type', 'video'})
|
||||
self.assertEqual(video_txo['value']['stream_type'], 'video')
|
||||
self.assertEqual(video_txo['value']['source']['media_type'], 'video/mp4')
|
||||
self.assertEqual(
|
||||
video_txo['value']['video'], {
|
||||
'duration': 15,
|
||||
'height': 720,
|
||||
'width': 1280
|
||||
}
|
||||
)
|
||||
claim_id = video_txo['claim_id']
|
||||
|
||||
binary_txo = (await self.stream_update(claim_id, data=b'hi!'))['outputs'][0]
|
||||
self.assertEqual(binary_txo['value']['stream_type'], 'binary')
|
||||
self.assertEqual(binary_txo['value']['source']['media_type'], 'application/octet-stream')
|
||||
self.assertSetEqual(set(binary_txo['value']), {'source', 'stream_type'})
|
||||
|
||||
image_txo = (await self.stream_update(claim_id, data=self.image_data, suffix='.png'))['outputs'][0]
|
||||
self.assertSetEqual(set(image_txo['value']), {'source', 'stream_type', 'image'})
|
||||
self.assertEqual(image_txo['value']['stream_type'], 'image')
|
||||
self.assertEqual(image_txo['value']['source']['media_type'], 'image/png')
|
||||
self.assertEqual(image_txo['value']['image'], {'height': 7, 'width': 5})
|
||||
|
||||
async def test_replace_mode_preserves_source_and_type(self):
|
||||
expected = {
|
||||
'tags': ['blah'],
|
||||
@@ -1020,7 +1047,7 @@ class StreamCommands(ClaimTestCase):
|
||||
|
||||
tx = await self.stream_create(bid='2.5') # creates new claim
|
||||
claim_id = self.get_claim_id(tx)
|
||||
txs = await self.out(self.daemon.jsonrpc_transaction_list())
|
||||
txs = (await self.out(self.daemon.jsonrpc_transaction_list()))['items']
|
||||
self.assertEqual(len(txs[0]['claim_info']), 1)
|
||||
self.assertEqual(txs[0]['confirmations'], 1)
|
||||
self.assertEqual(txs[0]['claim_info'][0]['balance_delta'], '-2.5')
|
||||
@@ -1028,13 +1055,13 @@ class StreamCommands(ClaimTestCase):
|
||||
self.assertEqual(txs[0]['value'], '0.0')
|
||||
self.assertEqual(txs[0]['fee'], '-0.020107')
|
||||
await self.assertBalance(self.account, '7.479893')
|
||||
self.assertEqual(1, len(self.daemon.jsonrpc_file_list()))
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
|
||||
|
||||
await self.daemon.jsonrpc_file_delete(delete_all=True)
|
||||
self.assertEqual(0, len(self.daemon.jsonrpc_file_list()))
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 0)
|
||||
|
||||
await self.stream_update(claim_id, bid='1.0') # updates previous claim
|
||||
txs = await self.out(self.daemon.jsonrpc_transaction_list())
|
||||
txs = (await self.out(self.daemon.jsonrpc_transaction_list()))['items']
|
||||
self.assertEqual(len(txs[0]['update_info']), 1)
|
||||
self.assertEqual(txs[0]['update_info'][0]['balance_delta'], '1.5')
|
||||
self.assertEqual(txs[0]['update_info'][0]['claim_id'], claim_id)
|
||||
@@ -1043,7 +1070,7 @@ class StreamCommands(ClaimTestCase):
|
||||
await self.assertBalance(self.account, '8.9796765')
|
||||
|
||||
await self.stream_abandon(claim_id)
|
||||
txs = await self.out(self.daemon.jsonrpc_transaction_list())
|
||||
txs = (await self.out(self.daemon.jsonrpc_transaction_list()))['items']
|
||||
self.assertEqual(len(txs[0]['abandon_info']), 1)
|
||||
self.assertEqual(txs[0]['abandon_info'][0]['balance_delta'], '1.0')
|
||||
self.assertEqual(txs[0]['abandon_info'][0]['claim_id'], claim_id)
|
||||
@@ -1073,12 +1100,12 @@ class StreamCommands(ClaimTestCase):
|
||||
file.flush()
|
||||
tx1 = await self.publish('foo', bid='1.0', file_path=file.name)
|
||||
|
||||
self.assertEqual(1, len(self.daemon.jsonrpc_file_list()))
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
|
||||
|
||||
# doesn't error on missing arguments when doing an update stream
|
||||
tx2 = await self.publish('foo', tags='updated')
|
||||
|
||||
self.assertEqual(1, len(self.daemon.jsonrpc_file_list()))
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
|
||||
self.assertEqual(self.get_claim_id(tx1), self.get_claim_id(tx2))
|
||||
|
||||
# update conflict with two claims of the same name
|
||||
@@ -1086,14 +1113,14 @@ class StreamCommands(ClaimTestCase):
|
||||
with self.assertRaisesRegex(Exception, "There are 2 claims for 'foo'"):
|
||||
await self.daemon.jsonrpc_publish('foo')
|
||||
|
||||
self.assertEqual(2, len(self.daemon.jsonrpc_file_list()))
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 2)
|
||||
# abandon duplicate stream
|
||||
await self.stream_abandon(self.get_claim_id(tx3))
|
||||
|
||||
# publish to a channel
|
||||
await self.channel_create('@abc')
|
||||
tx3 = await self.publish('foo', channel_name='@abc')
|
||||
self.assertEqual(2, len(self.daemon.jsonrpc_file_list()))
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 2)
|
||||
r = await self.resolve('lbry://@abc/foo')
|
||||
self.assertEqual(
|
||||
r['lbry://@abc/foo']['claim_id'],
|
||||
@@ -1101,13 +1128,14 @@ class StreamCommands(ClaimTestCase):
|
||||
)
|
||||
|
||||
# publishing again clears channel
|
||||
tx4 = await self.publish('foo', languages='uk-UA')
|
||||
self.assertEqual(2, len(self.daemon.jsonrpc_file_list()))
|
||||
tx4 = await self.publish('foo', languages='uk-UA', tags=['Anime', 'anime '])
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 2)
|
||||
r = await self.resolve('lbry://foo')
|
||||
claim = r['lbry://foo']
|
||||
self.assertEqual(claim['txid'], tx4['outputs'][0]['txid'])
|
||||
self.assertNotIn('signing_channel', claim)
|
||||
self.assertEqual(claim['value']['languages'], ['uk-UA'])
|
||||
self.assertEqual(claim['value']['tags'], ['anime'])
|
||||
|
||||
|
||||
class SupportCommands(CommandTestCase):
|
||||
@@ -1145,22 +1173,22 @@ class SupportCommands(CommandTestCase):
|
||||
await self.assertBalance(account2, '3.9998585')
|
||||
|
||||
# verify that the incoming tip is marked correctly as is_tip=True in account1
|
||||
txs = await self.out(self.daemon.jsonrpc_transaction_list(self.account.id))
|
||||
txs = (await self.out(self.daemon.jsonrpc_transaction_list(self.account.id)))['items']
|
||||
self.assertEqual(len(txs[0]['support_info']), 1)
|
||||
self.assertEqual(txs[0]['support_info'][0]['balance_delta'], '1.0')
|
||||
self.assertEqual(txs[0]['support_info'][0]['claim_id'], claim_id)
|
||||
self.assertEqual(txs[0]['support_info'][0]['is_tip'], True)
|
||||
self.assertTrue(txs[0]['support_info'][0]['is_tip'])
|
||||
self.assertEqual(txs[0]['value'], '1.0')
|
||||
self.assertEqual(txs[0]['fee'], '0.0')
|
||||
|
||||
# verify that the outgoing tip is marked correctly as is_tip=True in account2
|
||||
txs2 = await self.out(
|
||||
txs2 = (await self.out(
|
||||
self.daemon.jsonrpc_transaction_list(wallet_id='wallet2', account_id=account2.id)
|
||||
)
|
||||
))['items']
|
||||
self.assertEqual(len(txs2[0]['support_info']), 1)
|
||||
self.assertEqual(txs2[0]['support_info'][0]['balance_delta'], '-1.0')
|
||||
self.assertEqual(txs2[0]['support_info'][0]['claim_id'], claim_id)
|
||||
self.assertEqual(txs2[0]['support_info'][0]['is_tip'], True)
|
||||
self.assertTrue(txs2[0]['support_info'][0]['is_tip'])
|
||||
self.assertEqual(txs2[0]['value'], '-1.0')
|
||||
self.assertEqual(txs2[0]['fee'], '-0.0001415')
|
||||
|
||||
@@ -1176,10 +1204,18 @@ class SupportCommands(CommandTestCase):
|
||||
await self.assertBalance(account2, '1.999717')
|
||||
|
||||
# verify that the outgoing support is marked correctly as is_tip=False in account2
|
||||
txs2 = await self.out(self.daemon.jsonrpc_transaction_list(wallet_id='wallet2'))
|
||||
txs2 = (await self.out(self.daemon.jsonrpc_transaction_list(wallet_id='wallet2')))['items']
|
||||
self.assertEqual(len(txs2[0]['support_info']), 1)
|
||||
self.assertEqual(txs2[0]['support_info'][0]['balance_delta'], '-2.0')
|
||||
self.assertEqual(txs2[0]['support_info'][0]['claim_id'], claim_id)
|
||||
self.assertEqual(txs2[0]['support_info'][0]['is_tip'], False)
|
||||
self.assertFalse(txs2[0]['support_info'][0]['is_tip'])
|
||||
self.assertEqual(txs2[0]['value'], '0.0')
|
||||
self.assertEqual(txs2[0]['fee'], '-0.0001415')
|
||||
|
||||
async def test_signed_supports(self):
|
||||
channel_id = self.get_claim_id(await self.channel_create())
|
||||
stream_id = self.get_claim_id(await self.stream_create())
|
||||
await self.support_create(stream_id, '0.3', channel_id=channel_id)
|
||||
supports = await self.daemon.jsonrpc_support_list()
|
||||
self.assertEqual(1, len(supports['items']))
|
||||
self.assertEqual(supports['items'][0].script.values['support'], b'beef')
|
||||
@@ -1,6 +1,4 @@
|
||||
import contextlib
|
||||
import asyncio
|
||||
import logging
|
||||
from io import StringIO
|
||||
from torba.testcase import AsyncioTestCase
|
||||
|
||||
@@ -29,37 +27,11 @@ class CLIIntegrationTest(AsyncioTestCase):
|
||||
Daemon.component_attributes = {}
|
||||
self.daemon = Daemon(conf)
|
||||
await self.daemon.start()
|
||||
|
||||
async def asyncTearDown(self):
|
||||
await self.daemon.stop(shutdown_runner=False)
|
||||
self.addCleanup(self.daemon.stop)
|
||||
|
||||
def test_cli_status_command_with_auth(self):
|
||||
actual_output = StringIO()
|
||||
with contextlib.redirect_stdout(actual_output):
|
||||
cli.main(["--api", "localhost:5299", "status"])
|
||||
actual_output = actual_output.getvalue()
|
||||
self.assertIn("connection_status", actual_output)
|
||||
|
||||
def test_setup_logging(self):
|
||||
def setup(argv):
|
||||
parser = cli.get_argument_parser()
|
||||
args, command_args = parser.parse_known_args(argv)
|
||||
loop = asyncio.get_event_loop()
|
||||
conf = Config.create_from_arguments(args)
|
||||
cli.setup_logging(args, conf, loop)
|
||||
|
||||
setup(["start"])
|
||||
self.assertTrue(logging.getLogger("lbry").isEnabledFor(logging.INFO))
|
||||
self.assertFalse(logging.getLogger("lbry").isEnabledFor(logging.DEBUG))
|
||||
|
||||
setup(["start", "--verbose"])
|
||||
self.assertTrue(logging.getLogger("lbry").isEnabledFor(logging.DEBUG))
|
||||
self.assertTrue(logging.getLogger("lbry").isEnabledFor(logging.INFO))
|
||||
self.assertFalse(logging.getLogger("torba").isEnabledFor(logging.DEBUG))
|
||||
|
||||
setup(["start", "--verbose", "lbry.extras", "lbry.wallet", "torba.client"])
|
||||
self.assertTrue(logging.getLogger("lbry.extras").isEnabledFor(logging.DEBUG))
|
||||
self.assertTrue(logging.getLogger("lbry.wallet").isEnabledFor(logging.DEBUG))
|
||||
self.assertTrue(logging.getLogger("torba.client").isEnabledFor(logging.DEBUG))
|
||||
self.assertFalse(logging.getLogger("lbry").isEnabledFor(logging.DEBUG))
|
||||
self.assertFalse(logging.getLogger("torba").isEnabledFor(logging.DEBUG))
|
||||
self.assertIn("connection_status", actual_output)
|
||||
@@ -323,7 +323,7 @@ class CommentCommands(CommandTestCase):
|
||||
self.assertIn('has_hidden_comments', comments)
|
||||
self.assertTrue(comments['has_hidden_comments'])
|
||||
hidden_cmts1 = list(filter(lambda c: c['is_hidden'], comments['items']))
|
||||
self.assertTrue(len(hidden_cmts1) == 1)
|
||||
self.assertEqual(len(hidden_cmts1), 1)
|
||||
hidden_comment = hidden_cmts1[0]
|
||||
self.assertEqual(hidden_comment['comment_id'], hidden[0])
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import asyncio
|
||||
import logging
|
||||
import os
|
||||
from binascii import hexlify
|
||||
|
||||
@@ -9,29 +8,33 @@ from lbry.blob_exchange.downloader import BlobDownloader
|
||||
|
||||
class FileCommands(CommandTestCase):
|
||||
|
||||
VERBOSITY = logging.WARN
|
||||
async def create_streams_in_range(self, *args, **kwargs):
|
||||
self.stream_claim_ids = []
|
||||
for i in range(*args, **kwargs):
|
||||
t = await self.stream_create(f'Stream_{i}', '0.00001')
|
||||
self.stream_claim_ids.append(t['outputs'][0]['claim_id'])
|
||||
|
||||
async def test_file_management(self):
|
||||
await self.stream_create('foo', '0.01')
|
||||
await self.stream_create('foo2', '0.01')
|
||||
|
||||
file1, file2 = self.sout(self.daemon.jsonrpc_file_list('claim_name'))
|
||||
file1, file2 = await self.file_list('claim_name')
|
||||
self.assertEqual(file1['claim_name'], 'foo')
|
||||
self.assertEqual(file2['claim_name'], 'foo2')
|
||||
|
||||
await self.daemon.jsonrpc_file_delete(claim_name='foo')
|
||||
self.assertEqual(len(self.daemon.jsonrpc_file_list()), 1)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
|
||||
await self.daemon.jsonrpc_file_delete(claim_name='foo2')
|
||||
self.assertEqual(len(self.daemon.jsonrpc_file_list()), 0)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 0)
|
||||
|
||||
await self.daemon.jsonrpc_get('lbry://foo')
|
||||
self.assertEqual(len(self.daemon.jsonrpc_file_list()), 1)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
|
||||
|
||||
async def test_announces(self):
|
||||
# announces on publish
|
||||
self.assertEqual(await self.daemon.storage.get_blobs_to_announce(), [])
|
||||
await self.stream_create('foo', '0.01')
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())["items"][0]
|
||||
self.assertSetEqual(
|
||||
set(await self.daemon.storage.get_blobs_to_announce()),
|
||||
{stream.sd_hash, stream.descriptor.blobs[0].blob_hash}
|
||||
@@ -45,16 +48,89 @@ class FileCommands(CommandTestCase):
|
||||
{stream.sd_hash, stream.descriptor.blobs[0].blob_hash}
|
||||
)
|
||||
|
||||
async def _purge_file(self, claim_name, full_path):
|
||||
self.assertTrue(
|
||||
await self.daemon.jsonrpc_file_delete(claim_name=claim_name, delete_from_download_dir=True)
|
||||
)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 0)
|
||||
self.assertFalse(os.path.isfile(full_path))
|
||||
|
||||
async def test_publish_with_illegal_chars(self):
|
||||
def check_prefix_suffix(name, prefix, suffix):
|
||||
self.assertTrue(name.startswith(prefix))
|
||||
self.assertTrue(name.endswith(suffix))
|
||||
|
||||
# Stream a file with file name containing invalid chars
|
||||
claim_name = 'lolwindows'
|
||||
prefix, suffix = 'derp?', '.ext.'
|
||||
san_prefix, san_suffix = 'derp', '.ext'
|
||||
tx = await self.stream_create(claim_name, '0.01', prefix=prefix, suffix=suffix)
|
||||
stream = (await self.daemon.jsonrpc_file_list())["items"][0]
|
||||
claim_id = self.get_claim_id(tx)
|
||||
|
||||
# Assert that file list and source contains the local unsanitized name, but suggested name is sanitized
|
||||
full_path = (await self.daemon.jsonrpc_get('lbry://' + claim_name)).full_path
|
||||
stream_file_name = os.path.basename(full_path)
|
||||
source_file_name = tx['outputs'][0]['value']['source']['name']
|
||||
file_list_name = stream.file_name
|
||||
suggested_file_name = stream.descriptor.suggested_file_name
|
||||
|
||||
self.assertTrue(os.path.isfile(full_path))
|
||||
check_prefix_suffix(stream_file_name, prefix, suffix)
|
||||
self.assertEqual(stream_file_name, source_file_name)
|
||||
self.assertEqual(stream_file_name, file_list_name)
|
||||
check_prefix_suffix(suggested_file_name, san_prefix, san_suffix)
|
||||
await self._purge_file(claim_name, full_path)
|
||||
|
||||
# Re-download deleted file and assert that the file name is sanitized
|
||||
full_path = (await self.daemon.jsonrpc_get('lbry://' + claim_name, save_file=True)).full_path
|
||||
stream_file_name = os.path.basename(full_path)
|
||||
stream = (await self.daemon.jsonrpc_file_list())["items"][0]
|
||||
file_list_name = stream.file_name
|
||||
suggested_file_name = stream.descriptor.suggested_file_name
|
||||
|
||||
self.assertTrue(os.path.isfile(full_path))
|
||||
check_prefix_suffix(stream_file_name, san_prefix, san_suffix)
|
||||
self.assertEqual(stream_file_name, file_list_name)
|
||||
self.assertEqual(stream_file_name, suggested_file_name)
|
||||
await self._purge_file(claim_name, full_path)
|
||||
|
||||
# Assert that the downloaded file name is not sanitized when user provides custom file name
|
||||
custom_name = 'cust*m_name'
|
||||
full_path = (await self.daemon.jsonrpc_get(
|
||||
'lbry://' + claim_name, file_name=custom_name, save_file=True)).full_path
|
||||
file_name_on_disk = os.path.basename(full_path)
|
||||
self.assertTrue(os.path.isfile(full_path))
|
||||
self.assertEqual(custom_name, file_name_on_disk)
|
||||
|
||||
# Update the stream and assert the file name is not sanitized, but the suggested file name is
|
||||
prefix, suffix = 'derpyderp?', '.ext.'
|
||||
san_prefix, san_suffix = 'derpyderp', '.ext'
|
||||
tx = await self.stream_update(claim_id, data=b'amazing content', prefix=prefix, suffix=suffix)
|
||||
full_path = (await self.daemon.jsonrpc_get('lbry://' + claim_name, save_file=True)).full_path
|
||||
updated_stream = (await self.daemon.jsonrpc_file_list())["items"][0]
|
||||
|
||||
stream_file_name = os.path.basename(full_path)
|
||||
source_file_name = tx['outputs'][0]['value']['source']['name']
|
||||
file_list_name = updated_stream.file_name
|
||||
suggested_file_name = updated_stream.descriptor.suggested_file_name
|
||||
|
||||
self.assertTrue(os.path.isfile(full_path))
|
||||
check_prefix_suffix(stream_file_name, prefix, suffix)
|
||||
self.assertEqual(stream_file_name, source_file_name)
|
||||
self.assertEqual(stream_file_name, file_list_name)
|
||||
check_prefix_suffix(suggested_file_name, san_prefix, san_suffix)
|
||||
|
||||
async def test_file_list_fields(self):
|
||||
await self.stream_create('foo', '0.01')
|
||||
file_list = self.sout(self.daemon.jsonrpc_file_list())
|
||||
file_list = await self.file_list()
|
||||
self.assertEqual(
|
||||
file_list[0]['timestamp'],
|
||||
None
|
||||
)
|
||||
self.assertEqual(file_list[0]['confirmations'], -1)
|
||||
await self.daemon.jsonrpc_resolve('foo')
|
||||
file_list = self.sout(self.daemon.jsonrpc_file_list())
|
||||
file_list = await self.file_list()
|
||||
self.assertEqual(
|
||||
file_list[0]['timestamp'],
|
||||
self.ledger.headers[file_list[0]['height']]['timestamp']
|
||||
@@ -72,11 +148,11 @@ class FileCommands(CommandTestCase):
|
||||
f.flush()
|
||||
second_path = await self.daemon.jsonrpc_get('lbry://foo', save_file=True)
|
||||
await self.wait_files_to_complete()
|
||||
self.assertNotEquals(first_path, second_path)
|
||||
self.assertNotEqual(first_path, second_path)
|
||||
|
||||
async def test_file_list_updated_metadata_on_resolve(self):
|
||||
await self.stream_create('foo', '0.01')
|
||||
txo = (await self.daemon.resolve(['lbry://foo']))['lbry://foo']
|
||||
txo = (await self.daemon.resolve(self.wallet.accounts, ['lbry://foo']))['lbry://foo']
|
||||
claim = txo.claim
|
||||
await self.daemon.jsonrpc_file_delete(claim_name='foo')
|
||||
txid = await self.blockchain_claim_name('bar', hexlify(claim.to_bytes()).decode(), '0.01')
|
||||
@@ -84,9 +160,41 @@ class FileCommands(CommandTestCase):
|
||||
claim.stream.description = "fix typos, fix the world"
|
||||
await self.blockchain_update_name(txid, hexlify(claim.to_bytes()).decode(), '0.01')
|
||||
await self.daemon.jsonrpc_resolve('lbry://bar')
|
||||
file_list = self.daemon.jsonrpc_file_list()
|
||||
file_list = (await self.daemon.jsonrpc_file_list())['items']
|
||||
self.assertEqual(file_list[0].stream_claim_info.claim.stream.description, claim.stream.description)
|
||||
|
||||
async def test_file_list_paginated_output(self):
|
||||
await self.create_streams_in_range(0, 20)
|
||||
|
||||
page = await self.file_list(page_size=20)
|
||||
page_claim_ids = [item['claim_id'] for item in page]
|
||||
self.assertListEqual(page_claim_ids, self.stream_claim_ids)
|
||||
|
||||
page = await self.file_list(page_size=6)
|
||||
page_claim_ids = [item['claim_id'] for item in page]
|
||||
self.assertListEqual(page_claim_ids, self.stream_claim_ids[:6])
|
||||
|
||||
page = await self.file_list(page_size=6, page=2)
|
||||
page_claim_ids = [item['claim_id'] for item in page]
|
||||
self.assertListEqual(page_claim_ids, self.stream_claim_ids[6:12])
|
||||
|
||||
out_of_bounds = await self.file_list(page=5, page_size=6)
|
||||
self.assertEqual(out_of_bounds, [])
|
||||
|
||||
complete = await self.daemon.jsonrpc_file_list()
|
||||
self.assertEqual(complete['total_pages'], 1)
|
||||
self.assertEqual(complete['total_items'], 20)
|
||||
|
||||
page = await self.daemon.jsonrpc_file_list(page_size=10, page=1)
|
||||
self.assertEqual(page['total_pages'], 2)
|
||||
self.assertEqual(page['total_items'], 20)
|
||||
self.assertEqual(page['page'], 1)
|
||||
|
||||
full = await self.out(self.daemon.jsonrpc_file_list(page_size=20, page=1))
|
||||
page1 = await self.file_list(page=1, page_size=10)
|
||||
page2 = await self.file_list(page=2, page_size=10)
|
||||
self.assertEqual(page1 + page2, full['items'])
|
||||
|
||||
async def test_download_different_timeouts(self):
|
||||
tx = await self.stream_create('foo', '0.01')
|
||||
sd_hash = tx['outputs'][0]['value']['source']['sd_hash']
|
||||
@@ -105,12 +213,12 @@ class FileCommands(CommandTestCase):
|
||||
self.assertEqual('Failed to download sd blob %s within timeout' % sd_hash, resp['error'])
|
||||
|
||||
async def wait_files_to_complete(self):
|
||||
while self.sout(self.daemon.jsonrpc_file_list(status='running')):
|
||||
while await self.file_list(status='running'):
|
||||
await asyncio.sleep(0.01)
|
||||
|
||||
async def test_filename_conflicts_management_on_resume_download(self):
|
||||
await self.stream_create('foo', '0.01', data=bytes([0] * (1 << 23)))
|
||||
file_info = self.sout(self.daemon.jsonrpc_file_list())[0]
|
||||
file_info = (await self.file_list())[0]
|
||||
original_path = os.path.join(self.daemon.conf.download_dir, file_info['file_name'])
|
||||
await self.daemon.jsonrpc_file_delete(claim_name='foo')
|
||||
await self.daemon.jsonrpc_get('lbry://foo')
|
||||
@@ -121,7 +229,7 @@ class FileCommands(CommandTestCase):
|
||||
await asyncio.wait_for(self.wait_files_to_complete(), timeout=5) # if this hangs, file didn't get set completed
|
||||
# check that internal state got through up to the file list API
|
||||
stream = self.daemon.stream_manager.get_stream_by_stream_hash(file_info['stream_hash'])
|
||||
file_info = self.sout(self.daemon.jsonrpc_file_list()[0])
|
||||
file_info = (await self.file_list())[0]
|
||||
self.assertEqual(stream.file_name, file_info['file_name'])
|
||||
# checks if what the API shows is what he have at the very internal level.
|
||||
self.assertEqual(stream.full_path, file_info['download_path'])
|
||||
@@ -129,7 +237,7 @@ class FileCommands(CommandTestCase):
|
||||
async def test_incomplete_downloads_erases_output_file_on_stop(self):
|
||||
tx = await self.stream_create('foo', '0.01', data=b'deadbeef' * 1000000)
|
||||
sd_hash = tx['outputs'][0]['value']['source']['sd_hash']
|
||||
file_info = self.sout(self.daemon.jsonrpc_file_list())[0]
|
||||
file_info = (await self.file_list())[0]
|
||||
await self.daemon.jsonrpc_file_delete(claim_name='foo')
|
||||
blobs = await self.server_storage.get_blobs_for_stream(
|
||||
await self.server_storage.get_stream_hash_for_sd_hash(sd_hash)
|
||||
@@ -169,8 +277,8 @@ class FileCommands(CommandTestCase):
|
||||
# start the download
|
||||
resp = await self.out(self.daemon.jsonrpc_get('lbry://foo', timeout=2))
|
||||
self.assertNotIn('error', resp)
|
||||
self.assertEqual(len(self.daemon.jsonrpc_file_list()), 1)
|
||||
self.assertEqual('running', self.sout(self.daemon.jsonrpc_file_list())[0]['status'])
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
|
||||
self.assertEqual('running', (await self.file_list())[0]['status'])
|
||||
await self.daemon.jsonrpc_file_set_status('stop', claim_name='foo')
|
||||
|
||||
# recover blobs
|
||||
@@ -182,7 +290,7 @@ class FileCommands(CommandTestCase):
|
||||
|
||||
await self.daemon.jsonrpc_file_set_status('start', claim_name='foo')
|
||||
await asyncio.wait_for(self.wait_files_to_complete(), timeout=5)
|
||||
file_info = self.sout(self.daemon.jsonrpc_file_list())[0]
|
||||
file_info = (await self.file_list())[0]
|
||||
self.assertEqual(file_info['blobs_completed'], file_info['blobs_in_stream'])
|
||||
self.assertEqual('finished', file_info['status'])
|
||||
|
||||
@@ -190,7 +298,7 @@ class FileCommands(CommandTestCase):
|
||||
BlobDownloader.BAN_FACTOR = .5 # fixme: temporary field, will move to connection manager or a conf
|
||||
tx = await self.stream_create('foo', '0.01', data=bytes([0] * (1 << 23)))
|
||||
sd_hash = tx['outputs'][0]['value']['source']['sd_hash']
|
||||
missing_blob_hash = (await self.daemon.jsonrpc_blob_list(sd_hash=sd_hash))[-2]
|
||||
missing_blob_hash = (await self.daemon.jsonrpc_blob_list(sd_hash=sd_hash))['items'][-2]
|
||||
await self.daemon.jsonrpc_file_delete(claim_name='foo')
|
||||
# backup blob
|
||||
missing_blob = self.server_blob_manager.get_blob(missing_blob_hash)
|
||||
@@ -216,8 +324,8 @@ class FileCommands(CommandTestCase):
|
||||
)
|
||||
await self.daemon.jsonrpc_file_delete(claim_name='expensive')
|
||||
response = await self.out(self.daemon.jsonrpc_get('lbry://expensive'))
|
||||
self.assertEqual(response['error'], 'fee of 11.00000 exceeds max available balance')
|
||||
self.assertEqual(len(self.daemon.jsonrpc_file_list()), 0)
|
||||
self.assertEqual(response['error'], 'Not enough funds to cover this transaction.')
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 0)
|
||||
|
||||
# FAIL: beyond maximum key fee
|
||||
await self.stream_create(
|
||||
@@ -226,8 +334,10 @@ class FileCommands(CommandTestCase):
|
||||
)
|
||||
await self.daemon.jsonrpc_file_delete(claim_name='maxkey')
|
||||
response = await self.out(self.daemon.jsonrpc_get('lbry://maxkey'))
|
||||
self.assertEqual(len(self.daemon.jsonrpc_file_list()), 0)
|
||||
self.assertEqual(response['error'], 'fee of 111.00000 exceeds max configured to allow of 50.00000')
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 0)
|
||||
self.assertEqual(
|
||||
response['error'], 'Purchase price of 111.0 LBC exceeds maximum configured price of 100.0 LBC (50.0 USD).'
|
||||
)
|
||||
|
||||
# PASS: purchase is successful
|
||||
await self.stream_create(
|
||||
@@ -239,8 +349,8 @@ class FileCommands(CommandTestCase):
|
||||
response = await self.daemon.jsonrpc_get('lbry://icanpay')
|
||||
raw_content_fee = response.content_fee.raw
|
||||
await self.ledger.wait(response.content_fee)
|
||||
await self.assertBalance(self.account, '8.925555')
|
||||
self.assertEqual(len(self.daemon.jsonrpc_file_list()), 1)
|
||||
await self.assertBalance(self.account, '8.925538')
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
|
||||
|
||||
await asyncio.wait_for(self.wait_files_to_complete(), timeout=1)
|
||||
|
||||
@@ -256,8 +366,8 @@ class FileCommands(CommandTestCase):
|
||||
|
||||
self.daemon.stream_manager.stop()
|
||||
await self.daemon.stream_manager.start()
|
||||
self.assertEqual(len(self.daemon.jsonrpc_file_list()), 1)
|
||||
self.assertEqual(self.daemon.jsonrpc_file_list()[0].content_fee.raw, raw_content_fee)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
|
||||
self.assertEqual((await self.daemon.jsonrpc_file_list())['items'][0].content_fee.raw, raw_content_fee)
|
||||
await self.daemon.jsonrpc_file_delete(claim_name='icanpay')
|
||||
|
||||
# PASS: no fee address --> use the claim address to pay
|
||||
@@ -268,12 +378,12 @@ class FileCommands(CommandTestCase):
|
||||
tx, fee_amount='2.0', fee_currency='LBC', claim_address=target_address
|
||||
)
|
||||
await self.daemon.jsonrpc_file_delete(claim_name='nofeeaddress')
|
||||
self.assertEqual(len(self.daemon.jsonrpc_file_list()), 0)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 0)
|
||||
|
||||
response = await self.out(self.daemon.jsonrpc_get('lbry://nofeeaddress'))
|
||||
self.assertIsNone(self.daemon.jsonrpc_file_list()[0].stream_claim_info.claim.stream.fee.address)
|
||||
self.assertIsNone((await self.daemon.jsonrpc_file_list())['items'][0].stream_claim_info.claim.stream.fee.address)
|
||||
self.assertIsNotNone(response['content_fee'])
|
||||
self.assertEqual(len(self.daemon.jsonrpc_file_list()), 1)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
|
||||
self.assertEqual(response['content_fee']['outputs'][0]['amount'], '2.0')
|
||||
self.assertEqual(response['content_fee']['outputs'][0]['address'], target_address)
|
||||
|
||||
@@ -290,11 +400,11 @@ class FileCommands(CommandTestCase):
|
||||
await self.assertBalance(self.account, '9.483893')
|
||||
response = await self.daemon.jsonrpc_get('lbry://somename')
|
||||
await self.ledger.wait(response.content_fee)
|
||||
await self.assertBalance(self.account, '8.483769')
|
||||
await self.assertBalance(self.account, '8.483752')
|
||||
|
||||
# Assert the file downloads
|
||||
await asyncio.wait_for(self.wait_files_to_complete(), timeout=1)
|
||||
self.assertEqual(len(self.daemon.jsonrpc_file_list()), 1)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
|
||||
|
||||
# Assert the transaction is recorded to the blockchain
|
||||
starting_balance = await self.blockchain.get_balance()
|
||||
@@ -313,7 +423,7 @@ class FileCommands(CommandTestCase):
|
||||
await self.__raw_value_update_no_fee_amount(tx, target_address)
|
||||
await self.daemon.jsonrpc_file_delete(claim_name='nullfee')
|
||||
response = await self.daemon.jsonrpc_get('lbry://nullfee')
|
||||
self.assertEqual(len(self.daemon.jsonrpc_file_list()), 1)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
|
||||
self.assertIsNone(response.content_fee)
|
||||
self.assertTrue(response.stream_claim_info.claim.stream.has_fee)
|
||||
self.assertDictEqual(
|
||||
|
||||
@@ -59,7 +59,7 @@ class BasicTransactionTest(IntegrationTestCase):
|
||||
self.assertEqual(d2l(await self.account.get_balance()), '7.985786')
|
||||
self.assertEqual(d2l(await self.account.get_balance(include_claims=True)), '9.985786')
|
||||
|
||||
response = await self.ledger.resolve(['lbry://@bar/foo'])
|
||||
response = await self.ledger.resolve([], ['lbry://@bar/foo'])
|
||||
self.assertEqual(response['lbry://@bar/foo'].claim.claim_type, 'stream')
|
||||
|
||||
abandon_tx = await Transaction.create([Input.spend(stream_tx.outputs[0])], [], [self.account], self.account)
|
||||
@@ -68,10 +68,10 @@ class BasicTransactionTest(IntegrationTestCase):
|
||||
await self.blockchain.generate(1)
|
||||
await self.ledger.wait(abandon_tx)
|
||||
|
||||
response = await self.ledger.resolve(['lbry://@bar/foo'])
|
||||
response = await self.ledger.resolve([], ['lbry://@bar/foo'])
|
||||
self.assertIn('error', response['lbry://@bar/foo'])
|
||||
|
||||
# checks for expected format in inexistent URIs
|
||||
response = await self.ledger.resolve(['lbry://404', 'lbry://@404'])
|
||||
response = await self.ledger.resolve([], ['lbry://404', 'lbry://@404'])
|
||||
self.assertEqual('lbry://404 did not resolve to a claim', response['lbry://404']['error'])
|
||||
self.assertEqual('lbry://@404 did not resolve to a claim', response['lbry://@404']['error'])
|
||||
@@ -5,8 +5,8 @@ class AddressManagement(CommandTestCase):
|
||||
|
||||
async def test_address_list(self):
|
||||
addresses = await self.out(self.daemon.jsonrpc_address_list())
|
||||
self.assertEqual(27, len(addresses))
|
||||
self.assertItemCount(addresses, 27)
|
||||
|
||||
single = await self.out(self.daemon.jsonrpc_address_list(addresses[11]['address']))
|
||||
self.assertEqual(1, len(single))
|
||||
self.assertEqual(single[0], addresses[11])
|
||||
single = await self.out(self.daemon.jsonrpc_address_list(addresses['items'][11]['address']))
|
||||
self.assertItemCount(single, 1)
|
||||
self.assertEqual(single['items'][0], addresses['items'][11])
|
||||
@@ -0,0 +1,154 @@
|
||||
from typing import Optional
|
||||
from lbry.testcase import CommandTestCase
|
||||
from lbry.schema.purchase import Purchase
|
||||
from lbry.wallet.transaction import Transaction
|
||||
from lbry.wallet.dewies import lbc_to_dewies, dewies_to_lbc
|
||||
|
||||
|
||||
class PurchaseCommandTests(CommandTestCase):
|
||||
|
||||
async def asyncSetUp(self):
|
||||
await super().asyncSetUp()
|
||||
self.merchant_address = await self.blockchain.get_raw_change_address()
|
||||
|
||||
async def priced_stream(self, name='stream', price: Optional[str] = '2.0', currency='LBC') -> Transaction:
|
||||
kwargs = {}
|
||||
if price and currency:
|
||||
kwargs = {
|
||||
'fee_amount': price,
|
||||
'fee_currency': currency,
|
||||
'fee_address': self.merchant_address
|
||||
}
|
||||
file_path = self.create_upload_file(data=b'high value content')
|
||||
tx = await self.daemon.jsonrpc_stream_create(
|
||||
name, '0.01', file_path=file_path, **kwargs
|
||||
)
|
||||
await self.ledger.wait(tx)
|
||||
await self.generate(1)
|
||||
await self.ledger.wait(tx)
|
||||
await self.daemon.jsonrpc_file_delete(claim_name=name)
|
||||
return tx
|
||||
|
||||
async def create_purchase(self, name, price):
|
||||
stream = await self.priced_stream(name, price)
|
||||
claim_id = stream.outputs[0].claim_id
|
||||
purchase = await self.daemon.jsonrpc_purchase_create(claim_id)
|
||||
await self.ledger.wait(purchase)
|
||||
return claim_id
|
||||
|
||||
async def assertStreamPurchased(self, stream: Transaction, purchase: Transaction):
|
||||
stream_txo, purchase_txo = stream.outputs[0], purchase.outputs[0]
|
||||
stream_fee = stream_txo.claim.stream.fee
|
||||
self.assertEqual(stream_fee.dewies, purchase_txo.amount)
|
||||
self.assertEqual(stream_fee.address, purchase_txo.get_address(self.ledger))
|
||||
|
||||
await self.account.release_all_outputs()
|
||||
buyer_balance = await self.account.get_balance()
|
||||
merchant_balance = lbc_to_dewies(str(await self.blockchain.get_balance()))
|
||||
pre_purchase_count = (await self.daemon.jsonrpc_purchase_list())['total_items']
|
||||
|
||||
await self.ledger.wait(purchase)
|
||||
await self.generate(1)
|
||||
merchant_balance += lbc_to_dewies('1.0') # block reward
|
||||
await self.ledger.wait(purchase)
|
||||
|
||||
self.assertEqual(
|
||||
await self.account.get_balance(), buyer_balance - (purchase.input_sum-purchase.outputs[2].amount))
|
||||
self.assertEqual(
|
||||
str(await self.blockchain.get_balance()), dewies_to_lbc(merchant_balance + purchase_txo.amount))
|
||||
|
||||
purchases = await self.daemon.jsonrpc_purchase_list()
|
||||
self.assertEqual(purchases['total_items'], pre_purchase_count+1)
|
||||
|
||||
tx = purchases['items'][0].tx_ref.tx
|
||||
self.assertEqual(len(tx.outputs), 3) # purchase txo, purchase data, change
|
||||
|
||||
txo0 = tx.outputs[0]
|
||||
txo1 = tx.outputs[1]
|
||||
self.assertEqual(txo0.purchase, txo1) # purchase txo has reference to purchase data
|
||||
self.assertTrue(txo1.is_purchase_data)
|
||||
self.assertTrue(txo1.can_decode_purchase_data)
|
||||
self.assertIsInstance(txo1.purchase_data, Purchase)
|
||||
self.assertEqual(txo1.purchase_data.claim_id, stream_txo.claim_id)
|
||||
|
||||
async def test_purchasing(self):
|
||||
stream = await self.priced_stream()
|
||||
claim_id = stream.outputs[0].claim_id
|
||||
|
||||
# explicit purchase of claim
|
||||
tx = await self.daemon.jsonrpc_purchase_create(claim_id)
|
||||
await self.assertStreamPurchased(stream, tx)
|
||||
|
||||
# check that `get` doesn't purchase it again
|
||||
balance = await self.account.get_balance()
|
||||
response = await self.daemon.jsonrpc_get('lbry://stream')
|
||||
self.assertIsNone(response.content_fee)
|
||||
self.assertEqual(await self.account.get_balance(), balance)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_purchase_list(), 1)
|
||||
|
||||
# `get` does purchase a stream we don't have yet
|
||||
another_stream = await self.priced_stream('another')
|
||||
response = await self.daemon.jsonrpc_get('lbry://another')
|
||||
await self.assertStreamPurchased(another_stream, response.content_fee)
|
||||
|
||||
# purchase non-existent claim fails
|
||||
with self.assertRaisesRegex(Exception, "Could not find claim with claim_id"):
|
||||
await self.daemon.jsonrpc_purchase_create('abc123')
|
||||
|
||||
# purchase stream with no price fails
|
||||
no_price_stream = await self.priced_stream('no_price_stream', price=None)
|
||||
with self.assertRaisesRegex(Exception, "does not have a purchase price"):
|
||||
await self.daemon.jsonrpc_purchase_create(no_price_stream.outputs[0].claim_id)
|
||||
|
||||
# purchase claim you already own fails
|
||||
with self.assertRaisesRegex(Exception, "You already have a purchase for claim_id"):
|
||||
await self.daemon.jsonrpc_purchase_create(claim_id)
|
||||
|
||||
# force purchasing claim you already own
|
||||
tx = await self.daemon.jsonrpc_purchase_create(claim_id, allow_duplicate_purchase=True)
|
||||
await self.assertStreamPurchased(stream, tx)
|
||||
|
||||
# purchase by uri
|
||||
abc_stream = await self.priced_stream('abc')
|
||||
tx = await self.daemon.jsonrpc_purchase_create(url='lbry://abc')
|
||||
await self.assertStreamPurchased(abc_stream, tx)
|
||||
|
||||
async def test_purchase_and_transaction_list(self):
|
||||
self.assertItemCount(await self.daemon.jsonrpc_purchase_list(), 0)
|
||||
self.assertItemCount(await self.daemon.jsonrpc_transaction_list(), 1)
|
||||
|
||||
claim_id1 = await self.create_purchase('a', '1.0')
|
||||
claim_id2 = await self.create_purchase('b', '1.0')
|
||||
|
||||
result = await self.out(self.daemon.jsonrpc_purchase_list())
|
||||
self.assertItemCount(await self.daemon.jsonrpc_transaction_list(), 5)
|
||||
self.assertItemCount(result, 2)
|
||||
self.assertEqual(result['items'][0]['type'], 'purchase')
|
||||
self.assertEqual(result['items'][0]['claim_id'], claim_id2)
|
||||
self.assertNotIn('claim', result['items'][0])
|
||||
self.assertEqual(result['items'][1]['type'], 'purchase')
|
||||
self.assertEqual(result['items'][1]['claim_id'], claim_id1)
|
||||
self.assertNotIn('claim', result['items'][1])
|
||||
|
||||
result = await self.out(self.daemon.jsonrpc_purchase_list(resolve=True))
|
||||
self.assertEqual(result['items'][0]['claim']['name'], 'b')
|
||||
self.assertEqual(result['items'][1]['claim']['name'], 'a')
|
||||
|
||||
result = await self.daemon.jsonrpc_transaction_list()
|
||||
self.assertEqual(result['items'][0]['purchase_info'][0]['claim_id'], claim_id2)
|
||||
self.assertEqual(result['items'][2]['purchase_info'][0]['claim_id'], claim_id1)
|
||||
|
||||
result = await self.claim_search()
|
||||
self.assertEqual(result[0]['claim_id'], result[0]['purchase_receipt']['claim_id'])
|
||||
self.assertEqual(result[1]['claim_id'], result[1]['purchase_receipt']['claim_id'])
|
||||
|
||||
url = result[0]['canonical_url']
|
||||
resolve = await self.resolve(url)
|
||||
self.assertEqual(result[0]['claim_id'], resolve[url]['purchase_receipt']['claim_id'])
|
||||
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 0)
|
||||
await self.daemon.jsonrpc_get('lbry://a')
|
||||
await self.daemon.jsonrpc_get('lbry://b')
|
||||
files = await self.file_list()
|
||||
self.assertEqual(files[0]['claim_id'], files[0]['purchase_receipt']['claim_id'])
|
||||
self.assertEqual(files[1]['claim_id'], files[1]['purchase_receipt']['claim_id'])
|
||||
@@ -90,6 +90,7 @@ class ResolveCommand(BaseResolveTestCase):
|
||||
await self.conductor.spv_node.stop()
|
||||
resolving_future = asyncio.ensure_future(self.resolve('foo'))
|
||||
await self.conductor.spv_node.start(self.conductor.blockchain_node)
|
||||
await self.ledger.on_ready.first
|
||||
self.assertIsNotNone((await resolving_future)['foo']['claim_id'])
|
||||
|
||||
async def test_winning_by_effective_amount(self):
|
||||
@@ -259,58 +260,6 @@ class ResolveCommand(BaseResolveTestCase):
|
||||
'@olds/bad_example': {'error': '@olds/bad_example did not resolve to a claim'}
|
||||
})
|
||||
|
||||
async def _test_resolve_abc_foo(self):
|
||||
response = await self.resolve('lbry://@abc/foo')
|
||||
claim = response['lbry://@abc/foo']
|
||||
self.assertIn('signing_channel', claim)
|
||||
self.assertEqual(claim['name'], 'foo')
|
||||
self.assertEqual(claim['signing_channel']['name'], '@abc')
|
||||
self.assertEqual(claim['meta']['claims_in_channel'], 0)
|
||||
self.assertEqual(
|
||||
claim['timestamp'],
|
||||
self.ledger.headers[claim['height']]['timestamp']
|
||||
)
|
||||
self.assertEqual(
|
||||
claim['signing_channel']['timestamp'],
|
||||
self.ledger.headers[claim['signing_channel']['height']]['timestamp']
|
||||
)
|
||||
|
||||
@skip('this test does not work with new resolve')
|
||||
async def test_resolve_lru_cache_doesnt_persist_errors(self):
|
||||
original_get_transaction = self.daemon.wallet_manager.ledger.network.get_transaction
|
||||
|
||||
async def timeout_get_transaction(txid):
|
||||
fut = self.loop.create_future()
|
||||
|
||||
def delayed_raise_cancelled_error():
|
||||
fut.set_exception(asyncio.CancelledError())
|
||||
|
||||
self.loop.call_soon(delayed_raise_cancelled_error)
|
||||
return await fut
|
||||
|
||||
tx = await self.channel_create('@abc', '0.01')
|
||||
channel_id = self.get_claim_id(tx)
|
||||
await self.stream_create('foo', '0.01', channel_id=channel_id)
|
||||
|
||||
# raise a cancelled error from get_transaction
|
||||
self.daemon.wallet_manager.ledger.network.get_transaction = timeout_get_transaction
|
||||
with self.assertRaises(KeyError):
|
||||
await self._test_resolve_abc_foo()
|
||||
|
||||
# restore the real get_transaction that doesn't cancel, it should be called and the result cached
|
||||
self.daemon.wallet_manager.ledger.network.get_transaction = original_get_transaction
|
||||
await self._test_resolve_abc_foo()
|
||||
called_again = asyncio.Event(loop=self.loop)
|
||||
|
||||
def check_result_cached(txid):
|
||||
called_again.set()
|
||||
return original_get_transaction(txid)
|
||||
|
||||
# check that the result was cached
|
||||
self.daemon.wallet_manager.ledger.network.get_transaction = check_result_cached
|
||||
await self._test_resolve_abc_foo()
|
||||
self.assertFalse(called_again.is_set())
|
||||
|
||||
|
||||
class ResolveAfterReorg(BaseResolveTestCase):
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ class RangeRequests(CommandTestCase):
|
||||
self.data = data
|
||||
await self.stream_create('foo', '0.01', data=self.data, file_size=file_size)
|
||||
if save_blobs:
|
||||
self.assertTrue(len(os.listdir(self.daemon.blob_manager.blob_dir)) > 1)
|
||||
await self.daemon.jsonrpc_file_list()[0].fully_reflected.wait()
|
||||
self.assertGreater(len(os.listdir(self.daemon.blob_manager.blob_dir)), 1)
|
||||
await (await self.daemon.jsonrpc_file_list())['items'][0].fully_reflected.wait()
|
||||
await self.daemon.jsonrpc_file_delete(delete_from_download_dir=True, claim_name='foo')
|
||||
self.assertEqual(0, len(os.listdir(self.daemon.blob_manager.blob_dir)))
|
||||
# await self._restart_stream_manager()
|
||||
@@ -40,7 +40,7 @@ class RangeRequests(CommandTestCase):
|
||||
site = aiohttp.web.TCPSite(self.daemon.streaming_runner, self.daemon.conf.streaming_host,
|
||||
self.daemon.conf.streaming_port)
|
||||
await site.start()
|
||||
self.assertListEqual(self.daemon.jsonrpc_file_list(), [])
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 0)
|
||||
|
||||
async def _test_range_requests(self):
|
||||
name = 'foo'
|
||||
@@ -127,7 +127,7 @@ class RangeRequests(CommandTestCase):
|
||||
await self._setup_stream(self.data)
|
||||
|
||||
await self._test_range_requests()
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())['items'][0]
|
||||
self.assertTrue(os.path.isfile(self.daemon.blob_manager.get_blob(stream.sd_hash).file_path))
|
||||
self.assertIsNone(stream.download_directory)
|
||||
self.assertIsNone(stream.full_path)
|
||||
@@ -136,7 +136,7 @@ class RangeRequests(CommandTestCase):
|
||||
# test that repeated range requests do not create duplicate files
|
||||
for _ in range(3):
|
||||
await self._test_range_requests()
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())['items'][0]
|
||||
self.assertTrue(os.path.isfile(self.daemon.blob_manager.get_blob(stream.sd_hash).file_path))
|
||||
self.assertIsNone(stream.download_directory)
|
||||
self.assertIsNone(stream.full_path)
|
||||
@@ -152,13 +152,13 @@ class RangeRequests(CommandTestCase):
|
||||
self.assertEqual(
|
||||
len(files_in_download_dir), len(current_files_in_download_dir)
|
||||
)
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())['items'][0]
|
||||
self.assertTrue(os.path.isfile(self.daemon.blob_manager.get_blob(stream.sd_hash).file_path))
|
||||
self.assertIsNone(stream.download_directory)
|
||||
self.assertIsNone(stream.full_path)
|
||||
|
||||
await self._test_range_requests()
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())['items'][0]
|
||||
self.assertTrue(os.path.isfile(self.daemon.blob_manager.get_blob(stream.sd_hash).file_path))
|
||||
self.assertIsNone(stream.download_directory)
|
||||
self.assertIsNone(stream.full_path)
|
||||
@@ -171,7 +171,7 @@ class RangeRequests(CommandTestCase):
|
||||
self.data = get_random_bytes((MAX_BLOB_SIZE - 1) * 4)
|
||||
await self._setup_stream(self.data, save_blobs=False)
|
||||
await self._test_range_requests()
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())['items'][0]
|
||||
self.assertIsNone(stream.download_directory)
|
||||
self.assertIsNone(stream.full_path)
|
||||
files_in_download_dir = list(os.scandir(os.path.dirname(self.daemon.conf.data_dir)))
|
||||
@@ -179,7 +179,7 @@ class RangeRequests(CommandTestCase):
|
||||
# test that repeated range requests do not create duplicate files
|
||||
for _ in range(3):
|
||||
await self._test_range_requests()
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())['items'][0]
|
||||
self.assertIsNone(stream.download_directory)
|
||||
self.assertIsNone(stream.full_path)
|
||||
current_files_in_download_dir = list(os.scandir(os.path.dirname(self.daemon.conf.data_dir)))
|
||||
@@ -194,12 +194,12 @@ class RangeRequests(CommandTestCase):
|
||||
self.assertEqual(
|
||||
len(files_in_download_dir), len(current_files_in_download_dir)
|
||||
)
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())['items'][0]
|
||||
self.assertIsNone(stream.download_directory)
|
||||
self.assertIsNone(stream.full_path)
|
||||
|
||||
await self._test_range_requests()
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())['items'][0]
|
||||
self.assertIsNone(stream.download_directory)
|
||||
self.assertIsNone(stream.full_path)
|
||||
current_files_in_download_dir = list(os.scandir(os.path.dirname(self.daemon.conf.data_dir)))
|
||||
@@ -212,7 +212,7 @@ class RangeRequests(CommandTestCase):
|
||||
await self._setup_stream(self.data, save_files=True)
|
||||
|
||||
await self._test_range_requests()
|
||||
streams = self.daemon.jsonrpc_file_list()
|
||||
streams = (await self.daemon.jsonrpc_file_list())['items']
|
||||
self.assertEqual(1, len(streams))
|
||||
stream = streams[0]
|
||||
self.assertTrue(os.path.isfile(self.daemon.blob_manager.get_blob(stream.sd_hash).file_path))
|
||||
@@ -223,7 +223,7 @@ class RangeRequests(CommandTestCase):
|
||||
|
||||
for _ in range(3):
|
||||
await self._test_range_requests()
|
||||
streams = self.daemon.jsonrpc_file_list()
|
||||
streams = (await self.daemon.jsonrpc_file_list())['items']
|
||||
self.assertEqual(1, len(streams))
|
||||
stream = streams[0]
|
||||
self.assertTrue(os.path.isfile(self.daemon.blob_manager.get_blob(stream.sd_hash).file_path))
|
||||
@@ -240,7 +240,7 @@ class RangeRequests(CommandTestCase):
|
||||
self.assertEqual(
|
||||
len(files_in_download_dir), len(current_files_in_download_dir)
|
||||
)
|
||||
streams = self.daemon.jsonrpc_file_list()
|
||||
streams = (await self.daemon.jsonrpc_file_list())['items']
|
||||
self.assertEqual(1, len(streams))
|
||||
stream = streams[0]
|
||||
self.assertTrue(os.path.isfile(self.daemon.blob_manager.get_blob(stream.sd_hash).file_path))
|
||||
@@ -248,7 +248,7 @@ class RangeRequests(CommandTestCase):
|
||||
self.assertTrue(os.path.isfile(stream.full_path))
|
||||
|
||||
await self._test_range_requests()
|
||||
streams = self.daemon.jsonrpc_file_list()
|
||||
streams = (await self.daemon.jsonrpc_file_list())['items']
|
||||
self.assertEqual(1, len(streams))
|
||||
stream = streams[0]
|
||||
self.assertTrue(os.path.isfile(self.daemon.blob_manager.get_blob(stream.sd_hash).file_path))
|
||||
@@ -267,7 +267,7 @@ class RangeRequests(CommandTestCase):
|
||||
self.daemon.conf.save_blobs = False
|
||||
|
||||
await self._test_range_requests()
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())['items'][0]
|
||||
self.assertTrue(os.path.isdir(stream.download_directory))
|
||||
self.assertTrue(os.path.isfile(stream.full_path))
|
||||
full_path = stream.full_path
|
||||
@@ -275,7 +275,7 @@ class RangeRequests(CommandTestCase):
|
||||
|
||||
for _ in range(3):
|
||||
await self._test_range_requests()
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())['items'][0]
|
||||
self.assertTrue(os.path.isdir(stream.download_directory))
|
||||
self.assertTrue(os.path.isfile(stream.full_path))
|
||||
current_files_in_download_dir = list(os.scandir(os.path.dirname(full_path)))
|
||||
@@ -288,14 +288,14 @@ class RangeRequests(CommandTestCase):
|
||||
self.assertEqual(
|
||||
len(files_in_download_dir), len(current_files_in_download_dir)
|
||||
)
|
||||
streams = self.daemon.jsonrpc_file_list()
|
||||
streams = (await self.daemon.jsonrpc_file_list())['items']
|
||||
self.assertEqual(1, len(streams))
|
||||
stream = streams[0]
|
||||
self.assertTrue(os.path.isdir(stream.download_directory))
|
||||
self.assertTrue(os.path.isfile(stream.full_path))
|
||||
|
||||
await self._test_range_requests()
|
||||
streams = self.daemon.jsonrpc_file_list()
|
||||
streams = (await self.daemon.jsonrpc_file_list())['items']
|
||||
self.assertEqual(1, len(streams))
|
||||
stream = streams[0]
|
||||
self.assertTrue(os.path.isdir(stream.download_directory))
|
||||
@@ -311,31 +311,31 @@ class RangeRequests(CommandTestCase):
|
||||
async def test_switch_save_blobs_while_running(self):
|
||||
await self.test_streaming_only_without_blobs()
|
||||
self.daemon.conf.save_blobs = True
|
||||
blobs_in_stream = self.daemon.jsonrpc_file_list()[0].blobs_in_stream
|
||||
sd_hash = self.daemon.jsonrpc_file_list()[0].sd_hash
|
||||
blobs_in_stream = (await self.daemon.jsonrpc_file_list())['items'][0].blobs_in_stream
|
||||
sd_hash = (await self.daemon.jsonrpc_file_list())['items'][0].sd_hash
|
||||
start_file_count = len(os.listdir(self.daemon.blob_manager.blob_dir))
|
||||
await self._test_range_requests()
|
||||
self.assertEqual(start_file_count + blobs_in_stream, len(os.listdir(self.daemon.blob_manager.blob_dir)))
|
||||
self.assertEqual(0, self.daemon.jsonrpc_file_list()[0].blobs_remaining)
|
||||
self.assertEqual(0, (await self.daemon.jsonrpc_file_list())['items'][0].blobs_remaining)
|
||||
|
||||
# switch back
|
||||
self.daemon.conf.save_blobs = False
|
||||
await self._test_range_requests()
|
||||
self.assertEqual(start_file_count + blobs_in_stream, len(os.listdir(self.daemon.blob_manager.blob_dir)))
|
||||
self.assertEqual(0, self.daemon.jsonrpc_file_list()[0].blobs_remaining)
|
||||
self.assertEqual(0, (await self.daemon.jsonrpc_file_list())['items'][0].blobs_remaining)
|
||||
await self.daemon.jsonrpc_file_delete(delete_from_download_dir=True, sd_hash=sd_hash)
|
||||
self.assertEqual(start_file_count, len(os.listdir(self.daemon.blob_manager.blob_dir)))
|
||||
await self._test_range_requests()
|
||||
self.assertEqual(start_file_count, len(os.listdir(self.daemon.blob_manager.blob_dir)))
|
||||
self.assertEqual(blobs_in_stream, self.daemon.jsonrpc_file_list()[0].blobs_remaining)
|
||||
self.assertEqual(blobs_in_stream, (await self.daemon.jsonrpc_file_list())['items'][0].blobs_remaining)
|
||||
|
||||
async def test_file_save_streaming_only_save_blobs(self):
|
||||
await self.test_streaming_only_with_blobs()
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())['items'][0]
|
||||
self.assertIsNone(stream.full_path)
|
||||
self.server.stop_server()
|
||||
await self.daemon.jsonrpc_file_save('test', self.daemon.conf.data_dir)
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())['items'][0]
|
||||
self.assertIsNotNone(stream.full_path)
|
||||
await stream.finished_writing.wait()
|
||||
with open(stream.full_path, 'rb') as f:
|
||||
@@ -344,18 +344,18 @@ class RangeRequests(CommandTestCase):
|
||||
|
||||
async def test_file_save_stop_before_finished_streaming_only(self, wait_for_start_writing=False):
|
||||
await self.test_streaming_only_with_blobs()
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())['items'][0]
|
||||
self.assertIsNone(stream.full_path)
|
||||
self.server.stop_server()
|
||||
await self.daemon.jsonrpc_file_save('test', self.daemon.conf.data_dir)
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())['items'][0]
|
||||
path = stream.full_path
|
||||
self.assertIsNotNone(path)
|
||||
if wait_for_start_writing:
|
||||
await stream.started_writing.wait()
|
||||
self.assertTrue(os.path.isfile(path))
|
||||
await self._restart_stream_manager()
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())['items'][0]
|
||||
self.assertIsNotNone(stream.full_path)
|
||||
self.assertFalse(os.path.isfile(path))
|
||||
if wait_for_start_writing:
|
||||
@@ -367,10 +367,10 @@ class RangeRequests(CommandTestCase):
|
||||
|
||||
async def test_file_save_streaming_only_dont_save_blobs(self):
|
||||
await self.test_streaming_only_without_blobs()
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())['items'][0]
|
||||
self.assertIsNone(stream.full_path)
|
||||
await self.daemon.jsonrpc_file_save('test', self.daemon.conf.data_dir)
|
||||
stream = self.daemon.jsonrpc_file_list()[0]
|
||||
stream = (await self.daemon.jsonrpc_file_list())['items'][0]
|
||||
await stream.finished_writing.wait()
|
||||
with open(stream.full_path, 'rb') as f:
|
||||
self.assertEqual(self.data, f.read())
|
||||
@@ -398,7 +398,7 @@ class RangeRequestsLRUCache(CommandTestCase):
|
||||
self.daemon.conf.save_blobs = False
|
||||
self.daemon.conf.save_files = False
|
||||
await self.stream_create('foo', '0.01', data=self.data, file_size=0)
|
||||
await self.daemon.jsonrpc_file_list()[0].fully_reflected.wait()
|
||||
await (await self.daemon.jsonrpc_file_list())['items'][0].fully_reflected.wait()
|
||||
await self.daemon.jsonrpc_file_delete(delete_from_download_dir=True, claim_name='foo')
|
||||
self.assertEqual(0, len(os.listdir(self.daemon.blob_manager.blob_dir)))
|
||||
|
||||
@@ -406,10 +406,10 @@ class RangeRequestsLRUCache(CommandTestCase):
|
||||
site = aiohttp.web.TCPSite(self.daemon.streaming_runner, self.daemon.conf.streaming_host,
|
||||
self.daemon.conf.streaming_port)
|
||||
await site.start()
|
||||
self.assertListEqual(self.daemon.jsonrpc_file_list(), [])
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 0)
|
||||
|
||||
await self._request_stream()
|
||||
self.assertEqual(1, len(self.daemon.jsonrpc_file_list()))
|
||||
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
|
||||
self.server.stop_server()
|
||||
|
||||
# running with cache size 0 gets through without errors without
|
||||
|
||||
Loaded 100 of 158 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user