10 releases

0.7.5 Sep 11, 2024
0.7.4-unstable Sep 11, 2024
0.7.1-unstable Jan 8, 2024
0.0.64 Nov 6, 2024
0.0.63 Sep 23, 2024

#1437 in Cryptography

Download history 8/week @ 2024-08-12 7/week @ 2024-08-19 10/week @ 2024-08-26 93/week @ 2024-09-02 135/week @ 2024-09-09 550/week @ 2024-09-16 4147/week @ 2024-09-23 3558/week @ 2024-09-30 3530/week @ 2024-10-07 3498/week @ 2024-10-14 3485/week @ 2024-10-21 2657/week @ 2024-10-28 3387/week @ 2024-11-04 3508/week @ 2024-11-11 3476/week @ 2024-11-18 1245/week @ 2024-11-25

11,974 downloads per month
Used in 3 crates

MIT license

445KB
10K SLoC

nostr-types

Crates.io MIT licensed Stable Docs Master Docs

nostr-types is a crate defining types useful for the nostr protocol.

We wrap all basic types. An i64 may or may not be a Unixtime. A &str might be a hex encoded private key, or it might be somebody's name. By using types for everything, common mistakes can be avoided.

We have extensive serde implementations for all types which are not simple to serialize such as Tag.

Private keys remember if you've seen them or imported them and set themselves to Weak if you have. Generated private keys start out as Medium. We don't support Strong yet which will require a hardware token. (Note: there are ways to leak a private key without it knowing, so if it says Medium that is the maximum security, not a guaranteed level of security). Private keys can be imported and exported in a password-keyed encrypted form without weakening their security.

License

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.

Dependencies

~26MB
~401K SLoC