#![allow(dead_code)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(unused_imports)]
use serde::{Serialize, Deserialize};
use serde_repr::{Deserialize_repr, Serialize_repr};use super::*;
use super::common::*;
use crate::protocol::keybase1;
pub type BundleRevision = u64;
pub struct EncryptedBundle {
pub v: i32,
pub e: Option<String>,
pub n: keybase1::BoxNonce,
pub gen: keybase1::PerUserKeyGeneration,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum BundleVersion {
V1_1,
V2_2,
V3_3,
V4_4,
V5_5,
V6_6,
V7_7,
V8_8,
V9_9,
V10_10,
}
pub enum BundleSecretVersioned {
V1 {v1: BundleSecretUnsupported},
V2 {v2: BundleSecretV2},
V3 {v3: BundleSecretUnsupported},
V4 {v4: BundleSecretUnsupported},
V5 {v5: BundleSecretUnsupported},
V6 {v6: BundleSecretUnsupported},
V7 {v7: BundleSecretUnsupported},
V8 {v8: BundleSecretUnsupported},
V9 {v9: BundleSecretUnsupported},
V10 {v10: BundleSecretUnsupported},
}
pub struct BundleVisibleV2 {
pub revision: BundleRevision,
pub prev: Option<String>,
pub accounts: Option<Vec<BundleVisibleEntryV2>>,
}
pub struct BundleSecretV2 {
pub visibleHash: Option<String>,
pub accounts: Option<Vec<BundleSecretEntryV2>>,
}
pub struct BundleVisibleEntryV2 {
pub accountID: AccountID,
pub mode: AccountMode,
pub isPrimary: bool,
pub acctBundleRevision: BundleRevision,
pub encAcctBundleHash: Option<String>,
}
pub struct BundleSecretEntryV2 {
pub accountID: AccountID,
pub name: Option<String>,
}
pub struct BundleSecretUnsupported {
}
pub struct EncryptedAccountBundle {
pub v: i32,
pub e: Option<String>,
pub n: keybase1::BoxNonce,
pub gen: keybase1::PerUserKeyGeneration,
}
#[derive(Serialize_repr, Deserialize_repr, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum AccountBundleVersion {
V1_1,
V2_2,
V3_3,
V4_4,
V5_5,
V6_6,
V7_7,
V8_8,
V9_9,
V10_10,
}
pub enum AccountBundleSecretVersioned {
V1 {v1: AccountBundleSecretV1},
V2 {v2: AccountBundleSecretUnsupported},
V3 {v3: AccountBundleSecretUnsupported},
V4 {v4: AccountBundleSecretUnsupported},
V5 {v5: AccountBundleSecretUnsupported},
V6 {v6: AccountBundleSecretUnsupported},
V7 {v7: AccountBundleSecretUnsupported},
V8 {v8: AccountBundleSecretUnsupported},
V9 {v9: AccountBundleSecretUnsupported},
V10 {v10: AccountBundleSecretUnsupported},
}
pub struct AccountBundleSecretV1 {
pub accountID: AccountID,
pub signers: Option<Vec<SecretKey>>,
}
pub struct AccountBundleSecretUnsupported {
}
pub struct Bundle {
pub revision: BundleRevision,
pub prev: Option<String>,
pub ownHash: Option<String>,
pub accounts: Option<Vec<BundleEntry>>,
pub accountBundles: std::collections::HashMap<AccountID, AccountBundle>,
}
pub struct BundleEntry {
pub accountID: AccountID,
pub mode: AccountMode,
pub isPrimary: bool,
pub name: Option<String>,
pub acctBundleRevision: BundleRevision,
pub encAcctBundleHash: Option<String>,
}
pub struct AccountBundle {
pub prev: Option<String>,
pub ownHash: Option<String>,
pub accountID: AccountID,
pub signers: Option<Vec<SecretKey>>,
}