mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 21:09:11 +00:00
- **feat: provide access to block time** - **refactor: move block expiry calculation to helper function** - **feat: register decentralized web node HTMX views** - **feat: Reorganize methods in layout.templ file alphabetically** - **feat: add support for layout variants** - **feat: update Allocate RPC to use GET request with path parameters** - **feat: add gRPC Gateway endpoint for Allocate** - **refactor: rename SyncCurrent to Sync** - **feat: improve code organization by making vault assembly private** - **feat: add a new method for syncing DID documents**
86 lines
2.4 KiB
Protocol Buffer
86 lines
2.4 KiB
Protocol Buffer
syntax = "proto3";
|
|
package vault.v1;
|
|
|
|
import "google/api/annotations.proto";
|
|
import "vault/v1/genesis.proto";
|
|
|
|
option go_package = "github.com/onsonr/sonr/x/vault/types";
|
|
|
|
// Query provides defines the gRPC querier service.
|
|
service Query {
|
|
// Params queries all parameters of the module.
|
|
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
|
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(AllocateRequest) returns (AllocateResponse) {
|
|
option (google.api.http).get = "/vault/v1/allocate/{origin}/{subject}";
|
|
}
|
|
|
|
// Sync queries the DID document by its id. And returns the required PKL
|
|
// information
|
|
rpc Sync(SyncRequest) returns (SyncResponse) {
|
|
option (google.api.http).post = "/vault/v1/sync-initial";
|
|
}
|
|
}
|
|
|
|
// QueryParamsRequest is the request type for the Query/Params RPC method.
|
|
message QueryParamsRequest {}
|
|
|
|
// QueryParamsResponse is the response type for the Query/Params RPC method.
|
|
message QueryParamsResponse {
|
|
// params defines the parameters of the module.
|
|
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;
|
|
}
|
|
|
|
// AllocateRequest is the request type for the Allocate RPC method.
|
|
message AllocateRequest {
|
|
string origin = 1;
|
|
string subject = 2;
|
|
}
|
|
|
|
// AllocateResponse is the response type for the Allocate RPC method.
|
|
message AllocateResponse {
|
|
bool success = 1;
|
|
string cid = 2;
|
|
string macaroon = 3;
|
|
string public_uri = 4;
|
|
int64 expiry_block = 5;
|
|
}
|
|
|
|
// SyncRequest is the request type for the Sync RPC method.
|
|
message SyncRequest {
|
|
string did = 1;
|
|
}
|
|
|
|
// SyncResponse is the response type for the Sync RPC method.
|
|
message SyncResponse {
|
|
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;
|
|
}
|