gnostr-types

Crates.iognostr-types
lib.rsgnostr-types
version0.0.64
sourcesrc
created_at2024-01-08 20:06:05.597733
updated_at2024-11-06 19:07:31.899294
descriptiongnostr: a git+nostr workflow utility
homepagehttps://github.com/gnostr-org/gnostr-bins
repositoryhttps://github.com/gnostr-org/gnostr-bins
max_upload_size
id1092939
size576,161
@RandyMcMillan (RandyMcMillan)

documentation

https://docs.rs/gnostr-bins

README

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.

Commit count: 124

cargo fmt