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**
This commit is contained in:
Prad Nukala
2024-11-26 22:05:50 -05:00
committed by GitHub
parent 1568844255
commit 44027b9303
186 changed files with 15032 additions and 11528 deletions
+5 -5
View File
@@ -10,10 +10,10 @@ This directory contains the protobuf definitions for the Sonr blockchain.
The `did` directory contains the protobuf definitions for the DID module.
### `service`
### `dwn`
The `dwn` directory contains the protobuf definitions for the Vault module.
### `svc`
The `service` directory contains the protobuf definitions for the Service module.
### `vault`
The `vault` directory contains the protobuf definitions for the Vault module.
+4 -60
View File
@@ -7,7 +7,7 @@ import "did/v1/genesis.proto";
option go_package = "github.com/onsonr/sonr/x/did/types";
message Assertion {
message Account {
option (cosmos.orm.v1.table) = {
id: 1
primary_key: {fields: "did"}
@@ -40,66 +40,10 @@ message Assertion {
int64 creation_block = 7;
}
message Authentication {
// PublicKey represents a public key
message PublicKey {
option (cosmos.orm.v1.table) = {
id: 2
primary_key: {fields: "did"}
index: {
id: 1
fields: "controller,subject"
unique: true
}
};
// The unique identifier of the authentication
string did = 1;
// The authentication of the DID
string controller = 2;
// Origin of the authentication
string subject = 3;
// string is the verification method
string public_key_hex = 4;
// CredentialID is the byte representation of the credential ID
bytes credential_id = 5;
// Metadata of the authentication
map<string, string> metadata = 6;
// CreationBlock is the block number of the creation of the authentication
int64 creation_block = 7;
}
// Macaroon is a Macaroon message type.
message Biscuit {
option (cosmos.orm.v1.table) = {
id: 5
primary_key: {
fields: "id"
auto_increment: true
}
index: {
id: 1
fields: "subject,origin"
unique: true
}
};
uint64 id = 1;
string controller = 2;
string subject = 3;
string origin = 4;
int64 expiry_height = 5;
string macaroon = 6;
}
// Controller represents a Sonr DWN Vault
message Controller {
option (cosmos.orm.v1.table) = {
id: 3
primary_key: {
fields: "number"
auto_increment: true
@@ -157,7 +101,7 @@ message Controller {
// Verification represents a verification method
message Verification {
option (cosmos.orm.v1.table) = {
id: 6
id: 3
primary_key: {fields: "did"}
index: {
id: 1
@@ -1,11 +1,13 @@
syntax = "proto3";
package service.module.v1;
package dwn.module.v1;
import "cosmos/app/v1alpha1/module.proto";
// Module is the app config object of the module.
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
message Module {
option (cosmos.app.v1alpha1.module) = {go_import: "github.com/onsonr/sonr"};
}
option (cosmos.app.v1alpha1.module) = {
go_import : "github.com/onsonr/sonr"
};
}
@@ -1,15 +1,15 @@
syntax = "proto3";
package vault.v1;
package dwn.v1;
import "amino/amino.proto";
import "gogoproto/gogo.proto";
import "amino/amino.proto";
option go_package = "github.com/onsonr/sonr/x/vault/types";
option go_package = "github.com/onsonr/sonr/x/dwn/types";
// GenesisState defines the module genesis state
message GenesisState {
// Params defines all the parameters of the module.
Params params = 1 [ (gogoproto.nullable) = false ];
Params params = 1 [(gogoproto.nullable) = false];
}
// Params defines the set of module parameters.
@@ -23,6 +23,21 @@ message Params {
Schema schema = 4;
}
// Capability reprensents the available capabilities of a decentralized web node
message Capability {
string name = 1;
string parent = 2;
string description = 3;
repeated string resources = 4;
}
// 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;
@@ -35,3 +50,4 @@ message Schema {
string keyshare = 9;
string profile = 10;
}
@@ -1,10 +1,10 @@
syntax = "proto3";
package vault.v1;
package dwn.v1;
import "google/api/annotations.proto";
import "vault/v1/genesis.proto";
import "dwn/v1/genesis.proto";
option go_package = "github.com/onsonr/sonr/x/vault/types";
option go_package = "github.com/onsonr/sonr/x/dwn/types";
//
// RPC Query Service
+33
View File
@@ -0,0 +1,33 @@
syntax = "proto3";
package dwn.v1;
import "cosmos/orm/v1/orm.proto";
option go_package = "github.com/onsonr/sonr/x/dwn/types";
// https://github.com/cosmos/cosmos-sdk/blob/main/orm/README.md
message Credential {
option (cosmos.orm.v1.table) = {
id: 1;
primary_key: { fields: "id" }
};
bytes id = 1; // The credential ID as a byte array
string kind = 2; // The credential type (e.g. "public-key")
repeated string transports = 3; // Optional transport hints (usb, nfc, ble, internal)
bytes public_key = 4; // The credential's public key
string attestation_type = 5; // The attestation type used (e.g. "none", "indirect", etc)
uint64 created_at = 6; // Timestamp of when the credential was created
}
message Profile {
option (cosmos.orm.v1.table) = {
id: 2;
primary_key: { fields: "account" }
index: { id: 1 fields: "amount" }
};
bytes account = 1;
uint64 amount = 2;
}
@@ -1,13 +1,12 @@
syntax = "proto3";
package vault.v1;
package dwn.v1;
import "cosmos/msg/v1/msg.proto";
import "cosmos_proto/cosmos.proto";
import "dwn/v1/genesis.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "vault/v1/genesis.proto";
import "cosmos_proto/cosmos.proto";
option go_package = "github.com/onsonr/sonr/x/vault/types";
option go_package = "github.com/onsonr/sonr/x/dwn/types";
// Msg defines the Msg service.
service Msg {
@@ -1,11 +1,13 @@
syntax = "proto3";
package vault.module.v1;
package svc.module.v1;
import "cosmos/app/v1alpha1/module.proto";
// Module is the app config object of the module.
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
message Module {
option (cosmos.app.v1alpha1.module) = {go_import: "github.com/onsonr/sonr"};
}
option (cosmos.app.v1alpha1.module) = {
go_import : "github.com/onsonr/sonr"
};
}
@@ -1,10 +1,10 @@
syntax = "proto3";
package service.v1;
package svc.v1;
import "amino/amino.proto";
import "gogoproto/gogo.proto";
import "amino/amino.proto";
option go_package = "github.com/onsonr/sonr/x/service/types";
option go_package = "github.com/onsonr/sonr/x/svc/types";
// GenesisState defines the module genesis state
message GenesisState {
@@ -1,16 +1,16 @@
syntax = "proto3";
package service.v1;
package svc.v1;
import "google/api/annotations.proto";
import "service/v1/genesis.proto";
import "svc/v1/genesis.proto";
option go_package = "github.com/onsonr/sonr/x/service/types";
option go_package = "github.com/onsonr/sonr/x/svc/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 = "/service/v1/params";
option (google.api.http).get = "/svc/v1/params";
}
}
@@ -1,13 +1,14 @@
syntax = "proto3";
package service.v1;
package svc.v1;
import "cosmos/orm/v1/orm.proto";
option go_package = "github.com/onsonr/sonr/x/service/types";
option go_package = "github.com/onsonr/sonr/x/svc/types";
// https://github.com/cosmos/cosmos-sdk/blob/main/orm/README.md
message Metadata {
message Domain {
option (cosmos.orm.v1.table) = {
id: 1
primary_key: {
@@ -30,8 +31,8 @@ message Metadata {
repeated string tags = 7;
}
// Profile represents a DID alias
message Profile {
// Metadata represents a DID alias
message Metadata {
option (cosmos.orm.v1.table) = {
id: 2
primary_key: {fields: "id"}
@@ -1,12 +1,12 @@
syntax = "proto3";
package service.v1;
package svc.v1;
import "cosmos/msg/v1/msg.proto";
import "cosmos_proto/cosmos.proto";
import "svc/v1/genesis.proto";
import "gogoproto/gogo.proto";
import "service/v1/genesis.proto";
import "cosmos_proto/cosmos.proto";
option go_package = "github.com/onsonr/sonr/x/service/types";
option go_package = "github.com/onsonr/sonr/x/svc/types";
// Msg defines the Msg service.
service Msg {
-21
View File
@@ -1,21 +0,0 @@
syntax = "proto3";
package vault.v1;
import "cosmos/orm/v1/orm.proto";
option go_package = "github.com/onsonr/sonr/x/vault/types";
// https://github.com/cosmos/cosmos-sdk/blob/main/orm/README.md
message DWN {
option (cosmos.orm.v1.table) = {
id : 1
primary_key : {fields : "id" auto_increment : true}
index : {id : 1 fields : "alias" unique : true}
index : {id : 2 fields : "cid" unique : true}
};
uint64 id = 1;
string alias = 2;
string cid = 3;
string resolver = 4;
}