{ "swagger": "2.0", "info": { "title": "broker.proto", "version": "version not set" }, "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/v1/account_balance/{address}": { "get": { "operationId": "GetAccountBalance", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/pbResponse" } } }, "parameters": [ { "name": "address", "in": "path", "required": true, "type": "string" } ], "tags": [ "ChainBroker" ] } }, "/v1/block": { "get": { "operationId": "GetBlock", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/pbBlock" } } }, "parameters": [ { "name": "type", "in": "query", "required": false, "type": "string", "enum": [ "HEIGHT", "HASH" ], "default": "HEIGHT" }, { "name": "value", "in": "query", "required": false, "type": "string" } ], "tags": [ "ChainBroker" ] } }, "/v1/block_header": { "get": { "operationId": "GetBlockHeader", "responses": { "200": { "description": "A successful response.(streaming responses)", "schema": { "$ref": "#/x-stream-definitions/pbBlockHeader" } } }, "parameters": [ { "name": "begin", "in": "query", "required": false, "type": "string", "format": "uint64" }, { "name": "end", "in": "query", "required": false, "type": "string", "format": "uint64" } ], "tags": [ "ChainBroker" ] } }, "/v1/block_headers": { "get": { "operationId": "GetBlockHeaders", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/pbGetBlockHeadersResponse" } } }, "parameters": [ { "name": "start", "in": "query", "required": false, "type": "string", "format": "uint64" }, { "name": "end", "in": "query", "required": false, "type": "string", "format": "uint64" } ], "tags": [ "ChainBroker" ] } }, "/v1/blocks": { "get": { "operationId": "GetBlocks", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/pbGetBlocksResponse" } } }, "parameters": [ { "name": "start", "in": "query", "required": false, "type": "string", "format": "uint64" }, { "name": "end", "in": "query", "required": false, "type": "string", "format": "uint64" } ], "tags": [ "ChainBroker" ] } }, "/v1/chain_meta": { "get": { "operationId": "GetChainMeta", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/pbChainMeta" } } }, "parameters": [ { "name": "type", "in": "query", "required": false, "type": "string", "enum": [ "CHAIN_STATUS", "NETWORK", "VALIDATORS" ], "default": "CHAIN_STATUS" } ], "tags": [ "ChainBroker" ] } }, "/v1/check_master_sidecar/{address}": { "get": { "operationId": "CheckMasterSidecar", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/pbResponse" } } }, "parameters": [ { "name": "address", "in": "path", "required": true, "type": "string" } ], "tags": [ "ChainBroker" ] } }, "/v1/delvpnode": { "post": { "operationId": "DelVPNode", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/pbResponse" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/pbDelVPNodeRequest" } } ], "tags": [ "ChainBroker" ] } }, "/v1/heart_beat": { "post": { "operationId": "HeartBeat", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/pbResponse" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/pbSidecarInfo" } } ], "tags": [ "ChainBroker" ] } }, "/v1/info": { "get": { "operationId": "GetInfo", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/pbResponse" } } }, "parameters": [ { "name": "type", "in": "query", "required": false, "type": "string", "enum": [ "CHAIN_STATUS", "NETWORK", "VALIDATORS" ], "default": "CHAIN_STATUS" } ], "tags": [ "ChainBroker" ] } }, "/v1/interchain_tx_wrappers": { "get": { "operationId": "GetInterchainTxWrappers", "responses": { "200": { "description": "A successful response.(streaming responses)", "schema": { "$ref": "#/x-stream-definitions/pbInterchainTxWrappers" } } }, "parameters": [ { "name": "begin", "in": "query", "required": false, "type": "string", "format": "uint64" }, { "name": "end", "in": "query", "required": false, "type": "string", "format": "uint64" }, { "name": "pid", "in": "query", "required": false, "type": "string" } ], "tags": [ "ChainBroker" ] } }, "/v1/multi_sign/{content}": { "get": { "operationId": "GetMultiSigns", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/pbSignResponse" } } }, "parameters": [ { "name": "content", "in": "path", "required": true, "type": "string" }, { "name": "type", "in": "query", "required": false, "type": "string", "enum": [ "ASSET_EXCHANGE", "IBTP", "BLOCK_HEADER" ], "default": "ASSET_EXCHANGE" } ], "tags": [ "ChainBroker" ] } }, "/v1/pendingNonce/{address}": { "get": { "operationId": "GetPendingNonceByAccount", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/pbResponse" } } }, "parameters": [ { "name": "address", "in": "path", "required": true, "type": "string" } ], "tags": [ "ChainBroker" ] } }, "/v1/receipt/{tx_hash}": { "get": { "operationId": "GetReceipt", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/pbReceipt" } } }, "parameters": [ { "name": "tx_hash", "in": "path", "required": true, "type": "string" } ], "tags": [ "ChainBroker" ] } }, "/v1/set_master_sidecar": { "post": { "operationId": "SetMasterSidecar", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/pbResponse" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/pbSidecarInfo" } } ], "tags": [ "ChainBroker" ] } }, "/v1/subscription": { "get": { "operationId": "Subscribe", "responses": { "200": { "description": "A successful response.(streaming responses)", "schema": { "$ref": "#/x-stream-definitions/pbResponse" } } }, "parameters": [ { "name": "type", "in": "query", "required": false, "type": "string", "enum": [ "BLOCK", "EVENT", "INTERCHAIN_TX", "BLOCK_HEADER", "INTERCHAIN_TX_WRAPPER", "UNION_INTERCHAIN_TX_WRAPPER" ], "default": "BLOCK" }, { "name": "extra", "in": "query", "required": false, "type": "string", "format": "byte" } ], "tags": [ "ChainBroker" ] } }, "/v1/tps/{begin}/{end}": { "get": { "operationId": "GetTPS", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/pbResponse" } } }, "parameters": [ { "name": "begin", "in": "path", "required": true, "type": "string", "format": "uint64" }, { "name": "end", "in": "path", "required": true, "type": "string", "format": "uint64" } ], "tags": [ "ChainBroker" ] } }, "/v1/transaction": { "post": { "operationId": "SendTransaction", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/pbTransactionHashMsg" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/pbBxhTransaction" } } ], "tags": [ "ChainBroker" ] } }, "/v1/transaction/{tx_hash}": { "get": { "operationId": "GetTransaction", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/pbGetTransactionResponse" } } }, "parameters": [ { "name": "tx_hash", "in": "path", "required": true, "type": "string" } ], "tags": [ "ChainBroker" ] } }, "/v1/view": { "post": { "operationId": "SendView", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/pbReceipt" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/pbBxhTransaction" } } ], "tags": [ "ChainBroker" ] } } }, "definitions": { "pbBlock": { "type": "object", "properties": { "block_header": { "$ref": "#/definitions/pbBlockHeader" }, "transactions": { "type": "string", "format": "byte" }, "block_hash": { "type": "string", "format": "byte" }, "signature": { "type": "string", "format": "byte" }, "extra": { "type": "string", "format": "byte" } } }, "pbBlockHeader": { "type": "object", "properties": { "number": { "type": "string", "format": "uint64" }, "state_root": { "type": "string", "format": "byte" }, "tx_root": { "type": "string", "format": "byte" }, "receipt_root": { "type": "string", "format": "byte" }, "parent_hash": { "type": "string", "format": "byte" }, "timestamp": { "type": "string", "format": "int64" }, "version": { "type": "string", "format": "byte" }, "Bloom": { "type": "string", "format": "byte" } } }, "pbBxhTransaction": { "type": "object", "properties": { "version": { "type": "string", "format": "byte" }, "from": { "type": "string", "format": "byte" }, "to": { "type": "string", "format": "byte" }, "timestamp": { "type": "string", "format": "int64" }, "transaction_hash": { "type": "string", "format": "byte" }, "payload": { "type": "string", "format": "byte" }, "IBTP": { "$ref": "#/definitions/pbIBTP" }, "nonce": { "type": "string", "format": "uint64" }, "amount": { "type": "string", "format": "uint64" }, "signature": { "type": "string", "format": "byte" }, "extra": { "type": "string", "format": "byte" } } }, "pbChainMeta": { "type": "object", "properties": { "height": { "type": "string", "format": "uint64" }, "block_hash": { "type": "string", "format": "byte" }, "interchain_tx_count": { "type": "string", "format": "uint64" } } }, "pbDelVPNodeRequest": { "type": "object", "properties": { "pid": { "type": "string" } } }, "pbEvent": { "type": "object", "properties": { "tx_hash": { "type": "string", "format": "byte", "title": "Transaction Hash" }, "data": { "type": "string", "format": "byte" }, "interchain": { "type": "boolean", "format": "boolean", "title": "The interchain flag used by interchain contract" } } }, "pbEvmLog": { "type": "object", "properties": { "address": { "type": "string", "format": "byte" }, "topics": { "type": "array", "items": { "type": "string", "format": "byte" } }, "data": { "type": "string", "format": "byte" }, "block_number": { "type": "string", "format": "uint64" }, "tx_hash": { "type": "string", "format": "byte" }, "tx_index": { "type": "string", "format": "uint64" }, "block_hash": { "type": "string", "format": "byte" }, "index": { "type": "string", "format": "uint64" }, "removed": { "type": "boolean", "format": "boolean" } } }, "pbGetBlockHeadersResponse": { "type": "object", "properties": { "blockHeaders": { "type": "array", "items": { "$ref": "#/definitions/pbBlockHeader" } } } }, "pbGetBlockRequestType": { "type": "string", "enum": [ "HEIGHT", "HASH" ], "default": "HEIGHT" }, "pbGetBlocksResponse": { "type": "object", "properties": { "blocks": { "type": "array", "items": { "$ref": "#/definitions/pbBlock" } } } }, "pbGetMultiSignsRequestType": { "type": "string", "enum": [ "ASSET_EXCHANGE", "IBTP", "BLOCK_HEADER" ], "default": "ASSET_EXCHANGE" }, "pbGetTransactionResponse": { "type": "object", "properties": { "tx": { "$ref": "#/definitions/pbBxhTransaction" }, "tx_meta": { "$ref": "#/definitions/pbTransactionMeta" } } }, "pbIBTP": { "type": "object", "properties": { "from": { "type": "string", "title": "ID of sending chain" }, "to": { "type": "string", "title": "ID of receiving chain" }, "index": { "type": "string", "format": "uint64", "title": "Index of inter-chain transaction" }, "type": { "$ref": "#/definitions/pbIBTPType", "title": "inter-chain transaction type" }, "timestamp": { "type": "string", "format": "int64", "title": "Timestamp of inter-chain events" }, "proof": { "type": "string", "format": "byte", "title": "Proof of inter-chain transactions" }, "payload": { "type": "string", "format": "byte", "title": "Encoded content used by inter-chain" }, "group": { "$ref": "#/definitions/pbStringUint64Map", "title": "info about other txs in the same group" }, "version": { "type": "string", "title": "Message version" }, "extra": { "type": "string", "format": "byte", "title": "Self-defined fields used by app-chain" } }, "title": "Inter-blockchain Transfer Protocol" }, "pbIBTPType": { "type": "string", "enum": [ "INTERCHAIN", "RECEIPT_SUCCESS", "RECEIPT_FAILURE", "ASSET_EXCHANGE_INIT", "ASSET_EXCHANGE_REDEEM", "ASSET_EXCHANGE_REFUND", "ASSET_EXCHANGE_RECEIPT" ], "default": "INTERCHAIN" }, "pbInterchainTxWrapper": { "type": "object", "properties": { "l2Roots": { "type": "array", "items": { "type": "string", "format": "byte" } }, "transactions": { "type": "array", "items": { "$ref": "#/definitions/pbVerifiedTx" } }, "height": { "type": "string", "format": "uint64" } } }, "pbInterchainTxWrappers": { "type": "object", "properties": { "interchainTxWrappers": { "type": "array", "items": { "$ref": "#/definitions/pbInterchainTxWrapper" } } } }, "pbSidecarInfo": { "type": "object", "properties": { "address": { "type": "string" }, "index": { "type": "string" }, "timeout": { "type": "string", "format": "int64" } } }, "pbReceipt": { "type": "object", "properties": { "version": { "type": "string", "format": "byte" }, "tx_hash": { "type": "string", "format": "byte" }, "ret": { "type": "string", "format": "byte" }, "status": { "$ref": "#/definitions/pbReceiptStatus" }, "events": { "type": "array", "items": { "$ref": "#/definitions/pbEvent" } }, "gas_used": { "type": "string", "format": "uint64" }, "evm_logs": { "type": "array", "items": { "$ref": "#/definitions/pbEvmLog" } }, "bloom": { "type": "string", "format": "byte" }, "contract_address": { "type": "string", "format": "byte" } } }, "pbReceiptStatus": { "type": "string", "enum": [ "SUCCESS", "FAILED" ], "default": "SUCCESS" }, "pbRequestType": { "type": "string", "enum": [ "CHAIN_STATUS", "NETWORK", "VALIDATORS" ], "default": "CHAIN_STATUS" }, "pbResponse": { "type": "object", "properties": { "data": { "type": "string", "format": "byte" } } }, "pbSignResponse": { "type": "object", "properties": { "sign": { "type": "object", "additionalProperties": { "type": "string", "format": "byte" } } } }, "pbStringUint64Map": { "type": "object", "properties": { "keys": { "type": "array", "items": { "type": "string" } }, "vals": { "type": "array", "items": { "type": "string", "format": "uint64" } } } }, "pbSubscriptionRequestType": { "type": "string", "enum": [ "BLOCK", "EVENT", "INTERCHAIN_TX", "BLOCK_HEADER", "INTERCHAIN_TX_WRAPPER", "UNION_INTERCHAIN_TX_WRAPPER" ], "default": "BLOCK" }, "pbTransactionHashMsg": { "type": "object", "properties": { "tx_hash": { "type": "string" } } }, "pbTransactionMeta": { "type": "object", "properties": { "block_hash": { "type": "string", "format": "byte" }, "block_height": { "type": "string", "format": "uint64" }, "index": { "type": "string", "format": "uint64" } } }, "pbVerifiedTx": { "type": "object", "properties": { "tx": { "$ref": "#/definitions/pbBxhTransaction" }, "valid": { "type": "boolean", "format": "boolean" } } }, "protobufAny": { "type": "object", "properties": { "type_url": { "type": "string" }, "value": { "type": "string", "format": "byte" } } }, "runtimeStreamError": { "type": "object", "properties": { "grpc_code": { "type": "integer", "format": "int32" }, "http_code": { "type": "integer", "format": "int32" }, "message": { "type": "string" }, "http_status": { "type": "string" }, "details": { "type": "array", "items": { "$ref": "#/definitions/protobufAny" } } } } }, "x-stream-definitions": { "pbBlockHeader": { "type": "object", "properties": { "result": { "$ref": "#/definitions/pbBlockHeader" }, "error": { "$ref": "#/definitions/runtimeStreamError" } }, "title": "Stream result of pbBlockHeader" }, "pbInterchainTxWrappers": { "type": "object", "properties": { "result": { "$ref": "#/definitions/pbInterchainTxWrappers" }, "error": { "$ref": "#/definitions/runtimeStreamError" } }, "title": "Stream result of pbInterchainTxWrappers" }, "pbResponse": { "type": "object", "properties": { "result": { "$ref": "#/definitions/pbResponse" }, "error": { "$ref": "#/definitions/runtimeStreamError" } }, "title": "Stream result of pbResponse" } } }