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
//! Verifiable Intent (VI) support: Treeship as one `agent_attestation`
//! scheme inside a VI Layer 3 credential.
//!
//! [Verifiable Intent](https://verifiableintent.dev/) is an open, Mastercard-
//! maintained credential standard for agent commerce (draft v0.1, February
//! 2026). A user delegates bounded authority to an agent through a chain of
//! SD-JWTs: L1 (issuer → user), L2 (user → agent, with constraints and the
//! agent's key under `cnf`), and in autonomous mode two Layer 3 credentials
//! the agent signs itself: L3a for the payment network and L3b for the
//! merchant. Every layer is ES256 (ECDSA over P-256, SHA-256).
//!
//! This module is an independent implementation against the published draft
//! and its Python reference SDK. It is not endorsed by, and does not speak
//! for, the standard's maintainers. Byte formats follow the reference so that
//! credentials built here verify with the reference `verify_chain`, and vice
//! versa; the interop suite under `tests/vi-interop` holds that line.
//!
//! What Treeship adds is the value of the spec's own optional
//! `agent_attestation` claim (§9.2 of the v0.1 README): a signed statement,
//! chained into the agent's receipt chain, that names the session, the chain
//! head, the Merkle checkpoint over that chain, and the approval use the
//! action ran under. A verifier that does not know the scheme ignores the
//! claim, as the spec requires. One that does can fetch the session package
//! and check that the credential was minted at the end of exactly that
//! sequence of signed steps.
//!
//! Layout:
//! - [`jws`]: base64url, SHA-256, P-256 keys and ES256 compact JWS.
//! - [`sd_jwt`]: SD-JWT serialization, disclosures, selective presentations.
//! - [`mandate`]: a parsed view of an L2 mandate.
//! - [`constraints`]: the eight registered constraint types, checked the way
//! the reference checks them.
//! - [`l3`]: building L3a / L3b.
//! - [`attestation`]: the Treeship attestation statement and claim.
//! - [`verify`]: verifying L3 credentials against their L2 (and L2 against L1).
//! - [`keys`]: the agent's P-256 key at rest, sealed by the ship keystore.
pub use ;
pub use ;
pub use ;
pub use ;
pub use L2View;
pub use SdJwt;
pub use ;
/// Errors produced by the VI module.