core-lightning/doc/schemas/getinfo.schema.json
Rusty Russell a6772e9dec common: add new internal type for websockets.
Now it's not a public type, we need a way to refer to it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-06-01 09:28:39 +09:30

298 lines
7.6 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"required": [
"id",
"alias",
"color",
"num_peers",
"num_pending_channels",
"num_active_channels",
"num_inactive_channels",
"version",
"blockheight",
"network",
"fees_collected_msat",
"lightning-dir",
"address"
],
"properties": {
"id": {
"type": "pubkey",
"description": "The public key unique to this node"
},
"alias": {
"type": "string",
"description": "The fun alias this node will advertize",
"maxLength": 32
},
"color": {
"type": "hex",
"description": "The favorite RGB color this node will advertize",
"minLength": 6,
"maxLength": 6
},
"num_peers": {
"type": "u32",
"description": "The total count of peers, connected or with channels"
},
"num_pending_channels": {
"type": "u32",
"description": "The total count of channels being opened"
},
"num_active_channels": {
"type": "u32",
"description": "The total count of channels in normal state"
},
"num_inactive_channels": {
"type": "u32",
"description": "The total count of channels waiting for opening or closing transactions to be mined"
},
"version": {
"type": "string",
"description": "Identifies what bugs you are running into"
},
"lightning-dir": {
"type": "string",
"description": "Identifies where you can find the configuration and other related files"
},
"our_features": {
"type": "object",
"description": "Our BOLT #9 feature bits (as hexstring) for various contexts",
"additionalProperties": true,
"required": [
"init",
"node",
"channel",
"invoice"
],
"properties": {
"init": {
"type": "hex",
"description": "features (incl. globalfeatures) in our init message, these also restrict what we offer in open_channel or accept in accept_channel"
},
"node": {
"type": "hex",
"description": "features in our node_announcement message"
},
"channel": {
"type": "hex",
"description": "negotiated channel features we (as channel initiator) publish in the channel_announcement message"
},
"invoice": {
"type": "hex",
"description": "features in our BOLT11 invoices"
}
}
},
"blockheight": {
"type": "u32",
"description": "The highest block height we've learned"
},
"network": {
"type": "string",
"description": "represents the type of network on the node are working (e.g: `bitcoin`, `testnet`, or `regtest`)"
},
"fees_collected_msat": {
"type": "msat",
"description": "Total routing fees collected by this node"
},
"address": {
"type": "array",
"description": "The addresses we announce to the world",
"items": {
"type": "object",
"required": [
"type",
"port"
],
"additionalProperties": true,
"properties": {
"type": {
"type": "string",
"enum": [
"dns",
"ipv4",
"ipv6",
"torv2",
"torv3"
],
"description": "Type of connection (until 23.08, `websocket` was also allowed)"
},
"port": {
"type": "u16",
"description": "port number"
}
},
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"dns",
"ipv4",
"ipv6",
"torv2",
"torv3"
]
}
}
},
"then": {
"required": [
"type",
"address",
"port"
],
"additionalProperties": false,
"properties": {
"type": {},
"port": {},
"address": {
"type": "string",
"description": "address in expected format for **type**"
}
}
},
"else": {
"required": [
"type",
"port"
],
"additionalProperties": false,
"properties": {
"type": {},
"port": {}
}
}
}
},
"binding": {
"type": "array",
"description": "The addresses we are listening on",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"*FIXME*": "The variant in connect.schema.json is more complete",
"enum": [
"local socket",
"websocket",
"ipv4",
"ipv6",
"torv2",
"torv3"
],
"description": "Type of connection"
},
"address": {
"type": "string",
"description": "address in expected format for **type**"
},
"port": {
"type": "u16",
"description": "port number"
}
},
"allOf": [
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"local socket"
]
}
}
},
"then": {
"additionalProperties": false,
"required": [
"type",
"socket"
],
"properties": {
"type": {},
"socket": {
"type": "string",
"description": "socket filename"
}
}
},
"else": {
"additionalProperties": false,
"required": [
"type",
"address",
"port"
],
"properties": {
"type": {},
"address": {},
"port": {},
"subtype": {}
}
}
},
{
"if": {
"properties": {
"type": {
"type": "string",
"enum": [
"websocket"
]
}
}
},
"then": {
"additionalProperties": false,
"required": [
"type",
"address",
"port",
"subtype"
],
"properties": {
"type": {},
"address": {},
"port": {},
"subtype": {
"type": "string",
"description": "type of address"
}
}
},
"else": {
"additionalProperties": false,
"required": [
"type"
],
"properties": {
"type": {},
"address": {},
"port": {},
"socket": {}
}
}
}
]
}
},
"warning_bitcoind_sync": {
"type": "string",
"description": "Bitcoind is not up-to-date with network."
},
"warning_lightningd_sync": {
"type": "string",
"description": "Lightningd is still loading latest blocks from bitcoind."
}
}
}