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
//! Key types and serialization matching cardano-api
//!
//! This module provides key types and constants that align with the
//! cardano-api Key class pattern, including:
//!
//! - Bech32 prefixes for human-readable key encoding
//! - Bech32 encoding/decoding functions (with `bech32-encoding` feature)
//! - TextEnvelope type descriptions for key files
//! - Key hash types using Blake2b-224
//! - KES period handling
//!
//! # Bech32 Encoding
//!
//! Keys and addresses use Bech32 encoding with standard prefixes:
//!
//! | Type | Verification Key | Signing Key |
//! |------|-----------------|-------------|
//! | Payment | `addr_vk` | `addr_sk` |
//! | Stake | `stake_vk` | `stake_sk` |
//! | Pool | `pool_vk` | `pool_sk` |
//! | VRF | `vrf_vk` | `vrf_sk` |
//! | KES | `kes_vk` | `kes_sk` |
//!
//! # TextEnvelope Format
//!
//! Keys are stored in files using TextEnvelope JSON format with type descriptions.
//!
//! # Examples
//!
//! ## Using Prefix Constants
//!
//! ```rust
//! use cardano_crypto::key::bech32::*;
//!
//! assert_eq!(PAYMENT_VERIFICATION_KEY_PREFIX, "addr_vk");
//! assert_eq!(VRF_SIGNING_KEY_PREFIX, "vrf_sk");
//! ```
//!
//! ## Encoding Keys (requires `bech32-encoding` feature)
//!
//! ```rust,ignore
//! use cardano_crypto::key::encoding::{encode_vrf_verification_key, decode_vrf_verification_key};
//!
//! let vk = [0u8; 32];
//! let encoded = encode_vrf_verification_key(&vk).unwrap();
//! assert!(encoded.starts_with("vrf_vk1"));
//!
//! let decoded = decode_vrf_verification_key(&encoded).unwrap();
//! assert_eq!(decoded, vk);
//! ```
/// Bech32 human-readable prefix constants
/// TextEnvelope type description constants
/// Key hash types using Blake2b-224
/// KES period handling
/// Bech32 encoding and decoding functions
// Re-exports
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;