Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikedilger/nostr-types
nostr protocol types for rust language development
https://github.com/mikedilger/nostr-types
nostr
Last synced: 3 months ago
JSON representation
nostr protocol types for rust language development
- Host: GitHub
- URL: https://github.com/mikedilger/nostr-types
- Owner: mikedilger
- License: mit
- Created: 2022-11-16T05:18:39.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-22T21:17:00.000Z (6 months ago)
- Last Synced: 2024-05-22T22:29:40.163Z (6 months ago)
- Topics: nostr
- Language: Rust
- Homepage:
- Size: 515 KB
- Stars: 34
- Watchers: 5
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
- awesome-nostr - nostr-types - types.svg?style=social) - a rust library defining types useful for the nostr protocol (Libraries / Client reviews and/or comparisons)
README
# nostr-types
[![Crates.io][crates-badge]][crates-url]
[![MIT licensed][mit-badge]][mit-url]
[![Stable Docs][doc-badge]][doc-url]
[![Master Docs][doc2-badge]][doc2-url][crates-badge]: https://img.shields.io/crates/v/nostr-types.svg
[crates-url]: https://crates.io/crates/nostr-types
[doc-badge]: https://img.shields.io/badge/docs-stable-green.svg
[doc-url]: https://docs.rs/nostr-types
[doc2-badge]: https://img.shields.io/badge/docs-master-yellow.svg
[doc2-url]: https://mikedilger.com/docs/nostr-types/nostr_types/
[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
[mit-url]: https://github.com/mikedilger/nostr-types/blob/master/LICENSE-MITnostr-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
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
### 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.