@kamino-finance/klend-sdk
Version:
Typescript SDK for interacting with the Kamino Lending (klend) protocol
20 lines • 718 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.printAllReserveAccounts = printAllReserveAccounts;
const utils_1 = require("../../utils");
async function printAllReserveAccounts(rpc) {
let count = 0;
const logItems = [];
for await (const [address, reserveAccount] of (0, utils_1.getAllReserveAccounts)(rpc)) {
count++;
const logItem = {
address: address.toString(),
value: reserveAccount.config.autodeleverageEnabled.toString(),
index: count,
};
logItems.push(logItem);
}
console.log(`Total reserves: ${count}`);
console.log(logItems);
}
//# sourceMappingURL=printAllReserveAccounts.js.map