nostr_types/versioned/zap_data.rs
1use crate::types::{EventReference, Id, MilliSatoshi, PublicKey};
2
3/// Data about a Zap
4#[derive(Clone, Debug)]
5pub struct ZapDataV2 {
6 /// The event that was zapped. If missing we can't use the zap receipt event.
7 pub zapped_event: EventReference,
8
9 /// The amount that the event was zapped
10 pub amount: MilliSatoshi,
11
12 /// The public key of the person who received the zap
13 pub payee: PublicKey,
14
15 /// The public key of the person who paid the zap, if it was in the receipt
16 pub payer: PublicKey,
17
18 /// The public key of the zap provider, for verification purposes
19 pub provider_pubkey: PublicKey,
20}
21
22/// Data about a Zap
23#[derive(Clone, Debug, Copy)]
24pub struct ZapDataV1 {
25 /// The event that was zapped
26 pub id: Id,
27
28 /// The amount that the event was zapped
29 pub amount: MilliSatoshi,
30
31 /// The public key of the person who provided the zap
32 pub pubkey: PublicKey,
33
34 /// The public key of the zap provider, for verification purposes
35 pub provider_pubkey: PublicKey,
36}