dchain-sdk-proto 0.9.0

Protobuf stuct defintions for Dchain
// @generated
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
    /// The mapping of the notary info ID to the actual NotaryInfo struct
    /// This is updated by registering NotaryInfo and used for users in notarise transactions
    #[prost(map = "uint64, message", tag = "1")]
    pub notary_info_map: ::std::collections::HashMap<u64, NotaryInfo>,
    /// The next notarise object ID
    #[prost(uint64, tag = "2")]
    pub next_notary_info_id: u64,
    /// The mapping of the notarise object ID to the contract addresses
    /// It is stored in a composit KeyPair with prefix "notary_info_contracts"
    #[prost(map = "string, uint64", tag = "3")]
    pub notary_info_contracts_map: ::std::collections::HashMap<::prost::alloc::string::String, u64>,
}
/// The verifier contract type to be stored in the module
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NotaryInfo {
    /// The address used to create this object and can be used to update it
    #[prost(string, tag = "1")]
    pub notary_info_admin: ::prost::alloc::string::String,
    /// The verification mechanism contract info
    #[prost(message, optional, tag = "2")]
    pub verification_mechanism: ::core::option::Option<VerificationMechanism>,
    /// The post verification action
    #[prost(message, optional, tag = "3")]
    pub post_verification_action: ::core::option::Option<PostVerificationAction>,
}
/// The verification mechanism contract
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VerificationMechanism {
    /// The contract address
    #[prost(string, tag = "1")]
    pub contract_address: ::prost::alloc::string::String,
    /// The contract code hash, used to double check before execution
    #[prost(uint64, tag = "2")]
    pub code_id: u64,
}
/// The action registered for post verification action
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PostVerificationAction {
    #[prost(oneof = "post_verification_action::Action", tags = "1, 2")]
    pub action: ::core::option::Option<post_verification_action::Action>,
}
/// Nested message and enum types in `PostVerificationAction`.
pub mod post_verification_action {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Action {
        /// Execute a given contract with
        #[prost(message, tag = "1")]
        PostVerExec(super::ExecuteContract),
        #[prost(message, tag = "2")]
        PostVerInst(super::InstContract),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteContract {
    /// The contract address to be executed
    #[prost(string, tag = "1")]
    pub contract_address: ::prost::alloc::string::String,
    /// The contract code hash, used to double check before execution
    #[prost(uint64, tag = "2")]
    pub code_id: u64,
}
///
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstContract {
    /// The code id
    #[prost(uint64, tag = "1")]
    pub code_id: u64,
    /// The admin of the contract
    #[prost(message, optional, tag = "2")]
    pub admin: ::core::option::Option<InstContractAdmin>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstContractAdmin {
    #[prost(oneof = "inst_contract_admin::AdminType", tags = "1, 2")]
    pub admin_type: ::core::option::Option<inst_contract_admin::AdminType>,
}
/// Nested message and enum types in `InstContractAdmin`.
pub mod inst_contract_admin {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum AdminType {
        #[prost(string, tag = "1")]
        StaticAddr(::prost::alloc::string::String),
        #[prost(bool, tag = "2")]
        CallerAddr(bool),
    }
}
/// Emitted on Notarise Msg
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventNotarise {
    /// The id of the notary info
    #[prost(uint64, tag = "1")]
    pub id: u64,
    /// The hash of the input data
    #[prost(string, tag = "2")]
    pub data_hash: ::prost::alloc::string::String,
    /// Post verification action contract interaction address
    #[prost(string, tag = "3")]
    pub post_verification_action_address: ::prost::alloc::string::String,
}
/// Emitted on decentralised application registration of a notary info
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventRegisterNotaryInfo {
    /// The id of the notary info
    #[prost(uint64, tag = "1")]
    pub id: u64,
    /// The address used to create this object and can be used to update it
    #[prost(string, tag = "2")]
    pub notary_info_admin: ::prost::alloc::string::String,
    /// The verification mechanism contract info
    #[prost(message, optional, tag = "3")]
    pub verification_mechanism: ::core::option::Option<VerificationMechanism>,
    /// The post verification action
    #[prost(message, optional, tag = "4")]
    pub post_verification_action: ::core::option::Option<PostVerificationAction>,
    /// The VP Route
    #[prost(message, optional, tag = "5")]
    pub vp_route: ::core::option::Option<super::super::vcv::v1::Route>,
}
/// Emitted on both updates: VerificationMechanism and PostVerificationAction
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventUpdateNotaryInfo {
    /// The id of the notary info
    #[prost(uint64, tag = "1")]
    pub id: u64,
    /// The verification mechanism contract info
    #[prost(message, optional, tag = "2")]
    pub verification_mechanism: ::core::option::Option<VerificationMechanism>,
    /// The post verification action
    #[prost(message, optional, tag = "3")]
    pub post_verification_action: ::core::option::Option<PostVerificationAction>,
    /// The VP Route
    #[prost(message, optional, tag = "5")]
    pub vp_route: ::core::option::Option<super::super::vcv::v1::RouteAndAdditionalReq>,
}
/// Emitted on notary info deletion
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct EventDeleteNotaryInfo {
    /// The id of the notary info
    #[prost(uint64, tag = "1")]
    pub id: u64,
}
/// Emitted on notary info admin update
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventUpdateNotaryInfoAdmin {
    /// The id of the notary info
    #[prost(uint64, tag = "1")]
    pub id: u64,
    /// The address used to create this object and can be used to update it
    #[prost(string, tag = "2")]
    pub new_notary_info_admin: ::prost::alloc::string::String,
}
// ========= NotaryInfo =========

#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetNotaryInfoByIdRequest {
    #[prost(uint64, tag = "1")]
    pub id: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNotaryInfoByIdResponse {
    #[prost(message, optional, tag = "1")]
    pub notary_info: ::core::option::Option<NotaryInfo>,
    /// VP Route Request
    #[prost(message, optional, tag = "2")]
    pub vcv_route_and_additional_req:
        ::core::option::Option<super::super::vcv::v1::RouteAndAdditionalReq>,
}
/// ========= NotaryInfoNextId =========
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetNotaryInfoNextIdRequest {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetNotaryInfoNextIdResponse {
    #[prost(uint64, tag = "1")]
    pub next_id: u64,
}
/// ========= GetNotarisedObjectsById =========
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetNotarisedObjectsByIdRequest {
    #[prost(uint64, tag = "1")]
    pub id: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNotarisedObjectsByIdResponse {
    #[prost(string, repeated, tag = "1")]
    pub contract_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// ========= CheckContractNotarised =========
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckContractNotarisedRequest {
    #[prost(uint64, tag = "1")]
    pub notary_info_id: u64,
    #[prost(string, tag = "2")]
    pub contract_address: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CheckContractNotarisedResponse {
    #[prost(bool, tag = "1")]
    pub is_notarised: bool,
}
/// ========= Notarise =========
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgNotarise {
    /// message sender (the controller of this info).
    #[prost(string, tag = "1")]
    pub sender: ::prost::alloc::string::String,
    /// NotaryInfoId
    #[prost(uint64, tag = "2")]
    pub notary_info_id: u64,
    /// Data to be notarised
    #[prost(bytes = "vec", tag = "3")]
    pub data: ::prost::alloc::vec::Vec<u8>,
    /// Salt for if Instantiate
    #[prost(bytes = "vec", tag = "4")]
    pub salt: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgNotariseResponse {
    /// NotarisationId
    #[prost(uint64, tag = "1")]
    pub notarisation_id: u64,
    /// Action / Inst contract address
    #[prost(string, tag = "2")]
    pub exec_contract_address: ::prost::alloc::string::String,
}
// ========= Registration =========

#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgRegisterNotaryInfo {
    /// message sender (the controller of this info).
    #[prost(string, tag = "1")]
    pub sender: ::prost::alloc::string::String,
    /// Notary Info
    #[prost(message, optional, tag = "2")]
    pub notary_info: ::core::option::Option<NotaryInfo>,
    /// VP Route Request
    #[prost(message, optional, tag = "3")]
    pub vcv_route_and_additional_req:
        ::core::option::Option<super::super::vcv::v1::RouteAndAdditionalReq>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgRegisterNotaryInfoResponse {
    #[prost(uint64, tag = "1")]
    pub notary_info_id: u64,
}
// ========= Update Verification Mechanism =========

#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUpdateVerifier {
    /// message sender (the controller of this info).
    #[prost(string, tag = "1")]
    pub sender: ::prost::alloc::string::String,
    /// NotaryInfoId
    #[prost(uint64, tag = "2")]
    pub notary_info_id: u64,
    /// Verification mechanism
    #[prost(message, optional, tag = "3")]
    pub verification_mechanism: ::core::option::Option<VerificationMechanism>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgUpdateVerifierResponse {}
/// ========= Update Post Verification Action =========
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUpdatePostVerAction {
    /// message sender (the controller of this info).
    #[prost(string, tag = "1")]
    pub sender: ::prost::alloc::string::String,
    /// NotaryInfoId
    #[prost(uint64, tag = "2")]
    pub notary_info_id: u64,
    /// Post verification action
    #[prost(message, optional, tag = "3")]
    pub post_verification_action: ::core::option::Option<PostVerificationAction>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgUpdatePostVerActionResponse {}
/// ========= Update Admin =========
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUpdateAdmin {
    /// message sender (the controller of this info).
    #[prost(string, tag = "1")]
    pub sender: ::prost::alloc::string::String,
    /// NotaryInfoId
    #[prost(uint64, tag = "2")]
    pub notary_info_id: u64,
    /// New admin
    #[prost(string, tag = "3")]
    pub new_admin: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgUpdateAdminResponse {}
// ========= Update VP Route =========

#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUpdateVpRoute {
    /// message sender (the controller of this info).
    #[prost(string, tag = "1")]
    pub sender: ::prost::alloc::string::String,
    /// NotaryInfoId
    #[prost(uint64, tag = "2")]
    pub notary_info_id: u64,
    /// VP Route Request
    #[prost(message, optional, tag = "3")]
    pub vcv_route_and_additional_req:
        ::core::option::Option<super::super::vcv::v1::RouteAndAdditionalReq>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgUpdateVpRouteResponse {}
/// ========= Remove Notary Info =========
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgRemoveNotaryInfo {
    /// message sender (the controller of this info).
    #[prost(string, tag = "1")]
    pub sender: ::prost::alloc::string::String,
    /// NotaryInfoId
    #[prost(uint64, tag = "2")]
    pub notary_info_id: u64,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgRemoveNotaryInfoResponse {
    /// id of the removed notary Info
    #[prost(uint64, tag = "1")]
    pub notary_info_id: u64,
}
include!("d.notary.v1.tonic.rs");
// @@protoc_insertion_point(module)