0.0.6 • Published 2 years ago
reswarm v0.0.6
reswarm-js
About
Makes publishing data to a Record Evolution Datapod incredibly easy!
Usage
CommonJS
const Reswarm = require("reswarm")
const reswarm = new Reswarm()
reswarm.publish("re.example.rpc", [{ example_data: "test" }]) // any type of data is publishableES6
For ES6 modules "type": "module" is required in your package.json
import Reswarm from "reswarm"
const reswarm = new Reswarm()
reswarm.publish("re.example.rpc", [{ example_data: "test" }]) // any type of data is publishableOptions
The Reswarm constructor can be configured with the following options:
{
quiet?: boolean;
serialNumber?: string;
}quiet: Toggles autobahn.js debug information
serialNumber: Used to set the serial_number of the device if the DEVICE_SERIAL_NUMBER environment variable does not exist. It can also be used if the user wishes to authenticate as another device.