sonr/proto/dwn/v1/query.proto
Prad Nukala 44027b9303
feature/1149 vault allocation error (#1173)
- **refactor: update devbox configuration and scripts**
- **refactor: remove web documentation**
- **refactor: move resolver formatter to services package**
- **refactor: Rename x/vault -> x/dwn and x/service -> x/svc**
- **refactor: remove unused dependencies and simplify module imports**
- **refactor: remove dependency on DWN.pkl**
- **refactor: Move IPFS interaction functions to common package**
- **refactor: remove unused TUI components**
- **feat: add gum package and update devbox configuration**
- **refactor: rename Assertion to Account and update related code**
- **fix: resolve rendering issue in login modal**
- **refactor: migrate build system from Taskfile to Makefile**
- **refactor: Deployment setup**
- **refactor: Update Credential table to match WebAuthn Credential
Descriptor**
- **feat: add fast reflection methods for Capability and Resource**
- **fix: update devbox lockfile**
- **feat: add support for parent field and resources list in Capability
message**
- **feature/1149-vault-allocation-error**
- **fix: adjust fullscreen modal close button margin**
2024-11-26 22:05:50 -05:00

91 lines
3.2 KiB
Protocol Buffer

syntax = "proto3";
package dwn.v1;
import "google/api/annotations.proto";
import "dwn/v1/genesis.proto";
option go_package = "github.com/onsonr/sonr/x/dwn/types";
// ╭─────────────────────────────────────────────────────────╮
// │ RPC Query Service │
// ╰─────────────────────────────────────────────────────────╯
// 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(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";
}
}
// ╭──────────────────────────────────────────────────────────╮
// │ RPC Query Messages │
// ╰──────────────────────────────────────────────────────────╯
// 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;
}
// QueryAllocateRequest is the request type for the Allocate RPC method.
message QueryAllocateRequest {}
// AllocateResponse is the response type for the Allocate RPC method.
message QueryAllocateResponse {
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 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;
}