From 9d09217aa876c9fb210202c59ad0092e9aa55895 Mon Sep 17 00:00:00 2001 From: Brannon King Date: Thu, 30 Aug 2018 09:38:32 -0600 Subject: [PATCH 1/2] added scripts to generate parsable API docs + the docs --- CMakeLists.txt | 4 +- contrib/devtools/clang-format.py | 16 +- contrib/devtools/generate_json_api_jrgen.py | 277 + contrib/devtools/generate_json_api_v1.py | 106 + contrib/devtools/generated/api_jrgen.json | 5118 +++++++++++++++++++ contrib/devtools/generated/api_v1.json | 1853 +++++++ src/rpc/claimtrie.cpp | 49 +- 7 files changed, 7381 insertions(+), 42 deletions(-) create mode 100755 contrib/devtools/generate_json_api_jrgen.py create mode 100755 contrib/devtools/generate_json_api_v1.py create mode 100644 contrib/devtools/generated/api_jrgen.json create mode 100644 contrib/devtools/generated/api_v1.json diff --git a/CMakeLists.txt b/CMakeLists.txt index be924eac7..ac283aec0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.7) -project(lbrycrd_clion) # not expecting a full compile -- just something that allows clion syntax checking +project(lbrycrd_clion) # Do not use for full compile. This is for CLion syntax checking only. set (CMAKE_CXX_STANDARD 98) # 03 is not supported by cmake, but this will soon be 11 (after upstream bitcoin merge) # I thought that setting the standard would disable the clang-tidy c++11 tips; nope. @@ -53,4 +53,4 @@ foreach(test ${tests}) get_filename_component(filename ${test} NAME_WE) add_executable(${filename} ${test} ${sources}) target_include_directories(${filename} PRIVATE src/test) -endforeach(test) \ No newline at end of file +endforeach(test) diff --git a/contrib/devtools/clang-format.py b/contrib/devtools/clang-format.py index cee99047a..31fdff013 100755 --- a/contrib/devtools/clang-format.py +++ b/contrib/devtools/clang-format.py @@ -12,21 +12,8 @@ import os import sys import subprocess -tested_versions = ['3.6.0', '3.6.1', '3.6.2'] # A set of versions known to produce the same output accepted_file_extensions = ('.h', '.cpp') # Files to format -def check_clang_format_version(clang_format_exe): - try: - output = subprocess.check_output([clang_format_exe, '-version']) - for ver in tested_versions: - if ver in output: - print "Detected clang-format version " + ver - return - raise RuntimeError("Untested version: " + output) - except Exception as e: - print 'Could not verify version of ' + clang_format_exe + '.' - raise e - def check_command_line_args(argv): required_args = ['{clang-format-exe}', '{files}'] example_args = ['clang-format-3.x', 'src/main.cpp', 'src/wallet/*'] @@ -46,7 +33,7 @@ def run_clang_format(clang_format_exe, files): for path, dirs, files in os.walk(target): run_clang_format(clang_format_exe, (os.path.join(path, f) for f in files)) elif target.endswith(accepted_file_extensions): - print "Format " + target + print "Formatting " + target subprocess.check_call([clang_format_exe, '-i', '-style=file', target], stdout=open(os.devnull, 'wb'), stderr=subprocess.STDOUT) else: print "Skip " + target @@ -55,7 +42,6 @@ def main(argv): check_command_line_args(argv) clang_format_exe = argv[1] files = argv[2:] - check_clang_format_version(clang_format_exe) run_clang_format(clang_format_exe, files) if __name__ == "__main__": diff --git a/contrib/devtools/generate_json_api_jrgen.py b/contrib/devtools/generate_json_api_jrgen.py new file mode 100755 index 000000000..5f19a4d26 --- /dev/null +++ b/contrib/devtools/generate_json_api_jrgen.py @@ -0,0 +1,277 @@ +#!/usr/bin/env python3 + +import re +import subprocess as sp +import sys +import json +import urllib.request as req +import jsonschema + + +re_full = re.compile(r'(?P^.*?$)(?P.*?)(^Argument.*?$(?P.*?))?(^Result[^\n,]*?:\s*$(?P.*?))?(^Exampl.*?$(?P.*))?', re.DOTALL | re.MULTILINE) +re_argline = re.compile(r'^("?)(?P\w.*?)\1(\s*:.+?,?\s*)?\s+\((?P.*?)\)\s*(?P.*?)\s*$', re.DOTALL) + + +def get_obj_from_dirty_text(full_object: str): + lines = full_object.splitlines() + lefts = [] + i = 0 + while i < len(lines): + idx = lines[i].find('(') + left = lines[i][0:idx].strip() if idx >= 0 else lines[i] + left = left.rstrip('.') # handling , ... + left = left.strip() + left = left.rstrip(',') + lefts.append(left) + while idx >= 0 and i < len(lines) - 1: + idx2 = len(re.match(r'^\s*', lines[i + 1]).group()) + if idx2 > idx: + lines[i] += lines.pop(i + 1)[idx2 - 1:] + else: + break + i += 1 + + ret = None + try: + property_stack = [] + object_stack = [] + name_stack = [] + + last_name = None + for i in range(0, len(lines)): + left = lefts[i] + if not left: + continue + line = lines[i].strip() + + arg_parsed = re_argline.fullmatch(line) + property_refined_type = 'object' + if arg_parsed is not None: + property_name, property_type, property_desc = arg_parsed.group('name', 'type', 'desc') + property_refined_type, property_required, property_child = get_type(property_type, None) + + if property_refined_type is not 'array' and property_refined_type is not 'object': + property_stack[-1][property_name] = { + 'type': property_refined_type, + 'description': property_desc + } + else: + last_name = property_name + elif len(left) > 1: + match = re.match(r'^(\[)?"(?P\w.*?)"(\])?.*', left) + last_name = match.group('name') + if match.group(1) is not None and match.group(3) is not None: + left = '[' + property_refined_type = 'string' + if 'string' not in line: + raise NotImplementedError('Not implemented: ' + line) + + if left.endswith('['): + object_stack.append({'type': 'array', 'items': {'type': property_refined_type}}) + property_stack.append({}) + name_stack.append(last_name) + elif left.endswith('{'): + object_stack.append({'type': 'object'}) + property_stack.append({}) + name_stack.append(last_name) + elif (left.endswith(']') and '[' not in left) or (left.endswith('}') and '{' not in left): + obj = object_stack.pop() + prop = property_stack.pop() + name = name_stack.pop() + if len(prop) > 0: + if 'items' in obj: + obj['items']['properties'] = prop + else: + obj['properties'] = prop + if len(property_stack) > 0: + if 'items' in object_stack[-1]: + object_stack[-1]['items']['type'] = obj['type'] + if len(prop) > 0: + object_stack[-1]['items']['properties'] = prop + else: + if name is None: + raise RuntimeError('Not expected') + property_stack[-1][name] = obj + else: + ret = obj + if ret is not None: + if i + 1 < len(lines) - 1: + print('Ignoring this data (below the parsed object): ' + "\n".join(lines[i+1:]), file=sys.stderr) + return ret + except Exception as e: + print('Exception: ' + str(e), file=sys.stderr) + print('Unable to cope with: ' + '\n'.join(lines), file=sys.stderr) + return None + + +def get_type(arg_type: str, full_line: str): + if arg_type is None: + return 'string', True, None + + required = 'required' in arg_type or 'optional' not in arg_type + + arg_type = arg_type.lower() + if 'array' in arg_type: + return 'array', required, None + if 'numeric' in arg_type: + return 'number', required, None + if 'bool' in arg_type: + return 'boolean', required, None + if 'string' in arg_type: + return 'string', required, None + if 'object' in arg_type: + properties = get_obj_from_dirty_text(full_line) if full_line is not None else None + return 'object', required, properties + + print('Unable to derive type from: ' + arg_type, file=sys.stderr) + return None, False, None + + +def get_default(arg_refined_type: str, arg_type: str): + if 'default=' in arg_type: + if 'number' in arg_refined_type: + return int(re.match('.*default=([^,)]+)', arg_type).group(1)) + if 'string' in arg_refined_type: + return re.match('.*default=([^,)]+)', arg_type).group(1) + if 'boolean' in arg_refined_type: + if 'default=true' in arg_type: + return True + if 'default=false' in arg_type: + return False + raise NotImplementedError('Not implemented: ' + arg_type) + if 'array' in arg_type: + raise NotImplementedError('Not implemented: ' + arg_type) + return None + + +def parse_single_argument(line: str): + if line: + line = line.strip() + if not line or line.startswith('None'): + return None, None, False + + arg_parsed = re_argline.fullmatch(line) + if arg_parsed is None: + if line.startswith('{') or line.startswith('['): + return get_obj_from_dirty_text(line), None, True + else: + print("Unparsable argument: " + line, file=sys.stderr) + descriptor = { + 'type': 'array' if line.startswith('[') else 'object', + 'description': line, + } + return descriptor, None, True + + arg_name, arg_type, arg_desc = arg_parsed.group('name', 'type', 'desc') + if not arg_type: + raise NotImplementedError('Not implemented: ' + arg_type) + arg_refined_type, arg_required, arg_properties = get_type(arg_type, arg_desc) + + if arg_properties is not None: + return arg_properties, arg_name, arg_required + + arg_refined_default = get_default(arg_refined_type, arg_type) + arg_desc = re.sub('\s+', ' ', arg_desc.strip()) \ + if arg_desc and arg_refined_type is not 'object' and arg_refined_type is not 'array' \ + else arg_desc.strip() if arg_desc else '' + + descriptor = { + 'type': arg_refined_type, + 'description': arg_desc, + } + if arg_refined_default is not None: + descriptor['default'] = arg_refined_default + return descriptor, arg_name, arg_required + + +def parse_params(args: str): + arguments = {} + requireds = [] + if args: + for line in re.split('\s*\d+\.\s+', args, re.DOTALL): + descriptor, name, required = parse_single_argument(line) + if descriptor is None: + continue + if required: + requireds.append(name) + arguments[name] = descriptor + return arguments, requireds + + +def get_api(section_name: str, command: str, command_help: str): + + parsed = re_full.fullmatch(command_help) + if parsed is None: + raise RuntimeError('Unable to resolve help format for ' + command) + + name, desc, args, resl, exmp = parsed.group('name', 'desc', 'args', 'resl', 'exmp') + + properties, required = parse_params(args) + result_descriptor, result_name, result_required = parse_single_argument(resl) + + desc = re.sub('\s+', ' ', desc.strip()) if desc else name + example_array = exmp.splitlines() if exmp else [] + + ret = { + 'summary': desc, + 'description': example_array, + 'tags': [section_name], + 'params': { + 'type': 'object', + 'properties': properties, + 'required': required + }, + } + if result_descriptor is not None: + ret['result'] = result_descriptor + return ret + + +def write_api(): + if len(sys.argv) < 2: + print("Missing required argument: ", file=sys.stderr) + sys.exit(1) + cli_tool = sys.argv[1] + result = sp.run([cli_tool, "help"], stdout=sp.PIPE, universal_newlines=True) + commands = result.stdout + sections = re.split('^==\s*(.*?)\s*==$', commands, flags=re.MULTILINE) + methods = {} + for section in sections: + if not section: + continue + lines = section.splitlines() + if len(lines) == 1: + section_name = lines[0] + continue + for command in sorted(lines[1:]): + if not command: + continue + command = command.split(' ')[0] + result = sp.run([cli_tool, "help", command], stdout=sp.PIPE, universal_newlines=True) + methods[command] = get_api(section_name, command, result.stdout) + + version = sp.run([cli_tool, "--version"], stdout=sp.PIPE, universal_newlines=True) + wrapper = { + '$schema': 'https://rawgit.com/mzernetsch/jrgen/master/jrgen-spec.schema.json', + 'jrgen': '1.1', + 'jsonrpc': '1.0', # see https://github.com/bitcoin/bitcoin/pull/12435 + 'info': { + 'title': 'lbrycrd RPC API', + 'version': version.stdout.strip(), + 'description': [] + }, + 'definitions': {}, # for items used in $ref further down + 'methods': methods, + } + + schema = req.urlopen(wrapper['$schema']).read().decode('utf-8') + try: + jsonschema.validate(wrapper, schema) + except Exception as e: + print('From schema validation: ' + str(e), file=sys.stderr) + + print(json.dumps(wrapper, indent=4)) + + +if __name__ == '__main__': + write_api() \ No newline at end of file diff --git a/contrib/devtools/generate_json_api_v1.py b/contrib/devtools/generate_json_api_v1.py new file mode 100755 index 000000000..e886a808c --- /dev/null +++ b/contrib/devtools/generate_json_api_v1.py @@ -0,0 +1,106 @@ +#!/usr/bin/env python3 + +import re +import subprocess as sp +import sys +import json + +re_full = re.compile(r'(?P^.*?$)(?P.*?)(^Argument.*?$(?P.*?))?(^Result[^\n]*?:\s*$(?P.*?))?(^Exampl.*?$(?P.*))?', re.DOTALL | re.MULTILINE) +re_argline = re.compile(r'^("?)(?P.*?)\1\s+\((?P.*?)\)\s*(?P.*)$', re.DOTALL) + + +def get_type(arg_type, full_line): + if arg_type is None: + return 'string' + + arg_type = arg_type.lower() + if 'numeric' in arg_type: + return 'number' + if 'bool' in arg_type: + return 'boolean' + if 'string' in arg_type: + return 'string' + if 'object' in arg_type: + return 'object' + + raise Exception('Not implemented: ' + arg_type) + + +def parse_params(args): + arguments = [] + if args: + for line in re.split('\s*\d+\.\s+', args, re.DOTALL): + if not line or not line.strip() or line.strip().startswith('None'): + continue + arg_parsed = re_argline.fullmatch(line) + if arg_parsed is None: + raise Exception("Unparsable argument: " + line) + arg_name, arg_type, arg_desc = arg_parsed.group('name', 'type', 'desc') + if not arg_type: + raise Exception('Not implemented: ' + arg_type) + arg_required = 'required' in arg_type or 'optional' not in arg_type + arg_refined_type = get_type(arg_type, line) + arg_desc = re.sub('\s+', ' ', arg_desc.strip()) if arg_desc else [] + arguments.append({ + 'name': arg_name, + 'type': arg_refined_type, + 'description': arg_desc, + 'is_required': arg_required + }) + return arguments + + +def get_api(section_name, command, command_help): + + parsed = re_full.fullmatch(command_help) + if parsed is None: + raise Exception('Unable to resolve help format for ' + command) + + name, desc, args, resl, exmp = parsed.group('name', 'desc', 'args', 'resl', 'exmp') + + arguments = parse_params(args) + + cmd_desc = re.sub('\s+', ' ', desc.strip()) if desc else '' + if exmp and '--skip_examples' not in sys.argv: + cmd_desc += '\nExamples:\n' + exmp.strip() + cmd_resl = resl.strip() if resl else None + + ret = { + 'name': command, + 'namespace': section_name, + 'description': cmd_desc, + 'arguments': arguments, + } + if cmd_resl is not None: + ret['returns'] = cmd_resl + return ret + + +def write_api(): + if len(sys.argv) < 2: + print("Missing required argument: ", file=sys.stderr) + sys.exit(1) + cli_tool = sys.argv[1] + result = sp.run([cli_tool, "help"], stdout=sp.PIPE, universal_newlines=True) + commands = result.stdout + sections = re.split('^==\s*(.*?)\s*==$', commands, flags=re.MULTILINE) + apis = [] + for section in sections: + if not section: + continue + lines = section.splitlines() + if len(lines) == 1: + section_name = lines[0] + continue + for command in sorted(lines[1:]): + if not command: + continue + command = command.split(' ')[0] + result = sp.run([cli_tool, "help", command], stdout=sp.PIPE, universal_newlines=True) + apis.append(get_api(section_name, command, result.stdout)) + + print(json.dumps(apis, indent=4)) + + +if __name__ == '__main__': + write_api() diff --git a/contrib/devtools/generated/api_jrgen.json b/contrib/devtools/generated/api_jrgen.json new file mode 100644 index 000000000..d350a4edd --- /dev/null +++ b/contrib/devtools/generated/api_jrgen.json @@ -0,0 +1,5118 @@ +{ + "$schema": "https://rawgit.com/mzernetsch/jrgen/master/jrgen-spec.schema.json", + "jrgen": "1.1", + "jsonrpc": "1.0", + "info": { + "title": "lbrycrd RPC API", + "version": "LBRYcrd Core RPC client version v0.12.2.0-6fa9ee58-dirty", + "description": [] + }, + "definitions": {}, + "methods": { + "abandonclaim": { + "summary": "Create a transaction which spends a txout which assigned a value to a name, effectively abandoning that claim.", + "description": [], + "tags": [ + "Claimtrie" + ], + "params": { + "type": "object", + "properties": { + "txid": { + "type": "string", + "description": "The transaction containing the unspent txout which should be spent." + }, + "lbrycrdaddress": { + "type": "string", + "description": "The lbrycrd address to send to." + }, + "amount": { + "type": "number", + "description": "The amount to send to the lbrycrd address. eg 0.1" + } + }, + "required": [ + "txid", + "lbrycrdaddress", + "amount" + ] + }, + "result": { + "type": "string", + "description": "The new transaction id." + } + }, + "abandonsupport": { + "summary": "Create a transaction which spends a txout which supported a name claim, effectively abandoning that support.", + "description": [], + "tags": [ + "Claimtrie" + ], + "params": { + "type": "object", + "properties": { + "txid": { + "type": "string", + "description": "The transaction containing the unspent txout which should be spent." + }, + "lbrycrdaddress": { + "type": "string", + "description": "The lbrycrd address to send to." + }, + "amount": { + "type": "number", + "description": "The amount to send to the lbrycrd address. eg 0.1" + } + }, + "required": [ + "txid", + "lbrycrdaddress", + "amount" + ] + }, + "result": { + "type": "string", + "description": "The new transaction id." + } + }, + "claimname": { + "summary": "Create a transaction which issues a claim assigning a value to a name. The claim will be authoritative if the transaction amount is greater than the transaction amount of all other unspent transactions which issue a claim over the same name, and it will remain authoritative as long as it remains unspent and there are no other greater unspent transactions issuing a claim over the same name. The amount is a real and is rounded to the nearest 0.00000001", + "description": [], + "tags": [ + "Claimtrie" + ], + "params": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name to be assigned the value." + }, + "value": { + "type": "string", + "description": "The value to assign to the name encoded in hexadecimal." + }, + "amount": { + "type": "number", + "description": "The amount in LBRYcrd to send. eg 0.1" + } + }, + "required": [ + "name", + "value", + "amount" + ] + }, + "result": { + "type": "string", + "description": "The transaction id." + } + }, + "getclaimbyid": { + "summary": "Get a claim by claim id", + "description": [], + "tags": [ + "Claimtrie" + ], + "params": { + "type": "object", + "properties": { + "claimId": { + "type": "string", + "description": "the claimId of this claim" + } + }, + "required": [ + "claimId" + ] + }, + "result": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "the name of the claim" + }, + "value": { + "type": "string", + "description": "claim metadata" + }, + "claimId": { + "type": "string", + "description": "the claimId of this claim" + }, + "txid": { + "type": "string", + "description": "the hash of the transaction which has successfully claimed this name" + }, + "n": { + "type": "number", + "description": "vout value" + }, + "amount": { + "type": "number", + "description": "txout value" + }, + "effective amount": { + "type": "number", + "description": "txout amount plus amount from all supports associated with the claim" + }, + "height": { + "type": "number", + "description": "the height of the block in which this claim transaction is located" + }, + "valid at height": { + "type": "number", + "description": "the height at which the claim is valid" + }, + "supports": { + "type": "array", + "items": { + "type": "object", + "properties": { + "txid": { + "type": "string", + "description": "the txid of the support" + }, + "n": { + "type": "number", + "description": "the index of the support in the transaction's list of outputs" + }, + "height": { + "type": "number", + "description": "the height at which the support was included in the blockchain" + }, + "valid at height": { + "type": "number", + "description": "the height at which the support is valid" + }, + "amount": { + "type": "number", + "description": "the amount of the support" + } + } + } + } + } + } + }, + "getclaimsforname": { + "summary": "Return all claims and supports for a name", + "description": [], + "tags": [ + "Claimtrie" + ], + "params": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "the name for which to get claims and supports" + } + }, + "required": [ + "name" + ] + }, + "result": { + "type": "object", + "properties": { + "nLastTakeoverheight": { + "type": "number", + "description": "the last height at which ownership of the name changed" + }, + "claims": { + "type": "array", + "items": { + "type": "object", + "properties": { + "claimId": { + "type": "string", + "description": "the claimId of this claim" + }, + "txid": { + "type": "string", + "description": "the txid of this claim" + }, + "n": { + "type": "number", + "description": "the index of the claim in the transaction's list of outputs" + }, + "nHeight": { + "type": "number", + "description": "the height at which the claim was included in the blockchain" + }, + "nValidAtHeight": { + "type": "number", + "description": "the height at which the claim became/becomes valid" + }, + "nAmount": { + "type": "number", + "description": "the amount of the claim" + }, + "nEffectiveAmount": { + "type": "number", + "description": "the total effective amount of the claim, taking into effect whether the claim or support has reached its nValidAtHeight" + }, + "supports": { + "type": "array", + "items": { + "type": "array", + "properties": { + "txid": { + "type": "string", + "description": "the txid of the support" + }, + "n": { + "type": "number", + "description": "the index of the support in the transaction's list of outputs" + }, + "nHeight": { + "type": "number", + "description": "the height at which the support was included in the blockchain" + }, + "nValidAtHeight": { + "type": "number", + "description": "the height at which the support became/becomes valid" + }, + "nAmount": { + "type": "number", + "description": "the amount of the support" + } + } + } + } + } + } + }, + "unmatched supports": { + "type": "array", + "items": { + "type": "object", + "properties": { + "txid": { + "type": "string", + "description": "the txid of the support" + }, + "n": { + "type": "number", + "description": "the index of the support in the transaction's list of outputs" + }, + "nHeight": { + "type": "number", + "description": "the height at which the support was included in the blockchain" + }, + "nValidAtHeight": { + "type": "number", + "description": "the height at which the support became/becomes valid" + }, + "nAmount": { + "type": "number", + "description": "the amount of the support" + } + } + } + } + } + } + }, + "getclaimsfortx": { + "summary": "Return any claims or supports found in a transaction", + "description": [], + "tags": [ + "Claimtrie" + ], + "params": { + "type": "object", + "properties": { + "txid": { + "type": "string", + "description": "the txid of the transaction to check for unspent claims" + } + }, + "required": [ + "txid" + ] + }, + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "nOut": { + "type": "number", + "description": "the index of the claim or support in the transaction's list out outputs" + }, + "claim type": { + "type": "string", + "description": "'claim' or 'support'" + }, + "name": { + "type": "string", + "description": "the name claimed or supported" + }, + "value": { + "type": "string", + "description": "if a name claim, the value of the claim" + }, + "supported txid": { + "type": "string", + "description": "if a support, the txid of the supported claim" + }, + "supported nout": { + "type": "number", + "description": "if a support, the index of the supported claim in its transaction" + }, + "depth": { + "type": "number", + "description": "the depth of the transaction in the main chain" + }, + "in claim trie": { + "type": "boolean", + "description": "if a name claim, whether the claim is active, i.e. has made it into the trie" + }, + "is controlling": { + "type": "boolean", + "description": "if a name claim, whether the claim is the current controlling claim for the name" + }, + "in support map": { + "type": "boolean", + "description": "if a support, whether the support is active, i.e. has made it into the support map" + }, + "in queue": { + "type": "boolean", + "description": "whether the claim is in a queue waiting to be inserted into the trie or support map" + }, + "blocks to valid": { + "type": "number", + "description": "if in a queue, the number of blocks until it's inserted into the trie or support map" + } + } + } + } + }, + "getclaimsintrie": { + "summary": "Return all claims in the name trie.", + "description": [], + "tags": [ + "Claimtrie" + ], + "params": { + "type": "object", + "properties": { + "minconf": { + "type": "number", + "description": "the number of required confirmations", + "default": 1 + } + }, + "required": [] + }, + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "the name claimed" + }, + "claims": { + "type": "array", + "items": { + "type": "object", + "properties": { + "claimId": { + "type": "string", + "description": "the claimId of the claim" + }, + "txid": { + "type": "string", + "description": "the txid of the claim" + }, + "n": { + "type": "number", + "description": "the vout value of the claim" + }, + "amount": { + "type": "number", + "description": "txout amount" + }, + "height": { + "type": "number", + "description": "the height of the block in which this transaction is located" + }, + "value": { + "type": "string", + "description": "the value of this claim" + } + } + } + } + } + } + } + }, + "getclaimtrie": { + "summary": "Return the entire name trie.", + "description": [], + "tags": [ + "Claimtrie" + ], + "params": { + "type": "object", + "properties": { + "minconf": { + "type": "number", + "description": "the number of required confirmations", + "default": 1 + } + }, + "required": [] + }, + "result": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "the name of the node" + }, + "hash": { + "type": "string", + "description": "the hash of the node" + }, + "txid": { + "type": "string", + "description": "(if value exists) the hash of the transaction which has successfully claimed this name" + }, + "n": { + "type": "number", + "description": "(if value exists) vout value" + }, + "value": { + "type": "number", + "description": "(if value exists) txout value" + }, + "height": { + "type": "number", + "description": "(if value exists) the height of the block in which this transaction is located" + } + } + } + }, + "getnameproof": { + "summary": "Return the cryptographic proof that a name maps to a value or doesn't.", + "description": [], + "tags": [ + "Claimtrie" + ], + "params": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "the name to get a proof for" + }, + "blockhash": { + "type": "string", + "description": "the hash of the block which is the basis of the proof. If none is given, the latest block will be used." + } + }, + "required": [ + "name" + ] + }, + "result": { + "type": "object", + "properties": { + "nodes": { + "type": "array", + "items": { + "type": "array", + "properties": { + "valueHash": { + "type": "string", + "description": "the hash of this node's value, if it has one. If this is the requested name this will not exist whether the node has a value or not" + } + } + } + }, + "txhash": { + "type": "string", + "description": "the txid of the claim which controls this name, if there is one." + }, + "nOut": { + "type": "number", + "description": "the nOut of the claim which controls this name, if there is one." + }, + "last takeover height": { + "type": "number", + "description": "the most recent height at which the value of a name changed other than through an update to the winning bid" + } + } + } + }, + "gettotalclaimednames": { + "summary": "Return the total number of names that have been successfully claimed, and therefore exist in the trie", + "description": [], + "tags": [ + "Claimtrie" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "number", + "description": "the total number of names in the trie" + } + }, + "gettotalclaims": { + "summary": "Return the total number of active claims in the trie", + "description": [], + "tags": [ + "Claimtrie" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "number", + "description": "the total number of active claims" + } + }, + "gettotalvalueofclaims": { + "summary": "Return the total value of the claims in the trie", + "description": [], + "tags": [ + "Claimtrie" + ], + "params": { + "type": "object", + "properties": { + "controlling_only": { + "type": "boolean", + "description": "only include the value of controlling claims" + } + }, + "required": [ + "controlling_only" + ] + }, + "result": { + "type": "number", + "description": "the total value of the claims in the trie" + } + }, + "getvalueforname": { + "summary": "Return the value associated with a name, if one exists", + "description": [], + "tags": [ + "Claimtrie" + ], + "params": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "the name to look up" + }, + "minconf": { + "type": "number", + "description": "the number of required confirmations", + "default": 1 + } + }, + "required": [ + "name" + ] + }, + "result": { + "type": "string", + "description": "the value of the name, if it exists \"claimId\" (string) the claimId for this name claim \"txid\" (string) the hash of the transaction which successfully claimed the name \"n\" (numeric) vout value \"amount\" (numeric) txout amount \"effective amount\" (numeric) txout amount plus amount from all supports associated with the claim \"height\" (numeric) the height of the block in which this transaction is located" + } + }, + "listnameclaims": { + "summary": "Return a list of all transactions claiming names.", + "description": [], + "tags": [ + "Claimtrie" + ], + "params": { + "type": "object", + "properties": { + "includesupports": { + "type": "boolean", + "description": "Whether to also include claim supports. Default is true." + }, + "activeonly": { + "type": "boolean", + "description": "Whether to only include transactions which are still active, i.e. have not been spent. Default is false." + }, + "minconf": { + "type": "number", + "description": "Only include transactions confirmed at least this many time.", + "default": 1 + } + }, + "required": [] + }, + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name that is claimed." + }, + "claimtype": { + "type": "string", + "description": "CLAIM or SUPPORT." + }, + "claimId": { + "type": "string", + "description": "The claimId of the claim." + }, + "value": { + "type": "string", + "description": "The value assigned to the name, if claimtype is CLAIM." + }, + "account": { + "type": "string", + "description": "The account name associated with the transaction. It will be \"\" for the default account." + }, + "address": { + "type": "string", + "description": "The lbrycrd address of the transaction." + }, + "category": { + "type": "string", + "description": "Always name" + }, + "amount": { + "type": "number", + "description": "The amount in LBC." + }, + "vout": { + "type": "number", + "description": "The vout value" + }, + "fee": { + "type": "number", + "description": "The amount of the fee in LBC." + }, + "height": { + "type": "number", + "description": "The height of the block in which this transaction was included." + }, + "confirmations": { + "type": "number", + "description": "The number of confirmations for the transaction" + }, + "blockhash": { + "type": "string", + "description": "The block hash containing the transaction." + }, + "blockindex": { + "type": "number", + "description": "The block index containing the transaction." + }, + "txid": { + "type": "string", + "description": "The transaction id." + }, + "time": { + "type": "number", + "description": "The transaction time in seconds since epoch (midnight Jan 1 1970 GMT)." + }, + "timereceived": { + "type": "number", + "description": "The time received in seconds since epoch (midnight Jan 1 1970 GMT)." + }, + "comment": { + "type": "string", + "description": "If a comment is associated with the transaction." + } + } + } + } + }, + "supportclaim": { + "summary": "Increase the value of a claim. Whichever claim has the greatest value, including all support values, will be the authoritative claim, according to the rest of the rules. The name is the name which is claimed by the claim that will be supported, the txid is the txid of the claim that will be supported, nout is the transaction output which contains the claim to be supported, and amount is the amount which will be added to the value of the claim. If the claim is currently the authoritative claim, this support will go into effect immediately. Otherwise, it will go into effect after 100 blocks. The support will be in effect until it is spent, and will lose its effect when the claim is spent or expires. The amount is a real and is rounded to the nearest .00000001", + "description": [], + "tags": [ + "Claimtrie" + ], + "params": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name claimed by the claim to support." + }, + "claimid": { + "type": "string", + "description": "The claimid of the claim to support. This can be obtained by TODO PUT IN PLACE THAT SHOWS THIS." + }, + "amount": { + "type": "number", + "description": "The amount in LBC to use to support the claim." + } + }, + "required": [ + "name", + "claimid", + "amount" + ] + }, + "result": { + "type": "string", + "description": "The transaction id of the support." + } + }, + "updateclaim": { + "summary": "Create a transaction which issues a claim assigning a value to a name, spending the previous txout which issued a claim over the same name and therefore superseding that claim. The claim will be authoritative if the transaction amount is greater than the transaction amount of all other unspent transactions which issue a claim over the same name, and it will remain authoritative as long as it remains unspent and there are no greater unspent transactions issuing a claim over the same name.", + "description": [], + "tags": [ + "Claimtrie" + ], + "params": { + "type": "object", + "properties": { + "txid": { + "type": "string", + "description": "The transaction containing the unspent txout which should be spent." + }, + "value": { + "type": "string", + "description": "The value to assign to the name encoded in hexadecimal." + }, + "amount": { + "type": "number", + "description": "The amount in LBRYcrd to use to bid for the name. eg 0.1" + } + }, + "required": [ + "txid", + "value", + "amount" + ] + }, + "result": { + "type": "string", + "description": "The new transaction id." + } + }, + "getbestblockhash": { + "summary": "Returns the hash of the best (tip) block in the longest block chain. Result \"hex\" (string) the block hash hex encoded", + "description": [ + "", + "> lbrycrd-cli getbestblockhash ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getbestblockhash\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Blockchain" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + } + }, + "getblock": { + "summary": "If verbose is false, returns a string that is serialized, hex-encoded data for block 'hash'. If verbose is true, returns an Object with information about block .", + "description": [ + "", + "> lbrycrd-cli getblock \"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getblock\", \"params\": [\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Blockchain" + ], + "params": { + "type": "object", + "properties": { + "hash": { + "type": "string", + "description": "The block hash" + }, + "verbose": { + "type": "boolean", + "description": "true for a json object, false for the hex encoded data", + "default": true + } + }, + "required": [ + "hash" + ] + }, + "result": { + "type": "object", + "properties": { + "hash": { + "type": "string", + "description": "the block hash (same as provided)" + }, + "confirmations": { + "type": "number", + "description": "The number of confirmations, or -1 if the block is not on the main chain" + }, + "size": { + "type": "number", + "description": "The block size" + }, + "height": { + "type": "number", + "description": "The block height or index" + }, + "version": { + "type": "number", + "description": "The block version" + }, + "versionHex": { + "type": "string", + "description": "The block version formatted in hexadecimal" + }, + "merkleroot": { + "type": "string", + "description": "The merkle root" + }, + "nameclaimroot": { + "type": "string", + "description": "The hash of the root of the name claim trie" + }, + "tx": { + "type": "array", + "items": { + "type": "array", + "properties": { + "transactionid": { + "type": "string", + "description": "The transaction id" + } + } + } + }, + "time": { + "type": "number", + "description": "The block time in seconds since epoch (Jan 1 1970 GMT)" + }, + "mediantime": { + "type": "number", + "description": "The median block time in seconds since epoch (Jan 1 1970 GMT)" + }, + "nonce": { + "type": "number", + "description": "The nonce" + }, + "bits": { + "type": "string", + "description": "The bits" + }, + "difficulty": { + "type": "number", + "description": "The difficulty" + }, + "chainwork": { + "type": "string", + "description": "Expected number of hashes required to produce the chain up to this block (in hex)" + }, + "previousblockhash": { + "type": "string", + "description": "The hash of the previous block" + }, + "nextblockhash": { + "type": "string", + "description": "The hash of the next block" + } + } + } + }, + "getblockchaininfo": { + "summary": "Returns an object containing various state info regarding block chain processing.", + "description": [ + "", + "> lbrycrd-cli getblockchaininfo ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getblockchaininfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Blockchain" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "object", + "properties": { + "chain": { + "type": "string", + "description": "current network name as defined in BIP70 (main, test, regtest)" + }, + "blocks": { + "type": "number", + "description": "the current number of blocks processed in the server" + }, + "headers": { + "type": "number", + "description": "the current number of headers we have validated" + }, + "bestblockhash": { + "type": "string", + "description": "the hash of the currently best block" + }, + "difficulty": { + "type": "number", + "description": "the current difficulty" + }, + "mediantime": { + "type": "number", + "description": "median time for the current best block" + }, + "verificationprogress": { + "type": "number", + "description": "estimate of verification progress [0..1]" + }, + "chainwork": { + "type": "string", + "description": "total amount of work in active chain, in hexadecimal" + }, + "pruned": { + "type": "boolean", + "description": "if the blocks are subject to pruning" + }, + "pruneheight": { + "type": "number", + "description": "heighest block available" + }, + "softforks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "name of softfork" + }, + "version": { + "type": "number", + "description": "block version" + }, + "enforce": { + "type": "object", + "properties": { + "status": { + "type": "boolean", + "description": "true if threshold reached" + }, + "found": { + "type": "number", + "description": "number of blocks with the new version found" + }, + "required": { + "type": "number", + "description": "number of blocks required to trigger" + }, + "window": { + "type": "number", + "description": "maximum size of examined window of recent blocks" + } + } + } + } + } + }, + "bip9_softforks": { + "type": "object", + "properties": { + "xxxx": { + "type": "string", + "description": "name of the softfork" + }, + "bip9_softforks": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "one of \"defined\", \"started\", \"lockedin\", \"active\", \"failed\"" + }, + "bit": { + "type": "number", + "description": "the bit, 0-28, in the block version field used to signal this soft fork" + }, + "startTime": { + "type": "number", + "description": "the minimum median time past of a block at which the bit gains its meaning" + }, + "timeout": { + "type": "number", + "description": "the median time past of a block at which the deployment is considered failed if not yet locked in" + } + } + } + } + } + } + } + }, + "getblockcount": { + "summary": "Returns the number of blocks in the longest block chain.", + "description": [ + "", + "> lbrycrd-cli getblockcount ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getblockcount\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Blockchain" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "number", + "description": "The current block count" + } + }, + "getblockhash": { + "summary": "Returns hash of block in best-block-chain at index provided.", + "description": [ + "", + "> lbrycrd-cli getblockhash 1000", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getblockhash\", \"params\": [1000] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Blockchain" + ], + "params": { + "type": "object", + "properties": { + "index": { + "type": "number", + "description": "The block index" + } + }, + "required": [ + "index" + ] + }, + "result": { + "type": "string", + "description": "The block hash" + } + }, + "getblockheader": { + "summary": "If verbose is false, returns a string that is serialized, hex-encoded data for blockheader 'hash'. If verbose is true, returns an Object with information about blockheader .", + "description": [ + "", + "> lbrycrd-cli getblockheader \"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getblockheader\", \"params\": [\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Blockchain" + ], + "params": { + "type": "object", + "properties": { + "hash": { + "type": "string", + "description": "The block hash" + }, + "verbose": { + "type": "boolean", + "description": "true for a json object, false for the hex encoded data", + "default": true + } + }, + "required": [ + "hash" + ] + }, + "result": { + "type": "object", + "properties": { + "hash": { + "type": "string", + "description": "the block hash (same as provided)" + }, + "confirmations": { + "type": "number", + "description": "The number of confirmations, or -1 if the block is not on the main chain" + }, + "height": { + "type": "number", + "description": "The block height or index" + }, + "version": { + "type": "number", + "description": "The block version" + }, + "versionHex": { + "type": "string", + "description": "The block version formatted in hexadecimal" + }, + "merkleroot": { + "type": "string", + "description": "The merkle root" + }, + "time": { + "type": "number", + "description": "The block time in seconds since epoch (Jan 1 1970 GMT)" + }, + "mediantime": { + "type": "number", + "description": "The median block time in seconds since epoch (Jan 1 1970 GMT)" + }, + "nonce": { + "type": "number", + "description": "The nonce" + }, + "bits": { + "type": "string", + "description": "The bits" + }, + "difficulty": { + "type": "number", + "description": "The difficulty" + }, + "previousblockhash": { + "type": "string", + "description": "The hash of the previous block" + }, + "nextblockhash": { + "type": "string", + "description": "The hash of the next block" + }, + "chainwork": { + "type": "string", + "description": "Expected number of hashes required to produce the current chain (in hex)" + } + } + } + }, + "getchaintips": { + "summary": "Return information about all known tips in the block tree, including the main chain as well as orphaned branches.", + "description": [ + "", + "> lbrycrd-cli getchaintips ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getchaintips\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Blockchain" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "branchlen": { + "type": "number", + "description": "length of branch connecting the tip to the main chain" + }, + "status": { + "type": "string", + "description": "status of the chain (active, valid-fork, valid-headers, headers-only, invalid)" + } + } + } + } + }, + "getdifficulty": { + "summary": "Returns the proof-of-work difficulty as a multiple of the minimum difficulty.", + "description": [ + "", + "> lbrycrd-cli getdifficulty ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getdifficulty\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Blockchain" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "number", + "description": "the proof-of-work difficulty as a multiple of the minimum difficulty." + } + }, + "getmempoolinfo": { + "summary": "Returns details on the active state of the TX memory pool.", + "description": [ + "", + "> lbrycrd-cli getmempoolinfo ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getmempoolinfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Blockchain" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "object", + "properties": { + "size": { + "type": "number", + "description": "Current tx count" + }, + "bytes": { + "type": "number", + "description": "Sum of all tx sizes" + }, + "usage": { + "type": "number", + "description": "Total memory usage for the mempool" + }, + "maxmempool": { + "type": "number", + "description": "Maximum memory usage for the mempool" + }, + "mempoolminfee": { + "type": "number", + "description": "Minimum fee for tx to be accepted" + } + } + } + }, + "getrawmempool": { + "summary": "Returns all transaction ids in memory pool as a json array of string transaction ids.", + "description": [ + "", + "> lbrycrd-cli getrawmempool true", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getrawmempool\", \"params\": [true] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Blockchain" + ], + "params": { + "type": "object", + "properties": { + "verbose": { + "type": "boolean", + "description": "true for a json object, false for array of transaction ids", + "default": false + } + }, + "required": [] + }, + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "transactionid": { + "type": "string", + "description": "The transaction id" + } + } + } + } + }, + "gettxout": { + "summary": "Returns details about an unspent transaction output.", + "description": [ + "", + "", + "Get unspent transactions", + "> lbrycrd-cli listunspent ", + "", + "View the details", + "> lbrycrd-cli gettxout \"txid\" 1", + "", + "As a json rpc call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"gettxout\", \"params\": [\"txid\", 1] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Blockchain" + ], + "params": { + "type": "object", + "properties": { + "txid": { + "type": "string", + "description": "The transaction id" + }, + "n": { + "type": "number", + "description": "vout number" + }, + "includemempool": { + "type": "boolean", + "description": "Whether to include the mem pool" + } + }, + "required": [ + "txid", + "n" + ] + }, + "result": { + "type": "object", + "properties": { + "bestblock": { + "type": "string", + "description": "the block hash" + }, + "confirmations": { + "type": "number", + "description": "The number of confirmations" + }, + "value": { + "type": "number", + "description": "The transaction value in LBC" + }, + "scriptPubKey": { + "type": "object", + "properties": { + "asm": { + "type": "string", + "description": "" + }, + "hex": { + "type": "string", + "description": "" + }, + "reqSigs": { + "type": "number", + "description": "Number of required signatures" + }, + "type": { + "type": "string", + "description": "The type, eg pubkeyhash" + }, + "addresses": { + "type": "array", + "items": { + "type": "array", + "properties": { + "lbrycrdaddress": { + "type": "string", + "description": "lbrycrd address" + } + } + } + } + } + }, + "version": { + "type": "number", + "description": "The version" + }, + "coinbase": { + "type": "boolean", + "description": "Coinbase or not" + } + } + } + }, + "gettxoutproof": { + "summary": "Returns a hex-encoded proof that \"txid\" was included in a block. NOTE: By default this function only works sometimes. This is when there is an unspent output in the utxo for this transaction. To make it always work, you need to maintain a transaction index, using the -txindex command line option or specify the block in which the transaction is included in manually (by blockhash). Return the raw transaction data.", + "description": [], + "tags": [ + "Blockchain" + ], + "params": { + "type": "object", + "properties": { + "txids": { + "type": "string", + "description": "A json array of txids to filter [ \"txid\" (string) A transaction hash ,... ]" + }, + "block hash": { + "type": "string", + "description": "If specified, looks for txid in the block with this hash" + } + }, + "required": [ + "txids" + ] + }, + "result": { + "type": "string", + "description": "A string that is a serialized, hex-encoded data for the proof." + } + }, + "gettxoutsetinfo": { + "summary": "Returns statistics about the unspent transaction output set. Note this call may take some time.", + "description": [ + "", + "> lbrycrd-cli gettxoutsetinfo ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"gettxoutsetinfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Blockchain" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "object", + "properties": { + "height": { + "type": "number", + "description": "The current block height (index)" + }, + "bestblock": { + "type": "string", + "description": "the best block hash hex" + }, + "transactions": { + "type": "number", + "description": "The number of transactions" + }, + "txouts": { + "type": "number", + "description": "The number of output transactions" + }, + "bytes_serialized": { + "type": "number", + "description": "The serialized size" + }, + "hash_serialized": { + "type": "string", + "description": "The serialized hash" + }, + "total_amount": { + "type": "number", + "description": "The total amount" + } + } + } + }, + "verifychain": { + "summary": "Verifies blockchain database.", + "description": [ + "", + "> lbrycrd-cli verifychain ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"verifychain\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Blockchain" + ], + "params": { + "type": "object", + "properties": { + "checklevel": { + "type": "number", + "description": "How thorough the block verification is.", + "default": 3 + }, + "numblocks": { + "type": "number", + "description": "The number of blocks to check.", + "default": 288 + } + }, + "required": [] + }, + "result": { + "type": "boolean", + "description": "Verified or not" + } + }, + "verifytxoutproof": { + "summary": "Verifies that a proof points to a transaction in a block, returning the transaction it commits to and throwing an RPC error if the block is not in our best chain", + "description": [], + "tags": [ + "Blockchain" + ], + "params": { + "type": "object", + "properties": { + "proof": { + "type": "string", + "description": "The hex-encoded proof generated by gettxoutproof" + } + }, + "required": [ + "proof" + ] + } + }, + "getinfo": { + "summary": "Returns an object containing various state info.", + "description": [ + "", + "> lbrycrd-cli getinfo ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getinfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Control" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "object", + "properties": { + "version": { + "type": "number", + "description": "the server version" + }, + "protocolversion": { + "type": "number", + "description": "the protocol version" + }, + "walletversion": { + "type": "number", + "description": "the wallet version" + }, + "balance": { + "type": "number", + "description": "the total lbrycrd balance of the wallet" + }, + "blocks": { + "type": "number", + "description": "the current number of blocks processed in the server" + }, + "timeoffset": { + "type": "number", + "description": "the time offset" + }, + "connections": { + "type": "number", + "description": "the number of connections" + }, + "proxy": { + "type": "string", + "description": "the proxy used by the server" + }, + "difficulty": { + "type": "number", + "description": "the current difficulty" + }, + "testnet": { + "type": "boolean", + "description": "if the server is using testnet or not" + }, + "keypoololdest": { + "type": "number", + "description": "the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool" + }, + "keypoolsize": { + "type": "number", + "description": "how many new keys are pre-generated" + }, + "unlocked_until": { + "type": "number", + "description": "the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked" + }, + "paytxfee": { + "type": "number", + "description": "the transaction fee set in LBC/kB" + }, + "relayfee": { + "type": "number", + "description": "minimum relay fee for non-free transactions in LBC/kB" + }, + "errors": { + "type": "string", + "description": "any error messages" + } + } + } + }, + "help": { + "summary": "List all commands, or get help for a specified command.", + "description": [], + "tags": [ + "Control" + ], + "params": { + "type": "object", + "properties": { + "command": { + "type": "string", + "description": "The command to get help on" + } + }, + "required": [] + }, + "result": { + "type": "string", + "description": "The help text" + } + }, + "stop": { + "summary": "Stop LBRYcrd server.", + "description": [], + "tags": [ + "Control" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + } + }, + "generate": { + "summary": "Mine up to numblocks blocks immediately (before the RPC call returns)", + "description": [ + "", + "", + "Generate 11 blocks", + "> lbrycrd-cli generate 11", + "" + ], + "tags": [ + "Generating" + ], + "params": { + "type": "object", + "properties": { + "numblocks": { + "type": "number", + "description": "How many blocks are generated immediately." + }, + "maxtries": { + "type": "number", + "description": "How many iterations to try (default = 1000000). Result [ blockhashes ] (array) hashes of blocks generated" + } + }, + "required": [ + "numblocks" + ] + } + }, + "generatetoaddress": { + "summary": "Mine blocks immediately to a specified address (before the RPC call returns)", + "description": [ + "", + "", + "Generate 11 blocks to myaddress", + "> lbrycrd-cli generatetoaddress 11 \"myaddress\"", + "" + ], + "tags": [ + "Generating" + ], + "params": { + "type": "object", + "properties": { + "numblocks": { + "type": "number", + "description": "How many blocks are generated immediately." + }, + "address": { + "type": "string", + "description": "The address to send the newly generated bitcoin to." + }, + "maxtries": { + "type": "number", + "description": "How many iterations to try (default = 1000000). Result [ blockhashes ] (array) hashes of blocks generated" + } + }, + "required": [ + "numblocks", + "address" + ] + } + }, + "getblocktemplate": { + "summary": "If the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'. It returns data needed to construct a block to work on. See https://en.bitcoin.it/wiki/BIP_0022 for full specification.", + "description": [ + "", + "> lbrycrd-cli getblocktemplate ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getblocktemplate\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Mining" + ], + "params": { + "type": "object", + "properties": { + "jsonrequestobject": { + "type": "string", + "description": "A json object in the following spec { \"mode\":\"template\" (string, optional) This must be set to \"template\" or omitted \"capabilities\":[ (array, optional) A list of strings \"support\" (string) client side supported feature, 'longpoll', 'coinbasetxn', 'coinbasevalue', 'proposal', 'serverlist', 'workid' ,... ] }" + } + }, + "required": [] + }, + "result": { + "type": "object", + "properties": { + "version": { + "type": "number", + "description": "The block version" + }, + "previousblockhash": { + "type": "string", + "description": "The hash of current highest block" + }, + "transactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "data": { + "type": "string", + "description": "transaction data encoded in hexadecimal (byte-for-byte)" + }, + "hash": { + "type": "string", + "description": "hash/id encoded in little-endian hexadecimal" + }, + "depends": { + "type": "array", + "items": { + "type": "array", + "properties": { + "n": { + "type": "number", + "description": "transactions before this one (by 1-based index in 'transactions' list) that must be present in the final block if this one is" + } + } + } + }, + "fee": { + "type": "number", + "description": "difference in value between transaction inputs and outputs (in Satoshis); for coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn't one" + }, + "sigops": { + "type": "number", + "description": "total number of SigOps, as counted for purposes of block limits; if key is not present, sigop count is unknown and clients MUST NOT assume there aren't any" + }, + "required": { + "type": "boolean", + "description": "if provided and true, this transaction must be in the final block" + } + } + } + }, + "coinbaseaux": { + "type": "object", + "properties": { + "flags": { + "type": "string", + "description": "" + } + } + }, + "coinbasevalue": { + "type": "number", + "description": "maximum allowable input to coinbase transaction, including the generation award and transaction fees (in Satoshis)" + }, + "target": { + "type": "string", + "description": "The hash target" + }, + "mintime": { + "type": "number", + "description": "The minimum timestamp appropriate for next block time in seconds since epoch (Jan 1 1970 GMT)" + }, + "mutable": { + "type": "array", + "items": { + "type": "array", + "properties": { + "value": { + "type": "string", + "description": "A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock'" + } + } + } + }, + "noncerange": { + "type": "string", + "description": "A range of valid nonces" + }, + "sigoplimit": { + "type": "number", + "description": "limit of sigops in blocks" + }, + "sizelimit": { + "type": "number", + "description": "limit of block size" + }, + "curtime": { + "type": "number", + "description": "current timestamp in seconds since epoch (Jan 1 1970 GMT)" + }, + "bits": { + "type": "string", + "description": "compressed target of next block" + }, + "height": { + "type": "number", + "description": "The height of the next block" + } + } + } + }, + "getgenerate": { + "summary": "Return if the server is set to generate coins or not. The default is false. It is set with the command line argument -gen (or lbrycrd.conf setting gen) It can also be set with the setgenerate call. Result true|false (boolean) If the server is set to generate coins or not", + "description": [ + "", + "> lbrycrd-cli getgenerate ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getgenerate\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Mining" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + } + }, + "gethashespersec": { + "summary": "Returns a recent hashes per second performance measurement while generating. See the getgenerate and setgenerate calls to turn generation on and off.", + "description": [ + "", + "> lbrycrd-cli gethashespersec ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"gethashespersec\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Mining" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "number", + "description": "The recent hashes per second when generation is on (will return 0 if generation is off)" + } + }, + "getmininginfo": { + "summary": "Returns a json object containing mining-related information.", + "description": [ + "", + "> lbrycrd-cli getmininginfo ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getmininginfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Mining" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "object", + "properties": { + "blocks": { + "type": "number", + "description": "The current block" + }, + "currentblocksize": { + "type": "number", + "description": "The last block size" + }, + "currentblocktx": { + "type": "number", + "description": "The last block transaction" + }, + "difficulty": { + "type": "number", + "description": "The current difficulty" + }, + "errors": { + "type": "string", + "description": "Current errors" + }, + "generate": { + "type": "boolean", + "description": "If the generation is on or off (see getgenerate or setgenerate calls)" + }, + "genproclimit": { + "type": "number", + "description": "The processor limit for generation. -1 if no generation. (see getgenerate or setgenerate calls)" + }, + "hashespersec": { + "type": "number", + "description": "The hashes per second of the generation, or 0 if no generation." + }, + "pooledtx": { + "type": "number", + "description": "The size of the mem pool" + }, + "testnet": { + "type": "boolean", + "description": "If using testnet or not" + }, + "chain": { + "type": "string", + "description": "current network name as defined in BIP70 (main, test, regtest)" + } + } + } + }, + "getnetworkhashps": { + "summary": "Returns the estimated network hashes per second based on the last n blocks. Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change. Pass in [height] to estimate the network speed at the time when a certain block was found.", + "description": [ + "", + "> lbrycrd-cli getnetworkhashps ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getnetworkhashps\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Mining" + ], + "params": { + "type": "object", + "properties": { + "blocks": { + "type": "number", + "description": "The number of blocks, or -1 for blocks since last difficulty change.", + "default": 120 + }, + "height": { + "type": "number", + "description": "To estimate at the time of the given height.", + "default": -1 + } + }, + "required": [] + }, + "result": { + "type": "number", + "description": "Hashes per second estimated" + } + }, + "prioritisetransaction": { + "summary": "Accepts the transaction into mined blocks at a higher (or lower) priority", + "description": [ + "", + "> lbrycrd-cli prioritisetransaction \"txid\" 0.0 10000", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"prioritisetransaction\", \"params\": [\"txid\", 0.0, 10000] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Mining" + ], + "params": { + "type": "object", + "properties": { + "txid": { + "type": "string", + "description": "The transaction id." + }, + "priority delta": { + "type": "number", + "description": "The priority to add or subtract. The transaction selection algorithm considers the tx as it would have a higher priority. (priority of a transaction is calculated: coinage * value_in_satoshis / txsize)" + }, + "fee delta": { + "type": "number", + "description": "The fee value (in satoshis) to add (or subtract, if negative). The fee is not actually paid, only the algorithm for selecting transactions into a block considers the transaction as it would have paid a higher (or lower) fee. Result true (boolean) Returns true" + } + }, + "required": [ + "txid", + "priority delta", + "fee delta" + ] + } + }, + "setgenerate": { + "summary": "Set 'generate' true or false to turn generation on or off. Generation is limited to 'genproclimit' processors, -1 is unlimited. See the getgenerate call for the current setting.", + "description": [ + "", + "", + "Set the generation on with a limit of one processor", + "> lbrycrd-cli setgenerate true 1", + "", + "Check the setting", + "> lbrycrd-cli getgenerate ", + "", + "Turn off generation", + "> lbrycrd-cli setgenerate false", + "", + "Using json rpc", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"setgenerate\", \"params\": [true, 1] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Mining" + ], + "params": { + "type": "object", + "properties": { + "generate": { + "type": "boolean", + "description": "Set to true to turn on generation, off to turn off." + }, + "genproclimit": { + "type": "number", + "description": "Set the processor limit for when generation is on. Can be -1 for unlimited." + } + }, + "required": [ + "generate" + ] + } + }, + "submitblock": { + "summary": "Attempts to submit new block to network. The 'jsonparametersobject' parameter is currently ignored. See https://en.bitcoin.it/wiki/BIP_0022 for full specification.", + "description": [ + "", + "> lbrycrd-cli submitblock \"mydata\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"submitblock\", \"params\": [\"mydata\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Mining" + ], + "params": { + "type": "object", + "properties": { + "hexdata": { + "type": "string", + "description": "the hex-encoded block data to submit" + }, + "jsonparametersobject": { + "type": "string", + "description": "object of optional parameters { \"workid\" : \"id\" (string, optional) if the server provided a workid, it MUST be included with submissions }" + } + }, + "required": [ + "hexdata" + ] + } + }, + "addnode": { + "summary": "Attempts add or remove a node from the addnode list. Or try a connection to a node once.", + "description": [ + "", + "> lbrycrd-cli addnode \"192.168.0.6:8333\" \"onetry\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"addnode\", \"params\": [\"192.168.0.6:8333\", \"onetry\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Network" + ], + "params": { + "type": "object", + "properties": { + "node": { + "type": "string", + "description": "The node (see getpeerinfo for nodes)" + }, + "command": { + "type": "string", + "description": "'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once" + } + }, + "required": [ + "node", + "command" + ] + } + }, + "clearbanned": { + "summary": "Clear all banned IPs.", + "description": [ + "", + "> lbrycrd-cli clearbanned ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"clearbanned\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Network" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + } + }, + "disconnectnode": { + "summary": "Immediately disconnects from the specified node.", + "description": [ + "", + "> lbrycrd-cli disconnectnode \"192.168.0.6:8333\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"disconnectnode\", \"params\": [\"192.168.0.6:8333\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Network" + ], + "params": { + "type": "object", + "properties": { + "node": { + "type": "string", + "description": "The node (see getpeerinfo for nodes)" + } + }, + "required": [ + "node" + ] + } + }, + "getaddednodeinfo": { + "summary": "Returns information about the given added node, or all added nodes (note that onetry addnodes are not listed here) If dns is false, only a list of added nodes will be provided, otherwise connected information will also be available.", + "description": [ + "", + "> lbrycrd-cli getaddednodeinfo true", + "> lbrycrd-cli getaddednodeinfo true \"192.168.0.201\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getaddednodeinfo\", \"params\": [true, \"192.168.0.201\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Network" + ], + "params": { + "type": "object", + "properties": { + "dns": { + "type": "boolean", + "description": "If false, only a list of added nodes will be provided, otherwise connected information will also be available." + }, + "node": { + "type": "string", + "description": "If provided, return information about this specific node, otherwise all nodes are returned." + } + }, + "required": [ + "dns" + ] + }, + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "addednode": { + "type": "string", + "description": "The node ip address" + }, + "connected": { + "type": "boolean", + "description": "If connected" + }, + "addresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The lbrycrd server host and port" + }, + "connected": { + "type": "string", + "description": "connection, inbound or outbound" + } + } + } + } + } + } + } + }, + "getconnectioncount": { + "summary": "Returns the number of connections to other nodes.", + "description": [ + "", + "> lbrycrd-cli getconnectioncount ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getconnectioncount\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Network" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "number", + "description": "The connection count" + } + }, + "getnettotals": { + "summary": "Returns information about network traffic, including bytes in, bytes out, and current time.", + "description": [ + "", + "> lbrycrd-cli getnettotals ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getnettotals\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Network" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "object", + "properties": { + "totalbytesrecv": { + "type": "number", + "description": "Total bytes received" + }, + "totalbytessent": { + "type": "number", + "description": "Total bytes sent" + }, + "timemillis": { + "type": "number", + "description": "Total cpu time" + }, + "uploadtarget": { + "type": "object", + "properties": { + "timeframe": { + "type": "number", + "description": "Length of the measuring timeframe in seconds" + }, + "target": { + "type": "number", + "description": "Target in bytes" + }, + "target_reached": { + "type": "boolean", + "description": "True if target is reached" + }, + "serve_historical_blocks": { + "type": "boolean", + "description": "True if serving historical blocks" + }, + "bytes_left_in_cycle": { + "type": "number", + "description": "Bytes left in current time cycle" + }, + "time_left_in_cycle": { + "type": "number", + "description": "Seconds left in current time cycle" + } + } + } + } + } + }, + "getnetworkinfo": { + "summary": "Returns an object containing various state info regarding P2P networking.", + "description": [ + "", + "> lbrycrd-cli getnetworkinfo ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getnetworkinfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Network" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "object", + "properties": { + "version": { + "type": "number", + "description": "the server version" + }, + "subversion": { + "type": "string", + "description": "the server subversion string" + }, + "protocolversion": { + "type": "number", + "description": "the protocol version" + }, + "localservices": { + "type": "string", + "description": "the services we offer to the network" + }, + "timeoffset": { + "type": "number", + "description": "the time offset" + }, + "connections": { + "type": "number", + "description": "the number of connections" + }, + "networks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "network (ipv4, ipv6 or onion)" + }, + "limited": { + "type": "boolean", + "description": "is the network limited using -onlynet?" + }, + "reachable": { + "type": "boolean", + "description": "is the network reachable?" + }, + "proxy": { + "type": "string", + "description": "the proxy that is used for this network, or empty if none" + } + } + } + }, + "relayfee": { + "type": "number", + "description": "minimum relay fee for non-free transactions in LBC/kB" + }, + "localaddresses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "network address" + }, + "port": { + "type": "number", + "description": "network port" + }, + "score": { + "type": "number", + "description": "relative score" + } + } + } + }, + "warnings": { + "type": "string", + "description": "any network warnings (such as alert messages)" + } + } + } + }, + "getpeerinfo": { + "summary": "Returns data about each connected network node as a json array of objects.", + "description": [ + "", + "> lbrycrd-cli getpeerinfo ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getpeerinfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Network" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number", + "description": "Peer index" + }, + "addr": { + "type": "string", + "description": "The ip address and port of the peer" + }, + "addrlocal": { + "type": "string", + "description": "local address" + }, + "services": { + "type": "string", + "description": "The services offered" + }, + "relaytxes": { + "type": "boolean", + "description": "Whether peer has asked us to relay transactions to it" + }, + "lastsend": { + "type": "number", + "description": "The time in seconds since epoch (Jan 1 1970 GMT) of the last send" + }, + "lastrecv": { + "type": "number", + "description": "The time in seconds since epoch (Jan 1 1970 GMT) of the last receive" + }, + "bytessent": { + "type": "number", + "description": "The total bytes sent" + }, + "bytesrecv": { + "type": "number", + "description": "The total bytes received" + }, + "conntime": { + "type": "number", + "description": "The connection time in seconds since epoch (Jan 1 1970 GMT)" + }, + "timeoffset": { + "type": "number", + "description": "The time offset in seconds" + }, + "pingtime": { + "type": "number", + "description": "ping time (if available)" + }, + "minping": { + "type": "number", + "description": "minimum observed ping time (if any at all)" + }, + "pingwait": { + "type": "number", + "description": "ping wait (if non-zero)" + }, + "version": { + "type": "number", + "description": "The peer version, such as 7001" + }, + "subver": { + "type": "string", + "description": "The string version" + }, + "inbound": { + "type": "boolean", + "description": "Inbound (true) or Outbound (false)" + }, + "startingheight": { + "type": "number", + "description": "The starting height (block) of the peer" + }, + "banscore": { + "type": "number", + "description": "The ban score" + }, + "synced_headers": { + "type": "number", + "description": "The last header we have in common with this peer" + }, + "synced_blocks": { + "type": "number", + "description": "The last block we have in common with this peer" + }, + "inflight": { + "type": "array", + "items": { + "type": "object", + "properties": { + "n,": { + "type": "number", + "description": "The heights of blocks we're currently asking from this peer" + } + } + } + }, + "bytessent_per_msg": { + "type": "object", + "properties": { + "addr": { + "type": "number", + "description": "The total bytes sent aggregated by message type" + } + } + }, + "bytesrecv_per_msg": { + "type": "object", + "properties": { + "addr": { + "type": "number", + "description": "The total bytes received aggregated by message type" + } + } + } + } + } + } + }, + "listbanned": { + "summary": "List all banned IPs/Subnets.", + "description": [ + "", + "> lbrycrd-cli listbanned ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listbanned\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Network" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + } + }, + "ping": { + "summary": "Requests that a ping be sent to all other nodes, to measure ping time. Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds. Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.", + "description": [ + "", + "> lbrycrd-cli ping ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"ping\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Network" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + } + }, + "setban": { + "summary": "Attempts add or remove a IP/Subnet from the banned list.", + "description": [ + "", + "> lbrycrd-cli setban \"192.168.0.6\" \"add\" 86400", + "> lbrycrd-cli setban \"192.168.0.0/24\" \"add\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"setban\", \"params\": [\"192.168.0.6\", \"add\" 86400] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Network" + ], + "params": { + "type": "object", + "properties": { + "ip(/netmask)": { + "type": "string", + "description": "The IP/Subnet (see getpeerinfo for nodes ip) with a optional netmask (default is /32 = single ip)" + }, + "command": { + "type": "string", + "description": "'add' to add a IP/Subnet to the list, 'remove' to remove a IP/Subnet from the list" + }, + "bantime": { + "type": "number", + "description": "time in seconds how long (or until when if [absolute] is set) the ip is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)" + }, + "absolute": { + "type": "boolean", + "description": "If set, the bantime must be a absolute timestamp in seconds since epoch (Jan 1 1970 GMT)" + } + }, + "required": [ + "ip(/netmask)", + "command" + ] + } + }, + "createrawtransaction": { + "summary": "Create a transaction spending the given inputs and creating new outputs. Outputs can be addresses or data. Returns hex-encoded raw transaction. Note that the transaction's inputs are not signed, and it is not stored in the wallet or transmitted to the network.", + "description": [ + "", + "> lbrycrd-cli createrawtransaction \"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\" \"{\\\"address\\\":0.01}\"", + "> lbrycrd-cli createrawtransaction \"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\" \"{\\\"data\\\":\\\"00010203\\\"}\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"createrawtransaction\", \"params\": [\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\", \"{\\\"address\\\":0.01}\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"createrawtransaction\", \"params\": [\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\", \"{\\\"data\\\":\\\"00010203\\\"}\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Rawtransactions" + ], + "params": { + "type": "object", + "properties": { + "transactions": { + "type": "string", + "description": "A json array of json objects [ { \"txid\":\"id\", (string, required) The transaction id \"vout\":n (numeric, required) The output number } ,... ]" + }, + "outputs": { + "type": "string", + "description": "a json object with outputs { \"address\": x.xxx (numeric or string, required) The key is the lbrycrd address, the numeric value (can be string) is the LBC amount \"data\": \"hex\", (string, required) The key is \"data\", the value is hex encoded data ... }" + }, + "locktime": { + "type": "number", + "description": "Raw locktime. Non-0 value also locktime-activates inputs", + "default": 0 + } + }, + "required": [ + "transactions", + "outputs" + ] + }, + "result": { + "type": "string", + "description": "hex string of the transaction" + } + }, + "decoderawtransaction": { + "summary": "Return a JSON object representing the serialized, hex-encoded transaction.", + "description": [ + "", + "> lbrycrd-cli decoderawtransaction \"hexstring\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"decoderawtransaction\", \"params\": [\"hexstring\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Rawtransactions" + ], + "params": { + "type": "object", + "properties": { + "hex": { + "type": "string", + "description": "The transaction hex string" + } + }, + "required": [ + "hex" + ] + }, + "result": { + "type": "object", + "properties": { + "txid": { + "type": "string", + "description": "The transaction id" + }, + "size": { + "type": "number", + "description": "The transaction size" + }, + "version": { + "type": "number", + "description": "The version" + }, + "locktime": { + "type": "number", + "description": "The lock time" + }, + "vin": { + "type": "array", + "items": { + "type": "object", + "properties": { + "txid": { + "type": "string", + "description": "The transaction id" + }, + "vout": { + "type": "number", + "description": "The output number" + }, + "scriptSig": { + "type": "object", + "properties": { + "asm": { + "type": "string", + "description": "asm" + }, + "hex": { + "type": "string", + "description": "hex" + } + } + }, + "sequence": { + "type": "number", + "description": "The script sequence number" + } + } + } + }, + "vout": { + "type": "array", + "items": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "The value in LBC" + }, + "n": { + "type": "number", + "description": "index" + }, + "scriptPubKey": { + "type": "object", + "properties": { + "asm": { + "type": "string", + "description": "the asm" + }, + "hex": { + "type": "string", + "description": "the hex" + }, + "reqSigs": { + "type": "number", + "description": "The required sigs" + }, + "type": { + "type": "string", + "description": "The type, eg 'pubkeyhash'" + }, + "addresses": { + "type": "array", + "items": { + "type": "array", + "properties": { + "12tvKAXCxZjSmdNbao16dKXC8tRWfcF5oc": { + "type": "string", + "description": "lbrycrd address" + } + } + } + } + } + } + } + } + } + } + } + }, + "decodescript": { + "summary": "Decode a hex-encoded script.", + "description": [ + "", + "> lbrycrd-cli decodescript \"hexstring\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"decodescript\", \"params\": [\"hexstring\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Rawtransactions" + ], + "params": { + "type": "object", + "properties": { + "hex": { + "type": "string", + "description": "the hex encoded script" + } + }, + "required": [ + "hex" + ] + }, + "result": { + "type": "object", + "properties": { + "asm": { + "type": "string", + "description": "Script public key" + }, + "hex": { + "type": "string", + "description": "hex encoded public key" + }, + "type": { + "type": "string", + "description": "The output type" + }, + "reqSigs": { + "type": "number", + "description": "The required signatures" + }, + "addresses": { + "type": "array", + "items": { + "type": "array", + "properties": { + "address": { + "type": "string", + "description": "lbrycrd address" + } + } + } + }, + "p2sh\",\"address": { + "type": "string", + "description": "script address" + } + } + } + }, + "fundrawtransaction": { + "summary": "Add inputs to a transaction until it has enough in value to meet its out value. This will not modify existing inputs, and will add one change output to the outputs. Note that inputs which were signed may need to be resigned after completion since in/outputs have been added. The inputs added will not be signed, use signrawtransaction for that. Note that all existing inputs must have their previous output transaction be in the wallet. Note that all inputs selected must be of standard form and P2SH scripts must be in the wallet using importaddress or addmultisigaddress (to calculate fees). Only pay-to-pubkey, multisig, and P2SH versions thereof are currently supported for watch-only", + "description": [ + "", + "", + "Create a transaction with no inputs", + "> lbrycrd-cli createrawtransaction \"[]\" \"{\\\"myaddress\\\":0.01}\"", + "", + "Add sufficient unsigned inputs to meet the output value", + "> lbrycrd-cli fundrawtransaction \"rawtransactionhex\"", + "", + "Sign the transaction", + "> lbrycrd-cli signrawtransaction \"fundedtransactionhex\"", + "", + "Send the transaction", + "> lbrycrd-cli sendrawtransaction \"signedtransactionhex\"", + "" + ], + "tags": [ + "Rawtransactions" + ], + "params": { + "type": "object", + "properties": { + "hexstring": { + "type": "string", + "description": "The hex string of the raw transaction" + }, + "options": { + "type": "object", + "properties": { + "changeAddress": { + "type": "string", + "description": "The bitcoin address to receive the change" + }, + "changePosition": { + "type": "number", + "description": "The index of the change output" + }, + "includeWatching": { + "type": "boolean", + "description": "Also select inputs which are watch only" + }, + "lockUnspents": { + "type": "boolean", + "description": "Lock selected unspent outputs" + } + } + } + }, + "required": [ + "hexstring" + ] + }, + "result": { + "type": "object", + "properties": { + "hex": { + "type": "string", + "description": "The resulting raw transaction (hex-encoded string)" + }, + "fee": { + "type": "number", + "description": "Fee the resulting transaction pays" + }, + "changepos": { + "type": "number", + "description": "The position of the added change output, or -1" + } + } + } + }, + "getrawtransaction": { + "summary": "NOTE: By default this function only works sometimes. This is when the tx is in the mempool or there is an unspent output in the utxo for this transaction. To make it always work, you need to maintain a transaction index, using the -txindex command line option. Return the raw transaction data. If verbose=0, returns a string that is serialized, hex-encoded data for 'txid'. If verbose is non-zero, returns an Object with information about 'txid'.", + "description": [ + "", + "> lbrycrd-cli getrawtransaction \"mytxid\"", + "> lbrycrd-cli getrawtransaction \"mytxid\" 1", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getrawtransaction\", \"params\": [\"mytxid\", 1] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Rawtransactions" + ], + "params": { + "type": "object", + "properties": { + "txid": { + "type": "string", + "description": "The transaction id" + }, + "verbose": { + "type": "number", + "description": "If 0, return a string, other return a json object", + "default": 0 + } + }, + "required": [ + "txid" + ] + }, + "result": { + "type": "string", + "description": "The serialized, hex-encoded data for 'txid' Result (if verbose > 0): { \"hex\" : \"data\", (string) The serialized, hex-encoded data for 'txid' \"txid\" : \"id\", (string) The transaction id (same as provided) \"size\" : n, (numeric) The transaction size \"version\" : n, (numeric) The version \"locktime\" : ttt, (numeric) The lock time \"vin\" : [ (array of json objects) { \"txid\": \"id\", (string) The transaction id \"vout\": n, (numeric) \"scriptSig\": { (json object) The script \"asm\": \"asm\", (string) asm \"hex\": \"hex\" (string) hex }, \"sequence\": n (numeric) The script sequence number } ,... ], \"vout\" : [ (array of json objects) { \"value\" : x.xxx, (numeric) The value in LBC \"n\" : n, (numeric) index \"scriptPubKey\" : { (json object) \"asm\" : \"asm\", (string) the asm \"hex\" : \"hex\", (string) the hex \"reqSigs\" : n, (numeric) The required sigs \"type\" : \"pubkeyhash\", (string) The type, eg 'pubkeyhash' \"addresses\" : [ (json array of string) \"lbrycrdaddress\" (string) lbrycrd address ,... ] } } ,... ], \"blockhash\" : \"hash\", (string) the block hash \"confirmations\" : n, (numeric) The confirmations \"time\" : ttt, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT) \"blocktime\" : ttt (numeric) The block time in seconds since epoch (Jan 1 1970 GMT) }" + } + }, + "sendrawtransaction": { + "summary": "Submits raw transaction (serialized, hex-encoded) to local node and network. Also see createrawtransaction and signrawtransaction calls.", + "description": [ + "", + "", + "Create a transaction", + "> lbrycrd-cli createrawtransaction \"[{\\\"txid\\\" : \\\"mytxid\\\",\\\"vout\\\":0}]\" \"{\\\"myaddress\\\":0.01}\"", + "Sign the transaction, and get back the hex", + "> lbrycrd-cli signrawtransaction \"myhex\"", + "", + "Send the transaction (signed hex)", + "> lbrycrd-cli sendrawtransaction \"signedhex\"", + "", + "As a json rpc call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"sendrawtransaction\", \"params\": [\"signedhex\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Rawtransactions" + ], + "params": { + "type": "object", + "properties": { + "hexstring": { + "type": "string", + "description": "The hex string of the raw transaction)" + }, + "allowhighfees": { + "type": "boolean", + "description": "Allow high fees", + "default": false + } + }, + "required": [ + "hexstring" + ] + }, + "result": { + "type": "string", + "description": "The transaction hash in hex" + } + }, + "signrawtransaction": { + "summary": "Sign inputs for raw transaction (serialized, hex-encoded). The second optional argument (may be null) is an array of previous transaction outputs that this transaction depends on but may not yet be in the block chain. The third optional argument (may be null) is an array of base58-encoded private keys that, if given, will be the only keys used to sign the transaction.", + "description": [ + "", + "> lbrycrd-cli signrawtransaction \"myhex\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"signrawtransaction\", \"params\": [\"myhex\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Rawtransactions" + ], + "params": { + "type": "object", + "properties": { + "hexstring": { + "type": "string", + "description": "The transaction hex string" + }, + "prevtxs": { + "type": "string", + "description": "An json array of previous dependent transaction outputs [ (json array of json objects, or 'null' if none provided) { \"txid\":\"id\", (string, required) The transaction id \"vout\":n, (numeric, required) The output number \"scriptPubKey\": \"hex\", (string, required) script key \"redeemScript\": \"hex\" (string, required for P2SH) redeem script } ,... ]" + }, + "privatekeys": { + "type": "string", + "description": "A json array of base58-encoded private keys for signing [ (json array of strings, or 'null' if none provided) \"privatekey\" (string) private key in base58-encoding ,... ]" + }, + "sighashtype": { + "type": "string", + "description": "The signature hash type. Must be one of \"ALL\" \"NONE\" \"SINGLE\" \"ALL|ANYONECANPAY\" \"NONE|ANYONECANPAY\" \"SINGLE|ANYONECANPAY\"", + "default": "ALL" + } + }, + "required": [ + "hexstring" + ] + }, + "result": { + "type": "object", + "properties": { + "hex": { + "type": "string", + "description": "The hex-encoded raw transaction with signature(s)" + }, + "complete": { + "type": "boolean", + "description": "If the transaction has a complete set of signatures" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "txid": { + "type": "string", + "description": "The hash of the referenced, previous transaction" + }, + "vout": { + "type": "number", + "description": "The index of the output to spent and used as input" + }, + "scriptSig": { + "type": "string", + "description": "The hex-encoded signature script" + }, + "sequence": { + "type": "number", + "description": "Script sequence number" + }, + "error": { + "type": "string", + "description": "Verification or signing error related to the input" + } + } + } + } + } + } + }, + "createmultisig": { + "summary": "Creates a multi-signature address with n signature of m keys required. It returns a json object with the address and redeemScript.", + "description": [ + "", + "", + "Create a multisig address from 2 addresses", + "> lbrycrd-cli createmultisig 2 \"[\\\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"", + "", + "As a json rpc call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"createmultisig\", \"params\": [2, \"[\\\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Util" + ], + "params": { + "type": "object", + "properties": { + "nrequired": { + "type": "number", + "description": "The number of required signatures out of the n keys or addresses." + }, + "keys": { + "type": "string", + "description": "A json array of keys which are lbrycrd addresses or hex-encoded public keys [ \"key\" (string) lbrycrd address or hex-encoded public key ,... ]" + } + }, + "required": [ + "nrequired", + "keys" + ] + }, + "result": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The value of the new multisig address." + }, + "redeemScript": { + "type": "string", + "description": "The string value of the hex-encoded redemption script." + } + } + } + }, + "estimatefee": { + "summary": "Estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within nblocks blocks.", + "description": [ + "", + "> lbrycrd-cli estimatefee 6", + "" + ], + "tags": [ + "Util" + ], + "params": { + "type": "object", + "properties": { + "nblocks": { + "type": "number", + "description": "" + } + }, + "required": [ + "nblocks" + ] + }, + "result": { + "type": "number", + "description": "estimated fee-per-kilobyte A negative value is returned if not enough transactions and blocks have been observed to make an estimate." + } + }, + "estimatepriority": { + "summary": "Estimates the approximate priority a zero-fee transaction needs to begin confirmation within nblocks blocks.", + "description": [ + "", + "> lbrycrd-cli estimatepriority 6", + "" + ], + "tags": [ + "Util" + ], + "params": { + "type": "object", + "properties": { + "nblocks": { + "type": "number", + "description": "" + } + }, + "required": [ + "nblocks" + ] + }, + "result": { + "type": "number", + "description": "estimated priority A negative value is returned if not enough transactions and blocks have been observed to make an estimate." + } + }, + "estimatesmartfee": { + "summary": "WARNING: This interface is unstable and may disappear or change! Estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within nblocks blocks if possible and return the number of blocks for which the estimate is valid.", + "description": [ + "", + "> lbrycrd-cli estimatesmartfee 6", + "" + ], + "tags": [ + "Util" + ], + "params": { + "type": "object", + "properties": { + "nblocks": { + "type": "number", + "description": "" + } + }, + "required": [ + "nblocks" + ] + }, + "result": { + "type": "object", + "properties": { + "feerate": { + "type": "number", + "description": "estimate fee-per-kilobyte (in BTC)" + }, + "blocks": { + "type": "number", + "description": "block number where estimate was found" + } + } + } + }, + "estimatesmartpriority": { + "summary": "WARNING: This interface is unstable and may disappear or change! Estimates the approximate priority a zero-fee transaction needs to begin confirmation within nblocks blocks if possible and return the number of blocks for which the estimate is valid.", + "description": [ + "", + "> lbrycrd-cli estimatesmartpriority 6", + "" + ], + "tags": [ + "Util" + ], + "params": { + "type": "object", + "properties": { + "nblocks": { + "type": "number", + "description": "" + } + }, + "required": [ + "nblocks" + ] + }, + "result": { + "type": "object", + "properties": { + "priority": { + "type": "number", + "description": "estimated priority" + }, + "blocks": { + "type": "number", + "description": "block number where estimate was found" + } + } + } + }, + "validateaddress": { + "summary": "Return information about the given lbrycrd address.", + "description": [ + "", + "> lbrycrd-cli validateaddress \"1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"validateaddress\", \"params\": [\"1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Util" + ], + "params": { + "type": "object", + "properties": { + "lbrycrdaddress": { + "type": "string", + "description": "The lbrycrd address to validate" + } + }, + "required": [ + "lbrycrdaddress" + ] + }, + "result": { + "type": "object", + "properties": { + "isvalid": { + "type": "boolean", + "description": "If the address is valid or not. If not, this is the only property returned." + }, + "address": { + "type": "string", + "description": "The lbrycrd address validated" + }, + "scriptPubKey": { + "type": "string", + "description": "The hex encoded scriptPubKey generated by the address" + }, + "ismine": { + "type": "boolean", + "description": "If the address is yours or not" + }, + "iswatchonly": { + "type": "boolean", + "description": "If the address is watchonly" + }, + "isscript": { + "type": "boolean", + "description": "If the key is a script" + }, + "pubkey": { + "type": "string", + "description": "The hex value of the raw public key" + }, + "iscompressed": { + "type": "boolean", + "description": "If the address is compressed" + }, + "account": { + "type": "string", + "description": "DEPRECATED. The account associated with the address, \"\" is the default account" + } + } + } + }, + "verifymessage": { + "summary": "Verify a signed message", + "description": [ + "", + "", + "Unlock the wallet for 30 seconds", + "> lbrycrd-cli walletpassphrase \"mypassphrase\" 30", + "", + "Create the signature", + "> lbrycrd-cli signmessage \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"my message\"", + "", + "Verify the signature", + "> lbrycrd-cli verifymessage \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"signature\" \"my message\"", + "", + "As json rpc", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"verifymessage\", \"params\": [\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", \"signature\", \"my message\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Util" + ], + "params": { + "type": "object", + "properties": { + "lbrycrdaddress": { + "type": "string", + "description": "The lbrycrd address to use for the signature." + }, + "signature": { + "type": "string", + "description": "The signature provided by the signer in base 64 encoding (see signmessage)." + }, + "message": { + "type": "string", + "description": "The message that was signed." + } + }, + "required": [ + "lbrycrdaddress", + "signature", + "message" + ] + }, + "result": { + "type": "boolean", + "description": "If the signature is verified or not." + } + }, + "abandontransaction": { + "summary": "Mark in-wallet transaction as abandoned This will mark this transaction and all its in-wallet descendants as abandoned which will allow for their inputs to be respent. It can be used to replace \"stuck\" or evicted transactions. It only works on transactions which are not included in a block and are not currently in the mempool. It has no effect on transactions which are already conflicted or abandoned.", + "description": [ + "", + "> lbrycrd-cli abandontransaction \"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"abandontransaction\", \"params\": [\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "txid": { + "type": "string", + "description": "The transaction id" + } + }, + "required": [ + "txid" + ] + } + }, + "addmultisigaddress": { + "summary": "Add a nrequired-to-sign multisignature address to the wallet. Each key is a Bitcoin address or hex-encoded public key. If 'account' is specified (DEPRECATED), assign address to that account.", + "description": [ + "", + "", + "Add a multisig address from 2 addresses", + "> lbrycrd-cli addmultisigaddress 2 \"[\\\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"", + "", + "As json rpc call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"addmultisigaddress\", \"params\": [2, \"[\\\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "nrequired": { + "type": "number", + "description": "The number of required signatures out of the n keys or addresses." + }, + "keysobject": { + "type": "string", + "description": "A json array of lbrycrd addresses or hex-encoded public keys [ \"address\" (string) lbrycrd address or hex-encoded public key ..., ]" + }, + "account": { + "type": "string", + "description": "DEPRECATED. An account to assign the addresses to." + } + }, + "required": [ + "nrequired", + "keysobject" + ] + }, + "result": { + "type": "string", + "description": "A lbrycrd address associated with the keys." + } + }, + "backupwallet": { + "summary": "Safely copies current wallet file to destination, which can be a directory or a path with filename.", + "description": [ + "", + "> lbrycrd-cli backupwallet \"backup.dat\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"backupwallet\", \"params\": [\"backup.dat\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "destination": { + "type": "string", + "description": "The destination directory or file" + } + }, + "required": [ + "destination" + ] + } + }, + "dumpprivkey": { + "summary": "Reveals the private key corresponding to 'lbrycrdaddress'. Then the importprivkey can be used with this output", + "description": [ + "", + "> lbrycrd-cli dumpprivkey \"myaddress\"", + "> lbrycrd-cli importprivkey \"mykey\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"dumpprivkey\", \"params\": [\"myaddress\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "lbrycrdaddress": { + "type": "string", + "description": "The lbrycrd address for the private key" + } + }, + "required": [ + "lbrycrdaddress" + ] + }, + "result": { + "type": "string", + "description": "The private key" + } + }, + "dumpwallet": { + "summary": "Dumps all wallet keys in a human-readable format.", + "description": [ + "", + "> lbrycrd-cli dumpwallet \"test\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"dumpwallet\", \"params\": [\"test\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "filename": { + "type": "string", + "description": "The filename" + } + }, + "required": [ + "filename" + ] + } + }, + "encryptwallet": { + "summary": "Encrypts the wallet with 'passphrase'. This is for first time encryption. After this, any calls that interact with private keys such as sending or signing will require the passphrase to be set prior the making these calls. Use the walletpassphrase call for this, and then walletlock call. If the wallet is already encrypted, use the walletpassphrasechange call. Note that this will shutdown the server.", + "description": [ + "", + "", + "Encrypt you wallet", + "> lbrycrd-cli encryptwallet \"my pass phrase\"", + "", + "Now set the passphrase to use the wallet, such as for signing or sending LBC", + "> lbrycrd-cli walletpassphrase \"my pass phrase\"", + "", + "Now we can so something like sign", + "> lbrycrd-cli signmessage \"lbrycrdaddress\" \"test message\"", + "", + "Now lock the wallet again by removing the passphrase", + "> lbrycrd-cli walletlock ", + "", + "As a json rpc call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"encryptwallet\", \"params\": [\"my pass phrase\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "passphrase": { + "type": "string", + "description": "The pass phrase to encrypt the wallet with. It must be at least 1 character, but should be long." + } + }, + "required": [ + "passphrase" + ] + } + }, + "getaccount": { + "summary": "DEPRECATED. Returns the account associated with the given address.", + "description": [ + "", + "> lbrycrd-cli getaccount \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getaccount\", \"params\": [\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "lbrycrdaddress": { + "type": "string", + "description": "The lbrycrd address for account lookup." + } + }, + "required": [ + "lbrycrdaddress" + ] + }, + "result": { + "type": "string", + "description": "the account address" + } + }, + "getaccountaddress": { + "summary": "DEPRECATED. Returns the current Bitcoin address for receiving payments to this account.", + "description": [ + "", + "> lbrycrd-cli getaccountaddress ", + "> lbrycrd-cli getaccountaddress \"\"", + "> lbrycrd-cli getaccountaddress \"myaccount\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getaccountaddress\", \"params\": [\"myaccount\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "account": { + "type": "string", + "description": "The account name for the address. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created and a new address created if there is no account by the given name." + } + }, + "required": [ + "account" + ] + }, + "result": { + "type": "string", + "description": "The account lbrycrd address" + } + }, + "getaddressesbyaccount": { + "summary": "DEPRECATED. Returns the list of addresses for the given account.", + "description": [ + "", + "> lbrycrd-cli getaddressesbyaccount \"tabby\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getaddressesbyaccount\", \"params\": [\"tabby\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "account": { + "type": "string", + "description": "The account name." + } + }, + "required": [ + "account" + ] + }, + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "lbrycrdaddress": { + "type": "string", + "description": "a lbrycrd address associated with the given account" + } + } + } + } + }, + "getbalance": { + "summary": "If account is not specified, returns the server's total available balance. If account is specified (DEPRECATED), returns the balance in the account. Note that the account \"\" is not the same as leaving the parameter out. The server total may be different to the balance in the default \"\" account.", + "description": [ + "", + "", + "The total amount in the wallet", + "> lbrycrd-cli getbalance ", + "", + "The total amount in the wallet at least 5 blocks confirmed", + "> lbrycrd-cli getbalance \"*\" 6", + "", + "As a json rpc call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getbalance\", \"params\": [\"*\", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "account": { + "type": "string", + "description": "DEPRECATED. The selected account, or \"*\" for entire wallet. It may be the default account using \"\"." + }, + "minconf": { + "type": "number", + "description": "Only include transactions confirmed at least this many times.", + "default": 1 + }, + "includeWatchonly": { + "type": "boolean", + "description": "Also include balance in watchonly addresses (see 'importaddress')", + "default": false + } + }, + "required": [] + }, + "result": { + "type": "number", + "description": "The total amount in LBC received for this account." + } + }, + "getnewaddress": { + "summary": "Returns a new Bitcoin address for receiving payments. If 'account' is specified (DEPRECATED), it is added to the address book so payments received with the address will be credited to 'account'.", + "description": [ + "", + "> lbrycrd-cli getnewaddress ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getnewaddress\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "account": { + "type": "string", + "description": "DEPRECATED. The account name for the address to be linked to. If not provided, the default account \"\" is used. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name." + } + }, + "required": [] + }, + "result": { + "type": "string", + "description": "The new lbrycrd address" + } + }, + "getrawchangeaddress": { + "summary": "Returns a new Bitcoin address, for receiving change. This is for use with raw transactions, NOT normal use.", + "description": [ + "", + "> lbrycrd-cli getrawchangeaddress ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getrawchangeaddress\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "string", + "description": "The address" + } + }, + "getreceivedbyaccount": { + "summary": "DEPRECATED. Returns the total amount received by addresses with in transactions with at least [minconf] confirmations.", + "description": [ + "", + "", + "Amount received by the default account with at least 1 confirmation", + "> lbrycrd-cli getreceivedbyaccount \"\"", + "", + "Amount received at the tabby account including unconfirmed amounts with zero confirmations", + "> lbrycrd-cli getreceivedbyaccount \"tabby\" 0", + "", + "The amount with at least 6 confirmation, very safe", + "> lbrycrd-cli getreceivedbyaccount \"tabby\" 6", + "", + "As a json rpc call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getreceivedbyaccount\", \"params\": [\"tabby\", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "account": { + "type": "string", + "description": "The selected account, may be the default account using \"\"." + }, + "minconf": { + "type": "number", + "description": "Only include transactions confirmed at least this many times.", + "default": 1 + } + }, + "required": [ + "account" + ] + }, + "result": { + "type": "number", + "description": "The total amount in LBC received for this account." + } + }, + "getreceivedbyaddress": { + "summary": "Returns the total amount received by the given lbrycrdaddress in transactions with at least minconf confirmations.", + "description": [ + "", + "", + "The amount from transactions with at least 1 confirmation", + "> lbrycrd-cli getreceivedbyaddress \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"", + "", + "The amount including unconfirmed transactions, zero confirmations", + "> lbrycrd-cli getreceivedbyaddress \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" 0", + "", + "The amount with at least 6 confirmation, very safe", + "> lbrycrd-cli getreceivedbyaddress \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" 6", + "", + "As a json rpc call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getreceivedbyaddress\", \"params\": [\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "lbrycrdaddress": { + "type": "string", + "description": "The lbrycrd address for transactions." + }, + "minconf": { + "type": "number", + "description": "Only include transactions confirmed at least this many times.", + "default": 1 + } + }, + "required": [ + "lbrycrdaddress" + ] + }, + "result": { + "type": "number", + "description": "The total amount in LBC received at this address." + } + }, + "gettransaction": { + "summary": "Get detailed information about in-wallet transaction ", + "description": [ + "", + "> lbrycrd-cli gettransaction \"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"", + "> lbrycrd-cli gettransaction \"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\" true", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"gettransaction\", \"params\": [\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "txid": { + "type": "string", + "description": "The transaction id" + }, + "includeWatchonly": { + "type": "boolean", + "description": "Whether to include watchonly addresses in balance calculation and details[]", + "default": false + } + }, + "required": [ + "txid" + ] + }, + "result": { + "type": "object", + "properties": { + "amount": { + "type": "number", + "description": "The transaction amount in LBC" + }, + "confirmations": { + "type": "number", + "description": "The number of confirmations" + }, + "blockhash": { + "type": "string", + "description": "The block hash" + }, + "blockindex": { + "type": "number", + "description": "The index of the transaction in the block that includes it" + }, + "blocktime": { + "type": "number", + "description": "The time in seconds since epoch (1 Jan 1970 GMT)" + }, + "txid": { + "type": "string", + "description": "The transaction id." + }, + "time": { + "type": "number", + "description": "The transaction time in seconds since epoch (1 Jan 1970 GMT)" + }, + "timereceived": { + "type": "number", + "description": "The time received in seconds since epoch (1 Jan 1970 GMT)" + }, + "bip125-replaceable": { + "type": "string", + "description": "Whether this transaction could be replaced due to BIP125 (replace-by-fee); may be unknown for unconfirmed transactions not in the mempool" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account": { + "type": "string", + "description": "DEPRECATED. The account name involved in the transaction, can be \"\" for the default account." + }, + "address": { + "type": "string", + "description": "The lbrycrd address involved in the transaction" + }, + "category": { + "type": "string", + "description": "The category, either 'send' or 'receive'" + }, + "amount": { + "type": "number", + "description": "The amount in LBC" + }, + "label": { + "type": "string", + "description": "A comment for the address/transaction, if any" + }, + "vout": { + "type": "number", + "description": "the vout value" + } + } + } + }, + "hex": { + "type": "string", + "description": "Raw data for transaction" + } + } + } + }, + "getunconfirmedbalance": { + "summary": "Returns the server's total unconfirmed balance", + "description": [], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + } + }, + "getwalletinfo": { + "summary": "Returns an object containing various wallet state info.", + "description": [ + "", + "> lbrycrd-cli getwalletinfo ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getwalletinfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "object", + "properties": { + "walletversion": { + "type": "number", + "description": "the wallet version" + }, + "balance": { + "type": "number", + "description": "the total confirmed balance of the wallet in LBC" + }, + "unconfirmed_balance": { + "type": "number", + "description": "the total unconfirmed balance of the wallet in LBC" + }, + "immature_balance": { + "type": "number", + "description": "the total immature balance of the wallet in LBC" + }, + "txcount": { + "type": "number", + "description": "the total number of transactions in the wallet" + }, + "keypoololdest": { + "type": "number", + "description": "the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool" + }, + "keypoolsize": { + "type": "number", + "description": "how many new keys are pre-generated" + }, + "unlocked_until": { + "type": "number", + "description": "the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked" + }, + "paytxfee": { + "type": "number", + "description": "the transaction fee configuration, set in LBC/kB" + } + } + } + }, + "importaddress": { + "summary": "Adds a script (in hex) or address that can be watched as if it were in your wallet but cannot be used to spend.", + "description": [ + "", + "", + "Import a script with rescan", + "> lbrycrd-cli importaddress \"myscript\"", + "", + "Import using a label without rescan", + "> lbrycrd-cli importaddress \"myscript\" \"testing\" false", + "", + "As a JSON-RPC call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"importaddress\", \"params\": [\"myscript\", \"testing\", false] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "script": { + "type": "string", + "description": "The hex-encoded script (or address)" + }, + "label": { + "type": "string", + "description": "An optional label", + "default": "\"\"" + }, + "rescan": { + "type": "boolean", + "description": "Rescan the wallet for transactions", + "default": true + }, + "p2sh": { + "type": "boolean", + "description": "Add the P2SH version of the script as well Note: This call can take minutes to complete if rescan is true. If you have the full public key, you should call importpubkey instead of this.", + "default": false + } + }, + "required": [ + "script" + ] + } + }, + "importprivkey": { + "summary": "Adds a private key (as returned by dumpprivkey) to your wallet.", + "description": [ + "", + "", + "Dump a private key", + "> lbrycrd-cli dumpprivkey \"myaddress\"", + "", + "Import the private key with rescan", + "> lbrycrd-cli importprivkey \"mykey\"", + "", + "Import using a label and without rescan", + "> lbrycrd-cli importprivkey \"mykey\" \"testing\" false", + "", + "As a JSON-RPC call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"importprivkey\", \"params\": [\"mykey\", \"testing\", false] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "lbrycrdprivkey": { + "type": "string", + "description": "The private key (see dumpprivkey)" + }, + "label": { + "type": "string", + "description": "An optional label", + "default": "\"\"" + }, + "rescan": { + "type": "boolean", + "description": "Rescan the wallet for transactions Note: This call can take minutes to complete if rescan is true.", + "default": true + } + }, + "required": [ + "lbrycrdprivkey" + ] + } + }, + "importprunedfunds": { + "summary": "Imports funds without rescan. Corresponding address or script must previously be included in wallet. Aimed towards pruned wallets. The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.", + "description": [], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "rawtransaction": { + "type": "string", + "description": "A raw transaction in hex funding an already-existing address in wallet" + }, + "txoutproof": { + "type": "string", + "description": "The hex output from gettxoutproof that contains the transaction" + }, + "label": { + "type": "string", + "description": "An optional label" + } + }, + "required": [ + "rawtransaction", + "txoutproof" + ] + } + }, + "importpubkey": { + "summary": "Adds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend.", + "description": [ + "", + "", + "Import a public key with rescan", + "> lbrycrd-cli importpubkey \"mypubkey\"", + "", + "Import using a label without rescan", + "> lbrycrd-cli importpubkey \"mypubkey\" \"testing\" false", + "", + "As a JSON-RPC call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"importpubkey\", \"params\": [\"mypubkey\", \"testing\", false] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "pubkey": { + "type": "string", + "description": "The hex-encoded public key" + }, + "label": { + "type": "string", + "description": "An optional label", + "default": "\"\"" + }, + "rescan": { + "type": "boolean", + "description": "Rescan the wallet for transactions Note: This call can take minutes to complete if rescan is true.", + "default": true + } + }, + "required": [ + "pubkey" + ] + } + }, + "importwallet": { + "summary": "Imports keys from a wallet dump file (see dumpwallet).", + "description": [ + "", + "", + "Dump the wallet", + "> lbrycrd-cli dumpwallet \"test\"", + "", + "Import the wallet", + "> lbrycrd-cli importwallet \"test\"", + "", + "Import using the json rpc call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"importwallet\", \"params\": [\"test\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "filename": { + "type": "string", + "description": "The wallet file" + } + }, + "required": [ + "filename" + ] + } + }, + "keypoolrefill": { + "summary": "Fills the keypool.", + "description": [ + "", + "> lbrycrd-cli keypoolrefill ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"keypoolrefill\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "newsize": { + "type": "number", + "description": "The new keypool size", + "default": 100 + } + }, + "required": [] + } + }, + "listaccounts": { + "summary": "DEPRECATED. Returns Object that has account names as keys, account balances as values.", + "description": [ + "", + "", + "List account balances where there at least 1 confirmation", + "> lbrycrd-cli listaccounts ", + "", + "List account balances including zero confirmation transactions", + "> lbrycrd-cli listaccounts 0", + "", + "List account balances for 6 or more confirmations", + "> lbrycrd-cli listaccounts 6", + "", + "As json rpc call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listaccounts\", \"params\": [6] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "minconf": { + "type": "number", + "description": "Only include transactions with at least this many confirmations", + "default": 1 + }, + "includeWatchonly": { + "type": "boolean", + "description": "Include balances in watchonly addresses (see 'importaddress')", + "default": false + } + }, + "required": [] + }, + "result": { + "type": "object", + "properties": { + "account": { + "type": "number", + "description": "The property name is the account name, and the value is the total balance for the account." + } + } + } + }, + "listaddressgroupings": { + "summary": "Lists groups of addresses which have had their common ownership made public by common use as inputs or as the resulting change in past transactions", + "description": [ + "", + "> lbrycrd-cli listaddressgroupings ", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listaddressgroupings\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "array", + "items": { + "type": "array" + } + } + }, + "listlockunspent": { + "summary": "Returns list of temporarily unspendable outputs. See the lockunspent call to lock and unlock transactions for spending.", + "description": [ + "", + "", + "List the unspent transactions", + "> lbrycrd-cli listunspent ", + "", + "Lock an unspent transaction", + "> lbrycrd-cli lockunspent false \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"", + "", + "List the locked transactions", + "> lbrycrd-cli listlockunspent ", + "", + "Unlock the transaction again", + "> lbrycrd-cli lockunspent true \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"", + "", + "As a json rpc call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listlockunspent\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": {}, + "required": [] + }, + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "txid": { + "type": "string", + "description": "The transaction id locked" + }, + "vout": { + "type": "number", + "description": "The vout value" + } + } + } + } + }, + "listreceivedbyaccount": { + "summary": "DEPRECATED. List balances by account.", + "description": [ + "", + "> lbrycrd-cli listreceivedbyaccount ", + "> lbrycrd-cli listreceivedbyaccount 6 true", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listreceivedbyaccount\", \"params\": [6, true, true] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "minconf": { + "type": "number", + "description": "The minimum number of confirmations before payments are included.", + "default": 1 + }, + "includeempty": { + "type": "boolean", + "description": "Whether to include accounts that haven't received any payments.", + "default": false + }, + "includeWatchonly": { + "type": "boolean", + "description": "Whether to include watchonly addresses (see 'importaddress').", + "default": false + } + }, + "required": [] + }, + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "involvesWatchonly": { + "type": "boolean", + "description": "Only returned if imported addresses were involved in transaction" + }, + "account": { + "type": "string", + "description": "The account name of the receiving account" + }, + "amount": { + "type": "number", + "description": "The total amount received by addresses with this account" + }, + "confirmations": { + "type": "number", + "description": "The number of confirmations of the most recent transaction included" + }, + "label": { + "type": "string", + "description": "A comment for the address/transaction, if any" + } + } + } + } + }, + "listreceivedbyaddress": { + "summary": "List balances by receiving address.", + "description": [ + "", + "> lbrycrd-cli listreceivedbyaddress ", + "> lbrycrd-cli listreceivedbyaddress 6 true", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listreceivedbyaddress\", \"params\": [6, true, true] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "minconf": { + "type": "number", + "description": "The minimum number of confirmations before payments are included.", + "default": 1 + }, + "includeempty": { + "type": "boolean", + "description": "Whether to include addresses that haven't received any payments.", + "default": false + }, + "includeWatchonly": { + "type": "boolean", + "description": "Whether to include watchonly addresses (see 'importaddress').", + "default": false + } + }, + "required": [] + }, + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "involvesWatchonly": { + "type": "boolean", + "description": "Only returned if imported addresses were involved in transaction" + }, + "address": { + "type": "string", + "description": "The receiving address" + }, + "account": { + "type": "string", + "description": "DEPRECATED. The account of the receiving address. The default account is \"\"." + }, + "amount": { + "type": "number", + "description": "The total amount in LBC received by the address" + }, + "confirmations": { + "type": "number", + "description": "The number of confirmations of the most recent transaction included" + }, + "label": { + "type": "string", + "description": "A comment for the address/transaction, if any" + } + } + } + } + }, + "listsinceblock": { + "summary": "Get all transactions in blocks since block [blockhash], or all transactions if omitted", + "description": [ + "", + "> lbrycrd-cli listsinceblock ", + "> lbrycrd-cli listsinceblock \"000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad\" 6", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listsinceblock\", \"params\": [\"000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad\", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "blockhash": { + "type": "string", + "description": "The block hash to list transactions since" + }, + "target-confirmations": { + "type": "number", + "description": "The confirmations required, must be 1 or more" + }, + "includeWatchonly": { + "type": "boolean", + "description": "Include transactions to watchonly addresses (see 'importaddress')", + "default": false + } + }, + "required": [] + }, + "result": { + "type": "object", + "properties": { + "transactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account": { + "type": "string", + "description": "DEPRECATED. The account name associated with the transaction. Will be \"\" for the default account." + }, + "address": { + "type": "string", + "description": "The lbrycrd address of the transaction. Not present for move transactions (category = move)." + }, + "category": { + "type": "string", + "description": "The transaction category. 'send' has negative amounts, 'receive' has positive amounts." + }, + "amount": { + "type": "number", + "description": "The amount in LBC. This is negative for the 'send' category, and for the 'move' category for moves outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds." + }, + "vout": { + "type": "number", + "description": "the vout value" + }, + "fee": { + "type": "number", + "description": "The amount of the fee in LBC. This is negative and only available for the 'send' category of transactions." + }, + "confirmations": { + "type": "number", + "description": "The number of confirmations for the transaction. Available for 'send' and 'receive' category of transactions." + }, + "blockhash": { + "type": "string", + "description": "The block hash containing the transaction. Available for 'send' and 'receive' category of transactions." + }, + "blockindex": { + "type": "number", + "description": "The index of the transaction in the block that includes it. Available for 'send' and 'receive' category of transactions." + }, + "blocktime": { + "type": "number", + "description": "The block time in seconds since epoch (1 Jan 1970 GMT)." + }, + "txid": { + "type": "string", + "description": "The transaction id. Available for 'send' and 'receive' category of transactions." + }, + "time": { + "type": "number", + "description": "The transaction time in seconds since epoch (Jan 1 1970 GMT)." + }, + "timereceived": { + "type": "number", + "description": "The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions." + }, + "comment": { + "type": "string", + "description": "If a comment is associated with the transaction." + }, + "label": { + "type": "string", + "description": "A comment for the address/transaction, if any" + }, + "to": { + "type": "string", + "description": "If a comment to is associated with the transaction." + } + } + } + }, + "lastblock": { + "type": "string", + "description": "The hash of the last block" + } + } + } + }, + "listtransactions": { + "summary": "Returns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'.", + "description": [ + "", + "", + "List the most recent 10 transactions in the systems", + "> lbrycrd-cli listtransactions ", + "", + "List transactions 100 to 120", + "> lbrycrd-cli listtransactions \"*\" 20 100", + "", + "As a json rpc call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listtransactions\", \"params\": [\"*\", 20, 100] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "account": { + "type": "string", + "description": "DEPRECATED. The account name. Should be \"*\"." + }, + "count": { + "type": "number", + "description": "The number of transactions to return", + "default": 10 + }, + "from": { + "type": "number", + "description": "The number of transactions to skip", + "default": 0 + }, + "includeWatchonly": { + "type": "boolean", + "description": "Include transactions to watchonly addresses (see 'importaddress')", + "default": false + } + }, + "required": [] + }, + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account": { + "type": "string", + "description": "DEPRECATED. The account name associated with the transaction. It will be \"\" for the default account." + }, + "address": { + "type": "string", + "description": "The lbrycrd address of the transaction. Not present for move transactions (category = move)." + }, + "category": { + "type": "string", + "description": "The transaction category. 'move' is a local (off blockchain) transaction between accounts, and not associated with an address, transaction id or block. 'send' and 'receive' transactions are associated with an address, transaction id and block details" + }, + "amount": { + "type": "number", + "description": "The amount in LBC. This is negative for the 'send' category, and for the 'move' category for moves outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds." + }, + "vout": { + "type": "number", + "description": "the vout value" + }, + "fee": { + "type": "number", + "description": "The amount of the fee in LBC. This is negative and only available for the 'send' category of transactions." + }, + "abandoned": { + "type": "boolean", + "description": "'true' if the transaction has been abandoned (inputs are respendable)." + }, + "confirmations": { + "type": "number", + "description": "The number of confirmations for the transaction. Available for 'send' and 'receive' category of transactions. Negative confirmations indicate the transaction conflicts with the block chain" + }, + "trusted": { + "type": "boolean", + "description": "Whether we consider the outputs of this unconfirmed transaction safe to spend." + }, + "blockhash": { + "type": "string", + "description": "The block hash containing the transaction. Available for 'send' and 'receive' category of transactions." + }, + "blockindex": { + "type": "number", + "description": "The index of the transaction in the block that includes it. Available for 'send' and 'receive' category of transactions." + }, + "blocktime": { + "type": "number", + "description": "The block time in seconds since epoch (1 Jan 1970 GMT)." + }, + "txid": { + "type": "string", + "description": "The transaction id. Available for 'send' and 'receive' category of transactions." + }, + "time": { + "type": "number", + "description": "The transaction time in seconds since epoch (midnight Jan 1 1970 GMT)." + }, + "timereceived": { + "type": "number", + "description": "The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions." + }, + "comment": { + "type": "string", + "description": "If a comment is associated with the transaction." + }, + "label": { + "type": "string", + "description": "A comment for the address/transaction, if any" + }, + "otheraccount": { + "type": "string", + "description": "For the 'move' category of transactions, the account the funds came from (for receiving funds, positive amounts), or went to (for sending funds, negative amounts)." + }, + "bip125-replaceable": { + "type": "string", + "description": "Whether this transaction could be replaced due to BIP125 (replace-by-fee); may be unknown for unconfirmed transactions not in the mempool" + } + } + } + } + }, + "listunspent": { + "summary": "Returns array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations. Optionally filter to only include txouts paid to specified addresses. Results are an array of Objects, each of which has: {txid, vout, scriptPubKey, amount, confirmations}", + "description": [ + "", + "> lbrycrd-cli listunspent ", + "> lbrycrd-cli listunspent 6 9999999 \"[\\\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\\\",\\\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\\\"]\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listunspent\", \"params\": [6, 9999999 \"[\\\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\\\",\\\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\\\"]\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "minconf": { + "type": "number", + "description": "The minimum confirmations to filter", + "default": 1 + }, + "maxconf": { + "type": "number", + "description": "The maximum confirmations to filter", + "default": 9999999 + }, + "addresses": { + "type": "string", + "description": "A json array of lbrycrd addresses to filter [ \"address\" (string) lbrycrd address ,... ] Result [ (array of json object) { \"txid\" : \"txid\", (string) the transaction id \"vout\" : n, (numeric) the vout value \"address\" : \"address\", (string) the lbrycrd address \"account\" : \"account\", (string) DEPRECATED. The associated account, or \"\" for the default account \"scriptPubKey\" : \"key\", (string) the script key \"amount\" : x.xxx, (numeric) the transaction amount in LBC \"confirmations\" : n (numeric) The number of confirmations } ,... ]" + } + }, + "required": [ + "addresses" + ] + } + }, + "lockunspent": { + "summary": "Updates list of temporarily unspendable outputs. Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs. If no transaction outputs are specified when unlocking then all current locked transaction outputs are unlocked. A locked transaction output will not be chosen by automatic coin selection, when spending LBC. Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list is always cleared (by virtue of process exit) when a node stops or fails. Also see the listunspent call", + "description": [ + "", + "", + "List the unspent transactions", + "> lbrycrd-cli listunspent ", + "", + "Lock an unspent transaction", + "> lbrycrd-cli lockunspent false \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"", + "", + "List the locked transactions", + "> lbrycrd-cli listlockunspent ", + "", + "Unlock the transaction again", + "> lbrycrd-cli lockunspent true \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"", + "", + "As a json rpc call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"lockunspent\", \"params\": [false, \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "unlock": { + "type": "boolean", + "description": "Whether to unlock (true) or lock (false) the specified transactions" + }, + "transactions": { + "type": "string", + "description": "A json array of objects. Each object the txid (string) vout (numeric) [ (json array of json objects) { \"txid\":\"id\", (string) The transaction id \"vout\": n (numeric) The output number } ,... ]" + } + }, + "required": [ + "unlock" + ] + }, + "result": { + "type": "boolean", + "description": "Whether the command was successful or not" + } + }, + "move": { + "summary": "DEPRECATED. Move a specified amount from one account in your wallet to another.", + "description": [ + "", + "", + "Move 0.01 LBC from the default account to the account named tabby", + "> lbrycrd-cli move \"\" \"tabby\" 0.01", + "", + "Move 0.01 LBC timotei to akiko with a comment and funds have 6 confirmations", + "> lbrycrd-cli move \"timotei\" \"akiko\" 0.01 6 \"happy birthday!\"", + "", + "As a json rpc call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"move\", \"params\": [\"timotei\", \"akiko\", 0.01, 6, \"happy birthday!\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "fromaccount": { + "type": "string", + "description": "The name of the account to move funds from. May be the default account using \"\"." + }, + "toaccount": { + "type": "string", + "description": "The name of the account to move funds to. May be the default account using \"\"." + }, + "amount": { + "type": "number", + "description": "Quantity of LBC to move between accounts." + }, + "minconf": { + "type": "number", + "description": "Only use funds with at least this many confirmations.", + "default": 1 + }, + "comment": { + "type": "string", + "description": "An optional comment, stored in the wallet only." + } + }, + "required": [ + "fromaccount", + "toaccount", + "amount" + ] + }, + "result": { + "type": "boolean", + "description": "true if successful." + } + }, + "removeprunedfunds": { + "summary": "Deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will effect wallet balances.", + "description": [ + "", + "> lbrycrd-cli removeprunedfunds \"a8d0c0184dde994a09ec054286f1ce581bebf46446a512166eae7628734ea0a5\"", + "", + "As a JSON-RPC call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"removprunedfunds\", \"params\": [\"a8d0c0184dde994a09ec054286f1ce581bebf46446a512166eae7628734ea0a5\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "txid": { + "type": "string", + "description": "The hex-encoded id of the transaction you are deleting" + } + }, + "required": [ + "txid" + ] + } + }, + "sendfrom": { + "summary": "DEPRECATED (use sendtoaddress). Sent an amount from an account to a lbrycrd address.", + "description": [ + "", + "", + "Send 0.01 LBC from the default account to the address, must have at least 1 confirmation", + "> lbrycrd-cli sendfrom \"\" \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01", + "", + "Send 0.01 from the tabby account to the given address, funds must have at least 6 confirmations", + "> lbrycrd-cli sendfrom \"tabby\" \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01 6 \"donation\" \"seans outpost\"", + "", + "As a json rpc call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"sendfrom\", \"params\": [\"tabby\", \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\", 0.01, 6, \"donation\", \"seans outpost\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "fromaccount": { + "type": "string", + "description": "The name of the account to send funds from. May be the default account using \"\"." + }, + "tolbrycrdaddress": { + "type": "string", + "description": "The lbrycrd address to send funds to." + }, + "amount": { + "type": "number", + "description": "The amount in LBC (transaction fee is added on top)." + }, + "minconf": { + "type": "number", + "description": "Only use funds with at least this many confirmations.", + "default": 1 + }, + "comment": { + "type": "string", + "description": "A comment used to store what the transaction is for. This is not part of the transaction, just kept in your wallet." + }, + "comment-to": { + "type": "string", + "description": "An optional comment to store the name of the person or organization to which you're sending the transaction. This is not part of the transaction, it is just kept in your wallet." + } + }, + "required": [ + "fromaccount", + "tolbrycrdaddress", + "amount" + ] + }, + "result": { + "type": "string", + "description": "The transaction id." + } + }, + "sendmany": { + "summary": "Send multiple times. Amounts are double-precision floating point numbers.", + "description": [ + "", + "", + "Send two amounts to two different addresses:", + "> lbrycrd-cli sendmany \"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\"", + "", + "Send two amounts to two different addresses setting the confirmation and comment:", + "> lbrycrd-cli sendmany \"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 6 \"testing\"", + "", + "Send two amounts to two different addresses, subtract fee from amount:", + "> lbrycrd-cli sendmany \"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 1 \"\" \"[\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\",\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\"]\"", + "", + "As a json rpc call", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"sendmany\", \"params\": [\"\", \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\", 6, \"testing\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "fromaccount": { + "type": "string", + "description": "DEPRECATED. The account to send the funds from. Should be \"\" for the default account" + }, + "amounts": { + "type": "string", + "description": "A json object with addresses and amounts { \"address\":amount (numeric or string) The lbrycrd address is the key, the numeric amount (can be string) in LBC is the value ,... }" + }, + "minconf": { + "type": "number", + "description": "Only use the balance confirmed at least this many times.", + "default": 1 + }, + "comment": { + "type": "string", + "description": "A comment" + }, + "subtractfeefromamount": { + "type": "string", + "description": "A json array with addresses. The fee will be equally deducted from the amount of each selected address. Those recipients will receive less LBC than you enter in their corresponding amount field. If no addresses are specified here, the sender pays the fee. [ \"address\" (string) Subtract fee from this address ,... ]" + } + }, + "required": [ + "fromaccount", + "amounts" + ] + }, + "result": { + "type": "string", + "description": "The transaction id for the send. Only 1 transaction is created regardless of the number of addresses." + } + }, + "sendtoaddress": { + "summary": "Send an amount to a given address.", + "description": [ + "", + "> lbrycrd-cli sendtoaddress \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1", + "> lbrycrd-cli sendtoaddress \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1 \"donation\" \"seans outpost\"", + "> lbrycrd-cli sendtoaddress \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1 \"\" \"\" true", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"sendtoaddress\", \"params\": [\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\", 0.1, \"donation\", \"seans outpost\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "lbrycrdaddress": { + "type": "string", + "description": "The lbrycrd address to send to." + }, + "amount": { + "type": "number", + "description": "The amount in LBC to send. eg 0.1" + }, + "comment": { + "type": "string", + "description": "A comment used to store what the transaction is for. This is not part of the transaction, just kept in your wallet." + }, + "comment-to": { + "type": "string", + "description": "A comment to store the name of the person or organization to which you're sending the transaction. This is not part of the transaction, just kept in your wallet." + }, + "subtractfeefromamount": { + "type": "boolean", + "description": "The fee will be deducted from the amount being sent. The recipient will receive less LBC than you enter in the amount field.", + "default": false + } + }, + "required": [ + "lbrycrdaddress", + "amount" + ] + }, + "result": { + "type": "string", + "description": "The transaction id." + } + }, + "setaccount": { + "summary": "DEPRECATED. Sets the account associated with the given address.", + "description": [ + "", + "> lbrycrd-cli setaccount \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"tabby\"", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"setaccount\", \"params\": [\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", \"tabby\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "lbrycrdaddress": { + "type": "string", + "description": "The lbrycrd address to be associated with an account." + }, + "account": { + "type": "string", + "description": "The account to assign the address to." + } + }, + "required": [ + "lbrycrdaddress", + "account" + ] + } + }, + "settxfee": { + "summary": "Set the transaction fee per kB. Overwrites the paytxfee parameter.", + "description": [ + "", + "> lbrycrd-cli settxfee 0.00001", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"settxfee\", \"params\": [0.00001] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "amount": { + "type": "number", + "description": "The transaction fee in LBC/kB Result true|false (boolean) Returns true if successful" + } + }, + "required": [ + "amount" + ] + } + }, + "signmessage": { + "summary": "Sign a message with the private key of an address", + "description": [ + "", + "", + "Unlock the wallet for 30 seconds", + "> lbrycrd-cli walletpassphrase \"mypassphrase\" 30", + "", + "Create the signature", + "> lbrycrd-cli signmessage \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"my message\"", + "", + "Verify the signature", + "> lbrycrd-cli verifymessage \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"signature\" \"my message\"", + "", + "As json rpc", + "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"signmessage\", \"params\": [\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", \"my message\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "" + ], + "tags": [ + "Wallet" + ], + "params": { + "type": "object", + "properties": { + "lbrycrdaddress": { + "type": "string", + "description": "The lbrycrd address to use for the private key." + }, + "message": { + "type": "string", + "description": "The message to create a signature of." + } + }, + "required": [ + "lbrycrdaddress", + "message" + ] + }, + "result": { + "type": "string", + "description": "The signature of the message encoded in base 64" + } + } + } +} diff --git a/contrib/devtools/generated/api_v1.json b/contrib/devtools/generated/api_v1.json new file mode 100644 index 000000000..d7ad79b2b --- /dev/null +++ b/contrib/devtools/generated/api_v1.json @@ -0,0 +1,1853 @@ +[ + { + "name": "abandonclaim", + "namespace": "Claimtrie", + "description": "Create a transaction which spends a txout which assigned a value to a name, effectively abandoning that claim.", + "arguments": [ + { + "name": "txid", + "type": "string", + "description": "The transaction containing the unspent txout which should be spent.", + "is_required": true + }, + { + "name": "lbrycrdaddress", + "type": "string", + "description": "The lbrycrd address to send to.", + "is_required": true + }, + { + "name": "amount", + "type": "number", + "description": "The amount to send to the lbrycrd address. eg 0.1", + "is_required": true + } + ], + "returns": "\"transactionid\" (string) The new transaction id." + }, + { + "name": "abandonsupport", + "namespace": "Claimtrie", + "description": "Create a transaction which spends a txout which supported a name claim, effectively abandoning that support.", + "arguments": [ + { + "name": "txid", + "type": "string", + "description": "The transaction containing the unspent txout which should be spent.", + "is_required": true + }, + { + "name": "lbrycrdaddress", + "type": "string", + "description": "The lbrycrd address to send to.", + "is_required": true + }, + { + "name": "amount", + "type": "number", + "description": "The amount to send to the lbrycrd address. eg 0.1", + "is_required": true + } + ], + "returns": "\"transactionid\" (string) The new transaction id." + }, + { + "name": "claimname", + "namespace": "Claimtrie", + "description": "Create a transaction which issues a claim assigning a value to a name. The claim will be authoritative if the transaction amount is greater than the transaction amount of all other unspent transactions which issue a claim over the same name, and it will remain authoritative as long as it remains unspent and there are no other greater unspent transactions issuing a claim over the same name. The amount is a real and is rounded to the nearest 0.00000001", + "arguments": [ + { + "name": "name", + "type": "string", + "description": "The name to be assigned the value.", + "is_required": true + }, + { + "name": "value", + "type": "string", + "description": "The value to assign to the name encoded in hexadecimal.", + "is_required": true + }, + { + "name": "amount", + "type": "number", + "description": "The amount in LBRYcrd to send. eg 0.1", + "is_required": true + } + ], + "returns": "\"transactionid\" (string) The transaction id." + }, + { + "name": "getclaimbyid", + "namespace": "Claimtrie", + "description": "Get a claim by claim id", + "arguments": [ + { + "name": "claimId", + "type": "string", + "description": "the claimId of this claim", + "is_required": true + } + ], + "returns": "{\n \"name\" (string) the name of the claim\n \"value\" (string) claim metadata\n \"claimId\" (string) the claimId of this claim\n \"txid\" (string) the hash of the transaction which has successfully claimed this name\n \"n\" (numeric) vout value\n \"amount\" (numeric) txout value\n \"effective amount\" (numeric) txout amount plus amount from all supports associated with the claim\n \"height\" (numeric) the height of the block in which this claim transaction is located\n \"supports\" (array of object) supports for this claim\n \"valid at height\" (numeric) the height at which the claim is valid\n [\n \"txid\" (string) the txid of the support\n \"n\" (numeric) the index of the support in the transaction's list of outputs\n \"height\" (numeric) the height at which the support was included in the blockchain\n \"valid at height\" (numeric) the height at which the support is valid\n \"amount\" (numeric) the amount of the support\n ]\n}" + }, + { + "name": "getclaimsforname", + "namespace": "Claimtrie", + "description": "Return all claims and supports for a name", + "arguments": [ + { + "name": "name", + "type": "string", + "description": "the name for which to get claims and supports", + "is_required": true + } + ], + "returns": "{\n \"nLastTakeoverheight\" (numeric) the last height at which ownership of the name changed\n \"claims\": [ (array of object) claims for this name\n {\n \"claimId\" (string) the claimId of this claim\n \"txid\" (string) the txid of this claim\n \"n\" (numeric) the index of the claim in the transaction's list of outputs\n \"nHeight\" (numeric) the height at which the claim was included in the blockchain\n \"nValidAtHeight\" (numeric) the height at which the claim became/becomes valid\n \"nAmount\" (numeric) the amount of the claim\n \"nEffectiveAmount\" (numeric) the total effective amount of the claim, taking into effect whether the claim or support has reached its nValidAtHeight\n \"supports\" : [ (array of object) supports for this claim\n \"txid\" (string) the txid of the support\n \"n\" (numeric) the index of the support in the transaction's list of outputs\n \"nHeight\" (numeric) the height at which the support was included in the blockchain\n \"nValidAtHeight\" (numeric) the height at which the support became/becomes valid\n \"nAmount\" (numeric) the amount of the support\n ]\n }\n ],\n \"unmatched supports\": [ (array of object) supports that did not match a claim for this name\n {\n \"txid\" (string) the txid of the support\n \"n\" (numeric) the index of the support in the transaction's list of outputs\n \"nHeight\" (numeric) the height at which the support was included in the blockchain\n \"nValidAtHeight\" (numeric) the height at which the support became/becomes valid\n \"nAmount\" (numeric) the amount of the support\n }\n ]\n}" + }, + { + "name": "getclaimsfortx", + "namespace": "Claimtrie", + "description": "Return any claims or supports found in a transaction", + "arguments": [ + { + "name": "txid", + "type": "string", + "description": "the txid of the transaction to check for unspent claims", + "is_required": true + } + ], + "returns": "[\n {\n \"nOut\" (numeric) the index of the claim or support in the transaction's list out outputs\n \"claim type\" (string) 'claim' or 'support'\n \"name\" (string) the name claimed or supported\n \"value\" (string) if a name claim, the value of the claim\n \"supported txid\" (string) if a support, the txid of the supported claim\n \"supported nout\" (numeric) if a support, the index of the supported claim in its transaction\n \"depth\" (numeric) the depth of the transaction in the main chain\n \"in claim trie\" (boolean) if a name claim, whether the claim is active, i.e. has made it into the trie\n \"is controlling\" (boolean) if a name claim, whether the claim is the current controlling claim for the name\n \"in support map\" (boolean) if a support, whether the support is active, i.e. has made it into the support map\n \"in queue\" (boolean) whether the claim is in a queue waiting to be inserted into the trie or support map\n \"blocks to valid\" (numeric) if in a queue, the number of blocks until it's inserted into the trie or support map\n }\n]" + }, + { + "name": "getclaimsintrie", + "namespace": "Claimtrie", + "description": "Return all claims in the name trie.", + "arguments": [ + { + "name": "minconf", + "type": "number", + "description": "the number of required confirmations", + "is_required": false + } + ], + "returns": "[\n {\n \"name\" (string) the name claimed\n \"claims\": [ (array of object) the claims for this name\n {\n \"claimId\" (string) the claimId of the claim\n \"txid\" (string) the txid of the claim\n \"n\" (numeric) the vout value of the claim\n \"amount\" (numeric) txout amount\n \"height\" (numeric) the height of the block in which this transaction is located\n \"value\" (string) the value of this claim\n }\n ]\n }\n]" + }, + { + "name": "getclaimtrie", + "namespace": "Claimtrie", + "description": "Return the entire name trie.", + "arguments": [ + { + "name": "minconf", + "type": "number", + "description": "the number of required confirmations", + "is_required": false + } + ], + "returns": "{\n \"name\" (string) the name of the node\n \"hash\" (string) the hash of the node\n \"txid\" (string) (if value exists) the hash of the transaction which has successfully claimed this name\n \"n\" (numeric) (if value exists) vout value\n \"value\" (numeric) (if value exists) txout value\n \"height\" (numeric) (if value exists) the height of the block in which this transaction is located\n}" + }, + { + "name": "getnameproof", + "namespace": "Claimtrie", + "description": "Return the cryptographic proof that a name maps to a value or doesn't.", + "arguments": [ + { + "name": "name", + "type": "string", + "description": "the name to get a proof for", + "is_required": true + }, + { + "name": "blockhash", + "type": "string", + "description": "the hash of the block which is the basis of the proof. If none is given, the latest block will be used.", + "is_required": false + } + ], + "returns": "{\n \"nodes\" : [ (array of object) full nodes (i.e.\n those which lead to\n the requested name)\n \"children\" : [ (array of object) the children of\n this node\n \"child\" : { (object) a child node, either leaf or\n reference to a full node\n \"character\" : \"char\" (string) the character which\n leads from the parent\n to this child node\n \"nodeHash\" : \"hash\" (string, if exists) the hash of\n the node if\n this is a \n leaf node\n }\n ]\n \"valueHash\" (string, if exists) the hash of this\n node's value, if\n it has one. If \n this is the\n requested name\n this will not\n exist whether\n the node has a\n value or not\n ]\n \"txhash\" : \"hash\" (string, if exists) the txid of the\n claim which controls\n this name, if there\n is one.\n \"nOut\" : n, (numeric) the nOut of the claim which\n controls this name, if there\n is one.\n \"last takeover height\" (numeric) the most recent height at\n which the value of a name\n changed other than through\n an update to the winning\n bid\n }\n}" + }, + { + "name": "gettotalclaimednames", + "namespace": "Claimtrie", + "description": "Return the total number of names that have been successfully claimed, and therefore exist in the trie", + "arguments": [], + "returns": "\"total names\" (numeric) the total number of\n names in the trie" + }, + { + "name": "gettotalclaims", + "namespace": "Claimtrie", + "description": "Return the total number of active claims in the trie", + "arguments": [], + "returns": "\"total claims\" (numeric) the total number\n of active claims" + }, + { + "name": "gettotalvalueofclaims", + "namespace": "Claimtrie", + "description": "Return the total value of the claims in the trie", + "arguments": [ + { + "name": "controlling_only", + "type": "boolean", + "description": "only include the value of controlling claims", + "is_required": true + } + ], + "returns": "\"total value\" (numeric) the total value of the\n claims in the trie" + }, + { + "name": "getvalueforname", + "namespace": "Claimtrie", + "description": "Return the value associated with a name, if one exists", + "arguments": [ + { + "name": "name", + "type": "string", + "description": "the name to look up", + "is_required": true + }, + { + "name": "minconf", + "type": "number", + "description": "the number of required confirmations", + "is_required": false + } + ], + "returns": "\"value\" (string) the value of the name, if it exists\n\"claimId\" (string) the claimId for this name claim\n\"txid\" (string) the hash of the transaction which successfully claimed the name\n\"n\" (numeric) vout value\n\"amount\" (numeric) txout amount\n\"effective amount\" (numeric) txout amount plus amount from all supports associated with the claim\n\"height\" (numeric) the height of the block in which this transaction is located" + }, + { + "name": "listnameclaims", + "namespace": "Claimtrie", + "description": "Return a list of all transactions claiming names.", + "arguments": [ + { + "name": "includesupports", + "type": "boolean", + "description": "Whether to also include claim supports. Default is true.", + "is_required": false + }, + { + "name": "activeonly", + "type": "boolean", + "description": "Whether to only include transactions which are still active, i.e. have not been spent. Default is false.", + "is_required": false + }, + { + "name": "minconf", + "type": "number", + "description": "Only include transactions confirmed at least this many time.", + "is_required": false + } + ], + "returns": "[\n {\n \"name\":\"claimedname\", (string) The name that is claimed.\n \"claimtype\":\"claimtype\", (string) CLAIM or SUPPORT.\n \"claimId\":\"claimId\", (string) The claimId of the claim.\n \"value\":\"value\" (string) The value assigned to the name, if claimtype is CLAIM.\n \"account\":\"accountname\", (string) The account name associated with the transaction. \n It will be \"\" for the default account.\n \"address\":\"lbrycrdaddress\", (string) The lbrycrd address of the transaction.\n \"category\":\"name\" (string) Always name\n \"amount\": x.xxx, (numeric) The amount in LBC.\n \"vout\": n, (numeric) The vout value\n \"fee\": x.xxx, (numeric) The amount of the fee in LBC.\n \"height\": n (numeric) The height of the block in which this transaction was included.\n \"confirmations\": n, (numeric) The number of confirmations for the transaction\n \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction.\n \"blockindex\": n, (numeric) The block index containing the transaction.\n \"txid\": \"transactionid\", (string) The transaction id.\n \"time\": xxx, (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).\n \"timereceived\": xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT).\n \"comment\": \"...\", (string) If a comment is associated with the transaction.\n }\n]" + }, + { + "name": "supportclaim", + "namespace": "Claimtrie", + "description": "Increase the value of a claim. Whichever claim has the greatest value, including all support values, will be the authoritative claim, according to the rest of the rules. The name is the name which is claimed by the claim that will be supported, the txid is the txid of the claim that will be supported, nout is the transaction output which contains the claim to be supported, and amount is the amount which will be added to the value of the claim. If the claim is currently the authoritative claim, this support will go into effect immediately. Otherwise, it will go into effect after 100 blocks. The support will be in effect until it is spent, and will lose its effect when the claim is spent or expires. The amount is a real and is rounded to the nearest .00000001", + "arguments": [ + { + "name": "name", + "type": "string", + "description": "The name claimed by the claim to support.", + "is_required": true + }, + { + "name": "claimid", + "type": "string", + "description": "The claimid of the claim to support. This can be obtained by TODO PUT IN PLACE THAT SHOWS THIS.", + "is_required": true + }, + { + "name": "amount", + "type": "number", + "description": "The amount in LBC to use to support the claim.", + "is_required": true + } + ], + "returns": "\"transactionid\" (string) The transaction id of the support." + }, + { + "name": "updateclaim", + "namespace": "Claimtrie", + "description": "Create a transaction which issues a claim assigning a value to a name, spending the previous txout which issued a claim over the same name and therefore superseding that claim. The claim will be authoritative if the transaction amount is greater than the transaction amount of all other unspent transactions which issue a claim over the same name, and it will remain authoritative as long as it remains unspent and there are no greater unspent transactions issuing a claim over the same name.", + "arguments": [ + { + "name": "txid", + "type": "string", + "description": "The transaction containing the unspent txout which should be spent.", + "is_required": true + }, + { + "name": "value", + "type": "string", + "description": "The value to assign to the name encoded in hexadecimal.", + "is_required": true + }, + { + "name": "amount", + "type": "number", + "description": "The amount in LBRYcrd to use to bid for the name. eg 0.1", + "is_required": true + } + ], + "returns": "\"transactionid\" (string) The new transaction id." + }, + { + "name": "getbestblockhash", + "namespace": "Blockchain", + "description": "Returns the hash of the best (tip) block in the longest block chain. Result \"hex\" (string) the block hash hex encoded\nExamples:\n> lbrycrd-cli getbestblockhash \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getbestblockhash\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [] + }, + { + "name": "getblock", + "namespace": "Blockchain", + "description": "If verbose is false, returns a string that is serialized, hex-encoded data for block 'hash'. If verbose is true, returns an Object with information about block .\nExamples:\n> lbrycrd-cli getblock \"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getblock\", \"params\": [\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "hash", + "type": "string", + "description": "The block hash", + "is_required": true + }, + { + "name": "verbose", + "type": "boolean", + "description": "true for a json object, false for the hex encoded data", + "is_required": false + } + ], + "returns": "{\n \"hash\" : \"hash\", (string) the block hash (same as provided)\n \"confirmations\" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain\n \"size\" : n, (numeric) The block size\n \"height\" : n, (numeric) The block height or index\n \"version\" : n, (numeric) The block version\n \"versionHex\" : \"00000000\", (string) The block version formatted in hexadecimal\n \"merkleroot\" : \"xxxx\", (string) The merkle root\n \"nameclaimroot\" : \"xxxx\", (string) The hash of the root of the name claim trie\n \"tx\" : [ (array of string) The transaction ids\n \"transactionid\" (string) The transaction id\n ,...\n ],\n \"time\" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n \"mediantime\" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)\n \"nonce\" : n, (numeric) The nonce\n \"bits\" : \"1d00ffff\", (string) The bits\n \"difficulty\" : x.xxx, (numeric) The difficulty\n \"chainwork\" : \"xxxx\", (string) Expected number of hashes required to produce the chain up to this block (in hex)\n \"previousblockhash\" : \"hash\", (string) The hash of the previous block\n \"nextblockhash\" : \"hash\" (string) The hash of the next block\n}\n\nResult (for verbose=false):\n\"data\" (string) A string that is serialized, hex-encoded data for block 'hash'." + }, + { + "name": "getblockchaininfo", + "namespace": "Blockchain", + "description": "Returns an object containing various state info regarding block chain processing.\nExamples:\n> lbrycrd-cli getblockchaininfo \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getblockchaininfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "{\n \"chain\": \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest)\n \"blocks\": xxxxxx, (numeric) the current number of blocks processed in the server\n \"headers\": xxxxxx, (numeric) the current number of headers we have validated\n \"bestblockhash\": \"...\", (string) the hash of the currently best block\n \"difficulty\": xxxxxx, (numeric) the current difficulty\n \"mediantime\": xxxxxx, (numeric) median time for the current best block\n \"verificationprogress\": xxxx, (numeric) estimate of verification progress [0..1]\n \"chainwork\": \"xxxx\" (string) total amount of work in active chain, in hexadecimal\n \"pruned\": xx, (boolean) if the blocks are subject to pruning\n \"pruneheight\": xxxxxx, (numeric) heighest block available\n \"softforks\": [ (array) status of softforks in progress\n {\n \"id\": \"xxxx\", (string) name of softfork\n \"version\": xx, (numeric) block version\n \"enforce\": { (object) progress toward enforcing the softfork rules for new-version blocks\n \"status\": xx, (boolean) true if threshold reached\n \"found\": xx, (numeric) number of blocks with the new version found\n \"required\": xx, (numeric) number of blocks required to trigger\n \"window\": xx, (numeric) maximum size of examined window of recent blocks\n },\n \"reject\": { ... } (object) progress toward rejecting pre-softfork blocks (same fields as \"enforce\")\n }, ...\n ],\n \"bip9_softforks\": { (object) status of BIP9 softforks in progress\n \"xxxx\" : { (string) name of the softfork\n \"status\": \"xxxx\", (string) one of \"defined\", \"started\", \"lockedin\", \"active\", \"failed\"\n \"bit\": xx, (numeric) the bit, 0-28, in the block version field used to signal this soft fork\n \"startTime\": xx, (numeric) the minimum median time past of a block at which the bit gains its meaning\n \"timeout\": xx (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in\n }\n }\n}" + }, + { + "name": "getblockcount", + "namespace": "Blockchain", + "description": "Returns the number of blocks in the longest block chain.\nExamples:\n> lbrycrd-cli getblockcount \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getblockcount\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "n (numeric) The current block count" + }, + { + "name": "getblockhash", + "namespace": "Blockchain", + "description": "Returns hash of block in best-block-chain at index provided.\nExamples:\n> lbrycrd-cli getblockhash 1000\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getblockhash\", \"params\": [1000] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "index", + "type": "number", + "description": "The block index", + "is_required": true + } + ], + "returns": "\"hash\" (string) The block hash" + }, + { + "name": "getblockheader", + "namespace": "Blockchain", + "description": "If verbose is false, returns a string that is serialized, hex-encoded data for blockheader 'hash'. If verbose is true, returns an Object with information about blockheader .\nExamples:\n> lbrycrd-cli getblockheader \"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getblockheader\", \"params\": [\"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "hash", + "type": "string", + "description": "The block hash", + "is_required": true + }, + { + "name": "verbose", + "type": "boolean", + "description": "true for a json object, false for the hex encoded data", + "is_required": false + } + ], + "returns": "{\n \"hash\" : \"hash\", (string) the block hash (same as provided)\n \"confirmations\" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain\n \"height\" : n, (numeric) The block height or index\n \"version\" : n, (numeric) The block version\n \"versionHex\" : \"00000000\", (string) The block version formatted in hexadecimal\n \"merkleroot\" : \"xxxx\", (string) The merkle root\n \"time\" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n \"mediantime\" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)\n \"nonce\" : n, (numeric) The nonce\n \"bits\" : \"1d00ffff\", (string) The bits\n \"difficulty\" : x.xxx, (numeric) The difficulty\n \"previousblockhash\" : \"hash\", (string) The hash of the previous block\n \"nextblockhash\" : \"hash\", (string) The hash of the next block\n \"chainwork\" : \"0000...1f3\" (string) Expected number of hashes required to produce the current chain (in hex)\n}\n\nResult (for verbose=false):\n\"data\" (string) A string that is serialized, hex-encoded data for block 'hash'." + }, + { + "name": "getchaintips", + "namespace": "Blockchain", + "description": "Return information about all known tips in the block tree, including the main chain as well as orphaned branches.\nExamples:\n> lbrycrd-cli getchaintips \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getchaintips\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "[\n {\n \"height\": xxxx, (numeric) height of the chain tip\n \"hash\": \"xxxx\", (string) block hash of the tip\n \"branchlen\": 0 (numeric) zero for main chain\n \"status\": \"active\" (string) \"active\" for the main chain\n },\n {\n \"height\": xxxx,\n \"hash\": \"xxxx\",\n \"branchlen\": 1 (numeric) length of branch connecting the tip to the main chain\n \"status\": \"xxxx\" (string) status of the chain (active, valid-fork, valid-headers, headers-only, invalid)\n }\n]\nPossible values for status:\n1. \"invalid\" This branch contains at least one invalid block\n2. \"headers-only\" Not all blocks for this branch are available, but the headers are valid\n3. \"valid-headers\" All blocks are available for this branch, but they were never fully validated\n4. \"valid-fork\" This branch is not part of the active chain, but is fully validated\n5. \"active\" This is the tip of the active main chain, which is certainly valid" + }, + { + "name": "getdifficulty", + "namespace": "Blockchain", + "description": "Returns the proof-of-work difficulty as a multiple of the minimum difficulty.\nExamples:\n> lbrycrd-cli getdifficulty \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getdifficulty\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "n.nnn (numeric) the proof-of-work difficulty as a multiple of the minimum difficulty." + }, + { + "name": "getmempoolinfo", + "namespace": "Blockchain", + "description": "Returns details on the active state of the TX memory pool.\nExamples:\n> lbrycrd-cli getmempoolinfo \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getmempoolinfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "{\n \"size\": xxxxx, (numeric) Current tx count\n \"bytes\": xxxxx, (numeric) Sum of all tx sizes\n \"usage\": xxxxx, (numeric) Total memory usage for the mempool\n \"maxmempool\": xxxxx, (numeric) Maximum memory usage for the mempool\n \"mempoolminfee\": xxxxx (numeric) Minimum fee for tx to be accepted\n}" + }, + { + "name": "getrawmempool", + "namespace": "Blockchain", + "description": "Returns all transaction ids in memory pool as a json array of string transaction ids.\nExamples:\n> lbrycrd-cli getrawmempool true\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getrawmempool\", \"params\": [true] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "verbose", + "type": "boolean", + "description": "true for a json object, false for array of transaction ids", + "is_required": false + } + ], + "returns": "[ (json array of string)\n \"transactionid\" (string) The transaction id\n ,...\n]\n\nResult: (for verbose = true):\n{ (json object)\n \"transactionid\" : { (json object)\n \"size\" : n, (numeric) transaction size in bytes\n \"fee\" : n, (numeric) transaction fee in LBC\n \"modifiedfee\" : n, (numeric) transaction fee with fee deltas used for mining priority\n \"time\" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT\n \"height\" : n, (numeric) block height when transaction entered pool\n \"startingpriority\" : n, (numeric) priority when transaction entered pool\n \"currentpriority\" : n, (numeric) transaction priority now\n \"descendantcount\" : n, (numeric) number of in-mempool descendant transactions (including this one)\n \"descendantsize\" : n, (numeric) size of in-mempool descendants (including this one)\n \"descendantfees\" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one)\n \"depends\" : [ (array) unconfirmed transactions used as inputs for this transaction\n \"transactionid\", (string) parent transaction id\n ... ]\n }, ...\n}" + }, + { + "name": "gettxout", + "namespace": "Blockchain", + "description": "Returns details about an unspent transaction output.\nExamples:\nGet unspent transactions\n> lbrycrd-cli listunspent \n\nView the details\n> lbrycrd-cli gettxout \"txid\" 1\n\nAs a json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"gettxout\", \"params\": [\"txid\", 1] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "txid", + "type": "string", + "description": "The transaction id", + "is_required": true + }, + { + "name": "n", + "type": "number", + "description": "vout number", + "is_required": true + }, + { + "name": "includemempool", + "type": "boolean", + "description": "Whether to include the mem pool", + "is_required": false + } + ], + "returns": "{\n \"bestblock\" : \"hash\", (string) the block hash\n \"confirmations\" : n, (numeric) The number of confirmations\n \"value\" : x.xxx, (numeric) The transaction value in LBC\n \"scriptPubKey\" : { (json object)\n \"asm\" : \"code\", (string) \n \"hex\" : \"hex\", (string) \n \"reqSigs\" : n, (numeric) Number of required signatures\n \"type\" : \"pubkeyhash\", (string) The type, eg pubkeyhash\n \"addresses\" : [ (array of string) array of lbrycrd addresses\n \"lbrycrdaddress\" (string) lbrycrd address\n ,...\n ]\n },\n \"version\" : n, (numeric) The version\n \"coinbase\" : true|false (boolean) Coinbase or not\n}" + }, + { + "name": "gettxoutproof", + "namespace": "Blockchain", + "description": "Returns a hex-encoded proof that \"txid\" was included in a block. NOTE: By default this function only works sometimes. This is when there is an unspent output in the utxo for this transaction. To make it always work, you need to maintain a transaction index, using the -txindex command line option or specify the block in which the transaction is included in manually (by blockhash). Return the raw transaction data.", + "arguments": [ + { + "name": "txids", + "type": "string", + "description": "A json array of txids to filter [ \"txid\" (string) A transaction hash ,... ]", + "is_required": true + }, + { + "name": "block hash", + "type": "string", + "description": "If specified, looks for txid in the block with this hash", + "is_required": false + } + ], + "returns": "\"data\" (string) A string that is a serialized, hex-encoded data for the proof." + }, + { + "name": "gettxoutsetinfo", + "namespace": "Blockchain", + "description": "Returns statistics about the unspent transaction output set. Note this call may take some time.\nExamples:\n> lbrycrd-cli gettxoutsetinfo \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"gettxoutsetinfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "{\n \"height\":n, (numeric) The current block height (index)\n \"bestblock\": \"hex\", (string) the best block hash hex\n \"transactions\": n, (numeric) The number of transactions\n \"txouts\": n, (numeric) The number of output transactions\n \"bytes_serialized\": n, (numeric) The serialized size\n \"hash_serialized\": \"hash\", (string) The serialized hash\n \"total_amount\": x.xxx (numeric) The total amount\n}" + }, + { + "name": "verifychain", + "namespace": "Blockchain", + "description": "Verifies blockchain database.\nExamples:\n> lbrycrd-cli verifychain \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"verifychain\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "checklevel", + "type": "number", + "description": "How thorough the block verification is.", + "is_required": false + }, + { + "name": "numblocks", + "type": "number", + "description": "The number of blocks to check.", + "is_required": false + } + ], + "returns": "true|false (boolean) Verified or not" + }, + { + "name": "verifytxoutproof", + "namespace": "Blockchain", + "description": "Verifies that a proof points to a transaction in a block, returning the transaction it commits to and throwing an RPC error if the block is not in our best chain", + "arguments": [ + { + "name": "proof", + "type": "string", + "description": "The hex-encoded proof generated by gettxoutproof", + "is_required": true + } + ], + "returns": "[\"txid\"] (array, strings) The txid(s) which the proof commits to, or empty array if the proof is invalid" + }, + { + "name": "getinfo", + "namespace": "Control", + "description": "Returns an object containing various state info.\nExamples:\n> lbrycrd-cli getinfo \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getinfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "{\n \"version\": xxxxx, (numeric) the server version\n \"protocolversion\": xxxxx, (numeric) the protocol version\n \"walletversion\": xxxxx, (numeric) the wallet version\n \"balance\": xxxxxxx, (numeric) the total lbrycrd balance of the wallet\n \"blocks\": xxxxxx, (numeric) the current number of blocks processed in the server\n \"timeoffset\": xxxxx, (numeric) the time offset\n \"connections\": xxxxx, (numeric) the number of connections\n \"proxy\": \"host:port\", (string, optional) the proxy used by the server\n \"difficulty\": xxxxxx, (numeric) the current difficulty\n \"testnet\": true|false, (boolean) if the server is using testnet or not\n \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n \"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n \"paytxfee\": x.xxxx, (numeric) the transaction fee set in LBC/kB\n \"relayfee\": x.xxxx, (numeric) minimum relay fee for non-free transactions in LBC/kB\n \"errors\": \"...\" (string) any error messages\n}" + }, + { + "name": "help", + "namespace": "Control", + "description": "List all commands, or get help for a specified command.", + "arguments": [ + { + "name": "command", + "type": "string", + "description": "The command to get help on", + "is_required": false + } + ], + "returns": "\"text\" (string) The help text" + }, + { + "name": "stop", + "namespace": "Control", + "description": "Stop LBRYcrd server.", + "arguments": [] + }, + { + "name": "generate", + "namespace": "Generating", + "description": "Mine up to numblocks blocks immediately (before the RPC call returns)\nExamples:\nGenerate 11 blocks\n> lbrycrd-cli generate 11", + "arguments": [ + { + "name": "numblocks", + "type": "number", + "description": "How many blocks are generated immediately.", + "is_required": true + }, + { + "name": "maxtries", + "type": "number", + "description": "How many iterations to try (default = 1000000). Result [ blockhashes ] (array) hashes of blocks generated", + "is_required": false + } + ] + }, + { + "name": "generatetoaddress", + "namespace": "Generating", + "description": "Mine blocks immediately to a specified address (before the RPC call returns)\nExamples:\nGenerate 11 blocks to myaddress\n> lbrycrd-cli generatetoaddress 11 \"myaddress\"", + "arguments": [ + { + "name": "numblocks", + "type": "number", + "description": "How many blocks are generated immediately.", + "is_required": true + }, + { + "name": "address", + "type": "string", + "description": "The address to send the newly generated bitcoin to.", + "is_required": true + }, + { + "name": "maxtries", + "type": "number", + "description": "How many iterations to try (default = 1000000). Result [ blockhashes ] (array) hashes of blocks generated", + "is_required": false + } + ] + }, + { + "name": "getblocktemplate", + "namespace": "Mining", + "description": "If the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'. It returns data needed to construct a block to work on. See https://en.bitcoin.it/wiki/BIP_0022 for full specification.\nExamples:\n> lbrycrd-cli getblocktemplate \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getblocktemplate\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "jsonrequestobject", + "type": "string", + "description": "A json object in the following spec { \"mode\":\"template\" (string, optional) This must be set to \"template\" or omitted \"capabilities\":[ (array, optional) A list of strings \"support\" (string) client side supported feature, 'longpoll', 'coinbasetxn', 'coinbasevalue', 'proposal', 'serverlist', 'workid' ,... ] }", + "is_required": false + } + ], + "returns": "{\n \"version\" : n, (numeric) The block version\n \"previousblockhash\" : \"xxxx\", (string) The hash of current highest block\n \"transactions\" : [ (array) contents of non-coinbase transactions that should be included in the next block\n {\n \"data\" : \"xxxx\", (string) transaction data encoded in hexadecimal (byte-for-byte)\n \"hash\" : \"xxxx\", (string) hash/id encoded in little-endian hexadecimal\n \"depends\" : [ (array) array of numbers \n n (numeric) transactions before this one (by 1-based index in 'transactions' list) that must be present in the final block if this one is\n ,...\n ],\n \"fee\": n, (numeric) difference in value between transaction inputs and outputs (in Satoshis); for coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn't one\n \"sigops\" : n, (numeric) total number of SigOps, as counted for purposes of block limits; if key is not present, sigop count is unknown and clients MUST NOT assume there aren't any\n \"required\" : true|false (boolean) if provided and true, this transaction must be in the final block\n }\n ,...\n ],\n \"coinbaseaux\" : { (json object) data that should be included in the coinbase's scriptSig content\n \"flags\" : \"flags\" (string) \n },\n \"coinbasevalue\" : n, (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in Satoshis)\n \"coinbasetxn\" : { ... }, (json object) information for coinbase transaction\n \"target\" : \"xxxx\", (string) The hash target\n \"mintime\" : xxx, (numeric) The minimum timestamp appropriate for next block time in seconds since epoch (Jan 1 1970 GMT)\n \"mutable\" : [ (array of string) list of ways the block template may be changed \n \"value\" (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock'\n ,...\n ],\n \"noncerange\" : \"00000000ffffffff\", (string) A range of valid nonces\n \"sigoplimit\" : n, (numeric) limit of sigops in blocks\n \"sizelimit\" : n, (numeric) limit of block size\n \"curtime\" : ttt, (numeric) current timestamp in seconds since epoch (Jan 1 1970 GMT)\n \"bits\" : \"xxx\", (string) compressed target of next block\n \"height\" : n (numeric) The height of the next block\n}" + }, + { + "name": "getgenerate", + "namespace": "Mining", + "description": "Return if the server is set to generate coins or not. The default is false. It is set with the command line argument -gen (or lbrycrd.conf setting gen) It can also be set with the setgenerate call. Result true|false (boolean) If the server is set to generate coins or not\nExamples:\n> lbrycrd-cli getgenerate \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getgenerate\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [] + }, + { + "name": "gethashespersec", + "namespace": "Mining", + "description": "Returns a recent hashes per second performance measurement while generating. See the getgenerate and setgenerate calls to turn generation on and off.\nExamples:\n> lbrycrd-cli gethashespersec \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"gethashespersec\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "n (numeric) The recent hashes per second when generation is on (will return 0 if generation is off)" + }, + { + "name": "getmininginfo", + "namespace": "Mining", + "description": "Returns a json object containing mining-related information.\nExamples:\n> lbrycrd-cli getmininginfo \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getmininginfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "{\n \"blocks\": nnn, (numeric) The current block\n \"currentblocksize\": nnn, (numeric) The last block size\n \"currentblocktx\": nnn, (numeric) The last block transaction\n \"difficulty\": xxx.xxxxx (numeric) The current difficulty\n \"errors\": \"...\" (string) Current errors\n \"generate\": true|false (boolean) If the generation is on or off (see getgenerate or setgenerate calls)\n \"genproclimit\": n (numeric) The processor limit for generation. -1 if no generation. (see getgenerate or setgenerate calls)\n \"hashespersec\": n (numeric) The hashes per second of the generation, or 0 if no generation.\n \"pooledtx\": n (numeric) The size of the mem pool\n \"testnet\": true|false (boolean) If using testnet or not\n \"chain\": \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest)\n}" + }, + { + "name": "getnetworkhashps", + "namespace": "Mining", + "description": "Returns the estimated network hashes per second based on the last n blocks. Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change. Pass in [height] to estimate the network speed at the time when a certain block was found.\nExamples:\n> lbrycrd-cli getnetworkhashps \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getnetworkhashps\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "blocks", + "type": "number", + "description": "The number of blocks, or -1 for blocks since last difficulty change.", + "is_required": false + }, + { + "name": "height", + "type": "number", + "description": "To estimate at the time of the given height.", + "is_required": false + } + ], + "returns": "x (numeric) Hashes per second estimated" + }, + { + "name": "prioritisetransaction", + "namespace": "Mining", + "description": "Accepts the transaction into mined blocks at a higher (or lower) priority\nExamples:\n> lbrycrd-cli prioritisetransaction \"txid\" 0.0 10000\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"prioritisetransaction\", \"params\": [\"txid\", 0.0, 10000] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "txid", + "type": "string", + "description": "The transaction id.", + "is_required": true + }, + { + "name": "priority delta", + "type": "number", + "description": "The priority to add or subtract. The transaction selection algorithm considers the tx as it would have a higher priority. (priority of a transaction is calculated: coinage * value_in_satoshis / txsize)", + "is_required": true + }, + { + "name": "fee delta", + "type": "number", + "description": "The fee value (in satoshis) to add (or subtract, if negative). The fee is not actually paid, only the algorithm for selecting transactions into a block considers the transaction as it would have paid a higher (or lower) fee. Result true (boolean) Returns true", + "is_required": true + } + ] + }, + { + "name": "setgenerate", + "namespace": "Mining", + "description": "Set 'generate' true or false to turn generation on or off. Generation is limited to 'genproclimit' processors, -1 is unlimited. See the getgenerate call for the current setting.\nExamples:\nSet the generation on with a limit of one processor\n> lbrycrd-cli setgenerate true 1\n\nCheck the setting\n> lbrycrd-cli getgenerate \n\nTurn off generation\n> lbrycrd-cli setgenerate false\n\nUsing json rpc\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"setgenerate\", \"params\": [true, 1] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "generate", + "type": "boolean", + "description": "Set to true to turn on generation, off to turn off.", + "is_required": true + }, + { + "name": "genproclimit", + "type": "number", + "description": "Set the processor limit for when generation is on. Can be -1 for unlimited.", + "is_required": false + } + ] + }, + { + "name": "submitblock", + "namespace": "Mining", + "description": "Attempts to submit new block to network. The 'jsonparametersobject' parameter is currently ignored. See https://en.bitcoin.it/wiki/BIP_0022 for full specification.\nExamples:\n> lbrycrd-cli submitblock \"mydata\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"submitblock\", \"params\": [\"mydata\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "hexdata", + "type": "string", + "description": "the hex-encoded block data to submit", + "is_required": true + }, + { + "name": "jsonparametersobject", + "type": "string", + "description": "object of optional parameters { \"workid\" : \"id\" (string, optional) if the server provided a workid, it MUST be included with submissions }", + "is_required": false + } + ], + "returns": "" + }, + { + "name": "addnode", + "namespace": "Network", + "description": "Attempts add or remove a node from the addnode list. Or try a connection to a node once.\nExamples:\n> lbrycrd-cli addnode \"192.168.0.6:8333\" \"onetry\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"addnode\", \"params\": [\"192.168.0.6:8333\", \"onetry\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "node", + "type": "string", + "description": "The node (see getpeerinfo for nodes)", + "is_required": true + }, + { + "name": "command", + "type": "string", + "description": "'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once", + "is_required": true + } + ] + }, + { + "name": "clearbanned", + "namespace": "Network", + "description": "Clear all banned IPs.\nExamples:\n> lbrycrd-cli clearbanned \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"clearbanned\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [] + }, + { + "name": "disconnectnode", + "namespace": "Network", + "description": "Immediately disconnects from the specified node.\nExamples:\n> lbrycrd-cli disconnectnode \"192.168.0.6:8333\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"disconnectnode\", \"params\": [\"192.168.0.6:8333\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "node", + "type": "string", + "description": "The node (see getpeerinfo for nodes)", + "is_required": true + } + ] + }, + { + "name": "getaddednodeinfo", + "namespace": "Network", + "description": "Returns information about the given added node, or all added nodes (note that onetry addnodes are not listed here) If dns is false, only a list of added nodes will be provided, otherwise connected information will also be available.\nExamples:\n> lbrycrd-cli getaddednodeinfo true\n> lbrycrd-cli getaddednodeinfo true \"192.168.0.201\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getaddednodeinfo\", \"params\": [true, \"192.168.0.201\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "dns", + "type": "boolean", + "description": "If false, only a list of added nodes will be provided, otherwise connected information will also be available.", + "is_required": true + }, + { + "name": "node", + "type": "string", + "description": "If provided, return information about this specific node, otherwise all nodes are returned.", + "is_required": false + } + ], + "returns": "[\n {\n \"addednode\" : \"192.168.0.201\", (string) The node ip address\n \"connected\" : true|false, (boolean) If connected\n \"addresses\" : [\n {\n \"address\" : \"192.168.0.201:8333\", (string) The lbrycrd server host and port\n \"connected\" : \"outbound\" (string) connection, inbound or outbound\n }\n ,...\n ]\n }\n ,...\n]" + }, + { + "name": "getconnectioncount", + "namespace": "Network", + "description": "Returns the number of connections to other nodes.\nExamples:\n> lbrycrd-cli getconnectioncount \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getconnectioncount\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "n (numeric) The connection count" + }, + { + "name": "getnettotals", + "namespace": "Network", + "description": "Returns information about network traffic, including bytes in, bytes out, and current time.\nExamples:\n> lbrycrd-cli getnettotals \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getnettotals\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "{\n \"totalbytesrecv\": n, (numeric) Total bytes received\n \"totalbytessent\": n, (numeric) Total bytes sent\n \"timemillis\": t, (numeric) Total cpu time\n \"uploadtarget\":\n {\n \"timeframe\": n, (numeric) Length of the measuring timeframe in seconds\n \"target\": n, (numeric) Target in bytes\n \"target_reached\": true|false, (boolean) True if target is reached\n \"serve_historical_blocks\": true|false, (boolean) True if serving historical blocks\n \"bytes_left_in_cycle\": t, (numeric) Bytes left in current time cycle\n \"time_left_in_cycle\": t (numeric) Seconds left in current time cycle\n }\n}" + }, + { + "name": "getnetworkinfo", + "namespace": "Network", + "description": "Returns an object containing various state info regarding P2P networking.\nExamples:\n> lbrycrd-cli getnetworkinfo \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getnetworkinfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "{\n \"version\": xxxxx, (numeric) the server version\n \"subversion\": \"/Satoshi:x.x.x/\", (string) the server subversion string\n \"protocolversion\": xxxxx, (numeric) the protocol version\n \"localservices\": \"xxxxxxxxxxxxxxxx\", (string) the services we offer to the network\n \"timeoffset\": xxxxx, (numeric) the time offset\n \"connections\": xxxxx, (numeric) the number of connections\n \"networks\": [ (array) information per network\n {\n \"name\": \"xxx\", (string) network (ipv4, ipv6 or onion)\n \"limited\": true|false, (boolean) is the network limited using -onlynet?\n \"reachable\": true|false, (boolean) is the network reachable?\n \"proxy\": \"host:port\" (string) the proxy that is used for this network, or empty if none\n }\n ,...\n ],\n \"relayfee\": x.xxxxxxxx, (numeric) minimum relay fee for non-free transactions in LBC/kB\n \"localaddresses\": [ (array) list of local addresses\n {\n \"address\": \"xxxx\", (string) network address\n \"port\": xxx, (numeric) network port\n \"score\": xxx (numeric) relative score\n }\n ,...\n ]\n \"warnings\": \"...\" (string) any network warnings (such as alert messages) \n}" + }, + { + "name": "getpeerinfo", + "namespace": "Network", + "description": "Returns data about each connected network node as a json array of objects.\nExamples:\n> lbrycrd-cli getpeerinfo \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getpeerinfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "[\n {\n \"id\": n, (numeric) Peer index\n \"addr\":\"host:port\", (string) The ip address and port of the peer\n \"addrlocal\":\"ip:port\", (string) local address\n \"services\":\"xxxxxxxxxxxxxxxx\", (string) The services offered\n \"relaytxes\":true|false, (boolean) Whether peer has asked us to relay transactions to it\n \"lastsend\": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last send\n \"lastrecv\": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last receive\n \"bytessent\": n, (numeric) The total bytes sent\n \"bytesrecv\": n, (numeric) The total bytes received\n \"conntime\": ttt, (numeric) The connection time in seconds since epoch (Jan 1 1970 GMT)\n \"timeoffset\": ttt, (numeric) The time offset in seconds\n \"pingtime\": n, (numeric) ping time (if available)\n \"minping\": n, (numeric) minimum observed ping time (if any at all)\n \"pingwait\": n, (numeric) ping wait (if non-zero)\n \"version\": v, (numeric) The peer version, such as 7001\n \"subver\": \"/Satoshi:0.8.5/\", (string) The string version\n \"inbound\": true|false, (boolean) Inbound (true) or Outbound (false)\n \"startingheight\": n, (numeric) The starting height (block) of the peer\n \"banscore\": n, (numeric) The ban score\n \"synced_headers\": n, (numeric) The last header we have in common with this peer\n \"synced_blocks\": n, (numeric) The last block we have in common with this peer\n \"inflight\": [\n n, (numeric) The heights of blocks we're currently asking from this peer\n ...\n ]\n \"bytessent_per_msg\": {\n \"addr\": n, (numeric) The total bytes sent aggregated by message type\n ...\n }\n \"bytesrecv_per_msg\": {\n \"addr\": n, (numeric) The total bytes received aggregated by message type\n ...\n }\n }\n ,...\n]" + }, + { + "name": "listbanned", + "namespace": "Network", + "description": "List all banned IPs/Subnets.\nExamples:\n> lbrycrd-cli listbanned \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listbanned\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [] + }, + { + "name": "ping", + "namespace": "Network", + "description": "Requests that a ping be sent to all other nodes, to measure ping time. Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds. Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.\nExamples:\n> lbrycrd-cli ping \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"ping\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [] + }, + { + "name": "setban", + "namespace": "Network", + "description": "Attempts add or remove a IP/Subnet from the banned list.\nExamples:\n> lbrycrd-cli setban \"192.168.0.6\" \"add\" 86400\n> lbrycrd-cli setban \"192.168.0.0/24\" \"add\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"setban\", \"params\": [\"192.168.0.6\", \"add\" 86400] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "ip(/netmask)", + "type": "string", + "description": "The IP/Subnet (see getpeerinfo for nodes ip) with a optional netmask (default is /32 = single ip)", + "is_required": true + }, + { + "name": "command", + "type": "string", + "description": "'add' to add a IP/Subnet to the list, 'remove' to remove a IP/Subnet from the list", + "is_required": true + }, + { + "name": "bantime", + "type": "number", + "description": "time in seconds how long (or until when if [absolute] is set) the ip is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)", + "is_required": false + }, + { + "name": "absolute", + "type": "boolean", + "description": "If set, the bantime must be a absolute timestamp in seconds since epoch (Jan 1 1970 GMT)", + "is_required": false + } + ] + }, + { + "name": "createrawtransaction", + "namespace": "Rawtransactions", + "description": "Create a transaction spending the given inputs and creating new outputs. Outputs can be addresses or data. Returns hex-encoded raw transaction. Note that the transaction's inputs are not signed, and it is not stored in the wallet or transmitted to the network.\nExamples:\n> lbrycrd-cli createrawtransaction \"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\" \"{\\\"address\\\":0.01}\"\n> lbrycrd-cli createrawtransaction \"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\" \"{\\\"data\\\":\\\"00010203\\\"}\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"createrawtransaction\", \"params\": [\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\", \"{\\\"address\\\":0.01}\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"createrawtransaction\", \"params\": [\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\", \"{\\\"data\\\":\\\"00010203\\\"}\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "transactions", + "type": "string", + "description": "A json array of json objects [ { \"txid\":\"id\", (string, required) The transaction id \"vout\":n (numeric, required) The output number } ,... ]", + "is_required": true + }, + { + "name": "outputs", + "type": "string", + "description": "a json object with outputs { \"address\": x.xxx (numeric or string, required) The key is the lbrycrd address, the numeric value (can be string) is the LBC amount \"data\": \"hex\", (string, required) The key is \"data\", the value is hex encoded data ... }", + "is_required": true + }, + { + "name": "locktime", + "type": "number", + "description": "Raw locktime. Non-0 value also locktime-activates inputs", + "is_required": false + } + ], + "returns": "\"transaction\" (string) hex string of the transaction" + }, + { + "name": "decoderawtransaction", + "namespace": "Rawtransactions", + "description": "Return a JSON object representing the serialized, hex-encoded transaction.\nExamples:\n> lbrycrd-cli decoderawtransaction \"hexstring\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"decoderawtransaction\", \"params\": [\"hexstring\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "hex", + "type": "string", + "description": "The transaction hex string", + "is_required": true + } + ], + "returns": "{\n \"txid\" : \"id\", (string) The transaction id\n \"size\" : n, (numeric) The transaction size\n \"version\" : n, (numeric) The version\n \"locktime\" : ttt, (numeric) The lock time\n \"vin\" : [ (array of json objects)\n {\n \"txid\": \"id\", (string) The transaction id\n \"vout\": n, (numeric) The output number\n \"scriptSig\": { (json object) The script\n \"asm\": \"asm\", (string) asm\n \"hex\": \"hex\" (string) hex\n },\n \"sequence\": n (numeric) The script sequence number\n }\n ,...\n ],\n \"vout\" : [ (array of json objects)\n {\n \"value\" : x.xxx, (numeric) The value in LBC\n \"n\" : n, (numeric) index\n \"scriptPubKey\" : { (json object)\n \"asm\" : \"asm\", (string) the asm\n \"hex\" : \"hex\", (string) the hex\n \"reqSigs\" : n, (numeric) The required sigs\n \"type\" : \"pubkeyhash\", (string) The type, eg 'pubkeyhash'\n \"addresses\" : [ (json array of string)\n \"12tvKAXCxZjSmdNbao16dKXC8tRWfcF5oc\" (string) lbrycrd address\n ,...\n ]\n }\n }\n ,...\n ],\n}" + }, + { + "name": "decodescript", + "namespace": "Rawtransactions", + "description": "Decode a hex-encoded script.\nExamples:\n> lbrycrd-cli decodescript \"hexstring\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"decodescript\", \"params\": [\"hexstring\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "hex", + "type": "string", + "description": "the hex encoded script", + "is_required": true + } + ], + "returns": "{\n \"asm\":\"asm\", (string) Script public key\n \"hex\":\"hex\", (string) hex encoded public key\n \"type\":\"type\", (string) The output type\n \"reqSigs\": n, (numeric) The required signatures\n \"addresses\": [ (json array of string)\n \"address\" (string) lbrycrd address\n ,...\n ],\n \"p2sh\",\"address\" (string) script address\n}" + }, + { + "name": "fundrawtransaction", + "namespace": "Rawtransactions", + "description": "Add inputs to a transaction until it has enough in value to meet its out value. This will not modify existing inputs, and will add one change output to the outputs. Note that inputs which were signed may need to be resigned after completion since in/outputs have been added. The inputs added will not be signed, use signrawtransaction for that. Note that all existing inputs must have their previous output transaction be in the wallet. Note that all inputs selected must be of standard form and P2SH scripts must be in the wallet using importaddress or addmultisigaddress (to calculate fees). Only pay-to-pubkey, multisig, and P2SH versions thereof are currently supported for watch-only\nExamples:\nCreate a transaction with no inputs\n> lbrycrd-cli createrawtransaction \"[]\" \"{\\\"myaddress\\\":0.01}\"\n\nAdd sufficient unsigned inputs to meet the output value\n> lbrycrd-cli fundrawtransaction \"rawtransactionhex\"\n\nSign the transaction\n> lbrycrd-cli signrawtransaction \"fundedtransactionhex\"\n\nSend the transaction\n> lbrycrd-cli sendrawtransaction \"signedtransactionhex\"", + "arguments": [ + { + "name": "hexstring", + "type": "string", + "description": "The hex string of the raw transaction", + "is_required": true + }, + { + "name": "options", + "type": "object", + "description": "{ \"changeAddress\" (string, optional, default pool address) The bitcoin address to receive the change \"changePosition\" (numeric, optional, default random) The index of the change output \"includeWatching\" (boolean, optional, default false) Also select inputs which are watch only \"lockUnspents\" (boolean, optional, default false) Lock selected unspent outputs } for backward compatibility: passing in a true instead of an object will result in {\"includeWatching\":true}", + "is_required": false + } + ], + "returns": "{\n \"hex\": \"value\", (string) The resulting raw transaction (hex-encoded string)\n \"fee\": n, (numeric) Fee the resulting transaction pays\n \"changepos\": n (numeric) The position of the added change output, or -1\n}\n\"hex\"" + }, + { + "name": "getrawtransaction", + "namespace": "Rawtransactions", + "description": "NOTE: By default this function only works sometimes. This is when the tx is in the mempool or there is an unspent output in the utxo for this transaction. To make it always work, you need to maintain a transaction index, using the -txindex command line option. Return the raw transaction data. If verbose=0, returns a string that is serialized, hex-encoded data for 'txid'. If verbose is non-zero, returns an Object with information about 'txid'.\nExamples:\n> lbrycrd-cli getrawtransaction \"mytxid\"\n> lbrycrd-cli getrawtransaction \"mytxid\" 1\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getrawtransaction\", \"params\": [\"mytxid\", 1] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "txid", + "type": "string", + "description": "The transaction id", + "is_required": true + }, + { + "name": "verbose", + "type": "number", + "description": "If 0, return a string, other return a json object", + "is_required": false + } + ], + "returns": "\"data\" (string) The serialized, hex-encoded data for 'txid'\n\nResult (if verbose > 0):\n{\n \"hex\" : \"data\", (string) The serialized, hex-encoded data for 'txid'\n \"txid\" : \"id\", (string) The transaction id (same as provided)\n \"size\" : n, (numeric) The transaction size\n \"version\" : n, (numeric) The version\n \"locktime\" : ttt, (numeric) The lock time\n \"vin\" : [ (array of json objects)\n {\n \"txid\": \"id\", (string) The transaction id\n \"vout\": n, (numeric) \n \"scriptSig\": { (json object) The script\n \"asm\": \"asm\", (string) asm\n \"hex\": \"hex\" (string) hex\n },\n \"sequence\": n (numeric) The script sequence number\n }\n ,...\n ],\n \"vout\" : [ (array of json objects)\n {\n \"value\" : x.xxx, (numeric) The value in LBC\n \"n\" : n, (numeric) index\n \"scriptPubKey\" : { (json object)\n \"asm\" : \"asm\", (string) the asm\n \"hex\" : \"hex\", (string) the hex\n \"reqSigs\" : n, (numeric) The required sigs\n \"type\" : \"pubkeyhash\", (string) The type, eg 'pubkeyhash'\n \"addresses\" : [ (json array of string)\n \"lbrycrdaddress\" (string) lbrycrd address\n ,...\n ]\n }\n }\n ,...\n ],\n \"blockhash\" : \"hash\", (string) the block hash\n \"confirmations\" : n, (numeric) The confirmations\n \"time\" : ttt, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT)\n \"blocktime\" : ttt (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n}" + }, + { + "name": "sendrawtransaction", + "namespace": "Rawtransactions", + "description": "Submits raw transaction (serialized, hex-encoded) to local node and network. Also see createrawtransaction and signrawtransaction calls.\nExamples:\nCreate a transaction\n> lbrycrd-cli createrawtransaction \"[{\\\"txid\\\" : \\\"mytxid\\\",\\\"vout\\\":0}]\" \"{\\\"myaddress\\\":0.01}\"\nSign the transaction, and get back the hex\n> lbrycrd-cli signrawtransaction \"myhex\"\n\nSend the transaction (signed hex)\n> lbrycrd-cli sendrawtransaction \"signedhex\"\n\nAs a json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"sendrawtransaction\", \"params\": [\"signedhex\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "hexstring", + "type": "string", + "description": "The hex string of the raw transaction)", + "is_required": true + }, + { + "name": "allowhighfees", + "type": "boolean", + "description": "Allow high fees", + "is_required": false + } + ], + "returns": "\"hex\" (string) The transaction hash in hex" + }, + { + "name": "signrawtransaction", + "namespace": "Rawtransactions", + "description": "Sign inputs for raw transaction (serialized, hex-encoded). The second optional argument (may be null) is an array of previous transaction outputs that this transaction depends on but may not yet be in the block chain. The third optional argument (may be null) is an array of base58-encoded private keys that, if given, will be the only keys used to sign the transaction.\nExamples:\n> lbrycrd-cli signrawtransaction \"myhex\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"signrawtransaction\", \"params\": [\"myhex\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "hexstring", + "type": "string", + "description": "The transaction hex string", + "is_required": true + }, + { + "name": "prevtxs", + "type": "string", + "description": "An json array of previous dependent transaction outputs [ (json array of json objects, or 'null' if none provided) { \"txid\":\"id\", (string, required) The transaction id \"vout\":n, (numeric, required) The output number \"scriptPubKey\": \"hex\", (string, required) script key \"redeemScript\": \"hex\" (string, required for P2SH) redeem script } ,... ]", + "is_required": false + }, + { + "name": "privatekeys", + "type": "string", + "description": "A json array of base58-encoded private keys for signing [ (json array of strings, or 'null' if none provided) \"privatekey\" (string) private key in base58-encoding ,... ]", + "is_required": false + }, + { + "name": "sighashtype", + "type": "string", + "description": "The signature hash type. Must be one of \"ALL\" \"NONE\" \"SINGLE\" \"ALL|ANYONECANPAY\" \"NONE|ANYONECANPAY\" \"SINGLE|ANYONECANPAY\"", + "is_required": false + } + ], + "returns": "{\n \"hex\" : \"value\", (string) The hex-encoded raw transaction with signature(s)\n \"complete\" : true|false, (boolean) If the transaction has a complete set of signatures\n \"errors\" : [ (json array of objects) Script verification errors (if there are any)\n {\n \"txid\" : \"hash\", (string) The hash of the referenced, previous transaction\n \"vout\" : n, (numeric) The index of the output to spent and used as input\n \"scriptSig\" : \"hex\", (string) The hex-encoded signature script\n \"sequence\" : n, (numeric) Script sequence number\n \"error\" : \"text\" (string) Verification or signing error related to the input\n }\n ,...\n ]\n}" + }, + { + "name": "createmultisig", + "namespace": "Util", + "description": "Creates a multi-signature address with n signature of m keys required. It returns a json object with the address and redeemScript.\nExamples:\nCreate a multisig address from 2 addresses\n> lbrycrd-cli createmultisig 2 \"[\\\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"\n\nAs a json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"createmultisig\", \"params\": [2, \"[\\\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "nrequired", + "type": "number", + "description": "The number of required signatures out of the n keys or addresses.", + "is_required": true + }, + { + "name": "keys", + "type": "string", + "description": "A json array of keys which are lbrycrd addresses or hex-encoded public keys [ \"key\" (string) lbrycrd address or hex-encoded public key ,... ]", + "is_required": true + } + ], + "returns": "{\n \"address\":\"multisigaddress\", (string) The value of the new multisig address.\n \"redeemScript\":\"script\" (string) The string value of the hex-encoded redemption script.\n}" + }, + { + "name": "estimatefee", + "namespace": "Util", + "description": "Estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within nblocks blocks.\nExamples:\n> lbrycrd-cli estimatefee 6", + "arguments": [ + { + "name": "nblocks", + "type": "number", + "description": [], + "is_required": true + } + ], + "returns": "n (numeric) estimated fee-per-kilobyte\n\nA negative value is returned if not enough transactions and blocks\nhave been observed to make an estimate." + }, + { + "name": "estimatepriority", + "namespace": "Util", + "description": "Estimates the approximate priority a zero-fee transaction needs to begin confirmation within nblocks blocks.\nExamples:\n> lbrycrd-cli estimatepriority 6", + "arguments": [ + { + "name": "nblocks", + "type": "number", + "description": [], + "is_required": true + } + ], + "returns": "n (numeric) estimated priority\n\nA negative value is returned if not enough transactions and blocks\nhave been observed to make an estimate." + }, + { + "name": "estimatesmartfee", + "namespace": "Util", + "description": "WARNING: This interface is unstable and may disappear or change! Estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within nblocks blocks if possible and return the number of blocks for which the estimate is valid.\nExamples:\n> lbrycrd-cli estimatesmartfee 6", + "arguments": [ + { + "name": "nblocks", + "type": "number", + "description": [], + "is_required": true + } + ], + "returns": "{\n \"feerate\" : x.x, (numeric) estimate fee-per-kilobyte (in BTC)\n \"blocks\" : n (numeric) block number where estimate was found\n}\n\nA negative value is returned if not enough transactions and blocks\nhave been observed to make an estimate for any number of blocks.\nHowever it will not return a value below the mempool reject fee." + }, + { + "name": "estimatesmartpriority", + "namespace": "Util", + "description": "WARNING: This interface is unstable and may disappear or change! Estimates the approximate priority a zero-fee transaction needs to begin confirmation within nblocks blocks if possible and return the number of blocks for which the estimate is valid.\nExamples:\n> lbrycrd-cli estimatesmartpriority 6", + "arguments": [ + { + "name": "nblocks", + "type": "number", + "description": [], + "is_required": true + } + ], + "returns": "{\n \"priority\" : x.x, (numeric) estimated priority\n \"blocks\" : n (numeric) block number where estimate was found\n}\n\nA negative value is returned if not enough transactions and blocks\nhave been observed to make an estimate for any number of blocks.\nHowever if the mempool reject fee is set it will return 1e9 * MAX_MONEY." + }, + { + "name": "validateaddress", + "namespace": "Util", + "description": "Return information about the given lbrycrd address.\nExamples:\n> lbrycrd-cli validateaddress \"1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"validateaddress\", \"params\": [\"1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "lbrycrdaddress", + "type": "string", + "description": "The lbrycrd address to validate", + "is_required": true + } + ], + "returns": "{\n \"isvalid\" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.\n \"address\" : \"lbrycrdaddress\", (string) The lbrycrd address validated\n \"scriptPubKey\" : \"hex\", (string) The hex encoded scriptPubKey generated by the address\n \"ismine\" : true|false, (boolean) If the address is yours or not\n \"iswatchonly\" : true|false, (boolean) If the address is watchonly\n \"isscript\" : true|false, (boolean) If the key is a script\n \"pubkey\" : \"publickeyhex\", (string) The hex value of the raw public key\n \"iscompressed\" : true|false, (boolean) If the address is compressed\n \"account\" : \"account\" (string) DEPRECATED. The account associated with the address, \"\" is the default account\n}" + }, + { + "name": "verifymessage", + "namespace": "Util", + "description": "Verify a signed message\nExamples:\nUnlock the wallet for 30 seconds\n> lbrycrd-cli walletpassphrase \"mypassphrase\" 30\n\nCreate the signature\n> lbrycrd-cli signmessage \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"my message\"\n\nVerify the signature\n> lbrycrd-cli verifymessage \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"signature\" \"my message\"\n\nAs json rpc\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"verifymessage\", \"params\": [\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", \"signature\", \"my message\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "lbrycrdaddress", + "type": "string", + "description": "The lbrycrd address to use for the signature.", + "is_required": true + }, + { + "name": "signature", + "type": "string", + "description": "The signature provided by the signer in base 64 encoding (see signmessage).", + "is_required": true + }, + { + "name": "message", + "type": "string", + "description": "The message that was signed.", + "is_required": true + } + ], + "returns": "true|false (boolean) If the signature is verified or not." + }, + { + "name": "abandontransaction", + "namespace": "Wallet", + "description": "Mark in-wallet transaction as abandoned This will mark this transaction and all its in-wallet descendants as abandoned which will allow for their inputs to be respent. It can be used to replace \"stuck\" or evicted transactions. It only works on transactions which are not included in a block and are not currently in the mempool. It has no effect on transactions which are already conflicted or abandoned.\nExamples:\n> lbrycrd-cli abandontransaction \"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"abandontransaction\", \"params\": [\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "txid", + "type": "string", + "description": "The transaction id", + "is_required": true + } + ], + "returns": "" + }, + { + "name": "addmultisigaddress", + "namespace": "Wallet", + "description": "Add a nrequired-to-sign multisignature address to the wallet. Each key is a Bitcoin address or hex-encoded public key. If 'account' is specified (DEPRECATED), assign address to that account.\nExamples:\nAdd a multisig address from 2 addresses\n> lbrycrd-cli addmultisigaddress 2 \"[\\\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"\n\nAs json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"addmultisigaddress\", \"params\": [2, \"[\\\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\\\",\\\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\\\"]\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "nrequired", + "type": "number", + "description": "The number of required signatures out of the n keys or addresses.", + "is_required": true + }, + { + "name": "keysobject", + "type": "string", + "description": "A json array of lbrycrd addresses or hex-encoded public keys [ \"address\" (string) lbrycrd address or hex-encoded public key ..., ]", + "is_required": true + }, + { + "name": "account", + "type": "string", + "description": "DEPRECATED. An account to assign the addresses to.", + "is_required": false + } + ], + "returns": "\"lbrycrdaddress\" (string) A lbrycrd address associated with the keys." + }, + { + "name": "backupwallet", + "namespace": "Wallet", + "description": "Safely copies current wallet file to destination, which can be a directory or a path with filename.\nExamples:\n> lbrycrd-cli backupwallet \"backup.dat\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"backupwallet\", \"params\": [\"backup.dat\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "destination", + "type": "string", + "description": "The destination directory or file", + "is_required": true + } + ] + }, + { + "name": "dumpprivkey", + "namespace": "Wallet", + "description": "Reveals the private key corresponding to 'lbrycrdaddress'. Then the importprivkey can be used with this output\nExamples:\n> lbrycrd-cli dumpprivkey \"myaddress\"\n> lbrycrd-cli importprivkey \"mykey\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"dumpprivkey\", \"params\": [\"myaddress\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "lbrycrdaddress", + "type": "string", + "description": "The lbrycrd address for the private key", + "is_required": true + } + ], + "returns": "\"key\" (string) The private key" + }, + { + "name": "dumpwallet", + "namespace": "Wallet", + "description": "Dumps all wallet keys in a human-readable format.\nExamples:\n> lbrycrd-cli dumpwallet \"test\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"dumpwallet\", \"params\": [\"test\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "filename", + "type": "string", + "description": "The filename", + "is_required": true + } + ] + }, + { + "name": "encryptwallet", + "namespace": "Wallet", + "description": "Encrypts the wallet with 'passphrase'. This is for first time encryption. After this, any calls that interact with private keys such as sending or signing will require the passphrase to be set prior the making these calls. Use the walletpassphrase call for this, and then walletlock call. If the wallet is already encrypted, use the walletpassphrasechange call. Note that this will shutdown the server.\nExamples:\nEncrypt you wallet\n> lbrycrd-cli encryptwallet \"my pass phrase\"\n\nNow set the passphrase to use the wallet, such as for signing or sending LBC\n> lbrycrd-cli walletpassphrase \"my pass phrase\"\n\nNow we can so something like sign\n> lbrycrd-cli signmessage \"lbrycrdaddress\" \"test message\"\n\nNow lock the wallet again by removing the passphrase\n> lbrycrd-cli walletlock \n\nAs a json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"encryptwallet\", \"params\": [\"my pass phrase\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "passphrase", + "type": "string", + "description": "The pass phrase to encrypt the wallet with. It must be at least 1 character, but should be long.", + "is_required": true + } + ] + }, + { + "name": "getaccount", + "namespace": "Wallet", + "description": "DEPRECATED. Returns the account associated with the given address.\nExamples:\n> lbrycrd-cli getaccount \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getaccount\", \"params\": [\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "lbrycrdaddress", + "type": "string", + "description": "The lbrycrd address for account lookup.", + "is_required": true + } + ], + "returns": "\"accountname\" (string) the account address" + }, + { + "name": "getaccountaddress", + "namespace": "Wallet", + "description": "DEPRECATED. Returns the current Bitcoin address for receiving payments to this account.\nExamples:\n> lbrycrd-cli getaccountaddress \n> lbrycrd-cli getaccountaddress \"\"\n> lbrycrd-cli getaccountaddress \"myaccount\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getaccountaddress\", \"params\": [\"myaccount\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "account", + "type": "string", + "description": "The account name for the address. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created and a new address created if there is no account by the given name.", + "is_required": true + } + ], + "returns": "\"lbrycrdaddress\" (string) The account lbrycrd address" + }, + { + "name": "getaddressesbyaccount", + "namespace": "Wallet", + "description": "DEPRECATED. Returns the list of addresses for the given account.\nExamples:\n> lbrycrd-cli getaddressesbyaccount \"tabby\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getaddressesbyaccount\", \"params\": [\"tabby\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "account", + "type": "string", + "description": "The account name.", + "is_required": true + } + ], + "returns": "[ (json array of string)\n \"lbrycrdaddress\" (string) a lbrycrd address associated with the given account\n ,...\n]" + }, + { + "name": "getbalance", + "namespace": "Wallet", + "description": "If account is not specified, returns the server's total available balance. If account is specified (DEPRECATED), returns the balance in the account. Note that the account \"\" is not the same as leaving the parameter out. The server total may be different to the balance in the default \"\" account.\nExamples:\nThe total amount in the wallet\n> lbrycrd-cli getbalance \n\nThe total amount in the wallet at least 5 blocks confirmed\n> lbrycrd-cli getbalance \"*\" 6\n\nAs a json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getbalance\", \"params\": [\"*\", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "account", + "type": "string", + "description": "DEPRECATED. The selected account, or \"*\" for entire wallet. It may be the default account using \"\".", + "is_required": false + }, + { + "name": "minconf", + "type": "number", + "description": "Only include transactions confirmed at least this many times.", + "is_required": false + }, + { + "name": "includeWatchonly", + "type": "boolean", + "description": "Also include balance in watchonly addresses (see 'importaddress')", + "is_required": false + } + ], + "returns": "amount (numeric) The total amount in LBC received for this account." + }, + { + "name": "getnewaddress", + "namespace": "Wallet", + "description": "Returns a new Bitcoin address for receiving payments. If 'account' is specified (DEPRECATED), it is added to the address book so payments received with the address will be credited to 'account'.\nExamples:\n> lbrycrd-cli getnewaddress \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getnewaddress\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "account", + "type": "string", + "description": "DEPRECATED. The account name for the address to be linked to. If not provided, the default account \"\" is used. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.", + "is_required": false + } + ], + "returns": "\"lbrycrdaddress\" (string) The new lbrycrd address" + }, + { + "name": "getrawchangeaddress", + "namespace": "Wallet", + "description": "Returns a new Bitcoin address, for receiving change. This is for use with raw transactions, NOT normal use.\nExamples:\n> lbrycrd-cli getrawchangeaddress \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getrawchangeaddress\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "\"address\" (string) The address" + }, + { + "name": "getreceivedbyaccount", + "namespace": "Wallet", + "description": "DEPRECATED. Returns the total amount received by addresses with in transactions with at least [minconf] confirmations.\nExamples:\nAmount received by the default account with at least 1 confirmation\n> lbrycrd-cli getreceivedbyaccount \"\"\n\nAmount received at the tabby account including unconfirmed amounts with zero confirmations\n> lbrycrd-cli getreceivedbyaccount \"tabby\" 0\n\nThe amount with at least 6 confirmation, very safe\n> lbrycrd-cli getreceivedbyaccount \"tabby\" 6\n\nAs a json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getreceivedbyaccount\", \"params\": [\"tabby\", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "account", + "type": "string", + "description": "The selected account, may be the default account using \"\".", + "is_required": true + }, + { + "name": "minconf", + "type": "number", + "description": "Only include transactions confirmed at least this many times.", + "is_required": false + } + ], + "returns": "amount (numeric) The total amount in LBC received for this account." + }, + { + "name": "getreceivedbyaddress", + "namespace": "Wallet", + "description": "Returns the total amount received by the given lbrycrdaddress in transactions with at least minconf confirmations.\nExamples:\nThe amount from transactions with at least 1 confirmation\n> lbrycrd-cli getreceivedbyaddress \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\"\n\nThe amount including unconfirmed transactions, zero confirmations\n> lbrycrd-cli getreceivedbyaddress \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" 0\n\nThe amount with at least 6 confirmation, very safe\n> lbrycrd-cli getreceivedbyaddress \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" 6\n\nAs a json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getreceivedbyaddress\", \"params\": [\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "lbrycrdaddress", + "type": "string", + "description": "The lbrycrd address for transactions.", + "is_required": true + }, + { + "name": "minconf", + "type": "number", + "description": "Only include transactions confirmed at least this many times.", + "is_required": false + } + ], + "returns": "amount (numeric) The total amount in LBC received at this address." + }, + { + "name": "gettransaction", + "namespace": "Wallet", + "description": "Get detailed information about in-wallet transaction \nExamples:\n> lbrycrd-cli gettransaction \"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"\n> lbrycrd-cli gettransaction \"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\" true\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"gettransaction\", \"params\": [\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "txid", + "type": "string", + "description": "The transaction id", + "is_required": true + }, + { + "name": "includeWatchonly", + "type": "boolean", + "description": "Whether to include watchonly addresses in balance calculation and details[]", + "is_required": false + } + ], + "returns": "{\n \"amount\" : x.xxx, (numeric) The transaction amount in LBC\n \"confirmations\" : n, (numeric) The number of confirmations\n \"blockhash\" : \"hash\", (string) The block hash\n \"blockindex\" : xx, (numeric) The index of the transaction in the block that includes it\n \"blocktime\" : ttt, (numeric) The time in seconds since epoch (1 Jan 1970 GMT)\n \"txid\" : \"transactionid\", (string) The transaction id.\n \"time\" : ttt, (numeric) The transaction time in seconds since epoch (1 Jan 1970 GMT)\n \"timereceived\" : ttt, (numeric) The time received in seconds since epoch (1 Jan 1970 GMT)\n \"bip125-replaceable\": \"yes|no|unknown\" (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n may be unknown for unconfirmed transactions not in the mempool\n \"details\" : [\n {\n \"account\" : \"accountname\", (string) DEPRECATED. The account name involved in the transaction, can be \"\" for the default account.\n \"address\" : \"lbrycrdaddress\", (string) The lbrycrd address involved in the transaction\n \"category\" : \"send|receive\", (string) The category, either 'send' or 'receive'\n \"amount\" : x.xxx, (numeric) The amount in LBC\n \"label\" : \"label\", (string) A comment for the address/transaction, if any\n \"vout\" : n, (numeric) the vout value\n }\n ,...\n ],\n \"hex\" : \"data\" (string) Raw data for transaction\n}" + }, + { + "name": "getunconfirmedbalance", + "namespace": "Wallet", + "description": "Returns the server's total unconfirmed balance", + "arguments": [] + }, + { + "name": "getwalletinfo", + "namespace": "Wallet", + "description": "Returns an object containing various wallet state info.\nExamples:\n> lbrycrd-cli getwalletinfo \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getwalletinfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "{\n \"walletversion\": xxxxx, (numeric) the wallet version\n \"balance\": xxxxxxx, (numeric) the total confirmed balance of the wallet in LBC\n \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed balance of the wallet in LBC\n \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet in LBC\n \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n \"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n \"paytxfee\": x.xxxx, (numeric) the transaction fee configuration, set in LBC/kB\n}" + }, + { + "name": "importaddress", + "namespace": "Wallet", + "description": "Adds a script (in hex) or address that can be watched as if it were in your wallet but cannot be used to spend.\nExamples:\nImport a script with rescan\n> lbrycrd-cli importaddress \"myscript\"\n\nImport using a label without rescan\n> lbrycrd-cli importaddress \"myscript\" \"testing\" false\n\nAs a JSON-RPC call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"importaddress\", \"params\": [\"myscript\", \"testing\", false] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "script", + "type": "string", + "description": "The hex-encoded script (or address)", + "is_required": true + }, + { + "name": "label", + "type": "string", + "description": "An optional label", + "is_required": false + }, + { + "name": "rescan", + "type": "boolean", + "description": "Rescan the wallet for transactions", + "is_required": false + }, + { + "name": "p2sh", + "type": "boolean", + "description": "Add the P2SH version of the script as well Note: This call can take minutes to complete if rescan is true. If you have the full public key, you should call importpubkey instead of this.", + "is_required": false + } + ] + }, + { + "name": "importprivkey", + "namespace": "Wallet", + "description": "Adds a private key (as returned by dumpprivkey) to your wallet.\nExamples:\nDump a private key\n> lbrycrd-cli dumpprivkey \"myaddress\"\n\nImport the private key with rescan\n> lbrycrd-cli importprivkey \"mykey\"\n\nImport using a label and without rescan\n> lbrycrd-cli importprivkey \"mykey\" \"testing\" false\n\nAs a JSON-RPC call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"importprivkey\", \"params\": [\"mykey\", \"testing\", false] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "lbrycrdprivkey", + "type": "string", + "description": "The private key (see dumpprivkey)", + "is_required": true + }, + { + "name": "label", + "type": "string", + "description": "An optional label", + "is_required": false + }, + { + "name": "rescan", + "type": "boolean", + "description": "Rescan the wallet for transactions Note: This call can take minutes to complete if rescan is true.", + "is_required": false + } + ] + }, + { + "name": "importprunedfunds", + "namespace": "Wallet", + "description": "Imports funds without rescan. Corresponding address or script must previously be included in wallet. Aimed towards pruned wallets. The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.", + "arguments": [ + { + "name": "rawtransaction", + "type": "string", + "description": "A raw transaction in hex funding an already-existing address in wallet", + "is_required": true + }, + { + "name": "txoutproof", + "type": "string", + "description": "The hex output from gettxoutproof that contains the transaction", + "is_required": true + }, + { + "name": "label", + "type": "string", + "description": "An optional label", + "is_required": false + } + ] + }, + { + "name": "importpubkey", + "namespace": "Wallet", + "description": "Adds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend.\nExamples:\nImport a public key with rescan\n> lbrycrd-cli importpubkey \"mypubkey\"\n\nImport using a label without rescan\n> lbrycrd-cli importpubkey \"mypubkey\" \"testing\" false\n\nAs a JSON-RPC call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"importpubkey\", \"params\": [\"mypubkey\", \"testing\", false] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "pubkey", + "type": "string", + "description": "The hex-encoded public key", + "is_required": true + }, + { + "name": "label", + "type": "string", + "description": "An optional label", + "is_required": false + }, + { + "name": "rescan", + "type": "boolean", + "description": "Rescan the wallet for transactions Note: This call can take minutes to complete if rescan is true.", + "is_required": false + } + ] + }, + { + "name": "importwallet", + "namespace": "Wallet", + "description": "Imports keys from a wallet dump file (see dumpwallet).\nExamples:\nDump the wallet\n> lbrycrd-cli dumpwallet \"test\"\n\nImport the wallet\n> lbrycrd-cli importwallet \"test\"\n\nImport using the json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"importwallet\", \"params\": [\"test\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "filename", + "type": "string", + "description": "The wallet file", + "is_required": true + } + ] + }, + { + "name": "keypoolrefill", + "namespace": "Wallet", + "description": "Fills the keypool.\nExamples:\n> lbrycrd-cli keypoolrefill \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"keypoolrefill\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "newsize", + "type": "number", + "description": "The new keypool size", + "is_required": false + } + ] + }, + { + "name": "listaccounts", + "namespace": "Wallet", + "description": "DEPRECATED. Returns Object that has account names as keys, account balances as values.\nExamples:\nList account balances where there at least 1 confirmation\n> lbrycrd-cli listaccounts \n\nList account balances including zero confirmation transactions\n> lbrycrd-cli listaccounts 0\n\nList account balances for 6 or more confirmations\n> lbrycrd-cli listaccounts 6\n\nAs json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listaccounts\", \"params\": [6] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "minconf", + "type": "number", + "description": "Only include transactions with at least this many confirmations", + "is_required": false + }, + { + "name": "includeWatchonly", + "type": "boolean", + "description": "Include balances in watchonly addresses (see 'importaddress')", + "is_required": false + } + ], + "returns": "{ (json object where keys are account names, and values are numeric balances\n \"account\": x.xxx, (numeric) The property name is the account name, and the value is the total balance for the account.\n ...\n}" + }, + { + "name": "listaddressgroupings", + "namespace": "Wallet", + "description": "Lists groups of addresses which have had their common ownership made public by common use as inputs or as the resulting change in past transactions\nExamples:\n> lbrycrd-cli listaddressgroupings \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listaddressgroupings\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "[\n [\n [\n \"lbrycrdaddress\", (string) The lbrycrd address\n amount, (numeric) The amount in LBC\n \"account\" (string, optional) The account (DEPRECATED)\n ]\n ,...\n ]\n ,...\n]" + }, + { + "name": "listlockunspent", + "namespace": "Wallet", + "description": "Returns list of temporarily unspendable outputs. See the lockunspent call to lock and unlock transactions for spending.\nExamples:\nList the unspent transactions\n> lbrycrd-cli listunspent \n\nLock an unspent transaction\n> lbrycrd-cli lockunspent false \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"\n\nList the locked transactions\n> lbrycrd-cli listlockunspent \n\nUnlock the transaction again\n> lbrycrd-cli lockunspent true \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"\n\nAs a json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listlockunspent\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "[\n {\n \"txid\" : \"transactionid\", (string) The transaction id locked\n \"vout\" : n (numeric) The vout value\n }\n ,...\n]" + }, + { + "name": "listreceivedbyaccount", + "namespace": "Wallet", + "description": "DEPRECATED. List balances by account.\nExamples:\n> lbrycrd-cli listreceivedbyaccount \n> lbrycrd-cli listreceivedbyaccount 6 true\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listreceivedbyaccount\", \"params\": [6, true, true] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "minconf", + "type": "number", + "description": "The minimum number of confirmations before payments are included.", + "is_required": false + }, + { + "name": "includeempty", + "type": "boolean", + "description": "Whether to include accounts that haven't received any payments.", + "is_required": false + }, + { + "name": "includeWatchonly", + "type": "boolean", + "description": "Whether to include watchonly addresses (see 'importaddress').", + "is_required": false + } + ], + "returns": "[\n {\n \"involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n \"account\" : \"accountname\", (string) The account name of the receiving account\n \"amount\" : x.xxx, (numeric) The total amount received by addresses with this account\n \"confirmations\" : n, (numeric) The number of confirmations of the most recent transaction included\n \"label\" : \"label\" (string) A comment for the address/transaction, if any\n }\n ,...\n]" + }, + { + "name": "listreceivedbyaddress", + "namespace": "Wallet", + "description": "List balances by receiving address.\nExamples:\n> lbrycrd-cli listreceivedbyaddress \n> lbrycrd-cli listreceivedbyaddress 6 true\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listreceivedbyaddress\", \"params\": [6, true, true] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "minconf", + "type": "number", + "description": "The minimum number of confirmations before payments are included.", + "is_required": false + }, + { + "name": "includeempty", + "type": "boolean", + "description": "Whether to include addresses that haven't received any payments.", + "is_required": false + }, + { + "name": "includeWatchonly", + "type": "boolean", + "description": "Whether to include watchonly addresses (see 'importaddress').", + "is_required": false + } + ], + "returns": "[\n {\n \"involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n \"address\" : \"receivingaddress\", (string) The receiving address\n \"account\" : \"accountname\", (string) DEPRECATED. The account of the receiving address. The default account is \"\".\n \"amount\" : x.xxx, (numeric) The total amount in LBC received by the address\n \"confirmations\" : n, (numeric) The number of confirmations of the most recent transaction included\n \"label\" : \"label\" (string) A comment for the address/transaction, if any\n }\n ,...\n]" + }, + { + "name": "listsinceblock", + "namespace": "Wallet", + "description": "Get all transactions in blocks since block [blockhash], or all transactions if omitted\nExamples:\n> lbrycrd-cli listsinceblock \n> lbrycrd-cli listsinceblock \"000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad\" 6\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listsinceblock\", \"params\": [\"000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad\", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "blockhash", + "type": "string", + "description": "The block hash to list transactions since", + "is_required": false + }, + { + "name": "target-confirmations:", + "type": "number", + "description": "The confirmations required, must be 1 or more", + "is_required": false + }, + { + "name": "includeWatchonly:", + "type": "boolean", + "description": "Include transactions to watchonly addresses (see 'importaddress')", + "is_required": false + } + ], + "returns": "{\n \"transactions\": [\n \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. Will be \"\" for the default account.\n \"address\":\"lbrycrdaddress\", (string) The lbrycrd address of the transaction. Not present for move transactions (category = move).\n \"category\":\"send|receive\", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.\n \"amount\": x.xxx, (numeric) The amount in LBC. This is negative for the 'send' category, and for the 'move' category for moves \n outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.\n \"vout\" : n, (numeric) the vout value\n \"fee\": x.xxx, (numeric) The amount of the fee in LBC. This is negative and only available for the 'send' category of transactions.\n \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and 'receive' category of transactions.\n \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction. Available for 'send' and 'receive' category of transactions.\n \"blockindex\": n, (numeric) The index of the transaction in the block that includes it. Available for 'send' and 'receive' category of transactions.\n \"blocktime\": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).\n \"txid\": \"transactionid\", (string) The transaction id. Available for 'send' and 'receive' category of transactions.\n \"time\": xxx, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).\n \"timereceived\": xxx, (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.\n \"comment\": \"...\", (string) If a comment is associated with the transaction.\n \"label\" : \"label\" (string) A comment for the address/transaction, if any\n \"to\": \"...\", (string) If a comment to is associated with the transaction.\n ],\n \"lastblock\": \"lastblockhash\" (string) The hash of the last block\n}" + }, + { + "name": "listtransactions", + "namespace": "Wallet", + "description": "Returns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'.\nExamples:\nList the most recent 10 transactions in the systems\n> lbrycrd-cli listtransactions \n\nList transactions 100 to 120\n> lbrycrd-cli listtransactions \"*\" 20 100\n\nAs a json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listtransactions\", \"params\": [\"*\", 20, 100] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "account", + "type": "string", + "description": "DEPRECATED. The account name. Should be \"*\".", + "is_required": false + }, + { + "name": "count", + "type": "number", + "description": "The number of transactions to return", + "is_required": false + }, + { + "name": "from", + "type": "number", + "description": "The number of transactions to skip", + "is_required": false + }, + { + "name": "includeWatchonly", + "type": "boolean", + "description": "Include transactions to watchonly addresses (see 'importaddress')", + "is_required": false + } + ], + "returns": "[\n {\n \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. \n It will be \"\" for the default account.\n \"address\":\"lbrycrdaddress\", (string) The lbrycrd address of the transaction. Not present for \n move transactions (category = move).\n \"category\":\"send|receive|move\", (string) The transaction category. 'move' is a local (off blockchain)\n transaction between accounts, and not associated with an address,\n transaction id or block. 'send' and 'receive' transactions are \n associated with an address, transaction id and block details\n \"amount\": x.xxx, (numeric) The amount in LBC. This is negative for the 'send' category, and for the\n 'move' category for moves outbound. It is positive for the 'receive' category,\n and for the 'move' category for inbound funds.\n \"vout\": n, (numeric) the vout value\n \"fee\": x.xxx, (numeric) The amount of the fee in LBC. This is negative and only available for the \n 'send' category of transactions.\n \"abandoned\": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable).\n \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and \n 'receive' category of transactions. Negative confirmations indicate the\n transaction conflicts with the block chain\n \"trusted\": xxx (bool) Whether we consider the outputs of this unconfirmed transaction safe to spend.\n \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction. Available for 'send' and 'receive'\n category of transactions.\n \"blockindex\": n, (numeric) The index of the transaction in the block that includes it. Available for 'send' and 'receive'\n category of transactions.\n \"blocktime\": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).\n \"txid\": \"transactionid\", (string) The transaction id. Available for 'send' and 'receive' category of transactions.\n \"time\": xxx, (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).\n \"timereceived\": xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available \n for 'send' and 'receive' category of transactions.\n \"comment\": \"...\", (string) If a comment is associated with the transaction.\n \"label\": \"label\" (string) A comment for the address/transaction, if any\n \"otheraccount\": \"accountname\", (string) For the 'move' category of transactions, the account the funds came \n from (for receiving funds, positive amounts), or went to (for sending funds,\n negative amounts).\n \"bip125-replaceable\": \"yes|no|unknown\" (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n may be unknown for unconfirmed transactions not in the mempool\n }\n]" + }, + { + "name": "listunspent", + "namespace": "Wallet", + "description": "Returns array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations. Optionally filter to only include txouts paid to specified addresses.\nExamples:\n> lbrycrd-cli listunspent \n> lbrycrd-cli listunspent 6 9999999 \"[\\\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\\\",\\\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\\\"]\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"listunspent\", \"params\": [6, 9999999 \"[\\\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\\\",\\\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\\\"]\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [], + "returns": "{txid, vout, scriptPubKey, amount, confirmations}\n\nArguments:\n1. minconf (numeric, optional, default=1) The minimum confirmations to filter\n2. maxconf (numeric, optional, default=9999999) The maximum confirmations to filter\n3. \"addresses\" (string) A json array of lbrycrd addresses to filter\n [\n \"address\" (string) lbrycrd address\n ,...\n ]\n\nResult\n[ (array of json object)\n {\n \"txid\" : \"txid\", (string) the transaction id \n \"vout\" : n, (numeric) the vout value\n \"address\" : \"address\", (string) the lbrycrd address\n \"account\" : \"account\", (string) DEPRECATED. The associated account, or \"\" for the default account\n \"scriptPubKey\" : \"key\", (string) the script key\n \"amount\" : x.xxx, (numeric) the transaction amount in LBC\n \"confirmations\" : n (numeric) The number of confirmations\n }\n ,...\n]" + }, + { + "name": "lockunspent", + "namespace": "Wallet", + "description": "Updates list of temporarily unspendable outputs. Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs. If no transaction outputs are specified when unlocking then all current locked transaction outputs are unlocked. A locked transaction output will not be chosen by automatic coin selection, when spending LBC. Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list is always cleared (by virtue of process exit) when a node stops or fails. Also see the listunspent call\nExamples:\nList the unspent transactions\n> lbrycrd-cli listunspent \n\nLock an unspent transaction\n> lbrycrd-cli lockunspent false \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"\n\nList the locked transactions\n> lbrycrd-cli listlockunspent \n\nUnlock the transaction again\n> lbrycrd-cli lockunspent true \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"\n\nAs a json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"lockunspent\", \"params\": [false, \"[{\\\"txid\\\":\\\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\\\",\\\"vout\\\":1}]\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "unlock", + "type": "boolean", + "description": "Whether to unlock (true) or lock (false) the specified transactions", + "is_required": true + }, + { + "name": "transactions", + "type": "string", + "description": "A json array of objects. Each object the txid (string) vout (numeric) [ (json array of json objects) { \"txid\":\"id\", (string) The transaction id \"vout\": n (numeric) The output number } ,... ]", + "is_required": false + } + ], + "returns": "true|false (boolean) Whether the command was successful or not" + }, + { + "name": "move", + "namespace": "Wallet", + "description": "DEPRECATED. Move a specified amount from one account in your wallet to another.\nExamples:\nMove 0.01 LBC from the default account to the account named tabby\n> lbrycrd-cli move \"\" \"tabby\" 0.01\n\nMove 0.01 LBC timotei to akiko with a comment and funds have 6 confirmations\n> lbrycrd-cli move \"timotei\" \"akiko\" 0.01 6 \"happy birthday!\"\n\nAs a json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"move\", \"params\": [\"timotei\", \"akiko\", 0.01, 6, \"happy birthday!\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "fromaccount", + "type": "string", + "description": "The name of the account to move funds from. May be the default account using \"\".", + "is_required": true + }, + { + "name": "toaccount", + "type": "string", + "description": "The name of the account to move funds to. May be the default account using \"\".", + "is_required": true + }, + { + "name": "amount", + "type": "number", + "description": "Quantity of LBC to move between accounts.", + "is_required": true + }, + { + "name": "minconf", + "type": "number", + "description": "Only use funds with at least this many confirmations.", + "is_required": false + }, + { + "name": "comment", + "type": "string", + "description": "An optional comment, stored in the wallet only.", + "is_required": false + } + ], + "returns": "true|false (boolean) true if successful." + }, + { + "name": "removeprunedfunds", + "namespace": "Wallet", + "description": "Deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will effect wallet balances.\nExamples:\n> lbrycrd-cli removeprunedfunds \"a8d0c0184dde994a09ec054286f1ce581bebf46446a512166eae7628734ea0a5\"\n\nAs a JSON-RPC call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"removprunedfunds\", \"params\": [\"a8d0c0184dde994a09ec054286f1ce581bebf46446a512166eae7628734ea0a5\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "txid", + "type": "string", + "description": "The hex-encoded id of the transaction you are deleting", + "is_required": true + } + ] + }, + { + "name": "sendfrom", + "namespace": "Wallet", + "description": "DEPRECATED (use sendtoaddress). Sent an amount from an account to a lbrycrd address.\nExamples:\nSend 0.01 LBC from the default account to the address, must have at least 1 confirmation\n> lbrycrd-cli sendfrom \"\" \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01\n\nSend 0.01 from the tabby account to the given address, funds must have at least 6 confirmations\n> lbrycrd-cli sendfrom \"tabby\" \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01 6 \"donation\" \"seans outpost\"\n\nAs a json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"sendfrom\", \"params\": [\"tabby\", \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\", 0.01, 6, \"donation\", \"seans outpost\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "fromaccount", + "type": "string", + "description": "The name of the account to send funds from. May be the default account using \"\".", + "is_required": true + }, + { + "name": "tolbrycrdaddress", + "type": "string", + "description": "The lbrycrd address to send funds to.", + "is_required": true + }, + { + "name": "amount", + "type": "number", + "description": "The amount in LBC (transaction fee is added on top).", + "is_required": true + }, + { + "name": "minconf", + "type": "number", + "description": "Only use funds with at least this many confirmations.", + "is_required": false + }, + { + "name": "comment", + "type": "string", + "description": "A comment used to store what the transaction is for. This is not part of the transaction, just kept in your wallet.", + "is_required": false + }, + { + "name": "comment-to", + "type": "string", + "description": "An optional comment to store the name of the person or organization to which you're sending the transaction. This is not part of the transaction, it is just kept in your wallet.", + "is_required": false + } + ], + "returns": "\"transactionid\" (string) The transaction id." + }, + { + "name": "sendmany", + "namespace": "Wallet", + "description": "Send multiple times. Amounts are double-precision floating point numbers.\nExamples:\nSend two amounts to two different addresses:\n> lbrycrd-cli sendmany \"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\"\n\nSend two amounts to two different addresses setting the confirmation and comment:\n> lbrycrd-cli sendmany \"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 6 \"testing\"\n\nSend two amounts to two different addresses, subtract fee from amount:\n> lbrycrd-cli sendmany \"\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\" 1 \"\" \"[\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\",\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\"]\"\n\nAs a json rpc call\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"sendmany\", \"params\": [\"\", \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\", 6, \"testing\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "fromaccount", + "type": "string", + "description": "DEPRECATED. The account to send the funds from. Should be \"\" for the default account", + "is_required": true + }, + { + "name": "amounts", + "type": "string", + "description": "A json object with addresses and amounts { \"address\":amount (numeric or string) The lbrycrd address is the key, the numeric amount (can be string) in LBC is the value ,... }", + "is_required": true + }, + { + "name": "minconf", + "type": "number", + "description": "Only use the balance confirmed at least this many times.", + "is_required": false + }, + { + "name": "comment", + "type": "string", + "description": "A comment", + "is_required": false + }, + { + "name": "subtractfeefromamount", + "type": "string", + "description": "A json array with addresses. The fee will be equally deducted from the amount of each selected address. Those recipients will receive less LBC than you enter in their corresponding amount field. If no addresses are specified here, the sender pays the fee. [ \"address\" (string) Subtract fee from this address ,... ]", + "is_required": false + } + ], + "returns": "\"transactionid\" (string) The transaction id for the send. Only 1 transaction is created regardless of \n the number of addresses." + }, + { + "name": "sendtoaddress", + "namespace": "Wallet", + "description": "Send an amount to a given address.\nExamples:\n> lbrycrd-cli sendtoaddress \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1\n> lbrycrd-cli sendtoaddress \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1 \"donation\" \"seans outpost\"\n> lbrycrd-cli sendtoaddress \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1 \"\" \"\" true\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"sendtoaddress\", \"params\": [\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\", 0.1, \"donation\", \"seans outpost\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "lbrycrdaddress", + "type": "string", + "description": "The lbrycrd address to send to.", + "is_required": true + }, + { + "name": "amount", + "type": "number", + "description": "The amount in LBC to send. eg 0.1", + "is_required": true + }, + { + "name": "comment", + "type": "string", + "description": "A comment used to store what the transaction is for. This is not part of the transaction, just kept in your wallet.", + "is_required": false + }, + { + "name": "comment-to", + "type": "string", + "description": "A comment to store the name of the person or organization to which you're sending the transaction. This is not part of the transaction, just kept in your wallet.", + "is_required": false + }, + { + "name": "subtractfeefromamount", + "type": "boolean", + "description": "The fee will be deducted from the amount being sent. The recipient will receive less LBC than you enter in the amount field.", + "is_required": false + } + ], + "returns": "\"transactionid\" (string) The transaction id." + }, + { + "name": "setaccount", + "namespace": "Wallet", + "description": "DEPRECATED. Sets the account associated with the given address.\nExamples:\n> lbrycrd-cli setaccount \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"tabby\"\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"setaccount\", \"params\": [\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", \"tabby\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "lbrycrdaddress", + "type": "string", + "description": "The lbrycrd address to be associated with an account.", + "is_required": true + }, + { + "name": "account", + "type": "string", + "description": "The account to assign the address to.", + "is_required": true + } + ] + }, + { + "name": "settxfee", + "namespace": "Wallet", + "description": "Set the transaction fee per kB. Overwrites the paytxfee parameter.\nExamples:\n> lbrycrd-cli settxfee 0.00001\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"settxfee\", \"params\": [0.00001] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "amount", + "type": "number", + "description": "The transaction fee in LBC/kB Result true|false (boolean) Returns true if successful", + "is_required": true + } + ] + }, + { + "name": "signmessage", + "namespace": "Wallet", + "description": "Sign a message with the private key of an address\nExamples:\nUnlock the wallet for 30 seconds\n> lbrycrd-cli walletpassphrase \"mypassphrase\" 30\n\nCreate the signature\n> lbrycrd-cli signmessage \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"my message\"\n\nVerify the signature\n> lbrycrd-cli verifymessage \"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"signature\" \"my message\"\n\nAs json rpc\n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"signmessage\", \"params\": [\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\", \"my message\"] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/", + "arguments": [ + { + "name": "lbrycrdaddress", + "type": "string", + "description": "The lbrycrd address to use for the private key.", + "is_required": true + }, + { + "name": "message", + "type": "string", + "description": "The message to create a signature of.", + "is_required": true + } + ], + "returns": "\"signature\" (string) The signature of the message encoded in base 64" + } +] diff --git a/src/rpc/claimtrie.cpp b/src/rpc/claimtrie.cpp index fd37a9e99..252de232b 100644 --- a/src/rpc/claimtrie.cpp +++ b/src/rpc/claimtrie.cpp @@ -369,31 +369,30 @@ UniValue getclaimbyid(const UniValue& params, bool fHelp) { if (fHelp || params.size() != 1) throw std::runtime_error( - "getclaimbyid\n" - "Get a claim by claim id\n" - "Arguments: \n" - "1. \"claimId\" (string) the claimId of this claim\n" - "Result:\n" - "{\n" - " \"name\" (string) the name of the claim\n" - " \"value\" (string) claim metadata\n" - " \"claimId\" (string) the claimId of this claim\n" - " \"txid\" (string) the hash of the transaction which has successfully claimed this name\n" - " \"n\" (numeric) vout value\n" - " \"amount\" (numeric) txout value\n" - " \"effective amount\" (numeric) txout amount plus amount from all supports associated with the claim\n" - " \"height\" (numeric) the height of the block in which this claim transaction is located\n" - " \"supports\" (array of object) supports for this claim\n" - " \"valid at height\" (numeric) the height at which the claim is valid\n" - " [\n" - " \"txid\" (string) the txid of the support\n" - " \"n\" (numeric) the index of the support in the transaction's list of outputs\n" - " \"height\" (numeric) the height at which the support was included in the blockchain\n" - " \"valid at height\" (numeric) the height at which the support is valid\n" - " \"amount\" (numeric) the amount of the support\n" - " ]\n" - "}\n" - ); + "getclaimbyid\n" + "Get a claim by claim id\n" + "Arguments: \n" + "1. \"claimId\" (string) the claimId of this claim\n" + "Result:\n" + "{\n" + " \"name\" (string) the name of the claim\n" + " \"value\" (string) claim metadata\n" + " \"claimId\" (string) the claimId of this claim\n" + " \"txid\" (string) the hash of the transaction which has successfully claimed this name\n" + " \"n\" (numeric) vout value\n" + " \"amount\" (numeric) txout value\n" + " \"effective amount\" (numeric) txout amount plus amount from all supports associated with the claim\n" + " \"supports\" (array of object) supports for this claim\n" + " [\n" + " \"txid\" (string) the txid of the support\n" + " \"n\" (numeric) the index of the support in the transaction's list of outputs\n" + " \"height\" (numeric) the height at which the support was included in the blockchain\n" + " \"valid at height\" (numeric) the height at which the support is valid\n" + " \"amount\" (numeric) the amount of the support\n" + " ]\n" + " \"height\" (numeric) the height of the block in which this claim transaction is located\n" + " \"valid at height\" (numeric) the height at which the claim is valid\n" + "}\n"); LOCK(cs_main); uint160 claimId = ParseClaimtrieId(params[0], "Claim-id (parameter 1)"); -- 2.45.2 From b16e7c0219135707899d21f465e1ec213ae025f7 Mon Sep 17 00:00:00 2001 From: Brannon King Date: Thu, 30 Aug 2018 13:33:37 -0600 Subject: [PATCH 2/2] don't run the formatting check on Travis OSX by default --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c52c62ef2..293fbd9ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ before_install: install: true script: - - if [[ "${TARGET}" == "osx" ]]; then ./reproducible_build.sh -t -o -c -f; fi + - if [[ "${TARGET}" == "osx" ]]; then ./reproducible_build.sh -t -o -c; fi - if [[ "${TARGET}" == "linux" ]]; then ./reproducible_build.sh -t -o -c -f; fi - if [[ "${TARGET}" == "windows" ]]; then ./packaging/build_windows.sh; fi - if [[ "${TARGET}" == "osx" ]]; then zip -j "lbrycrd-${TARGET}.zip" src/lbrycrdd src/lbrycrd-cli src/lbrycrd-tx; fi -- 2.45.2