fabric-sdk 0.5.1

Interact and program chaincode for the Hyperledger Fabric blockchain network
Documentation
// This file is @generated by prost-build.
/// InstallChaincodeArgs is the message used as the argument to
/// '_lifecycle.InstallChaincode'.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InstallChaincodeArgs {
    /// This should be a marshaled lifecycle.ChaincodePackage
    #[prost(bytes = "vec", tag = "1")]
    pub chaincode_install_package: ::prost::alloc::vec::Vec<u8>,
}
/// InstallChaincodeArgs is the message returned by
/// '_lifecycle.InstallChaincode'.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InstallChaincodeResult {
    #[prost(string, tag = "1")]
    pub package_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub label: ::prost::alloc::string::String,
}
/// QueryInstalledChaincodeArgs is the message used as arguments
/// '_lifecycle.QueryInstalledChaincode'
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryInstalledChaincodeArgs {
    #[prost(string, tag = "1")]
    pub package_id: ::prost::alloc::string::String,
}
/// QueryInstalledChaincodeResult is the message returned by
/// '_lifecycle.QueryInstalledChaincode'
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryInstalledChaincodeResult {
    #[prost(string, tag = "1")]
    pub package_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub label: ::prost::alloc::string::String,
    #[prost(map = "string, message", tag = "3")]
    pub references: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        query_installed_chaincode_result::References,
    >,
}
/// Nested message and enum types in `QueryInstalledChaincodeResult`.
pub mod query_installed_chaincode_result {
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct References {
        #[prost(message, repeated, tag = "1")]
        pub chaincodes: ::prost::alloc::vec::Vec<Chaincode>,
    }
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Chaincode {
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        #[prost(string, tag = "2")]
        pub version: ::prost::alloc::string::String,
    }
}
/// GetInstalledChaincodePackageArgs is the message used as the argument to
/// '_lifecycle.GetInstalledChaincodePackage'.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetInstalledChaincodePackageArgs {
    #[prost(string, tag = "1")]
    pub package_id: ::prost::alloc::string::String,
}
/// GetInstalledChaincodePackageResult is the message returned by
/// '_lifecycle.GetInstalledChaincodePackage'.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetInstalledChaincodePackageResult {
    #[prost(bytes = "vec", tag = "1")]
    pub chaincode_install_package: ::prost::alloc::vec::Vec<u8>,
}
/// QueryInstalledChaincodesArgs currently is an empty argument to
/// '_lifecycle.QueryInstalledChaincodes'.   In the future, it may be
/// extended to have parameters.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryInstalledChaincodesArgs {}
/// QueryInstalledChaincodesResult is the message returned by
/// '_lifecycle.QueryInstalledChaincodes'.  It returns a list of installed
/// chaincodes, including a map of channel name to chaincode name and version
/// pairs of chaincode definitions that reference this chaincode package.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryInstalledChaincodesResult {
    #[prost(message, repeated, tag = "1")]
    pub installed_chaincodes: ::prost::alloc::vec::Vec<
        query_installed_chaincodes_result::InstalledChaincode,
    >,
}
/// Nested message and enum types in `QueryInstalledChaincodesResult`.
pub mod query_installed_chaincodes_result {
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct InstalledChaincode {
        #[prost(string, tag = "1")]
        pub package_id: ::prost::alloc::string::String,
        #[prost(string, tag = "2")]
        pub label: ::prost::alloc::string::String,
        #[prost(map = "string, message", tag = "3")]
        pub references: ::std::collections::HashMap<
            ::prost::alloc::string::String,
            References,
        >,
    }
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct References {
        #[prost(message, repeated, tag = "1")]
        pub chaincodes: ::prost::alloc::vec::Vec<Chaincode>,
    }
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Chaincode {
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        #[prost(string, tag = "2")]
        pub version: ::prost::alloc::string::String,
    }
}
/// ApproveChaincodeDefinitionForMyOrgArgs is the message used as arguments to
/// `_lifecycle.ApproveChaincodeDefinitionForMyOrg`.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApproveChaincodeDefinitionForMyOrgArgs {
    #[prost(int64, tag = "1")]
    pub sequence: i64,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub version: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub endorsement_plugin: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub validation_plugin: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "6")]
    pub validation_parameter: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "7")]
    pub collections: ::core::option::Option<super::protos::CollectionConfigPackage>,
    #[prost(bool, tag = "8")]
    pub init_required: bool,
    #[prost(message, optional, tag = "9")]
    pub source: ::core::option::Option<ChaincodeSource>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ChaincodeSource {
    #[prost(oneof = "chaincode_source::Type", tags = "1, 2")]
    pub r#type: ::core::option::Option<chaincode_source::Type>,
}
/// Nested message and enum types in `ChaincodeSource`.
pub mod chaincode_source {
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Unavailable {}
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Local {
        #[prost(string, tag = "1")]
        pub package_id: ::prost::alloc::string::String,
    }
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Type {
        #[prost(message, tag = "1")]
        Unavailable(Unavailable),
        #[prost(message, tag = "2")]
        LocalPackage(Local),
    }
}
/// ApproveChaincodeDefinitionForMyOrgResult is the message returned by
/// `_lifecycle.ApproveChaincodeDefinitionForMyOrg`. Currently it returns
/// nothing, but may be extended in the future.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ApproveChaincodeDefinitionForMyOrgResult {}
/// CommitChaincodeDefinitionArgs is the message used as arguments to
/// `_lifecycle.CommitChaincodeDefinition`.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommitChaincodeDefinitionArgs {
    #[prost(int64, tag = "1")]
    pub sequence: i64,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub version: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub endorsement_plugin: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub validation_plugin: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "6")]
    pub validation_parameter: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "7")]
    pub collections: ::core::option::Option<super::protos::CollectionConfigPackage>,
    #[prost(bool, tag = "8")]
    pub init_required: bool,
}
/// CommitChaincodeDefinitionResult is the message returned by
/// `_lifecycle.CommitChaincodeDefinition`. Currently it returns
/// nothing, but may be extended in the future.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CommitChaincodeDefinitionResult {}
/// CheckCommitReadinessArgs is the message used as arguments to
/// `_lifecycle.CheckCommitReadiness`.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckCommitReadinessArgs {
    #[prost(int64, tag = "1")]
    pub sequence: i64,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub version: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub endorsement_plugin: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub validation_plugin: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "6")]
    pub validation_parameter: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "7")]
    pub collections: ::core::option::Option<super::protos::CollectionConfigPackage>,
    #[prost(bool, tag = "8")]
    pub init_required: bool,
}
/// CheckCommitReadinessResult is the message returned by
/// `_lifecycle.CheckCommitReadiness`. It returns a map of
/// orgs to their approval (true/false) for the definition
/// supplied as args. Additionally, it returns a map of
/// parameter mismatches between each organization's
/// approved definition and the definition supplied as args.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckCommitReadinessResult {
    #[prost(map = "string, bool", tag = "1")]
    pub approvals: ::std::collections::HashMap<::prost::alloc::string::String, bool>,
    #[prost(map = "string, message", tag = "2")]
    pub mismatches: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        check_commit_readiness_result::Mismatches,
    >,
}
/// Nested message and enum types in `CheckCommitReadinessResult`.
pub mod check_commit_readiness_result {
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Mismatches {
        #[prost(string, repeated, tag = "1")]
        pub items: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    }
}
/// QueryApprovedChaincodeDefinitionArgs is the message used as arguments to
/// `_lifecycle.QueryApprovedChaincodeDefinition`.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryApprovedChaincodeDefinitionArgs {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(int64, tag = "2")]
    pub sequence: i64,
}
/// QueryApprovedChaincodeDefinitionResult is the message returned by
/// `_lifecycle.QueryApprovedChaincodeDefinition`.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryApprovedChaincodeDefinitionResult {
    #[prost(int64, tag = "1")]
    pub sequence: i64,
    #[prost(string, tag = "2")]
    pub version: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub endorsement_plugin: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub validation_plugin: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "5")]
    pub validation_parameter: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "6")]
    pub collections: ::core::option::Option<super::protos::CollectionConfigPackage>,
    #[prost(bool, tag = "7")]
    pub init_required: bool,
    #[prost(message, optional, tag = "8")]
    pub source: ::core::option::Option<ChaincodeSource>,
}
/// QueryApprovedChaincodeDefinitionsArgs is the message used as arguments to
/// `_lifecycle.QueryApprovedChaincodeDefinitions`.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryApprovedChaincodeDefinitionsArgs {}
/// QueryApprovedChaincodeDefinitionsResult is the message returned by
/// `_lifecycle.QueryApprovedChaincodeDefinitions`.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryApprovedChaincodeDefinitionsResult {
    #[prost(message, repeated, tag = "1")]
    pub approved_chaincode_definitions: ::prost::alloc::vec::Vec<
        query_approved_chaincode_definitions_result::ApprovedChaincodeDefinition,
    >,
}
/// Nested message and enum types in `QueryApprovedChaincodeDefinitionsResult`.
pub mod query_approved_chaincode_definitions_result {
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ApprovedChaincodeDefinition {
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        #[prost(int64, tag = "2")]
        pub sequence: i64,
        #[prost(string, tag = "3")]
        pub version: ::prost::alloc::string::String,
        #[prost(string, tag = "4")]
        pub endorsement_plugin: ::prost::alloc::string::String,
        #[prost(string, tag = "5")]
        pub validation_plugin: ::prost::alloc::string::String,
        #[prost(bytes = "vec", tag = "6")]
        pub validation_parameter: ::prost::alloc::vec::Vec<u8>,
        #[prost(message, optional, tag = "7")]
        pub collections: ::core::option::Option<
            super::super::protos::CollectionConfigPackage,
        >,
        #[prost(bool, tag = "8")]
        pub init_required: bool,
        #[prost(message, optional, tag = "9")]
        pub source: ::core::option::Option<super::ChaincodeSource>,
    }
}
/// QueryChaincodeDefinitionArgs is the message used as arguments to
/// `_lifecycle.QueryChaincodeDefinition`.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryChaincodeDefinitionArgs {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// QueryChaincodeDefinitionResult is the message returned by
/// `_lifecycle.QueryChaincodeDefinition`.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryChaincodeDefinitionResult {
    #[prost(int64, tag = "1")]
    pub sequence: i64,
    #[prost(string, tag = "2")]
    pub version: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub endorsement_plugin: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub validation_plugin: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "5")]
    pub validation_parameter: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "6")]
    pub collections: ::core::option::Option<super::protos::CollectionConfigPackage>,
    #[prost(bool, tag = "7")]
    pub init_required: bool,
    #[prost(map = "string, bool", tag = "8")]
    pub approvals: ::std::collections::HashMap<::prost::alloc::string::String, bool>,
}
/// QueryChaincodeDefinitionsArgs is the message used as arguments to
/// `_lifecycle.QueryChaincodeDefinitions`.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryChaincodeDefinitionsArgs {}
/// QueryChaincodeDefinitionsResult is the message returned by
/// `_lifecycle.QueryChaincodeDefinitions`.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryChaincodeDefinitionsResult {
    #[prost(message, repeated, tag = "1")]
    pub chaincode_definitions: ::prost::alloc::vec::Vec<
        query_chaincode_definitions_result::ChaincodeDefinition,
    >,
}
/// Nested message and enum types in `QueryChaincodeDefinitionsResult`.
pub mod query_chaincode_definitions_result {
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ChaincodeDefinition {
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        #[prost(int64, tag = "2")]
        pub sequence: i64,
        #[prost(string, tag = "3")]
        pub version: ::prost::alloc::string::String,
        #[prost(string, tag = "4")]
        pub endorsement_plugin: ::prost::alloc::string::String,
        #[prost(string, tag = "5")]
        pub validation_plugin: ::prost::alloc::string::String,
        #[prost(bytes = "vec", tag = "6")]
        pub validation_parameter: ::prost::alloc::vec::Vec<u8>,
        #[prost(message, optional, tag = "7")]
        pub collections: ::core::option::Option<
            super::super::protos::CollectionConfigPackage,
        >,
        #[prost(bool, tag = "8")]
        pub init_required: bool,
    }
}