@kamino-finance/klend-sdk
Version:
Typescript SDK for interacting with the Kamino Lending (klend) protocol
19 lines • 658 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.toLegacyPublicKey = toLegacyPublicKey;
exports.toAccountInfo = toAccountInfo;
const web3_js_1 = require("@solana/web3.js");
const buffer_1 = require("buffer");
function toLegacyPublicKey(address) {
return new web3_js_1.PublicKey(address.toString());
}
function toAccountInfo(acc) {
return {
owner: toLegacyPublicKey(acc.programAddress),
data: buffer_1.Buffer.from(acc.data[0], 'base64'),
lamports: Number.parseInt(acc.lamports.toString()),
executable: acc.executable,
rentEpoch: 0,
};
}
//# sourceMappingURL=compat.js.map