mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
feat: Expand KeyType enum and update KeyInfo message in genesis.proto
This commit is contained in:
parent
c0e616a78a
commit
0696ef8b94
@ -81,11 +81,41 @@ message ChainInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
import "did/v1/grants.proto";
|
||||||
|
|
||||||
// KeyInfo defines information for accepted PubKey types
|
// KeyInfo defines information for accepted PubKey types
|
||||||
message KeyInfo {
|
message KeyInfo {
|
||||||
string key_type = 1; // e.g., "secp256k1", "ed25519", "webauthn"
|
KeyType key_type = 1;
|
||||||
string algorithm = 2; // e.g., "ES256", "EdDSA", "ES256K"
|
string algorithm = 2; // e.g., "ES256", "EdDSA", "ES256K"
|
||||||
string curve = 3; // e.g., "P-256", "Ed25519", "secp256k1"
|
string curve = 3; // e.g., "P-256", "Ed25519", "secp256k1"
|
||||||
bool is_cbor = 4; // true for WebAuthn CBOR-encoded keys, false for others
|
bool is_cbor = 4; // true for WebAuthn CBOR-encoded keys, false for others
|
||||||
string encoding = 5; // e.g., "hex", "base64", "multibase"
|
string encoding = 5; // e.g., "hex", "base64", "multibase"
|
||||||
|
|
||||||
|
// Additional fields for specific key types
|
||||||
|
oneof key_specific_info {
|
||||||
|
WebauthnInfo webauthn_info = 6;
|
||||||
|
FidoInfo fido_info = 7;
|
||||||
|
MPCInfo mpc_info = 8;
|
||||||
|
ZKInfo zk_info = 9;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
message WebauthnInfo {
|
||||||
|
string attestation_type = 1;
|
||||||
|
string aaguid = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message FidoInfo {
|
||||||
|
string authenticator_attachment = 1;
|
||||||
|
repeated string supported_algorithms = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message MPCInfo {
|
||||||
|
int32 threshold = 1;
|
||||||
|
int32 total_parties = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ZKInfo {
|
||||||
|
string proof_system = 1;
|
||||||
|
string setup_parameters = 2;
|
||||||
}
|
}
|
||||||
|
@ -17,12 +17,20 @@ enum DIDNamespace {
|
|||||||
|
|
||||||
enum KeyType {
|
enum KeyType {
|
||||||
KEY_TYPE_UNSPECIFIED = 0;
|
KEY_TYPE_UNSPECIFIED = 0;
|
||||||
|
// Blockchain key types
|
||||||
KEY_TYPE_SECP256K1 = 1;
|
KEY_TYPE_SECP256K1 = 1;
|
||||||
KEY_TYPE_ED25519 = 2;
|
KEY_TYPE_ED25519 = 2;
|
||||||
KEY_TYPE_P256 = 3;
|
KEY_TYPE_P256 = 3;
|
||||||
KEY_TYPE_BLS12381 = 4;
|
KEY_TYPE_BLS12381 = 4;
|
||||||
KEY_TYPE_X25519 = 5;
|
KEY_TYPE_X25519 = 5;
|
||||||
KEY_TYPE_SCHNORR = 6;
|
KEY_TYPE_SCHNORR = 6;
|
||||||
|
// Webauthn and FIDO key types
|
||||||
|
KEY_TYPE_WEBAUTHN = 7;
|
||||||
|
KEY_TYPE_FIDO = 8;
|
||||||
|
// MPC key type
|
||||||
|
KEY_TYPE_MPC = 9;
|
||||||
|
// ZK key type
|
||||||
|
KEY_TYPE_ZK = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PermissionScope define the Capabilities Controllers can grant for Services
|
// PermissionScope define the Capabilities Controllers can grant for Services
|
||||||
|
Loading…
x
Reference in New Issue
Block a user