mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
feature/did accounts (#23)
* feat: add support for DID number as primary key for Controllers * refactor: rename pkg/proxy to app/proxy * feat: add vault module keeper tests * feat(vault): add DID keeper to vault module * refactor: move vault client code to its own package * refactor(vault): extract schema definition * refactor: use vaulttypes for MsgAllocateVault * refactor: update vault assembly logic to use new methods * feat: add dwn-proxy command * refactor: remove unused context.go file * refactor: remove unused web-related code * feat: add DWN proxy server * feat: add BuildTx RPC to vault module * fix: Implement BuildTx endpoint * feat: add devbox integration to project
This commit is contained in:
+18
-41
@@ -12,55 +12,27 @@ option go_package = "github.com/onsonr/sonr/x/did/types";
|
||||
// Msg defines the Msg service.
|
||||
service Msg {
|
||||
option (cosmos.msg.v1.service) = true;
|
||||
// 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);
|
||||
|
||||
// AuthorizeService asserts the given controller is the owner of the given address.
|
||||
// AuthorizeService asserts the given controller is the owner of the given
|
||||
// address.
|
||||
rpc AuthorizeService(MsgAuthorizeService) returns (MsgAuthorizeServiceResponse);
|
||||
|
||||
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages Macaroon for verification.
|
||||
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages
|
||||
// Macaroon for verification.
|
||||
rpc ExecuteTx(MsgExecuteTx) returns (MsgExecuteTxResponse);
|
||||
|
||||
// RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias.
|
||||
// RegisterController initializes a controller with the given authentication
|
||||
// set, address, cid, publicKey, and user-defined alias.
|
||||
rpc RegisterController(MsgRegisterController) returns (MsgRegisterControllerResponse);
|
||||
|
||||
// RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key.
|
||||
// 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);
|
||||
|
||||
// UpdateParams defines a governance operation for updating the parameters.
|
||||
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
|
||||
}
|
||||
|
||||
// MsgAllocateVault is the message type for the AllocateVault RPC.
|
||||
message MsgAllocateVault {
|
||||
option (cosmos.msg.v1.signer) = "authority";
|
||||
|
||||
// authority is the address of the service account.
|
||||
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
|
||||
// subject is a unique human-defined identifier to associate with the vault.
|
||||
string subject = 2;
|
||||
|
||||
// origin is the origin of the request in wildcard form.
|
||||
string origin = 3;
|
||||
}
|
||||
|
||||
// MsgAllocateVaultResponse is the response type for the AllocateVault RPC.
|
||||
message MsgAllocateVaultResponse {
|
||||
// CID is the content identifier of the vault.
|
||||
string cid = 1;
|
||||
|
||||
// ExpiryBlock is the block number at which the vault will expire.
|
||||
int64 expiry_block = 2;
|
||||
|
||||
// RegistrationOptions is a json string of the PublicKeyCredentialCreationOptions for WebAuthn
|
||||
string token = 3;
|
||||
|
||||
// IsLocalhost is a flag to indicate if the vault is localhost
|
||||
bool localhost = 4;
|
||||
}
|
||||
|
||||
// MsgRegisterController is the message type for the InitializeController RPC.
|
||||
message MsgRegisterController {
|
||||
option (cosmos.msg.v1.signer) = "authority";
|
||||
@@ -74,13 +46,16 @@ message MsgRegisterController {
|
||||
// Keyshares is the list of keyshares to initialize the controller with.
|
||||
repeated bytes keyshares = 3;
|
||||
|
||||
// Verifications is the list of verifications to initialize the controller with.
|
||||
// Verifications is the list of verifications to initialize the controller
|
||||
// with.
|
||||
repeated bytes verifications = 4;
|
||||
}
|
||||
|
||||
// MsgRegisterControllerResponse is the response type for the InitializeController RPC.
|
||||
// MsgRegisterControllerResponse is the response type for the
|
||||
// InitializeController RPC.
|
||||
message MsgRegisterControllerResponse {
|
||||
// Success returns true if the specified cid is valid and not already encrypted.
|
||||
// Success returns true if the specified cid is valid and not already
|
||||
// encrypted.
|
||||
bool success = 1;
|
||||
|
||||
// Controller is the address of the initialized controller.
|
||||
@@ -127,7 +102,8 @@ message MsgAuthorizeService {
|
||||
string token = 4;
|
||||
}
|
||||
|
||||
// MsgAuthorizeServiceResponse is the response type for the AuthorizeService RPC.
|
||||
// MsgAuthorizeServiceResponse is the response type for the AuthorizeService
|
||||
// RPC.
|
||||
message MsgAuthorizeServiceResponse {
|
||||
bool success = 1;
|
||||
string token = 2;
|
||||
@@ -140,7 +116,8 @@ 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. Requires valid TXT record in DNS.
|
||||
// origin is the origin of the request in wildcard form. Requires valid TXT
|
||||
// record in DNS.
|
||||
Service service = 2;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user