mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-25 07:27:23 +01:00
The *schemas* were added in v24.05, but the actual fields are much older. Unfortunately, fixing this required a manual edit of the .msggen.json file, as msggen won't let the added version change (for good reason). Versions when these notifications were originally added: connect: v0.6.3 channel_opened: v0.7.2.1: channel_state_changed: v0.9.1 channel_open_failed: v0.9.3 block_added: v22.11 custommsg: v24.02 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
135 lines
3.3 KiB
JSON
135 lines
3.3 KiB
JSON
{
|
|
"$schema": "../../rpc-schema-draft.json",
|
|
"type": "object",
|
|
"notification": "connect",
|
|
"title": "Notification for connection with a peer",
|
|
"description": [
|
|
"The **connect** informs whenever the node is connected to a peer."
|
|
],
|
|
"additionalProperties": false,
|
|
"added": "pre-v0.10.1",
|
|
"request": {},
|
|
"response": {
|
|
"required": [
|
|
"id",
|
|
"direction",
|
|
"address"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "pubkey",
|
|
"description": [
|
|
"The id of the peer which sent the custom message"
|
|
],
|
|
"added": "pre-v0.10.1"
|
|
},
|
|
"direction": {
|
|
"type": "string",
|
|
"enum": [
|
|
"in",
|
|
"out"
|
|
],
|
|
"description": [
|
|
"Direction of the connection"
|
|
],
|
|
"added": "pre-v0.10.1"
|
|
},
|
|
"address": {
|
|
"type": "object",
|
|
"description": [
|
|
"Address information (mainly useful if **direction** is *out*)"
|
|
],
|
|
"added": "pre-v0.10.1",
|
|
"additionalProperties": true,
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"added": "pre-v0.10.1",
|
|
"enum": [
|
|
"local socket",
|
|
"ipv4",
|
|
"ipv6",
|
|
"torv2",
|
|
"torv3"
|
|
],
|
|
"description": [
|
|
"Type of connection (*torv2*/*torv3* only if **direction** is *out*)"
|
|
]
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"local socket"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"socket"
|
|
],
|
|
"properties": {
|
|
"type": {},
|
|
"socket": {
|
|
"type": "string",
|
|
"added": "pre-v0.10.1",
|
|
"description": [
|
|
"Socket filename"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"ipv4",
|
|
"ipv6",
|
|
"torv2",
|
|
"torv3"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"address",
|
|
"port"
|
|
],
|
|
"properties": {
|
|
"type": {},
|
|
"address": {
|
|
"type": "string",
|
|
"added": "pre-v0.10.1",
|
|
"description": [
|
|
"Address in expected format for **type**"
|
|
]
|
|
},
|
|
"port": {
|
|
"type": "u16",
|
|
"added": "pre-v0.10.1",
|
|
"description": [
|
|
"Port number"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|