# @electrum-cash/application

> ...

Latest version **0.0.1** (published 2024-02-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @electrum-cash/application
pnpm add @electrum-cash/application
yarn add @electrum-cash/application
bun add @electrum-cash/application
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2024-02-03 |
| First published | 2024-02-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 7 |
| Unpacked size | 211.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jonathan Silverblood |
| Maintainers | monsterbitar |

## Links

- npm: https://www.npmjs.com/package/@electrum-cash/application
- Homepage: https://gitlab.com/electrum-cash/application#readme
- Issues: https://gitlab.com/electrum-cash/application/issues
- npm.io page: https://npm.io/package/@electrum-cash/application

## Dependencies (7)

- [idb-keyval](https://npm.io/package/idb-keyval.md) ^6.2.0
- [async-mutex](https://npm.io/package/async-mutex.md) ^0.4.0
- [@bitauth/libauth](https://npm.io/package/@bitauth/libauth.md) ^2.0.0-alpha.6
- [@electrum-cash/network](https://npm.io/package/@electrum-cash/network.md) ^3.2.0-r2
- [@electrum-cash/servers](https://npm.io/package/@electrum-cash/servers.md) ^3.0.2
- [@electrum-cash/protocol](https://npm.io/package/@electrum-cash/protocol.md) ^1.5.1-development.6088927104
- [@electrum-cash/checkpoint](https://npm.io/package/@electrum-cash/checkpoint.md) ^0.4.2-b800000

## Recent versions

- 0.0.1 (latest) — 2024-02-03
- 0.5.2-development.16863504490 (development) — 2026-10-01
- 0.5.1-development.16859684982 — 2026-10-01
- 0.5.1-development.16845510816 — 2026-09-30
- 0.5.0-development.16834239847 — 2026-09-30
- 0.3.0-development.16701438254 — 2026-09-24
- 0.2.4-development.16532960632 — 2026-09-16
- 0.2.3-development.13447192992 — 2026-03-11
- 0.2.3-development.13424909069 — 2026-03-10
- 0.2.3-development.13424453498 — 2026-03-10
- 0.2.3-development.12725591206 — 2026-01-15
- 0.2.3-development.12724497124 — 2026-01-15
- 0.2.2-development.11641378031 — 2025-10-08
- 0.2.2-development.11428041098 — 2025-09-20
- 0.2.1-development.8575052359 — 2024-12-07
- … 36 more at https://npm.io/package/@electrum-cash/application/versions

## README

# Introduction

The [`@electrum-cash/application`](https://www.npmjs.com/package/@electrum-cash/application) library provides a robust framework for building SPV-validated tools and services.

- Full SPV-validation of monitored transactions and blocks.
- Rich notifications for each step in the transaction, block or address life-cycle.
- You can ask for partial data without needing to understand how to acquire it.
- Automatic handling of network edge-cases, fail-over and opportunistic caching.

For complete information on all typings, arguments and options available, read to the [documentation](https://electrum-cash.gitlab.io/application/) generated from the source code.

# Usage

## Installation

Installation is easy, just get the library from NPM:

```sh
npm install @electrum-cash/application
```

## Setup

```ts
// Import library features.
import { initializeElectrumApplication } from '@electrum-cash/application';

// Initialize the electrum application.
const electrumEvents = await initializeElectrumApplication('My Electrum Application');
```

## Event handling

### Tracking the blockchain

Once you have initialized the electrum application you can monitor when new blocks become available.

```ts
// Log when new block headers are available.
electrumEvents.on('BlockReceived', console.log);

// Log when new block headers have been verified.
electrumEvents.on('BlockVerified', console.log);

// Log what chain height and percent of the chain has been verified.
electrumEvents.on('ChainStatus', console.log);
```

### Tracking transactions

After you monitor an address or transaction, you get events for each step in each transactions life-cycle.

```ts
// Log when new transactions are available.
electrumEvents.on('TransactionReceived', console.log);

// Log when new transactions are verified.
electrumEvents.on('TransactionVerified', console.log);

// Log when new transactions are doublespent.
electrumEvents.on('TransactionDoubleSpendDetected', console.log);

// Either monitor a specific transaction...
await monitorTransaction(transactionHash);

// .. or all pending transactions for a specific address.
await monitorAddress(address);
```

### Tracking address history

After you monitor an address, you get events when an address history is updated.

```ts
// Log when the address history has changed.
electrumEvents.on('AddressUpdateReceived', console.log);

// TODO: Add events for address balance updates.

// Monitor a specific address.
await monitorAddress(address);
```

## Requesting Data

### Getting balance, UTXOs and transaction history.

...

```ts
```

## Support

If you find bugs or have problems using this library, you can file issues on the [Gitlab](https://gitlab.com/electrum-cash/application/issues).

---
_Source: https://npm.io/package/@electrum-cash/application · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
