UNPKG

@ledgerhq/coin-algorand

Version:
18 lines 603 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.lastBlock = lastBlock; const network_1 = require("../network"); /** * Get the last confirmed block info * @returns Block info with current round (height), hash, and time */ async function lastBlock() { const params = await (0, network_1.getTransactionParams)(); const blockData = await (0, network_1.getBlock)(params.lastRound); return { height: params.lastRound, hash: blockData.block.gh, time: new Date(blockData.block.ts * 1000), }; } //# sourceMappingURL=lastBlock.js.map