Operation - Deposit
Key Steps
Usage
Example
import { parseEther } from 'viem';
import { protocolConfig, wbtcABI } from 'satoshi-sdk';
async function addCollateral() {
// Step 1: Convert the amount to add to Wei
const addedCollAmt = parseEther('0.2'); // Let's add 0.2 BTC worth of WBTC
const collateral = protocolConfig.COLLATERALS[0]; // WBTC Collateral
// Step 2: Record the deposit in the protocol
const receipt = await satoshiClient.Postition.doDeposit({
collateral,
addedCollAmt,
});
console.log('Deposit successful:', receipt);
}
addCollateral();Last updated