mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 18:31:41 +00:00
feature/ipfs vault allocation (#8)
* refactor: move constants to genesis.proto * feat: add ipfs_active flag to genesis state * feat: add IPFS connection initialization to keeper * feat: add testnet process-compose * refactor: rename sonr-testnet docker image to sonr-runner * refactor: update docker-vm-release workflow to use 'latest' tag * feat: add permission to workflows * feat: add new service chain execution * feat: add abstract vault class to pkl * feat: use jetpackio/devbox image for runner * feat: introduce dwn for local service worker * refactor: remove unnecessary dockerfile layers * refactor(deploy): Update Dockerfile to copy go.mod and go.sum from the parent directory * build: move Dockerfile to root directory * build: Add Dockerfile for deployment * feat: Update Dockerfile to work with Go project in parent directory * build: Update docker-compose.yaml to use relative paths * feat: Update docker-compose to work with new image and parent git directory * refactor: remove unnecessary test script * <no value> * feat: add test_node script for running node tests * feat: add IPFS cluster to testnet * feat: add docker image for sonr-runner * fix: typo in export path * feat(did): Add Localhost Registration Enabled Genesis Option * feat: add support for Sqlite DB in vault * feat: improve vault model JSON serialization * feat: support querying HTMX endpoint for DID * feat: Add primary key, unique, default, not null, auto increment, and foreign key field types * feat: Add PublicKey model in pkl/vault.pkl * feat: add frontend server * refactor: move dwn.wasm to vfs directory * feat(frontend): remove frontend server implementation * feat: Add a frontend server and web auth protocol * feat: implement new key types for MPC and ZK proofs * fix: Update enum types and DefaultKeyInfos * fix: correct typo in KeyAlgorithm enum * feat(did): add attestation format validation * feat: Add x/did/builder/extractor.go * feat: Update JWK parsing in x/did/builder/extractor.go * feat: Use github.com/onsonr/sonr/x/did/types package * feat: Extract and format public keys from WebAuthn credentials * feat: Introduce a new `mapToJWK` function to convert a map to a `types.JWK` struct * feat: add support for extracting JWK public keys * feat: remove VerificationMethod struct * refactor: extract public key extraction logic * feat: add helper functions to map COSECurveID to JWK curve names * feat: pin initial vault
This commit is contained in:
+115
-1
@@ -2,7 +2,6 @@ syntax = "proto3";
|
||||
package did.v1;
|
||||
|
||||
import "amino/amino.proto";
|
||||
import "did/v1/constants.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
option go_package = "github.com/onsonr/sonr/x/did/types";
|
||||
@@ -30,6 +29,18 @@ message Params {
|
||||
|
||||
// OpenIDConfig defines the base openid configuration across all did services
|
||||
OpenIDConfig openid_config = 4;
|
||||
|
||||
// IpfsActive is a flag to enable/disable ipfs
|
||||
bool ipfs_active = 5;
|
||||
|
||||
// Localhost Registration Enabled
|
||||
bool localhost_registration_enabled = 6;
|
||||
|
||||
// ConveyancePreference defines the conveyance preference
|
||||
string conveyance_preference = 7;
|
||||
|
||||
// AttestationFormats defines the attestation formats
|
||||
repeated string attestation_formats = 8;
|
||||
}
|
||||
|
||||
// AssetInfo defines the asset info
|
||||
@@ -124,3 +135,106 @@ message ValidatorInfo {
|
||||
string port = 2;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// [Constant Enumerations]
|
||||
//
|
||||
|
||||
// AssetType defines the type of asset: native, wrapped, staking, pool, or unspecified
|
||||
enum AssetType {
|
||||
ASSET_TYPE_UNSPECIFIED = 0;
|
||||
ASSET_TYPE_NATIVE = 1;
|
||||
ASSET_TYPE_WRAPPED = 2;
|
||||
ASSET_TYPE_STAKING = 3;
|
||||
ASSET_TYPE_POOL = 4;
|
||||
ASSET_TYPE_IBC = 5;
|
||||
ASSET_TYPE_CW20 = 6;
|
||||
}
|
||||
|
||||
// DIDNamespace define the different namespaces of DID
|
||||
enum DIDNamespace {
|
||||
DID_NAMESPACE_UNSPECIFIED = 0;
|
||||
DID_NAMESPACE_IPFS = 1;
|
||||
DID_NAMESPACE_SONR = 2;
|
||||
DID_NAMESPACE_BITCOIN = 3;
|
||||
DID_NAMESPACE_ETHEREUM = 4;
|
||||
DID_NAMESPACE_IBC = 5;
|
||||
DID_NAMESPACE_WEBAUTHN = 6;
|
||||
DID_NAMESPACE_DWN = 7;
|
||||
DID_NAMESPACE_SERVICE = 8;
|
||||
}
|
||||
|
||||
// KeyAlgorithm defines the key algorithm
|
||||
enum KeyAlgorithm {
|
||||
KEY_ALGORITHM_UNSPECIFIED = 0;
|
||||
KEY_ALGORITHM_ES256 = 1;
|
||||
KEY_ALGORITHM_ES384 = 2;
|
||||
KEY_ALGORITHM_ES512 = 3;
|
||||
KEY_ALGORITHM_EDDSA = 4;
|
||||
KEY_ALGORITHM_ES256K = 5;
|
||||
KEY_ALGORITHM_ECDSA = 6; // Fixed typo from EDCSA to ECDSA
|
||||
}
|
||||
|
||||
// KeyCurve defines the key curve
|
||||
enum KeyCurve {
|
||||
KEY_CURVE_UNSPECIFIED = 0;
|
||||
KEY_CURVE_P256 = 1; // NIST P-256
|
||||
KEY_CURVE_P384 = 2;
|
||||
KEY_CURVE_P521 = 3;
|
||||
KEY_CURVE_X25519 = 4;
|
||||
KEY_CURVE_X448 = 5;
|
||||
KEY_CURVE_ED25519 = 6;
|
||||
KEY_CURVE_ED448 = 7;
|
||||
KEY_CURVE_SECP256K1 = 8;
|
||||
KEY_CURVE_BLS12381 = 9;
|
||||
KEY_CURVE_KECCAK256 = 10;
|
||||
}
|
||||
|
||||
// KeyEncoding defines the key encoding
|
||||
enum KeyEncoding {
|
||||
KEY_ENCODING_UNSPECIFIED = 0;
|
||||
KEY_ENCODING_RAW = 1;
|
||||
KEY_ENCODING_HEX = 2;
|
||||
KEY_ENCODING_MULTIBASE = 3;
|
||||
}
|
||||
|
||||
// KeyRole defines the kind of key
|
||||
enum KeyRole {
|
||||
KEY_ROLE_UNSPECIFIED = 0;
|
||||
KEY_ROLE_AUTHENTICATION = 1; // Passkeys and FIDO
|
||||
KEY_ROLE_ASSERTION = 2; // Zk Identifiers
|
||||
KEY_ROLE_DELEGATION = 3; // ETH,BTC,IBC addresses
|
||||
KEY_ROLE_INVOCATION = 4; // DWN Controllers
|
||||
}
|
||||
|
||||
// KeyType defines the key type
|
||||
enum KeyType {
|
||||
KEY_TYPE_UNSPECIFIED = 0;
|
||||
KEY_TYPE_OCTET = 1;
|
||||
KEY_TYPE_ELLIPTIC = 2;
|
||||
KEY_TYPE_RSA = 3;
|
||||
KEY_TYPE_SYMMETRIC = 4;
|
||||
KEY_TYPE_HMAC = 5;
|
||||
KEY_TYPE_MPC = 6;
|
||||
KEY_TYPE_ZK = 7;
|
||||
KEY_TYPE_WEBAUTHN = 8;
|
||||
KEY_TYPE_BIP32 = 9;
|
||||
}
|
||||
|
||||
// PermissionScope define the Capabilities Controllers can grant for Services
|
||||
enum PermissionScope {
|
||||
PERMISSION_SCOPE_UNSPECIFIED = 0;
|
||||
PERMISSION_SCOPE_BASIC_INFO = 1;
|
||||
PERMISSION_SCOPE_PERMISSIONS_READ = 2;
|
||||
PERMISSION_SCOPE_PERMISSIONS_WRITE = 3;
|
||||
PERMISSION_SCOPE_TRANSACTIONS_READ = 4;
|
||||
PERMISSION_SCOPE_TRANSACTIONS_WRITE = 5;
|
||||
PERMISSION_SCOPE_WALLETS_READ = 6;
|
||||
PERMISSION_SCOPE_WALLETS_CREATE = 7;
|
||||
PERMISSION_SCOPE_WALLETS_SUBSCRIBE = 8;
|
||||
PERMISSION_SCOPE_WALLETS_UPDATE = 9;
|
||||
PERMISSION_SCOPE_TRANSACTIONS_VERIFY = 10;
|
||||
PERMISSION_SCOPE_TRANSACTIONS_BROADCAST = 11;
|
||||
PERMISSION_SCOPE_ADMIN_USER = 12;
|
||||
PERMISSION_SCOPE_ADMIN_VALIDATOR = 13;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user