2024-02-15 07:08:32 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package cerc.registry.v1;
|
|
|
|
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
import "cosmos/msg/v1/msg.proto";
|
|
|
|
import "cerc/registry/v1/registry.proto";
|
2024-09-05 07:07:54 +00:00
|
|
|
import "cosmos_proto/cosmos.proto";
|
2024-02-15 07:08:32 +00:00
|
|
|
|
2024-04-01 09:57:26 +00:00
|
|
|
option go_package = "git.vdb.to/cerc-io/laconicd/x/registry";
|
2024-02-15 07:08:32 +00:00
|
|
|
|
|
|
|
// Msg is a service which exposes the registry functionality
|
|
|
|
service Msg {
|
|
|
|
option (cosmos.msg.v1.service) = true;
|
|
|
|
|
|
|
|
// SetRecord records a new record with given payload and bond id
|
|
|
|
rpc SetRecord(MsgSetRecord) returns (MsgSetRecordResponse) {
|
|
|
|
option (google.api.http).post = "/cerc/registry/v1/set_record";
|
|
|
|
}
|
|
|
|
|
|
|
|
// Renew Record renews an expired record
|
|
|
|
rpc RenewRecord(MsgRenewRecord) returns (MsgRenewRecordResponse) {
|
|
|
|
option (google.api.http).post = "/cerc/registry/v1/renew_record";
|
|
|
|
}
|
|
|
|
|
|
|
|
// AssociateBond
|
|
|
|
rpc AssociateBond(MsgAssociateBond) returns (MsgAssociateBondResponse) {
|
|
|
|
option (google.api.http).post = "/cerc/registry/v1/associate_bond";
|
|
|
|
}
|
|
|
|
|
|
|
|
// DissociateBond
|
|
|
|
rpc DissociateBond(MsgDissociateBond) returns (MsgDissociateBondResponse) {
|
|
|
|
option (google.api.http).post = "/cerc/registry/v1/dissociate_bond";
|
|
|
|
}
|
|
|
|
|
|
|
|
// DissociateRecords
|
2024-03-07 11:25:15 +00:00
|
|
|
rpc DissociateRecords(MsgDissociateRecords)
|
|
|
|
returns (MsgDissociateRecordsResponse) {
|
2024-02-15 07:08:32 +00:00
|
|
|
option (google.api.http).post = "/cerc/registry/v1/dissociate_records";
|
|
|
|
}
|
|
|
|
|
2024-02-26 12:56:11 +00:00
|
|
|
// ReassociateRecords
|
2024-03-07 11:25:15 +00:00
|
|
|
rpc ReassociateRecords(MsgReassociateRecords)
|
|
|
|
returns (MsgReassociateRecordsResponse) {
|
2024-02-15 07:08:32 +00:00
|
|
|
option (google.api.http).post = "/cerc/registry/v1/reassociate_records";
|
|
|
|
}
|
|
|
|
|
2024-02-28 04:53:23 +00:00
|
|
|
// SetName will store the name with given lrn and name
|
2024-02-15 07:08:32 +00:00
|
|
|
rpc SetName(MsgSetName) returns (MsgSetNameResponse) {
|
|
|
|
option (google.api.http).post = "/cerc/registry/v1/set_name";
|
|
|
|
}
|
|
|
|
|
|
|
|
// Delete Name method will remove authority name
|
2024-03-07 11:25:15 +00:00
|
|
|
rpc DeleteName(MsgDeleteName) returns (MsgDeleteNameResponse) {
|
2024-02-15 07:08:32 +00:00
|
|
|
option (google.api.http).post = "/cerc/registry/v1/delete_name";
|
|
|
|
}
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
// Reserve authority name
|
|
|
|
rpc ReserveAuthority(MsgReserveAuthority)
|
|
|
|
returns (MsgReserveAuthorityResponse) {
|
|
|
|
option (google.api.http).post = "/cerc/registry/v1/reserve_authority";
|
|
|
|
}
|
|
|
|
|
2024-02-15 07:08:32 +00:00
|
|
|
// SetAuthorityBond
|
2024-03-07 11:25:15 +00:00
|
|
|
rpc SetAuthorityBond(MsgSetAuthorityBond)
|
|
|
|
returns (MsgSetAuthorityBondResponse) {
|
2024-02-15 07:08:32 +00:00
|
|
|
option (google.api.http).post = "/cerc/registry/v1/set_authority_bond";
|
|
|
|
}
|
2024-09-05 07:07:54 +00:00
|
|
|
|
|
|
|
// UpdateParams defines an operation for updating the x/staking module
|
|
|
|
// parameters.
|
|
|
|
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
|
2024-02-15 07:08:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgSetRecord
|
|
|
|
message MsgSetRecord {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
string bond_id = 1
|
|
|
|
[ (gogoproto.moretags) = "json:\"bond_id\" yaml:\"bond_id\"" ];
|
|
|
|
string signer = 2;
|
|
|
|
Payload payload = 3 [ (gogoproto.nullable) = false ];
|
2024-02-15 07:08:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgSetRecordResponse
|
2024-03-07 11:25:15 +00:00
|
|
|
message MsgSetRecordResponse { string id = 1; }
|
2024-02-15 07:08:32 +00:00
|
|
|
|
|
|
|
// Payload
|
|
|
|
message Payload {
|
2024-03-07 11:25:15 +00:00
|
|
|
Record record = 1;
|
2024-02-15 07:08:32 +00:00
|
|
|
repeated Signature signatures = 2 [
|
|
|
|
(gogoproto.nullable) = false,
|
|
|
|
(gogoproto.moretags) = "json:\"signatures\" yaml:\"signatures\""
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgSetName
|
|
|
|
message MsgSetName {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
string lrn = 1;
|
|
|
|
string cid = 2;
|
2024-02-15 07:08:32 +00:00
|
|
|
string signer = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgSetNameResponse
|
|
|
|
message MsgSetNameResponse {}
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
// MsgReserveAuthority
|
2024-02-15 07:08:32 +00:00
|
|
|
message MsgReserveAuthority {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
string name = 1;
|
2024-02-15 07:08:32 +00:00
|
|
|
string signer = 2;
|
|
|
|
|
|
|
|
// if creating a sub-authority.
|
|
|
|
string owner = 3;
|
|
|
|
}
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
// MsgReserveAuthorityResponse
|
2024-02-15 07:08:32 +00:00
|
|
|
message MsgReserveAuthorityResponse {}
|
|
|
|
|
|
|
|
// MsgSetAuthorityBond
|
|
|
|
message MsgSetAuthorityBond {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
string name = 1;
|
|
|
|
string bond_id = 2
|
|
|
|
[ (gogoproto.moretags) = "json:\"bond_id\" yaml:\"bond_id\"" ];
|
|
|
|
string signer = 3;
|
2024-02-15 07:08:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgSetAuthorityBondResponse
|
|
|
|
message MsgSetAuthorityBondResponse {}
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
// MsgDeleteName
|
|
|
|
message MsgDeleteName {
|
2024-02-15 07:08:32 +00:00
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
string lrn = 1;
|
2024-02-15 07:08:32 +00:00
|
|
|
string signer = 2;
|
|
|
|
}
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
// MsgDeleteNameResponse
|
|
|
|
message MsgDeleteNameResponse {}
|
2024-02-15 07:08:32 +00:00
|
|
|
|
|
|
|
// MsgRenewRecord
|
|
|
|
message MsgRenewRecord {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
string record_id = 1
|
|
|
|
[ (gogoproto.moretags) = "json:\"record_id\" yaml:\"record_id\"" ];
|
|
|
|
string signer = 2;
|
2024-02-15 07:08:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgRenewRecordResponse
|
|
|
|
message MsgRenewRecordResponse {}
|
|
|
|
|
|
|
|
// MsgAssociateBond
|
|
|
|
message MsgAssociateBond {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
string record_id = 1
|
|
|
|
[ (gogoproto.moretags) = "json:\"record_id\" yaml:\"record_id\"" ];
|
|
|
|
string bond_id = 2
|
|
|
|
[ (gogoproto.moretags) = "json:\"bond_id\" yaml:\"bond_id\"" ];
|
|
|
|
string signer = 3;
|
2024-02-15 07:08:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgAssociateBondResponse
|
|
|
|
message MsgAssociateBondResponse {}
|
|
|
|
|
|
|
|
// MsgDissociateBond
|
|
|
|
message MsgDissociateBond {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
string record_id = 1
|
|
|
|
[ (gogoproto.moretags) = "json:\"record_id\" yaml:\"record_id\"" ];
|
|
|
|
string signer = 2;
|
2024-02-15 07:08:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgDissociateBondResponse
|
|
|
|
message MsgDissociateBondResponse {}
|
|
|
|
|
|
|
|
// MsgDissociateRecords
|
|
|
|
message MsgDissociateRecords {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
string bond_id = 1
|
|
|
|
[ (gogoproto.moretags) = "json:\"bond_id\" yaml:\"bond_id\"" ];
|
|
|
|
string signer = 2;
|
2024-02-15 07:08:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgDissociateRecordsResponse
|
|
|
|
message MsgDissociateRecordsResponse {}
|
|
|
|
|
2024-02-26 12:56:11 +00:00
|
|
|
// MsgReassociateRecords
|
|
|
|
message MsgReassociateRecords {
|
2024-02-15 07:08:32 +00:00
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-07 11:25:15 +00:00
|
|
|
string new_bond_id = 1
|
|
|
|
[ (gogoproto.moretags) = "json:\"new_bond_id\" yaml:\"new_bond_id\"" ];
|
|
|
|
string old_bond_id = 2
|
|
|
|
[ (gogoproto.moretags) = "json:\"old_bond_id\" yaml:\"old_bond_id\"" ];
|
|
|
|
string signer = 3;
|
2024-02-15 07:08:32 +00:00
|
|
|
}
|
|
|
|
|
2024-02-26 12:56:11 +00:00
|
|
|
// MsgReassociateRecordsResponse
|
|
|
|
message MsgReassociateRecordsResponse {}
|
2024-09-05 07:07:54 +00:00
|
|
|
|
|
|
|
// MsgUpdateParams is the Msg/UpdateParams request type.
|
|
|
|
message MsgUpdateParams {
|
|
|
|
option (cosmos.msg.v1.signer) = "authority";
|
|
|
|
|
|
|
|
// authority is the address that controls the module (defaults to x/gov unless
|
|
|
|
// overwritten).
|
|
|
|
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
|
|
|
|
|
|
|
|
// params defines the x/registry parameters to update.
|
|
|
|
//
|
|
|
|
// NOTE: All parameters must be supplied.
|
|
|
|
Params params = 2 [ (gogoproto.nullable) = false ];
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgUpdateParamsResponse defines the response structure for executing a
|
|
|
|
// MsgUpdateParams message.
|
|
|
|
message MsgUpdateParamsResponse {}
|