@ledgerhq/coin-algorand
Version:
Ledger Algorand Coin integration
18 lines • 567 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBlockInfo = getBlockInfo;
const network_1 = require("../network");
/**
* Get block info for a specific height
* @param height - The block height (round number)
* @returns Block info with height, hash, and time
*/
async function getBlockInfo(height) {
const blockData = await (0, network_1.getBlock)(height);
return {
height,
hash: blockData.block.gh,
time: new Date(blockData.block.ts * 1000),
};
}
//# sourceMappingURL=getBlockInfo.js.map