#![cfg_attr(docsrs, feature(doc_cfg))]
#[cfg(any(
all(feature = "web", feature = "native"),
not(any(feature = "web", feature = "native"))
))]
compile_error!("subxt: exactly one of the 'web' and 'native' features should be used.");
mod background;
mod client;
mod platform;
#[cfg(feature = "web")]
#[allow(unused_imports)]
pub use getrandom as _;
pub use client::{AddedChain, LightClientRpc, RawLightClientRpc};
pub mod smoldot {
pub use smoldot_light::{
platform::PlatformRef, AddChainConfig, AddChainConfigJsonRpc, ChainId, Client,
JsonRpcResponses,
};
#[cfg(feature = "native")]
#[cfg_attr(docsrs, doc(cfg(feature = "native")))]
pub use smoldot_light::platform::default::DefaultPlatform;
}
#[derive(Debug, thiserror::Error)]
pub enum LightClientRpcError {
#[error("Failed to add the chain to the light client: {0}.")]
AddChainError(String),
#[error("RPC request cannot be sent: {0}.")]
Request(String),
}