# @node-wot/core

> W3C Web of Things (WoT) Servient framework

Latest version **0.9.2** (published 2026-01-26) · EPL-2.0 OR W3C-20150513 license · 0 weekly downloads

## Install

```sh
npm install @node-wot/core
pnpm add @node-wot/core
yarn add @node-wot/core
bun add @node-wot/core
```

## Health

**Score 60/100 (C)** — status: stable.

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

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

## Facts

| | |
|---|---|
| Version | 0.9.2 |
| Published | 2026-01-26 |
| First published | 2018-02-07 |
| Weekly downloads | 0 |
| License | EPL-2.0 OR W3C-20150513 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 14 |
| Unpacked size | 481 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 196 |
| Author | Eclipse Thingweb |
| Maintainers | cristiano.aguzzi, jkrhb, mkovatsc, danielpeintner, sebastiankb, h0ru5, egeko |

## Links

- npm: https://www.npmjs.com/package/@node-wot/core
- Repository: https://github.com/eclipse-thingweb/node-wot.git#master
- Homepage: https://github.com/eclipse-thingweb/node-wot/tree/master/packages/core#readme
- Issues: https://github.com/eclipse-thingweb/node-wot/issues
- npm.io page: https://npm.io/package/@node-wot/core

## Dependencies (14)

- [ajv](https://npm.io/package/ajv.md) ^8.11.0
- [cbor](https://npm.io/package/cbor.md) ^8.1.0
- [rxjs](https://npm.io/package/rxjs.md) ^5.5.11
- [uuid](https://npm.io/package/uuid.md) ^7.0.3
- [debug](https://npm.io/package/debug.md) ^4.3.4
- [ajv-formats](https://npm.io/package/ajv-formats.md) ^2.1.1
- [uritemplate](https://npm.io/package/uritemplate.md) 0.3.4
- [url-toolkit](https://npm.io/package/url-toolkit.md) 2.1.6
- [content-type](https://npm.io/package/content-type.md) ^1.0.5
- [is-absolute-url](https://npm.io/package/is-absolute-url.md) 3.0.3
- [@petamoriken/float16](https://npm.io/package/@petamoriken/float16.md) ^3.1.1
- [web-streams-polyfill](https://npm.io/package/web-streams-polyfill.md) ^4.0.0
- [@thingweb/thing-model](https://npm.io/package/@thingweb/thing-model.md) ^1.0.4
- [wot-thing-description-types](https://npm.io/package/wot-thing-description-types.md) ^1.1.0-12-March-2025

## Recent versions

- 0.9.2 (latest) — 2026-01-26
- 0.9.1 — 2025-05-12
- 0.9.0 — 2025-03-10
- 0.8.16 — 2024-08-21
- 0.8.15 — 2024-08-08
- 0.8.14 — 2024-06-11
- 0.8.13 — 2024-04-11
- 0.8.12 — 2024-01-29
- 0.8.11 — 2023-12-21
- 0.8.10 — 2023-11-13
- 0.8.9 — 2023-10-13
- 0.8.8 — 2023-09-12
- 0.8.7 — 2023-06-13
- 0.8.6 — 2023-05-05
- 0.8.5 — 2023-02-27
- … 30 more at https://npm.io/package/@node-wot/core/versions

## README

# Core of node-wot

The core of node-wot is the entry point allowing to attach dedicated bindings such as:

-   [HTTP](https://github.com/eclipse-thingweb/node-wot/blob/master/packages/binding-http)
-   [CoAP](https://github.com/eclipse-thingweb/node-wot/blob/master/packages/binding-coap)
-   ...

or to create user-specific bindings.

Current Maintainer(s): [@danielpeintner](https://github.com/danielpeintner) [@relu91](https://github.com/relu91) [@JKRhb](https://github.com/JKRhb)

### Prerequisites

-   `npm install @node-wot/core`

### Examples

see binding examples such as

-   https://github.com/eclipse-thingweb/node-wot/blob/master/packages/binding-http
-   https://github.com/eclipse-thingweb/node-wot/blob/master/packages/binding-coap

## Codecs

### Octet-Stream

The octet-stream codec enables deserialization and serialization of binary data. To encode and decode sequences of bytes, the octet-stream codec uses the following content type parameters:
| Parameter | Description | Default |
| --- | --- | --- |
| `length` | Number of bytes produced during serialization or consumed during deserialization | |
| `signed` | Signedness of the data type, `true` or `false` | `true` |
| `byteSeq` | Endianness, enum of `BIG_ENDIAN`, `LITTLE_ENDIAN`, `BIG_ENDIAN_BYTE_SWAP`, `LITTLE_ENDIAN_BYTE_SWAP` | `BIG_ENDIAN` |

Additionally, the octet-stream codec supports the data schema terms below for addressing bit-fields:
| Term | Description | Default |
| --- | --- | --- |
| `ex:bitLength` | Number of bits produced during serialization or consumed during deserialization | |
| `ex:bitOffset` | Offset in bits from the beginning of the byte sequence | `0` |

With the help of the terms and parameters above, the octet-stream codec can be used to serialize and deserialize objects containing bit-fields and sequences of bytes, like in the following example.

#### Example

To serialize the object `{ flag1: true, numberProperty: 99, stringProperty: "Web" }` to a sequence of bytes, the content type `application/octet-stream;length=4;signed=false;`, along with the following data schema can be used:

```json
{
    "type": "object",
    "properties": {
        "flag1": { "type": "boolean", "ex:bitOffset": 0, "ex:bitLength": 1 },
        "numberProperty": { "type": "integer", "ex:bitOffset": 1, "ex:bitLength": 7 },
        "stringProperty": { "type": "string", "ex:bitOffset": 8, "ex:bitLength": 24 }
    }
}
```

## More Details

See <https://github.com/eclipse-thingweb/node-wot/>

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