lnd.xprv/lnrpc/wtclientrpc/wtclient.swagger.json

411 lines
13 KiB
JSON
Raw Normal View History

{
"swagger": "2.0",
"info": {
"title": "wtclientrpc/wtclient.proto",
"version": "version not set"
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/v2/watchtower/client": {
"get": {
"summary": "ListTowers returns the list of watchtowers registered with the client.",
"operationId": "ListTowers",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/wtclientrpcListTowersResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "include_sessions",
"description": "Whether we should include sessions with the watchtower in the response.",
"in": "query",
"required": false,
"type": "boolean",
"format": "boolean"
}
],
"tags": [
"WatchtowerClient"
]
},
"post": {
"summary": "AddTower adds a new watchtower reachable at the given address and\nconsiders it for new sessions. If the watchtower already exists, then\nany new addresses included will be considered when dialing it for\nsession negotiations and backups.",
"operationId": "AddTower",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/wtclientrpcAddTowerResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/wtclientrpcAddTowerRequest"
}
}
],
"tags": [
"WatchtowerClient"
]
}
},
"/v2/watchtower/client/info/{pubkey}": {
"get": {
"summary": "GetTowerInfo retrieves information for a registered watchtower.",
"operationId": "GetTowerInfo",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/wtclientrpcTower"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "pubkey",
"description": "The identifying public key of the watchtower to retrieve information for.",
"in": "path",
"required": true,
"type": "string",
"format": "byte"
},
{
"name": "include_sessions",
"description": "Whether we should include sessions with the watchtower in the response.",
"in": "query",
"required": false,
"type": "boolean",
"format": "boolean"
}
],
"tags": [
"WatchtowerClient"
]
}
},
"/v2/watchtower/client/policy": {
"get": {
"summary": "Policy returns the active watchtower client policy configuration.",
"operationId": "Policy",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/wtclientrpcPolicyResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "policy_type",
"description": "The client type from which to retrieve the active offering policy.\n\n - LEGACY: Selects the policy from the legacy tower client.\n - ANCHOR: Selects the policy from the anchor tower client.",
"in": "query",
"required": false,
"type": "string",
"enum": [
"LEGACY",
"ANCHOR"
],
"default": "LEGACY"
}
],
"tags": [
"WatchtowerClient"
]
}
},
"/v2/watchtower/client/stats": {
"get": {
"summary": "Stats returns the in-memory statistics of the client since startup.",
"operationId": "Stats",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/wtclientrpcStatsResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"tags": [
"WatchtowerClient"
]
}
},
"/v2/watchtower/client/{pubkey}": {
"delete": {
"summary": "RemoveTower removes a watchtower from being considered for future session\nnegotiations and from being used for any subsequent backups until it's added\nagain. If an address is provided, then this RPC only serves as a way of\nremoving the address from the watchtower instead.",
"operationId": "RemoveTower",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/wtclientrpcRemoveTowerResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "pubkey",
"description": "The identifying public key of the watchtower to remove.",
"in": "path",
"required": true,
"type": "string",
"format": "byte"
},
{
"name": "address",
"description": "If set, then the record for this address will be removed, indicating that is\nis stale. Otherwise, the watchtower will no longer be used for future\nsession negotiations and backups.",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"WatchtowerClient"
]
}
}
},
"definitions": {
"protobufAny": {
"type": "object",
"properties": {
"type_url": {
"type": "string"
},
"value": {
"type": "string",
"format": "byte"
}
}
},
"runtimeError": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
},
"wtclientrpcAddTowerRequest": {
"type": "object",
"properties": {
"pubkey": {
"type": "string",
"format": "byte",
"description": "The identifying public key of the watchtower to add."
},
"address": {
"type": "string",
"description": "A network address the watchtower is reachable over."
}
}
},
"wtclientrpcAddTowerResponse": {
"type": "object"
},
"wtclientrpcListTowersResponse": {
"type": "object",
"properties": {
"towers": {
"type": "array",
"items": {
"$ref": "#/definitions/wtclientrpcTower"
},
"description": "The list of watchtowers available for new backups."
}
}
},
"wtclientrpcPolicyResponse": {
"type": "object",
"properties": {
"max_updates": {
"type": "integer",
"format": "int64",
"description": "The maximum number of updates each session we negotiate with watchtowers\nshould allow."
},
"sweep_sat_per_byte": {
"type": "integer",
"format": "int64",
"description": "Deprecated, use sweep_sat_per_vbyte.\nThe fee rate, in satoshis per vbyte, that will be used by watchtowers for\njustice transactions in response to channel breaches."
},
"sweep_sat_per_vbyte": {
"type": "integer",
"format": "int64",
"description": "The fee rate, in satoshis per vbyte, that will be used by watchtowers for\njustice transactions in response to channel breaches."
}
}
},
"wtclientrpcPolicyType": {
"type": "string",
"enum": [
"LEGACY",
"ANCHOR"
],
"default": "LEGACY",
"description": " - LEGACY: Selects the policy from the legacy tower client.\n - ANCHOR: Selects the policy from the anchor tower client."
},
"wtclientrpcRemoveTowerResponse": {
"type": "object"
},
"wtclientrpcStatsResponse": {
"type": "object",
"properties": {
"num_backups": {
"type": "integer",
"format": "int64",
"description": "The total number of backups made to all active and exhausted watchtower\nsessions."
},
"num_pending_backups": {
"type": "integer",
"format": "int64",
"description": "The total number of backups that are pending to be acknowledged by all\nactive and exhausted watchtower sessions."
},
"num_failed_backups": {
"type": "integer",
"format": "int64",
"description": "The total number of backups that all active and exhausted watchtower\nsessions have failed to acknowledge."
},
"num_sessions_acquired": {
"type": "integer",
"format": "int64",
"description": "The total number of new sessions made to watchtowers."
},
"num_sessions_exhausted": {
"type": "integer",
"format": "int64",
"description": "The total number of watchtower sessions that have been exhausted."
}
}
},
"wtclientrpcTower": {
"type": "object",
"properties": {
"pubkey": {
"type": "string",
"format": "byte",
"description": "The identifying public key of the watchtower."
},
"addresses": {
"type": "array",
"items": {
"type": "string"
},
"description": "The list of addresses the watchtower is reachable over."
},
"active_session_candidate": {
"type": "boolean",
"format": "boolean",
"description": "Whether the watchtower is currently a candidate for new sessions."
},
"num_sessions": {
"type": "integer",
"format": "int64",
"description": "The number of sessions that have been negotiated with the watchtower."
},
"sessions": {
"type": "array",
"items": {
"$ref": "#/definitions/wtclientrpcTowerSession"
},
"description": "The list of sessions that have been negotiated with the watchtower."
}
}
},
"wtclientrpcTowerSession": {
"type": "object",
"properties": {
"num_backups": {
"type": "integer",
"format": "int64",
"description": "The total number of successful backups that have been made to the\nwatchtower session."
},
"num_pending_backups": {
"type": "integer",
"format": "int64",
"description": "The total number of backups in the session that are currently pending to be\nacknowledged by the watchtower."
},
"max_backups": {
"type": "integer",
"format": "int64",
"description": "The maximum number of backups allowed by the watchtower session."
},
"sweep_sat_per_byte": {
"type": "integer",
"format": "int64",
"description": "Deprecated, use sweep_sat_per_vbyte.\nThe fee rate, in satoshis per vbyte, that will be used by the watchtower for\nthe justice transaction in the event of a channel breach."
},
"sweep_sat_per_vbyte": {
"type": "integer",
"format": "int64",
"description": "The fee rate, in satoshis per vbyte, that will be used by the watchtower for\nthe justice transaction in the event of a channel breach."
}
}
}
}
}