Welcome Onboard!

Here, you'll find a complete guide to seamlessly integrating Garden SDK v2 into your dApp. If you’re working with React/Next and wagmi, you’ll find the setup fairly straightforward.


Prerequisites

To get started, make sure you have:


Installation

Use your package manager (npm, yarn, pnpm) to install Garden and wagmi dependencies.

Garden dependencies:

"@gardenfi/core": "^0.2.0-beta.81",
"@gardenfi/orderbook": "^0.2.0-beta.24",
"@gardenfi/react-hooks": "0.0.1-beta.111",

wagmi dependencies (versions may vary):

"@tanstack/react-query": "^5.59.20",
"wagmi": "^2.12.29",


Flow

Garden swaps are atomic and use HTLCs (Hash Time Locked Contracts) under the hood. Users initiate a swap on one chain and redeem on another. With v2, we've streamlined the process, reducing dependencies on users for a smoother experience.