mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
feature/implement wss routes (#1196)
* feat(database): create schema for hway and motr * fix(gateway): correct naming inconsistencies in handlers * build: update schema file to be compatible with postgresql syntax * fix: update schema to be compatible with PostgreSQL syntax * chore: update query_hway.sql to follow sqlc syntax * ```text refactor: update query_hway.sql for PostgreSQL and sqlc ``` * feat: add vaults table to store encrypted data * refactor: Update vaults table schema for sqlc compatibility * chore(deps): Upgrade dependencies and add pgx/v5 * refactor(Makefile): move sqlc generate to internal/models * docs(foundations): remove outdated pages * chore(build): add Taskfile for build tasks * refactor(embed): move embed files to internal package * docs: add documentation for Cosmos SDK ORM
This commit is contained in:
@@ -18,16 +18,15 @@ message Params {
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
// Whitelisted Key Types
|
||||
map<string, KeyInfo> allowed_public_keys = 1;
|
||||
// Attenuation defines the available attenuations
|
||||
repeated Attenuation attenuations = 1;
|
||||
repeated string allowed_operators = 2;
|
||||
}
|
||||
|
||||
// ConveyancePreference defines the conveyance preference
|
||||
string conveyance_preference = 2;
|
||||
|
||||
// AttestationFormats defines the attestation formats
|
||||
repeated string attestation_formats = 3;
|
||||
Schema schema = 4;
|
||||
repeated string allowed_operators = 5;
|
||||
// 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
|
||||
@@ -38,32 +37,9 @@ message Capability {
|
||||
repeated string resources = 4;
|
||||
}
|
||||
|
||||
// KeyInfo defines information for accepted PubKey types
|
||||
message KeyInfo {
|
||||
string role = 1;
|
||||
string algorithm = 2; // e.g., "ES256", "EdDSA", "ES256K"
|
||||
string encoding = 3; // e.g., "hex", "base64", "multibase"
|
||||
string curve = 4; // e.g., "P256", "P384", "P521", "X25519", "X448",
|
||||
// "Ed25519", "Ed448", "secp256k1"
|
||||
}
|
||||
|
||||
// Resource reprensents the available resources of a decentralized web node
|
||||
message Resource {
|
||||
string kind = 1;
|
||||
string template = 2;
|
||||
}
|
||||
|
||||
// Schema is the Database Model for Decentralized Web Nodes
|
||||
message Schema {
|
||||
int32 version = 1;
|
||||
string account = 2;
|
||||
string asset = 3;
|
||||
string chain = 4;
|
||||
string credential = 5;
|
||||
string did = 6;
|
||||
string jwk = 7;
|
||||
string grant = 8;
|
||||
string keyshare = 9;
|
||||
string profile = 10;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,23 +17,12 @@ service Query {
|
||||
option (google.api.http).get = "/vault/v1/params";
|
||||
}
|
||||
|
||||
// Schema queries the DID document by its id. And returns the required PKL
|
||||
// information
|
||||
rpc Schema(QuerySchemaRequest) returns (QuerySchemaResponse) {
|
||||
option (google.api.http).get = "/vault/v1/schema";
|
||||
}
|
||||
|
||||
// Allocate initializes a Target Vault available for claims with a compatible
|
||||
// Authentication mechanism. The default authentication mechanism is WebAuthn.
|
||||
rpc Allocate(QueryAllocateRequest) returns (QueryAllocateResponse) {
|
||||
option (google.api.http).get = "/vault/v1/allocate";
|
||||
}
|
||||
|
||||
// Sync queries the DID document by its id. And returns the required PKL
|
||||
// information
|
||||
rpc Sync(QuerySyncRequest) returns (QuerySyncResponse) {
|
||||
option (google.api.http).get = "/vault/v1/sync";
|
||||
}
|
||||
}
|
||||
|
||||
// ╭──────────────────────────────────────────────────────────╮
|
||||
@@ -49,15 +38,6 @@ message QueryParamsResponse {
|
||||
Params params = 1;
|
||||
}
|
||||
|
||||
// QuerySchemaRequest is the request type for the Query/Schema RPC method.
|
||||
message QuerySchemaRequest {}
|
||||
|
||||
// QuerySchemaResponse is the response type for the Query/Schema RPC method.
|
||||
message QuerySchemaResponse {
|
||||
// Schema is the DID document.
|
||||
Schema schema = 1;
|
||||
}
|
||||
|
||||
// QueryAllocateRequest is the request type for the Allocate RPC method.
|
||||
message QueryAllocateRequest {}
|
||||
|
||||
@@ -70,21 +50,3 @@ message QueryAllocateResponse {
|
||||
int64 expiry_block = 5;
|
||||
}
|
||||
|
||||
// SyncRequest is the request type for the Sync RPC method.
|
||||
message QuerySyncRequest {
|
||||
string did = 1;
|
||||
}
|
||||
|
||||
// SyncResponse is the response type for the Sync RPC method.
|
||||
message QuerySyncResponse {
|
||||
bool success = 1;
|
||||
|
||||
// Schema is the DID document.
|
||||
Schema schema = 2;
|
||||
|
||||
// Address is the address of the calling DID.
|
||||
string address = 3;
|
||||
|
||||
// ChainID is the chain ID of the current network.
|
||||
string chainID = 4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user