Crates.io | cerberus-api |
lib.rs | cerberus-api |
version | 0.0.1 |
source | src |
created_at | 2024-11-13 15:45:30.982503 |
updated_at | 2024-11-13 15:45:30.982503 |
description | API specification for cerberus remote signer |
homepage | https://github.com/Layr-Labs/cerberus-api |
repository | https://github.com/Layr-Labs/cerberus-api |
max_upload_size | |
id | 1446676 |
size | 84,108 |
This is the API spec of remote signer. The spec currently only support BLS on bn254 signing.
The go bindings resides in pkg/api/vi directory.
The rust bindings resides in src directory.
If you are implementing a version of this, please make sure to check this code
for implementation of sign and verify. If you use any other implementation, the signatures will not be compatible with EigenLayer contracts.
Eventually we will support more HashToCurve
algorithms.
package main
import (
"context"
"fmt"
"log"
"time"
"github.com/Layr-Labs/cerberus-api/pkg/api/v1"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)
func main() {
conn, err := grpc.NewClient(
"localhost:50051",
grpc.WithTransportCredentials(insecure.NewCredentials()),
)
if err != nil {
log.Fatalf("did not connect: %v", err)
}
defer conn.Close()
c := v1.NewSignerClient(conn)
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
req := &v1.SignGenericRequest{
PublicKey: "0xabcd",
Password: "p@$$w0rd",
Data: []byte{0x01, 0x02, 0x03},
}
resp, err := c.SignGeneric(ctx, req)
if err != nil {
log.Fatalf("could not sign: %v", err)
}
fmt.Printf("Signature: %v\n", resp.Signature)
}
Please report security vulnerabilities to security@eigenlabs.org. Do NOT report security bugs via Github Issues.