mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-05 10:51:41 +00:00
31 lines
684 B
Protocol Buffer
31 lines
684 B
Protocol Buffer
syntax = "proto3";
|
|||
|
|
|
||
|
|
package common.v1;
|
||
|
|
|
||
|
|
option go_package = "github.com/onsonr/sonr/pkg/common/types;commonv1";
|
||
|
|
|
||
|
|
// PubKey defines a public key for a did
|
||
|
|
message PubKey {
|
||
|
|
string role = 1;
|
||
|
|
string key_type = 2;
|
||
|
|
RawKey raw_key = 3;
|
||
|
|
JSONWebKey jwk = 4;
|
||
|
|
}
|
||
|
|
|
||
|
|
// JWK represents a JSON Web Key
|
||
|
|
message JSONWebKey {
|
||
|
|
string kty = 1; // Key Type
|
||
|
|
string crv = 2; // Curve (for EC and OKP keys)
|
||
|
|
string x = 3; // X coordinate (for EC and OKP keys)
|
||
|
|
string y = 4; // Y coordinate (for EC keys)
|
||
|
|
string n = 5; // Modulus (for RSA keys)
|
||
|
|
string e = 6; // Exponent (for RSA keys)
|
||
|
|
}
|
||
|
|
|
||
|
|
message RawKey {
|
||
|
|
string algorithm = 1;
|
||
|
|
string encoding = 2;
|
||
|
|
string curve = 3;
|
||
|
|
bytes key = 4;
|
||
|
|
}
|