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
Steven Roose
5fd92d1c09
psbt: Serialize maps with byte values using hex
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
94b7371424
Replace serde_struct_impl with derive-based impls
2020-12-30 16:32:52 +01:00
Dr Maxim Orlovsky
c3024c3ebb
PSBT: basic support for proprietary keys
2020-12-21 12:17:07 +01:00
Dr Maxim Orlovsky
af61d7e7bc
PSBT: adding global types (version, xpub)
2020-12-15 15:47:37 +01:00
Dr Maxim Orlovsky
27037e2c72
PSBT: Making RIPEMD160 hash match standard name
2020-12-05 15:46:30 +01:00
Dr Maxim Orlovsky
9b106ee161
PSBT: making BIP32 field name match spec type names
2020-12-05 15:45:20 +01:00
Andrew Poelstra
35d729d9f0
Merge pull request #478 from sanket1729/psbt_again
...
Psbt hash preimages (again)
2020-11-05 17:49:58 +00:00
Dr Maxim Orlovsky
00c3466363
Serde implementation for PSBT
2020-10-14 16:31:24 +02:00
sanket1729
57b63d4b52
Add tests for psbt hash serde
2020-10-11 21:51:03 -05:00
Dr Maxim Orlovsky
c098dfa7f2
BIP32 KeySource refactored to type aliace
2020-09-14 00:37:29 +02:00
Dr Maxim Orlovsky
aa67f10162
Introducing `bip32::KeySource`: wrapper for `(Fingerprint, DerivationPath)`
2020-09-13 22:49:52 +02:00
Andrew Poelstra
c94295c3a9
Revert "Added hash Preimages to psbt"
2020-09-11 11:31:10 +00:00
sanket1729
c1eafff9ef
Added Sighash calculation for psbt
2020-09-11 01:01:33 -05:00
sanket1729
e97dda0ffe
Add tests for psbt serde
2020-09-09 12:53:09 -05:00
Elichai Turkel
3f2d428706
Remove needless references
2020-03-29 17:15:14 +03:00
Elichai Turkel
c19b736566
Remove the hex dependency
2020-01-20 18:50:02 +02:00
Dr Maxim Orlovsky
ec92a05682
New HashTypes defined according to #284 (WIP), Txid is completed
2020-01-01 13:41:42 +01:00
Steven Roose
0469453da6
Use psbt::Error in PartiallySignedTransaction::from_unsigned_tx
2019-12-09 14:19:07 +00:00
Steven Roose
48f4c1989f
Rename bitcoin_hashes dependency to hashes
2019-08-16 15:52:27 +01:00
Riccardo Casatta
7d6687451a
use BTreeMap instead of HashMap to always serialize the same ( #310 )
...
* use BTreeMap instead of HashMap to always serialize the same
* fix rust 1.22 error
* psbt fuzz roundtrip
* psbt fuzz roundtrip on our ser
2019-08-09 17:03:12 +02:00
Andrew Poelstra
3b9a94a178
eliminate type parameter from the `Decodable` trait
2019-07-11 17:23:01 +00:00
Andrew Poelstra
42960b959f
eliminate type parameter from `Encodable` trait
2019-07-11 17:21:19 +00:00
Andrew Poelstra
b734d6488a
make consensus_encode return the encoded length
2019-07-11 17:15:32 +00:00
Andrew Poelstra
7e6ad7c893
rename Encoder to WriteExt and Decoder to ReadExt
2019-07-11 15:01:38 +00:00
Steven Roose
d4282353c9
Two serde quirks from switching dependencies
2019-05-31 10:18:57 +01:00
Carl Dong
e5b59120c5
Add copyright notice to PSBT-related files
2019-02-28 11:11:55 -05:00
Carl Dong
bc73b315cb
Add test vectors from BIP174 specification
...
- Add macro for decoding and unwrapping PartiallySignedTransaction from
hex string
2019-02-28 11:11:55 -05:00
Carl Dong
39fd567b56
Add Partially Signed Transaction type
...
- Add merging logic for PartiallySignedTransactions
- Add (en)decoding logic for PartiallySignedTransaction
- Add converting constructor logic from Transaction for
PartiallySignedTransaction
- Add extracting constructor logic from PartiallySignedTransaction for
Transaction
Squashed in fixes from stevenroose <stevenroose@gmail.com>
- Prevent PSBT::extract_tx from panicking
- Make PartiallySignedTransaction fields public
2019-02-28 11:11:55 -05:00
Carl Dong
badb0f2a77
Add PSBT input data key-value map type
...
- Implement psbt::Map trait for psbt::Input
- Add (en)decoding logic for psbt::Input
- Implement PSBT (de)serialization trait for relevant psbt::Input types
2019-02-28 11:11:55 -05:00
Carl Dong
9c08dbae47
Add PSBT output data key-value map type
...
- Implement psbt::Map trait for psbt::Output
- Add (en)decoding logic for psbt::Output
- Implement PSBT (de)serialization trait for relevant psbt::Output types
- Add macro for merging fields for PSBT key-value maps
- Add macro for implementing decoding logic for PSBT key-value maps
- Add convenience macro for implementing both encoding and decoding
logic for PSBT key-value maps
- Add macro for inserting raw PSBT key-value pairs into PSBT key-value
maps
- Add macro for getting raw PSBT key-value pairs from PSBT key-value
maps
2019-02-28 10:54:53 -05:00
Carl Dong
115f8c043c
Add PSBT global data key-value map type
...
- Implement psbt::Map trait for psbt::Global
- Add converting constructor logic from Transaction for psbt::Global
- Add (en)decoding logic for psbt::Global
- Always deserialize unsigned_tx as non-witness
- Add trait for PSBT (de)serialization
- Implement PSBT (de)serialization trait for relevant psbt::Global types
- Add macros for consensus::encode-backed PSBT (de)serialization
implementations
- Add macro for implementing encoding logic for PSBT key-value maps
2019-02-28 10:54:53 -05:00
Carl Dong
2715a6e777
Add trait for PSBT key-value maps
2019-02-28 10:54:53 -05:00
Carl Dong
528e39334c
Add data types for raw PSBT key-value pairs
...
- Add (en)decoding logic for said data types
2019-02-28 10:54:53 -05:00
Carl Dong
4fa39c4a3e
Add PSBT-specific Error data type
...
- Implement psbt::Error data type
- Implement conversion from psbt::Error to util::Error
- Create util::psbt module
- Create non-public util::psbt::error module
2019-02-28 10:54:53 -05:00