# dcast

> A 1-to-1 E2E encrypted pipe over the dWeb.

Latest version **1.0.1** (published 2021-03-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install dcast
pnpm add dcast
yarn add dcast
bun add dcast
```

Provides the command `dcast`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-03-25 |
| First published | 2021-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | PeepsLabs |
| Maintainers | dwebprotocol |

## Links

- npm: https://www.npmjs.com/package/dcast
- Repository: https://github.com/dwebprotocol/dcast
- Homepage: https://dwebx.org
- Issues: https://github.com/dwebprotocol/dcast/issues
- npm.io page: https://npm.io/package/dcast

## Dependencies (4)

- [dswarm](https://npm.io/package/dswarm.md) ^1.0.0
- [streamx](https://npm.io/package/streamx.md) ^2.10.0
- [noise-peer](https://npm.io/package/noise-peer.md) ^2.1.1
- [sodium-native](https://npm.io/package/sodium-native.md) ^3.2.0

## Recent versions

- 1.0.1 (latest) — 2021-03-25
- 1.0.0 — 2021-03-04

## README

# dCast

A 1-1 end-to-end encrypted internet pipe powered by [dSwarm](https://github.com/dwebprotocol/dswarm) and Noise

```
npm install dcast
```

## Usage

``` js
const DCast = require('dcast')

// 'from satoshi' should be a somewhat unique topic used to derive a discovery key.
// to find the other side of your pipe. it's seemed with a determistic timestamp from ~+-30min for better privacy
// once the other peer is discovered it is used to derive a noise keypair as well.
const beam = new DCast('from satoshi')

// make a little chat app
process.stdin.pipe(beam).pipe(process.stdout)
```

## CLI

Part of the [dHub CLI](https://github.com/dwebprotocol/dswarm-cli)

Provided here as a standalone CLI as well.

First install it

```sh
npm install -g dcast
```

Then on one machine run

```sh
echo 'hello world' | dcast 'some topic'
```

Then on another

```sh
# will print "hello world"
dcast 'some topic'
```

That's it! Happy piping.

## API

#### `const stream = new DCast(key)`

Make a new DCast duplex stream.

Will auto connect to another peer making using the same key within ~30 min with an end to end encrypted tunnel.

When the other peer writes it's emitted as `data` on this stream.

Likewise when you write to this stream it's emitted as `data` on the other peers stream.

## License

MIT

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