For the complete documentation index, see llms.txt. This page is also available as Markdown.

BurnHeightRange

A window of Bitcoin block heights with an exclusive end. Its only producer in the package is bondRegisterRanges, which the source marks @internal and experimental and which returns the windows where bond timing lets register-for-bond succeed.


Usage

import type { BurnHeightRange } from '@stacks/bitcoin-staking';

function contains(range: BurnHeightRange, burnHeight: number): boolean {
  return burnHeight >= range.startBurnHeight && burnHeight < range.endBurnHeight;
}

Notes


Definition

interface BurnHeightRange {
  /** Inclusive start burn-block height. */
  startBurnHeight: number;
  /** Number of burn blocks the window spans. */
  length: number;
  /** Exclusive end burn-block height. */
  endBurnHeight: number;
}

Properties

Property
Type
Description

startBurnHeight

number

First Bitcoin block height of the window, inclusive

length

number

Number of Bitcoin blocks in the window

endBurnHeight

number

First height after the window, exclusive

Was this helpful?