// 1. Find approved withdrawal requests
const transactions = await sdk.getTransactions({
type: "withdraw",
status: "approved"
});
// 2. Complete them
for (const tx of transactions.data) {
if (tx.platform === "lending-pool") {
console.log(`Completing withdrawal for ${tx.amount} ${tx.asset}...`);
const txComplete = await sdk.completeWithdraw(
tx.asset as Address,
tx.requestId!
);
console.log("Withdrawal completed:", txComplete);
}
}