Skip to content
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

Merged
merged 19 commits into from
Dec 11, 2024
Merged

Conversation

md0x
Copy link

@md0x md0x commented Dec 11, 2024

No description provided.

Copy link

vercel bot commented Dec 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
app-frontend-v3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 11, 2024 10:59pm
sepolia-frontend-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 11, 2024 10:59pm

Signed-off-by: Pablo Maldonado <[email protected]>
@md0x md0x requested review from pxrl and james-a-morris December 11, 2024 18:16
Co-authored-by: James Morris, MS <[email protected]>
"0x9A8f92a830A5cB89a3816e3D267CB7791c16b04D", // dev wallet
];

export const getRelayerFromSignature = async (
Copy link
Contributor

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 ?

Suggested change
export const getRelayerFromSignature = async (
export const getRelayerFromSignature = (

api/relayer-config.ts Outdated Show resolved Hide resolved
Comment on lines 17 to 20
const { timestamp, ...restOfMessage } = JSON.parse(message);
if (!isTimestampValid(timestamp, MAX_MESSAGE_AGE_SECONDS)) {
return response.status(400).json({ message: "Message too old" });
}
Copy link
Contributor

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]>
@md0x md0x requested review from james-a-morris and pxrl December 11, 2024 21:38
md0x added 2 commits December 11, 2024 15:39
Signed-off-by: Pablo Maldonado <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
md0x added 2 commits December 11, 2024 16:09
Signed-off-by: Pablo Maldonado <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
api/_types/exclusivity.types.ts Outdated Show resolved Hide resolved
api/relayer-config.ts Outdated Show resolved Hide resolved
api/relayer-config.ts Outdated Show resolved Hide resolved
md0x and others added 2 commits December 11, 2024 16:32
Co-authored-by: James Morris, MS <[email protected]>
Signed-off-by: Pablo Maldonado <[email protected]>
@md0x md0x requested a review from james-a-morris December 11, 2024 22:42
@pxrl pxrl merged commit 79b1d5d into epic/relayer-config Dec 11, 2024
9 checks passed
@pxrl pxrl deleted the pablo/relayer-config-auth branch December 11, 2024 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants