Skip to main content
1

Prerequistes

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

Setup your React app

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.