Go to file
Henry de Valence 56d7391f6d Add convenience methods to Transaction.
Because we represent each transaction version as a different variant of the
Transaction enum, we end up in a situation where fields that are common to
different transaction versions are awkward to access, requiring a match
statement with identical match arms.

To fix this, this commit adds the following convenience methods:

* `Transaction::inputs() -> impl Iterator<Item=&TransparentInput>`;
* `Transaction::outputs() -> impl Iterator<Item=&TransparentOutput>`;
* `Transaction::lock_time() -> LockTime`;
* `Transaction::expiry_height() -> Option<ExpiryHeight>`;

The last returns an `Option` because the field is only present in V3 and V4
transactions.

There are some remaining fields that do not get common accessors, because it
probably doesn't make sense to access independently of knowing the transaction
version: `joinsplit_data`, `shielded_data`, `value_balance`.
2020-02-14 18:23:41 -05:00
.github/workflows Try building internal docs. 2020-02-10 18:12:43 -08:00
design Update zebra-network Monodraw diagram. 2019-10-24 15:06:02 -07:00
zebra-chain Add convenience methods to Transaction. 2020-02-14 18:23:41 -05:00
zebra-client Fix authorship, license information. (#55) 2019-10-08 09:25:59 -07:00
zebra-consensus Fix authorship, license information. (#55) 2019-10-08 09:25:59 -07:00
zebra-network Add a FindBlocks request to get initial block hashes. 2020-02-14 18:23:41 -05:00
zebra-rpc Fix authorship, license information. (#55) 2019-10-08 09:25:59 -07:00
zebra-script Fix authorship, license information. (#55) 2019-10-08 09:25:59 -07:00
zebra-storage Fix authorship, license information. (#55) 2019-10-08 09:25:59 -07:00
zebrad Add a FindBlocks request to get initial block hashes. 2020-02-14 18:23:41 -05:00
.firebaserc Try building internal docs. 2020-02-10 18:12:43 -08:00
.gitignore Update .gitignore 2020-02-04 18:04:53 -05:00
.rustfmt.toml Tracing endpoint (#3) 2019-09-09 13:05:42 -07:00
Cargo.lock Bump tracing-futures from 0.2.1 to 0.2.2 2020-02-14 17:48:44 -05:00
Cargo.toml Upgrade tokio, futures, hyper to released versions. 2019-12-13 17:42:15 -05:00
Dockerfile Try debian:buster-slim instead of alpine 2020-01-30 13:39:13 -05:00
LICENSE-APACHE Add copyright marks on each license 2019-11-14 11:50:49 -08:00
LICENSE-MIT Add copyright marks on each license 2019-11-14 11:50:49 -08:00
README.md Update zebrad docs and README. 2020-02-12 12:50:55 -08:00
clippy.toml Apply clippy fixes 2020-02-05 12:42:32 -08:00
cloudbuild.yaml 0.17.0 has an old version cached, rolling back to 0.15.0 2020-02-04 04:44:38 -05:00
firebase.json Configure redirect for firebase hosting 2020-01-16 18:38:16 -05:00

README.md

zebra 🦓

Hello! I am Zebra, an ongoing Rust implementation of a Zcash node.

Zebra is a work in progress. It is developed as a collection of zebra-* libraries implementing the different components of a Zcash node (networking, chain structures, consensus rules, etc), and a zebrad binary which uses them.

Most of our work so far has gone into zebra-network, building a new networking stack for Zcash, and zebra-chain, building foundational data structures.

Rendered docs from the main branch.

Join us on Discord.

License

Zebra is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT.