# Kaspa

<figure><img src="/files/OMIItl9hCyLnXEaKGjeq" alt="Kaspa Logo"><figcaption><p>Kaspa Logo</p></figcaption></figure>

## Introduction

The [**Kaspa blockchain**](https://kaspa.org/) is a high-performance, proof-of-work (PoW) cryptocurrency designed for scalability and fast transaction processing. It utilizes a unique data structure called a **blockDAG** (Directed Acyclic Graph), which allows multiple blocks to be created and processed in parallel rather than a traditional linear chain. This architecture makes Kaspa capable of handling high transaction throughput while maintaining robust security.

Key features of Kaspa include:

* **Fast Block Times**: Blocks are generated every second, enabling rapid transaction confirmation.
* **Scalability**: The blockDAG structure improves scalability compared to traditional blockchains.
* **Decentralization**: Maintains a high level of decentralization through PoW consensus.
* **Fair Launch**: No premine or ICO; it was launched fairly through mining.

Kaspa is designed to provide an efficient, decentralized solution for payments and value transfer while addressing the scalability issues faced by many first-generation blockchains.

## How to Interact

1. Follow the guide to interact with the websocket [here](/rpc-api-documentation/guide-to-rpc/endpoints/websocket.md).
2. Get your API Key from [Forbole's RPC](https://rpc.forbole.com/).

<figure><img src="/files/ynXeb2D0So9xxMStqFXD" alt="DevTools Endpoints"><figcaption></figcaption></figure>

1. Test the query as follow:

```bash
echo '{"id": "1", "jsonrpc": "2.0", "method": "getBlockDagInfoRequest", "params": {}}' | \
websocat -H="apikey: {apikey}" wss://ws-mainnet-kaspa-fullnode.forbole.com
```

### Troubleshooting

#### Common Issues

1. **Command not found**
   * Verify the binary is in your system PATH
   * Try running with full path to the executable
2. **Permission denied**
   * Ensure the binary is executable (`chmod +x` on Unix-like systems)
   * Try running with elevated privileges for system directories
3. **Cargo installation fails**
   * Ensure Rust is properly installed
   * Update Rust: `rustup update`
4. **Connection issues with Kaspa nodes**
   * When connecting to Kaspa nodes, you may need to use the borsh protocol for proper message serialization
   * Ensure your client implementation supports borsh serialization/deserialization
   * If using custom clients, implement borsh protocol handling for Kaspa-specific message formats


---

# 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.rpc.forbole.com/rpc-api-documentation/guide-to-rpc/endpoints/websocket/kaspa.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.
