Skip to content

Commit 616d991

Browse files
docs: update readme (#10)
* docs: update readme * fix indentation
1 parent e69c5e8 commit 616d991

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ import (
3939
"google.golang.org/grpc/credentials/insecure"
4040
)
4141

42+
const SIGNER_API_KEY = "<API-KEY>"
43+
4244
func main() {
4345
conn, err := grpc.NewClient(
4446
"localhost:50051",
@@ -55,10 +57,13 @@ func main() {
5557
defer cancel()
5658

5759
req := &v1.SignGenericRequest{
58-
PublicKey: "0xabcd",
59-
Password: "p@$$w0rd",
60-
Data: []byte{0x01, 0x02, 0x03},
60+
PublicKeyG1: "0xabcd",
61+
Password: "p@$$w0rd",
62+
Data: []byte{0x01, 0x02, 0x03},
6163
}
64+
65+
// Pass the API key to the signer client
66+
ctx = metadata.AppendToOutgoingContext(ctx, "authorization", SIGNER_API_KEY)
6267
resp, err := c.SignGeneric(ctx, req)
6368
if err != nil {
6469
log.Fatalf("could not sign: %v", err)

0 commit comments

Comments
 (0)