2022-04-05 07:09:27 +00:00
|
|
|
syntax = "proto3";
|
2022-12-09 04:17:14 +00:00
|
|
|
package vulcanize.registry.v1beta1;
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
import "gogoproto/gogo.proto";
|
2023-01-09 06:49:11 +00:00
|
|
|
import "google/api/annotations.proto";
|
2022-12-09 04:17:14 +00:00
|
|
|
import "vulcanize/registry/v1beta1/registry.proto";
|
2022-04-05 07:09:27 +00:00
|
|
|
|
2022-12-09 04:17:14 +00:00
|
|
|
option go_package = "github.com/cerc-io/laconicd/x/registry/types";
|
2022-04-05 07:09:27 +00:00
|
|
|
|
2023-09-08 08:34:18 +00:00
|
|
|
// Msg is a service which exposes the registry functionality
|
2022-04-05 07:09:27 +00:00
|
|
|
service Msg {
|
2023-09-08 08:34:18 +00:00
|
|
|
// SetRecord records a new record with given payload and bond id
|
2023-01-09 06:49:11 +00:00
|
|
|
rpc SetRecord(MsgSetRecord) returns (MsgSetRecordResponse) {
|
|
|
|
option (google.api.http).post = "/vulcanize/registry/v1beta1/set_record";
|
|
|
|
}
|
2023-09-08 08:34:18 +00:00
|
|
|
// Renew Record renews an expired record
|
2023-01-09 06:49:11 +00:00
|
|
|
rpc RenewRecord(MsgRenewRecord) returns (MsgRenewRecordResponse) {
|
|
|
|
option (google.api.http).post = "/vulcanize/registry/v1beta1/renew_record";
|
|
|
|
}
|
2022-04-05 07:09:27 +00:00
|
|
|
// AssociateBond
|
2023-01-09 06:49:11 +00:00
|
|
|
rpc AssociateBond(MsgAssociateBond) returns (MsgAssociateBondResponse) {
|
|
|
|
option (google.api.http).post = "/vulcanize/registry/v1beta1/associate_bond";
|
|
|
|
}
|
2022-04-05 07:09:27 +00:00
|
|
|
// DissociateBond
|
2023-01-09 06:49:11 +00:00
|
|
|
rpc DissociateBond(MsgDissociateBond) returns (MsgDissociateBondResponse) {
|
|
|
|
option (google.api.http).post = "/vulcanize/registry/v1beta1/dissociate_bond";
|
|
|
|
}
|
2022-04-05 07:09:27 +00:00
|
|
|
// DissociateRecords
|
2023-01-09 06:49:11 +00:00
|
|
|
rpc DissociateRecords(MsgDissociateRecords) returns (MsgDissociateRecordsResponse) {
|
|
|
|
option (google.api.http).post = "/vulcanize/registry/v1beta1/dissociate_records";
|
|
|
|
}
|
2022-04-05 07:09:27 +00:00
|
|
|
// ReAssociateRecords
|
2023-01-09 06:49:11 +00:00
|
|
|
rpc ReAssociateRecords(MsgReAssociateRecords) returns (MsgReAssociateRecordsResponse) {
|
|
|
|
option (google.api.http).post = "/vulcanize/registry/v1beta1/reassociate_records";
|
|
|
|
}
|
2022-04-20 07:37:38 +00:00
|
|
|
// SetName will store the name with given crn and name
|
2023-01-09 06:49:11 +00:00
|
|
|
rpc SetName(MsgSetName) returns (MsgSetNameResponse) {
|
|
|
|
option (google.api.http).post = "/vulcanize/registry/v1beta1/set_name";
|
|
|
|
}
|
2022-04-05 07:09:27 +00:00
|
|
|
// Reserve name
|
2023-01-09 06:49:11 +00:00
|
|
|
rpc ReserveName(MsgReserveAuthority) returns (MsgReserveAuthorityResponse) {
|
|
|
|
option (google.api.http).post = "/vulcanize/registry/v1beta1/reserve_name";
|
|
|
|
}
|
2022-04-05 07:09:27 +00:00
|
|
|
// Delete Name method will remove authority name
|
2023-01-09 06:49:11 +00:00
|
|
|
rpc DeleteName(MsgDeleteNameAuthority) returns (MsgDeleteNameAuthorityResponse) {
|
|
|
|
option (google.api.http).post = "/vulcanize/registry/v1beta1/delete_name";
|
|
|
|
}
|
2022-04-05 07:09:27 +00:00
|
|
|
// SetAuthorityBond
|
2023-01-09 06:49:11 +00:00
|
|
|
rpc SetAuthorityBond(MsgSetAuthorityBond) returns (MsgSetAuthorityBondResponse) {
|
|
|
|
option (google.api.http).post = "/vulcanize/registry/v1beta1/set_authority_bond";
|
|
|
|
}
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgSetRecord
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgSetRecord {
|
|
|
|
string bond_id = 1 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
|
|
|
|
string signer = 2;
|
|
|
|
Payload payload = 3 [(gogoproto.nullable) = false];
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgSetRecordResponse
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgSetRecordResponse {
|
2022-04-20 11:51:52 +00:00
|
|
|
string id = 1;
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Payload
|
|
|
|
message Payload {
|
2022-10-10 10:38:33 +00:00
|
|
|
Record record = 1;
|
2023-09-08 08:34:18 +00:00
|
|
|
repeated Signature signatures = 2 [
|
|
|
|
(gogoproto.nullable) = false,
|
|
|
|
(gogoproto.moretags) = "json:\"signatures\" yaml:\"signatures\""
|
|
|
|
];
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgSetName
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgSetName {
|
|
|
|
string crn = 1;
|
|
|
|
string cid = 2;
|
2022-04-05 07:09:27 +00:00
|
|
|
string signer = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgSetNameResponse
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgSetNameResponse {}
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
// MsgReserveName
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgReserveAuthority {
|
|
|
|
string name = 1;
|
2022-04-05 07:09:27 +00:00
|
|
|
string signer = 2;
|
|
|
|
// if creating a sub-authority.
|
|
|
|
string owner = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgReserveNameResponse
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgReserveAuthorityResponse {}
|
2022-04-05 07:09:27 +00:00
|
|
|
|
2023-09-08 08:34:18 +00:00
|
|
|
// MsgSetAuthorityBond
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgSetAuthorityBond {
|
|
|
|
string name = 1;
|
|
|
|
string bond_id = 2 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
|
|
|
|
string signer = 3;
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgSetAuthorityBondResponse
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgSetAuthorityBondResponse {}
|
2022-04-05 07:09:27 +00:00
|
|
|
|
2023-09-08 08:34:18 +00:00
|
|
|
// MsgDeleteNameAuthority
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgDeleteNameAuthority {
|
|
|
|
string crn = 1;
|
2022-04-05 07:09:27 +00:00
|
|
|
string signer = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgDeleteNameAuthorityResponse
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgDeleteNameAuthorityResponse {}
|
2022-04-05 07:09:27 +00:00
|
|
|
|
2023-09-08 08:34:18 +00:00
|
|
|
// MsgRenewRecord
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgRenewRecord {
|
|
|
|
string record_id = 1 [(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""];
|
|
|
|
string signer = 2;
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgRenewRecordResponse
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgRenewRecordResponse {}
|
2022-04-05 07:09:27 +00:00
|
|
|
|
|
|
|
// MsgAssociateBond
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgAssociateBond {
|
|
|
|
string record_id = 1 [(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""];
|
|
|
|
string bond_id = 2 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
|
|
|
|
string signer = 3;
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgAssociateBondResponse
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgAssociateBondResponse {}
|
2022-04-05 07:09:27 +00:00
|
|
|
|
2023-09-08 08:34:18 +00:00
|
|
|
// MsgDissociateBond
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgDissociateBond {
|
|
|
|
string record_id = 1 [(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""];
|
|
|
|
string signer = 2;
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
2023-09-08 08:34:18 +00:00
|
|
|
// MsgDissociateBondResponse
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgDissociateBondResponse {}
|
2022-04-05 07:09:27 +00:00
|
|
|
|
2023-09-08 08:34:18 +00:00
|
|
|
// MsgDissociateRecords
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgDissociateRecords {
|
|
|
|
string bond_id = 1 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
|
|
|
|
string signer = 2;
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
2023-09-08 08:34:18 +00:00
|
|
|
// MsgDissociateRecordsResponse
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgDissociateRecordsResponse {}
|
2022-04-05 07:09:27 +00:00
|
|
|
|
2023-09-08 08:34:18 +00:00
|
|
|
// MsgReAssociateRecords
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgReAssociateRecords {
|
|
|
|
string new_bond_id = 1 [(gogoproto.moretags) = "json:\"newBondId\" yaml:\"newBondId\""];
|
|
|
|
string old_bond_id = 2 [(gogoproto.moretags) = "json:\"oldBondId\" yaml:\"oldBondId\""];
|
|
|
|
string signer = 3;
|
2022-04-05 07:09:27 +00:00
|
|
|
}
|
|
|
|
|
2023-09-08 08:34:18 +00:00
|
|
|
// MsgReAssociateRecordsResponse
|
2022-10-10 10:38:33 +00:00
|
|
|
message MsgReAssociateRecordsResponse {}
|