mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
refactor: remove unused code related to whitelisted assets
This commit is contained in:
@@ -18,16 +18,34 @@ message Params {
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
bool some_value = 2;
|
||||
ServiceCategories categories = 1;
|
||||
ServiceTypes types = 2;
|
||||
}
|
||||
|
||||
message ServiceCategories {
|
||||
option (amino.name) = "service/categories";
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
repeated string categories = 1;
|
||||
}
|
||||
|
||||
message ServiceTypes {
|
||||
option (amino.name) = "service/types";
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
repeated string types = 1;
|
||||
}
|
||||
|
||||
// Service defines a Decentralized Service on the Sonr Blockchain
|
||||
message Service {
|
||||
string id = 1;
|
||||
string service_type = 2;
|
||||
string authority = 3;
|
||||
string origin = 4;
|
||||
string authority = 2;
|
||||
string origin = 3;
|
||||
string name = 4;
|
||||
string description = 5;
|
||||
map<string, string> service_endpoints = 6;
|
||||
map<string, string> permissions = 7;
|
||||
string category = 6;
|
||||
repeated string tags = 7;
|
||||
int64 expiry_height = 8;
|
||||
}
|
||||
|
||||
@@ -7,13 +7,60 @@ option go_package = "github.com/onsonr/sonr/x/service/types";
|
||||
|
||||
// https://github.com/cosmos/cosmos-sdk/blob/main/orm/README.md
|
||||
|
||||
message ExampleData {
|
||||
option (cosmos.orm.v1.table) = {
|
||||
id: 1;
|
||||
primary_key: { fields: "account" }
|
||||
index: { id: 1 fields: "amount" }
|
||||
};
|
||||
message Metadata {
|
||||
option (cosmos.orm.v1.table) = {
|
||||
id: 1
|
||||
primary_key: {
|
||||
fields: "id"
|
||||
auto_increment: true
|
||||
}
|
||||
index: {
|
||||
id: 1
|
||||
fields: "origin"
|
||||
unique: true
|
||||
}
|
||||
};
|
||||
|
||||
bytes account = 1;
|
||||
uint64 amount = 2;
|
||||
}
|
||||
uint64 id = 1;
|
||||
string origin = 2;
|
||||
string name = 3;
|
||||
string description = 4;
|
||||
string category = 5;
|
||||
URI icon = 6;
|
||||
repeated string tags = 7;
|
||||
}
|
||||
|
||||
// Profile represents a DID alias
|
||||
message Profile {
|
||||
option (cosmos.orm.v1.table) = {
|
||||
id: 2
|
||||
primary_key: {fields: "id"}
|
||||
index: {
|
||||
id: 1
|
||||
fields: "subject,origin"
|
||||
unique: true
|
||||
}
|
||||
};
|
||||
|
||||
// The unique identifier of the alias
|
||||
string id = 1;
|
||||
|
||||
// The alias of the DID
|
||||
string subject = 2;
|
||||
|
||||
// Origin of the alias
|
||||
string origin = 3;
|
||||
|
||||
// Controller of the alias
|
||||
string controller = 4;
|
||||
}
|
||||
|
||||
message URI {
|
||||
enum Protocol {
|
||||
HTTPS = 0;
|
||||
IPFS = 1;
|
||||
}
|
||||
|
||||
Protocol protocol = 1;
|
||||
string uri = 2;
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@ syntax = "proto3";
|
||||
package service.v1;
|
||||
|
||||
import "cosmos/msg/v1/msg.proto";
|
||||
import "service/v1/genesis.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "service/v1/genesis.proto";
|
||||
|
||||
option go_package = "github.com/onsonr/sonr/x/service/types";
|
||||
|
||||
@@ -16,6 +16,10 @@ service Msg {
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
|
||||
|
||||
// RegisterService initializes a Service with a given permission scope and
|
||||
// URI. The domain must have a valid TXT record containing the public key.
|
||||
rpc RegisterService(MsgRegisterService) returns (MsgRegisterServiceResponse);
|
||||
}
|
||||
|
||||
// MsgUpdateParams is the Msg/UpdateParams request type.
|
||||
@@ -38,3 +42,21 @@ message MsgUpdateParams {
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
message MsgUpdateParamsResponse {}
|
||||
|
||||
// MsgRegisterService is the message type for the RegisterService RPC.
|
||||
message MsgRegisterService {
|
||||
option (cosmos.msg.v1.signer) = "controller";
|
||||
|
||||
// authority is the address of the governance account.
|
||||
string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
|
||||
// origin is the origin of the request in wildcard form. Requires valid TXT
|
||||
// record in DNS.
|
||||
Service service = 2;
|
||||
}
|
||||
|
||||
// MsgRegisterServiceResponse is the response type for the RegisterService RPC.
|
||||
message MsgRegisterServiceResponse {
|
||||
bool success = 1;
|
||||
string did = 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user