Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add endpoint to get g1 and g2 pubkeys #8

Merged
merged 6 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
## cerberus-api
# cerberus-api
This is the API spec of remote signer.
The spec currently only support BLS on bn254 signing.

## Disclaimer
🚧 Cerberus-api is under active development and has not been audited.
Cerberus-api is rapidly being upgraded, features may be added, removed or otherwise improved or modified and interfaces will have breaking changes.
Cerberus-api should be used only for testing purposes and not in production. Cerberus-api is provided "as is" and Eigen Labs, Inc. does not guarantee its functionality or provide support for its use in production. 🚧

## Supported Bindings
### Go
The go bindings resides in [pkg/api/vi](pkg/api/v1) directory.
Expand Down
392 changes: 332 additions & 60 deletions pkg/api/v1/key_manager.pb.go

Large diffs are not rendered by default.

77 changes: 77 additions & 0 deletions pkg/api/v1/key_manager.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions pkg/api/v1/key_manager_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 23 additions & 23 deletions pkg/api/v1/signer.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 35 additions & 7 deletions proto/key_manager.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ service KeyManager {
rpc GenerateKeyPair(GenerateKeyPairRequest) returns (GenerateKeyPairResponse) {}
rpc ImportKey(ImportKeyRequest) returns (ImportKeyResponse) {}
rpc ListKeys(ListKeysRequest) returns (ListKeysResponse) {}
rpc GetKeyMetadata(GetKeyMetadataRequest) returns (GetKeyMetadataResponse) {}
}

message GenerateKeyPairRequest {
Expand All @@ -18,14 +19,17 @@ message GenerateKeyPairRequest {
}

message GenerateKeyPairResponse {
// Public key hex of the generated keypair
string public_key = 1;
// G1 Public key hex of the generated keypair
string public_key_g1 = 1;

// Private key hex of the generated keypair
string private_key = 2;

// Mnemonic of the generated keypair
string mnemonic = 3;

// G2 Public key hex of the generated keypair
string public_key_g2 = 4;
}

message ImportKeyRequest {
Expand All @@ -37,17 +41,41 @@ message ImportKeyRequest {

// Password to encrypt the private key
string password = 3;

}

message ImportKeyResponse {
// Public key hex of the imported keypair
string public_key = 1;
// G1 Public key hex of the imported keypair
string public_key_g1 = 1;
// G2 Public key hex of the imported keypair
string public_key_g2 = 2;
}

message PublicKey {
// G1 Public key
string public_key_g1 = 1;
// G2 Public key
string public_key_g2 = 2;
}

message ListKeysRequest {}

message ListKeysResponse {
// List of public keys
repeated string public_keys = 1;
}
repeated PublicKey public_keys = 1;
}

message GetKeyMetadataRequest {
// Public key to get
string public_key_g1 = 1;
}

message GetKeyMetadataResponse {
// Public key G1
string public_key_g1 = 1;
// Public key G2
string public_key_g2 = 2;
// Unix timestamp of when the key was created
int64 created_at = 3;
// Unix timestamp of when the key was last updated
int64 updated_at = 4;
}
4 changes: 2 additions & 2 deletions proto/signer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ service Signer {
}

message SignGenericRequest {
// Public key of the keypair to sign with
string public_key = 1;
// G1 public key of the keypair to sign with
string public_key_g1 = 1;

// Data to sign
bytes data = 2;
Expand Down
Loading
Loading