# Kaspa

<figure><img src="https://3091755030-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FENUSv6WO6gDHge2JXsI2%2Fuploads%2FuPhArQJHEGbadzWyT4aM%2FKaspa-LDSP-Dark-Reverse.png?alt=media&#x26;token=ad2bce94-4ec2-4ffa-bcde-f9b2c9ea8ad2" 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](https://docs.rpc.forbole.com/rpc-api-documentation/guide-to-rpc/endpoints/websocket).
2. Get your API Key from [Forbole's RPC](https://rpc.forbole.com/).

<figure><img src="https://3091755030-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FENUSv6WO6gDHge2JXsI2%2Fuploads%2FZ3vmV6f4xliETwQasMkB%2FScreenshot%202025-01-08%20at%202.58.11%E2%80%AFPM.png?alt=media&#x26;token=71dd6f2e-139d-4c00-a744-337e66a19906" 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
