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

RPC endpoint #328

Merged
merged 2 commits into from
Feb 13, 2023
Merged

RPC endpoint #328

merged 2 commits into from
Feb 13, 2023

Conversation

0xsign
Copy link
Contributor

@0xsign 0xsign commented Feb 1, 2023

Add endpoint to return Chain RPC data by slug or chain id.

This allows users to dynamically pull and use the list of public RPC for a specific chain.

I wanted to update pages/chain/[chain].js but we can't return a JSON page from getStaticProps. We could also simply upload the json file in /public but we'd need a cron to update them on a regular basis so that's why I added this endpoint.

Note: we'll need to enable CORS access if we want people to access this API endpoint from the outside.

ex:

GET https://chainid.network/api/chain/1
GET https://chainid.network/api/chain/eth

@vercel
Copy link

vercel bot commented Feb 1, 2023

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

Name Status Preview Comments Updated
chainlist ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 1, 2023 at 2:02PM (UTC)

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.

2 participants