1
Prerequistes
This guide assumes that you have completed the Setup guide.
2
Initialize wallets and providers
Initialize wallets and providers only for the chains you need.
3
Configure Garden instance
A digest key is a 32-byte key that serves as a unique identifier, used for generating secrets (preimages for HTLCs). It functions as a Garden account, but it is strictly non-custodial, with no funds ever being associated with it or moved through it.
4
Create a swap
5
Initiate the swap
The first swap requires gas for token approval. Subsequent swaps will be gasless.
6
Settle the swap
Garden handles swap settlement automatically. The
execute
function continuously polls for the order status and calls redeem
when the status becomes redeemable.It is important to keep the service running until completion of the swap. If the instance is stopped, restarting it will ensure Garden checks the status of the order and resubmits the redeem if necessary.