Skip to main content

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//!
20//! Signing is the consumer's concern: every helper takes a provider you have
21//! already wired with a wallet.
22
23pub mod artifacts;
24pub mod bindings;
25pub mod deploy;
26pub mod diamond;
27mod error;
28
29pub use artifacts::Artifacts;
30pub use error::{
31    Error,
32    Result,
33};