Operation - Mint
Key Steps
Usage
Example
import { parseUnits } from 'viem';
import { publicClient, walletClient, protocolConfig, collateral } from 'satoshi-sdk';
const DEBT_TOKEN_DECIMALS = 18; // Standard decimals for Ethereum-based tokens
async function increaseMinting() {
// Step 1: Define the amount to mint
const addMintingAmt = parseUnits('5', DEBT_TOKEN_DECIMALS); // Mint an additional 5 SAT stablecoins
// Step 2: Execute the minting transaction
const receipt = await satoshiClient.Postition.doBorrow({
publicClient,
walletClient,
protocolConfig,
collateral,
addMintingAmt,
});
console.log('Minting additional stablecoins successful:', receipt);
}
increaseMinting();Last updated