pamoja

Reference

TypeScript reference#

Every @pamoja package, generated by typedoc from this commit. Each row below opens a package's API pages, and the same capability in the other three languages is one step away.

Each capability is its own package, so an import names the capability it uses, and the page for each package lists its classes, functions, and types. pamoja bundles all of them.

Each package is hand-written TypeScript over @pamoja/native, the compiled engine and its generated napi-rs contract, which stays importable for anything the facades do not cover.

By domain#

Six of the chapters hold more than one capability, and each is a package of its own on npm, @pamoja/<domain>, which brings its capabilities in and re-exports each under its own name:

npm install @pamoja/field-io
Sensing and actuation@pamoja/sensing

Sensor drivers, Actuator drivers

npm install @pamoja/sensing
Radio and reach@pamoja/radio

LoRa airtime, LoRaWAN, Mesh frames, Routing

npm install @pamoja/radio
Trust and operation@pamoja/trust

Audit log, Secured session, Signed updates, Power, Telemetry

npm install @pamoja/trust
npm install @pamoja/transports
Profiles and robotics@pamoja/profiles

Device profiles, ROS 2 rules, Zenoh keys

npm install @pamoja/profiles

Every package#

One row per capability: the install line, the package and its reference, the guide with the worked example, and the same capability on the other three reference pages, one step away.

Engine#

Engine surface@pamoja/core

The transport every link shares (send, receive, subscribe, and a faulty wrapper for tests) and the runtime version

npm install @pamoja/core

Identity#

Device identity@pamoja/security

ed25519 device identity: sign a reading and verify it, so a gateway can prove it is authentic

npm install @pamoja/security

Codecs#

Codecs@pamoja/codec

CBOR, JSON, and raw codecs behind one trait, delta and varint batch packing, and an f32 quantizer for metered links

npm install @pamoja/codec

Helpers#

Helpers@pamoja/kit

Plain-language helper math: smoothing, calibration, PID and thermostat control, trend and surge prediction, rolling windows, kinematics, and geo

npm install @pamoja/kit

Field I/O#

Serial framing@pamoja/serial

SLIP and COBS byte stuffing with streaming decoders, so a UART byte stream carries discrete packets

npm install @pamoja/serial
Modbus RTU@pamoja/modbus

Modbus RTU requests and replies with CRC-16/MODBUS for RS485 field devices

npm install @pamoja/modbus
CAN and J1939@pamoja/can

CAN 2.0 and CAN-FD frames with 11- and 29-bit identifiers, plus J1939 decode and compose

npm install @pamoja/can
I2C, SPI, and GPIO@pamoja/gpio

I2C address frames with reserved-range checks, the four SPI clock modes, and active-high or active-low pins

npm install @pamoja/gpio

Sensing and actuation#

Sensor drivers@pamoja/sensors

Datasheet-anchored decoders for eleven parts: the BME280, BMP280, DS18B20, HDC1080, INA219, INA226, ADS1115, OPT3001, SCD4x, SHT3x, and TMP117

npm install @pamoja/sensors
Actuator drivers@pamoja/actuators

PCA9685 PWM and servo pulses, and stepper coil sequencing

npm install @pamoja/actuators

Radio and reach#

LoRa airtime@pamoja/lora

Time-on-air, duty-cycle off-time, and the regional channel plans a LoRa node must keep to

npm install @pamoja/lora
LoRaWAN@pamoja/lorawan

LoRaWAN 1.0.x MAC framing, AES-CMAC and AES encryption, and both halves of the OTAA join

npm install @pamoja/lorawan
Mesh frames@pamoja/mesh

Addressed, hop-limited, CRC-checked frames and duplicate suppression that floods a packet exactly once

npm install @pamoja/mesh
Routing@pamoja/routing

Reverse-path routing that learns the cheapest route from overheard traffic

npm install @pamoja/routing

Trust and operation#

Audit log@pamoja/audit

A tamper-evident, hash-chained log; altering, reordering, or dropping a record breaks verification

npm install @pamoja/audit
Secured session@pamoja/session

X25519 key agreement, HKDF, and ChaCha20-Poly1305 with an anti-replay window, with no TLS stack

npm install @pamoja/session
Signed updates@pamoja/update

Signed firmware manifests, streaming image verification, and A/B slots that fall back on their own

npm install @pamoja/update
Power@pamoja/power

Duty cycling and an energy-aware governor that stretches work as the battery drains

npm install @pamoja/power
Telemetry@pamoja/telemetry

Observability that ships only what is worth the bytes as link cost rises, while counting everything

npm install @pamoja/telemetry

Transports and testing#

MQTT@pamoja/mqtt

An MQTT client with the topic and wildcard rules, as the core transport

npm install @pamoja/mqtt
CoAP@pamoja/coap

A CoAP client over UDP with confirmable delivery and observe

npm install @pamoja/coap
Loopback@pamoja/loopback

An in-process transport with topic matching and a fault injector, for testing with no broker

npm install @pamoja/loopback
Store and forward@pamoja/sync

Offline-first queues: in memory, and a crash-safe on-disk queue that survives power loss

npm install @pamoja/sync
Transport ladder@pamoja/ladder

Cheapest reachable link first, buffering to a store when every link is down

npm install @pamoja/ladder
Event bus@pamoja/bus

An in-memory typed publish and subscribe event bus

npm install @pamoja/bus
Simulators@pamoja/sim

Noisy and replay sensors, a recording actuator, and a simulated robot that dead-reckons its pose

npm install @pamoja/sim

Profiles and robotics#

Device profiles@pamoja/profile

Named, ready-to-run device profiles from plain data or a JSON manifest

npm install @pamoja/profile
ROS 2 rules@pamoja/ros2

ROS 2 names, RIHS01 type hashes, CDR encoding, and rmw_zenoh key assembly, with no ROS 2 installed

npm install @pamoja/ros2
Zenoh keys@pamoja/zenoh

Zenoh key expressions: validity, canonical form, and wildcard matching

npm install @pamoja/zenoh

Edit this page on GitHub