mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 00:54:20 +01:00
cln-rpc: Yet more RPC methods being mapped
- disconnect - feerates - getroute - listforwards - listpays - ping - signmessage
This commit is contained in:
committed by
Rusty Russell
parent
0c08ca8f27
commit
241a891190
@@ -81,22 +81,20 @@ def load_jsonrpc_service():
|
|||||||
# "decode",
|
# "decode",
|
||||||
# "delpay",
|
# "delpay",
|
||||||
# "disableoffer",
|
# "disableoffer",
|
||||||
# "disconnect",
|
"Disconnect",
|
||||||
# "feerates",
|
"Feerates",
|
||||||
# "fetchinvoice",
|
# "fetchinvoice",
|
||||||
# "fundchannel_cancel",
|
# "fundchannel_cancel",
|
||||||
# "fundchannel_complete",
|
# "fundchannel_complete",
|
||||||
# "fundchannel",
|
# "fundchannel",
|
||||||
# "fundchannel_start",
|
# "fundchannel_start",
|
||||||
# "funderupdate",
|
# "funderupdate",
|
||||||
# "fundpsbt",
|
|
||||||
# "getlog",
|
# "getlog",
|
||||||
# "getroute",
|
"GetRoute",
|
||||||
# "getsharedsecret",
|
# "getsharedsecret",
|
||||||
# "listconfigs",
|
"ListForwards",
|
||||||
# "listforwards",
|
|
||||||
# "listoffers",
|
# "listoffers",
|
||||||
# "listpays",
|
"ListPays",
|
||||||
# "multifundchannel",
|
# "multifundchannel",
|
||||||
# "multiwithdraw",
|
# "multiwithdraw",
|
||||||
# "offerout",
|
# "offerout",
|
||||||
@@ -107,16 +105,14 @@ def load_jsonrpc_service():
|
|||||||
# "openchannel_signed",
|
# "openchannel_signed",
|
||||||
# "openchannel_update",
|
# "openchannel_update",
|
||||||
# "parsefeerate",
|
# "parsefeerate",
|
||||||
# "ping",
|
"Ping",
|
||||||
# "plugin",
|
# "plugin",
|
||||||
# "reserveinputs",
|
# "reserveinputs",
|
||||||
# "sendcustommsg",
|
# "sendcustommsg",
|
||||||
# "sendinvoice",
|
# "sendinvoice",
|
||||||
# "sendonionmessage",
|
# "sendonionmessage",
|
||||||
# "sendpsbt",
|
|
||||||
# "setchannelfee",
|
# "setchannelfee",
|
||||||
# "signmessage",
|
"SignMessage",
|
||||||
# "signpsbt",
|
|
||||||
# "unreserveinputs",
|
# "unreserveinputs",
|
||||||
# "waitblockheight",
|
# "waitblockheight",
|
||||||
# "ListConfigs",
|
# "ListConfigs",
|
||||||
|
|||||||
16
doc/schemas/disconnect.request.json
Normal file
16
doc/schemas/disconnect.request.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "pubkey"
|
||||||
|
},
|
||||||
|
"force": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
17
doc/schemas/feerates.request.json
Normal file
17
doc/schemas/feerates.request.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"style"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"style": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"perkb",
|
||||||
|
"perkw"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
46
doc/schemas/getroute.request.json
Normal file
46
doc/schemas/getroute.request.json
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"msatoshi",
|
||||||
|
"riskfactor"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "pubkey",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"msatoshi": {
|
||||||
|
"type": "msat",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"riskfactor": {
|
||||||
|
"type": "u64",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"cltv": {
|
||||||
|
"type": "number",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"fromid": {
|
||||||
|
"type": "pubkey",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"fuzzpercent": {
|
||||||
|
"type": "u32",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"exclude": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"maxhops": {
|
||||||
|
"type": "u32",
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
22
doc/schemas/listforwards.request.json
Normal file
22
doc/schemas/listforwards.request.json
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"type": "object",
|
||||||
|
"required": [],
|
||||||
|
"properties": {
|
||||||
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"offered",
|
||||||
|
"settled",
|
||||||
|
"local_failed",
|
||||||
|
"failed"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"in_channel": {
|
||||||
|
"type": "short_channel_id"
|
||||||
|
},
|
||||||
|
"out_channel": {
|
||||||
|
"type": "short_channel_id"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
22
doc/schemas/listpays.request.json
Normal file
22
doc/schemas/listpays.request.json
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"type": "object",
|
||||||
|
"required": [],
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"bolt11": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"payment_hash": {
|
||||||
|
"type": "hash"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"pending",
|
||||||
|
"complete",
|
||||||
|
"failed"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
19
doc/schemas/ping.request.json
Normal file
19
doc/schemas/ping.request.json
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"id"
|
||||||
|
],
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "pubkey"
|
||||||
|
},
|
||||||
|
"len": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"pongbytes": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
13
doc/schemas/signmessage.request.json
Normal file
13
doc/schemas/signmessage.request.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"message"
|
||||||
|
],
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"message": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -113,6 +113,9 @@ def test_grpc_connect(node_factory):
|
|||||||
))
|
))
|
||||||
print(inv)
|
print(inv)
|
||||||
|
|
||||||
|
rates = stub.Feerates(nodepb.FeeratesRequest(style='PERKB'))
|
||||||
|
print(rates)
|
||||||
|
|
||||||
# Test a failing RPC call, so we know that errors are returned correctly.
|
# Test a failing RPC call, so we know that errors are returned correctly.
|
||||||
with pytest.raises(Exception, match=r'Duplicate label'):
|
with pytest.raises(Exception, match=r'Duplicate label'):
|
||||||
# This request creates a label collision
|
# This request creates a label collision
|
||||||
|
|||||||
Reference in New Issue
Block a user