# @hoprnet/hopr-real

Latest version **1.93.8-next.1** (published 2023-07-25) · GPL-3.0-only license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @hoprnet/hopr-real
pnpm add @hoprnet/hopr-real
yarn add @hoprnet/hopr-real
bun add @hoprnet/hopr-real
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.93.8-next.1 |
| Published | 2023-07-25 |
| First published | 2022-06-03 |
| Weekly downloads | 0 |
| License | GPL-3.0-only |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=16.15 |
| Dependencies | 1 |
| Unpacked size | 23.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 260 |
| Maintainers | hopr-bot, jjperezaguinaga, robertkiel, nioni |

## Links

- npm: https://www.npmjs.com/package/@hoprnet/hopr-real
- Repository: https://github.com/hoprnet/hoprnet.git
- Homepage: https://hoprnet.org
- npm.io page: https://npm.io/package/@hoprnet/hopr-real

## Dependencies (1)

- [semver](https://npm.io/package/semver.md) 7.3.8

## Recent versions

- 1.93.8-next.1 (latest) — 2023-07-25
- 2.0.0-next.1 — 2023-05-19
- 1.93.8-next.0 — 2023-05-17
- 1.93.7 — 2023-05-16
- 1.93.7-next.2 — 2023-05-16
- 1.93.7-next.1 — 2023-05-16
- 1.93.7-next.0 — 2023-05-16
- 1.93.6 — 2023-05-15
- 1.94.0-next.68 — 2023-05-15
- 1.93.6-next.6 — 2023-05-11
- 1.93.6-next.5 — 2023-05-11
- 1.93.6-next.4 — 2023-05-11
- 1.94.0-next.67 — 2023-05-10
- 1.93.6-next.3 — 2023-05-10
- 1.94.0-next.66 — 2023-05-10
- … 550 more at https://npm.io/package/@hoprnet/hopr-real/versions

## README

This directory contains Rust WASM modules for HOPR.
Each WASM module corresponds to a Rust crate.

## Structure

The package itself consists of two parts:

- the Typescript code - mostly wrappers for JS functions that cannot be called from WASM modules (IO, sockets,...), sometimes called `REAL` - see [#3823](https://github.com/hoprnet/hoprnet/issues/3823).
- directories containing Rust crates (currently only `hopr-real`)

During build, all the Rust crates are build first using `make all` (see `Makefile` in `packages/wasm`), then the Typescript sources are built as well.

## Usage in Typescript code

Add dependency to `@hoprnet/hopr-real` to your `package.json`

```typescript
import { dummy_get_one } from '@hoprnet/hopr-real'

if (dummy_get_one() === '1') {
  console.log('It works!!')
}
```

## Testing

Each WASM module can have its own unit tests and integration tests.

- Unit tests are placed within the module file
- Integration tests are placed in `tests/` directory next to `src/`

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