forked from LBRYCommunity/lbry-sdk
3482 lines
No EOL
362 KiB
JSON
3482 lines
No EOL
362 KiB
JSON
{
|
|
"main": {
|
|
"doc": "Ungrouped commands.",
|
|
"commands": [
|
|
{
|
|
"name": "get",
|
|
"description": "Download stream from a LBRY name.",
|
|
"arguments": [
|
|
{
|
|
"name": "uri",
|
|
"type": "str",
|
|
"description": "uri of the content to download",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "file_name",
|
|
"type": "str",
|
|
"description": "specified name for the downloaded file, overrides the stream file name",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "download_directory",
|
|
"type": "str",
|
|
"description": "full path to the directory to download into",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "timeout",
|
|
"type": "int",
|
|
"description": "download timeout in number of seconds",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "save_file",
|
|
"type": "bool",
|
|
"description": "save the file to the downloads directory",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"streaming_url\": \"(str) url to stream the file using range requests\",\n \"completed\": \"(bool) true if download is completed\",\n \"file_name\": \"(str) name of file\",\n \"download_directory\": \"(str) download directory\",\n \"points_paid\": \"(float) credit paid to download file\",\n \"stopped\": \"(bool) true if download is stopped\",\n \"stream_hash\": \"(str) stream hash of file\",\n \"stream_name\": \"(str) stream name\",\n \"suggested_file_name\": \"(str) suggested file name\",\n \"sd_hash\": \"(str) sd hash of file\",\n \"download_path\": \"(str) download path of file\",\n \"mime_type\": \"(str) mime type of file\",\n \"key\": \"(str) key attached to file\",\n \"total_bytes_lower_bound\": \"(int) lower bound file size in bytes\",\n \"total_bytes\": \"(int) file upper bound size in bytes\",\n \"written_bytes\": \"(int) written size in bytes\",\n \"blobs_completed\": \"(int) number of fully downloaded blobs\",\n \"blobs_in_stream\": \"(int) total blobs on stream\",\n \"blobs_remaining\": \"(int) total blobs remaining to download\",\n \"status\": \"(str) downloader status\",\n \"claim_id\": \"(str) None if claim is not found else the claim id\",\n \"txid\": \"(str) None if claim is not found else the transaction id\",\n \"nout\": \"(int) None if claim is not found else the transaction output index\",\n \"outpoint\": \"(str) None if claim is not found else the tx and output\",\n \"metadata\": \"(dict) None if claim is not found else the claim metadata\",\n \"channel_claim_id\": \"(str) None if claim is not found or not signed\",\n \"channel_name\": \"(str) None if claim is not found or not signed\",\n \"claim_name\": \"(str) None if claim is not found else the claim name\"\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Get a file",
|
|
"curl": "curl -d'{\"method\": \"get\", \"params\": {\"uri\": \"astream#ebed8d1668d259c06c1d8db114e9bb8a882e70e9\"}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet get astream#ebed8d1668d259c06c1d8db114e9bb8a882e70e9",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"get\", \"params\": {\"uri\": \"astream#ebed8d1668d259c06c1d8db114e9bb8a882e70e9\"}}).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\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"confirmations\": 3,\n \"content_fee\": null,\n \"download_directory\": \"/tmp/tmpfhl810yq\",\n \"download_path\": \"/tmp/tmpfhl810yq/tmp7rhvd_bl\",\n \"file_name\": \"tmp7rhvd_bl\",\n \"height\": 214,\n \"key\": \"0e6b81fe73602d02ed07933b0206b959\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp7rhvd_bl\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01492d77be7594cd9bbe2e4575e42784b6b28671a97feea119e096fecb7cb354773d7583f38083842dccac76f7b8ddd2be2fc1fb4474693226de36237515a582f1734eaa25c6968af898c3ed913144d0fbab1398b20a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d7037726876645f626c180b22186170706c69636174696f6e2f6f637465742d73747265616d32300159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"dbea4542edea266956561fb9e0e13acfc63785d5777f33ea1a95c4e5979eac84e55dbf49e338b264b5fccb1c9f73e025\",\n \"stream_name\": \"tmp7rhvd_bl\",\n \"streaming_url\": \"http://localhost:5280/stream/0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"suggested_file_name\": \"tmp7rhvd_bl\",\n \"timestamp\": 1569257570,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b\",\n \"written_bytes\": 11\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "publish",
|
|
"description": "Create or replace a stream claim at a given name (use 'stream create/update' for more control).",
|
|
"arguments": [
|
|
{
|
|
"name": "name",
|
|
"type": "str",
|
|
"description": "name of the content (can only consist of a-z A-Z 0-9 and -(dash))",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "bid",
|
|
"type": "decimal",
|
|
"description": "amount to back the claim",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "file_path",
|
|
"type": "str",
|
|
"description": "path to file to be associated with name.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "fee_currency",
|
|
"type": "string",
|
|
"description": "specify fee currency",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "fee_amount",
|
|
"type": "decimal",
|
|
"description": "content download fee",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "fee_address",
|
|
"type": "str",
|
|
"description": "address where to send fee payments, will use value from --claim_address if not provided",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "title",
|
|
"type": "str",
|
|
"description": "title of the publication",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "description",
|
|
"type": "str",
|
|
"description": "description of the publication",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "author",
|
|
"type": "str",
|
|
"description": "author of the publication. The usage for this field is not the same as for channels. The author field is used to credit an author who is not the publisher and is not represented by the channel. For example, a pdf file of 'The Odyssey' has an author of 'Homer' but may by published to a channel such as '@classics', or to no channel at all",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "tags",
|
|
"type": "list",
|
|
"description": "add content tags",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "languages",
|
|
"type": "list",
|
|
"description": "languages used by the channel, using RFC 5646 format, eg: for English `--languages=en` for Spanish (Spain) `--languages=es-ES` for Spanish (Mexican) `--languages=es-MX` for Chinese (Simplified) `--languages=zh-Hans` for Chinese (Traditional) `--languages=zh-Hant`",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "locations",
|
|
"type": "list",
|
|
"description": "locations relevant to the stream, consisting of 2 letter `country` code and a `state`, `city` and a postal `code` along with a `latitude` and `longitude`. for JSON RPC: pass a dictionary with aforementioned attributes as keys, eg: ... \"locations\": [{'country': 'US', 'state': 'NH'}] ... for command line: pass a colon delimited list with values in the following order: \"COUNTRY:STATE:CITY:CODE:LATITUDE:LONGITUDE\" making sure to include colon for blank values, for example to provide only the city: ... --locations=\"::Manchester\" with all values set: ... --locations=\"US:NH:Manchester:03101:42.990605:-71.460989\" optionally, you can just pass the \"LATITUDE:LONGITUDE\": ... --locations=\"42.990605:-71.460989\" finally, you can also pass JSON string of dictionary on the command line as you would via JSON RPC ... --locations=\"{'country': 'US', 'state': 'NH'}\"",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "license",
|
|
"type": "str",
|
|
"description": "publication license",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "license_url",
|
|
"type": "str",
|
|
"description": "publication license url",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "thumbnail_url",
|
|
"type": "str",
|
|
"description": "thumbnail url",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "release_time",
|
|
"type": "int",
|
|
"description": "original public release of content, seconds since UNIX epoch",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "width",
|
|
"type": "int",
|
|
"description": "image/video width, automatically calculated from media file",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "height",
|
|
"type": "int",
|
|
"description": "image/video height, automatically calculated from media file",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "duration",
|
|
"type": "int",
|
|
"description": "audio/video duration in seconds, automatically calculated",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_id",
|
|
"type": "str",
|
|
"description": "claim id of the publisher channel",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_name",
|
|
"type": "str",
|
|
"description": "name of publisher channel",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_account_id",
|
|
"type": "str",
|
|
"description": "one or more account ids for accounts to look in for channel certificates, defaults to all accounts.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "account to use for holding the transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "funding_account_ids",
|
|
"type": "list",
|
|
"description": "ids of accounts to fund this transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "claim_address",
|
|
"type": "str",
|
|
"description": "address where the claim is sent to, if not specified it will be determined automatically from the account",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "preview",
|
|
"type": "bool",
|
|
"description": "do not broadcast the transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "blocking",
|
|
"type": "bool",
|
|
"description": "wait until transaction is in mempool",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"txid\": \"hash of transaction in hex\",\n \"height\": \"block where transaction was recorded\",\n \"inputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"outputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"total_input\": \"sum of inputs as a decimal\",\n \"total_output\": \"sum of outputs, sans fee, as a decimal\",\n \"total_fee\": \"fee amount\",\n \"hex\": \"entire transaction encoded in hex\"\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Publish a file",
|
|
"curl": "curl -d'{\"method\": \"publish\", \"params\": {\"name\": \"a-new-stream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpdfuo3gmq\", \"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/tmpdfuo3gmq",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"publish\", \"params\": {\"name\": \"a-new-stream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpdfuo3gmq\", \"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\": \"0100000001fbaccf3734b23175a913bbd9721721ef36f636e8d585559258b225e206b09735010000006a47304402200907f6c8a12358e1602076c26beff37c5e0ef4263eb4ebbe69d4e3395ef1b5b7022074dccc98aa36996e9ff4bcb8727990a294fd171948a0615e82fa81fea9671f14012102af7cd2d2a6fa88971b3239735073a0670f6a3967395a39d50b0749fba4171932ffffffff0200e1f50500000000bfb50c612d6e65772d73747265616d4c94000a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d706466756f33676d71180b22186170706c69636174696f6e2f6f637465742d73747265616d32309903238ece0883cc34f74ee54c768e04108700661ffcbae927b8fb62b5263a428338351bd8cc8d4457fde170de2222096d7576a9142a2c602b33ea0d86869a13de250d544a200aa8b288ace0b46217000000001976a914ae0c488ca0c9f8568ab53124ea6f9229254f662488ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mpWdtWBngcJdFfgSSK53CbM9XpTjbDgeUt\",\n \"amount\": \"4.947555\",\n \"confirmations\": 4,\n \"height\": 215,\n \"is_change\": false,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1569257570,\n \"txid\": \"3597b006e225b258925585d5e836f636ef211772d9bb13a97531b23437cfacfb\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mjMwqPKw4YiDoBY4jKmrjWR25DboFU1naH\",\n \"amount\": \"1.0\",\n \"claim_id\": \"538df0b96e9f7cf5d86e7f590547bab0c9a626e5\",\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#538df0b96e9f7cf5d86e7f590547bab0c9a626e5\",\n \"timestamp\": null,\n \"txid\": \"67cf8d5b3087f50ceaa7b4046c05d37588d4c02a44d5555b0f28b3b0219c2613\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpdfuo3gmq\",\n \"sd_hash\": \"9903238ece0883cc34f74ee54c768e04108700661ffcbae927b8fb62b5263a428338351bd8cc8d4457fde170de222209\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mwPEau2Wd5iBwSX1Hq9AouQi82TBfQx6ef\",\n \"amount\": \"3.923448\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"67cf8d5b3087f50ceaa7b4046c05d37588d4c02a44d5555b0f28b3b0219c2613\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.024107\",\n \"total_input\": \"4.947555\",\n \"total_output\": \"4.923448\",\n \"txid\": \"67cf8d5b3087f50ceaa7b4046c05d37588d4c02a44d5555b0f28b3b0219c2613\"\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "resolve",
|
|
"description": "Get the claim that a URL refers to.",
|
|
"arguments": [
|
|
{
|
|
"name": "urls",
|
|
"type": "str, list",
|
|
"description": "one or more urls to resolve",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "Dictionary of results, keyed by url\n '<url>': {\n If a resolution error occurs:\n 'error': Error message\n\n If the url resolves to a channel or a claim in a channel:\n 'certificate': {\n 'address': (str) claim address,\n 'amount': (float) claim amount,\n 'effective_amount': (float) claim amount including supports,\n 'claim_id': (str) claim id,\n 'claim_sequence': (int) claim sequence number (or -1 if unknown),\n 'decoded_claim': (bool) whether or not the claim value was decoded,\n 'height': (int) claim height,\n 'confirmations': (int) claim depth,\n 'timestamp': (int) timestamp of the block that included this claim tx,\n 'has_signature': (bool) included if decoded_claim\n 'name': (str) claim name,\n 'permanent_url': (str) permanent url of the certificate claim,\n 'supports: (list) list of supports [{'txid': (str) txid,\n 'nout': (int) nout,\n 'amount': (float) amount}],\n 'txid': (str) claim txid,\n 'nout': (str) claim nout,\n 'signature_is_valid': (bool), included if has_signature,\n 'value': ClaimDict if decoded, otherwise hex string\n }\n\n If the url resolves to a channel:\n 'claims_in_channel': (int) number of claims in the channel,\n\n If the url resolves to a claim:\n 'claim': {\n 'address': (str) claim address,\n 'amount': (float) claim amount,\n 'effective_amount': (float) claim amount including supports,\n 'claim_id': (str) claim id,\n 'claim_sequence': (int) claim sequence number (or -1 if unknown),\n 'decoded_claim': (bool) whether or not the claim value was decoded,\n 'height': (int) claim height,\n 'depth': (int) claim depth,\n 'has_signature': (bool) included if decoded_claim\n 'name': (str) claim name,\n 'permanent_url': (str) permanent url of the claim,\n 'channel_name': (str) channel name if claim is in a channel\n 'supports: (list) list of supports [{'txid': (str) txid,\n 'nout': (int) nout,\n 'amount': (float) amount}]\n 'txid': (str) claim txid,\n 'nout': (str) claim nout,\n 'signature_is_valid': (bool), included if has_signature,\n 'value': ClaimDict if decoded, otherwise hex string\n }\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Resolve a claim",
|
|
"curl": "curl -d'{\"method\": \"resolve\", \"params\": {\"urls\": [\"astream#ebed8d1668d259c06c1d8db114e9bb8a882e70e9\"]}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet resolve astream#ebed8d1668d259c06c1d8db114e9bb8a882e70e9",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"resolve\", \"params\": {\"urls\": [\"astream#ebed8d1668d259c06c1d8db114e9bb8a882e70e9\"]}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"astream#ebed8d1668d259c06c1d8db114e9bb8a882e70e9\": {\n \"address\": \"mqqphvUE5WQRK2ZbXq4nCxRHycZZL71ksV\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#a/astream#e\",\n \"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\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\": 1569257570,\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#ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\n \"short_url\": \"lbry://astream#e\",\n \"signing_channel\": {\n \"address\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#a\",\n \"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\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\": 1569257569,\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#a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"short_url\": \"lbry://@channel#a\",\n \"timestamp\": 1569257569,\n \"txid\": \"f32d6f3bad6ae416714f06902939b82baa053f821431c38b47541e52351665e5\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32\",\n \"public_key_id\": \"mzYaWmhuYfprZDR9EWSYb7JxhPDTFhRQgo\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1569257570,\n \"txid\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp7rhvd_bl\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "routing_table_get",
|
|
"description": "Get DHT routing information",
|
|
"arguments": [],
|
|
"returns": "(dict) dictionary containing routing and peer information\n {\n \"buckets\": {\n <bucket index>: [\n {\n \"address\": (str) peer address,\n \"udp_port\": (int) peer udp port,\n \"tcp_port\": (int) peer tcp port,\n \"node_id\": (str) peer node id,\n }\n ]\n },\n \"node_id\": (str) the local dht node id\n }",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "status",
|
|
"description": "Get daemon status",
|
|
"arguments": [],
|
|
"returns": "(dict) lbrynet-daemon status\n {\n 'installation_id': (str) installation id - base58,\n 'is_running': (bool),\n 'skipped_components': (list) [names of skipped components (str)],\n 'startup_status': { Does not include components which have been skipped\n 'blob_manager': (bool),\n 'blockchain_headers': (bool),\n 'database': (bool),\n 'dht': (bool),\n 'exchange_rate_manager': (bool),\n 'hash_announcer': (bool),\n 'peer_protocol_server': (bool),\n 'stream_manager': (bool),\n 'upnp': (bool),\n 'wallet': (bool),\n },\n 'connection_status': {\n 'code': (str) connection status code,\n 'message': (str) connection status message\n },\n 'blockchain_headers': {\n 'downloading_headers': (bool),\n 'download_progress': (float) 0-100.0\n },\n 'wallet': {\n 'blocks': (int) local blockchain height,\n 'blocks_behind': (int) remote_height - local_height,\n 'best_blockhash': (str) block hash of most recent block,\n 'is_encrypted': (bool),\n 'is_locked': (bool),\n 'connected_servers': (list) [\n {\n 'host': (str) server hostname,\n 'port': (int) server port,\n 'latency': (int) milliseconds\n }\n ],\n },\n 'dht': {\n 'node_id': (str) lbry dht node id - hex encoded,\n 'peers_in_routing_table': (int) the number of peers in the routing table,\n },\n 'blob_manager': {\n 'finished_blobs': (int) number of finished blobs in the blob manager,\n 'connections': {\n 'incoming_bps': {\n <source ip and tcp port>: (int) bytes per second received,\n },\n 'outgoing_bps': {\n <destination ip and tcp port>: (int) bytes per second sent,\n },\n 'total_outgoing_mps': (float) megabytes per second sent,\n 'total_incoming_mps': (float) megabytes per second received,\n 'time': (float) timestamp\n }\n },\n 'hash_announcer': {\n 'announce_queue_size': (int) number of blobs currently queued to be announced\n },\n 'stream_manager': {\n 'managed_files': (int) count of files in the stream manager,\n },\n 'upnp': {\n 'aioupnp_version': (str),\n 'redirects': {\n <TCP | UDP>: (int) external_port,\n },\n 'gateway': (str) manufacturer and model,\n 'dht_redirect_set': (bool),\n 'peer_redirect_set': (bool),\n 'external_ip': (str) external ip address,\n }\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Get status",
|
|
"curl": "curl -d'{\"method\": \"status\", \"params\": {}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet status",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"status\", \"params\": {}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"blob_manager\": {\n \"connections\": {\n \"incoming_bps\": {},\n \"outgoing_bps\": {},\n \"time\": 688458.591165067,\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\": \"NojpYmvo438LSLqw5L4tHTQgBuamMpLd92rWvHavywauMqEq6YAgeBAdiF5iowsAR\",\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\": \"2f40996e8ba0ff6f000ad05e6dbb09d976911d8865c540952e2e4f9f4fa4290f\",\n \"blocks\": 206,\n \"blocks_behind\": 0,\n \"connected_servers\": [\n {\n \"host\": \"localhost\",\n \"latency\": 0.01,\n \"port\": 50002\n }\n ],\n \"is_encrypted\": false,\n \"is_locked\": false\n }\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "stop",
|
|
"description": "Stop lbrynet API server.",
|
|
"arguments": [],
|
|
"returns": "(string) Shutdown message",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "version",
|
|
"description": "Get lbrynet API server version information",
|
|
"arguments": [],
|
|
"returns": "(dict) Dictionary of lbry version information\n {\n 'processor': (str) processor type,\n 'python_version': (str) python version,\n 'platform': (str) platform string,\n 'os_release': (str) os release string,\n 'os_system': (str) os name,\n 'lbrynet_version': (str) lbrynet version,\n 'torba_version': (str) torba version,\n 'build': (str) \"dev\" | \"qa\" | \"rc\" | \"release\",\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Get version",
|
|
"curl": "curl -d'{\"method\": \"version\", \"params\": {}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet version",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"version\", \"params\": {}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"build\": \"dev\",\n \"desktop\": \"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.41.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}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"account": {
|
|
"doc": "Create, modify and inspect wallet accounts.",
|
|
"commands": [
|
|
{
|
|
"name": "account_add",
|
|
"description": "Add a previously created account from a seed, private key or public key (read-only).\nSpecify --single_key for single address or vanity address accounts.",
|
|
"arguments": [
|
|
{
|
|
"name": "account_name",
|
|
"type": "str",
|
|
"description": "name of the account to add",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "seed",
|
|
"type": "str",
|
|
"description": "seed to generate new account from",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "private_key",
|
|
"type": "str",
|
|
"description": "private key for new account",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "public_key",
|
|
"type": "str",
|
|
"description": "public key for new account",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "single_key",
|
|
"type": "bool",
|
|
"description": "create single key account, default is multi-key",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"id\": \"account_id\",\n \"is_default\": \"this account is used by default\",\n \"ledger\": \"name of crypto currency and network\",\n \"name\": \"optional account name\",\n \"seed\": \"human friendly words from which account can be recreated\",\n \"encrypted\": \"if account is encrypted\",\n \"private_key\": \"extended private key\",\n \"public_key\": \"extended public key\",\n \"address_generator\": \"settings for generating addresses\",\n \"modified_on\": \"date of last modification to account settings\"\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Add an account from seed",
|
|
"curl": "curl -d'{\"method\": \"account_add\", \"params\": {\"account_name\": \"new account\", \"seed\": \"sorry flee gown suffer spike describe exercise wool alpha copper monitor size\", \"single_key\": false}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet account add \"new account\" --seed=\"sorry flee gown suffer spike describe exercise wool alpha copper monitor size\"",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_add\", \"params\": {\"account_name\": \"new account\", \"seed\": \"sorry flee gown suffer spike describe exercise wool alpha copper monitor size\", \"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\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1569257536.923754,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPe2V9SJN7nLMebwticCtsiLJcx7sdckaP38qs3HRZWHZMbMVaCXAK4xCM4nHZzraKmsU1VLJMggzzELeqjVFZVHHHt4bKP36\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XVWwKx2iBk1mAyQemY5nHduQEduw32Nmsd6dfgF9gnBDmUdZg3TtLf2aSuQJDHgdGhFYFmUGtXA7mXSN7t4VitUf5S2Zsvt\",\n \"seed\": \"sorry flee gown suffer spike describe exercise wool alpha copper monitor size\"\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "account_balance",
|
|
"description": "Return the balance of an account",
|
|
"arguments": [
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "If provided only the balance for this account will be given. Otherwise default account.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "balance for specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "confirmations",
|
|
"type": "int",
|
|
"description": "Only include transactions with this many confirmed blocks.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "reserved_subtotals",
|
|
"type": "bool",
|
|
"description": "Include detailed reserved balances on claims, tips and supports.",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(decimal) amount of lbry credits in wallet",
|
|
"examples": [
|
|
{
|
|
"title": "Get default account balance",
|
|
"curl": "curl -d'{\"method\": \"account_balance\", \"params\": {\"reserved_subtotals\": false}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet account balance",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_balance\", \"params\": {\"reserved_subtotals\": false}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"available\": \"7.999876\",\n \"reserved\": \"0.0\",\n \"reserved_subtotals\": null,\n \"total\": \"7.999876\"\n }\n}"
|
|
},
|
|
{
|
|
"title": "Get balance for specific account by id",
|
|
"curl": "curl -d'{\"method\": \"account_balance\", \"params\": {\"account_id\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\", \"reserved_subtotals\": false}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet account balance \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\"",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_balance\", \"params\": {\"account_id\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\", \"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}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "account_create",
|
|
"description": "Create a new account. Specify --single_key if you want to use\nthe same address for all transactions (not recommended).",
|
|
"arguments": [
|
|
{
|
|
"name": "account_name",
|
|
"type": "str",
|
|
"description": "name of the account to create",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "single_key",
|
|
"type": "bool",
|
|
"description": "create single key account, default is multi-key",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"id\": \"account_id\",\n \"is_default\": \"this account is used by default\",\n \"ledger\": \"name of crypto currency and network\",\n \"name\": \"optional account name\",\n \"seed\": \"human friendly words from which account can be recreated\",\n \"encrypted\": \"if account is encrypted\",\n \"private_key\": \"extended private key\",\n \"public_key\": \"extended public key\",\n \"address_generator\": \"settings for generating addresses\",\n \"modified_on\": \"date of last modification to account settings\"\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Create an account",
|
|
"curl": "curl -d'{\"method\": \"account_create\", \"params\": {\"account_name\": \"generated account\", \"single_key\": false}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet account create \"generated account\"",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_create\", \"params\": {\"account_name\": \"generated account\", \"single_key\": false}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"address_generator\": {\n \"change\": {\n \"gap\": 6,\n \"maximum_uses_per_address\": 1\n },\n \"name\": \"deterministic-chain\",\n \"receiving\": {\n \"gap\": 20,\n \"maximum_uses_per_address\": 1\n }\n },\n \"encrypted\": false,\n \"id\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1569257536.747635,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPe2V9SJN7nLMebwticCtsiLJcx7sdckaP38qs3HRZWHZMbMVaCXAK4xCM4nHZzraKmsU1VLJMggzzELeqjVFZVHHHt4bKP36\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XVWwKx2iBk1mAyQemY5nHduQEduw32Nmsd6dfgF9gnBDmUdZg3TtLf2aSuQJDHgdGhFYFmUGtXA7mXSN7t4VitUf5S2Zsvt\",\n \"seed\": \"sorry flee gown suffer spike describe exercise wool alpha copper monitor size\"\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "account_decrypt",
|
|
"description": "Decrypt an encrypted account, this will remove the wallet password. The account must be unlocked to decrypt it",
|
|
"arguments": [
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id for the account to decrypt",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(bool) true if wallet is decrypted, otherwise false",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "account_encrypt",
|
|
"description": "Encrypt an unencrypted account with a password",
|
|
"arguments": [
|
|
{
|
|
"name": "new_password",
|
|
"type": "str",
|
|
"description": "password to encrypt account",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id for the account to encrypt, encrypts default account if not provided",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(bool) true if wallet is decrypted, otherwise false",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "account_fund",
|
|
"description": "Transfer some amount (or --everything) to an account from another\naccount (can be the same account). Amounts are interpreted as LBC.\nYou can also spread the transfer across a number of --outputs (cannot\nbe used together with --everything).",
|
|
"arguments": [
|
|
{
|
|
"name": "to_account",
|
|
"type": "str",
|
|
"description": "send to this account",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "from_account",
|
|
"type": "str",
|
|
"description": "spend from this account",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "amount",
|
|
"type": "str",
|
|
"description": "the amount to transfer lbc",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "everything",
|
|
"type": "bool",
|
|
"description": "transfer everything (excluding claims), default: false.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "outputs",
|
|
"type": "int",
|
|
"description": "split payment across many outputs, default: 1.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "limit operation to specific wallet.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "broadcast",
|
|
"type": "bool",
|
|
"description": "actually broadcast the transaction, default: false.",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"txid\": \"hash of transaction in hex\",\n \"height\": \"block where transaction was recorded\",\n \"inputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"outputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"total_input\": \"sum of inputs as a decimal\",\n \"total_output\": \"sum of outputs, sans fee, as a decimal\",\n \"total_fee\": \"fee amount\",\n \"hex\": \"entire transaction encoded in hex\"\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Transfer 2 LBC from default account to specific account",
|
|
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"to_account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet account fund --to_account=\"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\" --amount=2.0 --broadcast",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000015defa5f98290c9cd5e3b56c30cf8ba90f4dc7df6423a387454c518609fe3d321010000006a47304402201cdf69509091643e97aaad1490d36b61b3f105cb5c0d8cdfaf24705ee7e2be7b02203cdfe31ef74b36fa87ae50d5082d3feb7fcf135d0d2058d78b5bcf7a44e69175012102eae03c5c5672d468f6235862b515086e899ef7656daeee3826f6b8884c3f3163ffffffff0200c2eb0b000000001976a9142c2c9f4764ffebdd615dd8e448b6bcdad4ad6c9888ac90d7ae2f000000001976a914dc60627811f2576e34027c3a44a2e880b041ad3188ac00000000\",\n \"inputs\": [\n {\n \"address\": \"n2ThhAh4zrH4CZFa34rTE7dLebRk9rFGCx\",\n \"amount\": \"10.0\",\n \"confirmations\": 6,\n \"height\": 201,\n \"is_change\": false,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1569257568,\n \"txid\": \"21d3e39f6018c55474383a42f67ddcf490baf80cc3563b5ecdc99082f9a5ef5d\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mjYXUu3nt8omp36T2xDgm2r9ZaRZQr6hXj\",\n \"amount\": \"2.0\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"0299b85a0e411f806ff210904fc52075e8309de1f53d2b4f821b81894c5a0583\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"n1cCRBMAxWtrVzQJN9T8syLDRA131yKd8U\",\n \"amount\": \"7.999876\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"0299b85a0e411f806ff210904fc52075e8309de1f53d2b4f821b81894c5a0583\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000124\",\n \"total_input\": \"10.0\",\n \"total_output\": \"9.999876\",\n \"txid\": \"0299b85a0e411f806ff210904fc52075e8309de1f53d2b4f821b81894c5a0583\"\n }\n}"
|
|
},
|
|
{
|
|
"title": "Spread LBC between multiple addresses",
|
|
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"to_account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\", \"from_account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet account fund --to_account=\"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\" --from_account=\"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\" --amount=1.5 --outputs=2 --broadcast",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\", \"from_account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"010000000183055a4c89811b824f2b3df5e19d30e87520c54f9010f26f801f410e5ab89902000000006b483045022100bb1e19fe88df0a37944c500c8970a3fce8ec3d3a1b75458177af1ba86b2a6dc9022037a07effad6b798d4244c003be098dab78712d8c87e59e05b88f529986d2ed5c012103ecafe60391b0ace02608477110a6ab13eb74ec2eb1676653e640bafb9692c9b7ffffffff03c0687804000000001976a9146f644e713c1e89ce6fc3c63be9ce050810e1c1b388acc0687804000000001976a9146f644e713c1e89ce6fc3c63be9ce050810e1c1b388ac6cb9fa02000000001976a91441eebfcf17b2cb5b03e63795ba171c782d053d7288ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mjYXUu3nt8omp36T2xDgm2r9ZaRZQr6hXj\",\n \"amount\": \"2.0\",\n \"confirmations\": 1,\n \"height\": 207,\n \"is_change\": false,\n \"is_mine\": true,\n \"nout\": 0,\n \"timestamp\": 1569257569,\n \"txid\": \"0299b85a0e411f806ff210904fc52075e8309de1f53d2b4f821b81894c5a0583\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mqfwTkyvQ4BZxnFevJCVxhWWmuU16irkw2\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"984a6bdfc7f16e6b6e2b4b88a09cd238882d7a0e05a2d690c1b33754b54dc33b\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mqfwTkyvQ4BZxnFevJCVxhWWmuU16irkw2\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"984a6bdfc7f16e6b6e2b4b88a09cd238882d7a0e05a2d690c1b33754b54dc33b\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mmXaE7SuPpmJm4keYBroySVkhaEW9nKJXc\",\n \"amount\": \"0.499859\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 2,\n \"timestamp\": null,\n \"txid\": \"984a6bdfc7f16e6b6e2b4b88a09cd238882d7a0e05a2d690c1b33754b54dc33b\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000141\",\n \"total_input\": \"2.0\",\n \"total_output\": \"1.999859\",\n \"txid\": \"984a6bdfc7f16e6b6e2b4b88a09cd238882d7a0e05a2d690c1b33754b54dc33b\"\n }\n}"
|
|
},
|
|
{
|
|
"title": "Transfer all LBC to a specified account",
|
|
"curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"from_account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\", \"everything\": true, \"broadcast\": true}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet account fund --from_account=\"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\" --everything --broadcast",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"from_account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\", \"everything\": true, \"broadcast\": true}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000033bc34db55437b3c190d6a2050e7a2d8838d29ca0884b2b6e6b6ef1c7df6b4a98000000006b4830450221008318453201a309a91bcd68197c0f803b7fabe3d75910d2e2b036efa7fc1899bf02204e60c265a1d43fcde6bdc8f20e9a1e7e516b6a4482c4612629a92e6c7b5b309a012102192d0a6cf1bdd9121afdfa0175915f08a51abe904efb24c9fb15841b87667a1fffffffff3bc34db55437b3c190d6a2050e7a2d8838d29ca0884b2b6e6b6ef1c7df6b4a98010000006a47304402201890b9ec2eb3e5b80b2fa4ffdbd660287d19ac38d980b302e73fd536678ddaac02203459fe50bde06e9edcb9959fb9bdff1b952465275e180bde6d13e2fcd5ac11ca012102192d0a6cf1bdd9121afdfa0175915f08a51abe904efb24c9fb15841b87667a1fffffffff3bc34db55437b3c190d6a2050e7a2d8838d29ca0884b2b6e6b6ef1c7df6b4a98020000006b483045022100d09a8871c8937e133a731a3ade6e7f47abe08102f5782652e17453ea010d2df902207af2589d1287d7408476bcf6cdb6f5685dc5fd09f2d6a2b1f5c821d4647a73cb012103bd5b353d4c2c84b686ec4e40ab4a90bd3bbb85cebfeccf50f92df47696f78b09ffffffff015027eb0b000000001976a91415b3a52d08af6462e338897119a66f5868ff5aec88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mqfwTkyvQ4BZxnFevJCVxhWWmuU16irkw2\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": false,\n \"is_mine\": true,\n \"nout\": 0,\n \"timestamp\": 1569257569,\n \"txid\": \"984a6bdfc7f16e6b6e2b4b88a09cd238882d7a0e05a2d690c1b33754b54dc33b\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mqfwTkyvQ4BZxnFevJCVxhWWmuU16irkw2\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": false,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1569257569,\n \"txid\": \"984a6bdfc7f16e6b6e2b4b88a09cd238882d7a0e05a2d690c1b33754b54dc33b\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mmXaE7SuPpmJm4keYBroySVkhaEW9nKJXc\",\n \"amount\": \"0.499859\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": false,\n \"is_mine\": true,\n \"nout\": 2,\n \"timestamp\": 1569257569,\n \"txid\": \"984a6bdfc7f16e6b6e2b4b88a09cd238882d7a0e05a2d690c1b33754b54dc33b\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mhVhh3v1qx43icPgGYJBwT2gghqKRFfzN7\",\n \"amount\": \"1.999604\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"c4c66da7c7fa2f77fb19de3ae927504cd7064e9ba9c392f9a267597cc0231027\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000255\",\n \"total_input\": \"1.999859\",\n \"total_output\": \"1.999604\",\n \"txid\": \"c4c66da7c7fa2f77fb19de3ae927504cd7064e9ba9c392f9a267597cc0231027\"\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "account_list",
|
|
"description": "List details of all of the accounts or a specific account.",
|
|
"arguments": [
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "If provided only the balance for this account will be given",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "accounts in specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "confirmations",
|
|
"type": "int",
|
|
"description": "required confirmations (default: 0)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "include_claims",
|
|
"type": "bool",
|
|
"description": "include claims, requires than a LBC account is specified (default: false)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "show_seed",
|
|
"type": "bool",
|
|
"description": "show the seed for the account",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"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 ]",
|
|
"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\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"is_default\": true,\n \"name\": \"Account #mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"preferences\": {\n \"theme\": \"dark\"\n },\n \"public_key\": \"tpubD6NzVbkrYhZ4XZTV6V4Jsa2c8JUrRTkPUXviok1RcphR64gbRe4L9YntcJ1qv8rq3qFC4WPenENZy5pjtWV5yYQaD3MJDUHgRQ2169V6p14\",\n \"satoshis\": 1000000000\n }\n ]\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "account_lock",
|
|
"description": "Lock an unlocked account",
|
|
"arguments": [
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id for the account to lock",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(bool) true if account is locked, otherwise false",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "account_max_address_gap",
|
|
"description": "Finds ranges of consecutive addresses that are unused and returns the length\nof the longest such range: for change and receiving address chains. This is\nuseful to figure out ideal values to set for 'receiving_gap' and 'change_gap'\naccount settings.",
|
|
"arguments": [
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "account for which to get max gaps",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(map) maximum gap for change and receiving addresses",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "account_remove",
|
|
"description": "Remove an existing account.",
|
|
"arguments": [
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id of the account to remove",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"id\": \"account_id\",\n \"is_default\": \"this account is used by default\",\n \"ledger\": \"name of crypto currency and network\",\n \"name\": \"optional account name\",\n \"seed\": \"human friendly words from which account can be recreated\",\n \"encrypted\": \"if account is encrypted\",\n \"private_key\": \"extended private key\",\n \"public_key\": \"extended public key\",\n \"address_generator\": \"settings for generating addresses\",\n \"modified_on\": \"date of last modification to account settings\"\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Remove an account",
|
|
"curl": "curl -d'{\"method\": \"account_remove\", \"params\": {\"account_id\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\"}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet account remove mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_remove\", \"params\": {\"account_id\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\"}}).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\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1569257536.747635,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPe2V9SJN7nLMebwticCtsiLJcx7sdckaP38qs3HRZWHZMbMVaCXAK4xCM4nHZzraKmsU1VLJMggzzELeqjVFZVHHHt4bKP36\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XVWwKx2iBk1mAyQemY5nHduQEduw32Nmsd6dfgF9gnBDmUdZg3TtLf2aSuQJDHgdGhFYFmUGtXA7mXSN7t4VitUf5S2Zsvt\",\n \"seed\": \"sorry flee gown suffer spike describe exercise wool alpha copper monitor size\"\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "account_send",
|
|
"description": "Send the same number of credits to multiple addresses.",
|
|
"arguments": [
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "account to fund the transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "preview",
|
|
"type": "bool",
|
|
"description": "do not broadcast the transaction",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"txid\": \"hash of transaction in hex\",\n \"height\": \"block where transaction was recorded\",\n \"inputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"outputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"total_input\": \"sum of inputs as a decimal\",\n \"total_output\": \"sum of outputs, sans fee, as a decimal\",\n \"total_fee\": \"fee amount\",\n \"hex\": \"entire transaction encoded in hex\"\n }",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "account_set",
|
|
"description": "Change various settings on an account.",
|
|
"arguments": [
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id of the account to change",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "default",
|
|
"type": "bool",
|
|
"description": "make this account the default",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "new_name",
|
|
"type": "str",
|
|
"description": "new name for the account",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "receiving_gap",
|
|
"type": "int",
|
|
"description": "set the gap for receiving addresses",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "receiving_max_uses",
|
|
"type": "int",
|
|
"description": "set the maximum number of times to use a receiving address",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "change_gap",
|
|
"type": "int",
|
|
"description": "set the gap for change addresses",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "change_max_uses",
|
|
"type": "int",
|
|
"description": "set the maximum number of times to use a change address",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"id\": \"account_id\",\n \"is_default\": \"this account is used by default\",\n \"ledger\": \"name of crypto currency and network\",\n \"name\": \"optional account name\",\n \"seed\": \"human friendly words from which account can be recreated\",\n \"encrypted\": \"if account is encrypted\",\n \"private_key\": \"extended private key\",\n \"public_key\": \"extended public key\",\n \"address_generator\": \"settings for generating addresses\",\n \"modified_on\": \"date of last modification to account settings\"\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Modify maximum number of times a change address can be reused",
|
|
"curl": "curl -d'{\"method\": \"account_set\", \"params\": {\"account_id\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\", \"default\": false, \"change_max_uses\": 10}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet account set mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY --change_max_uses=10",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_set\", \"params\": {\"account_id\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\", \"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\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1569257536.9968722,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPe2V9SJN7nLMebwticCtsiLJcx7sdckaP38qs3HRZWHZMbMVaCXAK4xCM4nHZzraKmsU1VLJMggzzELeqjVFZVHHHt4bKP36\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XVWwKx2iBk1mAyQemY5nHduQEduw32Nmsd6dfgF9gnBDmUdZg3TtLf2aSuQJDHgdGhFYFmUGtXA7mXSN7t4VitUf5S2Zsvt\",\n \"seed\": \"sorry flee gown suffer spike describe exercise wool alpha copper monitor size\"\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "account_unlock",
|
|
"description": "Unlock an encrypted account",
|
|
"arguments": [
|
|
{
|
|
"name": "password",
|
|
"type": "str",
|
|
"description": "password to use for unlocking",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id for the account to unlock, unlocks default account if not provided",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(bool) true if account is unlocked, otherwise false",
|
|
"examples": []
|
|
}
|
|
]
|
|
},
|
|
"address": {
|
|
"doc": "List, generate and verify addresses.",
|
|
"commands": [
|
|
{
|
|
"name": "address_is_mine",
|
|
"description": "Checks if an address is associated with the current wallet.",
|
|
"arguments": [
|
|
{
|
|
"name": "address",
|
|
"type": "str",
|
|
"description": "address to check",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id of the account to use",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(bool) true, if address is associated with current wallet",
|
|
"examples": [
|
|
{
|
|
"title": "Check if address is mine",
|
|
"curl": "curl -d'{\"method\": \"address_is_mine\", \"params\": {\"address\": \"msmeprZxgFfL1KuUrARTqbH3wFLeNMQ59j\"}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet address is_mine msmeprZxgFfL1KuUrARTqbH3wFLeNMQ59j",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_is_mine\", \"params\": {\"address\": \"msmeprZxgFfL1KuUrARTqbH3wFLeNMQ59j\"}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": true\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "address_list",
|
|
"description": "List account addresses or details of single address.",
|
|
"arguments": [
|
|
{
|
|
"name": "address",
|
|
"type": "str",
|
|
"description": "just show details for single address",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id of the account to use",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "page",
|
|
"type": "int",
|
|
"description": "page to return during paginating",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "page_size",
|
|
"type": "int",
|
|
"description": "number of items on page during pagination",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"page\": \"Page number of the current items.\",\n \"page_size\": \"Number of items to show on a page.\",\n \"total_pages\": \"Total number of pages.\",\n \"total_items\": \"Total number of items.\",\n \"items\": [\n \"an address in base58\"\n ]\n }",
|
|
"examples": [
|
|
{
|
|
"title": "List addresses in default account",
|
|
"curl": "curl -d'{\"method\": \"address_list\", \"params\": {}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet address list",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_list\", \"params\": {}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": [\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mh3DYavDQy1HjjwZ4M5SvpWhjH8Mp2kzxZ\",\n \"pubkey\": \"tpubDA9GDAntyJu4m2ijY3iNheH7D1fL9hmuR8UWq35TGe1EyibBCk7P8ZQydMSAbkg8Pnmp8EiiNxKXM8cRMx65u9aTyBJ2xcgDExG3mrcvmgo\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mhXfHBzEwXSWKBo51EwJYgzUt3Efxgcfhn\",\n \"pubkey\": \"tpubDA9GDAntyJu4Q4HUHsde1WRcXbgMgqV9SMy4WPobCcJFD86zc2xZbB1AmbduXVzLgmV4HiAKTGx7PpuA7664PAusBpJLjYVzSYtY9QBf2Xy\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mhdMWKT6mow4hMXDRxry61rbrSMhsMtWMb\",\n \"pubkey\": \"tpubDA9GDAntyJu4KX2wCdBebMNduc3PczdrmTX76Whpf833Lb5Je67J1ErxNUkheg4or7XDjiowCGvyBi5KRaxXwug9gNLKmZy4paqPkPoKZxk\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mhhf8ngREDKkkwRajFWwNxiXkCjLJJvTxb\",\n \"pubkey\": \"tpubDA9GDAntyJu4y4cHsQPTUzh3489Ag6idkVyCMJ93Aoo7XBBZFvckxAPHhDqHxDJnt2ismfMtJPMn1RfuyfhvaJm1YxMW2EixErUZX9xU77L\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mhxqLov5QDNMBmehjWGdAY5cMznq8ddmZY\",\n \"pubkey\": \"tpubDA9GDAntyJu4c8eApp8CiFXXPzmiyeYxYJ95wub9gooM2pfSbseSQJGat32sJAboKYb54kawSJzGTFY74yeXmCJQv1TG3XSK9rxRxzRFTSk\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mioPgTrtovHJCHr2yv2N5AVRVd4qCodvoG\",\n \"pubkey\": \"tpubDA9GDAntyJu4dDtWkgAkc22vwBUJMgDwRGuZjfBwdAQ8KqzC9TZJ5UjEQSVRM74VHCHR3nzqWG6eA7jqoLhmfBQQbZnjtKYkWF2v4hcps9M\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mjYXUu3nt8omp36T2xDgm2r9ZaRZQr6hXj\",\n \"pubkey\": \"tpubDA9GDAntyJu4NS5vfRcFe8ns88jnY8pkZfxBZWdSZkBCpvKtFAQXPZQYeaz5mTAx8ZQ4NiT9BvQPhCmNXxr7hCeP86pC6PvSSLJd6UBczxa\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mkKKAS933HDkpeSdSZqAQdYYgW9iGtG7JH\",\n \"pubkey\": \"tpubDA9GDAntyJu4ozhrXc2NoPwskujYa4qYe2qmeC6uuSmhFcTJsTTAteMedxF58FRq4VnbPHFbVyiMFRJD2nzZuZsyohqVwjDFbG2Dhqsig1W\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mknTbMjvqnAv9fNjySws6k3goYNeXh1J3i\",\n \"pubkey\": \"tpubDA9GDAntyJu4HQG2pcos48Sr92bwezWAr6kSN85J6miZfeXwAmoDGUfXU9TaqK6BjumA8KU5EzbSvqn1Uqg6xbZ3K1Xxc3uQtSs7jbnBctS\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mmMCeuzgtfnqLeraJ722EG95tqTc8E3Wdd\",\n \"pubkey\": \"tpubDA9GDAntyJu4F7ympoEe6cMs1BLPmQ1emwrH7nzKZGvEBghWKLYCKfVPiSGuvR2MrerWGDMfCfoqQGSEM3b4qp2JYWiPm5mEE5N8H4cDz8M\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mpRjfbfHBPvJHnR4zHM42YHUQxkoLpAKj5\",\n \"pubkey\": \"tpubDA9GDAntyJu4yP9Xfw1EFKpB5TzHuKgFaJqDtzzWZfwHLop46tZx259YqiftMR44arby9LLxnRh8Fbra56Lcu1RmSKdbGCChVrvsL2fbTH2\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mqaXCZuvX77HucuDgiuSUkC14UMsdGtyZx\",\n \"pubkey\": \"tpubDA9GDAntyJu4jqGQ2KMNkxMsH79Y6ogpRhyVBxzag6RZUfaBqshU5TrSuUhT1petnnjQqLx8LJqGjsuyZHAS2Qvc38HGYuRbfbFrJb6gvnN\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mqfwTkyvQ4BZxnFevJCVxhWWmuU16irkw2\",\n \"pubkey\": \"tpubDA9GDAntyJu4UG7hmpsFoXacfoXLdgsGNTKdEzL4WxSewUKnMXgXeiAw1FGB89fkd4g8hqxcmBRPj717ZVVuiJMqQNe1m3PqdryQoLoAQgT\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mqmkDpc9ThN7usQcKNUP7KetexXoDBTtFH\",\n \"pubkey\": \"tpubDA9GDAntyJu4MUgofZfyXXbgbzkba8tAa4GZuNECYkHwmd88qvrBkVxaLsKuoWQy94UaqNHCGgZLNsRoVPHMEb6Bp7aDT38QJYRzewvdc44\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mqp16YnzyJKTo6LVCX84TFRQhYUbNen5oL\",\n \"pubkey\": \"tpubDA9GDAntyJu4VhLGgWVeDX3eCcaKgLQGBs36yuT1NYJgCkNQWarxqT1And66RbcrFfDUy2CL33NB8DUPUeppRYqWk7aMrQvzrFvM4K6FAAF\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mrNgBAWPKFa5MYEEdZbLzez8Vcqv9wbSR2\",\n \"pubkey\": \"tpubDA9GDAntyJu4TWs8RkfA7DAz5V5Ggh8jRGuAz5n1Goz2yBpEaU7fk1aS7NmKrcasu6bpMAA9bN8LvRHkJjyKfyDkcEQt15DFif5c8hdSe2d\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mrTcaNQy9UBPrzsNsssGwGjvqfgxK73mSw\",\n \"pubkey\": \"tpubDA9GDAntyJu4JmLwsYJvGiVDXHXNNyogyWMWeigaYt98bK55JCbXB5KeV886FwYwVgvwMCBNvT9qFk3bixxL1g6hL8R1iiAeupQ8EXG2dT8\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mrXpiZVCZ4WpyaUvxDUtGz7ZVPwX5ptmGQ\",\n \"pubkey\": \"tpubDA9GDAntyJu4QYkvGz2s72iF7XPUctCsDpBAQFQzX4DnWa7x5ExjRZsb2PqcQNKUPf3N7bCm8RxVjVBHPyqJ9vLe1CqHQ4hxYc1agXf8GCt\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mt1B87S1WeGt75JsudFfCJic2rf9HTPHfD\",\n \"pubkey\": \"tpubDA9GDAntyJu4toz2QvskvPb5w1e3vCzW55YF2no9QXWDytcwFroodRrHNbnPg9FzP7KNE2xWnDHsUf3HUMjmzNCKPHfn5NQ8Cb1G2vod38P\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mufiqCBX3FZKsaxxS6zNFh5xkLScMVLFKj\",\n \"pubkey\": \"tpubDA9GDAntyJu4a5NypxBsHLoTv1mrdfQhMV4SSFhR1x9whfEWuPwUWG9ZkQNt2CnQhxSGoCAzuZ8Rk4PqjbCYVJweCu8HSuzhCah6aBeXU4R\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mvphVUnqUjoyeKKvTzXLDBC8yByPUKXn2Q\",\n \"pubkey\": \"tpubDA9GDAntyJu4scRRPX5p2ijyB5wj5cYSfNcZNgYL96wWrGPySapHHuXa7bxTSpZgGonAbahVNm5QgDFMCk4NSGVHknuVv993A4jDyQ2oT9p\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mzgy2HsLH63QQhkegfu6j4SF6VpY7mcrB7\",\n \"pubkey\": \"tpubDA9GDAntyJu4SKDSCAH2DK9YZTxoqRz5b3e5EZqFeGwEBiqiZcKFZQ3KWZ3feuCfSmo9afiAeVnvVqr4nuKKEHJ5JUfk9nkvPnVHAVeR1oh\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mzxVceUHEr6Mte6Tiy6H5xxYVfXHkZgGvw\",\n \"pubkey\": \"tpubDA9GDAntyJu4hLZaCSaGk15TEPeYke7DQfLgfHK46ZsLwvY9sQpiFayBvTkzNBT2aSpLAWzvz1UtZaN3stndsj3FT6Dem5PEGNPAPQNMynY\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"n3ECevVSCDthuaQHuXH6nqe1rNhLYffgqQ\",\n \"pubkey\": \"tpubDA9GDAntyJu4EiGje1u6CvtSdRvkhbZgtGHCqnibpJmVB2enrVMGzCLRywTz8fvyYLLvZVfPRQYzu3r6nYXAtrnRAKBHv8JAGVtTxQTjDpT\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"n3jyXJSxKXZ3HtkcdwwUmqMabCG6dzwRcF\",\n \"pubkey\": \"tpubDA9GDAntyJu52TXNKR8CYsRsHdkyuhvBgNFEVpn4yVRrYAqnxa5TALLUkgfWkwoTgChW5oPTetnXvSN41SDGFANMCjfy2TggH2A78mh4uae\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"n4qR8K7mhT7pAV5k86928REtBdo5cbHwqg\",\n \"pubkey\": \"tpubDA9GDAntyJu55V38Zs6h9eWbY21sUdTvTUL7J7p7SzoTGMfpSqWFsTacffKid6UEj5HfaxMXwhWgEpj4KfEi9usSbkavfPzesfCcASyS3Bb\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mh3u3hqtk6Vr5isonkCRVDAtSbTyMHF4qq\",\n \"pubkey\": \"tpubDA9GDAntyJu4Zqr2D23AXoYqm2rcSPS8po1dhQwi8Q7xx8WKBJK3U42LMYDZnmYGL7GSEq76LPJ8byzzbFWBTF8PyhXxCqHCkNvdxtABibD\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mhVhh3v1qx43icPgGYJBwT2gghqKRFfzN7\",\n \"pubkey\": \"tpubDA9GDAntyJu4NVQdrwCou1i3SLjU5S42q6FiYUCmNs3tqwRNbnLL7TPPWUBSWsP56PLDCPkUR7ZsMzycMSiMVaushNFwx3RvuHo8LNrbBT2\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mjMwqPKw4YiDoBY4jKmrjWR25DboFU1naH\",\n \"pubkey\": \"tpubDA9GDAntyJu4TedEcXKhNaz1xx6eSVAcqqBGExvNakb9Rwpxnr7Kv6j3U6LensSHZdZdaMDpFcwMccwoSgYAprvSjvYmLiC2dqmG1KPyBAh\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mkK6hjzpSDGDuKYZe9ur8VD8BhFXqRCoTp\",\n \"pubkey\": \"tpubDA9GDAntyJu4JccieRbTdmREbgtnGwXLxY7Rc9AH9nkxct4qCgcFz1Sn9UsGhWqsCpNbd4Cq3k8GZzT2bQ2bPFQ17XrYqnaRps2Xh322Q1y\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mn6R4sAVF19fhZc6evnwiT5mEeKJqMNdbr\",\n \"pubkey\": \"tpubDA9GDAntyJu51r3NQRswa8wUiT6C3wKPN6GN6EzQp7rnNHyKBqw83T4FaCGYG7uwE7MKHn2MgF6GnXYW6nQVj47462dPojSuUHsakqUsHAZ\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mnpzcMhFuAf7VjbF7N5hUz2VusiwhaBBNz\",\n \"pubkey\": \"tpubDA9GDAntyJu54iyazWsfGCmMxL69JNF9Fpx9cxjjzeWb3hgJz5iiZ9pvELJyMhh862Xb5pZYawjnaVBbm1Uu1mGDo5QNQVqM5muZLniBjbg\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mntZozJMPqEh2Fa6AQZijQzbcSoE7Zo8Go\",\n \"pubkey\": \"tpubDA9GDAntyJu4uFMYybQT57r6e5vqoaHCUtQzzQ9av4q31dFZR7wLBMbdHwuUK9GBKZCSn6ZZwgrFUQJYGgLxkzsd8o3k873DscJud5LYmzc\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mqqphvUE5WQRK2ZbXq4nCxRHycZZL71ksV\",\n \"pubkey\": \"tpubDA9GDAntyJu4mHmsayT9VHrXK73babFN7EXWwAtLfPYojG6yvso6tKn6jsVa1Pt51KuqEcVfEBoWRj9NbJJB5p9dopMUP15gZYNPWcFgXrS\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mr9vvxA5XUAadxvFuipP3P6WHfSm1fxaU1\",\n \"pubkey\": \"tpubDA9GDAntyJu4ETiA4vAoNzYxvgHkLrLxxCP5Guy2tMDdFGCSZZNtviJXQAee1qDLnCQJSaB6nRMRYDeRFiSEPdyunjDxt3uV4LNC2BXG5vh\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mrjJF2Uc3wLmLdmmZN77qpyGphUi7czpwc\",\n \"pubkey\": \"tpubDA9GDAntyJu4oApZCfGqG9pF1x6cVk2Fjz2NN7WndP4QUBUHzvJ3JDqcghXEXWBdWeAEa1whCd63wAuei8oztjUv2KbSo1kqWhoJTzzQ8N3\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"msmeprZxgFfL1KuUrARTqbH3wFLeNMQ59j\",\n \"pubkey\": \"tpubDA9GDAntyJu4bn2a1RfwiN3H5s7VQHi2QvcpjcDvU8Hmur8UAzLy5ndk92Dxzzfq8je3TXtbXjYaJ3XTReYbR9zLHYdYshsj3hKHuAaVtqN\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"pubkey\": \"tpubDA9GDAntyJu4K7U9neLRZDb6xuPNqbYvBebYvKJT6LBw8omcQ9rUW49uWZxVYn6FzjhwgpXGAhzHLiS2H463JLXtZv21AEw4Y4NC2JkDMRi\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mukhjdKfXebEvzkRCZVtPLCEVZgesvCf78\",\n \"pubkey\": \"tpubDA9GDAntyJu4soVH5wJkEFQ8TXsZDAfQP4d1XwpF1YFTv6PXXEAi2WuoGvYQ7JRyKWFnbTDeZiNychneY8PQUYgBhTPx9uWBvZBcTqRYeVc\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mvRsX8iHAcN11xn8c7quz9dLnF2HVgzrUV\",\n \"pubkey\": \"tpubDA9GDAntyJu4WiU1u7VbqdJAKe6xmijRGBgoyrTNhDvhgSZRDzi2mPM2KLgiKubWtntdrzfHdJu9QL4KhBiZKdNwrHeqBuSfQomJrJ3eddw\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mwp2JRHSx2UPeL9pXJP37e37UnUZkTLqC9\",\n \"pubkey\": \"tpubDA9GDAntyJu4zgGJCkXrMW3SRMgfgxtEjqua2tJQQ233ka6Ym9FFi94wBvrzoyA6Nb8ZViQCXAjoyzYAKMqxNzCW5WUy6mZDkRFsa21Z49N\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mxAjJMMcYTzQ7NFa9gSrhp1phREoqinDSk\",\n \"pubkey\": \"tpubDA9GDAntyJu5895hsT75ymSGf75kg7CaMG2aq1iaNAsG2aozj49fEqZqxHDSmYWdiTLDSsF96EPahKxfiqxaGLqcePVofsMpDbZbHS8mXcC\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mypWGhAjdSo4hjo1r34yYEDcmqNpDpEUEG\",\n \"pubkey\": \"tpubDA9GDAntyJu4R9ACPSiB7eLd9HrfBowAM4GGqo5MuCTrpFx7nrAXRdBLbNfDi9Z8VHvEg2FpAfzfLwPB5HtoekTB1up6b3pKsT54HEXcYKP\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"myxtxMgEjGrDoZV8BseGt3BEe9tqAMwnSn\",\n \"pubkey\": \"tpubDA9GDAntyJu4vjD3B2swduRijjCcP8dFDH8zZeeo1jDv9PdrYkAYfjHWTbBc9Hwom11cuPxR4dxejYw47cbhWkgn54zPKmJdd5hmVeRA5dh\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mzAwvWM3cBytvXrpjh6uz6t1dU7WQEMXG2\",\n \"pubkey\": \"tpubDA9GDAntyJu4g2cHwgPF4qwoKLiPTb2rKBBZ2Mx6nzqd6TR556UZjaw23Wi2ahxJfZ2VujexwW6DXJagvLJc2qQG2JYa3zeemGfh1t8zGTc\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"mzSVTViGNgTirETKQguZJ2XXXBA8pU8irF\",\n \"pubkey\": \"tpubDA9GDAntyJu4JuuZmjxB5ejYvXc2XcvgnEshhj9JtwXSe73M1UG7jpmogTqkf3WgauaEnRijp7CQzhTXY8TpntgKaXScoN5hYDqRzvYFVsp\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"n1cCRBMAxWtrVzQJN9T8syLDRA131yKd8U\",\n \"pubkey\": \"tpubDA9GDAntyJu4Ko9utP4CqiMMXgfmE5RxbpXJwaNTJCXFiqmytYd58QRx56L4TrHGyWGYVtipRd41zjptJXzor82iWfPUPqKKRhxtb9L2DFZ\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"n1w8oA5Pz1ZHMyUjWcgq8KvuiXCBqH7mcy\",\n \"pubkey\": \"tpubDA9GDAntyJu4UXfLtMqikkyFJdcTXQ8AXowzuZzmZzxZ1wM5ccXMHePYXM8KSk1VcBzuUcM5ZCdoe3n3wkpuQi79TjspJE1HsYSynS8Q5Mt\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"n1xsmyXBqY4Qu9n24fijs1yszWNf6AbWta\",\n \"pubkey\": \"tpubDA9GDAntyJu4epzHJvPBnUKMkZn67CC8ev4TGx3Hy75af9pyWCfwc2pqSCVnjAbN72Vc6YJoTc7VAEu2UGpR9G9tBCjTJLkpP41LAqhMLNc\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"n27DeaWN2MgS6J4Vyhwoq7b2NYNmJQvNUb\",\n \"pubkey\": \"tpubDA9GDAntyJu4NJTnSfE2ziB6D7GMYv2veGVtWyLHDtY3qmqfwUaWLF6fvS1LUNTar48A2jK8AEJJgtrHSvoKodb2XaeVDQFHFUKve7VYRc3\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"n2ThhAh4zrH4CZFa34rTE7dLebRk9rFGCx\",\n \"pubkey\": \"tpubDA9GDAntyJu4F1Ti4KD8ZM7zaVqNBPsjSaFSRC1dAraG3ZdqQVVuvg6aubjMjJgq1DTzNTmGEBQrtGYFigPpe8ZZSzvaTPeAyJ52Y2FfEJV\",\n \"used_times\": 1\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"n3dmAZZyHBtSLE11WtvrGcDAc48uXGe494\",\n \"pubkey\": \"tpubDA9GDAntyJu4QMjEyBh322S78mVKDeKG8iFtbSoLkwgBAi8ra74T76F4Rb2Mag7thYgtqGrTEn9jjYhLHvwLMazYDTLRUVV7Mhw8e4UiyGg\",\n \"used_times\": 0\n },\n {\n \"account\": \"mpjpuqshHMBxRQRtfrQ3D4sScj2JS3RyGg\",\n \"address\": \"n3k469AK6WEB27P1NnsAicfJawQkygwv9D\",\n \"pubkey\": \"tpubDA9GDAntyJu4jYZ2MFGCeJQggyiGxoenEGnPPjrgTtgoCCDmxTAedczTQJzauME5tYr1EYzkJZ3Pp1KoASt5QGYPAzWY9sKBBQ6Qk2RcWJG\",\n \"used_times\": 0\n }\n ]\n}"
|
|
},
|
|
{
|
|
"title": "List addresses in specified account",
|
|
"curl": "curl -d'{\"method\": \"address_list\", \"params\": {\"account_id\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\"}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet address list --account_id=\"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\"",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_list\", \"params\": {\"account_id\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\"}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": [\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mh3DYavDQy1HjjwZ4M5SvpWhjH8Mp2kzxZ\",\n \"pubkey\": \"tpubDA9GDAntyJu4m2ijY3iNheH7D1fL9hmuR8UWq35TGe1EyibBCk7P8ZQydMSAbkg8Pnmp8EiiNxKXM8cRMx65u9aTyBJ2xcgDExG3mrcvmgo\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mhXfHBzEwXSWKBo51EwJYgzUt3Efxgcfhn\",\n \"pubkey\": \"tpubDA9GDAntyJu4Q4HUHsde1WRcXbgMgqV9SMy4WPobCcJFD86zc2xZbB1AmbduXVzLgmV4HiAKTGx7PpuA7664PAusBpJLjYVzSYtY9QBf2Xy\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mhdMWKT6mow4hMXDRxry61rbrSMhsMtWMb\",\n \"pubkey\": \"tpubDA9GDAntyJu4KX2wCdBebMNduc3PczdrmTX76Whpf833Lb5Je67J1ErxNUkheg4or7XDjiowCGvyBi5KRaxXwug9gNLKmZy4paqPkPoKZxk\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mhhf8ngREDKkkwRajFWwNxiXkCjLJJvTxb\",\n \"pubkey\": \"tpubDA9GDAntyJu4y4cHsQPTUzh3489Ag6idkVyCMJ93Aoo7XBBZFvckxAPHhDqHxDJnt2ismfMtJPMn1RfuyfhvaJm1YxMW2EixErUZX9xU77L\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mhxqLov5QDNMBmehjWGdAY5cMznq8ddmZY\",\n \"pubkey\": \"tpubDA9GDAntyJu4c8eApp8CiFXXPzmiyeYxYJ95wub9gooM2pfSbseSQJGat32sJAboKYb54kawSJzGTFY74yeXmCJQv1TG3XSK9rxRxzRFTSk\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mioPgTrtovHJCHr2yv2N5AVRVd4qCodvoG\",\n \"pubkey\": \"tpubDA9GDAntyJu4dDtWkgAkc22vwBUJMgDwRGuZjfBwdAQ8KqzC9TZJ5UjEQSVRM74VHCHR3nzqWG6eA7jqoLhmfBQQbZnjtKYkWF2v4hcps9M\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mjYXUu3nt8omp36T2xDgm2r9ZaRZQr6hXj\",\n \"pubkey\": \"tpubDA9GDAntyJu4NS5vfRcFe8ns88jnY8pkZfxBZWdSZkBCpvKtFAQXPZQYeaz5mTAx8ZQ4NiT9BvQPhCmNXxr7hCeP86pC6PvSSLJd6UBczxa\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mkKKAS933HDkpeSdSZqAQdYYgW9iGtG7JH\",\n \"pubkey\": \"tpubDA9GDAntyJu4ozhrXc2NoPwskujYa4qYe2qmeC6uuSmhFcTJsTTAteMedxF58FRq4VnbPHFbVyiMFRJD2nzZuZsyohqVwjDFbG2Dhqsig1W\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mknTbMjvqnAv9fNjySws6k3goYNeXh1J3i\",\n \"pubkey\": \"tpubDA9GDAntyJu4HQG2pcos48Sr92bwezWAr6kSN85J6miZfeXwAmoDGUfXU9TaqK6BjumA8KU5EzbSvqn1Uqg6xbZ3K1Xxc3uQtSs7jbnBctS\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mmMCeuzgtfnqLeraJ722EG95tqTc8E3Wdd\",\n \"pubkey\": \"tpubDA9GDAntyJu4F7ympoEe6cMs1BLPmQ1emwrH7nzKZGvEBghWKLYCKfVPiSGuvR2MrerWGDMfCfoqQGSEM3b4qp2JYWiPm5mEE5N8H4cDz8M\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mpRjfbfHBPvJHnR4zHM42YHUQxkoLpAKj5\",\n \"pubkey\": \"tpubDA9GDAntyJu4yP9Xfw1EFKpB5TzHuKgFaJqDtzzWZfwHLop46tZx259YqiftMR44arby9LLxnRh8Fbra56Lcu1RmSKdbGCChVrvsL2fbTH2\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mqaXCZuvX77HucuDgiuSUkC14UMsdGtyZx\",\n \"pubkey\": \"tpubDA9GDAntyJu4jqGQ2KMNkxMsH79Y6ogpRhyVBxzag6RZUfaBqshU5TrSuUhT1petnnjQqLx8LJqGjsuyZHAS2Qvc38HGYuRbfbFrJb6gvnN\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mqfwTkyvQ4BZxnFevJCVxhWWmuU16irkw2\",\n \"pubkey\": \"tpubDA9GDAntyJu4UG7hmpsFoXacfoXLdgsGNTKdEzL4WxSewUKnMXgXeiAw1FGB89fkd4g8hqxcmBRPj717ZVVuiJMqQNe1m3PqdryQoLoAQgT\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mqmkDpc9ThN7usQcKNUP7KetexXoDBTtFH\",\n \"pubkey\": \"tpubDA9GDAntyJu4MUgofZfyXXbgbzkba8tAa4GZuNECYkHwmd88qvrBkVxaLsKuoWQy94UaqNHCGgZLNsRoVPHMEb6Bp7aDT38QJYRzewvdc44\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mqp16YnzyJKTo6LVCX84TFRQhYUbNen5oL\",\n \"pubkey\": \"tpubDA9GDAntyJu4VhLGgWVeDX3eCcaKgLQGBs36yuT1NYJgCkNQWarxqT1And66RbcrFfDUy2CL33NB8DUPUeppRYqWk7aMrQvzrFvM4K6FAAF\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mrNgBAWPKFa5MYEEdZbLzez8Vcqv9wbSR2\",\n \"pubkey\": \"tpubDA9GDAntyJu4TWs8RkfA7DAz5V5Ggh8jRGuAz5n1Goz2yBpEaU7fk1aS7NmKrcasu6bpMAA9bN8LvRHkJjyKfyDkcEQt15DFif5c8hdSe2d\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mrTcaNQy9UBPrzsNsssGwGjvqfgxK73mSw\",\n \"pubkey\": \"tpubDA9GDAntyJu4JmLwsYJvGiVDXHXNNyogyWMWeigaYt98bK55JCbXB5KeV886FwYwVgvwMCBNvT9qFk3bixxL1g6hL8R1iiAeupQ8EXG2dT8\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mrXpiZVCZ4WpyaUvxDUtGz7ZVPwX5ptmGQ\",\n \"pubkey\": \"tpubDA9GDAntyJu4QYkvGz2s72iF7XPUctCsDpBAQFQzX4DnWa7x5ExjRZsb2PqcQNKUPf3N7bCm8RxVjVBHPyqJ9vLe1CqHQ4hxYc1agXf8GCt\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mt1B87S1WeGt75JsudFfCJic2rf9HTPHfD\",\n \"pubkey\": \"tpubDA9GDAntyJu4toz2QvskvPb5w1e3vCzW55YF2no9QXWDytcwFroodRrHNbnPg9FzP7KNE2xWnDHsUf3HUMjmzNCKPHfn5NQ8Cb1G2vod38P\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mufiqCBX3FZKsaxxS6zNFh5xkLScMVLFKj\",\n \"pubkey\": \"tpubDA9GDAntyJu4a5NypxBsHLoTv1mrdfQhMV4SSFhR1x9whfEWuPwUWG9ZkQNt2CnQhxSGoCAzuZ8Rk4PqjbCYVJweCu8HSuzhCah6aBeXU4R\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mvphVUnqUjoyeKKvTzXLDBC8yByPUKXn2Q\",\n \"pubkey\": \"tpubDA9GDAntyJu4scRRPX5p2ijyB5wj5cYSfNcZNgYL96wWrGPySapHHuXa7bxTSpZgGonAbahVNm5QgDFMCk4NSGVHknuVv993A4jDyQ2oT9p\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mzgy2HsLH63QQhkegfu6j4SF6VpY7mcrB7\",\n \"pubkey\": \"tpubDA9GDAntyJu4SKDSCAH2DK9YZTxoqRz5b3e5EZqFeGwEBiqiZcKFZQ3KWZ3feuCfSmo9afiAeVnvVqr4nuKKEHJ5JUfk9nkvPnVHAVeR1oh\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"mzxVceUHEr6Mte6Tiy6H5xxYVfXHkZgGvw\",\n \"pubkey\": \"tpubDA9GDAntyJu4hLZaCSaGk15TEPeYke7DQfLgfHK46ZsLwvY9sQpiFayBvTkzNBT2aSpLAWzvz1UtZaN3stndsj3FT6Dem5PEGNPAPQNMynY\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"n3ECevVSCDthuaQHuXH6nqe1rNhLYffgqQ\",\n \"pubkey\": \"tpubDA9GDAntyJu4EiGje1u6CvtSdRvkhbZgtGHCqnibpJmVB2enrVMGzCLRywTz8fvyYLLvZVfPRQYzu3r6nYXAtrnRAKBHv8JAGVtTxQTjDpT\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"n3jyXJSxKXZ3HtkcdwwUmqMabCG6dzwRcF\",\n \"pubkey\": \"tpubDA9GDAntyJu52TXNKR8CYsRsHdkyuhvBgNFEVpn4yVRrYAqnxa5TALLUkgfWkwoTgChW5oPTetnXvSN41SDGFANMCjfy2TggH2A78mh4uae\",\n \"used_times\": 0\n },\n {\n \"account\": \"mgKc9YXykCnz5Mi1fbEW6pFKsuzTAXkJjY\",\n \"address\": \"n4qR8K7mhT7pAV5k86928REtBdo5cbHwqg\",\n \"pubkey\": \"tpubDA9GDAntyJu55V38Zs6h9eWbY21sUdTvTUL7J7p7SzoTGMfpSqWFsTacffKid6UEj5HfaxMXwhWgEpj4KfEi9usSbkavfPzesfCcASyS3Bb\",\n \"used_times\": 0\n }\n ]\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "address_unused",
|
|
"description": "Return an address containing no balance, will create\na new address if there is none.",
|
|
"arguments": [
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id of the account to use",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " \"an address in base58\"",
|
|
"examples": [
|
|
{
|
|
"title": "Get an unused address",
|
|
"curl": "curl -d'{\"method\": \"address_unused\", \"params\": {}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet address unused",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_unused\", \"params\": {}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": \"msmeprZxgFfL1KuUrARTqbH3wFLeNMQ59j\"\n}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"blob": {
|
|
"doc": "Blob management.",
|
|
"commands": [
|
|
{
|
|
"name": "blob_announce",
|
|
"description": "Announce blobs to the DHT",
|
|
"arguments": [
|
|
{
|
|
"name": "blob_hash",
|
|
"type": "str",
|
|
"description": "announce a blob, specified by blob_hash",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "stream_hash",
|
|
"type": "str",
|
|
"description": "announce all blobs associated with stream_hash",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "sd_hash",
|
|
"type": "str",
|
|
"description": "announce all blobs associated with sd_hash and the sd_hash itself",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(bool) true if successful",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "blob_delete",
|
|
"description": "Delete a blob",
|
|
"arguments": [
|
|
{
|
|
"name": "blob_hash",
|
|
"type": "str",
|
|
"description": "blob hash of the blob to delete",
|
|
"is_required": true
|
|
}
|
|
],
|
|
"returns": "(str) Success/fail message",
|
|
"examples": [
|
|
{
|
|
"title": "Delete a blob",
|
|
"curl": "curl -d'{\"method\": \"blob_delete\", \"params\": {\"blob_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\"}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet blob delete 0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"blob_delete\", \"params\": {\"blob_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\"}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": \"Deleted 0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\"\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "blob_get",
|
|
"description": "Download and return a blob",
|
|
"arguments": [
|
|
{
|
|
"name": "blob_hash",
|
|
"type": "str",
|
|
"description": "blob hash of the blob to get",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "timeout",
|
|
"type": "int",
|
|
"description": "timeout in number of seconds",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(str) Success/Fail message or (dict) decoded data",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "blob_list",
|
|
"description": "Returns blob hashes. If not given filters, returns all blobs known by the blob manager",
|
|
"arguments": [
|
|
{
|
|
"name": "needed",
|
|
"type": "bool",
|
|
"description": "only return needed blobs",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "finished",
|
|
"type": "bool",
|
|
"description": "only return finished blobs",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "uri",
|
|
"type": "str",
|
|
"description": "filter blobs by stream in a uri",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "stream_hash",
|
|
"type": "str",
|
|
"description": "filter blobs by stream hash",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "sd_hash",
|
|
"type": "str",
|
|
"description": "filter blobs by sd hash",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "page_size",
|
|
"type": "int",
|
|
"description": "results page size",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "page",
|
|
"type": "int",
|
|
"description": "page of results to return",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(list) List of blob hashes",
|
|
"examples": [
|
|
{
|
|
"title": "List your local blobs",
|
|
"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 \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"084b3a361ef86bd694e1fd772a9b51d1c2fc1ca3ba80427669963d7d1f7a6e7f010bcd3aca0400dd19ce73fb639db834\",\n \"5014600663c933ac4740fc7283ab7953ed6ffce48291b2d7d49c67416ae24ef2fb35cf2138f5f514e009918dca49b516\",\n \"811232e591a3ba6ce8835b39425a26d164c06dece3084115f4cfc18c3b6e00c61c96116a05e293ad0f7f3889612045ef\"\n ]\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "blob_reflect",
|
|
"description": "Reflects specified blobs",
|
|
"arguments": [
|
|
{
|
|
"name": "reflector_server",
|
|
"type": "str",
|
|
"description": "reflector address",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(list) reflected blob hashes",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "blob_reflect_all",
|
|
"description": "Reflects all saved blobs",
|
|
"arguments": [],
|
|
"returns": "(bool) true if successful",
|
|
"examples": []
|
|
}
|
|
]
|
|
},
|
|
"channel": {
|
|
"doc": "Create, update, abandon and list your channel claims.",
|
|
"commands": [
|
|
{
|
|
"name": "channel_abandon",
|
|
"description": "Abandon one of my channel claims.",
|
|
"arguments": [
|
|
{
|
|
"name": "claim_id",
|
|
"type": "str",
|
|
"description": "claim_id of the claim to abandon",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "txid",
|
|
"type": "str",
|
|
"description": "txid of the claim to abandon",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "nout",
|
|
"type": "int",
|
|
"description": "nout of the claim to abandon",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id of the account to use",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "preview",
|
|
"type": "bool",
|
|
"description": "do not broadcast the transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "blocking",
|
|
"type": "bool",
|
|
"description": "wait until abandon is in mempool",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"txid\": \"hash of transaction in hex\",\n \"height\": \"block where transaction was recorded\",\n \"inputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"outputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"total_input\": \"sum of inputs as a decimal\",\n \"total_output\": \"sum of outputs, sans fee, as a decimal\",\n \"total_fee\": \"fee amount\",\n \"hex\": \"entire transaction encoded in hex\"\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Abandon a channel claim",
|
|
"curl": "curl -d'{\"method\": \"channel_abandon\", \"params\": {\"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\", \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet channel abandon a97186b2b68427e475452ebe9bcd9475be772d49",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_abandon\", \"params\": {\"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\", \"preview\": false, \"blocking\": false}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001e5651635521e54478bc33114823f05aa2bb8392990064f7116e46aad3b6f2df3000000006a47304402201870a23364df775eb87de3c1e8aee0b29db40a5ad5594313b9fadf230b4a12f2022058c07c2320f27df493df58107dadef6a0620536146228d2585b58b6e4d609a430121030de1caa208dfc96497239774573b6e09495211eeadcdb8eeae182449df5df28effffffff0134b7f505000000001976a914cf9252ceec86e2ed1e29b2c6084677f94718db6788ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"amount\": \"1.0\",\n \"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\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#a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"timestamp\": 1569257569,\n \"txid\": \"f32d6f3bad6ae416714f06902939b82baa053f821431c38b47541e52351665e5\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32\",\n \"public_key_id\": \"mzYaWmhuYfprZDR9EWSYb7JxhPDTFhRQgo\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mzSVTViGNgTirETKQguZJ2XXXBA8pU8irF\",\n \"amount\": \"0.999893\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"97f949a19bb776bb231219d0fa49d7a478788a4a3aaf0023c8bafa25f2c01768\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000107\",\n \"total_input\": \"1.0\",\n \"total_output\": \"0.999893\",\n \"txid\": \"97f949a19bb776bb231219d0fa49d7a478788a4a3aaf0023c8bafa25f2c01768\"\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "channel_create",
|
|
"description": "Create a new channel by generating a channel private key and establishing an '@' prefixed claim.",
|
|
"arguments": [
|
|
{
|
|
"name": "name",
|
|
"type": "str",
|
|
"description": "name of the channel prefixed with '@'",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "bid",
|
|
"type": "decimal",
|
|
"description": "amount to back the claim",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "allow_duplicate_name",
|
|
"type": "bool",
|
|
"description": "create new channel even if one already exists with given name. default: false.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "title",
|
|
"type": "str",
|
|
"description": "title of the publication",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "description",
|
|
"type": "str",
|
|
"description": "description of the publication",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "email",
|
|
"type": "str",
|
|
"description": "email of channel owner",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "website_url",
|
|
"type": "str",
|
|
"description": "website url",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "featured",
|
|
"type": "list",
|
|
"description": "claim_ids of featured content in channel",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "tags",
|
|
"type": "list",
|
|
"description": "content tags",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "languages",
|
|
"type": "list",
|
|
"description": "languages used by the channel, using RFC 5646 format, eg: for English `--languages=en` for Spanish (Spain) `--languages=es-ES` for Spanish (Mexican) `--languages=es-MX` for Chinese (Simplified) `--languages=zh-Hans` for Chinese (Traditional) `--languages=zh-Hant`",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "locations",
|
|
"type": "list",
|
|
"description": "locations of the channel, consisting of 2 letter `country` code and a `state`, `city` and a postal `code` along with a `latitude` and `longitude`. for JSON RPC: pass a dictionary with aforementioned attributes as keys, eg: ... \"locations\": [{'country': 'US', 'state': 'NH'}] ... for command line: pass a colon delimited list with values in the following order: \"COUNTRY:STATE:CITY:CODE:LATITUDE:LONGITUDE\" making sure to include colon for blank values, for example to provide only the city: ... --locations=\"::Manchester\" with all values set: ... --locations=\"US:NH:Manchester:03101:42.990605:-71.460989\" optionally, you can just pass the \"LATITUDE:LONGITUDE\": ... --locations=\"42.990605:-71.460989\" finally, you can also pass JSON string of dictionary on the command line as you would via JSON RPC ... --locations=\"{'country': 'US', 'state': 'NH'}\"",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "thumbnail_url",
|
|
"type": "str",
|
|
"description": "thumbnail url",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "cover_url",
|
|
"type": "str",
|
|
"description": "url of cover image",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "account to use for holding the transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "funding_account_ids",
|
|
"type": "list",
|
|
"description": "ids of accounts to fund this transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "claim_address",
|
|
"type": "str",
|
|
"description": "address where the channel is sent to, if not specified it will be determined automatically from the account",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "preview",
|
|
"type": "bool",
|
|
"description": "do not broadcast the transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "blocking",
|
|
"type": "bool",
|
|
"description": "wait until transaction is in mempool",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"txid\": \"hash of transaction in hex\",\n \"height\": \"block where transaction was recorded\",\n \"inputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"outputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"total_input\": \"sum of inputs as a decimal\",\n \"total_output\": \"sum of outputs, sans fee, as a decimal\",\n \"total_fee\": \"fee amount\",\n \"hex\": \"entire transaction encoded in hex\"\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Create a channel claim without metadata",
|
|
"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\": \"010000000183055a4c89811b824f2b3df5e19d30e87520c54f9010f26f801f410e5ab89902010000006b4830450221008ba32309c99659f78c473c5423143ace5a0a695f635e15c39a4eac8e3c674b5a022066bc79ff2f009d772a3ed24fa4d4dd950dcb7f90595d3fb19cbadfd9e4acf85c012102db68f57dd3484b396c99a0a8b022cc59dc23be840cdf6ceddc9497f8d4c6b001ffffffff0200e1f5050000000084b508406368616e6e656c4c5d00125a0a583056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b326d7576a9149210215b08374dda7ce8acedc1898685aeed07cf88acc462a029000000001976a9144d72fa0b9f5e2582016178d6d7e108f9822e13d788ac00000000\",\n \"inputs\": [\n {\n \"address\": \"n1cCRBMAxWtrVzQJN9T8syLDRA131yKd8U\",\n \"amount\": \"7.999876\",\n \"confirmations\": 2,\n \"height\": 207,\n \"is_change\": false,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1569257569,\n \"txid\": \"0299b85a0e411f806ff210904fc52075e8309de1f53d2b4f821b81894c5a0583\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"amount\": \"1.0\",\n \"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\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#a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"timestamp\": null,\n \"txid\": \"18441fe0f426d7481ec27dea40a29cc8af6e2ba8db7e8080a28281a06889fa4a\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32\",\n \"public_key_id\": \"mzYaWmhuYfprZDR9EWSYb7JxhPDTFhRQgo\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mnaU4YnkYxRt1uPikPW4gGEg2EVQiktq5f\",\n \"amount\": \"6.983769\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"18441fe0f426d7481ec27dea40a29cc8af6e2ba8db7e8080a28281a06889fa4a\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.016107\",\n \"total_input\": \"7.999876\",\n \"total_output\": \"7.983769\",\n \"txid\": \"18441fe0f426d7481ec27dea40a29cc8af6e2ba8db7e8080a28281a06889fa4a\"\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\": \"0100000001e5651635521e54478bc33114823f05aa2bb8392990064f7116e46aad3b6f2df3010000006a47304402207b98ad6a33c436f0273016c1a0cce2510f04cf151f5dd5026a15bdb771e113bc02203dbbb819e5ab16df41b851b9934abe2e41e1125ea4b129ef8eb7f387c817f1c001210253a945780e4b1c073d7956fb805b62089f3e03b8e322aa4c6770bb2350c2bcc1ffffffff0200e1f50500000000fd5001b50b406269676368616e6e656c4d25010012ab010a583056301006072a8648ce3d020106052b8104000a034200042e95e156b3f353d8cb1b89a72928a7d70239faf4db01322acc2aa9cc8945db264d25b1132c3804630cfce3f79c4e248f09f77cae174b21d238f5e49389b0008c121663726561746f7240736d616c6c6d656469612e636f6d1a15687474703a2f2f736d616c6c6d656469612e636f6d22202a1e687474703a2f2f736d616c6c6d656469612e636f6d2f6c6f676f2e6a7067420b426967204368616e6e656c4a1e41206368616e6e656c2077697468206c6f7473206f6620766964656f732e52202a1e687474703a2f2f736d616c6c6d656469612e636f6d2f6c6f676f2e6a70675a056d757369635a0361727462050883011820620308ab016a0208206a0908e9011a044b6979766d7576a91486692a9f6363a0c5bf84e33011403f70aa7e485a88ace221d305000000001976a914dff543e45fd598cc5bbd13303b1c4eeb4b51de2a88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"n2mhUvRK1gyM3fenJZwiwe3f618wirt3xP\",\n \"amount\": \"1.9993355\",\n \"confirmations\": 1,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1569257569,\n \"txid\": \"f32d6f3bad6ae416714f06902939b82baa053f821431c38b47541e52351665e5\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"msmeprZxgFfL1KuUrARTqbH3wFLeNMQ59j\",\n \"amount\": \"1.0\",\n \"claim_id\": \"3d77cb372b7ae9a93929d7163ac24d3ccee7f85b\",\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#3d77cb372b7ae9a93929d7163ac24d3ccee7f85b\",\n \"timestamp\": null,\n \"txid\": \"b5855b69cbd3f9c0905844b42d175a749294eab9a0afb055b43be09860459006\",\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\": \"3056301006072a8648ce3d020106052b8104000a034200042e95e156b3f353d8cb1b89a72928a7d70239faf4db01322acc2aa9cc8945db264d25b1132c3804630cfce3f79c4e248f09f77cae174b21d238f5e49389b0008c\",\n \"public_key_id\": \"n3zbsKYmNzKUW1a1L1zrRvCwxRRv9CyESi\",\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\": \"n1w8oA5Pz1ZHMyUjWcgq8KvuiXCBqH7mcy\",\n \"amount\": \"0.9772285\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"b5855b69cbd3f9c0905844b42d175a749294eab9a0afb055b43be09860459006\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.022107\",\n \"total_input\": \"1.9993355\",\n \"total_output\": \"1.9772285\",\n \"txid\": \"b5855b69cbd3f9c0905844b42d175a749294eab9a0afb055b43be09860459006\"\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "channel_export",
|
|
"description": "Export channel private key.",
|
|
"arguments": [
|
|
{
|
|
"name": "channel_id",
|
|
"type": "str",
|
|
"description": "claim id of channel to export",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "channel_name",
|
|
"type": "str",
|
|
"description": "name of channel to export",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "one or more account ids for accounts to look in for channels, defaults to all accounts.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(str) serialized channel private key",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "channel_import",
|
|
"description": "Import serialized channel private key (to allow signing new streams to the channel)",
|
|
"arguments": [
|
|
{
|
|
"name": "channel_data",
|
|
"type": "str",
|
|
"description": "serialized channel, as exported by channel export",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "import into specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(dict) Result dictionary",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "channel_list",
|
|
"description": "List my channel claims.",
|
|
"arguments": [
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id of the account to use",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict results to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "page",
|
|
"type": "int",
|
|
"description": "page to return during paginating",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "page_size",
|
|
"type": "int",
|
|
"description": "number of items on page during pagination",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"page\": \"Page number of the current items.\",\n \"page_size\": \"Number of items to show on a page.\",\n \"total_pages\": \"Total number of pages.\",\n \"total_items\": \"Total number of items.\",\n \"items\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ]\n }",
|
|
"examples": [
|
|
{
|
|
"title": "List your channel claims",
|
|
"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\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"amount\": \"1.0\",\n \"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\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#a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"timestamp\": 1569257569,\n \"txid\": \"18441fe0f426d7481ec27dea40a29cc8af6e2ba8db7e8080a28281a06889fa4a\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32\",\n \"public_key_id\": \"mzYaWmhuYfprZDR9EWSYb7JxhPDTFhRQgo\"\n },\n \"value_type\": \"channel\"\n }\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\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"amount\": \"1.0\",\n \"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\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#a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"timestamp\": 1569257569,\n \"txid\": \"18441fe0f426d7481ec27dea40a29cc8af6e2ba8db7e8080a28281a06889fa4a\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32\",\n \"public_key_id\": \"mzYaWmhuYfprZDR9EWSYb7JxhPDTFhRQgo\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_items\": 1,\n \"total_pages\": 1\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "channel_update",
|
|
"description": "Update an existing channel claim.",
|
|
"arguments": [
|
|
{
|
|
"name": "claim_id",
|
|
"type": "str",
|
|
"description": "claim_id of the channel to update",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "bid",
|
|
"type": "decimal",
|
|
"description": "amount to back the claim",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "title",
|
|
"type": "str",
|
|
"description": "title of the publication",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "description",
|
|
"type": "str",
|
|
"description": "description of the publication",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "email",
|
|
"type": "str",
|
|
"description": "email of channel owner",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "website_url",
|
|
"type": "str",
|
|
"description": "website url",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "featured",
|
|
"type": "list",
|
|
"description": "claim_ids of featured content in channel",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "clear_featured",
|
|
"type": "bool",
|
|
"description": "clear existing featured content (prior to adding new ones)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "tags",
|
|
"type": "list",
|
|
"description": "add content tags",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "clear_tags",
|
|
"type": "bool",
|
|
"description": "clear existing tags (prior to adding new ones)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "languages",
|
|
"type": "list",
|
|
"description": "languages used by the channel, using RFC 5646 format, eg: for English `--languages=en` for Spanish (Spain) `--languages=es-ES` for Spanish (Mexican) `--languages=es-MX` for Chinese (Simplified) `--languages=zh-Hans` for Chinese (Traditional) `--languages=zh-Hant`",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "clear_languages",
|
|
"type": "bool",
|
|
"description": "clear existing languages (prior to adding new ones)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "locations",
|
|
"type": "list",
|
|
"description": "locations of the channel, consisting of 2 letter `country` code and a `state`, `city` and a postal `code` along with a `latitude` and `longitude`. for JSON RPC: pass a dictionary with aforementioned attributes as keys, eg: ... \"locations\": [{'country': 'US', 'state': 'NH'}] ... for command line: pass a colon delimited list with values in the following order: \"COUNTRY:STATE:CITY:CODE:LATITUDE:LONGITUDE\" making sure to include colon for blank values, for example to provide only the city: ... --locations=\"::Manchester\" with all values set: ... --locations=\"US:NH:Manchester:03101:42.990605:-71.460989\" optionally, you can just pass the \"LATITUDE:LONGITUDE\": ... --locations=\"42.990605:-71.460989\" finally, you can also pass JSON string of dictionary on the command line as you would via JSON RPC ... --locations=\"{'country': 'US', 'state': 'NH'}\"",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "clear_locations",
|
|
"type": "bool",
|
|
"description": "clear existing locations (prior to adding new ones)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "thumbnail_url",
|
|
"type": "str",
|
|
"description": "thumbnail url",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "cover_url",
|
|
"type": "str",
|
|
"description": "url of cover image",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "account to use for holding the transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "funding_account_ids",
|
|
"type": "list",
|
|
"description": "ids of accounts to fund this transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "claim_address",
|
|
"type": "str",
|
|
"description": "address where the channel is sent",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "new_signing_key",
|
|
"type": "bool",
|
|
"description": "generate a new signing key, will invalidate all previous publishes",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "preview",
|
|
"type": "bool",
|
|
"description": "do not broadcast the transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "blocking",
|
|
"type": "bool",
|
|
"description": "wait until transaction is in mempool",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "replace",
|
|
"type": "bool",
|
|
"description": "instead of modifying specific values on the channel, this will clear all existing values and only save passed in values, useful for form submissions where all values are always set",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"txid\": \"hash of transaction in hex\",\n \"height\": \"block where transaction was recorded\",\n \"inputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"outputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"total_input\": \"sum of inputs as a decimal\",\n \"total_output\": \"sum of outputs, sans fee, as a decimal\",\n \"total_fee\": \"fee amount\",\n \"hex\": \"entire transaction encoded in hex\"\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Update a channel claim",
|
|
"curl": "curl -d'{\"method\": \"channel_update\", \"params\": {\"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\", \"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 a97186b2b68427e475452ebe9bcd9475be772d49 --title=\"New Channel\"",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_update\", \"params\": {\"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\", \"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\": \"01000000024afa8968a08182a280807edba82b6eafc89ca240ea7dc21e48d726f4e01f4418000000006a47304402201d3a2eef05b0a904c47040312aaa75af035383a264602b33342f58a6c1eae54d022077a2a60df78e5e80b0fb1f6f59b4fc3562333d2c3fa327cdb24faa8d20ee6dac0121030de1caa208dfc96497239774573b6e09495211eeadcdb8eeae182449df5df28effffffff271023c07c5967a2f992c3a99b4e06d74c5027e93ade19fb772ffac7a76dc6c4000000006a473044022021bcf9a6379c269f06d48d61262da20e5569061fa948f1c1f6e8623ff6e91c900220261bc22e56bfc79b65a048f8072d68419ff231278ca38571eb1a5de9bf137c58012102020138250008723cdab6c208879203cf57af20a66cd656a5e360572d05acbf67ffffffff0200e1f50500000000a6b708406368616e6e656c14492d77be7594cd9bbe2e4575e42784b6b28671a94c6a00125a0a583056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32420b4e6577204368616e6e656c6d6d76a9149210215b08374dda7ce8acedc1898685aeed07cf88ac6ebeea0b000000001976a914e924841404b0c038765a0c54936ae4f24826301788ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"amount\": \"1.0\",\n \"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\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#a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"timestamp\": 1569257569,\n \"txid\": \"18441fe0f426d7481ec27dea40a29cc8af6e2ba8db7e8080a28281a06889fa4a\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32\",\n \"public_key_id\": \"mzYaWmhuYfprZDR9EWSYb7JxhPDTFhRQgo\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mhVhh3v1qx43icPgGYJBwT2gghqKRFfzN7\",\n \"amount\": \"1.999604\",\n \"confirmations\": 1,\n \"height\": 209,\n \"is_change\": false,\n \"is_mine\": true,\n \"nout\": 0,\n \"timestamp\": 1569257569,\n \"txid\": \"c4c66da7c7fa2f77fb19de3ae927504cd7064e9ba9c392f9a267597cc0231027\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"amount\": \"1.0\",\n \"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\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#a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"timestamp\": null,\n \"txid\": \"f32d6f3bad6ae416714f06902939b82baa053f821431c38b47541e52351665e5\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32\",\n \"public_key_id\": \"mzYaWmhuYfprZDR9EWSYb7JxhPDTFhRQgo\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"n2mhUvRK1gyM3fenJZwiwe3f618wirt3xP\",\n \"amount\": \"1.9993355\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"f32d6f3bad6ae416714f06902939b82baa053f821431c38b47541e52351665e5\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.0002685\",\n \"total_input\": \"2.999604\",\n \"total_output\": \"2.9993355\",\n \"txid\": \"f32d6f3bad6ae416714f06902939b82baa053f821431c38b47541e52351665e5\"\n }\n}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"claim": {
|
|
"doc": "List and search all types of claims.",
|
|
"commands": [
|
|
{
|
|
"name": "claim_list",
|
|
"description": "List my stream and channel claims.",
|
|
"arguments": [
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id of the account to query",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict results to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "page",
|
|
"type": "int",
|
|
"description": "page to return during paginating",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "page_size",
|
|
"type": "int",
|
|
"description": "number of items on page during pagination",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"page\": \"Page number of the current items.\",\n \"page_size\": \"Number of items to show on a page.\",\n \"total_pages\": \"Total number of pages.\",\n \"total_items\": \"Total number of items.\",\n \"items\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ]\n }",
|
|
"examples": [
|
|
{
|
|
"title": "List all your claims",
|
|
"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\": \"mqqphvUE5WQRK2ZbXq4nCxRHycZZL71ksV\",\n \"amount\": \"1.0\",\n \"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\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#ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\n \"signing_channel\": {\n \"address\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"amount\": \"1.0\",\n \"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\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#a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"timestamp\": 1569257569,\n \"txid\": \"f32d6f3bad6ae416714f06902939b82baa053f821431c38b47541e52351665e5\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32\",\n \"public_key_id\": \"mzYaWmhuYfprZDR9EWSYb7JxhPDTFhRQgo\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1569257570,\n \"txid\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp7rhvd_bl\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"amount\": \"1.0\",\n \"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\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#a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"timestamp\": 1569257569,\n \"txid\": \"f32d6f3bad6ae416714f06902939b82baa053f821431c38b47541e52351665e5\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32\",\n \"public_key_id\": \"mzYaWmhuYfprZDR9EWSYb7JxhPDTFhRQgo\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n }\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\": \"mqqphvUE5WQRK2ZbXq4nCxRHycZZL71ksV\",\n \"amount\": \"1.0\",\n \"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\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#ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\n \"signing_channel\": {\n \"address\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"amount\": \"1.0\",\n \"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\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#a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"timestamp\": 1569257569,\n \"txid\": \"f32d6f3bad6ae416714f06902939b82baa053f821431c38b47541e52351665e5\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32\",\n \"public_key_id\": \"mzYaWmhuYfprZDR9EWSYb7JxhPDTFhRQgo\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1569257570,\n \"txid\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp7rhvd_bl\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"amount\": \"1.0\",\n \"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\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#a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"timestamp\": 1569257569,\n \"txid\": \"f32d6f3bad6ae416714f06902939b82baa053f821431c38b47541e52351665e5\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32\",\n \"public_key_id\": \"mzYaWmhuYfprZDR9EWSYb7JxhPDTFhRQgo\",\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}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "claim_search",
|
|
"description": "Search for stream and channel claims on the blockchain.\n\nArguments marked with \"supports equality constraints\" allow prepending the\nvalue with an equality constraint such as '>', '>=', '<' and '<='\neg. --height=\">400000\" would limit results to only claims above 400k block height.",
|
|
"arguments": [
|
|
{
|
|
"name": "name",
|
|
"type": "str",
|
|
"description": "claim name (normalized)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "claim_id",
|
|
"type": "str",
|
|
"description": "full or partial claim id",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "txid",
|
|
"type": "str",
|
|
"description": "transaction id",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "nout",
|
|
"type": "str",
|
|
"description": "position in the transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel",
|
|
"type": "str",
|
|
"description": "claims signed by this channel (argument is a URL which automatically gets resolved), see --channel_ids if you need to filter by multiple channels at the same time, includes claims with invalid signatures, use in conjunction with --valid_channel_signature",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_ids",
|
|
"type": "list",
|
|
"description": "claims signed by any of these channels (arguments must be claim ids of the channels), includes claims with invalid signatures, implies --has_channel_signature, use in conjunction with --valid_channel_signature",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "not_channel_ids",
|
|
"type": "list",
|
|
"description": "exclude claims signed by any of these channels (arguments must be claim ids of the channels)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "has_channel_signature",
|
|
"type": "bool",
|
|
"description": "claims with a channel signature (valid or invalid)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "valid_channel_signature",
|
|
"type": "bool",
|
|
"description": "claims with a valid channel signature or no signature, use in conjunction with --has_channel_signature to only get claims with valid signatures",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "invalid_channel_signature",
|
|
"type": "bool",
|
|
"description": "claims with invalid channel signature or no signature, use in conjunction with --has_channel_signature to only get claims with invalid signatures",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "is_controlling",
|
|
"type": "bool",
|
|
"description": "winning claims of their respective name",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "public_key_id",
|
|
"type": "str",
|
|
"description": "only return channels having this public key id, this is the same key as used in the wallet file to map channel certificate private keys: {'public_key_id': 'private key'}",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "height",
|
|
"type": "int",
|
|
"description": "last updated block height (supports equality constraints)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "timestamp",
|
|
"type": "int",
|
|
"description": "last updated timestamp (supports equality constraints)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "creation_height",
|
|
"type": "int",
|
|
"description": "created at block height (supports equality constraints)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "creation_timestamp",
|
|
"type": "int",
|
|
"description": "created at timestamp (supports equality constraints)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "activation_height",
|
|
"type": "int",
|
|
"description": "height at which claim starts competing for name (supports equality constraints)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "expiration_height",
|
|
"type": "int",
|
|
"description": "height at which claim will expire (supports equality constraints)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "release_time",
|
|
"type": "int",
|
|
"description": "limit to claims self-described as having been released to the public on or after this UTC timestamp, when claim does not provide a release time the publish time is used instead (supports equality constraints)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "amount",
|
|
"type": "int",
|
|
"description": "limit by claim value (supports equality constraints)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "support_amount",
|
|
"type": "int",
|
|
"description": "limit by supports and tips recieved (supports equality constraints)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "effective_amount",
|
|
"type": "int",
|
|
"description": "limit by total value (initial claim value plus all tips and supports received), this amount is blank until claim has reached activation height (supports equality constraints)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "trending_group",
|
|
"type": "int",
|
|
"description": "group numbers 1 through 4 representing the trending groups of the content: 4 means content is trending globally and independently, 3 means content is not trending globally but is trending independently (locally), 2 means it is trending globally but not independently and 1 means it's not trending globally or locally (supports equality constraints)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "trending_mixed",
|
|
"type": "int",
|
|
"description": "trending amount taken from the global or local value depending on the trending group: 4 - global value, 3 - local value, 2 - global value, 1 - local value (supports equality constraints)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "trending_local",
|
|
"type": "int",
|
|
"description": "trending value calculated relative only to the individual contents past history (supports equality constraints)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "trending_global",
|
|
"type": "int",
|
|
"description": "trending value calculated relative to all trending content globally (supports equality constraints)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "claim_type",
|
|
"type": "str",
|
|
"description": "filter by 'channel', 'stream' or 'unknown'",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "stream_types",
|
|
"type": "list",
|
|
"description": "filter by 'video', 'image', 'document', etc",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "media_types",
|
|
"type": "list",
|
|
"description": "filter by 'video/mp4', 'image/png', etc",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "fee_currency",
|
|
"type": "string",
|
|
"description": "specify fee currency: LBC, BTC, USD",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "fee_amount",
|
|
"type": "decimal",
|
|
"description": "content download fee (supports equality constraints)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "any_tags",
|
|
"type": "list",
|
|
"description": "find claims containing any of the tags",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "all_tags",
|
|
"type": "list",
|
|
"description": "find claims containing every tag",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "not_tags",
|
|
"type": "list",
|
|
"description": "find claims not containing any of these tags",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "any_languages",
|
|
"type": "list",
|
|
"description": "find claims containing any of the languages",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "all_languages",
|
|
"type": "list",
|
|
"description": "find claims containing every language",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "not_languages",
|
|
"type": "list",
|
|
"description": "find claims not containing any of these languages",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "any_locations",
|
|
"type": "list",
|
|
"description": "find claims containing any of the locations",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "all_locations",
|
|
"type": "list",
|
|
"description": "find claims containing every location",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "not_locations",
|
|
"type": "list",
|
|
"description": "find claims not containing any of these locations",
|
|
"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
|
|
},
|
|
{
|
|
"name": "order_by",
|
|
"type": "list",
|
|
"description": "field to order by, default is descending order, to do an ascending order prepend ^ to the field name, eg. '^amount' available fields: 'name', 'height', 'release_time', 'publish_time', 'amount', 'effective_amount', 'support_amount', 'trending_group', 'trending_mixed', 'trending_local', 'trending_global', 'activation_height'",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "no_totals",
|
|
"type": "bool",
|
|
"description": "do not calculate the total number of pages and items in result set (significant performance boost)",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"page\": \"Page number of the current items.\",\n \"page_size\": \"Number of items to show on a page.\",\n \"total_pages\": \"Total number of pages.\",\n \"total_items\": \"Total number of items.\",\n \"items\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ]\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Search for all claims in channel",
|
|
"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\": \"mqqphvUE5WQRK2ZbXq4nCxRHycZZL71ksV\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#a/astream#e\",\n \"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\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\": 1569257570,\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#ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\n \"short_url\": \"lbry://astream#e\",\n \"signing_channel\": {\n \"address\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#a\",\n \"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\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\": 1569257569,\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#a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"short_url\": \"lbry://@channel#a\",\n \"timestamp\": 1569257569,\n \"txid\": \"f32d6f3bad6ae416714f06902939b82baa053f821431c38b47541e52351665e5\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32\",\n \"public_key_id\": \"mzYaWmhuYfprZDR9EWSYb7JxhPDTFhRQgo\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1569257570,\n \"txid\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp7rhvd_bl\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\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}"
|
|
},
|
|
{
|
|
"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\": \"mqqphvUE5WQRK2ZbXq4nCxRHycZZL71ksV\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#a/astream#e\",\n \"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\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\": 1569257570,\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#ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\n \"short_url\": \"lbry://astream#e\",\n \"signing_channel\": {\n \"address\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"amount\": \"1.0\",\n \"canonical_url\": \"lbry://@channel#a\",\n \"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\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\": 1569257569,\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#a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"short_url\": \"lbry://@channel#a\",\n \"timestamp\": 1569257569,\n \"txid\": \"f32d6f3bad6ae416714f06902939b82baa053f821431c38b47541e52351665e5\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32\",\n \"public_key_id\": \"mzYaWmhuYfprZDR9EWSYb7JxhPDTFhRQgo\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1569257570,\n \"txid\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp7rhvd_bl\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\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}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"comment": {
|
|
"doc": "View, create and abandon comments.",
|
|
"commands": [
|
|
{
|
|
"name": "comment_abandon",
|
|
"description": "Abandon a comment published under your channel identity.",
|
|
"arguments": [
|
|
{
|
|
"name": "comment_id",
|
|
"type": "str",
|
|
"description": "The ID of the comment to be abandoned.",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(dict) Object with the `comment_id` passed in as the key, and a flag indicating if it was abandoned\n {\n <comment_id> (str): {\n \"abandoned\": (bool)\n }\n }",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "comment_create",
|
|
"description": "Create and associate a comment with a claim using your channel identity.",
|
|
"arguments": [
|
|
{
|
|
"name": "comment",
|
|
"type": "str",
|
|
"description": "Comment to be made, should be at most 2000 characters.",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "claim_id",
|
|
"type": "str",
|
|
"description": "The ID of the claim to comment on",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "parent_id",
|
|
"type": "str",
|
|
"description": "The ID of a comment to make a response to",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_id",
|
|
"type": "str",
|
|
"description": "The ID of the channel you want to post under",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_name",
|
|
"type": "str",
|
|
"description": "The channel you want to post as, prepend with a '@'",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_account_id",
|
|
"type": "str",
|
|
"description": "one or more account ids for accounts to look in for channel certificates, defaults to all accounts.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(dict) Comment object if successfully made, (None) otherwise\n {\n \"comment\": (str) The actual string as inputted by the user,\n \"comment_id\": (str) The Comment's unique identifier,\n \"channel_name\": (str) Name of the channel this was posted under, prepended with a '@',\n \"channel_id\": (str) The Channel Claim ID that this comment was posted under,\n \"signature\": (str) The signature of the comment,\n \"channel_url\": (str) Channel's URI in the ClaimTrie,\n \"parent_id\": (str) Comment this is replying to, (None) if this is the root,\n \"timestamp\": (int) The time at which comment was entered into the server at, in nanoseconds.\n }",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "comment_hide",
|
|
"description": "Hide a comment published to a claim you control.",
|
|
"arguments": [
|
|
{
|
|
"name": "comment_ids",
|
|
"type": "str, list",
|
|
"description": "one or more comment_id to hide.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(dict) keyed by comment_id, containing success info\n '<comment_id>': {\n \"hidden\": (bool) flag indicating if comment_id was hidden\n }",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "comment_list",
|
|
"description": "List comments associated with a claim.",
|
|
"arguments": [
|
|
{
|
|
"name": "claim_id",
|
|
"type": "str",
|
|
"description": "The claim on which the comment will be made on",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "parent_id",
|
|
"type": "str",
|
|
"description": "CommentId of a specific thread you'd like to see",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "page",
|
|
"type": "int",
|
|
"description": "The page you'd like to see in the comment list.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "page_size",
|
|
"type": "int",
|
|
"description": "The amount of comments that you'd like to retrieve",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "include_replies",
|
|
"type": "bool",
|
|
"description": "Whether or not you want to include replies in list",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "is_channel_signature_valid",
|
|
"type": "bool",
|
|
"description": "Only include comments with valid signatures. [Warning: Paginated total size will not change, even if list reduces]",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "visible",
|
|
"type": "bool",
|
|
"description": "Select only Visisble Comments",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "hidden",
|
|
"type": "bool",
|
|
"description": "Select only Hidden Comments",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(dict) Containing the list, and information about the paginated content:\n {\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\": \"A List of dict objects representing comments.\"\n [\n {\n \"comment\": (str) The actual string as inputted by the user,\n \"comment_id\": (str) The Comment's unique identifier,\n \"channel_name\": (str) Name of the channel this was posted under, prepended with a '@',\n \"channel_id\": (str) The Channel Claim ID that this comment was posted under,\n \"signature\": (str) The signature of the comment,\n \"channel_url\": (str) Channel's URI in the ClaimTrie,\n \"parent_id\": (str) Comment this is replying to, (None) if this is the root,\n \"timestamp\": (int) The time at which comment was entered into the server at, in nanoseconds.\n },\n ...\n ]\n }",
|
|
"examples": []
|
|
}
|
|
]
|
|
},
|
|
"file": {
|
|
"doc": "File management.",
|
|
"commands": [
|
|
{
|
|
"name": "file_delete",
|
|
"description": "Delete a LBRY file",
|
|
"arguments": [
|
|
{
|
|
"name": "delete_from_download_dir",
|
|
"type": "bool",
|
|
"description": "delete file from download directory, instead of just deleting blobs",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "delete_all",
|
|
"type": "bool",
|
|
"description": "if there are multiple matching files, allow the deletion of multiple files. Otherwise do not delete anything.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "sd_hash",
|
|
"type": "str",
|
|
"description": "delete by file sd hash",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "file_name",
|
|
"type": "str",
|
|
"description": "delete by file name in downloads folder",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "stream_hash",
|
|
"type": "str",
|
|
"description": "delete by file stream hash",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "rowid",
|
|
"type": "int",
|
|
"description": "delete by file row id",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "claim_id",
|
|
"type": "str",
|
|
"description": "delete by file claim id",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "txid",
|
|
"type": "str",
|
|
"description": "delete by file claim txid",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "nout",
|
|
"type": "int",
|
|
"description": "delete by file claim nout",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "claim_name",
|
|
"type": "str",
|
|
"description": "delete by file claim name",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_claim_id",
|
|
"type": "str",
|
|
"description": "delete by file channel claim id",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_name",
|
|
"type": "str",
|
|
"description": "delete by file channel claim name",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(bool) true if deletion was successful",
|
|
"examples": [
|
|
{
|
|
"title": "Delete a file",
|
|
"curl": "curl -d'{\"method\": \"file_delete\", \"params\": {\"delete_from_download_dir\": false, \"delete_all\": false, \"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\"}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet file delete --claim_id=\"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\"",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_delete\", \"params\": {\"delete_from_download_dir\": false, \"delete_all\": false, \"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\"}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": true\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "file_list",
|
|
"description": "List files limited by optional filters",
|
|
"arguments": [
|
|
{
|
|
"name": "sd_hash",
|
|
"type": "str",
|
|
"description": "get file with matching sd hash",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "file_name",
|
|
"type": "str",
|
|
"description": "get file with matching file name in the downloads folder",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "stream_hash",
|
|
"type": "str",
|
|
"description": "get file with matching stream hash",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "rowid",
|
|
"type": "int",
|
|
"description": "get file with matching row id",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "claim_id",
|
|
"type": "str",
|
|
"description": "get file with matching claim id",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "outpoint",
|
|
"type": "str",
|
|
"description": "get file with matching claim outpoint",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "txid",
|
|
"type": "str",
|
|
"description": "get file with matching claim txid",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "nout",
|
|
"type": "int",
|
|
"description": "get file with matching claim nout",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_claim_id",
|
|
"type": "str",
|
|
"description": "get file with matching channel claim id",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_name",
|
|
"type": "str",
|
|
"description": "get file with matching channel name",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "claim_name",
|
|
"type": "str",
|
|
"description": "get file with matching claim name",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "blobs_in_stream<blobs_in_stream>",
|
|
"type": "int",
|
|
"description": "get file with matching blobs in stream",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "blobs_remaining",
|
|
"type": "int",
|
|
"description": "amount of remaining blobs to download",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "sort",
|
|
"type": "str",
|
|
"description": "field to sort by (one of the above filter fields)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "comparison",
|
|
"type": "str",
|
|
"description": "logical comparision, (eq | ne | g | ge | l | le)",
|
|
"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 ]",
|
|
"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\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\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\": \"0e6b81fe73602d02ed07933b0206b959\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp7rhvd_bl\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01492d77be7594cd9bbe2e4575e42784b6b28671a97feea119e096fecb7cb354773d7583f38083842dccac76f7b8ddd2be2fc1fb4474693226de36237515a582f1734eaa25c6968af898c3ed913144d0fbab1398b20a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d7037726876645f626c180b22186170706c69636174696f6e2f6f637465742d73747265616d32300159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"dbea4542edea266956561fb9e0e13acfc63785d5777f33ea1a95c4e5979eac84e55dbf49e338b264b5fccb1c9f73e025\",\n \"stream_name\": \"tmp7rhvd_bl\",\n \"streaming_url\": \"http://localhost:5280/stream/0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"suggested_file_name\": \"tmp7rhvd_bl\",\n \"timestamp\": null,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b\",\n \"written_bytes\": 0\n },\n {\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"e37c0dd6aced3f7ffc81bbaf3020c7f9268fdd96\",\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\": \"886740828b916b381e866555eefd5095\",\n \"metadata\": {\n \"author\": \"Picaso\",\n \"description\": \"A blank PNG that is 5x7.\",\n \"fee\": {\n \"address\": \"mvRsX8iHAcN11xn8c7quz9dLnF2HVgzrUV\",\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\": \"1569257546\",\n \"source\": {\n \"hash\": \"6c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545\",\n \"media_type\": \"image/png\",\n \"name\": \"tmpriatijmi.png\",\n \"sd_hash\": \"084b3a361ef86bd694e1fd772a9b51d1c2fc1ca3ba80427669963d7d1f7a6e7f010bcd3aca0400dd19ce73fb639db834\",\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\": \"3597b006e225b258925585d5e836f636ef211772d9bb13a97531b23437cfacfb:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01492d77be7594cd9bbe2e4575e42784b6b28671a9a63269cb7ec12a469485c87714ba0be91951c4ad898c3f273b11d4030629958fc076ff49005b33177ba9554aed703717573d859abcb0fce2ccde7595459e0cd20ae6010a82010a306c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545120f746d7072696174696a6d692e706e6718632209696d6167652f706e673230084b3a361ef86bd694e1fd772a9b51d1c2fc1ca3ba80427669963d7d1f7a6e7f010bcd3aca0400dd19ce73fb639db834120650696361736f1a0d5075626c696320446f6d61696e2218687474703a2f2f7075626c69632d646f6d61696e2e6f726728caf0a3ec053222080112196fa393d247b5cafd376fd47e450a886ebb6e9c4918b846b276188087a70e520408051007420b426c616e6b20496d6167654a184120626c616e6b20504e472074686174206973203578372e52252a23687474703a2f2f736d616c6c6d656469612e636f6d2f7468756d626e61696c2e6a70675a05626c616e6b5a03617274620208016a1308ec0112024e481a0a4d616e63686573746572\",\n \"sd_hash\": \"084b3a361ef86bd694e1fd772a9b51d1c2fc1ca3ba80427669963d7d1f7a6e7f010bcd3aca0400dd19ce73fb639db834\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"a647563a2abe59cee19e37e79cbe4c36b4cbc686fb12264bacdb8c829dec5b7f3e8aa494ed0f242ccf1759fd06e17302\",\n \"stream_name\": \"tmpriatijmi.png\",\n \"streaming_url\": \"http://localhost:5280/stream/084b3a361ef86bd694e1fd772a9b51d1c2fc1ca3ba80427669963d7d1f7a6e7f010bcd3aca0400dd19ce73fb639db834\",\n \"suggested_file_name\": \"tmpriatijmi.png\",\n \"timestamp\": null,\n \"total_bytes\": 112,\n \"total_bytes_lower_bound\": 96,\n \"txid\": \"3597b006e225b258925585d5e836f636ef211772d9bb13a97531b23437cfacfb\",\n \"written_bytes\": 0\n }\n ]\n}"
|
|
},
|
|
{
|
|
"title": "List files matching a parameter",
|
|
"curl": "curl -d'{\"method\": \"file_list\", \"params\": {\"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\", \"reverse\": false}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet file list --claim_id=\"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\"",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_list\", \"params\": {\"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\", \"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\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\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\": \"0e6b81fe73602d02ed07933b0206b959\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp7rhvd_bl\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01492d77be7594cd9bbe2e4575e42784b6b28671a97feea119e096fecb7cb354773d7583f38083842dccac76f7b8ddd2be2fc1fb4474693226de36237515a582f1734eaa25c6968af898c3ed913144d0fbab1398b20a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d7037726876645f626c180b22186170706c69636174696f6e2f6f637465742d73747265616d32300159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"dbea4542edea266956561fb9e0e13acfc63785d5777f33ea1a95c4e5979eac84e55dbf49e338b264b5fccb1c9f73e025\",\n \"stream_name\": \"tmp7rhvd_bl\",\n \"streaming_url\": \"http://localhost:5280/stream/0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"suggested_file_name\": \"tmp7rhvd_bl\",\n \"timestamp\": 1569257570,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b\",\n \"written_bytes\": 0\n }\n ]\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "file_reflect",
|
|
"description": "Reflect all the blobs in a file matching the filter criteria",
|
|
"arguments": [
|
|
{
|
|
"name": "sd_hash",
|
|
"type": "str",
|
|
"description": "get file with matching sd hash",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "file_name",
|
|
"type": "str",
|
|
"description": "get file with matching file name in the downloads folder",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "stream_hash",
|
|
"type": "str",
|
|
"description": "get file with matching stream hash",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "rowid",
|
|
"type": "int",
|
|
"description": "get file with matching row id",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "reflector",
|
|
"type": "str",
|
|
"description": "reflector server, ip address or url by default choose a server from the config",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(list) list of blobs reflected",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "file_save",
|
|
"description": "Start saving a file to disk.",
|
|
"arguments": [
|
|
{
|
|
"name": "file_name",
|
|
"type": "str",
|
|
"description": "file name to save to",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "download_directory",
|
|
"type": "str",
|
|
"description": "directory to save into",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "sd_hash",
|
|
"type": "str",
|
|
"description": "save file with matching sd hash",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "stream_hash",
|
|
"type": "str",
|
|
"description": "save file with matching stream hash",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "rowid",
|
|
"type": "int",
|
|
"description": "save file with matching row id",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "claim_id",
|
|
"type": "str",
|
|
"description": "save file with matching claim id",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "txid",
|
|
"type": "str",
|
|
"description": "save file with matching claim txid",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "nout",
|
|
"type": "int",
|
|
"description": "save file with matching claim nout",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "claim_name",
|
|
"type": "str",
|
|
"description": "save file with matching claim name",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_claim_id",
|
|
"type": "str",
|
|
"description": "save file with matching channel claim id",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_name",
|
|
"type": "str",
|
|
"description": "save file with matching channel claim name",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"streaming_url\": \"(str) url to stream the file using range requests\",\n \"completed\": \"(bool) true if download is completed\",\n \"file_name\": \"(str) name of file\",\n \"download_directory\": \"(str) download directory\",\n \"points_paid\": \"(float) credit paid to download file\",\n \"stopped\": \"(bool) true if download is stopped\",\n \"stream_hash\": \"(str) stream hash of file\",\n \"stream_name\": \"(str) stream name\",\n \"suggested_file_name\": \"(str) suggested file name\",\n \"sd_hash\": \"(str) sd hash of file\",\n \"download_path\": \"(str) download path of file\",\n \"mime_type\": \"(str) mime type of file\",\n \"key\": \"(str) key attached to file\",\n \"total_bytes_lower_bound\": \"(int) lower bound file size in bytes\",\n \"total_bytes\": \"(int) file upper bound size in bytes\",\n \"written_bytes\": \"(int) written size in bytes\",\n \"blobs_completed\": \"(int) number of fully downloaded blobs\",\n \"blobs_in_stream\": \"(int) total blobs on stream\",\n \"blobs_remaining\": \"(int) total blobs remaining to download\",\n \"status\": \"(str) downloader status\",\n \"claim_id\": \"(str) None if claim is not found else the claim id\",\n \"txid\": \"(str) None if claim is not found else the transaction id\",\n \"nout\": \"(int) None if claim is not found else the transaction output index\",\n \"outpoint\": \"(str) None if claim is not found else the tx and output\",\n \"metadata\": \"(dict) None if claim is not found else the claim metadata\",\n \"channel_claim_id\": \"(str) None if claim is not found or not signed\",\n \"channel_name\": \"(str) None if claim is not found or not signed\",\n \"claim_name\": \"(str) None if claim is not found else the claim name\"\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Save a file to the downloads directory",
|
|
"curl": "curl -d'{\"method\": \"file_save\", \"params\": {\"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\"}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet file save --sd_hash=\"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\"",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_save\", \"params\": {\"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\"}}).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\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\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\": \"0e6b81fe73602d02ed07933b0206b959\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp7rhvd_bl\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01492d77be7594cd9bbe2e4575e42784b6b28671a97feea119e096fecb7cb354773d7583f38083842dccac76f7b8ddd2be2fc1fb4474693226de36237515a582f1734eaa25c6968af898c3ed913144d0fbab1398b20a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d7037726876645f626c180b22186170706c69636174696f6e2f6f637465742d73747265616d32300159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"status\": \"running\",\n \"stopped\": false,\n \"stream_hash\": \"dbea4542edea266956561fb9e0e13acfc63785d5777f33ea1a95c4e5979eac84e55dbf49e338b264b5fccb1c9f73e025\",\n \"stream_name\": \"tmp7rhvd_bl\",\n \"streaming_url\": \"http://localhost:5280/stream/0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"suggested_file_name\": \"tmp7rhvd_bl\",\n \"timestamp\": 1569257570,\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b\",\n \"written_bytes\": 0\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "file_set_status",
|
|
"description": "Start or stop downloading a file",
|
|
"arguments": [
|
|
{
|
|
"name": "status",
|
|
"type": "str",
|
|
"description": "one of \"start\" or \"stop\"",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "sd_hash",
|
|
"type": "str",
|
|
"description": "set status of file with matching sd hash",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "file_name",
|
|
"type": "str",
|
|
"description": "set status of file with matching file name in the downloads folder",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "stream_hash",
|
|
"type": "str",
|
|
"description": "set status of file with matching stream hash",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "rowid",
|
|
"type": "int",
|
|
"description": "set status of file with matching row id",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(str) Confirmation message",
|
|
"examples": []
|
|
}
|
|
]
|
|
},
|
|
"peer": {
|
|
"doc": "DHT / Blob Exchange peer commands.",
|
|
"commands": [
|
|
{
|
|
"name": "peer_list",
|
|
"description": "Get peers for blob hash",
|
|
"arguments": [
|
|
{
|
|
"name": "blob_hash",
|
|
"type": "str",
|
|
"description": "find available peers for this blob hash",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "search_bottom_out_limit",
|
|
"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
|
|
}
|
|
],
|
|
"returns": "(list) List of contact dictionaries {'address': <peer ip>, 'udp_port': <dht port>, 'tcp_port': <peer port>,\n 'node_id': <peer node id>}",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "peer_ping",
|
|
"description": "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.",
|
|
"arguments": [],
|
|
"returns": "(str) pong, or {'error': <error message>} if an error is encountered",
|
|
"examples": []
|
|
}
|
|
]
|
|
},
|
|
"preference": {
|
|
"doc": "Preferences management.",
|
|
"commands": [
|
|
{
|
|
"name": "preference_get",
|
|
"description": "Get preference value for key or all values if not key is passed in.",
|
|
"arguments": [
|
|
{
|
|
"name": "key",
|
|
"type": "str",
|
|
"description": "key associated with value",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id of the account containing value",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(dict) Dictionary of preference(s)",
|
|
"examples": [
|
|
{
|
|
"title": "Get preferences",
|
|
"curl": "curl -d'{\"method\": \"preference_get\", \"params\": {}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet preference get",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"preference_get\", \"params\": {}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"theme\": \"dark\"\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "preference_set",
|
|
"description": "Set preferences",
|
|
"arguments": [
|
|
{
|
|
"name": "key",
|
|
"type": "str",
|
|
"description": "key associated with value",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "value",
|
|
"type": "str",
|
|
"description": "key associated with value",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id of the account containing value",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(dict) Dictionary with key/value of new preference",
|
|
"examples": [
|
|
{
|
|
"title": "Set preference",
|
|
"curl": "curl -d'{\"method\": \"preference_set\", \"params\": {\"key\": \"theme\", \"value\": \"dark\"}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet preference set \"theme\" \"dark\"",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"preference_set\", \"params\": {\"key\": \"theme\", \"value\": \"dark\"}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"theme\": \"dark\"\n }\n}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"settings": {
|
|
"doc": "Settings management.",
|
|
"commands": [
|
|
{
|
|
"name": "settings_get",
|
|
"description": "Get daemon settings",
|
|
"arguments": [],
|
|
"returns": "(dict) Dictionary of daemon settings\n See ADJUSTABLE_SETTINGS in lbry/conf.py for full list of settings",
|
|
"examples": [
|
|
{
|
|
"title": "Get settings",
|
|
"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/tmpfhl810yq\",\n \"download_dir\": \"/tmp/tmpfhl810yq\",\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/tmpfhl810yq\",\n \"wallets\": [\n \"default_wallet\"\n ]\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "settings_set",
|
|
"description": "Set daemon settings",
|
|
"arguments": [],
|
|
"returns": "(dict) Updated dictionary of daemon settings",
|
|
"examples": [
|
|
{
|
|
"title": "Set settings",
|
|
"curl": "curl -d'{\"method\": \"settings_set\", \"params\": {\"key\": \"tcp_port\", \"value\": 99}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet settings set \"tcp_port\" 99",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"settings_set\", \"params\": {\"key\": \"tcp_port\", \"value\": 99}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"tcp_port\": 99\n }\n}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"stream": {
|
|
"doc": "Create, update, abandon, list and inspect your stream claims.",
|
|
"commands": [
|
|
{
|
|
"name": "stream_abandon",
|
|
"description": "Abandon one of my stream claims.",
|
|
"arguments": [
|
|
{
|
|
"name": "claim_id",
|
|
"type": "str",
|
|
"description": "claim_id of the claim to abandon",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "txid",
|
|
"type": "str",
|
|
"description": "txid of the claim to abandon",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "nout",
|
|
"type": "int",
|
|
"description": "nout of the claim to abandon",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id of the account to use",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "preview",
|
|
"type": "bool",
|
|
"description": "do not broadcast the transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "blocking",
|
|
"type": "bool",
|
|
"description": "wait until abandon is in mempool",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"txid\": \"hash of transaction in hex\",\n \"height\": \"block where transaction was recorded\",\n \"inputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"outputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"total_input\": \"sum of inputs as a decimal\",\n \"total_output\": \"sum of outputs, sans fee, as a decimal\",\n \"total_fee\": \"fee amount\",\n \"hex\": \"entire transaction encoded in hex\"\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Abandon a stream claim",
|
|
"curl": "curl -d'{\"method\": \"stream_abandon\", \"params\": {\"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\", \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet stream abandon ebed8d1668d259c06c1d8db114e9bb8a882e70e9",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_abandon\", \"params\": {\"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\", \"preview\": false, \"blocking\": false}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000010bc09b720e2d960d7eca46a5b74fe7b08b5d0de8684f7f20cf37625c4a59ea2e000000006a473044022064a998b994d5d288ddc3e4d0580ebbfd682900c73dfab3987a0fd61c9621102a0220777e6d15708c7ff756030b4e4c1ecbeb4b6771aba6a208822f2e67e67bc3667c0121028d899c7322e1a0337ed80fd89e477907ace8681af8c4e00dabb9e475509e0568ffffffff0134b7f505000000001976a9149493b0bcc0453c5a405a0551e7ab0c3d4c14e18688ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mqqphvUE5WQRK2ZbXq4nCxRHycZZL71ksV\",\n \"amount\": \"1.0\",\n \"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\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#ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\n \"timestamp\": 1569257570,\n \"txid\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp7rhvd_bl\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mu4ZE9o3CezNDVotsueVxX7hVVpVuUBzGJ\",\n \"amount\": \"0.999893\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"timestamp\": null,\n \"txid\": \"8de7ce8b74745945f3e33267a9d815608d44342ae42e0b0a5db25cc42952fba0\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000107\",\n \"total_input\": \"1.0\",\n \"total_output\": \"0.999893\",\n \"txid\": \"8de7ce8b74745945f3e33267a9d815608d44342ae42e0b0a5db25cc42952fba0\"\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "stream_cost_estimate",
|
|
"description": "Get estimated cost for a lbry stream",
|
|
"arguments": [
|
|
{
|
|
"name": "uri",
|
|
"type": "str",
|
|
"description": "uri to use",
|
|
"is_required": true
|
|
}
|
|
],
|
|
"returns": "(float) Estimated cost in lbry credits, returns None if uri is not\n resolvable",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "stream_create",
|
|
"description": "Make a new stream claim and announce the associated file to lbrynet.",
|
|
"arguments": [
|
|
{
|
|
"name": "name",
|
|
"type": "str",
|
|
"description": "name of the content (can only consist of a-z A-Z 0-9 and -(dash))",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "bid",
|
|
"type": "decimal",
|
|
"description": "amount to back the claim",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "file_path",
|
|
"type": "str",
|
|
"description": "path to file to be associated with name.",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "allow_duplicate_name",
|
|
"type": "bool",
|
|
"description": "create new claim even if one already exists with given name. default: false.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "fee_currency",
|
|
"type": "string",
|
|
"description": "specify fee currency",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "fee_amount",
|
|
"type": "decimal",
|
|
"description": "content download fee",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "fee_address",
|
|
"type": "str",
|
|
"description": "address where to send fee payments, will use value from --claim_address if not provided",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "title",
|
|
"type": "str",
|
|
"description": "title of the publication",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "description",
|
|
"type": "str",
|
|
"description": "description of the publication",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "author",
|
|
"type": "str",
|
|
"description": "author of the publication. The usage for this field is not the same as for channels. The author field is used to credit an author who is not the publisher and is not represented by the channel. For example, a pdf file of 'The Odyssey' has an author of 'Homer' but may by published to a channel such as '@classics', or to no channel at all",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "tags",
|
|
"type": "list",
|
|
"description": "add content tags",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "languages",
|
|
"type": "list",
|
|
"description": "languages used by the channel, using RFC 5646 format, eg: for English `--languages=en` for Spanish (Spain) `--languages=es-ES` for Spanish (Mexican) `--languages=es-MX` for Chinese (Simplified) `--languages=zh-Hans` for Chinese (Traditional) `--languages=zh-Hant`",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "locations",
|
|
"type": "list",
|
|
"description": "locations relevant to the stream, consisting of 2 letter `country` code and a `state`, `city` and a postal `code` along with a `latitude` and `longitude`. for JSON RPC: pass a dictionary with aforementioned attributes as keys, eg: ... \"locations\": [{'country': 'US', 'state': 'NH'}] ... for command line: pass a colon delimited list with values in the following order: \"COUNTRY:STATE:CITY:CODE:LATITUDE:LONGITUDE\" making sure to include colon for blank values, for example to provide only the city: ... --locations=\"::Manchester\" with all values set: ... --locations=\"US:NH:Manchester:03101:42.990605:-71.460989\" optionally, you can just pass the \"LATITUDE:LONGITUDE\": ... --locations=\"42.990605:-71.460989\" finally, you can also pass JSON string of dictionary on the command line as you would via JSON RPC ... --locations=\"{'country': 'US', 'state': 'NH'}\"",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "license",
|
|
"type": "str",
|
|
"description": "publication license",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "license_url",
|
|
"type": "str",
|
|
"description": "publication license url",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "thumbnail_url",
|
|
"type": "str",
|
|
"description": "thumbnail url",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "release_time",
|
|
"type": "int",
|
|
"description": "original public release of content, seconds since UNIX epoch",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "width",
|
|
"type": "int",
|
|
"description": "image/video width, automatically calculated from media file",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "height",
|
|
"type": "int",
|
|
"description": "image/video height, automatically calculated from media file",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "duration",
|
|
"type": "int",
|
|
"description": "audio/video duration in seconds, automatically calculated",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_id",
|
|
"type": "str",
|
|
"description": "claim id of the publisher channel",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_name",
|
|
"type": "str",
|
|
"description": "name of the publisher channel",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_account_id",
|
|
"type": "str",
|
|
"description": "one or more account ids for accounts to look in for channel certificates, defaults to all accounts.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "account to use for holding the transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "funding_account_ids",
|
|
"type": "list",
|
|
"description": "ids of accounts to fund this transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "claim_address",
|
|
"type": "str",
|
|
"description": "address where the claim is sent to, if not specified it will be determined automatically from the account",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "preview",
|
|
"type": "bool",
|
|
"description": "do not broadcast the transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "blocking",
|
|
"type": "bool",
|
|
"description": "wait until transaction is in mempool",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"txid\": \"hash of transaction in hex\",\n \"height\": \"block where transaction was recorded\",\n \"inputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"outputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"total_input\": \"sum of inputs as a decimal\",\n \"total_output\": \"sum of outputs, sans fee, as a decimal\",\n \"total_fee\": \"fee amount\",\n \"hex\": \"entire transaction encoded in hex\"\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Create a stream claim without metadata",
|
|
"curl": "curl -d'{\"method\": \"stream_create\", \"params\": {\"name\": \"astream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp7rhvd_bl\", \"tags\": [], \"languages\": [], \"locations\": [], \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet stream create astream 1.0 /tmp/tmp7rhvd_bl",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_create\", \"params\": {\"name\": \"astream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp7rhvd_bl\", \"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\": \"01000000014afa8968a08182a280807edba82b6eafc89ca240ea7dc21e48d726f4e01f4418010000006a473044022017f22271674514adc400ff24c190f4fde0039e8d5df190689ba4e9e49d78d37a02206718dbf513256879616cab84387f831d8f20958b24f09dec014725ef2ec4a905012102d072e76ac6e165453eb5ece14fc51cb00e21226c33da5458ddbcadd3257c031affffffff0200e1f50500000000bab5076173747265616d4c94000a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d7037726876645f626c180b22186170706c69636174696f6e2f6f637465742d73747265616d32300159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd6d7576a9147142d39a6e6cf052dd45c9d1e49f8a92af96fec588ac38fb9423000000001976a914f29c638960ad798dbe75fbb1c38ebb54ceb0033988ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mnaU4YnkYxRt1uPikPW4gGEg2EVQiktq5f\",\n \"amount\": \"6.983769\",\n \"confirmations\": 4,\n \"height\": 209,\n \"is_change\": false,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1569257569,\n \"txid\": \"18441fe0f426d7481ec27dea40a29cc8af6e2ba8db7e8080a28281a06889fa4a\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mqqphvUE5WQRK2ZbXq4nCxRHycZZL71ksV\",\n \"amount\": \"1.0\",\n \"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\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#ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\n \"timestamp\": null,\n \"txid\": \"af2cd1f9387802b514e0ee4cd2931b23c1a36d76e23438a7f384a9be0993de2a\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp7rhvd_bl\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"n3dmAZZyHBtSLE11WtvrGcDAc48uXGe494\",\n \"amount\": \"5.969662\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"af2cd1f9387802b514e0ee4cd2931b23c1a36d76e23438a7f384a9be0993de2a\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.014107\",\n \"total_input\": \"6.983769\",\n \"total_output\": \"6.969662\",\n \"txid\": \"af2cd1f9387802b514e0ee4cd2931b23c1a36d76e23438a7f384a9be0993de2a\"\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/tmpriatijmi.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\": 1569257546, \"channel_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\", \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet stream create blank-image 1.0 /tmp/tmpriatijmi.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=1569257546 --channel_id=\"a97186b2b68427e475452ebe9bcd9475be772d49\"",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_create\", \"params\": {\"name\": \"blank-image\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpriatijmi.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\": 1569257546, \"channel_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\", \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false}}).json()",
|
|
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000012ade9309bea984f3a73834e2766da3c1231b93d24ceee014b5027838f9d12caf010000006a4730440220401085db14328afbbb36b536276a7972410bbcfdc32dd05156373b5ba64559d1022012f3657c169df9a2279ff454e369d44f70fe38a5601c05267b9027835a6429d6012102f3b69a8ec5e6110451eabf77c28f323f81e2b631eeec5cdd2cbc24390a8a5402ffffffff0200e1f50500000000fddc01b50b626c616e6b2d696d6167654db10101492d77be7594cd9bbe2e4575e42784b6b28671a9a63269cb7ec12a469485c87714ba0be91951c4ad898c3f273b11d4030629958fc076ff49005b33177ba9554aed703717573d859abcb0fce2ccde7595459e0cd20ae6010a82010a306c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545120f746d7072696174696a6d692e706e6718632209696d6167652f706e673230084b3a361ef86bd694e1fd772a9b51d1c2fc1ca3ba80427669963d7d1f7a6e7f010bcd3aca0400dd19ce73fb639db834120650696361736f1a0d5075626c696320446f6d61696e2218687474703a2f2f7075626c69632d646f6d61696e2e6f726728caf0a3ec053222080112196fa393d247b5cafd376fd47e450a886ebb6e9c4918b846b276188087a70e520408051007420b426c616e6b20496d6167654a184120626c616e6b20504e472074686174206973203578372e52252a23687474703a2f2f736d616c6c6d656469612e636f6d2f7468756d626e61696c2e6a70675a05626c616e6b5a03617274620208016a1308ec0112024e481a0a4d616e636865737465726d7576a914a393d247b5cafd376fd47e450a886ebb6e9c491888acac5e7d1d000000001976a91462a9c478ed5b1f09a70dde7043dca9f1a942aa5988ac00000000\",\n \"inputs\": [\n {\n \"address\": \"n3dmAZZyHBtSLE11WtvrGcDAc48uXGe494\",\n \"amount\": \"5.969662\",\n \"confirmations\": 2,\n \"height\": 213,\n \"is_change\": false,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1569257570,\n \"txid\": \"af2cd1f9387802b514e0ee4cd2931b23c1a36d76e23438a7f384a9be0993de2a\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mvRsX8iHAcN11xn8c7quz9dLnF2HVgzrUV\",\n \"amount\": \"1.0\",\n \"claim_id\": \"e37c0dd6aced3f7ffc81bbaf3020c7f9268fdd96\",\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#e37c0dd6aced3f7ffc81bbaf3020c7f9268fdd96\",\n \"signing_channel\": {\n \"address\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"amount\": \"1.0\",\n \"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\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#a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"timestamp\": 1569257569,\n \"txid\": \"f32d6f3bad6ae416714f06902939b82baa053f821431c38b47541e52351665e5\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32\",\n \"public_key_id\": \"mzYaWmhuYfprZDR9EWSYb7JxhPDTFhRQgo\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": null,\n \"txid\": \"3597b006e225b258925585d5e836f636ef211772d9bb13a97531b23437cfacfb\",\n \"type\": \"claim\",\n \"value\": {\n \"author\": \"Picaso\",\n \"description\": \"A blank PNG that is 5x7.\",\n \"fee\": {\n \"address\": \"mvRsX8iHAcN11xn8c7quz9dLnF2HVgzrUV\",\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\": \"1569257546\",\n \"source\": {\n \"hash\": \"6c7df435d412c603390f593ef658c199817c7830ba3f16b7eadd8f99fa50e85dbd0d2b3dc61eadc33fe096e3872d1545\",\n \"media_type\": \"image/png\",\n \"name\": \"tmpriatijmi.png\",\n \"sd_hash\": \"084b3a361ef86bd694e1fd772a9b51d1c2fc1ca3ba80427669963d7d1f7a6e7f010bcd3aca0400dd19ce73fb639db834\",\n \"size\": \"99\"\n },\n \"stream_type\": \"image\",\n \"tags\": [\n \"blank\",\n \"art\"\n ],\n \"thumbnail\": {\n \"url\": \"http://smallmedia.com/thumbnail.jpg\"\n },\n \"title\": \"Blank Image\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mpWdtWBngcJdFfgSSK53CbM9XpTjbDgeUt\",\n \"amount\": \"4.947555\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"3597b006e225b258925585d5e836f636ef211772d9bb13a97531b23437cfacfb\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.022107\",\n \"total_input\": \"5.969662\",\n \"total_output\": \"5.947555\",\n \"txid\": \"3597b006e225b258925585d5e836f636ef211772d9bb13a97531b23437cfacfb\"\n }\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "stream_list",
|
|
"description": "List my stream claims.",
|
|
"arguments": [
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id of the account to query",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict results to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "page",
|
|
"type": "int",
|
|
"description": "page to return during paginating",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "page_size",
|
|
"type": "int",
|
|
"description": "number of items on page during pagination",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"page\": \"Page number of the current items.\",\n \"page_size\": \"Number of items to show on a page.\",\n \"total_pages\": \"Total number of pages.\",\n \"total_items\": \"Total number of items.\",\n \"items\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ]\n }",
|
|
"examples": [
|
|
{
|
|
"title": "List all your stream claims",
|
|
"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\": \"mqqphvUE5WQRK2ZbXq4nCxRHycZZL71ksV\",\n \"amount\": \"1.0\",\n \"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\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#ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\n \"signing_channel\": {\n \"address\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"amount\": \"1.0\",\n \"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\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#a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"timestamp\": 1569257569,\n \"txid\": \"f32d6f3bad6ae416714f06902939b82baa053f821431c38b47541e52351665e5\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32\",\n \"public_key_id\": \"mzYaWmhuYfprZDR9EWSYb7JxhPDTFhRQgo\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1569257570,\n \"txid\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp7rhvd_bl\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n }\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\": \"mqqphvUE5WQRK2ZbXq4nCxRHycZZL71ksV\",\n \"amount\": \"1.0\",\n \"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\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#ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\n \"signing_channel\": {\n \"address\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"amount\": \"1.0\",\n \"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\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#a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"timestamp\": 1569257569,\n \"txid\": \"f32d6f3bad6ae416714f06902939b82baa053f821431c38b47541e52351665e5\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32\",\n \"public_key_id\": \"mzYaWmhuYfprZDR9EWSYb7JxhPDTFhRQgo\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": 1569257570,\n \"txid\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp7rhvd_bl\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\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}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "stream_update",
|
|
"description": "Update an existing stream claim and if a new file is provided announce it to lbrynet.",
|
|
"arguments": [
|
|
{
|
|
"name": "claim_id",
|
|
"type": "str",
|
|
"description": "id of the stream claim to update",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "bid",
|
|
"type": "decimal",
|
|
"description": "amount to back the claim",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "file_path",
|
|
"type": "str",
|
|
"description": "path to file to be associated with name.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "file_name",
|
|
"type": "str",
|
|
"description": "override file name, defaults to name from file_path.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "file_size",
|
|
"type": "str",
|
|
"description": "override file size, otherwise automatically computed.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "file_hash",
|
|
"type": "str",
|
|
"description": "override file hash, otherwise automatically computed.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "fee_currency",
|
|
"type": "string",
|
|
"description": "specify fee currency",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "fee_amount",
|
|
"type": "decimal",
|
|
"description": "content download fee",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "fee_address",
|
|
"type": "str",
|
|
"description": "address where to send fee payments, will use value from --claim_address if not provided",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "clear_fee",
|
|
"type": "bool",
|
|
"description": "clear previously set fee",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "title",
|
|
"type": "str",
|
|
"description": "title of the publication",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "description",
|
|
"type": "str",
|
|
"description": "description of the publication",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "author",
|
|
"type": "str",
|
|
"description": "author of the publication. The usage for this field is not the same as for channels. The author field is used to credit an author who is not the publisher and is not represented by the channel. For example, a pdf file of 'The Odyssey' has an author of 'Homer' but may by published to a channel such as '@classics', or to no channel at all",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "tags",
|
|
"type": "list",
|
|
"description": "add content tags",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "clear_tags",
|
|
"type": "bool",
|
|
"description": "clear existing tags (prior to adding new ones)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "languages",
|
|
"type": "list",
|
|
"description": "languages used by the channel, using RFC 5646 format, eg: for English `--languages=en` for Spanish (Spain) `--languages=es-ES` for Spanish (Mexican) `--languages=es-MX` for Chinese (Simplified) `--languages=zh-Hans` for Chinese (Traditional) `--languages=zh-Hant`",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "clear_languages",
|
|
"type": "bool",
|
|
"description": "clear existing languages (prior to adding new ones)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "locations",
|
|
"type": "list",
|
|
"description": "locations relevant to the stream, consisting of 2 letter `country` code and a `state`, `city` and a postal `code` along with a `latitude` and `longitude`. for JSON RPC: pass a dictionary with aforementioned attributes as keys, eg: ... \"locations\": [{'country': 'US', 'state': 'NH'}] ... for command line: pass a colon delimited list with values in the following order: \"COUNTRY:STATE:CITY:CODE:LATITUDE:LONGITUDE\" making sure to include colon for blank values, for example to provide only the city: ... --locations=\"::Manchester\" with all values set: ... --locations=\"US:NH:Manchester:03101:42.990605:-71.460989\" optionally, you can just pass the \"LATITUDE:LONGITUDE\": ... --locations=\"42.990605:-71.460989\" finally, you can also pass JSON string of dictionary on the command line as you would via JSON RPC ... --locations=\"{'country': 'US', 'state': 'NH'}\"",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "clear_locations",
|
|
"type": "bool",
|
|
"description": "clear existing locations (prior to adding new ones)",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "license",
|
|
"type": "str",
|
|
"description": "publication license",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "license_url",
|
|
"type": "str",
|
|
"description": "publication license url",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "thumbnail_url",
|
|
"type": "str",
|
|
"description": "thumbnail url",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "release_time",
|
|
"type": "int",
|
|
"description": "original public release of content, seconds since UNIX epoch",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "width",
|
|
"type": "int",
|
|
"description": "image/video width, automatically calculated from media file",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "height",
|
|
"type": "int",
|
|
"description": "image/video height, automatically calculated from media file",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "duration",
|
|
"type": "int",
|
|
"description": "audio/video duration in seconds, automatically calculated",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_id",
|
|
"type": "str",
|
|
"description": "claim id of the publisher channel",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_name",
|
|
"type": "str",
|
|
"description": "name of the publisher channel",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "clear_channel",
|
|
"type": "bool",
|
|
"description": "remove channel signature",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "channel_account_id",
|
|
"type": "str",
|
|
"description": "one or more account ids for accounts to look in for channel certificates, defaults to all accounts.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "account to use for holding the transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "funding_account_ids",
|
|
"type": "list",
|
|
"description": "ids of accounts to fund this transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "claim_address",
|
|
"type": "str",
|
|
"description": "address where the claim is sent to, if not specified it will be determined automatically from the account",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "preview",
|
|
"type": "bool",
|
|
"description": "do not broadcast the transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "blocking",
|
|
"type": "bool",
|
|
"description": "wait until transaction is in mempool",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "replace",
|
|
"type": "bool",
|
|
"description": "instead of modifying specific values on the stream, this will clear all existing values and only save passed in values, useful for form submissions where all values are always set",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"txid\": \"hash of transaction in hex\",\n \"height\": \"block where transaction was recorded\",\n \"inputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"outputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"total_input\": \"sum of inputs as a decimal\",\n \"total_output\": \"sum of outputs, sans fee, as a decimal\",\n \"total_fee\": \"fee amount\",\n \"hex\": \"entire transaction encoded in hex\"\n }",
|
|
"examples": [
|
|
{
|
|
"title": "Update a stream claim to add channel",
|
|
"curl": "curl -d'{\"method\": \"stream_update\", \"params\": {\"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\", \"clear_fee\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"channel_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\", \"clear_channel\": false, \"channel_account_id\": [], \"funding_account_ids\": [], \"preview\": false, \"blocking\": false, \"replace\": false}}' http://localhost:5279/",
|
|
"lbrynet": "lbrynet stream update ebed8d1668d259c06c1d8db114e9bb8a882e70e9 --channel_id=\"a97186b2b68427e475452ebe9bcd9475be772d49\"",
|
|
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_update\", \"params\": {\"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\", \"clear_fee\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"channel_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\", \"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\": \"01000000022ade9309bea984f3a73834e2766da3c1231b93d24ceee014b5027838f9d12caf000000006a473044022027e0365d3d4b0aed04a3074cd51daae1861eb6c7ec58ed32fad8ea266ba77c6902205316f06134f2491f9c2b5dc19a805d67cd5fdfd25208cdb60de2eb2a213367ed0121028d899c7322e1a0337ed80fd89e477907ace8681af8c4e00dabb9e475509e0568ffffffff0690456098e03bb455b0afa0b9ea9492745a172db4445890c0f9d3cb695b85b5010000006b483045022100c63c2ccfc3a46c530fe254ffdbf249e84d83d101d14a8f319c0feba6faabd12c02207eec3b97f925b9e5395adb2a47200be1be51fb84c9b0654271e125974b02f66d01210297f88ed7e227c68071042f2d4e46e4bee85188621f03ca954b98c2afc26e9a20ffffffff0200e1f50500000000fd2301b7076173747265616d14e9702e888abbe914b18d1d6cc059d268168dedeb4ce801492d77be7594cd9bbe2e4575e42784b6b28671a97feea119e096fecb7cb354773d7583f38083842dccac76f7b8ddd2be2fc1fb4474693226de36237515a582f1734eaa25c6968af898c3ed913144d0fbab1398b20a90010a8d010a30fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd120b746d7037726876645f626c180b22186170706c69636174696f6e2f6f637465742d73747265616d32300159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd6d6d76a9147142d39a6e6cf052dd45c9d1e49f8a92af96fec588ac32a0d205000000001976a9148f15a56ee0afb3a20ac1cb520d66213240a3ac3488ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mqqphvUE5WQRK2ZbXq4nCxRHycZZL71ksV\",\n \"amount\": \"1.0\",\n \"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\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#ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\n \"timestamp\": 1569257570,\n \"txid\": \"af2cd1f9387802b514e0ee4cd2931b23c1a36d76e23438a7f384a9be0993de2a\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp7rhvd_bl\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"n1w8oA5Pz1ZHMyUjWcgq8KvuiXCBqH7mcy\",\n \"amount\": \"0.9772285\",\n \"confirmations\": 3,\n \"height\": 211,\n \"is_change\": false,\n \"is_mine\": true,\n \"nout\": 1,\n \"timestamp\": 1569257569,\n \"txid\": \"b5855b69cbd3f9c0905844b42d175a749294eab9a0afb055b43be09860459006\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mqqphvUE5WQRK2ZbXq4nCxRHycZZL71ksV\",\n \"amount\": \"1.0\",\n \"claim_id\": \"ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\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#ebed8d1668d259c06c1d8db114e9bb8a882e70e9\",\n \"signing_channel\": {\n \"address\": \"mtqGGp9y6fAA7RnLWCgUxVBzLF1EKBMjX6\",\n \"amount\": \"1.0\",\n \"claim_id\": \"a97186b2b68427e475452ebe9bcd9475be772d49\",\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#a97186b2b68427e475452ebe9bcd9475be772d49\",\n \"timestamp\": 1569257569,\n \"txid\": \"f32d6f3bad6ae416714f06902939b82baa053f821431c38b47541e52351665e5\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a03420004667f56e30911326632336e9649755f4182c79c24500e3d9f63dd766f86cee16e470b87ad90bd15fd698b128ea4e92a1a8b3a7d8fbdfc9d07ca578fb856e99b32\",\n \"public_key_id\": \"mzYaWmhuYfprZDR9EWSYb7JxhPDTFhRQgo\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n \"timestamp\": null,\n \"txid\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"fdbd8e75a67f29f701a4e040385e2e23986303ea10239211af907fcbb83578b3e417cb71ce646efd0819dd8c088de1bd\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmp7rhvd_bl\",\n \"sd_hash\": \"0159066fc2c35a8d5d44c2245d1ac1ce668b59879a17a232ba5c4585e8052eb70079567eb5963d86adf13dadf83489dd\",\n \"size\": \"11\"\n },\n \"stream_type\": \"binary\"\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mtZWrVUQ4nVrckPih6cD6G6HdqAuUfNAaH\",\n \"amount\": \"0.9768965\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"timestamp\": null,\n \"txid\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000332\",\n \"total_input\": \"1.9772285\",\n \"total_output\": \"1.9768965\",\n \"txid\": \"2eea594a5c6237cf207f4f68e80d5d8bb0e74fb7a546ca7e0d962d0e729bc00b\"\n }\n}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"support": {
|
|
"doc": "Create, list and abandon all types of supports.",
|
|
"commands": [
|
|
{
|
|
"name": "support_abandon",
|
|
"description": "Abandon supports, including tips, of a specific claim, optionally\nkeeping some amount as supports.",
|
|
"arguments": [
|
|
{
|
|
"name": "claim_id",
|
|
"type": "str",
|
|
"description": "claim_id of the support to abandon",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "txid",
|
|
"type": "str",
|
|
"description": "txid of the claim to abandon",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "nout",
|
|
"type": "int",
|
|
"description": "nout of the claim to abandon",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "keep",
|
|
"type": "decimal",
|
|
"description": "amount of lbc to keep as support",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id of the account to use",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "preview",
|
|
"type": "bool",
|
|
"description": "do not broadcast the transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "blocking",
|
|
"type": "bool",
|
|
"description": "wait until abandon is in mempool",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"txid\": \"hash of transaction in hex\",\n \"height\": \"block where transaction was recorded\",\n \"inputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"outputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"total_input\": \"sum of inputs as a decimal\",\n \"total_output\": \"sum of outputs, sans fee, as a decimal\",\n \"total_fee\": \"fee amount\",\n \"hex\": \"entire transaction encoded in hex\"\n }",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "support_create",
|
|
"description": "Create a support or a tip for name claim.",
|
|
"arguments": [
|
|
{
|
|
"name": "claim_id",
|
|
"type": "str",
|
|
"description": "claim_id of the claim to support",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "amount",
|
|
"type": "decimal",
|
|
"description": "amount of support",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "tip",
|
|
"type": "bool",
|
|
"description": "send support to claim owner, default: false.",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "account to use for holding the transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "funding_account_ids",
|
|
"type": "list",
|
|
"description": "ids of accounts to fund this transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "preview",
|
|
"type": "bool",
|
|
"description": "do not broadcast the transaction",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "blocking",
|
|
"type": "bool",
|
|
"description": "wait until transaction is in mempool",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"txid\": \"hash of transaction in hex\",\n \"height\": \"block where transaction was recorded\",\n \"inputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"outputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"total_input\": \"sum of inputs as a decimal\",\n \"total_output\": \"sum of outputs, sans fee, as a decimal\",\n \"total_fee\": \"fee amount\",\n \"hex\": \"entire transaction encoded in hex\"\n }",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "support_list",
|
|
"description": "List supports and tips in my control.",
|
|
"arguments": [
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id of the account to query",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict results to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "page",
|
|
"type": "int",
|
|
"description": "page to return during paginating",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "page_size",
|
|
"type": "int",
|
|
"description": "number of items on page during pagination",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"page\": \"Page number of the current items.\",\n \"page_size\": \"Number of items to show on a page.\",\n \"total_pages\": \"Total number of pages.\",\n \"total_items\": \"Total number of items.\",\n \"items\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ]\n }",
|
|
"examples": []
|
|
}
|
|
]
|
|
},
|
|
"sync": {
|
|
"doc": "Wallet synchronization.",
|
|
"commands": [
|
|
{
|
|
"name": "sync_apply",
|
|
"description": "Apply incoming synchronization data, if provided, and then produce a sync hash and\nan encrypted wallet.",
|
|
"arguments": [
|
|
{
|
|
"name": "password",
|
|
"type": "str",
|
|
"description": "password to decrypt incoming and encrypt outgoing data",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "data",
|
|
"type": "str",
|
|
"description": "incoming sync data, if any",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "encrypt-password",
|
|
"type": "str",
|
|
"description": "password to encrypt outgoing data if different from the decrypt password, used during password changes",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "wallet being sync'ed",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(map) sync hash and data",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "sync_hash",
|
|
"description": "Deterministic hash of the wallet.",
|
|
"arguments": [
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "wallet for which to generate hash",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "(str) sha256 hash of wallet",
|
|
"examples": []
|
|
}
|
|
]
|
|
},
|
|
"transaction": {
|
|
"doc": "Transaction management.",
|
|
"commands": [
|
|
{
|
|
"name": "transaction_list",
|
|
"description": "List transactions belonging to wallet",
|
|
"arguments": [
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id of the account to query",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict results to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "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 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 }",
|
|
"examples": [
|
|
{
|
|
"title": "List your transactions",
|
|
"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-09-23 12:52\",\n \"fee\": \"-0.000124\",\n \"support_info\": [],\n \"timestamp\": 1569257569,\n \"txid\": \"0299b85a0e411f806ff210904fc52075e8309de1f53d2b4f821b81894c5a0583\",\n \"update_info\": [],\n \"value\": \"0.0\"\n },\n {\n \"abandon_info\": [],\n \"claim_info\": [],\n \"confirmations\": 7,\n \"date\": \"2019-09-23 12:52\",\n \"fee\": \"0.0\",\n \"support_info\": [],\n \"timestamp\": 1569257568,\n \"txid\": \"21d3e39f6018c55474383a42f67ddcf490baf80cc3563b5ecdc99082f9a5ef5d\",\n \"update_info\": [],\n \"value\": \"10.0\"\n }\n ]\n}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "transaction_show",
|
|
"description": "Get a decoded transaction from a txid",
|
|
"arguments": [
|
|
{
|
|
"name": "txid",
|
|
"type": "str",
|
|
"description": "txid of the transaction",
|
|
"is_required": true
|
|
}
|
|
],
|
|
"returns": " {\n \"txid\": \"hash of transaction in hex\",\n \"height\": \"block where transaction was recorded\",\n \"inputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"outputs\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ],\n \"total_input\": \"sum of inputs as a decimal\",\n \"total_output\": \"sum of outputs, sans fee, as a decimal\",\n \"total_fee\": \"fee amount\",\n \"hex\": \"entire transaction encoded in hex\"\n }",
|
|
"examples": []
|
|
}
|
|
]
|
|
},
|
|
"utxo": {
|
|
"doc": "Unspent transaction management.",
|
|
"commands": [
|
|
{
|
|
"name": "utxo_list",
|
|
"description": "List unspent transaction outputs",
|
|
"arguments": [
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id of the account to query",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict results to specific wallet",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "page",
|
|
"type": "int",
|
|
"description": "page to return during paginating",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "page_size",
|
|
"type": "int",
|
|
"description": "number of items on page during pagination",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"page\": \"Page number of the current items.\",\n \"page_size\": \"Number of items to show on a page.\",\n \"total_pages\": \"Total number of pages.\",\n \"total_items\": \"Total number of items.\",\n \"items\": [\n {\n \"txid\": \"hash of transaction in hex\",\n \"nout\": \"position in the transaction\",\n \"height\": \"block where transaction was recorded\",\n \"amount\": \"value of the txo as a decimal\",\n \"address\": \"address of who can spend the txo\",\n \"confirmations\": \"number of confirmed blocks\",\n \"is_change\": \"payment to change address, only available when it can be determined\",\n \"is_mine\": \"payment to one of your accounts, only available when it can be determined\",\n \"type\": \"one of 'claim', 'support' or 'payment'\",\n \"name\": \"when type is 'claim' or 'support', this is the claim name\",\n \"claim_id\": \"when type is 'claim' or 'support', this is the claim id\",\n \"claim_op\": \"when type is 'claim', this determines if it is 'create' or 'update'\",\n \"value\": \"when type is 'claim' or 'support' with payload, this is the decoded protobuf payload\",\n \"value_type\": \"determines the type of the 'value' field: 'channel', 'stream', etc\",\n \"protobuf\": \"hex encoded raw protobuf version of 'value' field\",\n \"permanent_url\": \"when type is 'claim' or 'support', this is the long permanent claim URL\",\n \"signing_channel\": \"for signed claims only, metadata of signing channel\",\n \"is_channel_signature_valid\": \"for signed claims only, whether signature is valid\"\n }\n ]\n }",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "utxo_release",
|
|
"description": "When spending a UTXO it is locally locked to prevent double spends;\noccasionally this can result in a UTXO being locked which ultimately\ndid not get spent (failed to broadcast, spend transaction was not\naccepted by blockchain node, etc). This command releases the lock\non all UTXOs in your account.",
|
|
"arguments": [
|
|
{
|
|
"name": "account_id",
|
|
"type": "str",
|
|
"description": "id of the account to query",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "restrict operation to specific wallet",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": "None",
|
|
"examples": []
|
|
}
|
|
]
|
|
},
|
|
"wallet": {
|
|
"doc": "Create, modify and inspect wallets.",
|
|
"commands": [
|
|
{
|
|
"name": "wallet_add",
|
|
"description": "Add existing wallet.",
|
|
"arguments": [
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "wallet file name",
|
|
"is_required": true
|
|
}
|
|
],
|
|
"returns": " {\n \"id\": \"wallet_id\",\n \"name\": \"optional wallet name\"\n }",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "wallet_create",
|
|
"description": "Create a new wallet.",
|
|
"arguments": [
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "wallet file name",
|
|
"is_required": true
|
|
},
|
|
{
|
|
"name": "skip_on_startup",
|
|
"type": "bool",
|
|
"description": "don't add wallet to daemon_settings.yml",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "create_account",
|
|
"type": "bool",
|
|
"description": "generates the default account",
|
|
"is_required": false
|
|
},
|
|
{
|
|
"name": "single_key",
|
|
"type": "bool",
|
|
"description": "used with --create_account, creates single-key account",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " {\n \"id\": \"wallet_id\",\n \"name\": \"optional wallet name\"\n }",
|
|
"examples": []
|
|
},
|
|
{
|
|
"name": "wallet_list",
|
|
"description": "List wallets.",
|
|
"arguments": [
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "show specific wallet only",
|
|
"is_required": false
|
|
}
|
|
],
|
|
"returns": " [\n {\n \"id\": \"wallet_id\",\n \"name\": \"optional wallet name\"\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}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "wallet_remove",
|
|
"description": "Remove an existing wallet.",
|
|
"arguments": [
|
|
{
|
|
"name": "wallet_id",
|
|
"type": "str",
|
|
"description": "name of wallet to remove",
|
|
"is_required": true
|
|
}
|
|
],
|
|
"returns": " {\n \"id\": \"wallet_id\",\n \"name\": \"optional wallet name\"\n }",
|
|
"examples": []
|
|
}
|
|
]
|
|
}
|
|
} |