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
//! APH configuration constants — version pins, default TTLs, JCS profile.
/// APH protocol version pin. Bump only with coordinated rollout.
pub const APH_VERSION: &str = "0.1";
/// W3C VC 2.0 context URL.
pub const W3C_VC_CONTEXT_V2: &str = "https://www.w3.org/ns/credentials/v2";
/// APH context URL (resolves to the published `aph` repo's `v1` JSON-LD context).
pub const APH_CONTEXT_V1: &str = "https://w3id.org/aph/v1";
/// Default mandate TTL: 24 hours. Per-channel adapter may override.
pub const DEFAULT_MANDATE_TTL_SECONDS: u64 = 24 * 60 * 60;
/// Maximum body preview lines included in `communication.preview` field.
pub const MAX_PREVIEW_LINES: usize = 5;
/// Maximum body size in bytes that a Verifier MUST accept without truncation
/// requirement. Larger bodies still notarize but Verifiers MAY decline preview.
pub const MAX_BODY_PREVIEW_BYTES: usize = 8 * 1024;
/// Signature algorithm identifier — ES256 (p256 ECDSA over SHA-256).
pub const ALG_ES256: &str = "ES256";
/// Signature algorithm identifier — EdDSA (Ed25519).
pub const ALG_EDDSA: &str = "EdDSA";
/// JSON-LD `type` discriminator for an APH credential.
pub const APH_CREDENTIAL_TYPE: &str = "AgentSendAuthorizationCredential";
/// `cryptosuite` identifier for Data Integrity Proof, JCS-canonicalized EdDSA.
pub const APH_DI_CRYPTOSUITE: &str = "eddsa-jcs-2022";