//! Offer codec (roadmap #35).
//!
//! Canonical conversion between the wire `offer1...` text (the string users copy/paste) and the
//! underlying spend bundle, via chia-sdk-driver's offer compression. This is the codec only;
//! *constructing* an offer (swap asset A for B with royalties) needs trade managers + richer coin
//! selection than the keyless boundary cleanly supports and is deferred to a later wave. Taking an
//! offer is a settlement spend the wallet (Sage) already performs.
use SpendBundle;
use ;
use crate;
/// Encode a spend bundle into canonical offer text (`offer1...`).
///
/// # Errors
/// [`WalletError::Driver`] if the bundle cannot be compressed/encoded.
/// Decode canonical offer text (`offer1...`) into its spend bundle.
///
/// # Errors
/// [`WalletError::Driver`] if the text is not a valid offer.