-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: extract KeyGenerationResult message from GenerateKeyResponse #7
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -47,6 +47,12 @@ message GenerateKeyRequest { | |||||||||||||||||||||||||||||||||
| * state. | ||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||
| message GenerateKeyResponse { | ||||||||||||||||||||||||||||||||||
| /** Generated public key and public key package. */ | ||||||||||||||||||||||||||||||||||
| KeyGenerationResult result = 1; | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+50
to
+51
|
||||||||||||||||||||||||||||||||||
| /** Generated public key and public key package. */ | |
| KeyGenerationResult result = 1; | |
| /** | |
| * Canonical public key bytes. | |
| * Deprecated: prefer result.public_key. Kept for wire compatibility with | |
| * older clients. | |
| */ | |
| bytes public_key = 1 [deprecated = true]; | |
| /** | |
| * Opaque protocol-internal serialization of the public key package. | |
| * Deprecated: prefer result.public_key_package. Kept for wire compatibility | |
| * with older clients. | |
| */ | |
| bytes public_key_package = 2 [deprecated = true]; | |
| /** Generated public key and public key package. */ | |
| KeyGenerationResult result = 3; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,11 +70,11 @@ class KeyGenerationProcessor extends WorkerHost { | |
| throw result.error; | ||
| } | ||
|
|
||
| const publicKey: string = Buffer.from(result.value.publicKey).toString( | ||
| "hex", | ||
| ); | ||
| const publicKey: string = Buffer.from( | ||
| result.value.result.publicKey, | ||
| ).toString("hex"); | ||
| const publicKeyPackage: string = Buffer.from( | ||
| result.value.publicKeyPackage, | ||
| result.value.result.publicKeyPackage, | ||
|
Comment on lines
+73
to
+77
|
||
| ).toString("base64"); | ||
|
|
||
| // Persist key metadata immediately so the signing processor can retrieve | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README still documents the engine's GenerateKey response as
{ publicKey, publicKeyPackage }in the key-generation Mermaid sequence diagram, but the proto/types in this PR now wrap those fields underresult. Please update the diagram (and any other references) to match the new response shape to avoid misleading API consumers.