This demo showcases the functionality of reading Disco Data Backpack data to automatically fill out a form. The form is populated with information retrieved from a Disco API using Next.js, React, and Tailwind CSS.
Users can connect their wallet, and upon clicking a button, the form is automatically filled with relevant data from their Disco Data Backpack.
git clone https://github.com/discoxyz/disco-formfill.git
yarn install
Self-service API keys are now available to ALL profiles. Steps to generating a key are here.
Add this to .env.local:
DISCO_API_KEY=<insert api key>
yarn dev
Open http://localhost:3000 in your browser to see the form fill demo.
Click the "Connect Wallet" button to connect your wallet. Once connected, click the "Fetch Data" button to fetch the data from the Disco API and automatically fill the form fields. Connect Wallet, and Click Issue GM Credential! Go to app.disco.xyz to see the credential in your inbox, almost instantaneously.
## Resources
- Learn about Disco - all things Disco!
- Disco API reference - Disco API Reference
- Disco Bounties and References - Bounties and Reference Apps
- Next.js Documentation - learn about Next.js features and API.