laconicd/proto/vulcanize/registry/v1beta1/tx.proto
Murali Krishna Komatireddy fac5a95679
wrap typed data for record attributes (#70)
* unpack interface

* unpackInterfaces

* gofmpt

* patch setRecord in WrapTxToTypedData

* patch message types

* hardcode record attributes

* patch typed data

* versioning record attributes and http post rules for rpc messages

* record names
2023-01-09 12:19:11 +05:30

159 lines
5.1 KiB
Protocol Buffer

syntax = "proto3";
package vulcanize.registry.v1beta1;
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "vulcanize/registry/v1beta1/registry.proto";
option go_package = "github.com/cerc-io/laconicd/x/registry/types";
// Msg
service Msg {
// SetRecord will records a new record with given payload and bond id
rpc SetRecord(MsgSetRecord) returns (MsgSetRecordResponse) {
option (google.api.http).post = "/vulcanize/registry/v1beta1/set_record";
}
// Renew Record will renew the expire record
rpc RenewRecord(MsgRenewRecord) returns (MsgRenewRecordResponse) {
option (google.api.http).post = "/vulcanize/registry/v1beta1/renew_record";
}
// AssociateBond
rpc AssociateBond(MsgAssociateBond) returns (MsgAssociateBondResponse) {
option (google.api.http).post = "/vulcanize/registry/v1beta1/associate_bond";
}
// DissociateBond
rpc DissociateBond(MsgDissociateBond) returns (MsgDissociateBondResponse) {
option (google.api.http).post = "/vulcanize/registry/v1beta1/dissociate_bond";
}
// DissociateRecords
rpc DissociateRecords(MsgDissociateRecords) returns (MsgDissociateRecordsResponse) {
option (google.api.http).post = "/vulcanize/registry/v1beta1/dissociate_records";
}
// ReAssociateRecords
rpc ReAssociateRecords(MsgReAssociateRecords) returns (MsgReAssociateRecordsResponse) {
option (google.api.http).post = "/vulcanize/registry/v1beta1/reassociate_records";
}
// SetName will store the name with given crn and name
rpc SetName(MsgSetName) returns (MsgSetNameResponse) {
option (google.api.http).post = "/vulcanize/registry/v1beta1/set_name";
}
// Reserve name
rpc ReserveName(MsgReserveAuthority) returns (MsgReserveAuthorityResponse) {
option (google.api.http).post = "/vulcanize/registry/v1beta1/reserve_name";
}
// Delete Name method will remove authority name
rpc DeleteName(MsgDeleteNameAuthority) returns (MsgDeleteNameAuthorityResponse) {
option (google.api.http).post = "/vulcanize/registry/v1beta1/delete_name";
}
// SetAuthorityBond
rpc SetAuthorityBond(MsgSetAuthorityBond) returns (MsgSetAuthorityBondResponse) {
option (google.api.http).post = "/vulcanize/registry/v1beta1/set_authority_bond";
}
}
// MsgSetRecord
message MsgSetRecord {
string bond_id = 1 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
string signer = 2;
Payload payload = 3 [(gogoproto.nullable) = false];
}
// MsgSetRecordResponse
message MsgSetRecordResponse {
string id = 1;
}
// Payload
message Payload {
Record record = 1;
repeated Signature signatures = 2
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"signatures\" yaml:\"signatures\""];
}
// MsgSetName
message MsgSetName {
string crn = 1;
string cid = 2;
string signer = 3;
}
// MsgSetNameResponse
message MsgSetNameResponse {}
// MsgReserveName
message MsgReserveAuthority {
string name = 1;
string signer = 2;
// if creating a sub-authority.
string owner = 3;
}
// MsgReserveNameResponse
message MsgReserveAuthorityResponse {}
// MsgSetAuthorityBond is SDK message for SetAuthorityBond
message MsgSetAuthorityBond {
string name = 1;
string bond_id = 2 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
string signer = 3;
}
// MsgSetAuthorityBondResponse
message MsgSetAuthorityBondResponse {}
// MsgDeleteNameAuthority is SDK message for DeleteNameAuthority
message MsgDeleteNameAuthority {
string crn = 1;
string signer = 2;
}
// MsgDeleteNameAuthorityResponse
message MsgDeleteNameAuthorityResponse {}
// MsgRenewRecord is SDK message for Renew a record
message MsgRenewRecord {
string record_id = 1 [(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""];
string signer = 2;
}
// MsgRenewRecordResponse
message MsgRenewRecordResponse {}
// MsgAssociateBond
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;
}
// MsgAssociateBondResponse
message MsgAssociateBondResponse {}
// MsgDissociateBond is SDK message for Msg/DissociateBond
message MsgDissociateBond {
string record_id = 1 [(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""];
string signer = 2;
}
// MsgDissociateBondResponse is response type for MsgDissociateBond
message MsgDissociateBondResponse {}
// MsgDissociateRecords is SDK message for Msg/DissociateRecords
message MsgDissociateRecords {
string bond_id = 1 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
string signer = 2;
}
// MsgDissociateRecordsResponse is response type for MsgDissociateRecords
message MsgDissociateRecordsResponse {}
// MsgReAssociateRecords is SDK message for Msg/ReAssociateRecords
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;
}
// MsgReAssociateRecordsResponse is response type for MsgReAssociateRecords
message MsgReAssociateRecordsResponse {}