2024-03-06 06:31:09 +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";
|
|
|
|
|
|
|
|
option go_package = "git.vdb.to/cerc-io/laconic2d/x/registry";
|
|
|
|
|
|
|
|
// 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-12 05:37:24 +00:00
|
|
|
rpc DissociateRecords(MsgDissociateRecords)
|
|
|
|
returns (MsgDissociateRecordsResponse) {
|
2024-03-06 06:31:09 +00:00
|
|
|
option (google.api.http).post = "/cerc/registry/v1/dissociate_records";
|
|
|
|
}
|
|
|
|
|
|
|
|
// ReassociateRecords
|
2024-03-12 05:37:24 +00:00
|
|
|
rpc ReassociateRecords(MsgReassociateRecords)
|
|
|
|
returns (MsgReassociateRecordsResponse) {
|
2024-03-06 06:31:09 +00:00
|
|
|
option (google.api.http).post = "/cerc/registry/v1/reassociate_records";
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetName will store the name with given lrn and name
|
|
|
|
rpc SetName(MsgSetName) returns (MsgSetNameResponse) {
|
|
|
|
option (google.api.http).post = "/cerc/registry/v1/set_name";
|
|
|
|
}
|
|
|
|
|
|
|
|
// Delete Name method will remove authority name
|
2024-03-12 05:37:24 +00:00
|
|
|
rpc DeleteName(MsgDeleteName) returns (MsgDeleteNameResponse) {
|
2024-03-06 06:31:09 +00:00
|
|
|
option (google.api.http).post = "/cerc/registry/v1/delete_name";
|
|
|
|
}
|
|
|
|
|
2024-03-12 05:37:24 +00:00
|
|
|
// Reserve authority name
|
|
|
|
rpc ReserveAuthority(MsgReserveAuthority)
|
|
|
|
returns (MsgReserveAuthorityResponse) {
|
|
|
|
option (google.api.http).post = "/cerc/registry/v1/reserve_authority";
|
|
|
|
}
|
|
|
|
|
2024-03-06 06:31:09 +00:00
|
|
|
// SetAuthorityBond
|
2024-03-12 05:37:24 +00:00
|
|
|
rpc SetAuthorityBond(MsgSetAuthorityBond)
|
|
|
|
returns (MsgSetAuthorityBondResponse) {
|
2024-03-06 06:31:09 +00:00
|
|
|
option (google.api.http).post = "/cerc/registry/v1/set_authority_bond";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgSetRecord
|
|
|
|
message MsgSetRecord {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-12 05:37:24 +00:00
|
|
|
string bond_id = 1
|
|
|
|
[ (gogoproto.moretags) = "json:\"bond_id\" yaml:\"bond_id\"" ];
|
|
|
|
string signer = 2;
|
|
|
|
Payload payload = 3 [ (gogoproto.nullable) = false ];
|
2024-03-06 06:31:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgSetRecordResponse
|
2024-03-12 05:37:24 +00:00
|
|
|
message MsgSetRecordResponse { string id = 1; }
|
2024-03-06 06:31:09 +00:00
|
|
|
|
|
|
|
// Payload
|
|
|
|
message Payload {
|
2024-03-12 05:37:24 +00:00
|
|
|
Record record = 1;
|
2024-03-06 06:31:09 +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-12 05:37:24 +00:00
|
|
|
string lrn = 1;
|
|
|
|
string cid = 2;
|
2024-03-06 06:31:09 +00:00
|
|
|
string signer = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgSetNameResponse
|
|
|
|
message MsgSetNameResponse {}
|
|
|
|
|
2024-03-12 05:37:24 +00:00
|
|
|
// MsgReserveAuthority
|
2024-03-06 06:31:09 +00:00
|
|
|
message MsgReserveAuthority {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-12 05:37:24 +00:00
|
|
|
string name = 1;
|
2024-03-06 06:31:09 +00:00
|
|
|
string signer = 2;
|
|
|
|
|
|
|
|
// if creating a sub-authority.
|
|
|
|
string owner = 3;
|
|
|
|
}
|
|
|
|
|
2024-03-12 05:37:24 +00:00
|
|
|
// MsgReserveAuthorityResponse
|
2024-03-06 06:31:09 +00:00
|
|
|
message MsgReserveAuthorityResponse {}
|
|
|
|
|
|
|
|
// MsgSetAuthorityBond
|
|
|
|
message MsgSetAuthorityBond {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-12 05:37:24 +00:00
|
|
|
string name = 1;
|
|
|
|
string bond_id = 2
|
|
|
|
[ (gogoproto.moretags) = "json:\"bond_id\" yaml:\"bond_id\"" ];
|
|
|
|
string signer = 3;
|
2024-03-06 06:31:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgSetAuthorityBondResponse
|
|
|
|
message MsgSetAuthorityBondResponse {}
|
|
|
|
|
2024-03-12 05:37:24 +00:00
|
|
|
// MsgDeleteName
|
|
|
|
message MsgDeleteName {
|
2024-03-06 06:31:09 +00:00
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-12 05:37:24 +00:00
|
|
|
string lrn = 1;
|
2024-03-06 06:31:09 +00:00
|
|
|
string signer = 2;
|
|
|
|
}
|
|
|
|
|
2024-03-12 05:37:24 +00:00
|
|
|
// MsgDeleteNameResponse
|
|
|
|
message MsgDeleteNameResponse {}
|
2024-03-06 06:31:09 +00:00
|
|
|
|
|
|
|
// MsgRenewRecord
|
|
|
|
message MsgRenewRecord {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-12 05:37:24 +00:00
|
|
|
string record_id = 1
|
|
|
|
[ (gogoproto.moretags) = "json:\"record_id\" yaml:\"record_id\"" ];
|
|
|
|
string signer = 2;
|
2024-03-06 06:31:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgRenewRecordResponse
|
|
|
|
message MsgRenewRecordResponse {}
|
|
|
|
|
|
|
|
// MsgAssociateBond
|
|
|
|
message MsgAssociateBond {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-12 05:37:24 +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-03-06 06:31:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgAssociateBondResponse
|
|
|
|
message MsgAssociateBondResponse {}
|
|
|
|
|
|
|
|
// MsgDissociateBond
|
|
|
|
message MsgDissociateBond {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-12 05:37:24 +00:00
|
|
|
string record_id = 1
|
|
|
|
[ (gogoproto.moretags) = "json:\"record_id\" yaml:\"record_id\"" ];
|
|
|
|
string signer = 2;
|
2024-03-06 06:31:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgDissociateBondResponse
|
|
|
|
message MsgDissociateBondResponse {}
|
|
|
|
|
|
|
|
// MsgDissociateRecords
|
|
|
|
message MsgDissociateRecords {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-12 05:37:24 +00:00
|
|
|
string bond_id = 1
|
|
|
|
[ (gogoproto.moretags) = "json:\"bond_id\" yaml:\"bond_id\"" ];
|
|
|
|
string signer = 2;
|
2024-03-06 06:31:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgDissociateRecordsResponse
|
|
|
|
message MsgDissociateRecordsResponse {}
|
|
|
|
|
|
|
|
// MsgReassociateRecords
|
|
|
|
message MsgReassociateRecords {
|
|
|
|
option (cosmos.msg.v1.signer) = "signer";
|
|
|
|
|
2024-03-12 05:37:24 +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-03-06 06:31:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgReassociateRecordsResponse
|
|
|
|
message MsgReassociateRecordsResponse {}
|