Commit Graph

433 Commits

Author SHA1 Message Date
Andrew Poelstra 20f1543f79
Merge pull request #552 from JeremyRubin/fix-amount-serde
Fix Optional Amount Serialization
2021-03-15 15:48:20 +00:00
Steven Roose 7df0d14f1a
Merge pull request #577 from RCasatta/proprietary_key
Include proprietary key in deserialized PSBT
2021-03-15 12:16:30 +00:00
Steven Roose 6a0f68df85
Merge pull request #557 from LNP-BP/psbt/display_from_str
PSBT base64 (de)serialization with Display & FromStr
2021-03-13 19:39:58 +00:00
Riccardo Casatta 7e25c133d8
Include proprietary keys in deserialized fields 2021-03-13 15:41:07 +01:00
Riccardo Casatta fcd7200efe
Proprietary key test failing rtt 2021-03-13 15:19:21 +01:00
Andrew Poelstra bee5e8a090
Merge pull request #567 from LNP-BP/bip32/child-number-display
Improving bip32 ChildNumber display implementation
2021-03-12 21:01:56 +00:00
Jeremy Rubin a0c7f530ba Localize breaking changes of fixing the Amount serialization to only the
broken Option<SerdeAmount> serializer.
2021-02-28 09:13:52 -08:00
Dr Maxim Orlovsky 7b7b73f6d2
Improving PSBT FromStr error type 2021-02-22 12:46:22 +01:00
Dr Maxim Orlovsky 79f2729b20
Improving PSBT error tests 2021-02-22 12:46:22 +01:00
Dr Maxim Orlovsky 94102fa597
PSBT Base64 serialization test cases 2021-02-22 12:46:22 +01:00
Dr Maxim Orlovsky 072e1d1b86
PSBT Display & FromStr using Base64 serialization 2021-02-22 12:46:22 +01:00
Andrew Poelstra 2414c5b0a9
Merge pull request #573 from darosior/standard_sighash
SigHashType: add a method to error on non-standard hashtypes
2021-02-21 15:34:58 +00:00
Andrew Poelstra 81c56dec60
Merge pull request #551 from LNP-BP/feat/key-error-derives
More derives for key::Error
2021-02-21 14:14:54 +00:00
Sebastian 3ecab20c17
Merge pull request #414 from stevenroose/amount-debug
Change Amount Debug impl to BTC with 8 decimals
2021-02-21 15:14:40 +01:00
Antoine Poinsot e36f3a38e4
transaction: deprecate SigHashType::from_u32 in favor of from_u32_consensus
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-02-19 11:36:44 +01:00
Dr Maxim Orlovsky 017cd71ca7
Improving bip32 ChildNumber display implementation 2021-02-11 23:06:24 +01:00
Nadav Ivgi a1e98a6796
Implement Ord for ParseLengthError 2021-01-22 00:27:28 +02:00
Nadav Ivgi 55657cbffb
Implement Error and Eq for ParseLengthError 2021-01-16 13:02:22 +02:00
Nadav Ivgi 0df86b4426
Switch to a single-variant error type, implement standard derives 2021-01-14 22:17:18 +02:00
Jeremy Rubin da21294ac5 Fix Optional Amount Serialization 2021-01-14 10:46:20 -08:00
Nadav Ivgi 4a7cf34eeb
Use efficient serialization for non-human-readable formats 2021-01-14 19:36:36 +02:00
Nadav Ivgi b70361370b
Make uint types (un)serializable 2021-01-14 19:36:35 +02:00
Nadav Ivgi 67ae602e2a
Implement Uint::from_be_slice()
Needed because Rust 1.29 does not easily allow converting from a slice
into an array.
2021-01-14 19:36:30 +02:00
Nadav Ivgi 3761b0d808 Implement Uint::to_be_bytes() 2021-01-14 19:28:02 +02:00
Dr Maxim Orlovsky 246713821d
More derives for key error 2021-01-14 16:03:53 +01:00
Steven Roose 61918dfe81
Change the signature of consensus_encode to return io::Error's
This is instead of encode::Errors because the encoders should
not be allowed to return errors that don't originate in the writer
they are writing into.

This is a part of the method definition that has been relied upon for a
while already.
2021-01-12 17:39:41 +00:00
Andrew Poelstra b48f374c2c
Merge pull request #542 from apoelstra/2021-01--keyread
PublicKey: add read_from method to be symmetric with write_into
2021-01-11 19:50:04 +00:00
Andrew Poelstra 92000bf51b PublicKey: add read_from method to be symmetric with write_into 2021-01-04 19:07:27 +00:00
Steven Roose 5fd92d1c09 psbt: Serialize maps with byte values using hex 2020-12-30 16:32:52 +01:00
Steven Roose a05f8feec6 serde_util: Rename the btreemap module to btreemap_as_seq
So that we can later distinguish other modules over maps.
2020-12-30 16:32:52 +01:00
Steven Roose a9c13272a0 psbt: Fix serde for maps with non-string keys and binary values 2020-12-30 16:32:52 +01:00
Steven Roose e5f3bca2b4 Add serde_utils module to fix JSON serialization 2020-12-30 16:32:52 +01:00
Steven Roose cdedb0a9d5 psbt::raw: Use hex::format_hex to format the raw key bytes 2020-12-30 16:32:52 +01:00
Steven Roose 94b7371424 Replace serde_struct_impl with derive-based impls 2020-12-30 16:32:52 +01:00
Steven Roose d527a2c2cf Remove the impl_array_newtype_show macro
Instead, implement Debug in impl_bytes_newtype.
2020-12-30 16:32:52 +01:00
Andrew Poelstra 1cc466fec6
Merge pull request #498 from LNP-BP/pending/derivation
Derivation path improvements, closes #473
2020-12-28 00:53:25 +00:00
Dr Maxim Orlovsky 7400bccb60
PSBT: proprietary keys type system according to BIP 174 2020-12-21 12:22:35 +01:00
Dr Maxim Orlovsky c3024c3ebb
PSBT: basic support for proprietary keys 2020-12-21 12:17:07 +01:00
Dr Maxim Orlovsky 44ffddab8c
Impl IntoDerivationPath for string types 2020-12-20 23:39:01 +01:00
Dr Maxim Orlovsky f9290438cd
DerivationPath improvements
Adding IntoDerivationPath trait
DerivationPath is_master function
DerivationPath constructor for empty path + Default impl
2020-12-20 23:39:01 +01:00
Dr Maxim Orlovsky 7f5c2795d6
PSBT global xpub merging algorithm reworked 2020-12-20 11:41:24 +01:00
Dr Maxim Orlovsky b84faa7f5e
PSBT: Improved global keys version and xpub handling 2020-12-16 16:46:28 +01:00
Dr Maxim Orlovsky 21c11e3315
BSPT: Improving global xpub merging algorithm 2020-12-16 16:39:46 +01:00
Dr Maxim Orlovsky 8b1666295c
Nits in new PSBT global types reviews 2020-12-15 16:04:02 +01:00
Dr Maxim Orlovsky 0235abfac2
Improving PSBT merge with dedicated 1.29 rustc borrow scope 2020-12-15 15:50:18 +01:00
Dr Maxim Orlovsky df8635c5fe
PSBT: Key pair serialization for new global keys
Conflicts:
	src/util/psbt/map/global.rs
2020-12-15 15:50:18 +01:00
Dr Maxim Orlovsky 2f838218a8
PSBT: merging new global keys
Plus necessary changes to BIP 32 implementations and error type
2020-12-15 15:47:37 +01:00
Dr Maxim Orlovsky af61d7e7bc
PSBT: adding global types (version, xpub) 2020-12-15 15:47:37 +01:00
Steven Roose 6df16b7ce2
Merge pull request #530 from LNP-BP/psbt/constants
PSBT types are now constants
2020-12-15 14:45:52 +00:00
Steven Roose 874ab8eca6
Make signed message prefix a public constant 2020-12-08 17:31:28 +00:00