1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use crate::types::{EventReference, Id, MilliSatoshi, PublicKey};

/// Data about a Zap
#[derive(Clone, Debug)]
pub struct ZapDataV2 {
    /// The event that was zapped. If missing we can't use the zap receipt event.
    pub zapped_event: EventReference,

    /// The amount that the event was zapped
    pub amount: MilliSatoshi,

    /// The public key of the person who received the zap
    pub payee: PublicKey,

    /// The public key of the person who paid the zap, if it was in the receipt
    pub payer: PublicKey,

    /// The public key of the zap provider, for verification purposes
    pub provider_pubkey: PublicKey,
}

/// Data about a Zap
#[derive(Clone, Debug, Copy)]
pub struct ZapDataV1 {
    /// The event that was zapped
    pub id: Id,

    /// The amount that the event was zapped
    pub amount: MilliSatoshi,

    /// The public key of the person who provided the zap
    pub pubkey: PublicKey,

    /// The public key of the zap provider, for verification purposes
    pub provider_pubkey: PublicKey,
}