Skip to content

Commit

Permalink
Include kind we use on NIP-69 p2p orders events
Browse files Browse the repository at this point in the history
  • Loading branch information
grunch committed Jan 2, 2025
1 parent cd3922b commit 21266aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
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 21266aa

Please sign in to comment.