# chain

###

### **getBlock(hash?: `BlockHash`): `SignedBlock`**

* **interface**: `api.rpc.chain.getBlock`
* **jsonrpc**: `chain_getBlock`
* **summary**: Gets the header and body of the target chain block

### **getBlockHash(blockNumber?: `BlockNumber`): `BlockHash`**

* **interface**: `api.rpc.chain.getBlockHash`
* **jsonrpc**: `chain_getBlockHash` (alias=`chain_getHead`)
* **summary**: Gets the block hash for a specific block

### **getFinalizedHead(): `BlockHash`**

* **interface**: `api.rpc.chain.getFinalizedHead`
* **jsonrpc**: `chain_getFinalizedHead` (alias=`chain_getFinalisedHead`)
* **summary**: Gets hash of the last finalized block in the canon chain

### **getHeader(hash?: `BlockHash`): `Header`**

* **interface**: `api.rpc.chain.getHeader`
* **jsonrpc**: `chain_getHeader`
* **summary**: Retrieves the header for a specific block

### **subscribeAllHeads(): `Header`**

* **interface**: `api.rpc.chain.subscribeAllHeads`
* **jsonrpc**: `chain_subscribeAllHeads`
* **summary**: Retrieves the newest header via subscription

### **subscribeFinalizedHeads(): `Header`**

* **interface**: `api.rpc.chain.subscribeFinalizedHeads`
* **jsonrpc**: `chain_subscribeFinalizedHeads` (alias=`chain_subscribeFinalisedHeads`)
* **summary**: Retrieves the best finalized header via subscription.

### **subscribeNewHeads(): `Header`**

* **interface**: `api.rpc.chain.subscribeNewHeads`
* **jsonrpc**: `chain_subscribeNewHeads` (alias=`chain_subscribeNewHead`)
* **summary**: Retrieves the best header via subscription.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bifrostnetwork.com/bifrost-network/developer-documentations/client-api/json-rpc-api/chain.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
