Skip to content

Commit cedf099

Browse files
committed
plugins: add documentation for openchannel v2 fields
Add documentation for new openchannel fields to doc/PLUGINS.md
1 parent 438a05e commit cedf099

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

doc/PLUGINS.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,13 +556,17 @@ and it has passed basic sanity checks:
556556
{
557557
"openchannel": {
558558
"id": "03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f",
559-
"funding_satoshis": "100000000msat",
559+
"version": "2", // v2+
560+
"opening_satoshis": "100000000msat", // v2+
561+
"funding_satoshis": "100000000msat", // v1
560562
"push_msat": "0msat",
561563
"dust_limit_satoshis": "546000msat",
562564
"max_htlc_value_in_flight_msat": "18446744073709551615msat",
563565
"channel_reserve_satoshis": "1000000msat",
564566
"htlc_minimum_msat": "0msat",
567+
"available_funds": "201000msat", // v2+
565568
"feerate_per_kw": 7500,
569+
"feerate_per_kw_funding": 7500, // v2+
566570
"to_self_delay": 5,
567571
"max_accepted_htlcs": 483,
568572
"channel_flags": 1
@@ -578,6 +582,17 @@ the string `reject` or `continue`. If `reject` and
578582
there's a member `error_message`, that member is sent to the peer
579583
before disconnection.
580584

585+
If this is a version "2" openchannel, then it allows for dual-funding.
586+
A plugin can choose to dual-fund a channel by replying with a `continue`
587+
message that contains a `funding_sats` field e.g.:
588+
589+
```json
590+
{
591+
"result": "continue",
592+
"funding_sats": "100000sat"
593+
}
594+
```
595+
581596
#### `htlc_accepted`
582597

583598
The `htlc_accepted` hook is called whenever an incoming HTLC is accepted, and

0 commit comments

Comments
 (0)