# @hazae41/cadenas

> Zero-copy TLS protocol for the web

Latest version **0.4.2** (published 2024-09-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @hazae41/cadenas
pnpm add @hazae41/cadenas
yarn add @hazae41/cadenas
bun add @hazae41/cadenas
```

## 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.4.2 |
| Published | 2024-09-01 |
| First published | 2023-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 10 |
| Unpacked size | 2.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | hazae41 |
| Maintainers | hazae41 |
| Keywords | tls, protocol, browser, packets, crypto, cryptography, webassembly, security, encryption, ed25519, rsa, hashing, sha256, sha1, hmac, typescript, esmodules, tested, unit-tested |

## Links

- npm: https://www.npmjs.com/package/@hazae41/cadenas
- Repository: https://github.com/hazae41/cadenas
- Issues: https://github.com/hazae41/cadenas/issues
- npm.io page: https://npm.io/package/@hazae41/cadenas

## Dependencies (10)

- [@hazae41/asn1](https://npm.io/package/@hazae41/asn1.md) ^1.3.31
- [@hazae41/x509](https://npm.io/package/@hazae41/x509.md) ^1.2.10
- [@hazae41/bytes](https://npm.io/package/@hazae41/bytes.md) ^1.2.11
- [@hazae41/base16](https://npm.io/package/@hazae41/base16.md) ^1.0.18
- [@hazae41/binary](https://npm.io/package/@hazae41/binary.md) ^1.3.5
- [@hazae41/cursor](https://npm.io/package/@hazae41/cursor.md) ^1.2.4
- [@hazae41/future](https://npm.io/package/@hazae41/future.md) ^1.0.3
- [@hazae41/option](https://npm.io/package/@hazae41/option.md) ^1.1.3
- [@hazae41/cascade](https://npm.io/package/@hazae41/cascade.md) ^2.2.2
- [@hazae41/ed25519](https://npm.io/package/@hazae41/ed25519.md) ^2.1.19

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 0.4.2 (latest) — 2024-09-01
- 0.4.1 — 2024-09-01
- 0.4.0 — 2024-03-29
- 0.3.31 — 2024-03-27
- 0.3.30 — 2024-03-14
- 0.3.29 — 2024-03-14
- 0.3.28 — 2024-03-14
- 0.3.27 — 2024-03-12
- 0.3.26 — 2024-03-11
- 0.3.25 — 2024-03-11
- 0.3.24 — 2024-03-11
- 0.3.23 — 2024-03-10
- 0.3.22 — 2024-03-10
- 0.3.21 — 2024-03-10
- 0.3.20 — 2024-03-10
- … 117 more at https://npm.io/package/@hazae41/cadenas/versions

## README

<div align="center">
<img src="https://user-images.githubusercontent.com/4405263/219942873-3a630e9e-07c0-405a-99c5-e85f8f32bfc1.png" />
</div>

```bash
npm i @hazae41/cadenas
```

[**Node Package 📦**](https://www.npmjs.com/package/@hazae41/cadenas)

## DO NOT USE

This is experimental software in early development

1. It has security issues
2. Things change quickly

## Features

### Current features
- 100% TypeScript and ESM
- Zero-copy reading and writing
- Transport agnostic (HTTP, WebSocket)
- WebStreams based backpressure
- [Common CA Database](https://www.ccadb.org/) certificates
- TLS 1.2

### [Upcoming Features](https://github.com/sponsors/hazae41)
- TLS 1.3
- Zero RTT

## Usage

```typescript
import { TlsClientDuplex, Ciphers } from "@hazae41/cadenas"

function encrypt(tcp: ReadableWritablePair<Opaque, Writable>): ReadableWritablePair<Opaque, Writable> {
  const ciphers = [Ciphers.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384]
  const tls = new TlsClientDuplex({ host_name: "example.com", ciphers })

  tcp.readable.pipeTo(tls.inner.writable).catch(() => {})
  tls.inner.readable.pipeTo(tcp.writable).catch(() => {})

  return tls.outer
}
```

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