Operation - Redemption
Key Steps
Example
import { parseUnits } from '@ethersproject/units';
import { satoshiClient, collateral, DEBT_TOKEN_DECIMALS } from 'satoshi-sdk';
async function redeemCollateral() {
// Step 1: Define the amount of SAT stablecoins you want to redeem
const estimatedRedeemAmt = parseUnits('5', DEBT_TOKEN_DECIMALS); // Redeeming 5 SAT
// Step 2: Execute the redeem operation
const receipt = await satoshiClient.Postition.doRedeem(collateral, estimatedRedeemAmt);
// Output the transaction receipt
console.log('Redeem Receipt:', receipt);
}
redeemCollateral();Last updated