From 86f868f5621f4968cbd62393324a6edddf4a1696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Wed, 25 Sep 2024 14:13:03 +0200 Subject: [PATCH] Add event kinds for zap request and receipt --- lib/nostr/event_kind.rb | 12 ++++++++++++ spec/nostr/event_kind_spec.rb | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/lib/nostr/event_kind.rb b/lib/nostr/event_kind.rb index ceed11a..fabc17c 100644 --- a/lib/nostr/event_kind.rb +++ b/lib/nostr/event_kind.rb @@ -40,5 +40,17 @@ module Nostr # @return [Integer] # ENCRYPTED_DIRECT_MESSAGE = 4 + + # A special event with kind 9374. See NIP-57. + # + # @return [Integer] + # + ZAP_REQUEST = 9734 + + # A special event with kind 9375. See NIP-57. + # + # @return [Integer] + # + ZAP_RECEIPT = 9735 end end diff --git a/spec/nostr/event_kind_spec.rb b/spec/nostr/event_kind_spec.rb index 7aa36e6..7210c3a 100644 --- a/spec/nostr/event_kind_spec.rb +++ b/spec/nostr/event_kind_spec.rb @@ -32,4 +32,16 @@ RSpec.describe Nostr::EventKind do expect(described_class::ENCRYPTED_DIRECT_MESSAGE).to eq(4) end end + + describe '::ZAP_REQUEST' do + it 'is an integer' do + expect(described_class::ZAP_REQUEST).to eq(9734) + end + end + + describe '::ZAP_RECEIPT' do + it 'is an integer' do + expect(described_class::ZAP_RECEIPT).to eq(9735) + end + end end