@ledgerhq/coin-algorand
Version:
Ledger Algorand Coin integration
15 lines • 443 B
JavaScript
import { getBlock } from "../network";
/**
* Get block info for a specific height
* @param height - The block height (round number)
* @returns Block info with height, hash, and time
*/
export async function getBlockInfo(height) {
const blockData = await getBlock(height);
return {
height,
hash: blockData.block.gh,
time: new Date(blockData.block.ts * 1000),
};
}
//# sourceMappingURL=getBlockInfo.js.map