Skip to main content

cow_browser_wallet/
lib.rs

1//! `cow-browser-wallet` — EIP-1193 browser wallet adapter and WASM bindings.
2//!
3//! This is an **orthogonal** crate in the workspace: it does not belong to
4//! any of the architecture layers L0..L6 because it adapts the native SDK
5//! surface to a browser/WASM environment.
6//!
7//! # Submodules
8//!
9//! - [`wallet`] — [`BrowserWallet`](wallet::BrowserWallet) adapter around an EIP-1193 provider,
10//!   plus [`MockBrowserWallet`](wallet::MockBrowserWallet) for testing.
11//! - [`wasm`] — `wasm-bindgen` exports for browser/Node.js usage (enabled via the `wasm` feature
12//!   flag).
13
14#![warn(missing_docs)]
15#![cfg_attr(
16    feature = "wasm",
17    allow(unsafe_code, reason = "wasm-bindgen macro generates unsafe glue code")
18)]
19#![cfg_attr(not(feature = "wasm"), deny(unsafe_code))]
20
21pub mod wallet;
22
23#[cfg(feature = "wasm")]
24#[allow(unsafe_code, reason = "wasm-bindgen macro generates unsafe glue code")]
25pub mod wasm;