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:
@pamoja/field-ionpm install @pamoja/field-io@pamoja/sensingnpm install @pamoja/sensing@pamoja/radionpm install @pamoja/radio@pamoja/trustnpm install @pamoja/trust@pamoja/transportsnpm install @pamoja/transports@pamoja/profilesnpm install @pamoja/profilesEvery 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#
@pamoja/coreA sensor and an actuator pamoja has never heard of, written against the core traits, run against a rule, and published with nothing plugged in
npm install @pamoja/core@pamoja/coreThe transport every link shares (send, receive, subscribe, and a faulty wrapper for tests) and the runtime version
npm install @pamoja/core@pamoja/coreA link pamoja does not ship, written in your language against the transport contract and composed like any other
npm install @pamoja/coreIdentity#
@pamoja/securityed25519 device identity: sign a reading and verify it, so a gateway can prove it is authentic
npm install @pamoja/securityCodecs#
@pamoja/codecCBOR, JSON, and raw codecs behind one trait, and batch packing for metered links: delta and varint for integers, and a quantizer for f32 readings
npm install @pamoja/codecHelpers#
@pamoja/kitPlain-language helper math: smoothing, calibration, PID and thermostat control, a trigger with hysteresis, trend and surge prediction, rolling windows, unit conversions, geo, and robot motion
npm install @pamoja/kitField I/O#
@pamoja/serialSLIP and COBS byte stuffing with streaming decoders, so a UART byte stream carries discrete packets
npm install @pamoja/serial@pamoja/modbusModbus RTU for RS485 field devices: a client that polls them over a serial port with the line's timing, simulated devices that answer as real ones do, and the frames with their CRC-16/MODBUS
npm install @pamoja/modbus@pamoja/canCAN 2.0 and CAN FD frames with 11- and 29-bit identifiers, J1939 decode and compose, and a node on a bus, simulated or a Linux interface through SocketCAN
npm install @pamoja/can@pamoja/gpioI2C address frames with reserved-range checks, the four SPI clock modes, active-high or active-low switches and contacts, and GPIO lines opened on a Linux board
npm install @pamoja/gpio@pamoja/halThe embedded-hal traits every driver takes, a bit-banged 1-Wire bus, simulated parts and scripted buses that stand in for hardware, the Linux backends over i2c-dev, spidev, and the GPIO character device, one I2C bus and one serial port a program and its drivers share, and delays that sleep or only count
npm install @pamoja/halSensing and actuation#
@pamoja/sensorsDatasheet-anchored drivers for eleven parts, from every language: the BME280, BMP280, DS18B20, HDC1080, INA219, INA226, ADS1115, OPT3001, SCD4x, SHT3x, and TMP117
npm install @pamoja/sensors@pamoja/actuatorsA PCA9685 driver for servos, LEDs, and valves, and stepper drivers for four coil lines or a step and direction chip, in every language
npm install @pamoja/actuatorsRadio and reach#
@pamoja/loraTime-on-air, duty-cycle off-time, the regional channel plans a LoRa node must keep to, and the link budget that sets its range
npm install @pamoja/lora@pamoja/lorawanLoRaWAN 1.0.x MAC framing, AES-CMAC and AES encryption, and both halves of the OTAA join
npm install @pamoja/lorawan@pamoja/radiosThe Semtech SX126x and SX127x LoRa radios and the SX1302 and SX1303 gateway concentrators: their commands, registers, and decoders, the amplifier setting a regional EIRP ceiling allows, a duty-cycle guard, and simulated chips that stand in for a module
npm install @pamoja/radios@pamoja/gatewayWhat a LoRaWAN gateway speaks: the Semtech packet forwarder protocol and the Basics Station protocol on both sides, the network side of a single site, and a bridge from the radio to the link that leaves it
npm install @pamoja/gateway@pamoja/meshAddressed, hop-limited, CRC-checked frames and duplicate suppression that floods a packet exactly once
npm install @pamoja/meshnpm install @pamoja/routingMAVLink#
@pamoja/mavlinkMAVLink v1 and v2 framing, signing, named message fields and enum values, and the mission, command, and offboard protocols
npm install @pamoja/mavlinkTrust and operation#
@pamoja/auditA tamper-evident, hash-chained log; altering, reordering, or dropping a record breaks verification
npm install @pamoja/audit@pamoja/sessionX25519 key agreement, HKDF, and ChaCha20-Poly1305 with an anti-replay window, with no TLS stack
npm install @pamoja/session@pamoja/updateSigned firmware manifests, streaming image verification, and A/B slots that fall back on their own
npm install @pamoja/update@pamoja/powerDuty cycling and an energy-aware governor that stretches work as the battery drains and holds its mode against a wandering charge
npm install @pamoja/power@pamoja/telemetryObservability that ships only what is worth the bytes as link cost rises, while counting everything
npm install @pamoja/telemetryTransports and testing#
@pamoja/mqttAn MQTT client with the topic and wildcard rules, acknowledged delivery, retained messages, a last will, and TLS, as the core transport
npm install @pamoja/mqtt@pamoja/coapA CoAP client and the server it reports to, over UDP, with confirmable delivery and observe
npm install @pamoja/coap@pamoja/loopbackAn in-process transport with topic matching, a fault injector, and outages on demand, for testing with no broker
npm install @pamoja/loopback@pamoja/syncOffline-first queues in memory or on disk, bounded or not, the on-disk one surviving power loss, and the drain that forwards them in order when a link returns
npm install @pamoja/sync@pamoja/ladderCheapest reachable link first, buffering to a store when every link is down
npm install @pamoja/ladder@pamoja/busAn in-memory typed publish and subscribe event bus, with publishers that never wait and subscribers that count what they miss
npm install @pamoja/bus@pamoja/simNoisy and replay sensors, a recording actuator, a simulated robot that dead-reckons its pose, and a link that loses sends on a pattern
npm install @pamoja/simProfiles and robotics#
@pamoja/profileNamed, ready-to-run device profiles from plain data or a JSON manifest, run as a node in every language
npm install @pamoja/profile@pamoja/profileRules between nodes as a file: a condition over one node's topic with hysteresis, and the actions that drive another node's actuator or publish, run by an engine off any link in every language, or judged reading by reading
npm install @pamoja/profile@pamoja/kitWheel speeds for differential, skid-steer, car-like, and mecanum chassis, a two-link arm and Denavit-Hartenberg forward kinematics, odometry, waypoint guidance, a safety gate, and servo, ESC, and encoder conversions
npm install @pamoja/kit@pamoja/ros2ROS 2 names, RIHS01 type hashes, CDR encoding, and rmw_zenoh key assembly, with no ROS 2 installed
npm install @pamoja/ros2@pamoja/zenohZenoh key expressions: validity, canonical form, matching, and whether two expressions share or cover keys
npm install @pamoja/zenoh