-
Notifications
You must be signed in to change notification settings - Fork 43
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
feat(api): relayer config auth #1322
Conversation
Signed-off-by: james-a-morris <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
…o pablo/relayer-config
Signed-off-by: Pablo Maldonado <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Signed-off-by: Pablo Maldonado <[email protected]>
Co-authored-by: James Morris, MS <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
api/_exclusivity/utils.ts
Outdated
"0x9A8f92a830A5cB89a3816e3D267CB7791c16b04D", // dev wallet | ||
]; | ||
|
||
export const getRelayerFromSignature = async ( |
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.
verifyMessage()
isn't async; can we drop the async
here ?
export const getRelayerFromSignature = async ( | |
export const getRelayerFromSignature = ( |
api/relayer-config.ts
Outdated
const { timestamp, ...restOfMessage } = JSON.parse(message); | ||
if (!isTimestampValid(timestamp, MAX_MESSAGE_AGE_SECONDS)) { | ||
return response.status(400).json({ message: "Message too old" }); | ||
} |
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.
I think the timestamp would need to be covered by the signature, otherwise it doesn't protect against replay.
Signed-off-by: Pablo Maldonado <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
Co-authored-by: James Morris, MS <[email protected]>
Co-authored-by: James Morris, MS <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
No description provided.