Expand description
Transactions and transaction-related structures.
Re-exportsยง
pub use crate::sapling::FieldNotPresent;
Modulesยง
- arbitrary
- Arbitrary data generation for transaction proptests
- auth_
digest ๐ - Authorizing digests for Zcash transactions.
- compat ๐
- Conversions between Zebra and
zcash_primitivestransaction types. - hash ๐
- Transaction identifiers for Zcash.
- joinsplit ๐
- lock_
time ๐ - Transaction LockTime.
- memo ๐
- serialize ๐
- Contains impls of
ZcashSerialize,ZcashDeserializefor all of the transaction types, so that all of the serialization logic is in one place. - sighash ๐
- Signature hashes for Zcash transactions
- unmined ๐
- Unmined Zcash transaction identifiers and transactions.
- zip317
- An implementation of the [ZIP-317] fee calculations for UnminedTxs:
Structsยง
- Auth
Digest - An authorizing data commitment hash as specified in ZIP-244.
- Hash
- A transaction ID, which uniquely identifies mined v5 transactions, and all v1-v4 transactions.
- Hash
Type - The different SigHash types, as defined in https://zips.z.cash/zip-0143
- Join
Split Data - A bundle of
JoinSplitdescriptions and signature data. - Memo
- A 512-byte (plaintext) memo associated with a note, as described in protocol specification ยง5.5.
- Recording
Reader ๐ - An
io::Readwrapper that records every byte consumed, for post-parse validation. - Serialized
Transaction - A serialized transaction.
- SigHash
- A Signature Hash (or SIGHASH) as specified in https://zips.z.cash/protocol/protocol.pdf#sighash
- SigHasher
- A SigHasher context which stores precomputed data that is reused between sighash computations for the same transaction.
- Transaction
- A Zcash transaction, wrapping
zcash_primitives::transaction::Transaction. - Unmined
Tx - An unmined transaction, and its pre-calculated unique identifying ID.
- Verified
Unmined Tx - A verified unmined transaction, and the corresponding transaction fee.
- WtxId
- A witnessed transaction ID, which uniquely identifies unmined v5 transactions.
Enumsยง
- Lock
Time - A Bitcoin-style
locktime, representing either a block height or an epoch time. - TxVersion
- The set of defined transaction format versions.
- Unmined
TxId - A unique identifier for an unmined transaction, regardless of version.
Constantsยง
- MEMPOOL_
TRANSACTION_ COST_ THRESHOLD - The minimum cost value for a transaction in the mempool.
- MIN_
TRANSPARENT_ TX_ SIZE - All txs must have at least one input, a 4 byte locktime, and at least one output.
- MIN_
TRANSPARENT_ TX_ V4_ SIZE - The minimum transaction size for v4 transactions.
- MIN_
TRANSPARENT_ TX_ V5_ SIZE - The minimum transaction size for v5 transactions.
- SPROUT_
CIPHERTEXT_ SIZE - The size of one Sprout note ciphertext.
Functionsยง
- deserialize_
and_ ๐check - Parses a transaction and runs the parse-time consensus checks that
zcash_primitivesdoes not enforce. Both deserialization impls go through this function, so a transaction cannot reach aTransactionvalue without passing the checks. - sprout_
joinsplit_ key_ proof_ and_ ciphertexts - Returns the
ephemeralKey, proof, andencCiphertextsof a Sprout JoinSplit description. - v4_
empty_ ๐sapling_ value_ balance - Reads the
valueBalanceSaplingfield of a V4 transaction that has no Sapling spends or outputs, from the bytes that were consumed while parsing it.