We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e69c5e8 commit 616d991Copy full SHA for 616d991
README.md
@@ -39,6 +39,8 @@ import (
39
"google.golang.org/grpc/credentials/insecure"
40
)
41
42
+const SIGNER_API_KEY = "<API-KEY>"
43
+
44
func main() {
45
conn, err := grpc.NewClient(
46
"localhost:50051",
@@ -55,10 +57,13 @@ func main() {
55
57
defer cancel()
56
58
59
req := &v1.SignGenericRequest{
- PublicKey: "0xabcd",
- Password: "p@$$w0rd",
60
- Data: []byte{0x01, 0x02, 0x03},
+ PublicKeyG1: "0xabcd",
61
+ Password: "p@$$w0rd",
62
+ Data: []byte{0x01, 0x02, 0x03},
63
}
64
65
+ // Pass the API key to the signer client
66
+ ctx = metadata.AppendToOutgoingContext(ctx, "authorization", SIGNER_API_KEY)
67
resp, err := c.SignGeneric(ctx, req)
68
if err != nil {
69
log.Fatalf("could not sign: %v", err)
0 commit comments