mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-12-29 10:04:41 +01:00
4b46190cc4
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
83 lines
1.8 KiB
JSON
83 lines
1.8 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [ "id", "features", "direction", "address" ],
|
|
"properties": {
|
|
"id": {
|
|
"type": "pubkey",
|
|
"description": "the peer we connected to"
|
|
},
|
|
"features": {
|
|
"type": "hex",
|
|
"description": "BOLT 9 features bitmap offered by peer"
|
|
},
|
|
"direction": {
|
|
"type": "string",
|
|
"enum": [ "in", "out" ],
|
|
"description": "Whether they initiated connection or we did"
|
|
},
|
|
"address": {
|
|
"type": "object",
|
|
"description": "Address information (mainly useful if **direction** is *out*)",
|
|
"additionalProperties": true,
|
|
"required": [ "type" ],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"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",
|
|
"description": "socket filename"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [ "ipv4", "ipv6", "torv2", "torv3" ]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"additionalProperties": false,
|
|
"required": [ "address", "port" ],
|
|
"properties": {
|
|
"type": { },
|
|
"address": {
|
|
"type": "string",
|
|
"description": "address in expected format for **type**"
|
|
},
|
|
"port": {
|
|
"type": "u16",
|
|
"description": "port number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|