2022-01-08 01:59:34 +00:00
|
|
|
// Since: cosmos-sdk 0.43
|
|
|
|
syntax = "proto3";
|
|
|
|
package cosmos.authz.v1beta1;
|
|
|
|
|
|
|
|
import "cosmos_proto/cosmos.proto";
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
import "google/protobuf/any.proto";
|
|
|
|
|
|
|
|
option go_package = "github.com/cosmos/cosmos-sdk/x/authz";
|
|
|
|
option (gogoproto.goproto_getters_all) = false;
|
|
|
|
|
|
|
|
// GenericAuthorization gives the grantee unrestricted permissions to execute
|
|
|
|
// the provided method on behalf of the granter's account.
|
|
|
|
message GenericAuthorization {
|
|
|
|
option (cosmos_proto.implements_interface) = "Authorization";
|
|
|
|
|
|
|
|
// Msg, identified by it's type URL, to grant unrestricted permissions to execute
|
|
|
|
string msg = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Grant gives permissions to execute
|
|
|
|
// the provide method with expiration time.
|
|
|
|
message Grant {
|
2023-04-04 00:08:45 +00:00
|
|
|
google.protobuf.Any authorization = 1 [(cosmos_proto.accepts_interface) = "Authorization"];
|
|
|
|
// time when the grant will expire and will be pruned. If null, then the grant
|
|
|
|
// doesn't have a time expiration (other conditions in `authorization`
|
|
|
|
// may apply to invalidate the grant)
|
|
|
|
google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = true];
|
2022-01-08 01:59:34 +00:00
|
|
|
}
|
2022-10-24 18:06:39 +00:00
|
|
|
|
|
|
|
// GrantAuthorization extends a grant with both the addresses of the grantee and granter.
|
|
|
|
// It is used in genesis.proto and query.proto
|
|
|
|
message GrantAuthorization {
|
2023-04-04 00:08:45 +00:00
|
|
|
string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
2022-10-24 18:06:39 +00:00
|
|
|
|
|
|
|
google.protobuf.Any authorization = 3 [(cosmos_proto.accepts_interface) = "Authorization"];
|
2023-04-04 00:08:45 +00:00
|
|
|
google.protobuf.Timestamp expiration = 4 [(gogoproto.stdtime) = true];
|
|
|
|
}
|
|
|
|
|
|
|
|
// GrantQueueItem contains the list of TypeURL of a sdk.Msg.
|
|
|
|
message GrantQueueItem {
|
|
|
|
// msg_type_urls contains the list of TypeURL of a sdk.Msg.
|
|
|
|
repeated string msg_type_urls = 1;
|
2022-10-24 18:06:39 +00:00
|
|
|
}
|