eth_stealth_gas_tickets/
types.rs

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
use alloy::primitives::{Bytes, FixedBytes};
use serde::{Deserialize, Serialize};

/// A ticket generated during the blinding process
#[derive(Debug, Serialize, Deserialize)]
pub struct UnsignedTicket {
    pub msg: Bytes,
    pub blind_msg: Bytes,
    pub msg_randomizer: FixedBytes<32>,
    pub id: FixedBytes<32>,
    pub secret: Bytes,
}

/// A blind signature returned from the coordinator
#[derive(Debug, Serialize, Deserialize)]
pub struct BlindedSignature {
    pub blind_sig: Bytes,
    pub id: FixedBytes<32>,
}

/// A finalized signed ticket
#[derive(Debug, Serialize, Deserialize)]
pub struct SignedTicket {
    pub msg: Bytes,
    pub msg_randomizer: FixedBytes<32>,
    pub finalized_sig: Bytes,
    pub id: FixedBytes<32>,
}