Skip to content

Commit

Permalink
Schema: Add schema's for detailed fundchannel methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikDeSmedt authored and cdecker committed Jan 30, 2024
1 parent 6e6c944 commit 72687d2
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 9 deletions.
14 changes: 14 additions & 0 deletions doc/schemas/fundchannel_cancel.request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"required": [
"id"
],
"properties": {
"id": {
"type": "pubkey",
"description": "the node id of the remote peer with which to cancel"
}
}
}
19 changes: 19 additions & 0 deletions doc/schemas/fundchannel_complete.request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"required": [
"id",
"psbt"
],
"properties": {
"id": {
"type": "pubkey",
"description": "id is the node id of the remote peer."
},
"psbt": {
"type": "string",
"description": "the transaction to use for funding (does not need to be signed but must be otherwise complete)"
}
}
}
24 changes: 16 additions & 8 deletions doc/schemas/fundchannel_start.request.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,36 @@
],
"properties": {
"id": {
"type": "pubkey"
"type": "pubkey",
"description": "id is the peer id obtained from connect."
},
"amount": {
"type": "msat"
"type": "msat_or_all",
"description": "The amount that the channel will be funded."
},
"feerate": {
"type": "feerate"
"type": "feerate",
"description": "Sets the feerate for the subsequent commitment transaction."
},
"announce": {
"type": "boolean"
"type": "boolean",
"description": "Whether or not to announce the channel."
},
"close_to": {
"type": "hex"
"type": "string",
"description": "A bitcoin address to which the channel funds should be sent to on close."
},
"push_msat": {
"type": "msat"
"type": "msat",
"description": "The amount of millisatoshis to push to the channel at open. This is a gift to the peer."
},
"mindepth": {
"type": "u32"
"type": "u32",
"description": "Number of confirmations required before we consider the channel active"
},
"reserve": {
"type": "msat"
"type": "msat",
"description": "The amount we want the peer to maintain on its side"
},
"channel_type": {
"type": "array",
Expand Down
2 changes: 1 addition & 1 deletion external/lnprototest

0 comments on commit 72687d2

Please sign in to comment.