1 unstable release

0.7.1-unstable Jan 8, 2024

#2029 in Cryptography

Download history 19/week @ 2024-01-03 114/week @ 2024-01-10 7/week @ 2024-01-17 348/week @ 2024-01-24 354/week @ 2024-01-31 455/week @ 2024-02-07 382/week @ 2024-02-14 399/week @ 2024-02-21 371/week @ 2024-02-28 318/week @ 2024-03-06 289/week @ 2024-03-13 195/week @ 2024-03-20 648/week @ 2024-03-27 315/week @ 2024-04-03

1,476 downloads per month
Used in 2 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

~24MB
~410K SLoC