# @gemlinkofficial/electrum-client-ts

> Electrum protocol client for node.js and browser

Latest version **0.1.28** (published 2023-05-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @gemlinkofficial/electrum-client-ts
pnpm add @gemlinkofficial/electrum-client-ts
yarn add @gemlinkofficial/electrum-client-ts
bun add @gemlinkofficial/electrum-client-ts
```

## Health

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

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

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.28 |
| Published | 2023-05-18 |
| First published | 2022-07-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 1 |
| Unpacked size | 71.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Devzx |
| Maintainers | gemlinkofficial |
| Keywords | client, electrum, bitcoin |

## Links

- npm: https://www.npmjs.com/package/@gemlinkofficial/electrum-client-ts
- Repository: https://github.com/gemlink/electrum-client-ts
- Homepage: https://github.com/gemlink/electrum-client-ts#readme
- Issues: https://github.com/gemlink/electrum-client-ts/issues
- npm.io page: https://npm.io/package/@gemlinkofficial/electrum-client-ts

## Dependencies (1)

- [socket.io](https://npm.io/package/socket.io.md) ^4.5.1

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 0.1.28 (latest) — 2023-05-18
- 0.1.27 — 2022-08-02
- 0.1.26 — 2022-08-02
- 0.1.25 — 2022-08-02
- 0.1.24 — 2022-07-08
- 0.1.23 — 2022-07-08
- 0.1.22 — 2022-07-08
- 0.1.21 — 2022-07-08
- 0.1.20 — 2022-07-08
- 0.1.19 — 2022-07-08
- 0.1.18 — 2022-07-08
- 0.1.17 — 2022-07-07
- 0.1.16 — 2022-07-07
- 0.1.145 — 2022-07-07

## README

# electrum-client-ts

JavaScript implementation of [Electrum Protocol] Client.

This is a library that can communicate with the [ElectrumX Server]
on `tcp`, `ssl`, `ws` and `wss` protocols. 

Works in node.js and browser.

Implements methods described in [Electrum Protocol methods] documentation.

Subscriptions and notifications are also supported, please see [example](example/subscribe.js).

## Install

```
npm install --save @gemlinkofficial/electrum-client-ts
```

## Usage

```js
import { ElectrumClient } from "@gemlinkofficial/electrum-client-ts";
async function main() {
  const client = new ElectrumClient("electrum.bitaroo.net", 50002, "ssl");

  try {
    await client.connect(
      "electrum-client-js", // optional client name
      "1.4.2" // optional protocol version
    );

    const header = await client.blockchain_headers_subscribe();
    console.log("Current header:", header);

    await client.close();
  } catch (err) {
    console.error(err);
  }
}

main();
```

See more [examples](example/).


[Electrum Protocol]: https://electrumx.readthedocs.io/en/latest/protocol.html
[Electrum Protocol methods]: https://electrumx.readthedocs.io/en/latest/protocol-methods.html
[ElectrumX Server]: https://electrumx.readthedocs.io/en/latest/

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