|
| 1 | +--- |
| 2 | +title: Web2 FDC Setup |
| 3 | +description: Instructions for data providers to set up the Web2 FDC attestation type. |
| 4 | +keywords: [flare-network, data-provider, fdc, web2, verifier, configuration] |
| 5 | +sidebar_position: 1 |
| 6 | +--- |
| 7 | + |
| 8 | +This guide explains how data providers can set up support for the [Web2 FDC attestation type](/fdc/attestation-types/web2-json). |
| 9 | +The setup involves configuring a Web2 verifier server and updating the FDC Client. |
| 10 | + |
| 11 | +## Prerequisites |
| 12 | + |
| 13 | +- Access to the [FDC Suite Deployment repository](https://github.com/flare-foundation/fdc-suite-deployment). |
| 14 | +- Access to the [FSP Deployment repository](https://github.com/flare-foundation/flare-systems-deployment). |
| 15 | +- API key for the Ignite Web2Json source (see [Obtaining an Ignite API Key](#obtaining-an-ignite-api-key)) |
| 16 | + |
| 17 | +## Set Up Web2 Verifier |
| 18 | + |
| 19 | +1. Pull the [FDC Suite Deployment](https://github.com/flare-foundation/fdc-suite-deployment) repository version v1.2.0: |
| 20 | + |
| 21 | + ```bash |
| 22 | + git clone --branch v1.2.0 https://github.com/flare-foundation/fdc-suite-deployment.git |
| 23 | + cd fdc-suite-deployment |
| 24 | + ``` |
| 25 | + |
| 26 | +2. Configure environment variables in `.env` (see `.env.example` for reference): |
| 27 | + |
| 28 | + ```bash |
| 29 | + WEB2_IGNITE_API_KEY=your_ignite_api_key_here |
| 30 | + WEB2_SOURCE_IDS=Ignite |
| 31 | + VERIFIER_API_KEYS=key1,key2 |
| 32 | + ``` |
| 33 | + |
| 34 | +3. Run the configuration generator: |
| 35 | + |
| 36 | + ```bash |
| 37 | + ./generate-config.sh |
| 38 | + ``` |
| 39 | + |
| 40 | +4. Start the Web2 verifier server: |
| 41 | + |
| 42 | + ```bash |
| 43 | + cd web2-verifier/ |
| 44 | + docker compose up -d |
| 45 | + ``` |
| 46 | + |
| 47 | +5. (Optional) Specify memory and CPU restrictions in `docker-compose.yaml` if needed. |
| 48 | + |
| 49 | +## Update FDC Client |
| 50 | + |
| 51 | +1. Update your [Flare Systems Protocol Deployment](https://github.com/flare-foundation/flare-systems-deployment) to version v1.2.0: |
| 52 | + |
| 53 | + ```bash |
| 54 | + cd flare-systems-deployment |
| 55 | + git fetch origin |
| 56 | + git checkout v1.2.0 |
| 57 | + ``` |
| 58 | + |
| 59 | +2. Set the verifier address and API key in `.env` (see `.env.example` for reference): |
| 60 | + |
| 61 | + ```bash |
| 62 | + IGNITE_WEB2JSON_URL=http://<host>:9801/verifier/web2/Web2Json/verifyFDC |
| 63 | + IGNITE_WEB2JSON_API_KEY=key1 |
| 64 | + ``` |
| 65 | + |
| 66 | + Replace `<host>` with the hostname or IP address where your Web2 verifier is running. |
| 67 | + |
| 68 | +3. Regenerate the FDC Client configuration: |
| 69 | + |
| 70 | + ```bash |
| 71 | + ./populate-config.sh |
| 72 | + ``` |
| 73 | + |
| 74 | +4. Restart the FDC Client to apply the changes: |
| 75 | + |
| 76 | + ```bash |
| 77 | + docker compose up -d |
| 78 | + ``` |
| 79 | + |
| 80 | + This pulls the latest version and recreates the container. |
| 81 | + |
| 82 | +## Obtaining an Ignite API Key |
| 83 | + |
| 84 | +API keys for the Ignite proxy are encrypted with each provider's signing policy public key. |
| 85 | +For detailed instructions on how to obtain and decrypt your API key, see the [FDC Attestation Verifier repository](https://github.com/flare-foundation/verifier-indexer-api/tree/main/scripts/web2#readme). |
| 86 | + |
| 87 | +:::tip[What's Next] |
| 88 | + |
| 89 | +Once your Web2 FDC setup is complete, explore the FDC developer guides to learn how to use the attestation types: |
| 90 | + |
| 91 | +- [FDC Guides](/fdc/guides) - Tutorials for using FDC with Hardhat and Foundry. |
| 92 | +- [Web2 JSON Attestation Type](/fdc/attestation-types/web2-json) - Learn about the Web2 JSON attestation type. |
| 93 | + |
| 94 | +::: |
0 commit comments