causeway_zec/lib.rs
1//! Causeway off-chain helpers for Zcash transparent assets.
2//!
3//! - [`address`] — t-address derivation (Causeway tweak + hash160 +
4//! Base58Check)
5//! - [`tx`] — build an unsigned v5 transparent tx + ZIP-244 v5 sighash
6//! - [`sign`] — splice DER signature + pubkey into the scriptSig
7
8#![forbid(unsafe_code)]
9
10pub mod address;
11pub mod tx;
12pub mod sign;
13
14#[derive(thiserror::Error, Debug)]
15pub enum ZecError {
16 #[error("derivation: {0}")]
17 Derivation(#[from] causeway_derive::tweak::TweakError),
18 #[error("invalid pubkey")]
19 InvalidPubkey,
20 #[error("invalid script")]
21 InvalidScript,
22 #[error("encoding: {0}")]
23 Encoding(String),
24 #[error("zcash: {0}")]
25 Zcash(String),
26}