Rusty Russell
58a62e782d
bitcoin/script: don't pass value for HTLC script.
We don't need it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
9 years ago
Rusty Russell
08ae4a687d
script: HTLC support.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
8f0140c542
script: remove now-unnecessary 2of2 ops.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
11099d738f
script: dual anchor input support.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
aa79887d79
script: use the normalized delay script form for commit output.
As documented in the paper; it's also two bytes shorter, and allows
us to use the exact same script for three cases.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
d053181b0b
script: add standard routines for secret-or-timedelay outputs.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
612d713470
Move bitcoin stuff into bitcoin subdir.
It's not very interesting if you're looking for LN code.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
16baa1dae9
create-commit-spend-tx: spend the commit tx (after timeout)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
126192a842
create-steal-tx: get my money back!
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
e1532ce044
bitcoin_script: get rid of scriptpubkey_pay_to_pubkeyhash.
We no longer generate any pay-to-pubkeys.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
17c56a8cfc
Fix DER encoding.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
abac31072e
open-anchor-scriptsig: use pubkey, not addr in scriptsig.
Oops.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
c291d19af6
Add check-commit-sig.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
316f29cb69
bitcoin_script: wean entirely off protobuf types.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
f911b2b6df
Use pubkey structures in bitcoin_script, rather than protobufs.
This ensures we do checking beforehand, and keeps abstractions clear.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
eec612af9f
Use raw 64-byte signatures in protocol.
DER encoding introduces problems for non-canonical encodings; we should
do that only at the lightning<->bitcoin interface.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
bf38ca052e
open-commit-sig: create signature for commit tx.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
670670f138
open-anchor-sig, many fixes for open-channel.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago