Welcome to the Phi Community Cred APIs repository! This project provides a comprehensive suite of APIs designed to manage and verify credentials (Creds) within the phi.box platform. Our APIs facilitate seamless interaction with user credentials, ensure the health of the system, and offer detailed documentation for developers.
- Cred Verification APIs: Robust APIs for verifying user credentials within the phi.box ecosystem.
- API Health Monitoring: Tools to monitor and ensure the uptime and reliability of the APIs.
- Comprehensive Documentation: Access in-depth documentation for all available API endpoints to streamline integration and usage.
To set up the Phi Protocol API Verification project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/PHI-LABS-INC/phi-community-cred-apis.git
-
Navigate into the project directory:
cd phi-community-cred-apis -
Install the necessary dependencies:
npm install
-
Launch the application:
npm run dev
Once running, your API will be accessible at http://localhost:3000.
To contribute by adding new APIs, follow these steps:
-
Create the Endpoint:
- Determine the type of API you want to create (e.g., cred APIs on base).
- Create the appropriate endpoint in the corresponding folder. For example, if you want to create a cred API on base, create the endpoint in the
basefolder. - Refer to this repository for understanding the structure and implementation: Verifier Template.
-
Endpoint Requirements:
- Your endpoint should return a JSON object with the following three properties:
mint_eligibility: Indicates if the address is eligible for minting.data: Contains the relevant data for the request.signature: A cryptographic signature for the response.
- Your endpoint should return a JSON object with the following three properties:
-
Add the Endpoint to Configuration:
- Once the API is created, add the endpoint details to the
data/api-config.tsfile. - Ensure you include the method, path, id, and description for the new endpoint.
- Once the API is created, add the endpoint details to the
Your endpoint should return a JSON object with the following three properties:
{
"mint_eligibility": false,
"data": "0",
"signature": "0xdf...988dfb7"
}