0.35.1 • Published 8 months ago

@rust-nostr/nostr v0.35.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Nostr

⚠️ Deprecated ⚠️

Use nostr-sdk instead.

Description

JavaScript bindings of nostr library.

If you're writing a typical Nostr client or bot, you may be interested in nostr-sdk.

This library should work on every JavaScript environment (nodejs, web, react native, ...).

Getting started

npm i @rust-nostr/nostr
const { Keys, loadWasmAsync } = require("@rust-nostr/nostr");

async function main() {
    // Load WASM 
    // if you are in a non async context, use loadWasmSync()
    await loadWasmAsync();

    // Generate random keys
    let keys = Keys.generate();

    // Hex keys
    console.log("Public key (hex): ", keys.publicKey.toHex());
    console.log("Secret key (hex): ", keys.secretKey.toHex());

    // Bech32 keys
    console.log("Public key (bech32): ", keys.publicKey.toBech32());
    console.log("Secret key (bech32): ", keys.secretKey.toBech32());
}

main();

More examples can be found in the examples directory.

Supported NIPs

Look at https://github.com/rust-nostr/nostr/tree/master/crates/nostr#supported-nips (the Js library could be out of sync with the supported NIPs in the nostr rust crate)

Book

Learn more about rust-nostr at https://rust-nostr.org.

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

0.35.1

8 months ago

0.35.0

10 months ago

0.34.0

11 months ago

0.33.0

12 months ago

0.32.1

1 year ago

0.14.1

1 year ago

0.32.0

1 year ago

0.14.0

1 year ago

0.13.1

1 year ago

0.13.0

1 year ago

0.12.0

1 year ago

0.11.0

1 year ago

0.10.0

1 year ago

0.9.0

1 year ago

0.8.0

1 year ago

0.7.0

1 year ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.2

2 years ago

0.3.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago