32 lines
690 B
V
32 lines
690 B
V
module main
|
|
|
|
pub struct SecretBox {
|
|
pub mut:
|
|
notary_id u32 // person who is allowed to decrypt this info
|
|
value string //the actual incrypted value
|
|
version u16 //version of the schema used to encrypt this value
|
|
timestamp u64
|
|
cat SecretBoxCategory //category of the secret box, e.g. profile
|
|
}
|
|
|
|
pub enum SecretBoxCategory {
|
|
profile
|
|
}
|
|
|
|
pub struct Notary {
|
|
core.Base
|
|
pub mut:
|
|
userid u32 // Reference to the user entity @[index]
|
|
status NotaryStatus // Current user status
|
|
myceliumaddress string // Mycelium address of the notary
|
|
pubkey string // Public key for cryptographic operations @[index]
|
|
}
|
|
|
|
pub enum NotaryStatus {
|
|
active
|
|
inactive
|
|
suspended
|
|
archived
|
|
error
|
|
}
|