1#![doc = include_str!("../README.md")]
2#![doc = document_features::document_features!()]
4#![deny(missing_docs)]
7#![deny(rustdoc::broken_intra_doc_links)]
8#![cfg_attr(not(test), deny(clippy::unwrap_used))]
9
10#[cfg(client)]
12mod client;
13#[cfg(client)]
14pub mod extra;
15#[cfg(feature = "keys")]
16mod keys;
17#[cfg(feature = "signed_packet")]
18mod signed_packet;
19
20pub const DEFAULT_MINIMUM_TTL: u32 = 300;
22pub const DEFAULT_MAXIMUM_TTL: u32 = 24 * 60 * 60;
24pub const DEFAULT_RELAYS: [&str; 2] = ["https://relay.pkarr.org", "https://pkarr.pubky.org"];
26#[cfg(client)]
27pub const DEFAULT_CACHE_SIZE: usize = 1000;
29
30#[cfg(relays)]
31pub use client::builder::DEFAULT_REQUEST_TIMEOUT;
32
33#[cfg(all(client, not(wasm_browser)))]
35pub use client::blocking::ClientBlocking;
36#[cfg(client)]
37pub use client::cache::{Cache, CacheKey, InMemoryCache};
38#[cfg(client)]
39pub use client::{builder::ClientBuilder, Client};
40#[cfg(feature = "keys")]
41pub use keys::{Keypair, PublicKey};
42#[cfg(feature = "signed_packet")]
43pub use signed_packet::{SignedPacket, SignedPacketBuilder};
44
45#[cfg(dht)]
47pub use dht as mainline;
48#[cfg(feature = "signed_packet")]
49pub use ntimestamp::Timestamp;
50#[cfg(feature = "signed_packet")]
51pub use simple_dns as dns;
52
53pub mod errors {
54 #[cfg(feature = "keys")]
57 pub use super::keys::PublicKeyError;
58
59 #[cfg(feature = "signed_packet")]
60 pub use super::signed_packet::{SignedPacketBuildError, SignedPacketVerifyError};
61
62 #[cfg(client)]
63 pub use super::client::{BuildError, ConcurrencyError, PublishError, QueryError};
64}