BRC20
In this guide, we will demonstrate how to create and add liquidity to a pool using an example provided by DotSwap. The process includes:
Getting the list of tokens available for adding liquidity
Getting the token swap rate
Creating/adding liquidity to a pool (if the pool exists, it will add liquidity; if not, it will automatically create)
Obtaining an unsigned PSBT for adding/creating liquidity
Submitting a signed PSBT for adding/creating liquidity
Step1:
Get Swappable TokensStep2:
Get Token Exchange RateStep3:
Pre-Swap RequestStep4:
Get Unsigned Swap PSBTStep5:
Send Signed Swap PSBTLast updated