@kamino-finance/klend-sdk
Version:
Typescript SDK for interacting with the Kamino Lending (klend) protocol
11 lines • 606 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.isKtoken = isKtoken;
const spl_token_1 = require("@solana/spl-token");
const web3_js_1 = require("@solana/web3.js");
async function isKtoken(mintKey, kamino) {
const [expectedMintAuthority] = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('authority'), mintKey.toBuffer()], kamino.getProgramID());
const mint = await (0, spl_token_1.getMint)(kamino.getConnection(), mintKey);
return mint.mintAuthority !== null && mint.mintAuthority.equals(expectedMintAuthority);
}
//# sourceMappingURL=kamino.js.map
;