Skip to main content
1

Prerequisites

This guide assumes that you have completed the Setup guide.
2

Setup your React app

For API key, reach out to us in the Townhall or raise a support ticket.
Integrate Garden into your React app by wrapping it with the GardenProvider. This enables interaction with the protocol and handles session management.
The Starknet and Solana configurations are only necessary if you choose to support those chains in your app.
3

Create a swap component

The lifecycle of a swap is as follows:
  1. Get a quote
  2. Pick the best quote
  3. Initiate the transaction to complete the swap
swap.tsx
To include affiliate fees in your swap flow, refer to the implementation here.