> For the complete documentation index, see [llms.txt](https://docs.stacks.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stacks.co/reference/stacks.js/stacks-bitcoin-staking/cycles/bondstatusname.md).

# BondStatusName

A bond's status at one Bitcoin block height, including bonds that were never set up. Returned by [bondStatus](/reference/stacks.js/stacks-bitcoin-staking/cycles/bondstatus.md) and [fetchBondStatus](/reference/stacks.js/stacks-bitcoin-staking/fetch/fetchbondstatus.md).

***

### Usage

```ts
import { type BondStatusName, fetchBondStatus } from '@stacks/bitcoin-staking';

const status: BondStatusName = await fetchBondStatus({ bondIndex: 1, network: 'mainnet' });

if (status === 'eligible') {
  // the bond admin can call setup-bond for this index now
}
```

#### Notes

* The source marks this `@experimental`.
* A set-up bond resolves to a [BondPhaseName](/reference/stacks.js/stacks-bitcoin-staking/cycles/bondphasename.md). A bond without `setup-bond` resolves to `'too-early'`, `'eligible'` or `'missed'`.

[**Reference Link**](https://github.com/stx-labs/stacks.js/blob/6101c99efe5a9616ce7e16cef68e28fd10676e7e/packages/bitcoin-staking/src/cycles.ts#L328-L340)

***

### Definition

```ts
type BondStatusName = BondPhaseName | 'too-early' | 'eligible' | 'missed';
```

***

### Values

| Value         | Description                                                                                                                                         |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `'open'`      | Set up. Registration window, from two reward cycles before the start height until `prepareCycleLength` blocks before it                             |
| `'locked'`    | Set up. From the final pre-start prepare phase until the bond's `get-bond-l1-unlock-height`                                                         |
| `'unlocked'`  | Set up. From `get-bond-l1-unlock-height` through the end height inclusive                                                                           |
| `'finished'`  | Set up. After the end height                                                                                                                        |
| `'too-early'` | Not set up. The setup window has not opened. `setup-bond` would fail with `ERR_CANNOT_SETUP_BOND_TOO_SOON (u2)`                                     |
| `'eligible'`  | Not set up. Within two reward cycles before the start height, where the bond admin can call `setup-bond`                                            |
| `'missed'`    | Not set up, and the start height has passed. `setup-bond` fails with `ERR_CANNOT_SETUP_BOND_TOO_LATE (u3)` from here on, so this bond can never run |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stacks.co/reference/stacks.js/stacks-bitcoin-staking/cycles/bondstatusname.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
