1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
//! # Zcash Wallet Interchange Format (ZeWIF)
//!
//! `zewif` is a library that defines a standard data format for migrating wallet data
//! between different Zcash wallet implementations. It provides a comprehensive set of
//! types, tools, and utilities for serializing, deserializing, and manipulating Zcash
//! wallet data in a way that preserves all critical information during migration.
//!
//! ## Core Features
//!
//! * **Complete Wallet Data Model**: Represents all aspects of a Zcash wallet including
//! accounts, addresses, transactions, and keys
//! * **Multi-Protocol Support**: Handles the Transparent, Sapling, and Orchard Zcash protocols.
//! * **Type-Safe Representation**: Uses Rust's type system to ensure correct handling of Zcash concepts
//! * **Extensible Metadata**: Supports custom metadata through an attachments system
//!
//! ## Core Components
//!
//! The ZeWIF format is organized hierarchically:
//!
//! - [`Zewif`]: The root container holding wallets and global transaction data
//! - [`ZewifWallet`]: Individual wallet with accounts and network context
//! - [`Account`]: Logical grouping of addresses and transaction references
//! - [`Address`]: Individual addresses of various types (transparent, shielded, unified)
//! - [`Transaction`]: Complete transaction data (inputs, outputs, metadata)
//!
//! ## Protocol Support
//!
//! ZeWIF handles the Zcash protocol versions:
//!
//! - **Transparent**: Bitcoin-compatible public transactions ([`TransparentAddress`], [`TxIn`], [`TxOut`])
//! - **Sapling**: Improved shielded protocol ([`sapling`] module, [`sapling::SaplingSentOutput`], etc.)
//! - **Orchard**: Latest shielded protocol ([`orchard`] module, [`orchard::OrchardSentOutput`], etc.)
//!
//! ## Integration Path
//!
//! This crate is part of a larger ecosystem:
//!
//! - `zewif`: Core library defining the interchange format (this crate)
//! - `zmigrate`: Command-line tool for wallet migrations
//! - `zewif-zcashd`: ZCashd-specific integration for migration
//! - `zewif-zingo`: Zingo-specific integration for migration (future)
//!
//! ## Usage Examples
//!
//! ```no_run
//! use zewif::{Zewif, ZewifWallet, Network, Account, Address, BlockHeight};
//!
//! // Create a new ZeWIF container
//! let mut zewif = Zewif::new(BlockHeight::from_u32(2000000));
//!
//! // Create a new wallet for the main network
//! let mut wallet = ZewifWallet::new(Network::Main);
//!
//! // Add a new account to the wallet
//! let mut account = Account::new();
//! account.set_name("Default Account");
//!
//! // Add the account to the wallet and the wallet to the ZeWIF container
//! wallet.add_account(account);
//! zewif.add_wallet(wallet);
//! ```
// Macros
// Test utilities
mod_use!;
// Modules requiring qualified paths
// Modules that can use unqualified paths
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
mod_use!;
pub use HexParseError;
use ;
;
;