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
//! # dig-offers — the DIG Network canonical Chia offers expert crate
//!
//! `dig-offers` is a **pure, key-free, network-free** SpendBundle-builder for Chia offers
//! (settlement per CHIP-0023/CHIP-0024). It constructs the exact
//! [`CoinSpend`](chia_protocol::CoinSpend)s for every offer operation — make, take, combine,
//! cancel, and summarize/inspect — over any asset (XCH / CAT / NFT), and reports the exact
//! signatures a caller must produce.
//!
//! ## The custody model (HARD invariants)
//!
//! dig-offers **never holds a secret key, never signs, and never touches the network.** Every
//! builder takes only public inputs (puzzle hashes, asset ids, public keys, and coins with their
//! lineage proofs) and appends unsigned coin spends to a caller-owned
//! [`chia_wallet_sdk::driver::SpendContext`]. The consumer signs the messages
//! reported by [`required_signatures`], assembles/combines the `SpendBundle`, and broadcasts. This
//! keeps the signing decision — and the secret key — entirely on the caller's side of the identity
//! boundary (#908).
//!
//! ## The make/take two-phase flow
//!
//! Building and assembling are split so the caller signs BETWEEN them, in ONE shared context:
//!
//! - **make:** [`make_build`] → [`required_signatures`] → caller signs → [`make_assemble`].
//! - **take:** [`take_build`] → [`required_signatures`] → caller signs → [`take_combine`].
//!
//! The two phases of each flow MUST share the same [`SpendContext`], because a parsed/requested
//! NFT carries an allocator-relative metadata pointer that only survives in that context.
//!
//! ## The requested-side rule (no self-fund)
//!
//! A make's requested side is an assertion plus a phantom carrier — never a settle action — so the
//! maker never funds both sides of its own offer. Settle actions appear only when taking. See
//! `SPEC.md` for the normative contract.
pub use cancel_build;
pub use combine;
pub use ;
pub use ;
pub use ;
pub use offer_id;
pub use required_signatures;
pub use summarize;
pub use ;
pub use ;
// Re-exports so a consumer need not depend on the SDK directly for the common surface.
pub use ;
pub use RequiredSignature;
/// The crate's semantic version, surfaced so a consumer can record which builder version produced
/// a spend.