forked from lthn/blockchain
1 line
15 KiB
JSON
1 line
15 KiB
JSON
|
|
{"openapi":"3.0.0","info":{"title":"Lethean Blockchain API","description":"OpenAPI for Lethean Blockchain","contact":{"name":"Lethean","url":"https:\/\/lt.hn\/"},"license":{"name":"EUPL-1.2","url":"https:\/\/joinup.ec.europa.eu\/software\/page\/eupl\/licence-eupl"},"version":"6.0.1"},"servers":[{"url":"http:\/\/127.0.0.1:36943","description":"Local Daemon"},{"url":"http:\/\/seed.lethean.io:36943","description":"Seed Server"}],"paths":{"\/info":{"get":{"summary":"Get detailed information about the blockchain and daemon state","operationId":"getInfo","tags":["Info"],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/InfoModel"}}}}},"parameters":[{"name":"flags","description":"Possible values: net_time_delta_median, current_network_hashrate_50, current_network_hashrate_350, seconds_for_10_blocks, seconds_for_30_blocks, transactions_daily_stat, last_pos_timestamp, last_pow_timestamp, total_coins, last_block_size, tx_count_in_last_block, pos_sequence_factor, pow_sequence_factor, pos_difficulty, performance, outs_stat, expirations_median.","in":"query","required":false,"deprecated":false,"schema":{"type":"string"}}]}},"\/info\/version":{"get":{"description":"Returns the current version of the API.","summary":"Get API version","operationId":"version","tags":["Info"],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/VersionModel"}}}}},"parameters":[]}},"\/block":{"get":{"summary":"Get one or more blocks, with optional pagination.","operationId":"getBlocks","tags":["Block"],"responses":{"404":{"description":"text\/plain"},"400":{"description":"text\/plain"},"200":{"description":"A list of block objects.","content":{"application\/json":{"schema":{"type":"array","items":{"$ref":"#\/components\/schemas\/BlockDetailsModel"}}}}}},"parameters":[]}},"\/block\/template":{"post":{"summary":"Create a block template for mining","operationId":"createBlockTemplate","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BlockTemplateRequestModel"}}}},"tags":["Block"],"responses":{"500":{"description":"text\/plain"},"400":{"description":"text\/plain"},"200":{"description":"OK","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BlockTemplateModel"}}}}},"parameters":[]}},"\/block\/submit":{"post":{"summary":"Submit a new block to the network","operationId":"submitBlock","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SubmitBlockRequestModel"}}}},"tags":["Block"],"responses":{"406":{"description":"text\/plain"},"400":{"description":"text\/plain"},"200":{"description":"OK","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SubmitBlockResponseModel"}}}}},"parameters":[]}},"\/block\/height":{"get":{"summary":"Get the current blockchain height","operationId":"getHeight","tags":["Block"],"responses":{"200":{"description":"OK","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/HeightModel"}}}}},"parameters":[]}},"\/block\/{identifier}":{"get":{"summary":"Get a block by its hash or height (ID)","operationId":"getBlock","tags":["Block"],"responses":{"404":{"description":"text\/plain"},"400":{"description":"text\/plain"},"200":{"description":"OK","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BlockDetailsModel"}}}}},"parameters":[{"name":"identifier","description":"The hash (hex string) or height (integer) of the block to retrieve.","in":"path","required":true,"deprecated":false,"schema":{"type":"string"}}]}}},"components":{"schemas":{"DbStatInfoModel":{"type":"object","properties":{"tx_count":{"type":"integer"},"write_tx_count":{"type":"integer"},"map_size":{"type":"integer"}},"required":[]},"TxPoolPerformanceModel":{"type":"object","properties":{"tx_processing_time":{"type":"integer"},"check_inputs_types_supported_time":{"type":"integer"},"expiration_validate_time":{"type":"integer"},"validate_amount_time":{"type":"integer"},"valid
|