Conversation
|
Caution Review failedThe pull request is closed. WalkthroughIntegrates hardware crypto APIs into eid-wallet pages. On onboarding/verify, checks for default keypair, generates if missing, and includes publicKey in provisioning requests. On sign, verifies key existence, builds a signed payload, generates a real signature via signPayload, and posts it to the redirect URI. Minor import/order adjustments. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant OnboardingPage
participant CryptoHW
participant Provisioner
User->>OnboardingPage: Open page (onMount)
OnboardingPage->>CryptoHW: exists("default")?
alt Missing key
OnboardingPage->>CryptoHW: generate("default")
end
OnboardingPage->>CryptoHW: getPublicKey("default")
OnboardingPage->>Provisioner: POST { ..., publicKey }
Provisioner-->>OnboardingPage: 200/response
sequenceDiagram
participant User
participant SignPage
participant CryptoHW
participant Backend
User->>SignPage: Initiate sign
SignPage->>CryptoHW: exists("default")?
alt No key
SignPage-->>User: Error "Default key pair does not exist"
else Has key
SignPage->>SignPage: Build signedPayload {sessionId, publicKey, message}
SignPage->>CryptoHW: signPayload("default", JSON.stringify(signedPayload))
CryptoHW-->>SignPage: signature
SignPage->>Backend: POST signedPayload(+signature) to redirect_uri
Backend-->>SignPage: Response
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
* feat: setup hw crypto * feat: signing logic * feat: run formatter
Description of change
Issue Number
Type of change
How the change has been tested
Change checklist
Summary by CodeRabbit