Commit Graph

17 Commits

Author SHA1 Message Date
Cryptoforge
2981c4d286 use u32 instead of consesus::BranchID for transaction building. Enables multichain useage. 2020-10-12 15:01:31 -07:00
Jack Grigg
c597db59a6 ff: Rename PrimeField::into_repr -> PrimeField::to_repr 2020-05-02 18:55:13 +12:00
Jack Grigg
49f119fb03 ff: Remove PrimeFieldRepr trait
The ff::PrimeField::Repr associated type now has the minimal necessary
bounds, which can be satisfied by a newtype around a byte array.
2020-04-23 18:15:14 +12: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
Jack Grigg
70857b0eed Pass Script to signature_hash by reference 2019-10-15 17:32:34 +13:00
Jack Grigg
3a8efd9e67 Address various clippy warnings/errors in zcash_primitives 2019-08-24 00:39:49 +01:00
Eirik Ogilvie-Wigley
b0d8747697 cargo fix --edition for zcash_primitives 2019-08-20 17:15:07 -06: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
dab3c002b7 Script opcode and data support
Overrides the shift-left operator for pushing opcodes onto the Script,
matching the notation used in zcashd.
2019-07-27 00:28:00 +01:00
Jack Grigg
999dcbfcab Migrate to blake2b_simd and blake2s_simd crates
The primary reason for migrating is that these crates provide APIs for
setting the personalisation string. This enables us to depend solely on
published crates, and thus publish our own crates.

The SIMD implementations are ported from libsodium.

Closes #67.
2019-07-10 13:12:14 -04:00
Jack Grigg
538de482f3 Update zcash_primitives crate to use ff crate 2019-01-06 09:31:20 +00:00
Jack Grigg
1a1c77536d cargo fmt 1.31.1 2019-01-03 21:52:06 +00:00
Jack Grigg
c9b23dfdef Extract single-TxOut hashing from signature_hash_data() for clarity 2018-11-30 23:13:39 +00:00
Jack Grigg
d707ebd321 Use Option<[u8; N]> for JoinSplit pubkey and signature in a transaction 2018-11-30 01:08:45 +00:00
Jack Grigg
1f11c404dc Convert Transaction into a wrapping struct with impl Deref
Users who have a Transaction can now only obtain an immutable reference
to its underlying data.
2018-11-09 08:34:49 +13:00
Jack Grigg
0c81695731 ZIP 243 2018-11-09 08:34:49 +13:00
Jack Grigg
2d8b1fe504 ZIP 143 2018-11-09 08:34:38 +13:00