Operation - Withdraw
Key Steps:
Example
import { parseUnits } from '@ethersproject/units';
import { satoshiClient, DEBT_TOKEN_DECIMALS } from 'satoshi-sdk';
async function withdrawFromStabilityPool() {
// Step 1: Define the withdrawal amount in SAT stablecoins
const withdrawAmt = parseUnits('2', DEBT_TOKEN_DECIMALS); // Withdrawing 2 SAT
// Step 2: Execute the withdrawal transaction
const receipt = await satoshiClient.StabilityPool.doWithdraw(withdrawAmt);
// Output the transaction receipt
console.log('Withdrawal Receipt:', receipt);
}
withdrawFromStabilityPool();Last updated