Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1x 1x 1x 5x 4x 1x 1x | import { NETWORK } from '@constants/index'; import { poxAddressToBtcAddress } from '@stacks/stacking'; interface ConvertToPoxAddressBtc { version: Uint8Array; hashbytes: Uint8Array; } export function convertPoxAddressToBtc(network: 'mainnet' | 'testnet') { return ({ version, hashbytes }: ConvertToPoxAddressBtc) => { return poxAddressToBtcAddress(version[0], hashbytes, network); }; } export const formatPoxAddressToNetwork = convertPoxAddressToBtc(NETWORK); export function formatCycles(cycles: number) { return `${cycles} cycle${cycles !== 1 ? 's' : ''}`; } |