{"id":18719280,"url":"https://github.com/philogy/basic-wl-auth-server","last_synced_at":"2025-11-10T18:30:15.069Z","repository":{"id":65424325,"uuid":"400851407","full_name":"Philogy/basic-wl-auth-server","owner":"Philogy","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-23T00:11:44.000Z","size":410,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-28T11:14:26.786Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Philogy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-28T17:27:12.000Z","updated_at":"2023-01-23T00:55:10.000Z","dependencies_parsed_at":"2023-02-12T19:00:24.007Z","dependency_job_id":null,"html_url":"https://github.com/Philogy/basic-wl-auth-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Philogy%2Fbasic-wl-auth-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Philogy%2Fbasic-wl-auth-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Philogy%2Fbasic-wl-auth-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Philogy%2Fbasic-wl-auth-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Philogy","download_url":"https://codeload.github.com/Philogy/basic-wl-auth-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239581759,"owners_count":19662960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T13:24:58.085Z","updated_at":"2025-11-10T18:30:14.976Z","avatar_url":"https://github.com/Philogy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Basic NFT Whitelist Auth Server\nserver to authenticate requests from client and provide proof for smart contract\n\n### Documentation\n\n#### Server Parameters\n* `.env`\n  * `VERIFIER_PRIV_KEY`: hex encoded private key of verifier\n  * `PROVIDER_ENDPOINT`: infura or other JSON-RPC endpoint\n  * `SALE_ADDRESS`: ethereum address of deployed sale contract\n  * `RECAPTCHA_SECRET`: recaptcha server-side secret provided by google\n* `src/whitelist.env.js`\n\n    ```javascript\n    module.exports = [Address]\n    ```\n    should be simple javascript file which has an array of ethereum addresses as\n    its only and direct export. These addresses will be considered whitelisted\n\n#### Endpoints\n\n* `/` **`(GET)`**\n\n  will serve static files contained in the `/page` or `/test-page` directory\n  depending on whether the api is run in development mode or not\n\n* `/verifier` __`(GET)`__\n  * Responses:\n    * 400 if the server stored verifier private key does not match the sale contract\n      verifier\n    * 200 `String`: the address of the verifier\n\n* `/sale-contract` __`(GET)`__ \n  * Responses:\n    * 200 `String`: the address of the sale contract\n\n* `/sale-contract/abi` __`(GET)`__ \n  * Responses:\n    * 200 `Object`: the ABI of the sale contract\n\n* `/verify-whitelist` __`(POST)`__ \n  * Parameters:\n    ```javascript\n    {\n      \"address\": String // address for which to get whitelist proof\n    }\n\n    ```\n  * Responses:\n    * 400 if address is not a valid ethereum address\n    * 403 if the address is not whitelisted\n    * 200 if the address is valid and contained within the whitelist\n    ```javascript\n    {\n      \"signature\": String // hex encoded signature ready for web3\n    }\n\n* `/verify-captcha` __`(POST)`__ \n  * Parameters:\n    ```javascript\n    {\n      \"address\": String, // address for which to validate captcha\n      \"captcha\": String // captcha .value provided by the captcha element\n    }\n\n    ```\n  * Responses:\n    * 400 if address is not a valid ethereum address\n    * 400 if the captcha field is empty or missing\n    * 403 if the captcha failed to verify\n    * 200 if the captcha and address are valid\n    ```javascript\n    {\n      \"signature\": String // hex encoded signature ready for web3\n    }\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilogy%2Fbasic-wl-auth-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilogy%2Fbasic-wl-auth-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilogy%2Fbasic-wl-auth-server/lists"}