feature/refactor did state (#10)

* feat(did): remove account types

* feat: Refactor Property to Proof in zkprop.go

* feat: add ZKP proof mechanism for verifications

* fix: return bool and error from pinInitialVault

* feat: implement KeyshareSet for managing user and validator keyshares

* feat: Update Credential type in protobuf

* feat: update credential schema with sign count

* feat: migrate  and  modules to middleware

* refactor: rename vault module to ORM

* chore(dwn): add service worker registration to index template

* feat: integrate service worker for offline functionality

* refactor(did): use DIDNamespace enum for verification method in proto reflection

* refactor: update protobuf definitions to support Keyshare

* feat: expose did keeper in app keepers

* Add Motr Web App

* refactor: rename motr/handlers/discovery.go to motr/handlers/openid.go

* refactor: move session related code to middleware

* feat: add database operations for managing assets, chains, and credentials

* feat: add htmx support for UI updates

* refactor: extract common helper scripts

* chore: remove unused storage GUI components

* refactor: Move frontend rendering to dedicated handlers

* refactor: rename  to

* refactor: move alert implementation to templ

* feat: add alert component with icon, title, and message

* feat: add new RequestHeaders struct to store request headers

* Feature/create home view (#9)

* refactor: move view logic to new htmx handler

* refactor: remove unnecessary dependencies

* refactor: remove unused dependencies

* feat(devbox): integrate air for local development

* feat: implement openid connect discovery document

* refactor: rename  to

* refactor(did): update service handling to support DNS discovery

* feat: add support for user and validator keyshares

* refactor: move keyshare signing logic to signer
This commit is contained in:
Prad Nukala
2024-09-11 15:10:54 -04:00
committed by GitHub
parent 4f2d342649
commit bbfe2a2329
197 changed files with 14668 additions and 27810 deletions
+26 -41
View File
@@ -18,15 +18,15 @@ service Msg {
// Since: cosmos-sdk 0.47
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
// Authorize asserts the given controller is the owner of the given address.
rpc Authorize(MsgAuthorize) returns (MsgAuthorizeResponse);
// AuthorizeService asserts the given controller is the owner of the given address.
rpc AuthorizeService(MsgAuthorizeService) returns (MsgAuthorizeServiceResponse);
// AllocateVault assembles a sqlite3 database in a local directory and returns the CID of the database.
// this operation is called by services initiating a controller registration.
rpc AllocateVault(MsgAllocateVault) returns (MsgAllocateVaultResponse);
// SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet.
rpc SyncVault(MsgSyncVault) returns (MsgSyncVaultResponse);
// SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet.
rpc SyncController(MsgSyncController) returns (MsgSyncControllerResponse);
// RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias.
rpc RegisterController(MsgRegisterController) returns (MsgRegisterControllerResponse);
@@ -81,6 +81,9 @@ message MsgAllocateVaultResponse {
// RegistrationOptions is a json string of the PublicKeyCredentialCreationOptions for WebAuthn
string registration_options = 3;
// IsLocalhost is a flag to indicate if the vault is localhost
bool localhost = 4;
}
// MsgProveWitness is the message type for the ProveWitness RPC.
@@ -106,8 +109,8 @@ message MsgProveWitnessResponse {
string property = 2;
}
// MsgSyncVault is the message type for the SyncVault RPC.
message MsgSyncVault {
// MsgSyncController is the message type for the SyncController RPC.
message MsgSyncController {
option (cosmos.msg.v1.signer) = "controller";
// controller is the address of the controller to sync.
@@ -117,8 +120,8 @@ message MsgSyncVault {
Token token = 3;
}
// MsgSyncVaultResponse is the response type for the SyncVault RPC.
message MsgSyncVaultResponse {
// MsgSyncControllerResponse is the response type for the SyncController RPC.
message MsgSyncControllerResponse {
bool success = 1;
}
@@ -136,10 +139,7 @@ message MsgRegisterController {
string origin = 3;
// Credential is the list of keyshares to initialize the controller with.
repeated Credential authentication = 4;
// token is the macron token to authenticate the operation.
Token token = 5;
string credential_creation_response = 4;
}
// MsgRegisterControllerResponse is the response type for the InitializeController RPC.
@@ -154,28 +154,25 @@ message MsgRegisterControllerResponse {
map<string, string> accounts = 3;
}
// MsgAuthorize is the message type for the Authorize RPC.
message MsgAuthorize {
option (cosmos.msg.v1.signer) = "authority";
// authority is the address of the governance account.
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// MsgAuthorizeService is the message type for the AuthorizeService RPC.
message MsgAuthorizeService {
option (cosmos.msg.v1.signer) = "controller";
// Controller is the address of the controller to authenticate.
string controller = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// Address is the address to authenticate.
string address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// Origin is the origin of the request in wildcard form.
string origin = 4;
string origin = 2;
// Permissions is the scope of the service.
Permissions scopes = 3;
// token is the macron token to authenticate the operation.
Token token = 5;
Token token = 4;
}
// MsgAuthorizeResponse is the response type for the Authorize RPC.
message MsgAuthorizeResponse {
// MsgAuthorizeServiceResponse is the response type for the AuthorizeService RPC.
message MsgAuthorizeServiceResponse {
bool success = 1;
Token token = 2;
}
@@ -187,23 +184,11 @@ message MsgRegisterService {
// 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.
string origin_uri = 2;
// Permissions is the scope of the service.
Permissions scopes = 3;
// Description is the description of the service
string description = 4;
// service_endpoints is the endpoints of the service
map<string, string> service_endpoints = 5;
// Metadata is optional additional information about the service
Metadata metadata = 6;
// origin is the origin of the request in wildcard form. Requires valid TXT record in DNS.
Service service = 2;
// token is the macron token to authenticate the operation.
Token token = 7;
Token token = 3;
}
// MsgRegisterServiceResponse is the response type for the RegisterService RPC.