feature/implement vault allocation (#11)

* feat: add authentication middleware

* feat: add REST API endpoints for database interactions

* refactor: move DiscoveryDocument Pkl schema to oidc module

* fix: replace sonrd with test_node.sh

* feat: use NFT keeper to mint DID namespace NFT

* refactor: move NFT class configuration to types

* feat: add GlobalIntegrity genesis state

* fix: ensure GlobalIntegrity is initialized in genesis

* refactor: update all references to transactions module

* refactor: improve genesis state struct

* chore(did): update discovery endpoint to reflect base url

* feat: remove unused context cache and client code

* refactor: remove middleware dependency from keeper

* feat: Add new query handlers for DID module

* feat: Implement unimplemented params queries

* feat: add support for first-party caveats

* refactor: move motr command to cmd directory

* feat: add support for GitHub releases

* fix(motr): build app.wasm for motr package

* feat: add card component

* feat: add IndexedDB support for persistent storage

* feat: Add Row and Column components

* feat: add  and  components

* refactor: improve button component

* refactor: remove unnecessary button parameter in renderButton

* feat: add vault service endpoint

* feat: add input component
This commit is contained in:
Prad Nukala
2024-09-14 12:47:25 -04:00
committed by GitHub
parent bbfe2a2329
commit b593245fe6
133 changed files with 13352 additions and 4247 deletions
+17 -21
View File
@@ -10,6 +10,17 @@ option go_package = "github.com/onsonr/sonr/x/did/types";
message GenesisState {
// Params defines all the parameters of the module.
Params params = 1 [(gogoproto.nullable) = false];
// GlobalIntegrity defines a zkp integrity proof for the entire DID namespace
GlobalIntegrity global_integrity = 2;
}
// GlobalIntegrity defines a zkp integrity proof for the entire DID namespace
message GlobalIntegrity {
string controller = 1;
string seed = 2;
bytes accumulator = 3;
uint64 count = 4;
}
// Params defines the set of module parameters.
@@ -21,23 +32,20 @@ message Params {
// Whitelisted Assets
repeated AssetInfo whitelisted_assets = 1;
// Whitelisted Blockchains
repeated ChainInfo whitelisted_chains = 2;
// Whitelisted Key Types
repeated KeyInfo allowed_public_keys = 3;
map<string, KeyInfo> allowed_public_keys = 2;
// IpfsActive is a flag to enable/disable ipfs
bool ipfs_active = 4;
bool ipfs_active = 3;
// Localhost Registration Enabled
bool localhost_registration_enabled = 5;
bool localhost_registration_enabled = 4;
// ConveyancePreference defines the conveyance preference
string conveyance_preference = 6;
string conveyance_preference = 5;
// AttestationFormats defines the attestation formats
repeated string attestation_formats = 7;
repeated string attestation_formats = 6;
}
// AssetInfo defines the asset info
@@ -57,20 +65,8 @@ message AssetInfo {
// The name of the asset
string name = 5;
// The Method of the did namespace
string method = 6;
// The icon url
string icon_url = 7;
}
// ChainInfo defines the chain info
message ChainInfo {
string id = 1;
string chain_id = 2;
string name = 3;
string symbol = 4;
repeated ValidatorInfo validators = 5;
string icon_url = 6;
}
// KeyInfo defines information for accepted PubKey types
+14 -5
View File
@@ -97,9 +97,18 @@ message ServiceInfo {
Service service = 4;
}
// Token defines a macron token
message Token {
string id = 1;
string controller = 2;
bytes macron = 3;
// FirstPartyCaveat defines a first party caveat
message FirstPartyCaveat {
Permissions scope = 1;
int64 exp = 2;
string cnf = 3;
string aud = 4;
}
// ThirdPartyCaveat defines a third party caveat
message ThirdPartyCaveat {
Permissions scope = 1;
int64 exp = 2;
string cnf = 3;
string aud = 4;
}
+54 -2
View File
@@ -10,8 +10,33 @@ option go_package = "github.com/onsonr/sonr/x/did/types";
// Query provides defines the gRPC querier service.
service Query {
// Params queries all parameters of the module.
rpc Params(QueryRequest) returns (QueryResponse) {
option (google.api.http).get = "/did/params";
rpc Params(QueryRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/params";
}
// ParamsAssets queries all parameters of the module.
rpc ParamsAssets(QueryRequest) returns (QueryResponse) {
option (google.api.http).get = "/params/assets";
}
// Params queries all parameters of the module.
rpc ParamsByAsset(QueryRequest) returns (QueryResponse) {
option (google.api.http).get = "/params/assets/{asset}";
}
// ParamsKeys queries all parameters of the module.
rpc ParamsKeys(QueryRequest) returns (QueryResponse) {
option (google.api.http).get = "/params/keys";
}
// Params queries all parameters of the module.
rpc ParamsByKey(QueryRequest) returns (QueryResponse) {
option (google.api.http).get = "/params/keys/{key}";
}
// Params queries all parameters of the module.
rpc RegistrationOptionsByKey(QueryRequest) returns (QueryResponse) {
option (google.api.http).get = "/params/keys/{key}/registration";
}
// Resolve queries the DID document by its id.
@@ -31,6 +56,8 @@ service Query {
message QueryRequest {
string did = 1;
string origin = 2;
string key = 3;
string asset = 4;
}
// QueryResolveResponse is the response type for the Query/Resolve RPC method.
@@ -41,3 +68,28 @@ message QueryResponse {
ServiceInfo service = 4;
Params params = 5;
}
// QueryParamsResponse is the response type for the Query/Params RPC method.
message QueryParamsResponse {
Params params = 1;
}
message QueryParamsAssetsResponse {
repeated AssetInfo assets = 1;
}
message QueryParamsKeysResponse {
map<string, KeyInfo> keys = 1;
}
message QueryParamsByKeyResponse {
KeyInfo key = 1;
}
message QueryParamsByAssetResponse {
AssetInfo asset = 1;
}
message QueryRegistrationOptionsByKeyResponse {
repeated string registration_options = 1;
}
+6 -6
View File
@@ -48,7 +48,7 @@ message MsgUpdateParams {
Params params = 2 [(gogoproto.nullable) = false];
// token is the macron token to authenticate the operation.
Token token = 3;
string token = 3;
}
// MsgUpdateParamsResponse defines the response structure for executing a
@@ -100,7 +100,7 @@ message MsgProveWitness {
bytes witness = 3;
// token is the macron token to authenticate the operation.
Token token = 4;
string token = 4;
}
// MsgProveWitnessResponse is the response type for the ProveWitness RPC.
@@ -117,7 +117,7 @@ message MsgSyncController {
string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// Token is the public token to authenticate the operation.
Token token = 3;
string token = 3;
}
// MsgSyncControllerResponse is the response type for the SyncController RPC.
@@ -168,13 +168,13 @@ message MsgAuthorizeService {
Permissions scopes = 3;
// token is the macron token to authenticate the operation.
Token token = 4;
string token = 4;
}
// MsgAuthorizeServiceResponse is the response type for the AuthorizeService RPC.
message MsgAuthorizeServiceResponse {
bool success = 1;
Token token = 2;
string token = 2;
}
// MsgRegisterService is the message type for the RegisterService RPC.
@@ -188,7 +188,7 @@ message MsgRegisterService {
Service service = 2;
// token is the macron token to authenticate the operation.
Token token = 3;
string token = 3;
}
// MsgRegisterServiceResponse is the response type for the RegisterService RPC.