Skip to content

Commit

Permalink
nostr: add Kind::PeerToPeerOrder variant
Browse files Browse the repository at this point in the history
Closes #704

Signed-off-by: Yuki Kishimoto <[email protected]>
  • Loading branch information
grunch authored and yukibtc committed Jan 3, 2025
1 parent 9ad327f commit b86b824
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

### Added

* nostr: add `Kind::PeerToPeerOrder` variant ([Francisco Calderón])
* pool: add `Relay::try_connect` ([Yuki Kishimoto])
* pool: add `Relay::wait_for_connection` ([Yuki Kishimoto])
* pool: add `RelayPool::try_connect` ([Yuki Kishimoto])
Expand Down Expand Up @@ -968,6 +969,7 @@ added `nostrdb` storage backend, added NIP32 and completed NIP51 support and mor
[Jens K.]: https://github.com/sectore (nostr:npub163jct20kzgjjr6z28u4vskax7d0gwq3zemrk6flgnw430vu55vtsdeqdc2)
[RandyMcMillan]: https://github.com/RandyMcMillan (nostr:npub1ahaz04ya9tehace3uy39hdhdryfvdkve9qdndkqp3tvehs6h8s5slq45hy)
[Roland Bewick]: https://github.com/rolznz (nostr:npub1zk6u7mxlflguqteghn8q7xtu47hyerruv6379c36l8lxzzr4x90q0gl6ef)
[Francisco Calderón]: https://github.com/grunch (nostr:npub1qqqqqqqx2tj99mng5qgc07cgezv5jm95dj636x4qsq7svwkwmwnse3rfkq)

<!-- Tags -->
[Unreleased]: https://github.com/rust-nostr/nostr/compare/v0.38.0...HEAD
Expand Down
6 changes: 6 additions & 0 deletions bindings/nostr-sdk-ffi/src/protocol/event/kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ pub enum KindEnum {
ReleaseArtifactSet,
/// Relay List Metadata (NIP65)
RelayList,
/// Peer-to-peer Order events
///
/// <https://github.com/nostr-protocol/nips/blob/master/69.md>
PeerToPeerOrder,
/// Client Authentication (NIP42)
Authentication,
/// Wallet Connect Request (NIP47)
Expand Down Expand Up @@ -420,6 +424,7 @@ impl From<nostr::Kind> for KindEnum {
nostr::Kind::MlsGroupMessage => Self::MlsGroupMessage,
nostr::Kind::Torrent => Self::Torrent,
nostr::Kind::TorrentComment => Self::TorrentComment,
nostr::Kind::PeerToPeerOrder => Self::PeerToPeerOrder,
#[allow(deprecated)]
nostr::Kind::JobRequest(u)
| nostr::Kind::JobResult(u)
Expand Down Expand Up @@ -515,6 +520,7 @@ impl From<KindEnum> for nostr::Kind {
KindEnum::MlsGroupMessage => Self::MlsGroupMessage,
KindEnum::Torrent => Self::Torrent,
KindEnum::TorrentComment => Self::TorrentComment,
KindEnum::PeerToPeerOrder => Self::PeerToPeerOrder,
KindEnum::Custom { kind } => Self::Custom(kind),
}
}
Expand Down
1 change: 1 addition & 0 deletions crates/nostr/src/event/kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ kind_variants! {
ApplicationSpecificData => 30078, "Application-specific Data", "<https://github.com/nostr-protocol/nips/blob/master/78.md>",
Torrent => 2003, "Torrent", "<https://github.com/nostr-protocol/nips/blob/master/35.md>",
TorrentComment => 2004, "Torrent Comment", "<https://github.com/nostr-protocol/nips/blob/master/35.md>",
PeerToPeerOrder => 38383, "Peer-to-peer Order events", "<https://github.com/nostr-protocol/nips/blob/master/69.md>",
}

impl PartialEq for Kind {
Expand Down

0 comments on commit b86b824

Please sign in to comment.