mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
feature/1214 session fetch refactor (#1215)
* chore(docs): remove token economy guide * refactor(context): update GatewayContext to use Querier interface * chore(database): update schema path * docs: Update READMEs for x/did, x/dwn, and x/svc with UCAN integration * chore(pkg): update database scope name * refactor(did): optimize GenesisState proto methods * refactor(svc): update Service proto to use repeated fields * refactor(api): rename MsgSpawn to MsgInitialize
This commit is contained in:
+30
-10
@@ -12,6 +12,36 @@ message GenesisState {
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// Params defines the set of module parameters.
|
||||
message Params {
|
||||
option (amino.name) = "did/params";
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
repeated Attenuation attenuations = 1;
|
||||
}
|
||||
|
||||
// Attenuation defines the attenuation of a resource
|
||||
message Attenuation {
|
||||
Resource resource = 1;
|
||||
repeated Capability capabilities = 2;
|
||||
}
|
||||
|
||||
// Capability reprensents the available capabilities of a decentralized web node
|
||||
message Capability {
|
||||
string name = 1;
|
||||
string parent = 2;
|
||||
string description = 3;
|
||||
repeated string resources = 4;
|
||||
}
|
||||
|
||||
// Resource reprensents the available resources of a decentralized web node
|
||||
message Resource {
|
||||
string kind = 1;
|
||||
string template = 2;
|
||||
}
|
||||
|
||||
|
||||
// Document defines a DID document
|
||||
message Document {
|
||||
string id = 1;
|
||||
@@ -24,13 +54,3 @@ message Document {
|
||||
}
|
||||
|
||||
|
||||
// Params defines the set of module parameters.
|
||||
message Params {
|
||||
option (amino.name) = "did/params";
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
// Whitelisted Assets
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ service Msg {
|
||||
|
||||
|
||||
// Spawn spawns a new Vault
|
||||
rpc Spawn(MsgSpawn) returns (MsgSpawnResponse);
|
||||
rpc Initialize(MsgInitialize) returns (MsgInitializeResponse);
|
||||
}
|
||||
|
||||
// MsgUpdateParams is the Msg/UpdateParams request type.
|
||||
@@ -46,7 +46,7 @@ message MsgUpdateParamsResponse {}
|
||||
// operation that must be performed interacting with the Vault.
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
message MsgSpawn {
|
||||
message MsgInitialize {
|
||||
option (cosmos.msg.v1.signer) = "authority";
|
||||
|
||||
// authority is the address of the governance account.
|
||||
@@ -62,4 +62,4 @@ message MsgSpawn {
|
||||
// MsgSpawn message.
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
message MsgSpawnResponse {}
|
||||
message MsgInitializeResponse {}
|
||||
|
||||
+18
-13
@@ -18,32 +18,37 @@ message Params {
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
ServiceCategories categories = 1;
|
||||
ServiceTypes types = 2;
|
||||
repeated Attenuation attenuations = 1;
|
||||
}
|
||||
|
||||
message ServiceCategories {
|
||||
option (amino.name) = "service/categories";
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
repeated string categories = 1;
|
||||
// Attenuation defines the attenuation of a resource
|
||||
message Attenuation {
|
||||
Resource resource = 1;
|
||||
repeated Capability capabilities = 2;
|
||||
}
|
||||
|
||||
message ServiceTypes {
|
||||
option (amino.name) = "service/types";
|
||||
option (gogoproto.equal) = true;
|
||||
// Capability reprensents the available capabilities of a decentralized web node
|
||||
message Capability {
|
||||
string name = 1;
|
||||
string parent = 2;
|
||||
string description = 3;
|
||||
repeated string resources = 4;
|
||||
}
|
||||
|
||||
repeated string types = 1;
|
||||
// Resource reprensents the available resources of a decentralized web node
|
||||
message Resource {
|
||||
string kind = 1;
|
||||
string template = 2;
|
||||
}
|
||||
|
||||
// Service defines a Decentralized Service on the Sonr Blockchain
|
||||
message Service {
|
||||
string id = 1;
|
||||
string authority = 2;
|
||||
string origin = 3;
|
||||
repeated string origins = 3;
|
||||
string name = 4;
|
||||
string description = 5;
|
||||
string category = 6;
|
||||
repeated Attenuation attenuations = 6;
|
||||
repeated string tags = 7;
|
||||
int64 expiry_height = 8;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,16 @@ service Query {
|
||||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
||||
option (google.api.http).get = "/svc/v1/params";
|
||||
}
|
||||
|
||||
// OriginExists queries if a given origin exists.
|
||||
rpc OriginExists(QueryOriginExistsRequest) returns (QueryOriginExistsResponse) {
|
||||
option (google.api.http).get = "/svc/v1/origins/{origin}";
|
||||
}
|
||||
|
||||
// ResolveOrigin queries the domain of a given service and returns its record with capabilities.
|
||||
rpc ResolveOrigin(QueryResolveOriginRequest) returns (QueryResolveOriginResponse) {
|
||||
option (google.api.http).get = "/svc/v1/origins/{origin}/record";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryParamsRequest is the request type for the Query/Params RPC method.
|
||||
@@ -22,3 +32,27 @@ message QueryParamsResponse {
|
||||
// params defines the parameters of the module.
|
||||
Params params = 1;
|
||||
}
|
||||
|
||||
// QueryOriginExistsRequest is the request type for the Query/OriginExists RPC method.
|
||||
message QueryOriginExistsRequest {
|
||||
// origin is the origin to query.
|
||||
string origin = 1;
|
||||
}
|
||||
|
||||
// QueryOriginExistsResponse is the response type for the Query/OriginExists RPC method.
|
||||
message QueryOriginExistsResponse {
|
||||
// exists is the boolean value representing whether the origin exists.
|
||||
bool exists = 1;
|
||||
}
|
||||
|
||||
// QueryResolveOriginRequest is the request type for the Query/ResolveOrigin RPC method.
|
||||
message QueryResolveOriginRequest {
|
||||
// origin is the origin to query.
|
||||
string origin = 1;
|
||||
}
|
||||
|
||||
// QueryResolveOriginResponse is the response type for the Query/ResolveOrigin RPC method.
|
||||
message QueryResolveOriginResponse {
|
||||
// record is the record of the origin.
|
||||
Service record = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user