2017-03-10 11:56:53 +01:00
|
|
|
# These shouldn't happen
|
|
|
|
opening_bad_command,0x8000
|
|
|
|
opening_key_derivation_failed,0x8001
|
|
|
|
opening_bad_param,0x8002
|
|
|
|
opening_hsm_failed,0x8003
|
|
|
|
|
|
|
|
# These are due to peer.
|
|
|
|
opening_peer_write_failed,0x8010
|
|
|
|
opening_peer_read_failed,0x8011
|
|
|
|
opening_peer_bad_funding,0x8012
|
|
|
|
opening_peer_bad_config,0x8013
|
|
|
|
opening_peer_bad_initial_message,0x8014
|
|
|
|
|
|
|
|
#include <lightningd/cryptomsg.h>
|
|
|
|
#include <lightningd/channel_config.h>
|
|
|
|
opening_init,0
|
|
|
|
# Base configuration we'll offer (channel reserve will vary with amount)
|
2017-03-16 05:05:25 +01:00
|
|
|
opening_init,0,our_config,struct channel_config
|
2017-03-10 11:56:53 +01:00
|
|
|
# Minimum/maximum configuration values we'll accept
|
|
|
|
opening_init,36,max_to_self_delay,4
|
|
|
|
opening_init,40,min_effective_htlc_capacity_msat,8
|
2017-03-16 05:05:25 +01:00
|
|
|
opening_init,48,crypto_state,struct crypto_state
|
2017-03-10 11:56:53 +01:00
|
|
|
# Seed to generate all the keys from
|
2017-03-16 05:05:25 +01:00
|
|
|
opening_init,196,seed,struct privkey
|
2017-03-10 11:56:53 +01:00
|
|
|
|
|
|
|
# This means we offer the open.
|
2017-05-23 13:04:17 +02:00
|
|
|
opening_funder,1
|
|
|
|
opening_funder,0,funding_satoshis,8
|
|
|
|
opening_funder,8,push_msat,8
|
|
|
|
opening_funder,16,feerate_per_kw,4
|
|
|
|
opening_funder,20,max_minimum_depth,4
|
2017-05-23 13:07:42 +02:00
|
|
|
opening_funder,24,change_satoshis,u64
|
|
|
|
opening_funder,32,change_keyindex,u32
|
|
|
|
#include <lightningd/utxo.h>
|
|
|
|
opening_funder,0,num_inputs,u16
|
|
|
|
opening_funder,0,inputs,num_inputs*struct utxo
|
|
|
|
opening_funder,0,bip32_len,u16
|
|
|
|
opening_funder,0,bip32_seed,bip32_len*u8
|
2017-03-10 11:56:53 +01:00
|
|
|
|
2017-05-23 13:07:42 +02:00
|
|
|
# This gives their sig, means we can broadcast tx: we're done.
|
2017-05-23 13:04:17 +02:00
|
|
|
opening_funder_reply,101
|
2017-05-23 13:07:42 +02:00
|
|
|
opening_funder_reply,0,their_config,struct channel_config
|
|
|
|
opening_funder_reply,36,first_commit_sig,secp256k1_ecdsa_signature
|
|
|
|
opening_funder_reply,100,crypto_state,struct crypto_state
|
|
|
|
opening_funder_reply,244,revocation_basepoint,33
|
|
|
|
opening_funder_reply,277,payment_basepoint,33
|
|
|
|
opening_funder_reply,310,delayed_payment_basepoint,33
|
|
|
|
opening_funder_reply,343,their_per_commit_point,33
|
|
|
|
opening_funder_reply,376,minimum_depth,4
|
2017-05-23 13:04:17 +02:00
|
|
|
opening_funder_reply,0,remote_fundingkey,33
|
2017-05-23 13:07:42 +02:00
|
|
|
opening_funder_reply,0,funding_txid,struct sha256_double
|
2017-03-10 11:56:53 +01:00
|
|
|
|
|
|
|
# This means they offer the open (contains their offer packet)
|
2017-05-23 13:04:17 +02:00
|
|
|
opening_fundee,3
|
|
|
|
opening_fundee,0,minimum_depth,4
|
|
|
|
opening_fundee,0,min_feerate,4
|
|
|
|
opening_fundee,4,max_feerate,4
|
|
|
|
opening_fundee,8,len,2
|
|
|
|
opening_fundee,10,msg,len*u8
|
2017-03-10 11:56:53 +01:00
|
|
|
|
2017-05-23 13:07:42 +02:00
|
|
|
# This gives their txid and info, means we can send funding_signed: we're done.
|
2017-05-23 13:04:17 +02:00
|
|
|
opening_fundee_reply,103
|
2017-05-23 13:07:42 +02:00
|
|
|
opening_fundee_reply,0,their_config,struct channel_config
|
|
|
|
opening_fundee_reply,36,first_commit_sig,secp256k1_ecdsa_signature
|
|
|
|
opening_fundee_reply,100,crypto_state,struct crypto_state
|
|
|
|
opening_fundee_reply,244,revocation_basepoint,33
|
|
|
|
opening_fundee_reply,277,payment_basepoint,33
|
|
|
|
opening_fundee_reply,310,delayed_payment_basepoint,33
|
|
|
|
opening_fundee_reply,343,their_per_commit_point,33
|
|
|
|
opening_fundee_reply,0,remote_fundingkey,33
|
2017-05-23 13:04:17 +02:00
|
|
|
opening_fundee_reply,0,funding_txid,struct sha256_double
|
2017-05-23 13:07:42 +02:00
|
|
|
opening_fundee_reply,0,funding_txout,u16
|
|
|
|
opening_fundee_reply,0,funding_satoshis,8
|
|
|
|
opening_fundee_reply,0,push_msat,8
|
|
|
|
# The (encrypted) funding signed message: send this and we're committed.
|
|
|
|
opening_fundee_reply,0,msglen,u16
|
|
|
|
opening_fundee_reply,0,funding_signed_msg,msglen*u8
|