espresso_types/v0/v0_99/
solver.rs

1use crate::{v0::utils::Update, FeeAmount, NamespaceId, SeqTypes};
2use hotshot::types::SignatureKey;
3use hotshot_types::traits::node_implementation::NodeType;
4use serde::{Deserialize, Serialize};
5use tide_disco::Url;
6
7#[derive(PartialEq, Serialize, Deserialize, Debug, Clone)]
8pub struct RollupRegistration {
9    pub body: RollupRegistrationBody,
10    // signature over the above data (must be from a key in the 'signature_keys` list)
11    pub signature:
12        <<SeqTypes as NodeType>::SignatureKey as SignatureKey>::PureAssembledSignatureType,
13}
14
15#[derive(PartialEq, Serialize, Deserialize, Debug, Clone)]
16pub struct RollupRegistrationBody {
17    pub namespace_id: NamespaceId,
18    // URL of reserve builder for this rollup
19    pub reserve_url: Option<Url>,
20    // Denominated in Wei
21    pub reserve_price: FeeAmount,
22    // whether this registration is active in the marketplace
23    pub active: bool,
24    // a list of keys authorized to update the registration information
25    pub signature_keys: Vec<<SeqTypes as NodeType>::SignatureKey>,
26    // The signature key used to sign this registration body
27    pub signature_key: <SeqTypes as NodeType>::SignatureKey,
28    // Optional field for human readable information
29    pub text: String,
30}
31
32#[derive(PartialEq, Serialize, Deserialize, Debug, Clone)]
33pub struct RollupUpdate {
34    pub body: RollupUpdatebody,
35    // signature over the above data (must be from a key in the 'signature_keys` list)
36    pub signature:
37        <<SeqTypes as NodeType>::SignatureKey as SignatureKey>::PureAssembledSignatureType,
38}
39
40#[derive(PartialEq, Serialize, Deserialize, Debug, Clone)]
41pub struct RollupUpdatebody {
42    pub namespace_id: NamespaceId,
43    // Denominated in Wei
44    #[serde(default)]
45    pub reserve_url: Update<Option<Url>>,
46    #[serde(default)]
47    pub reserve_price: Update<FeeAmount>,
48    // whether this registration is active in the marketplace
49    #[serde(default)]
50    pub active: Update<bool>,
51    // a list of keys authorized to update the registration information
52    #[serde(default)]
53    pub signature_keys: Update<Vec<<SeqTypes as NodeType>::SignatureKey>>,
54    // The signature key used to sign this update body
55    pub signature_key: <SeqTypes as NodeType>::SignatureKey,
56    // Optional field for human readable information
57    pub text: Update<String>,
58}