core-lightning/openingd/opening_wire.csv
Rusty Russell f3d30f1267 openingd: check with lightningd when we receive an offer.
Instead of lightningd telling us when it's ready, we ask it.
This also provides an opportunity to have a plugin hook at this point.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-05-20 20:31:07 -04:00

4.6 KiB

1#include <common/cryptomsg.h>
2#include <common/channel_config.h>
3#include <common/derive_basepoints.h>
4opening_init,6000
5# Which network are we configured for?
6opening_init,,chain_hash,struct bitcoin_blkid
7# Base configuration we'll offer (channel reserve will vary with amount)
8opening_init,,our_config,struct channel_config
9# Minimum/maximum configuration values we'll accept
10opening_init,,max_to_self_delay,u32
11opening_init,,min_effective_htlc_capacity_msat,struct amount_msat
12opening_init,,crypto_state,struct crypto_state
13opening_init,,our_basepoints,struct basepoints
14opening_init,,our_funding_pubkey,struct pubkey
15# Constraints in case the other end tries to open a channel.
16opening_init,,minimum_depth,u32
17opening_init,,min_feerate,u32
18opening_init,,max_feerate,u32
19opening_init,,lfeatures_len,u16
20opening_init,,lfeatures,lfeatures_len*u8
21# Optional msg to send.
22opening_init,,len,u16
23opening_init,,msg,len*u8
24# Openingd->master: they offered channel, should we continue?
25opening_got_offer,6005
26opening_got_offer,,funding_satoshis,struct amount_sat
27opening_got_offer,,push_msat,struct amount_msat
28opening_got_offer,,dust_limit_satoshis,struct amount_sat
29opening_got_offer,,max_htlc_value_in_flight_msat,struct amount_msat
30opening_got_offer,,channel_reserve_satoshis,struct amount_sat
31opening_got_offer,,htlc_minimum_msat,struct amount_msat
32opening_got_offer,,feerate_per_kw,u32
33opening_got_offer,,to_self_delay,u16
34opening_got_offer,,max_accepted_htlcs,u16
35opening_got_offer,,channel_flags,u8
36opening_got_offer,,shutdown_len,u16
37opening_got_offer,,shutdown_scriptpubkey,shutdown_len*u8
38# master->openingd: optional rejection message
39opening_got_offer_reply,6105
40opening_got_offer_reply,,rejection,?wirestring
41#include <common/bip32.h>
42#include <common/htlc_wire.h>
43# Master->openingd: please fund a channel.
44opening_funder,6001
45opening_funder,,funding_satoshis,struct amount_sat
46opening_funder,,push_msat,struct amount_msat
47opening_funder,,feerate_per_kw,u32
48opening_funder,,change_satoshis,struct amount_sat
49opening_funder,,change_keyindex,u32
50opening_funder,,channel_flags,u8
51#include <common/utxo.h>
52opening_funder,,num_inputs,u16
53opening_funder,,inputs,num_inputs*struct utxo
54opening_funder,,bip32,struct ext_key
55# Openingd->master: we've successfully offered channel.
56# This gives their sig, means we can broadcast tx: we're done.
57opening_funder_reply,6101
58opening_funder_reply,,their_config,struct channel_config
59opening_funder_reply,,first_commit,struct bitcoin_tx
60opening_funder_reply,,first_commit_sig,struct bitcoin_signature
61opening_funder_reply,,crypto_state,struct crypto_state
62opening_funder_reply,,revocation_basepoint,struct pubkey
63opening_funder_reply,,payment_basepoint,struct pubkey
64opening_funder_reply,,htlc_basepoint,struct pubkey
65opening_funder_reply,,delayed_payment_basepoint,struct pubkey
66opening_funder_reply,,their_per_commit_point,struct pubkey
67opening_funder_reply,,minimum_depth,u32
68opening_funder_reply,,remote_fundingkey,struct pubkey
69opening_funder_reply,,funding_txid,struct bitcoin_txid
70opening_funder_reply,,feerate_per_kw,u32
71opening_funder_reply,,our_channel_reserve_satoshis,struct amount_sat
72opening_funder_reply,,shutdown_len,u16
73opening_funder_reply,,shutdown_scriptpubkey,shutdown_len*u8
74# Openingd->master: we failed to negotiation channel
75opening_funder_failed,6004
76opening_funder_failed,,reason,wirestring
77# Openingd->master: they offered channel.
78# This gives their txid and info, means we can send funding_signed: we're done.
79opening_fundee,6003
80opening_fundee,,their_config,struct channel_config
81opening_fundee,,first_commit,struct bitcoin_tx
82opening_fundee,,first_commit_sig,struct bitcoin_signature
83opening_fundee,,crypto_state,struct crypto_state
84opening_fundee,,revocation_basepoint,struct pubkey
85opening_fundee,,payment_basepoint,struct pubkey
86opening_fundee,,htlc_basepoint,struct pubkey
87opening_fundee,,delayed_payment_basepoint,struct pubkey
88opening_fundee,,their_per_commit_point,struct pubkey
89opening_fundee,,remote_fundingkey,struct pubkey
90opening_fundee,,funding_txid,struct bitcoin_txid
91opening_fundee,,funding_txout,u16
92opening_fundee,,funding_satoshis,struct amount_sat
93opening_fundee,,push_msat,struct amount_msat
94opening_fundee,,channel_flags,u8
95opening_fundee,,feerate_per_kw,u32
96# The funding signed message: send this and we're committed.
97opening_fundee,,msglen,u16
98opening_fundee,,funding_signed_msg,msglen*u8
99opening_fundee,,our_channel_reserve_satoshis,struct amount_sat
100opening_fundee,,shutdown_len,u16
101opening_fundee,,shutdown_scriptpubkey,shutdown_len*u8
102# master -> openingd: do you have a memleak?
103opening_dev_memleak,6033
104opening_dev_memleak_reply,6133
105opening_dev_memleak_reply,,leak,bool