libid_contracts/lib.rs
1//! Typed bindings, embedded forge artifacts, and deploy/upgrade helpers for
2//! the libid contract stack.
3//!
4//! The crate has three layers:
5//!
6//! - [`bindings`] — hand-written `alloy::sol!` interfaces for every contract a
7//! consumer talks to: the login stack (`Registry`, `WebWallet`,
8//! `WalletFactory`, verifiers), the Bank diamond, and the identity-names
9//! stack. Kept in lockstep with the Solidity sources in `solidity/contracts`.
10//! - [`artifacts`] — the compiled creation bytecode, link references, and
11//! method identifiers of every deployable contract, embedded at compile time
12//! ([`Artifacts::embedded`]) so deployment needs no filesystem at runtime. A
13//! directory-backed variant ([`Artifacts::from_dir`]) reads a forge `out/`
14//! tree instead.
15//! - [`deploy`] / [`diamond`] — generic deploy and upgrade primitives over any
16//! alloy [`Provider`](alloy::providers::Provider): plain deploys, constructor
17//! args, ERC1967 proxies, library linking, UUPS upgrades, and the Bank
18//! EIP-2535 diamond deploy/facet-replace flows.
19//! - [`factory`] — the deterministic-factory bootstrap: predict the canonical
20//! cross-network factory address, install it (and the keyless CREATE2
21//! deployer it hangs off) where missing, and deploy protocol proxies
22//! through it at name-derived CREATE3 addresses.
23//!
24//! Signing is the consumer's concern: every helper takes a provider you have
25//! already wired with a wallet.
26
27pub mod artifacts;
28pub mod bindings;
29pub mod deploy;
30pub mod diamond;
31mod error;
32pub mod factory;
33
34pub use artifacts::Artifacts;
35pub use error::{
36 Error,
37 Result,
38};