UNPKG

solmash-whitelist-sdk-v2

Version:

A sdk for interacting Solmash Whitelist program

14 lines 593 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getDecimals = exports.getAnchorProvider = void 0; const anchor_1 = require("@project-serum/anchor"); function getAnchorProvider(connection, wallet, opts) { return new anchor_1.AnchorProvider(connection, wallet, opts); } exports.getAnchorProvider = getAnchorProvider; async function getDecimals(connection, mint) { const { value: tokenAmount } = await connection.getTokenSupply(mint, "confirmed"); return tokenAmount.decimals; } exports.getDecimals = getDecimals; //# sourceMappingURL=utils.js.map