#[derive(Debug)]
#[serde_with::serde_as]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct MerkleNode {
#[serde(default)]
#[serde_as(as = "serde_with::DisplayFromStr")]
pub id: u64,
#[serde(default)]
pub value: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Debug)]
#[serde_with::serde_as]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct MerkleRootPayload {
#[serde(default)]
pub node: ::core::option::Option<MerkleNode>,
#[serde(default)]
#[serde_as(as = "serde_with::DisplayFromStr")]
pub timestamp: u64,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct MerkleRoot {
#[serde(default)]
pub payload: ::core::option::Option<MerkleRootPayload>,
#[serde(default)]
pub signature: ::core::option::Option<Signature>,
}
#[derive(Debug)]
#[serde_with::serde_as]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct MerkleLeafPayload {
#[serde(default)]
pub node: ::core::option::Option<MerkleNode>,
#[serde(default)]
#[serde_as(as = "serde_with::DisplayFromStr")]
pub timestamp: u64,
pub organization_id: ::prost::alloc::string::String,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct MerkleLeaf {
#[serde(default)]
pub payload: ::core::option::Option<MerkleLeafPayload>,
#[serde(default)]
pub signature: ::core::option::Option<Signature>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct MerkleProof {
#[serde(default)]
pub root: ::core::option::Option<MerkleRoot>,
#[serde(default)]
pub nodes: ::prost::alloc::vec::Vec<MerkleNode>,
#[serde(default)]
pub leaves: ::prost::alloc::vec::Vec<MerkleLeaf>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct MerkleLeafNotarization {
#[serde(default)]
pub leaf: ::core::option::Option<MerkleLeaf>,
#[serde(default)]
pub notarization: ::core::option::Option<Notarization>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct AccountPayloadV0 {
pub organization_id: ::prost::alloc::string::String,
pub wallet_id: ::prost::alloc::string::String,
pub curve: super::super::common::v1::Curve,
pub path_format: super::super::common::v1::PathFormat,
pub path: ::prost::alloc::string::String,
pub address_format: super::super::common::v1::AddressFormat,
pub address: ::prost::alloc::string::String,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct AccountPayloadV1 {
pub organization_id: ::prost::alloc::string::String,
pub wallet_id: ::prost::alloc::string::String,
pub curve: super::super::common::v1::Curve,
pub path_format: super::super::common::v1::PathFormat,
pub path: ::prost::alloc::string::String,
pub address_format: super::super::common::v1::AddressFormat,
pub address: ::prost::alloc::string::String,
#[serde(default)]
pub exported: bool,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct AccountPayloadV2 {
pub organization_id: ::prost::alloc::string::String,
pub wallet_id: ::prost::alloc::string::String,
pub curve: super::super::common::v1::Curve,
pub path_format: super::super::common::v1::PathFormat,
pub path: ::prost::alloc::string::String,
pub address_format: super::super::common::v1::AddressFormat,
pub address: ::prost::alloc::string::String,
#[serde(default)]
pub exported: bool,
#[serde(default)]
pub public_key: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct Account {
#[serde(default)]
pub payload: ::core::option::Option<AccountPayloadV2>,
#[serde(default)]
pub signature: ::core::option::Option<Signature>,
}
#[derive(Debug)]
#[serde_with::serde_as]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct NotarizationPayload {
pub organization_digest: ::prost::alloc::string::String,
pub previous_notarization_digest: ::prost::alloc::string::String,
#[serde(default)]
#[serde_as(as = "serde_with::DisplayFromStr")]
pub timestamp: u64,
pub organization_data_version: ::prost::alloc::string::String,
pub organization_id: ::prost::alloc::string::String,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct Notarization {
#[serde(default)]
pub payload: ::core::option::Option<NotarizationPayload>,
#[serde(default)]
pub signature: ::core::option::Option<Signature>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct NotarizedOrganization {
#[serde(default)]
pub data_bytes: ::prost::alloc::vec::Vec<u8>,
#[serde(default)]
pub notarization: ::core::option::Option<Notarization>,
#[serde(default)]
pub merkle_proof: ::core::option::Option<MerkleProof>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct Signature {
pub scheme: SignatureScheme,
pub public_key: ::prost::alloc::string::String,
pub message: ::prost::alloc::string::String,
pub signature: ::prost::alloc::string::String,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct SmartContractInterfacePayload {
pub smart_contract_interface_id: ::prost::alloc::string::String,
pub organization_id: ::prost::alloc::string::String,
pub smart_contract_address: ::prost::alloc::string::String,
pub smart_contract_interface: ::prost::alloc::string::String,
pub r#type: super::super::common::v1::SmartContractInterfaceType,
pub label: ::prost::alloc::string::String,
pub notes: ::prost::alloc::string::String,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct SmartContractInterface {
#[serde(default)]
pub payload: ::core::option::Option<SmartContractInterfacePayload>,
#[serde(default)]
pub signature: ::core::option::Option<Signature>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, Copy, PartialEq)]
pub struct PolicyBudgetOverride {
#[serde(default)]
pub max_recursion_depth: u32,
#[serde(default)]
pub max_evaluation_steps: u32,
#[serde(default)]
pub timeout_ms: u32,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, Copy, PartialEq)]
pub struct PolicyEvaluationMetrics {
#[serde(default)]
pub max_recursion_depth_reached: u32,
#[serde(default)]
pub max_evaluation_steps_used: u32,
#[serde(default)]
pub max_elapsed_time_ms: u32,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub enum SignatureScheme {
#[serde(rename = "SIGNATURE_SCHEME_UNSPECIFIED")]
Unspecified = 0,
#[serde(rename = "SIGNATURE_SCHEME_TK_API_P256")]
TkApiP256 = 1,
#[serde(rename = "SIGNATURE_SCHEME_TK_WEBAUTHN")]
TkWebauthn = 2,
#[serde(rename = "SIGNATURE_SCHEME_TK_QUORUM_P256")]
TkQuorumP256 = 3,
#[serde(rename = "SIGNATURE_SCHEME_TK_API_SECP256K1")]
TkApiSecp256k1 = 4,
#[serde(rename = "SIGNATURE_SCHEME_TK_API_ED25519")]
TkApiEd25519 = 5,
#[serde(rename = "SIGNATURE_SCHEME_TK_API_SECP256K1_EIP191")]
TkApiSecp256k1Eip191 = 6,
}
impl SignatureScheme {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SIGNATURE_SCHEME_UNSPECIFIED",
Self::TkApiP256 => "SIGNATURE_SCHEME_TK_API_P256",
Self::TkWebauthn => "SIGNATURE_SCHEME_TK_WEBAUTHN",
Self::TkQuorumP256 => "SIGNATURE_SCHEME_TK_QUORUM_P256",
Self::TkApiSecp256k1 => "SIGNATURE_SCHEME_TK_API_SECP256K1",
Self::TkApiEd25519 => "SIGNATURE_SCHEME_TK_API_ED25519",
Self::TkApiSecp256k1Eip191 => "SIGNATURE_SCHEME_TK_API_SECP256K1_EIP191",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SIGNATURE_SCHEME_UNSPECIFIED" => Some(Self::Unspecified),
"SIGNATURE_SCHEME_TK_API_P256" => Some(Self::TkApiP256),
"SIGNATURE_SCHEME_TK_WEBAUTHN" => Some(Self::TkWebauthn),
"SIGNATURE_SCHEME_TK_QUORUM_P256" => Some(Self::TkQuorumP256),
"SIGNATURE_SCHEME_TK_API_SECP256K1" => Some(Self::TkApiSecp256k1),
"SIGNATURE_SCHEME_TK_API_ED25519" => Some(Self::TkApiEd25519),
"SIGNATURE_SCHEME_TK_API_SECP256K1_EIP191" => {
Some(Self::TkApiSecp256k1Eip191)
}
_ => None,
}
}
}