crates/monetize-site-buy/src/lib.rs
//! # monetize-site-buy: one buy flow for every product site
//!
//! The buyer stays on the product's own site (gunnar.rs, holger.rs) from the first page to the
//! last; the only outside page is the vendor's checkout. The site's thin layer relays every
//! step to the ONE monetize over the site's own bearer, and this crate is that relay — moved
//! from Gunnar's console (gunnar-ui-server `auth::signup`, `auth::private`, `api::subscription`,
//! `api::increase`, `auth::validate`), where the pattern was built, so Gunnar and Holger run
//! the same code and only their pages differ.
//!
//! | module | what |
//! |---|---|
//! | [`site`] | **the provider trait [`BuySite`]**: who asks, the product's actor tickets, the held caps, the paid sign-up's account |
//! | [`relay`] | the doors (Gunnar's JSON contract, path for path) and [`relay::router`] |
//! | [`link`] | [`ShopLink`]: the channel to the ONE monetize with the site's bearer |
//! | [`rules`] | the shapes checked before the shop is dialled, the market, the words a buyer may read |
//! | [`urls`] | the site's ways back from the vendor |
//! | [`purchase`] | the account's grow as the browser sees it (window, attempt) |
//! | [`assets`] | the buy pages' browser scripts, one copy, each site's settings filled in |
//! | [`limit`] | the buy doors' budgets per client (Gunnar's two-tier token bucket) |
//!
//! OPEN: no vendor, no price, no product code. Never part of monetize-impl.
pub mod assets;
pub mod ladders;
pub mod limit;
pub mod link;
pub mod purchase;
pub mod relay;
pub mod rules;
pub mod site;
#[cfg(feature = "testkit")]
pub mod testkit;
pub mod urls;
pub use link::{Door, ShopLink};
/// The wire this crate speaks (a site with its own vendored copy converts at its edge).
pub use monetize_proto;
pub use relay::{router, router_of, Answer, Ask, Doors, Relay, BUY_BODY_MAX};
pub use site::{Account, BuySite, Buyer, Member, Operator, Refusal, Who};
pub use urls::Pages;