Commit Graph

31 Commits

Author SHA1 Message Date
Aditya Kulkarni
3ccadf3017 Add binding signature only if needed 2020-04-04 10:29:30 -07:00
Jack Grigg
2d30c29d06 Pass &impl TxProver to Builder::build
This allows the caller to build multiple transactions with a single
proving backend.
2020-02-08 00:37:31 +00:00
Jack Grigg
76e0f658c1 Rename CommitmentTreeWitness -> MerklePath 2020-02-08 00:36:40 +00:00
Jack Grigg
3a3008caf9 Pass CommitmentTreeWitness directly into Builder::add_sapling_spend
This is more likely to be the data that the caller has available, and
is all we need now that a CommitmentTreeWitness can compute its root.
2020-02-07 17:31:38 +00:00
Jack Grigg
c24024b8e1 Create a consensus::BranchId enum for type safety
Includes all currently-known consensus branch IDs for the Zcash network.
2019-11-25 21:04:20 +00:00
Aditya Kulkarni
219391ac92 Add missing sighash declaration 2019-11-14 09:54:07 -08:00
Jack Grigg
8d6f882510 Renames after moves 2019-11-13 19:21:47 +00:00
Jack Grigg
8d967c8609 Move transparent input pushing onto TransparentInputs 2019-11-13 19:20:09 +00:00
Jack Grigg
d9d50b98ab Move transparent signing onto TransparentInputs 2019-11-13 19:12:55 +00:00
Aditya Kulkarni
fab9160b26 transparent inputs should use serialize_der() 2019-10-15 17:46:33 +13:00
Jack Grigg
3425eabda2 transaction::Builder::add_transparent_input() 2019-10-15 17:42:46 +13:00
NikVolf
b42477a0bf update from rand_os to fix warnings 2019-09-28 10:48:43 +03:00
Jack Grigg
abbd43ff57 Make pk_d validity an invariant of PaymentAddress
Introduces a PaymentAddress::from_parts constructor, and getters for
the diversifier and pk_d fields (which are now private).
2019-09-04 19:48:35 -04:00
Jack Grigg
fe93f2ff6b Rename into_ -> to_ where &self is used. 2019-08-24 00:39:54 +01:00
Jack Grigg
3a8efd9e67 Address various clippy warnings/errors in zcash_primitives 2019-08-24 00:39:49 +01:00
Eirik Ogilvie-Wigley
f523ac285d cargo fmt 2019-08-20 17:17:21 -06:00
Eirik Ogilvie-Wigley
b0d8747697 cargo fix --edition for zcash_primitives 2019-08-20 17:15:07 -06:00
Eirik Ogilvie-Wigley
81c58172c3 cargo fmt zcash_primitives 2019-08-15 10:39:55 -06:00
Jack Grigg
5fb9b86ba0 Move Jubjub, Pedersen hash and primitives into zcash_primitives 2019-08-14 10:47:22 +01:00
Jack Grigg
7ea6d10480 Move redjubjub into zcash_primitives 2019-08-14 10:43:25 +01:00
Jack Grigg
1760b275a7 Simplify transaction builder tests
Requires impl PartialEq for Transaction, which is implemented as a TxId
comparison (relying on the invariant that Transaction is immutable).
2019-08-13 15:24:08 +01:00
Jack Grigg
3a73f946c5 Simplify structure of transaction builder errors 2019-08-13 15:10:57 +01:00
Jack Grigg
7c07914bfd Separate Amount::{from_i64, from_nonnegative_i64} APIs
This is more intuitive than a boolean flag for handling non-negative
Amounts stored in i64 values.
2019-08-08 00:55:23 +01:00
Jack Grigg
59ed258c7f Make Amount opaque, and use it more
This helps to ensure type-safety of values that are required to satisfy
zatoshi range bounds.
2019-07-27 00:35:29 +01:00
Jack Grigg
ab60b8804a impl operators for Amount 2019-07-27 00:35:28 +01:00
Jack Grigg
0ea4408d46 Amount::{zero, is_positive, is_negative} 2019-07-27 00:35:27 +01:00
Jack Grigg
17f6bbcc67 Pass tx builder RNG to spend_sig() 2019-07-27 00:35:04 +01:00
Jack Grigg
532299d46e Allow transaction::Builder RNG to be configured 2019-07-27 00:32:56 +01:00
Jack Grigg
4b61120cd0 Pass tx builder RNG to SaplingNoteEncryption 2019-07-27 00:31:16 +01:00
Jack Grigg
a1cd9dfbac transaction::Builder::add_transparent_output() 2019-07-27 00:28:02 +01:00
Jack Grigg
1862354ea6 Sapling transaction builder 2019-07-27 00:27:50 +01:00