provwasm_std/types/capability/
v1.rs

1use provwasm_proc_macro::CosmwasmExt;
2/// Capability defines an implementation of an object capability. The index
3/// provided to a Capability must be globally unique.
4#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
5#[proto_message(type_url = "/capability.v1.Capability")]
6pub struct Capability {
7    #[prost(uint64, tag = "1")]
8    pub index: u64,
9}
10/// Owner defines a single capability owner. An owner is defined by the name of
11/// capability and the module name.
12#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
13#[proto_message(type_url = "/capability.v1.Owner")]
14pub struct Owner {
15    #[prost(string, tag = "1")]
16    pub module: ::prost::alloc::string::String,
17    #[prost(string, tag = "2")]
18    pub name: ::prost::alloc::string::String,
19}
20/// CapabilityOwners defines a set of owners of a single Capability. The set of
21/// owners must be unique.
22#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
23#[proto_message(type_url = "/capability.v1.CapabilityOwners")]
24pub struct CapabilityOwners {
25    #[prost(message, repeated, tag = "1")]
26    pub owners: ::prost::alloc::vec::Vec<Owner>,
27}
28/// GenesisOwners defines the capability owners with their corresponding index.
29#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
30#[proto_message(type_url = "/capability.v1.GenesisOwners")]
31pub struct GenesisOwners {
32    /// index is the index of the capability owner.
33    #[prost(uint64, tag = "1")]
34    pub index: u64,
35    /// index_owners are the owners at the given index.
36    #[prost(message, optional, tag = "2")]
37    pub index_owners: ::core::option::Option<CapabilityOwners>,
38}
39/// GenesisState defines the capability module's genesis state.
40#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
41#[proto_message(type_url = "/capability.v1.GenesisState")]
42pub struct GenesisState {
43    /// index is the capability global index.
44    #[prost(uint64, tag = "1")]
45    pub index: u64,
46    /// owners represents a map from index to owners of the capability index
47    /// index key is string to allow amino marshalling.
48    #[prost(message, repeated, tag = "2")]
49    pub owners: ::prost::alloc::vec::Vec<GenesisOwners>,
50}