Andrew Poelstra
8231e25292
Merge pull request #586 from sanket1729/warn
...
fix warnings for sighashtype
2021-04-21 15:52:44 +00:00
Andrew Poelstra
da477f1041
Merge pull request #558 from LNP-BP/fix/error-derives-1
...
Non-API breaking derives for error & transaction types
2021-04-21 14:24:27 +00:00
Elichai Turkel
dc0e2b0a52
Merge pull request #582 from collinsmuriuki/collinsmuriuki-patch-1
...
doc: correct Transaction struct encode_signing_data_to doc comment
2021-04-07 14:27:02 +03:00
sanket1729
3545580bd9
fix warnings for sighashtype
2021-04-06 11:52:14 -07:00
Steven Roose
fe9242ce8b
Merge pull request #583 from sgeisler/2021-04-fix-ci
...
Don't fail CI if base image's apt db is outdated
2021-04-06 15:14:30 +01:00
Dr Maxim Orlovsky
7fe3c4a605
Non-API breaking derives for error types
2021-04-06 14:44:50 +02:00
Sebastian Geisler
7f2a7011a4
Don't fail CI if base image's apt db is outdated
2021-04-04 10:46:15 +02:00
Collins Muriuki
c4cfdbbd6a
doc: correct Transaction struct encode_signing_data_to doc comment
2021-04-03 23:52:09 +03:00
Sebastian
1326f7d2a8
Merge pull request #569 from stevenroose/static-asm
...
Make Script::fmt_asm a static method and add Script::str_asm
2021-03-31 23:45:03 +02:00
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
851a3a15c0
Make Script::fmt_asm a static method and add Script::str_asm
...
This makes it convenient to print/construct the script assembly on
byte slices withoout having to clone them to copy them to create a
Script struct.
2021-03-13 22:16:20 +00:00
Steven Roose
96fa4b7d9b
Implement AsRef<[u8]> for Script
2021-03-13 22:13:39 +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
Matt Corallo
c4f339f9fc
Merge pull request #572 from jkczyz/2021-02-validate-pow-block-hash
...
Return BlockHash from BlockHeader::validate_pow
2021-02-19 15:23:45 -08: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
Antoine Poinsot
bf98d9fd60
transaction: add a method to err on non-standard types to SigHashType
...
Right now, any sighash type could be parsed without error, which matches
consensus rules. However most of them would be invalid by standardness,
so it's a bit footgun-y (even more so for pre-signed transactions
protocols for which standardness is critical).
This adds `from_u32_standard()`, which takes care to error if we are
passed an invalid-by-current-policy-rules SIGHASH type.
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-02-19 11:12:02 +01:00
Antoine Poinsot
466f161e0b
transaction: document why we mask sighash types with 0x9f
...
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
Co-Authored-by: sanket1729 <sanket1729@gmail.com>
2021-02-19 00:27:02 +01:00
Antoine Poinsot
7f73d5f7db
doc: correct SigHashType doc comment
...
Super nit, but a hashtype is not specific to a transaction but a
signature.
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-02-18 19:48:39 +01:00
Jeffrey Czyz
ade2bcee8e
Return BlockHash from BlockHeader::validate_pow
...
Validating a block's proof-of-work involves computing the block hash.
Returning it from BlockHeader::validate_pow avoids having callers
recompute the block hash if it is needed.
2021-02-17 17:40:17 -08:00
Dr Maxim Orlovsky
017cd71ca7
Improving bip32 ChildNumber display implementation
2021-02-11 23:06:24 +01:00
Sebastian
5bd61967b2
Merge pull request #566 from TheBlueMatt/2021-02-dust-value
...
Add Script:dust_value() to get minimum output value for a spk
2021-02-07 11:45:17 +01:00
Sebastian
80b47f1f5b
Merge pull request #565 from sgeisler/2021-02-rbf
...
Add function to check RBF-ness of transactions
2021-02-06 16:39:53 +01:00
Matt Corallo
6622de4041
Add Script:dust_value() to get minimum output value for a spk
2021-02-05 15:26:56 -05:00
Sebastian
90f3529589
Merge pull request #511 from shesek/202011-uint-serde
...
Make uint types (un)serializable
2021-02-05 17:47:54 +01:00
Sebastian Geisler
e98f14387d
Add function to check RBF-ness of transactions
2021-02-04 22:15:26 +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
Andrew Poelstra
c9c2e452e2
Merge pull request #533 from apoelstra/2020-12--0.26.0
...
bump version to 0.26
2021-01-14 17:11:46 +00:00
Dr Maxim Orlovsky
246713821d
More derives for key error
2021-01-14 16:03:53 +01:00
Andrew Poelstra
010068ba32
bump version to 0.26
2021-01-12 23:26:10 +00:00
Elichai Turkel
d2344d3d61
Merge pull request #494 from stevenroose/encode-io-err
...
Change the signature of consensus_encode to return io::Error's
2021-01-12 21:21:00 +02: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