Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Nostr SDK
Description
A high-level, Nostr client library written in Rust.
If you're writing a typical Nostr client or bot, this is likely the crate you need.
However, the crate is designed in a modular way and depends on several other lower-level crates. If you're attempting something more custom, you might be interested in these.
Getting started
use ;
use *;
async
More examples can be found in the examples/ directory.
WASM
This crate supports the wasm32 targets.
An example can be found at nostr-sdk-wasm-example repo.
On macOS, you need to install llvm:
brew install llvm
LLVM_PATH=$(brew --prefix llvm)
AR="${LLVM_PATH}/bin/llvm-ar" CC="${LLVM_PATH}/bin/clang" cargo build --target wasm32-unknown-unknown
NOTE: Currently nip03 feature not support WASM.
Crate Feature Flags
The following crate feature flags are available:
| Feature | Default | Description |
|---|---|---|
tor |
No | Enable support for embedded tor client |
pow-multi-thread |
No | Enable event POW mining using multi-threads |
all-nips |
No | Enable all NIPs |
nip03 |
No | Enable NIP-03: OpenTimestamps Attestations for Events |
nip04 |
No | Enable NIP-04: Encrypted Direct Message |
nip06 |
No | Enable NIP-06: Basic key derivation from mnemonic seed phrase |
nip44 |
No | Enable NIP-44: Encrypted Payloads (Versioned) |
nip47 |
No | Enable NIP-47: Nostr Wallet Connect |
nip49 |
No | Enable NIP-49: Private Key Encryption |
nip57 |
No | Enable NIP-57: Zaps |
nip59 |
No | Enable NIP-59: Gift Wrap |
Changelog
All notable changes to this library are documented in the CHANGELOG.md.
State
This library is in an ALPHA state, things that are implemented generally work but the API will change in breaking ways.
Donations
rust-nostr is free and open-source. This means we do not earn any revenue by selling it. Instead, we rely on your financial support. If you actively use any of the rust-nostr libs/software/services, then please donate.
License
This project is distributed under the MIT software license - see the LICENSE file for details