-
Notifications
You must be signed in to change notification settings - Fork 37
[BUIDL Audition Onchain] BE-003: Wallet Signature Verification #68
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
base: main
Are you sure you want to change the base?
Conversation
jedstroke
left a comment
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.
@LaGodxy, please attend to these reviews
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.
@LaGodxy, isn't this test supposed to contain the starknet package, or did you preload it with signatures already?
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.
'Cause you're supposed to be testing against signed signatures
|
@LaGodxy What's up? |
|
@jedstroke |
|
@jedstroke |
|
@LaGodxy, what's up? |
|
There's a requested change |
PR: Implement Wallet Verification Endpoint using starknet.js
Overview
This PR implements a new
/api/v1/auth/verify-walletendpoint that provides a secure and reusable way to verify wallet ownership through message signatures. The implementation uses starknet.js for signature verification and follows best practices for security, error handling, and performance monitoring.Key Features
Technical Implementation
src/routes/v1/auth.tssrc/types.tsto support the new endpointtests/wallet-verification.test.jsSecurity Considerations
Testing
How to Use
The endpoint accepts POST requests with the following payload:
{ "walletAddress": "0x...", "message": "Sign this message to authenticate", "signature": ["0x...", "0x..."] }Response for successful verification:
{ "error": false, "msg": "Wallet verification successful", "data": { "walletAddress": "0x...", "verified": true, "timestamp": "2025-06-06T19:42:27.000Z", "processingTimeMs": 123 } }Setup Requirements
STARKNET_SEPOLIA_RPC_API_URLandSTARKNET_MAINNET_RPC_API_URLFuture Improvements
Related Issues
Closes #44