Lucas Soriano del Pino
e3607c0734
Get rid of unnecessary and unwanted Message type
3 years ago
Lucas Soriano del Pino
658e0cf21f
Fix name of Payout private method
And also take self by value since it's a type that implements `Copy`.
3 years ago
Lucas Soriano del Pino
c299c2cdb4
Construct satisfiers using HashMap::from_iter
3 years ago
Lucas Soriano del Pino
7a61e50e07
Use parse instead of FromStr in unit tests
3 years ago
Lucas Soriano del Pino
53e1056c8e
Do not hard-code network in library
3 years ago
Lucas Soriano del Pino
7f21d3b24a
Remove use of bitcoin::PrivateKey type
3 years ago
Lucas Soriano del Pino
5f58be55c7
Simplify imports
3 years ago
Lucas Soriano del Pino
862cf66e66
Convert sighashes to messages non-fallibly
3 years ago
Philipp Hoenisch
d0bd25832a
Move library test into tests folder
3 years ago
Philipp Hoenisch
5156e14f8a
Fix clippy warnings: unnecessary results
3 years ago
Philipp Hoenisch
f830a9f521
Use dummy multisig for creating lock psbt
3 years ago
Philipp Hoenisch
a1cc6badb2
Compute dust limit on demand
3 years ago
Lucas Soriano del Pino
9dcc109e9d
Handle fees properly
3 years ago
Philipp Hoenisch
45c8d05ceb
Add and run dprint fmt
3 years ago
Lucas Soriano del Pino
e9e8866ef8
Add constructor for Payout
3 years ago
Lucas Soriano del Pino
73ef2bc14a
Remove comment and use anyhow::context instead
3 years ago
Lucas Soriano del Pino
348099a7aa
Remove unwrap
3 years ago
Lucas Soriano del Pino
9423ee680f
Simplify extraction of publish sk from candidate commit tx
3 years ago
Philipp Hoenisch
efbe79abc1
Calculate refund fee dynamically
3 years ago
Philipp Hoenisch
22294aaecf
Subtract minimal fee from commit tx
3 years ago
Philipp Hoenisch
9910a732ca
Subtract minimal fee from punish tx
3 years ago
Philipp Hoenisch
f70e192ea6
Optimize miniscript by combining the full expression
3 years ago
Thomas Eizinger
831fdebda6
Avoid cloning and allocation of tx inputs
If all we need is a mutable reference to the tx input, we can
grab one via `iter_mut`.
3 years ago
Lucas Soriano del Pino
a27b3b9f80
Use all public APIs in protocol test
3 years ago
Philipp Hoenisch
07a7d2cbb1
Implement build_party_params for Wallet
3 years ago
Philipp Hoenisch
182375e6b4
Simplify constructor by only passing in a sk
3 years ago
Lucas Soriano del Pino
2c22831438
Rewrite protocol test to use some public APIs
3 years ago
Philipp Hoenisch
245aaaf7ae
Use itertools exactly_one
3 years ago
Philipp Hoenisch
38d7a730f9
Use pubkey_hash function on PK
3 years ago
Philipp Hoenisch
2985f96bea
Calculate CET fee based on tx size.
3 years ago
Lucas Soriano del Pino
00841e5892
Refine possible public API and implement build_cfd_transactions
The next step should be to actually use `build_cfd_transactions` in
the test.
Afterwards, we can continue implementing and refining the public API of
the library.
3 years ago
Lucas Soriano del Pino
4d17c09e03
Verify punish transactions
3 years ago
Lucas Soriano del Pino
2976d314f5
Remove old FIXME
3 years ago
Lucas Soriano del Pino
476c81807a
Introduce revocation-style transactions ala Thor
3 years ago
Lucas Soriano del Pino
924d6d6528
Define possible library APIs
3 years ago
Lucas Soriano del Pino
dbc16b1ae9
Verify signed CETs using bitcoinconsensus
3 years ago
Lucas Soriano del Pino
199b293125
Verify refund signatures using bitcoinconsensus
Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
3 years ago
Lucas Soriano del Pino
9d83d56261
Verify refund signatures and CET encsigs
The protocol doesn't need to (can?) verify the lock transaction signatures
and the broadcasting party should instead attempt to broadcast the
lock transaction.
3 years ago
Lucas Soriano del Pino
5b139ee36a
Remove erroneous note
3 years ago
Lucas Soriano del Pino
05f64d8a7a
Sign and encsign all DLC transactions in test
3 years ago
Lucas Soriano del Pino
91134e3b2a
Generate all DLC transactions in test
3 years ago
Lucas Soriano del Pino
20c6635c78
Create cargo workspace and cfd_protocol crate
3 years ago