Skip to content
/ api Public

The API that powers WeaverFi.

License

Notifications You must be signed in to change notification settings

WeaverFi/api

Repository files navigation

WeaverFi Banner

The API that powers WeaverFi.

NodeJS TypeScript Express.js Swagger Firebase


API Usage

Learn more about our API and manage your API keys here.

WeaverFi's OpenAPI documentation can be found here.


Contributing

Contribution guidelines can be found here.


Firebase Deployment

This repository is already setup for Firebase hosting, but could easily be adapted to be deployed on any other cloud deployment service.

Currently the API also uses many other cloud functions to manage token prices, API key caching, etc. but those can be easily disabled.

  1. Install dependencies by navigating to the functions folder and using npm i.

  2. Add your project ID in .firebaserc (an example file is provided).

  3. Change any settings to your liking in index.ts.

  4. Optionally, whitelist any origins to be exempt from rate limits in .env (an example file is provided).

  5. To deploy to Firebase, use firebase deploy.

Note: The API is currently configured through getKeyInfo() in functions.ts to only validate keys with a chain identifier appended to it. Modify that function if your implementation is different!