Cargo Features

[dependencies]
nostr = { version = "0.30.0", default-features = false, features = ["std", "alloc", "blocking", "all-nips", "nip03", "nip04", "nip05", "nip06", "nip07", "nip11", "nip44", "nip46", "nip47", "nip49", "nip57", "nip59"] }
default = all-nips, std

These default features are set whenever nostr is added without default-features = false somewhere in the dependency tree.

std default

Enables once_cell, rand-std and std of bitcoin ^0.31, preserve_order and std of serde_json, std of optional wasm-bindgen, std of optional base64 ^0.21 and optional bip39, std of tracing and optional unicode-normalization, std of negentropy, optional cbc, optional chacha20, and optional chacha20poly1305 and url

Used in std

and std of serde and optional scrypt

serde:

Provide impls for common standard library types like Vec<T> and HashMap<K, V>.
Requires a dependency on the Rust standard library.

Affects key::vanity, nostr::Result, nip04::encrypt, nip06::FromMnemonic.from_mnemonic, nip06::FromMnemonic.from_mnemonic_with_account, nip06::FromMnemonic.from_mnemonic_advanced, nip26::sign_delegation, nip26::verify_delegation_signature, nip44::encrypt, v2::encrypt_to_bytes, nip57::anonymous_zap_request, nip57::private_zap_request, nip59::extract_rumor, util::SECP256K1, nips::nip05, nips::nip11, nips::nip46

alloc

Enables no-std of bitcoin ^0.31, alloc of optional base64 ^0.21 and url-fork

Used for no_std

and alloc of serde, serde_json, optional cbc, and optional chacha20poly1305

serde:

Provide impls for types in the Rust core allocation and collections library including String, Box<T>, Vec<T>, and Cow<T>. This is a subset of std but may be enabled without depending on all of std.

blocking

Enables blocking of optional reqwest

Affects nip05::verify_blocking, nip05::get_profile_blocking

all-nips default = nip04, nip05, nip06, nip07, nip11, nip44, nip46, nip47, nip49, nip57, nip59
nip03

Enables nostr-ots

nip04 all-nips nip46? nip47?

Enables aes, base64 ^0.21, and cbc

Affects nips::nip04

nip05 all-nips

Enables reqwest

Affects nips::nip05

nip06 all-nips

Enables bip39

Affects nips::nip06

nip07 all-nips

Enables js-sys, wasm-bindgen, wasm-bindgen-futures, and web-sys

Affects nips::nip07

nip11 all-nips

Enables reqwest

Affects nips::nip11

nip44 all-nips nip46? nip59?

Enables base64 ^0.21 and chacha20

Affects nips::nip44, util::hkdf

nip46 all-nips = nip04, nip44

Affects nips::nip46

nip47 all-nips = nip04

Affects nips::nip47

nip49 all-nips

Enables chacha20poly1305, scrypt, and unicode-normalization

Affects nips::nip49

nip57 all-nips

Enables aes and cbc

Affects nips::nip57

nip59 all-nips = nip44

Affects nips::nip59