{ "main": { "doc": "Ungrouped commands.", "commands": [ { "name": "block_show", "description": "Get contents of a block", "arguments": [ { "name": "blockhash", "type": "str", "description": "hash of the block to look up", "is_required": true }, { "name": "height", "type": "int", "description": "height of the block to look up", "is_required": true } ], "returns": "(dict) Requested block", "examples": [ { "title": "Show contents of the first block.", "curl": "curl -d'{\"method\": \"block_show\", \"params\": {\"height\": 1}}' http://localhost:5279/", "lbrynet": "lbrynet block_show --height=1", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"block_show\", \"params\": {\"height\": 1}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"bits\": \"207fffff\",\n \"chainwork\": \"0000000000000000000000000000000000000000000000000000000000000004\",\n \"confirmations\": 206,\n \"difficulty\": 3.051711610163642e-05,\n \"hash\": \"b5f01193059b29d7167e2e2c5aa9f1f1150741b4fe39e7ce718fd26cfa974770\",\n \"height\": 1,\n \"mediantime\": 1556385171,\n \"merkleroot\": \"e3c489709601458e64e629fcc1ed508d687c76a75c6597b88461a3fdbb158cc6\",\n \"nameclaimroot\": \"0000000000000000000000000000000000000000000000000000000000000001\",\n \"nextblockhash\": \"48ff387bb6d64082505703f886ef9c5882bb32d09aeda8faa45efecece1b4427\",\n \"nonce\": 1,\n \"previousblockhash\": \"6e3fcf1299d4ec5d79c3a4c91d624a4acf9e2e173d95a1a0504f677669687556\",\n \"size\": 211,\n \"target\": \"7fffff0000000000000000000000000000000000000000000000000000000000\",\n \"time\": 1556385171,\n \"tx\": [\n \"e3c489709601458e64e629fcc1ed508d687c76a75c6597b88461a3fdbb158cc6\"\n ],\n \"version\": 536870912,\n \"versionHex\": \"20000000\"\n }\n}" } ] }, { "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": "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 \"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#85b1f4390164052b6b9388e41a1f3e014f15229b\", \"save_file\": false}}' http://localhost:5279/", "lbrynet": "lbrynet get astream#85b1f4390164052b6b9388e41a1f3e014f15229b", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"get\", \"params\": {\"uri\": \"astream#85b1f4390164052b6b9388e41a1f3e014f15229b\", \"save_file\": false}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"blobs_completed\": 0,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 1,\n \"channel_claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"claim_name\": \"astream\",\n \"completed\": false,\n \"content_fee\": null,\n \"download_directory\": null,\n \"download_path\": null,\n \"file_name\": \"tmpvi__vq5y\",\n \"key\": \"9e4394f7a0d499c77120660356d6c0bf\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpvi__vq5y\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"size\": \"11\"\n }\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01144d564d75f9430a23dab9de23233b7b5db90f5ae44e7b8b2edc41ec86f16259185807ff458a9c6ddf3074b546bec63d723c81524a6a844269da2e7db787cd62424ebb499228f4e37637646b7f154a1226391a9d0a7f0a7d0a20b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9120b746d7076695f5f76713579180b22186170706c69636174696f6e2f6f637465742d73747265616d3230063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"status\": \"running\",\n \"stopped\": false,\n \"stream_hash\": \"2692728e148ca4cfc53d926061ec1d2aab33549c119e546df5a60c9d05028a41660f608aa6670e0c5ef7f1bc51c4e2fd\",\n \"stream_name\": \"tmpvi__vq5y\",\n \"suggested_file_name\": \"tmpvi__vq5y\",\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00\",\n \"written_bytes\": null\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 funding the 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 } ], "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/tmpttcyw95p\", \"tags\": [], \"languages\": [], \"locations\": [], \"channel_account_id\": [], \"preview\": false}}' http://localhost:5279/", "lbrynet": "lbrynet publish a-new-stream --bid=1.0 --file_path=/tmp/tmpttcyw95p", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"publish\", \"params\": {\"name\": \"a-new-stream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpttcyw95p\", \"tags\": [], \"languages\": [], \"locations\": [], \"channel_account_id\": [], \"preview\": false}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001ace13bd5e0ca53668547ca0c58f7363033c3700b40a0f2885c93bfb49d302faf010000006a473044022040102abc858072583bf6390c3e3f9904b50cd46c9f1f013122bb9c3b2f4fe2b402200ba6661536ff8ded7d4cb55b2592c5ccbf20791df7de5331fc320c78402641370121030730909c2a7e4d45c6a7540315669d5e082a8b79423aebe5ea1ced6eb92334d4ffffffff0200e1f50500000000adb50c612d6e65772d73747265616d4c82000a7f0a7d0a20b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9120b746d707474637977393570180b22186170706c69636174696f6e2f6f637465742d73747265616d32300b6522958622e59c190325a2fde69c025e35cca46e379f13d6a68f2e39a9cec31b107d0898b052f86e9b5699533c02066d7576a9140bf3b902c71e93dbd57c6ab06b2a7c2c34bac1ec88ace0b46217000000001976a9148fd01a8f9c53cadaab0ae04f02890ec2d666b1a888ac00000000\",\n \"inputs\": [\n {\n \"address\": \"msGkQtM1s8s6K2REJe8xYLitn7nBZhUBuw\",\n \"amount\": \"4.947555\",\n \"confirmations\": 4,\n \"height\": 215,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"txid\": \"af2f309db4bf935c88f2a0400b70c3333036f7580cca47856653cae0d53be1ac\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mgc9hKAzg5Jh93kY3ncPTHP8mWVEfDb4rd\",\n \"amount\": \"1.0\",\n \"claim_id\": \"1339a5bf0a6e7227083b57088c5911f19f9695d7\",\n \"claim_op\": \"create\",\n \"confirmations\": -2,\n \"height\": -2,\n \"name\": \"a-new-stream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://a-new-stream#1339a5bf0a6e7227083b57088c5911f19f9695d7\",\n \"txid\": \"d0297c06a78416f2575e67c2b5b98f5d56360c7ca5f6865e56aafdf2fef16486\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpttcyw95p\",\n \"sd_hash\": \"0b6522958622e59c190325a2fde69c025e35cca46e379f13d6a68f2e39a9cec31b107d0898b052f86e9b5699533c0206\",\n \"size\": \"11\"\n }\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mtdNDnfLd4fCdCwJfP7SHdQRmBd8Y2buCs\",\n \"amount\": \"3.923448\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"txid\": \"d0297c06a78416f2575e67c2b5b98f5d56360c7ca5f6865e56aafdf2fef16486\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.024107\",\n \"total_input\": \"4.947555\",\n \"total_output\": \"4.923448\",\n \"txid\": \"d0297c06a78416f2575e67c2b5b98f5d56360c7ca5f6865e56aafdf2fef16486\"\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 '': {\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 'depth': (int) claim depth,\n 'has_signature': (bool) included if decoded_claim\n 'name': (str) claim name,\n 'permanent_url': (str) permanent url of the certificate claim,\n 'supports: (list) list of supports [{'txid': (str) txid,\n 'nout': (int) nout,\n 'amount': (float) amount}],\n 'txid': (str) claim txid,\n 'nout': (str) claim nout,\n 'signature_is_valid': (bool), included if has_signature,\n 'value': ClaimDict if decoded, otherwise hex string\n }\n\n If the 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#85b1f4390164052b6b9388e41a1f3e014f15229b\"]}}' http://localhost:5279/", "lbrynet": "lbrynet resolve astream#85b1f4390164052b6b9388e41a1f3e014f15229b", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"resolve\", \"params\": {\"urls\": [\"astream#85b1f4390164052b6b9388e41a1f3e014f15229b\"]}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"astream#85b1f4390164052b6b9388e41a1f3e014f15229b\": {\n \"certificate\": {\n \"address\": \"myvGcJbC32BDvVn2ixQUt1c4mvRSD1GdTx\",\n \"amount\": \"1.0\",\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"claim_sequence\": -1,\n \"decoded_claim\": true,\n \"depth\": 7,\n \"effective_amount\": \"1.0\",\n \"has_signature\": false,\n \"height\": 210,\n \"name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"protobuf\": \"00125a0a583056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56420b4e6577204368616e6e656c\",\n \"supports\": [],\n \"txid\": \"b4c64cfc945eadce780117ccec95b472ef93153c88569466f05bae660fed0150\",\n \"valid_at_height\": 210,\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\",\n \"title\": \"New Channel\"\n }\n },\n \"claim\": {\n \"address\": \"moNsKG2q6D7ch1Vqc69TGL8D6RnyCUTmS8\",\n \"amount\": \"1.0\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"claim_sequence\": -1,\n \"decoded_claim\": true,\n \"depth\": 3,\n \"effective_amount\": \"1.0\",\n \"has_signature\": true,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"protobuf\": \"01144d564d75f9430a23dab9de23233b7b5db90f5ae44e7b8b2edc41ec86f16259185807ff458a9c6ddf3074b546bec63d723c81524a6a844269da2e7db787cd62424ebb499228f4e37637646b7f154a1226391a9d0a7f0a7d0a20b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9120b746d7076695f5f76713579180b22186170706c69636174696f6e2f6f637465742d73747265616d3230063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"signature_is_valid\": true,\n \"signing_channel\": {\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"name\": \"@channel\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\",\n \"title\": \"New Channel\"\n }\n },\n \"supports\": [],\n \"txid\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00\",\n \"valid_at_height\": 214,\n \"value\": {\n \"source\": {\n \"hash\": \"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpvi__vq5y\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"size\": \"11\"\n }\n }\n },\n \"claims_in_channel\": 0\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 : [\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 },\n 'dht': {\n 'node_id': (str) lbry dht node id - hex encoded,\n 'peers_in_routing_table': (int) the number of peers in the routing table,\n },\n 'blob_manager': {\n 'finished_blobs': (int) number of finished blobs in the blob manager,\n },\n 'hash_announcer': {\n 'announce_queue_size': (int) number of blobs currently queued to be announced\n },\n 'stream_manager': {\n 'managed_files': (int) count of files in the stream manager,\n },\n 'upnp': {\n 'aioupnp_version': (str),\n 'redirects': {\n : (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 \"finished_blobs\": 0\n },\n \"connection_status\": {\n \"code\": \"connected\",\n \"message\": \"No connection problems detected\"\n },\n \"installation_id\": \"2VcKkdtRBS2dJv2gc1WN5RwxdzBBgdZwSNAvCY32xo8Bw2KhaPt9sKPKYi2mEDoMSu\",\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\": \"06f6ce70258e259f9368f7856e5ed270c17ed41a4e5fac18d5e860eac424073c\",\n \"blocks\": 206,\n \"blocks_behind\": 0,\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 'build': (str) build type (e.g. \"dev\", \"rc\", \"release\"),\n 'ip': (str) remote ip, if available,\n 'lbrynet_version': (str) lbrynet_version,\n 'lbryum_version': (str) lbryum_version,\n 'lbryschema_version': (str) lbryschema_version,\n 'os_release': (str) os release string\n 'os_system': (str) os name\n 'platform': (str) platform string\n 'processor': (str) processor type,\n 'python_version': (str) python version,\n }", "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.37.0rc3\",\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.2\"\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 } ], "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\": \"minute math collect notable announce defense during bacon spirit proud window drink\", \"single_key\": false}}' http://localhost:5279/", "lbrynet": "lbrynet account add \"new account\" --seed=\"minute math collect notable announce defense during bacon spirit proud window drink\"", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_add\", \"params\": {\"account_name\": \"new account\", \"seed\": \"minute math collect notable announce defense during bacon spirit proud window drink\", \"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\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1556385173.9140773,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPdwyBzUNAPpdyJ32MR2FFJEezsE18Fw9kxy666KiuRcHTFNhQGvJsiwba3xwNwiAdXZg68Eg8Xq11Q2GL6gefS3ntUg6N6t4\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XQzyt82koEJ5s4YHaMS9sYFn9k3RgCx9oTLriiYVc6uKRUuPkxBxo1D2DCLe7CZ7P83YLyNQLCH4fgcuApmFDnAiaX19rMA\",\n \"seed\": \"minute math collect notable announce defense during bacon spirit proud window drink\"\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": "confirmations", "type": "int", "description": "Only include transactions with this many confirmed blocks.", "is_required": false } ], "returns": "(decimal) amount of lbry credits in wallet", "examples": [ { "title": "Get default account balance", "curl": "curl -d'{\"method\": \"account_balance\", \"params\": {}}' http://localhost:5279/", "lbrynet": "lbrynet account balance", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_balance\", \"params\": {}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": \"7.999876\"\n}" }, { "title": "Get balance for specific account by id", "curl": "curl -d'{\"method\": \"account_balance\", \"params\": {\"account_id\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\"}}' http://localhost:5279/", "lbrynet": "lbrynet account balance \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\"", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_balance\", \"params\": {\"account_id\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\"}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": \"2.0\"\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 } ], "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\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1556385173.7733183,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPdwyBzUNAPpdyJ32MR2FFJEezsE18Fw9kxy666KiuRcHTFNhQGvJsiwba3xwNwiAdXZg68Eg8Xq11Q2GL6gefS3ntUg6N6t4\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XQzyt82koEJ5s4YHaMS9sYFn9k3RgCx9oTLriiYVc6uKRUuPkxBxo1D2DCLe7CZ7P83YLyNQLCH4fgcuApmFDnAiaX19rMA\",\n \"seed\": \"minute math collect notable announce defense during bacon spirit proud window drink\"\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 } ], "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 } ], "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": "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\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}' http://localhost:5279/", "lbrynet": "lbrynet account fund --to_account=\"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\" --amount=2.0 --broadcast", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\", \"amount\": \"2.0\", \"everything\": false, \"broadcast\": true}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000014b7fc1534006180bcd20f07de05a98ee919ff7eafd1ba1e7a0e1feeae7e9852d000000006a47304402202b1bce7ecb15fa519ccdf7ee841e6b498fcdc55ea90b64d7e52001cf4d4c6f4302207afd19652115b8eb1b56ecd233c3139ac2c504e9e69c5b35f6a9ab144d391137012102d980396634c9a72c89941daf8ba0bbb6e0e965a6372a47c46be66e0ff905f88fffffffff0200c2eb0b000000001976a914e7e0da4d1e8641b3746334b536bbb735a632439988ac90d7ae2f000000001976a9140823439e1232b822e55a0f356ad5ba6a3f8a639188ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mzTH855HybekMNDfdvo61Zg45HUh5sa3M1\",\n \"amount\": \"10.0\",\n \"confirmations\": 6,\n \"height\": 201,\n \"is_change\": false,\n \"is_mine\": true,\n \"nout\": 0,\n \"txid\": \"2d85e9e7eafee1a0e7a11bfdeaf79f91ee985ae07df020cd0b18064053c17f4b\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"n2f1kQgLPkUu7MmR3ZpUXtq9UkKdrXRcsA\",\n \"amount\": \"2.0\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"txid\": \"16cb5445e4b5654c0c99b7ca70c709cda201273ac9605101990f215d366b09e3\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mgFywnPgfSbRa51bAb3UayBXtPtkTbutw4\",\n \"amount\": \"7.999876\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"txid\": \"16cb5445e4b5654c0c99b7ca70c709cda201273ac9605101990f215d366b09e3\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000124\",\n \"total_input\": \"10.0\",\n \"total_output\": \"9.999876\",\n \"txid\": \"16cb5445e4b5654c0c99b7ca70c709cda201273ac9605101990f215d366b09e3\"\n }\n}" }, { "title": "Spread LBC between multiple addresses", "curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"to_account\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\", \"from_account\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}' http://localhost:5279/", "lbrynet": "lbrynet account fund --to_account=\"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\" --from_account=\"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\" --amount=1.5 --outputs=2 --broadcast", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"to_account\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\", \"from_account\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\", \"amount\": \"1.5\", \"everything\": false, \"outputs\": 2, \"broadcast\": true}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001e3096b365d210f99015160c93a2701a2cd09c770cab7990c4c65b5e44554cb16000000006a473044022059e886a4a5a72c346cf066d9866106784f550af658d60d817caaf7943437f3c6022049b1cd9955a7388989587b800b0841121ca115505497fc93bd8d487120e88c5d0121036b21ff11f8314df887df03b20b39ff51c4553697ab97bff86ed7e6b1b2ac8c3dffffffff03c0687804000000001976a9148347af03499393c33b19b9a0b6ca4e334bb4cc4788acc0687804000000001976a9148347af03499393c33b19b9a0b6ca4e334bb4cc4788ac6cb9fa02000000001976a9146f853d9dd0ec96bc805433165ae295fe21d3dcbd88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"n2f1kQgLPkUu7MmR3ZpUXtq9UkKdrXRcsA\",\n \"amount\": \"2.0\",\n \"confirmations\": 1,\n \"height\": 207,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 0,\n \"txid\": \"16cb5445e4b5654c0c99b7ca70c709cda201273ac9605101990f215d366b09e3\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"msV6grJ1pXRHxaL2e49YWExS2FqZwLfyHw\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"txid\": \"f2f90b34fe5e35446bf3f3c2df0c1c459d9b2fbd8e6bd0a7468f93b346646d7b\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"msV6grJ1pXRHxaL2e49YWExS2FqZwLfyHw\",\n \"amount\": \"0.75\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"txid\": \"f2f90b34fe5e35446bf3f3c2df0c1c459d9b2fbd8e6bd0a7468f93b346646d7b\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"mqgcv5AT69HfEGpUosMMYGHCEjJrsiYyg8\",\n \"amount\": \"0.499859\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 2,\n \"txid\": \"f2f90b34fe5e35446bf3f3c2df0c1c459d9b2fbd8e6bd0a7468f93b346646d7b\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000141\",\n \"total_input\": \"2.0\",\n \"total_output\": \"1.999859\",\n \"txid\": \"f2f90b34fe5e35446bf3f3c2df0c1c459d9b2fbd8e6bd0a7468f93b346646d7b\"\n }\n}" }, { "title": "Transfer all LBC to a specified account", "curl": "curl -d'{\"method\": \"account_fund\", \"params\": {\"from_account\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\", \"everything\": true, \"broadcast\": true}}' http://localhost:5279/", "lbrynet": "lbrynet account fund --from_account=\"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\" --everything --broadcast", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_fund\", \"params\": {\"from_account\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\", \"everything\": true, \"broadcast\": true}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000037b6d6446b3938f46a7d06b8ebd2f9b9d451c0cdfc2f3f36b44355efe340bf9f2020000006a4730440220199daac57028643f85e9a47a97718341af006cf086999b765465f1a422bf3bb60220795b97764ee63d2dc23420b9e8c149684a8c05dfb9397b514b8b6e323c844ef3012102b251a6dc3bf808dada8f3523c501df3249c9d52e590b5adc618d146c922f027dffffffff7b6d6446b3938f46a7d06b8ebd2f9b9d451c0cdfc2f3f36b44355efe340bf9f2000000006a473044022022e3d1a46ec90ead9094d3b991efb48be81d9a0f4f93f6b7b94a4d4d5ae594c1022002c962da19e0aef8137c4e3cd119d59d65d1aef4e65cb2b08ca4f7c7117de12a012102bbb07a05dcf6f50309e6eaa7c1ec2fde1e5a9c96a198c0f5c28caf4e09649035ffffffff7b6d6446b3938f46a7d06b8ebd2f9b9d451c0cdfc2f3f36b44355efe340bf9f2010000006a4730440220363ce02883bc618790076d49ff2b2ce0e5c79b4c4ff70ab88d57f484eda496ac0220087e7745cd07502f393874dec1578fcde0104e3bf7d2fcaa0c3a15d0a48d53b3012102bbb07a05dcf6f50309e6eaa7c1ec2fde1e5a9c96a198c0f5c28caf4e09649035ffffffff015027eb0b000000001976a914293d21d7e5266714fd181ea5c6008e0b0fdf259788ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mqgcv5AT69HfEGpUosMMYGHCEjJrsiYyg8\",\n \"amount\": \"0.499859\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 2,\n \"txid\": \"f2f90b34fe5e35446bf3f3c2df0c1c459d9b2fbd8e6bd0a7468f93b346646d7b\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"msV6grJ1pXRHxaL2e49YWExS2FqZwLfyHw\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 0,\n \"txid\": \"f2f90b34fe5e35446bf3f3c2df0c1c459d9b2fbd8e6bd0a7468f93b346646d7b\",\n \"type\": \"payment\"\n },\n {\n \"address\": \"msV6grJ1pXRHxaL2e49YWExS2FqZwLfyHw\",\n \"amount\": \"0.75\",\n \"confirmations\": 1,\n \"height\": 208,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"txid\": \"f2f90b34fe5e35446bf3f3c2df0c1c459d9b2fbd8e6bd0a7468f93b346646d7b\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mjH1ETZkFdgcZdGbkke8AFNoL59eeHURjv\",\n \"amount\": \"1.999604\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"txid\": \"40eecf0f7040f5bec3a02ef8724dde61609f44f58fbfe5353077aedb2f1ea48b\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000255\",\n \"total_input\": \"1.999859\",\n \"total_output\": \"1.999604\",\n \"txid\": \"40eecf0f7040f5bec3a02ef8724dde61609f44f58fbfe5353077aedb2f1ea48b\"\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": "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\": \"mgDDCBYLBUDfBnMBFVKTamUdsoEZpYNkP8\",\n \"is_default\": true,\n \"name\": \"Account #mgDDCBYLBUDfBnMBFVKTamUdsoEZpYNkP8\",\n \"public_key\": \"tpubD6NzVbkrYhZ4YGUgD14eugYCMzFfSFDgZEmsq1Ums5ijfr6SEsYdZavBwem4fSs2yLsABVi93DYxHn4DJvdLoSqjSM5BV7FKDewcWC8LFXb\",\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 } ], "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 } ], "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 } ], "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\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\"}}' http://localhost:5279/", "lbrynet": "lbrynet account remove mhsddPoNS1wHZUsznRSZG5znismHaRyibR", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_remove\", \"params\": {\"account_id\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\"}}).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\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1556385173.7733183,\n \"name\": \"generated account\",\n \"private_key\": \"tprv8ZgxMBicQKsPdwyBzUNAPpdyJ32MR2FFJEezsE18Fw9kxy666KiuRcHTFNhQGvJsiwba3xwNwiAdXZg68Eg8Xq11Q2GL6gefS3ntUg6N6t4\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XQzyt82koEJ5s4YHaMS9sYFn9k3RgCx9oTLriiYVc6uKRUuPkxBxo1D2DCLe7CZ7P83YLyNQLCH4fgcuApmFDnAiaX19rMA\",\n \"seed\": \"minute math collect notable announce defense during bacon spirit proud window drink\"\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": "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": "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\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\", \"default\": false, \"change_max_uses\": 10}}' http://localhost:5279/", "lbrynet": "lbrynet account set mhsddPoNS1wHZUsznRSZG5znismHaRyibR --change_max_uses=10", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"account_set\", \"params\": {\"account_id\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\", \"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\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\",\n \"is_default\": false,\n \"ledger\": \"lbc_regtest\",\n \"modified_on\": 1556385173.9790704,\n \"name\": \"new account\",\n \"private_key\": \"tprv8ZgxMBicQKsPdwyBzUNAPpdyJ32MR2FFJEezsE18Fw9kxy666KiuRcHTFNhQGvJsiwba3xwNwiAdXZg68Eg8Xq11Q2GL6gefS3ntUg6N6t4\",\n \"public_key\": \"tpubD6NzVbkrYhZ4XQzyt82koEJ5s4YHaMS9sYFn9k3RgCx9oTLriiYVc6uKRUuPkxBxo1D2DCLe7CZ7P83YLyNQLCH4fgcuApmFDnAiaX19rMA\",\n \"seed\": \"minute math collect notable announce defense during bacon spirit proud window drink\"\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 } ], "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 } ], "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\": \"mjJ8awUb4N9ox9LQgWm8rd4EZ7KnycWM5c\"}}' http://localhost:5279/", "lbrynet": "lbrynet address is_mine mjJ8awUb4N9ox9LQgWm8rd4EZ7KnycWM5c", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_is_mine\", \"params\": {\"address\": \"mjJ8awUb4N9ox9LQgWm8rd4EZ7KnycWM5c\"}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": true\n}" } ] }, { "name": "address_list", "description": "List account addresses", "arguments": [ { "name": "account_id", "type": "str", "description": "id of the account to use", "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 \"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 \"mzTH855HybekMNDfdvo61Zg45HUh5sa3M1\",\n \"mvRh3Jfyaw8JKARkU1QqYPzgLjV9YNdPFk\",\n \"mtJshR4bqPfFU5rKu4Va4Bsn7RVZZBQjya\",\n \"mxrvSFMqii2durukTWFZTSRCauFfHFS4kk\",\n \"mt7XUY6oCRoHDeBZMnrJZZDGstaPucnvTM\",\n \"myvGcJbC32BDvVn2ixQUt1c4mvRSD1GdTx\",\n \"mgSs89BUhjZtCVzFPSkoRxhkiRzTdtwXec\",\n \"mzqAsoG2AA4rVYXJTENCz93qzFd5bSKpdH\",\n \"moNsKG2q6D7ch1Vqc69TGL8D6RnyCUTmS8\",\n \"mhcGGNJw79eBBP1RFbGAWLsM2cTjGHh1pE\",\n \"mjJ8awUb4N9ox9LQgWm8rd4EZ7KnycWM5c\",\n \"munhbR12QhckzTNidRqmPd5NN1FSmYWzKA\",\n \"n3LZMQWRsAjDKQQa6v4nuDTKYhPScWphBr\",\n \"mnqM7whu3b7ARK3EpKHD1by9F8KvMqA1at\",\n \"mgc9hKAzg5Jh93kY3ncPTHP8mWVEfDb4rd\",\n \"mwV8zU3bwkTnjEhthBnRFeK3fJDq9bXoYS\",\n \"mmkgE34CUuUMUXyXikCwzugQxz2scHe6Ls\",\n \"muE17RkpuRcuHVHDoAXS3bYbDaoSnGUdgR\",\n \"myaVwVDUFBkyCcCC8r2kMpyMTKWQ6RXrQ1\",\n \"mypkay3SY8yZubzyvrYWbMiHNcFLheTABL\",\n \"mk5oGmSLKvwnCGp94tHdVDo3ideyrizv7h\",\n \"mgFywnPgfSbRa51bAb3UayBXtPtkTbutw4\",\n \"mqiATjxEWUrvcbx4JJVy8h9NGdhYbsjcrn\",\n \"mq1zR4JHT12ybcDEMy8v5HTV3CR5XCcLDp\",\n \"n39pZkLvWPfPEL68343uA2gKfUYor5ETwc\",\n \"mmiew8K4CpqEzKoXHC1x6EGG4KKiBAiaUc\",\n \"msZ9xE7ww5JzXea7M62eKkYRZRxcVThKe3\"\n ]\n}" }, { "title": "List addresses in specified account", "curl": "curl -d'{\"method\": \"address_list\", \"params\": {\"account_id\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\"}}' http://localhost:5279/", "lbrynet": "lbrynet address list --account_id=\"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\"", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"address_list\", \"params\": {\"account_id\": \"mhsddPoNS1wHZUsznRSZG5znismHaRyibR\"}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": [\n \"mwa3FzrVwFpXHR1mLtCYGjqo6We3nA2Dq6\",\n \"mzLhJtt51RVhfRVcUbzM6EqQrvuZPLiA2m\",\n \"n2f1kQgLPkUu7MmR3ZpUXtq9UkKdrXRcsA\",\n \"n1hDoimgXb4CmaYjQeTu5gQ4dhkp3JbffD\",\n \"msZC9y5EZX6D43h3HBEqzhMxESFaf41hpD\",\n \"mqgcv5AT69HfEGpUosMMYGHCEjJrsiYyg8\",\n \"mrrzJpNhKPcWmGFHz2NZQkwfWAmT1PnZTH\",\n \"msArtQhzccd42DxLxVcgSTwPVrBndbYoP8\",\n \"myL83BGKN151TCgC5kbLhFkSb161LMkA3c\",\n \"mhLKeb8LnjW7Y2kZTdeA34QqhiTqAjipGZ\",\n \"mg73pUSCnPxuLXW8mtDtgPAS82d1KfPCRg\",\n \"ms8avDB6NNXHDL3pzfZ2nFMuwVnr1qk1f9\",\n \"mpYbE6NgFnJt2PNd2W2Mq7ZZWFXqdSFoN7\",\n \"mjeUbxMPWfhHCAz4qnX4a7FPpos5z3pcrM\",\n \"mp8tpx5fjDam7HxsgFuo3TWogXVGqx6dKK\",\n \"muCS4ntm1VeJoL2ivEEQD6bUqzZMNiokck\",\n \"miT9tQLjgoTtHBDJwx6TT7iBHod7sZvorw\",\n \"mnpxGGwp2aRgzp3CzETddHvSFLDwWjWBhJ\",\n \"mzZnPX9aJG57x7Fe5EFDH6qNdrpVSy9Brp\",\n \"n4m2Ww1LmMGeRZkGzt7oe1ykMwNr82DqmZ\",\n \"mvqxhCPtYSXdvFe5J24gQHKPUtQA44kusY\",\n \"mvAfYBnd4ea7hGxj8awcDT5RBrUap8VN52\",\n \"msmxv8Jy7G2rr6d3PasKSaosFMZP7YwEYQ\",\n \"mn815gG1KgX8sZ6gRonCR69BNcFife7zxq\",\n \"mudeKozvzNZA71SsjuauvBmvEoKZej4nBa\",\n \"mzx4QyNh3nTAu1AtNk8mfjjKKdyFLvH9Hu\"\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 } ], "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\": \"mjJ8awUb4N9ox9LQgWm8rd4EZ7KnycWM5c\"\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\": \"0f8c0d9c9afe7dbcb3acc2681ebcf4b0bbb686d7be67d93eb89879773e9fb73762018a76ea9445c61e906e14e30d79fd\"}}' http://localhost:5279/", "lbrynet": "lbrynet blob delete 0f8c0d9c9afe7dbcb3acc2681ebcf4b0bbb686d7be67d93eb89879773e9fb73762018a76ea9445c61e906e14e30d79fd", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"blob_delete\", \"params\": {\"blob_hash\": \"0f8c0d9c9afe7dbcb3acc2681ebcf4b0bbb686d7be67d93eb89879773e9fb73762018a76ea9445c61e906e14e30d79fd\"}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": \"Deleted 0f8c0d9c9afe7dbcb3acc2681ebcf4b0bbb686d7be67d93eb89879773e9fb73762018a76ea9445c61e906e14e30d79fd\"\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 \"0f8c0d9c9afe7dbcb3acc2681ebcf4b0bbb686d7be67d93eb89879773e9fb73762018a76ea9445c61e906e14e30d79fd\",\n \"6e141991eb2b623a57ffb6c919a6852a668d8e0e7bdf0583c40b81d62efd6dbfc663d818b1434daddd12b16436d1802f\",\n \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\"\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": "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\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\", \"preview\": false, \"blocking\": false}}' http://localhost:5279/", "lbrynet": "lbrynet channel abandon 5a0fb95d7b3b2323deb9da230a43f9754d564d14", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_abandon\", \"params\": {\"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\", \"preview\": false, \"blocking\": false}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000015001ed0f66ae5bf0669456883c1593ef72b495eccc170178cead5e94fc4cc6b4000000006a4730440220657c849866ef96bc9da9d9a189e582d499bc401e485e07bde6b9f7cccfe6311c022026dcdad4a497692c7af3447cb919d3e87a070bcc93fdc3c03464a2c732f4c7cb0121024fe50a64959512193c84f7502d8fd17efeb6cb1b0e4792e48fa116ccec48d007ffffffff0134b7f505000000001976a9149c1af0d6ff771eb231d9975a3c343841e4f5f1f588ac00000000\",\n \"inputs\": [\n {\n \"address\": \"myvGcJbC32BDvVn2ixQUt1c4mvRSD1GdTx\",\n \"amount\": \"1.0\",\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"claim_op\": \"update\",\n \"confirmations\": 8,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"txid\": \"b4c64cfc945eadce780117ccec95b472ef93153c88569466f05bae660fed0150\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mukMyrhxWX3vJ2cTm8LDDU1idUZPF2JGgW\",\n \"amount\": \"0.999893\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"txid\": \"7fb4f376c49f1a29f2a81c1d5f36c57600e6c99d8b14bfb83e2ef1d6134e7e2a\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000107\",\n \"total_input\": \"1.0\",\n \"total_output\": \"0.999893\",\n \"txid\": \"7fb4f376c49f1a29f2a81c1d5f36c57600e6c99d8b14bfb83e2ef1d6134e7e2a\"\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": "id of the account to store channel", "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 } ], "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\": [], \"preview\": 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\": [], \"preview\": false}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001e3096b365d210f99015160c93a2701a2cd09c770cab7990c4c65b5e44554cb16010000006a47304402206bf58ea095df812f7c823be595a293ed6b7c3e67258d89cb5b42795b7585256102203c52bd83d889a367451a5ac38e4caada6a49295bb5bb6ee159b38f4a69ca0907012102ed60f38e5a0a923ade20f649841dcf45f2dd753df0b2ff4b99139da2b8051a89ffffffff0200e1f5050000000084b508406368616e6e656c4c5d00125a0a583056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a566d7576a914c9db1e99cc5fc300a6e557ec46a5af25e2749abd88acc462a029000000001976a914440741111c97c5726268f4eb9561a18a02837c0188ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mgFywnPgfSbRa51bAb3UayBXtPtkTbutw4\",\n \"amount\": \"7.999876\",\n \"confirmations\": 2,\n \"height\": 207,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"txid\": \"16cb5445e4b5654c0c99b7ca70c709cda201273ac9605101990f215d366b09e3\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"myvGcJbC32BDvVn2ixQUt1c4mvRSD1GdTx\",\n \"amount\": \"1.0\",\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"claim_op\": \"create\",\n \"confirmations\": -2,\n \"height\": -2,\n \"name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"txid\": \"8e5b57ffceb737e34045226a612a3f4e5344aa98ece074c62a7530bb5ee57f50\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mmiew8K4CpqEzKoXHC1x6EGG4KKiBAiaUc\",\n \"amount\": \"6.983769\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"txid\": \"8e5b57ffceb737e34045226a612a3f4e5344aa98ece074c62a7530bb5ee57f50\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.016107\",\n \"total_input\": \"7.999876\",\n \"total_output\": \"7.983769\",\n \"txid\": \"8e5b57ffceb737e34045226a612a3f4e5344aa98ece074c62a7530bb5ee57f50\"\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\", \"preview\": 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\", \"preview\": false}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"01000000015001ed0f66ae5bf0669456883c1593ef72b495eccc170178cead5e94fc4cc6b4010000006b4830450221008afdac52384de67b78a20ef20c2356d2acd6e0daad70aca8f0120679b5e300af0220633d9c42fc46b234c4c90f0519e6cf913c57aba30957513fc4348dd2b093129b0121034b3d2935efb5e8c7465da3c3214be96efa9919bdb383c2e471867405b6842804ffffffff0200e1f50500000000fd5001b50b406269676368616e6e656c4d25010012ab010a583056301006072a8648ce3d020106052b8104000a0342000454220ef505bc5f8adedc59f4aecd431ebe0e587810670a06c9e65dddb96bd39d5a8a0fabc16fd19bc3d67c9996c39b9a97c011d24932842b121d8a375d067026121663726561746f7240736d616c6c6d656469612e636f6d1a15687474703a2f2f736d616c6c6d656469612e636f6d22202a1e687474703a2f2f736d616c6c6d656469612e636f6d2f6c6f676f2e6a7067420b426967204368616e6e656c4a1e41206368616e6e656c2077697468206c6f7473206f6620766964656f732e52202a1e687474703a2f2f736d616c6c6d656469612e636f6d2f6c6f676f2e6a70675a056d757369635a0361727462050883011820620308ab016a0208206a0908e9011a044b6979766d7576a91416f1552f915d8247194d3c2e011f373cb9de672688ace221d305000000001976a914ed53947185f50f189c109cc91df3ee4314c6490e88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"n2Q4GGf2S8u9S4zodWjgZizg3aHE7ofYcs\",\n \"amount\": \"1.9993355\",\n \"confirmations\": 1,\n \"height\": 210,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"txid\": \"b4c64cfc945eadce780117ccec95b472ef93153c88569466f05bae660fed0150\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mhcGGNJw79eBBP1RFbGAWLsM2cTjGHh1pE\",\n \"amount\": \"1.0\",\n \"claim_id\": \"88c3e3babcec5f36196650800598bf9bb885ee33\",\n \"claim_op\": \"create\",\n \"confirmations\": -2,\n \"height\": -2,\n \"name\": \"@bigchannel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@bigchannel#88c3e3babcec5f36196650800598bf9bb885ee33\",\n \"txid\": \"51285942191608c10cfcdd60de4bcb51856aeaa4ad22c843e957ee9651377ab4\",\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\": \"3056301006072a8648ce3d020106052b8104000a0342000454220ef505bc5f8adedc59f4aecd431ebe0e587810670a06c9e65dddb96bd39d5a8a0fabc16fd19bc3d67c9996c39b9a97c011d24932842b121d8a375d067026\",\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\": \"n39pZkLvWPfPEL68343uA2gKfUYor5ETwc\",\n \"amount\": \"0.9772285\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"txid\": \"51285942191608c10cfcdd60de4bcb51856aeaa4ad22c843e957ee9651377ab4\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.022107\",\n \"total_input\": \"1.9993355\",\n \"total_output\": \"1.9772285\",\n \"txid\": \"51285942191608c10cfcdd60de4bcb51856aeaa4ad22c843e957ee9651377ab4\"\n }\n}" } ] }, { "name": "channel_export", "description": "Export serialized channel signing information for a given certificate claim id", "arguments": [ { "name": "claim_id", "type": "str", "description": "Claim ID to export information about", "is_required": true } ], "returns": "(str) Serialized certificate information", "examples": [] }, { "name": "channel_import", "description": "Import serialized channel signing information (to allow signing new claims to the channel)", "arguments": [ { "name": "serialized_certificate_info", "type": "str", "description": "certificate info", "is_required": true } ], "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": "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 \"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\": \"myvGcJbC32BDvVn2ixQUt1c4mvRSD1GdTx\",\n \"amount\": \"1.0\",\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"height\": 209,\n \"is_change\": false,\n \"is_mine\": true,\n \"name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"txid\": \"8e5b57ffceb737e34045226a612a3f4e5344aa98ece074c62a7530bb5ee57f50\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\"\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\": \"myvGcJbC32BDvVn2ixQUt1c4mvRSD1GdTx\",\n \"amount\": \"1.0\",\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"height\": 209,\n \"is_change\": false,\n \"is_mine\": true,\n \"name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"txid\": \"8e5b57ffceb737e34045226a612a3f4e5344aa98ece074c62a7530bb5ee57f50\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\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": "id of the account to store channel", "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": "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\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\", \"title\": \"New Channel\", \"featured\": [], \"clear_featured\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"new_signing_key\": false, \"preview\": false, \"replace\": false}}' http://localhost:5279/", "lbrynet": "lbrynet channel update 5a0fb95d7b3b2323deb9da230a43f9754d564d14 --title=\"New Channel\"", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"channel_update\", \"params\": {\"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\", \"title\": \"New Channel\", \"featured\": [], \"clear_featured\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"new_signing_key\": false, \"preview\": false, \"replace\": false}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000002507fe55ebb30752ac674e0ec98aa44534e3f2a616a224540e337b7ceff575b8e000000006a47304402200e7081baee484d27604a872c4fe144f928af10fcef34bf8ac82fcb8afd754981022070d9e3f9a10ddaf39ab3c036f296edc5b8f66040b9d2e99c662c73ee883726ae0121024fe50a64959512193c84f7502d8fd17efeb6cb1b0e4792e48fa116ccec48d007ffffffff8ba41e2fdbae773035e5bf8ff5449f6061de4d72f82ea0c3bef540700fcfee40000000006b483045022100c1c850ef02ab510162e0a2953a53ee3869ce643988860b1cddac41284f005efd02200ab7d975d5d777479a06fd5581594972145ca93d58cab43e592f5266512fe12e0121026601d6f70d1d3b98d5c10ccdf14381ce7376027baf7dbb7f9e4adb93b95b9441ffffffff0200e1f50500000000a6b708406368616e6e656c14144d564d75f9430a23dab9de23233b7b5db90f5a4c6a00125a0a583056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56420b4e6577204368616e6e656c6d6d76a914c9db1e99cc5fc300a6e557ec46a5af25e2749abd88ac6ebeea0b000000001976a914e50cb66d89f894b0f8b5bdff9ebf10ce4216995388ac00000000\",\n \"inputs\": [\n {\n \"address\": \"myvGcJbC32BDvVn2ixQUt1c4mvRSD1GdTx\",\n \"amount\": \"1.0\",\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"height\": 209,\n \"is_change\": false,\n \"is_mine\": true,\n \"name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"txid\": \"8e5b57ffceb737e34045226a612a3f4e5344aa98ece074c62a7530bb5ee57f50\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"mjH1ETZkFdgcZdGbkke8AFNoL59eeHURjv\",\n \"amount\": \"1.999604\",\n \"confirmations\": 1,\n \"height\": 209,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 0,\n \"txid\": \"40eecf0f7040f5bec3a02ef8724dde61609f44f58fbfe5353077aedb2f1ea48b\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"myvGcJbC32BDvVn2ixQUt1c4mvRSD1GdTx\",\n \"amount\": \"1.0\",\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"claim_op\": \"update\",\n \"confirmations\": -2,\n \"height\": -2,\n \"name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"txid\": \"b4c64cfc945eadce780117ccec95b472ef93153c88569466f05bae660fed0150\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n },\n {\n \"address\": \"n2Q4GGf2S8u9S4zodWjgZizg3aHE7ofYcs\",\n \"amount\": \"1.9993355\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"txid\": \"b4c64cfc945eadce780117ccec95b472ef93153c88569466f05bae660fed0150\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.0002685\",\n \"total_input\": \"2.999604\",\n \"total_output\": \"2.9993355\",\n \"txid\": \"b4c64cfc945eadce780117ccec95b472ef93153c88569466f05bae660fed0150\"\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": "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 \"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\": \"moNsKG2q6D7ch1Vqc69TGL8D6RnyCUTmS8\",\n \"amount\": \"1.0\",\n \"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\",\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 \"name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"signing_channel\": {\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"name\": \"@channel\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\",\n \"title\": \"New Channel\"\n }\n },\n \"txid\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpvi__vq5y\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"size\": \"11\"\n }\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"myvGcJbC32BDvVn2ixQUt1c4mvRSD1GdTx\",\n \"amount\": \"1.0\",\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"txid\": \"b4c64cfc945eadce780117ccec95b472ef93153c88569466f05bae660fed0150\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\",\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\": \"moNsKG2q6D7ch1Vqc69TGL8D6RnyCUTmS8\",\n \"amount\": \"1.0\",\n \"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\",\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 \"name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"signing_channel\": {\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"name\": \"@channel\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\",\n \"title\": \"New Channel\"\n }\n },\n \"txid\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpvi__vq5y\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"size\": \"11\"\n }\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"myvGcJbC32BDvVn2ixQUt1c4mvRSD1GdTx\",\n \"amount\": \"1.0\",\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"claim_op\": \"update\",\n \"confirmations\": 5,\n \"height\": 210,\n \"is_change\": false,\n \"is_mine\": true,\n \"name\": \"@channel\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://@channel#5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"txid\": \"b4c64cfc945eadce780117ccec95b472ef93153c88569466f05bae660fed0150\",\n \"type\": \"claim\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\",\n \"title\": \"New Channel\"\n },\n \"value_type\": \"channel\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\n \"total_pages\": 1\n }\n}" } ] }, { "name": "claim_search", "description": "Search for stream and channel claims on the blockchain.\n\nUse --channel_id= or --channel_name= to list all stream claims in a channel.", "arguments": [ { "name": "name", "type": "str", "description": "find claims with this name", "is_required": false }, { "name": "claim_id", "type": "str", "description": "find a claim with this claim_id", "is_required": false }, { "name": "txid", "type": "str", "description": "find a claim with this txid:nout", "is_required": false }, { "name": "nout", "type": "str", "description": "find a claim with this txid:nout", "is_required": false }, { "name": "channel_id", "type": "str", "description": "limit search to specific channel claim id (returns stream claims)", "is_required": false }, { "name": "channel_name", "type": "str", "description": "limit search to specific channel name (returns stream claims)", "is_required": false }, { "name": "winning", "type": "bool", "description": "limit to winning claims", "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 \"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_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\", \"winning\": false}}' http://localhost:5279/", "lbrynet": "lbrynet claim search --channel_id=\"5a0fb95d7b3b2323deb9da230a43f9754d564d14\"", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"claim_search\", \"params\": {\"channel_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\", \"winning\": false}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"absolute_channel_position\": 0,\n \"address\": \"moNsKG2q6D7ch1Vqc69TGL8D6RnyCUTmS8\",\n \"amount\": \"1.0\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"claim_sequence\": -1,\n \"decoded_claim\": true,\n \"depth\": 1,\n \"effective_amount\": \"1.0\",\n \"has_signature\": true,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"protobuf\": \"01144d564d75f9430a23dab9de23233b7b5db90f5ae44e7b8b2edc41ec86f16259185807ff458a9c6ddf3074b546bec63d723c81524a6a844269da2e7db787cd62424ebb499228f4e37637646b7f154a1226391a9d0a7f0a7d0a20b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9120b746d7076695f5f76713579180b22186170706c69636174696f6e2f6f637465742d73747265616d3230063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"signature_is_valid\": true,\n \"signing_channel\": {\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"name\": \"@channel\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\",\n \"title\": \"New Channel\"\n }\n },\n \"supports\": [],\n \"txid\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00\",\n \"valid_at_height\": 214,\n \"value\": {\n \"source\": {\n \"hash\": \"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpvi__vq5y\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"size\": \"11\"\n }\n }\n }\n ],\n \"page\": 1,\n \"page_size\": 10,\n \"total_pages\": 1\n }\n}" }, { "title": "Search for claims matching a name", "curl": "curl -d'{\"method\": \"claim_search\", \"params\": {\"name\": \"astream\", \"winning\": false}}' http://localhost:5279/", "lbrynet": "lbrynet claim search --name=\"astream\"", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"claim_search\", \"params\": {\"name\": \"astream\", \"winning\": false}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"items\": [\n {\n \"address\": \"moNsKG2q6D7ch1Vqc69TGL8D6RnyCUTmS8\",\n \"amount\": \"1.0\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"claim_sequence\": -1,\n \"decoded_claim\": true,\n \"depth\": 1,\n \"effective_amount\": \"1.0\",\n \"has_signature\": true,\n \"height\": 214,\n \"is_channel_signature_valid\": true,\n \"name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"protobuf\": \"01144d564d75f9430a23dab9de23233b7b5db90f5ae44e7b8b2edc41ec86f16259185807ff458a9c6ddf3074b546bec63d723c81524a6a844269da2e7db787cd62424ebb499228f4e37637646b7f154a1226391a9d0a7f0a7d0a20b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9120b746d7076695f5f76713579180b22186170706c69636174696f6e2f6f637465742d73747265616d3230063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"signature_is_valid\": true,\n \"signing_channel\": {\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"name\": \"@channel\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\",\n \"title\": \"New Channel\"\n }\n },\n \"supports\": [],\n \"txid\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00\",\n \"valid_at_height\": 214,\n \"value\": {\n \"source\": {\n \"hash\": \"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpvi__vq5y\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"size\": \"11\"\n }\n }\n }\n ],\n \"page\": 1,\n \"page_size\": 1,\n \"total_pages\": 1\n }\n}" } ] } ] }, "comment": { "doc": "Create and list comments.", "commands": [ { "name": "comment_create", "description": "Create and associate a comment with a claim using your channel identity.", "arguments": [ { "name": "parent_comment_id", "type": "int", "description": "The ID of a comment to make a response to", "is_required": false } ], "returns": "(dict) Comment object if successfully made", "examples": [] }, { "name": "comment_list", "description": "List comments associated with a claim.", "arguments": [ { "name": "flat", "type": "bool", "description": "Flag to indicate whether or not you want the replies to be flattened along with the rest of the comments attached to the claim. Off by default", "is_required": false }, { "name": "parent_comment_id", "type": "int", "description": "The ID of an existing comment to list replies from", "is_required": false }, { "name": "max_replies_shown", "type": "int", "description": "For every comment that we pull replies from, only retrieve up to this amount. Note: This is not the same as page size.", "is_required": false }, { "name": "page", "type": "int", "description": "The page you'd like to see in the comment list. The first page is 1, second page is 2, and so on.", "is_required": false }, { "name": "page_size", "type": "int", "description": "The amount of comments that you'd like to retrieve in one request", "is_required": false } ], "returns": "(dict) Dict containing the following schema:\n {\n \"page\": (int) The page of comments as provided when limiting response to page_size.\n \"page_size\": (int) Number of comments in the given page. -1 if page_size wasn't used\n \"comments\": (list) Contains all the comments (as dicts) as provided by the specified parameters\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\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\"}}' http://localhost:5279/", "lbrynet": "lbrynet file delete --claim_id=\"85b1f4390164052b6b9388e41a1f3e014f15229b\"", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_delete\", \"params\": {\"delete_from_download_dir\": false, \"delete_all\": false, \"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\"}}).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", "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 \"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\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"content_fee\": null,\n \"download_directory\": \"/tmp\",\n \"download_path\": \"/tmp/tmpvi__vq5y\",\n \"file_name\": \"tmpvi__vq5y\",\n \"key\": \"9e4394f7a0d499c77120660356d6c0bf\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpvi__vq5y\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"size\": \"11\"\n }\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01144d564d75f9430a23dab9de23233b7b5db90f5ae44e7b8b2edc41ec86f16259185807ff458a9c6ddf3074b546bec63d723c81524a6a844269da2e7db787cd62424ebb499228f4e37637646b7f154a1226391a9d0a7f0a7d0a20b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9120b746d7076695f5f76713579180b22186170706c69636174696f6e2f6f637465742d73747265616d3230063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"2692728e148ca4cfc53d926061ec1d2aab33549c119e546df5a60c9d05028a41660f608aa6670e0c5ef7f1bc51c4e2fd\",\n \"stream_name\": \"tmpvi__vq5y\",\n \"suggested_file_name\": \"tmpvi__vq5y\",\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00\",\n \"written_bytes\": null\n },\n {\n \"blobs_completed\": 1,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 0,\n \"channel_claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"2bac6680877a9b98c6ac3e979a89fa3b101bb47c\",\n \"claim_name\": \"blank-image\",\n \"completed\": true,\n \"content_fee\": null,\n \"download_directory\": \"/tmp\",\n \"download_path\": \"/tmp/tmp05_pfz8a.png\",\n \"file_name\": \"tmp05_pfz8a.png\",\n \"key\": \"2ed48159bfdc339ad2d6225a1349f4cd\",\n \"metadata\": {\n \"author\": \"Picaso\",\n \"description\": \"A blank PNG that is 5x7.\",\n \"fee\": {\n \"address\": \"mjJ8awUb4N9ox9LQgWm8rd4EZ7KnycWM5c\",\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\": \"1556385182\",\n \"source\": {\n \"hash\": \"06003bbee8aece0543ed9d9cecc48be1d996cfeff9837a1aed1d961caeda82af\",\n \"media_type\": \"image/png\",\n \"name\": \"tmp05_pfz8a.png\",\n \"sd_hash\": \"6e141991eb2b623a57ffb6c919a6852a668d8e0e7bdf0583c40b81d62efd6dbfc663d818b1434daddd12b16436d1802f\",\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\": \"af2f309db4bf935c88f2a0400b70c3333036f7580cca47856653cae0d53be1ac:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01144d564d75f9430a23dab9de23233b7b5db90f5af64386f78dcf7e229480dea35b54a1cd9795b489914faa6397173e210ca84501338a5f0685c033cd6df5fd90a3e7c5369f6548349e5ef48d59bce5ce7c5700e70ad5010a720a2006003bbee8aece0543ed9d9cecc48be1d996cfeff9837a1aed1d961caeda82af120f746d7030355f70667a38612e706e6718632209696d6167652f706e6732306e141991eb2b623a57ffb6c919a6852a668d8e0e7bdf0583c40b81d62efd6dbfc663d818b1434daddd12b16436d1802f120650696361736f1a0d5075626c696320446f6d61696e2218687474703a2f2f7075626c69632d646f6d61696e2e6f7267289e9b92e6053222080112196f2973afad87dc75624f73a0aa63a651f80d0204476f11ead3188087a70e520408051007420b426c616e6b20496d6167654a184120626c616e6b20504e472074686174206973203578372e52252a23687474703a2f2f736d616c6c6d656469612e636f6d2f7468756d626e61696c2e6a70675a05626c616e6b5a03617274620208016a1308ec0112024e481a0a4d616e63686573746572\",\n \"sd_hash\": \"6e141991eb2b623a57ffb6c919a6852a668d8e0e7bdf0583c40b81d62efd6dbfc663d818b1434daddd12b16436d1802f\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"e8fdccdb5747f7ab63fd0fa7eaaee21605de5d6edad39b7ecb8bdce7f23ca67b24c755c061bdbe06a925d4055079a265\",\n \"stream_name\": \"tmp05_pfz8a.png\",\n \"suggested_file_name\": \"tmp05_pfz8a.png\",\n \"total_bytes\": 112,\n \"total_bytes_lower_bound\": 96,\n \"txid\": \"af2f309db4bf935c88f2a0400b70c3333036f7580cca47856653cae0d53be1ac\",\n \"written_bytes\": null\n }\n ]\n}" }, { "title": "List files matching a parameter", "curl": "curl -d'{\"method\": \"file_list\", \"params\": {\"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\", \"reverse\": false}}' http://localhost:5279/", "lbrynet": "lbrynet file list --claim_id=\"85b1f4390164052b6b9388e41a1f3e014f15229b\"", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_list\", \"params\": {\"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\", \"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\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"claim_name\": \"astream\",\n \"completed\": true,\n \"content_fee\": null,\n \"download_directory\": \"/tmp\",\n \"download_path\": \"/tmp/tmpvi__vq5y\",\n \"file_name\": \"tmpvi__vq5y\",\n \"key\": \"9e4394f7a0d499c77120660356d6c0bf\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpvi__vq5y\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"size\": \"11\"\n }\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01144d564d75f9430a23dab9de23233b7b5db90f5ae44e7b8b2edc41ec86f16259185807ff458a9c6ddf3074b546bec63d723c81524a6a844269da2e7db787cd62424ebb499228f4e37637646b7f154a1226391a9d0a7f0a7d0a20b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9120b746d7076695f5f76713579180b22186170706c69636174696f6e2f6f637465742d73747265616d3230063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"status\": \"finished\",\n \"stopped\": true,\n \"stream_hash\": \"2692728e148ca4cfc53d926061ec1d2aab33549c119e546df5a60c9d05028a41660f608aa6670e0c5ef7f1bc51c4e2fd\",\n \"stream_name\": \"tmpvi__vq5y\",\n \"suggested_file_name\": \"tmpvi__vq5y\",\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00\",\n \"written_bytes\": null\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": "Output a download to a file", "arguments": [ { "name": "file_name", "type": "str", "description": "delete by file name in downloads folder", "is_required": false }, { "name": "download_directory", "type": "str", "description": "delete by file name in downloads folder", "is_required": false }, { "name": "sd_hash", "type": "str", "description": "delete by file sd hash", "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": " {\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\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\"}}' http://localhost:5279/", "lbrynet": "lbrynet file save --sd_hash=\"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\"", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"file_save\", \"params\": {\"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\"}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"blobs_completed\": 0,\n \"blobs_in_stream\": 1,\n \"blobs_remaining\": 1,\n \"channel_claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"channel_name\": \"@channel\",\n \"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"claim_name\": \"astream\",\n \"completed\": false,\n \"content_fee\": null,\n \"download_directory\": \"/tmp/tmpipvgpnza\",\n \"download_path\": \"/tmp/tmpipvgpnza/tmpvi__vq5y\",\n \"file_name\": \"tmpvi__vq5y\",\n \"key\": \"9e4394f7a0d499c77120660356d6c0bf\",\n \"metadata\": {\n \"source\": {\n \"hash\": \"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpvi__vq5y\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"size\": \"11\"\n }\n },\n \"mime_type\": \"application/octet-stream\",\n \"nout\": 0,\n \"outpoint\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00:0\",\n \"points_paid\": 0.0,\n \"protobuf\": \"01144d564d75f9430a23dab9de23233b7b5db90f5ae44e7b8b2edc41ec86f16259185807ff458a9c6ddf3074b546bec63d723c81524a6a844269da2e7db787cd62424ebb499228f4e37637646b7f154a1226391a9d0a7f0a7d0a20b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9120b746d7076695f5f76713579180b22186170706c69636174696f6e2f6f637465742d73747265616d3230063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"status\": \"running\",\n \"stopped\": false,\n \"stream_hash\": \"2692728e148ca4cfc53d926061ec1d2aab33549c119e546df5a60c9d05028a41660f608aa6670e0c5ef7f1bc51c4e2fd\",\n \"stream_name\": \"tmpvi__vq5y\",\n \"suggested_file_name\": \"tmpvi__vq5y\",\n \"total_bytes\": 16,\n \"total_bytes_lower_bound\": 0,\n \"txid\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00\",\n \"written_bytes\": null\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': , 'udp_port': , 'tcp_port': ,\n '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': } if an error is encountered", "examples": [] } ] }, "settings": { "doc": "Settings management.", "commands": [ { "name": "settings_get", "description": "Get daemon settings", "arguments": [], "returns": "(dict) Dictionary of daemon settings\n See ADJUSTABLE_SETTINGS in lbrynet/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 \"blockchain_name\": \"lbrycrd_regtest\",\n \"cache_time\": 150,\n \"comment_server\": \"http://comments.lbry.com:2903/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/tmpipvgpnza\",\n \"download_dir\": \"/tmp/tmpipvgpnza\",\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\": 8,\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\": 2.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 \"tcp_port\": 3333,\n \"udp_port\": 4444,\n \"use_upnp\": false,\n \"wallet_dir\": \"/tmp/tmpipvgpnza\"\n }\n}" } ] }, { "name": "settings_set", "description": "Set daemon settings", "arguments": [], "returns": "(dict) Updated dictionary of daemon settings", "examples": [] } ] }, "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": "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\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\", \"preview\": false, \"blocking\": false}}' http://localhost:5279/", "lbrynet": "lbrynet stream abandon 85b1f4390164052b6b9388e41a1f3e014f15229b", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_abandon\", \"params\": {\"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\", \"preview\": false, \"blocking\": false}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001009d8a2ecaf02586f267960c6fb703fc623ebd03f31c04548c9ebc8e34d4048c000000006a47304402204816b515208121eb20da668971391d508a3e3378a6f8d8ff222b0387cc5cd2960220121df3f930b3770bb1a3d5e2a6ac2985109bca6ffb8da7eaf46358139b1f76a2012102aa27a1fa04c842d585b1150033e8120ef3d21c669cd9e137f9968e1b854d3797ffffffff0134b7f505000000001976a9147cefc3a78bdff3f7a3837bbdf6e857711f9276ff88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"moNsKG2q6D7ch1Vqc69TGL8D6RnyCUTmS8\",\n \"amount\": \"1.0\",\n \"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"claim_op\": \"update\",\n \"confirmations\": 3,\n \"height\": 214,\n \"is_change\": false,\n \"is_mine\": true,\n \"name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"signing_channel\": {\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"name\": \"@channel\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\",\n \"title\": \"New Channel\"\n }\n },\n \"txid\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpvi__vq5y\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"size\": \"11\"\n }\n },\n \"value_type\": \"stream\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mruZJxLXAGnjcq2niDbrHq7hafCgSQPVKT\",\n \"amount\": \"0.999893\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 0,\n \"txid\": \"61351f9ec716ea77333486aac1630d252bb7f2143fcae899e88f8413c7af2158\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000107\",\n \"total_input\": \"1.0\",\n \"total_output\": \"0.999893\",\n \"txid\": \"61351f9ec716ea77333486aac1630d252bb7f2143fcae899e88f8413c7af2158\"\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 funding the 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 } ], "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/tmpvi__vq5y\", \"tags\": [], \"languages\": [], \"locations\": [], \"channel_account_id\": [], \"preview\": false}}' http://localhost:5279/", "lbrynet": "lbrynet stream create astream 1.0 /tmp/tmpvi__vq5y", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_create\", \"params\": {\"name\": \"astream\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmpvi__vq5y\", \"tags\": [], \"languages\": [], \"locations\": [], \"channel_account_id\": [], \"preview\": false}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001507fe55ebb30752ac674e0ec98aa44534e3f2a616a224540e337b7ceff575b8e010000006b4830450221008e5f4b4b292884019eda3c78a7b9195ca599ecc5d524936e0358ba50354f782202202bf5569869ed4b26afa660815197ffe267a74950932a7da18946501918f148f20121031e32ba4747731b1cffab3b886794d8dca6143275daefe1195ad4b2fa2f435ca5ffffffff0200e1f50500000000a8b5076173747265616d4c82000a7f0a7d0a20b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9120b746d7076695f5f76713579180b22186170706c69636174696f6e2f6f637465742d73747265616d3230063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c0696d7576a914563985ab25624b5cd9c13cd6b785735c3bf696c988ac38fb9423000000001976a9146deb572449e6c4c10d29d71b34bc2900acbc453d88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mmiew8K4CpqEzKoXHC1x6EGG4KKiBAiaUc\",\n \"amount\": \"6.983769\",\n \"confirmations\": 4,\n \"height\": 209,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"txid\": \"8e5b57ffceb737e34045226a612a3f4e5344aa98ece074c62a7530bb5ee57f50\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"moNsKG2q6D7ch1Vqc69TGL8D6RnyCUTmS8\",\n \"amount\": \"1.0\",\n \"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"claim_op\": \"create\",\n \"confirmations\": -2,\n \"height\": -2,\n \"name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"txid\": \"b3fb85526f1b288dd340552ff189763bbcc5641ea3486f4acd5658999f3cc4c6\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpvi__vq5y\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"size\": \"11\"\n }\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mqY9shcUjvELx96VBQCC39Z9YRdfbjSsW8\",\n \"amount\": \"5.969662\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"txid\": \"b3fb85526f1b288dd340552ff189763bbcc5641ea3486f4acd5658999f3cc4c6\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.014107\",\n \"total_input\": \"6.983769\",\n \"total_output\": \"6.969662\",\n \"txid\": \"b3fb85526f1b288dd340552ff189763bbcc5641ea3486f4acd5658999f3cc4c6\"\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/tmp05_pfz8a.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\": 1556385182, \"channel_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\", \"channel_account_id\": [], \"preview\": false}}' http://localhost:5279/", "lbrynet": "lbrynet stream create blank-image 1.0 /tmp/tmp05_pfz8a.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=1556385182 --channel_id=\"5a0fb95d7b3b2323deb9da230a43f9754d564d14\"", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_create\", \"params\": {\"name\": \"blank-image\", \"bid\": \"1.0\", \"file_path\": \"/tmp/tmp05_pfz8a.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\": 1556385182, \"channel_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\", \"channel_account_id\": [], \"preview\": false}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000001c6c43c9f995856cd4a6f48a31e64c5bc3b7689f12f5540d38d281b6f5285fbb3010000006a47304402202e3bbc57dba90130f9f7097c8dfebe2e437f16056098f1e37abac036b36863f702207eb4b8545a49e6b432da68bf9b189c3f8a0ea53bd512cde0e54685ea8b06c4a0012102c0558db58fa77162f14c1484cbfea52bddf584d868d945424e7134a72cd66812ffffffff0200e1f50500000000fdcb01b50b626c616e6b2d696d6167654da00101144d564d75f9430a23dab9de23233b7b5db90f5af64386f78dcf7e229480dea35b54a1cd9795b489914faa6397173e210ca84501338a5f0685c033cd6df5fd90a3e7c5369f6548349e5ef48d59bce5ce7c5700e70ad5010a720a2006003bbee8aece0543ed9d9cecc48be1d996cfeff9837a1aed1d961caeda82af120f746d7030355f70667a38612e706e6718632209696d6167652f706e6732306e141991eb2b623a57ffb6c919a6852a668d8e0e7bdf0583c40b81d62efd6dbfc663d818b1434daddd12b16436d1802f120650696361736f1a0d5075626c696320446f6d61696e2218687474703a2f2f7075626c69632d646f6d61696e2e6f7267289e9b92e6053222080112196f2973afad87dc75624f73a0aa63a651f80d0204476f11ead3188087a70e520408051007420b426c616e6b20496d6167654a184120626c616e6b20504e472074686174206973203578372e52252a23687474703a2f2f736d616c6c6d656469612e636f6d2f7468756d626e61696c2e6a70675a05626c616e6b5a03617274620208016a1308ec0112024e481a0a4d616e636865737465726d7576a9142973afad87dc75624f73a0aa63a651f80d02044788acac5e7d1d000000001976a91480f1c4658877baa2e48e85fec4492b52466de4c088ac00000000\",\n \"inputs\": [\n {\n \"address\": \"mqY9shcUjvELx96VBQCC39Z9YRdfbjSsW8\",\n \"amount\": \"5.969662\",\n \"confirmations\": 2,\n \"height\": 213,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"txid\": \"b3fb85526f1b288dd340552ff189763bbcc5641ea3486f4acd5658999f3cc4c6\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"mjJ8awUb4N9ox9LQgWm8rd4EZ7KnycWM5c\",\n \"amount\": \"1.0\",\n \"claim_id\": \"2bac6680877a9b98c6ac3e979a89fa3b101bb47c\",\n \"claim_op\": \"create\",\n \"confirmations\": -2,\n \"height\": -2,\n \"is_channel_signature_valid\": true,\n \"name\": \"blank-image\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://blank-image#2bac6680877a9b98c6ac3e979a89fa3b101bb47c\",\n \"signing_channel\": {\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"name\": \"@channel\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\",\n \"title\": \"New Channel\"\n }\n },\n \"txid\": \"af2f309db4bf935c88f2a0400b70c3333036f7580cca47856653cae0d53be1ac\",\n \"type\": \"claim\",\n \"value\": {\n \"author\": \"Picaso\",\n \"description\": \"A blank PNG that is 5x7.\",\n \"fee\": {\n \"address\": \"mjJ8awUb4N9ox9LQgWm8rd4EZ7KnycWM5c\",\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\": \"1556385182\",\n \"source\": {\n \"hash\": \"06003bbee8aece0543ed9d9cecc48be1d996cfeff9837a1aed1d961caeda82af\",\n \"media_type\": \"image/png\",\n \"name\": \"tmp05_pfz8a.png\",\n \"sd_hash\": \"6e141991eb2b623a57ffb6c919a6852a668d8e0e7bdf0583c40b81d62efd6dbfc663d818b1434daddd12b16436d1802f\",\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\": \"msGkQtM1s8s6K2REJe8xYLitn7nBZhUBuw\",\n \"amount\": \"4.947555\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"txid\": \"af2f309db4bf935c88f2a0400b70c3333036f7580cca47856653cae0d53be1ac\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.022107\",\n \"total_input\": \"5.969662\",\n \"total_output\": \"5.947555\",\n \"txid\": \"af2f309db4bf935c88f2a0400b70c3333036f7580cca47856653cae0d53be1ac\"\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": "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 \"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\": \"moNsKG2q6D7ch1Vqc69TGL8D6RnyCUTmS8\",\n \"amount\": \"1.0\",\n \"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\",\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 \"name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"signing_channel\": {\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"name\": \"@channel\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\",\n \"title\": \"New Channel\"\n }\n },\n \"txid\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpvi__vq5y\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"size\": \"11\"\n }\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\": \"moNsKG2q6D7ch1Vqc69TGL8D6RnyCUTmS8\",\n \"amount\": \"1.0\",\n \"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\",\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 \"name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"signing_channel\": {\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"name\": \"@channel\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\",\n \"title\": \"New Channel\"\n }\n },\n \"txid\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpvi__vq5y\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"size\": \"11\"\n }\n },\n \"value_type\": \"stream\"\n }\n ],\n \"page\": 1,\n \"page_size\": 20,\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 funding the 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": "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\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\", \"clear_fee\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"channel_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\", \"clear_channel\": false, \"channel_account_id\": [], \"preview\": false, \"replace\": false}}' http://localhost:5279/", "lbrynet": "lbrynet stream update 85b1f4390164052b6b9388e41a1f3e014f15229b --channel_id=\"5a0fb95d7b3b2323deb9da230a43f9754d564d14\"", "python": "requests.post(\"http://localhost:5279\", json={\"method\": \"stream_update\", \"params\": {\"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\", \"clear_fee\": false, \"tags\": [], \"clear_tags\": false, \"languages\": [], \"clear_languages\": false, \"locations\": [], \"clear_locations\": false, \"channel_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\", \"clear_channel\": false, \"channel_account_id\": [], \"preview\": false, \"replace\": false}}).json()", "output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"height\": -2,\n \"hex\": \"0100000002c6c43c9f995856cd4a6f48a31e64c5bc3b7689f12f5540d38d281b6f5285fbb3000000006a473044022006a2a5053f30c97772723fbdf91ce9277c65c9c7702470f80e01f9784ebc4fc802202bc1a8d855be41f1078042757494160949db7e1336e5d57c1c29838e97abd6c6012102aa27a1fa04c842d585b1150033e8120ef3d21c669cd9e137f9968e1b854d3797ffffffffb47a375196ee57e943c822ada4ea6a8551cb4bde60ddfc0cc108161942592851010000006b483045022100e2dfb23dfa7bd0a17fc4695219bcd72b3813dd6d5283276b4c4ed0b3c69dac7302205b4bd27d161ae5c4e69d76b8abea7e628ddadaeb59f614e562d209cc4cda9c4d0121027b514d0157a8d3275f06e782b70a17bc7e32aca9d5bf4731dbd56e4440004a39ffffffff0200e1f50500000000fd1101b7076173747265616d149b22154f013e1f1ae488936b2b05640139f4b1854cd601144d564d75f9430a23dab9de23233b7b5db90f5ae44e7b8b2edc41ec86f16259185807ff458a9c6ddf3074b546bec63d723c81524a6a844269da2e7db787cd62424ebb499228f4e37637646b7f154a1226391a9d0a7f0a7d0a20b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9120b746d7076695f5f76713579180b22186170706c69636174696f6e2f6f637465742d73747265616d3230063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c0696d6d76a914563985ab25624b5cd9c13cd6b785735c3bf696c988acb6a3d205000000001976a9140b77f80530f05b3a3776f2f42e8ed3c7743a61ea88ac00000000\",\n \"inputs\": [\n {\n \"address\": \"moNsKG2q6D7ch1Vqc69TGL8D6RnyCUTmS8\",\n \"amount\": \"1.0\",\n \"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"claim_op\": \"create\",\n \"confirmations\": 1,\n \"height\": 213,\n \"is_change\": false,\n \"is_mine\": true,\n \"name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"txid\": \"b3fb85526f1b288dd340552ff189763bbcc5641ea3486f4acd5658999f3cc4c6\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpvi__vq5y\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"size\": \"11\"\n }\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"n39pZkLvWPfPEL68343uA2gKfUYor5ETwc\",\n \"amount\": \"0.9772285\",\n \"confirmations\": 3,\n \"height\": 211,\n \"is_change\": true,\n \"is_mine\": true,\n \"nout\": 1,\n \"txid\": \"51285942191608c10cfcdd60de4bcb51856aeaa4ad22c843e957ee9651377ab4\",\n \"type\": \"payment\"\n }\n ],\n \"outputs\": [\n {\n \"address\": \"moNsKG2q6D7ch1Vqc69TGL8D6RnyCUTmS8\",\n \"amount\": \"1.0\",\n \"claim_id\": \"85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"claim_op\": \"update\",\n \"confirmations\": -2,\n \"height\": -2,\n \"is_channel_signature_valid\": true,\n \"name\": \"astream\",\n \"nout\": 0,\n \"permanent_url\": \"lbry://astream#85b1f4390164052b6b9388e41a1f3e014f15229b\",\n \"signing_channel\": {\n \"claim_id\": \"5a0fb95d7b3b2323deb9da230a43f9754d564d14\",\n \"name\": \"@channel\",\n \"value\": {\n \"public_key\": \"3056301006072a8648ce3d020106052b8104000a034200044d9a048c1cb4e3791e120bf899eb13982072f0c272db36e7ab6e49bca073b2fa1ef9498e38fbfab78a8a58875eb464e482cd9a44a8710180ba8aea5cdc897a56\",\n \"title\": \"New Channel\"\n }\n },\n \"txid\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00\",\n \"type\": \"claim\",\n \"value\": {\n \"source\": {\n \"hash\": \"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\",\n \"media_type\": \"application/octet-stream\",\n \"name\": \"tmpvi__vq5y\",\n \"sd_hash\": \"063d09033840952dc0d23b9de2c5c75a382ffa8c3f362f6f9991fa493ff13989a722ffb39677c1b7fbb3c8072ab2c069\",\n \"size\": \"11\"\n }\n },\n \"value_type\": \"stream\"\n },\n {\n \"address\": \"mgZbSk8th8GLyeoxsWpwo6TVsRKabBYHQD\",\n \"amount\": \"0.9769055\",\n \"confirmations\": -2,\n \"height\": -2,\n \"nout\": 1,\n \"txid\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00\",\n \"type\": \"payment\"\n }\n ],\n \"total_fee\": \"0.000323\",\n \"total_input\": \"1.9772285\",\n \"total_output\": \"1.9769055\",\n \"txid\": \"8c04d4348ebc9e8c54041cf303bd3e62fc03b76f0c9667f28625f0ca2e8a9d00\"\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 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": "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": "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": "id of the account to use", "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": "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": "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 \"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 } ], "returns": "(map) sync hash and data", "examples": [] }, { "name": "sync_hash", "description": "Deterministic hash of the wallet.", "arguments": [], "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": "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-04-27 13:13\",\n \"fee\": \"-0.000124\",\n \"support_info\": [],\n \"timestamp\": 1556385207,\n \"txid\": \"16cb5445e4b5654c0c99b7ca70c709cda201273ac9605101990f215d366b09e3\",\n \"update_info\": [],\n \"value\": \"-2.0\"\n },\n {\n \"abandon_info\": [],\n \"claim_info\": [],\n \"confirmations\": 7,\n \"date\": \"2019-04-27 13:13\",\n \"fee\": \"0.0\",\n \"support_info\": [],\n \"timestamp\": 1556385206,\n \"txid\": \"2d85e9e7eafee1a0e7a11bfdeaf79f91ee985ae07df020cd0b18064053c17f4b\",\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": "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 \"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 } ], "returns": "None", "examples": [] } ] } }