0.0.6 • Published 1 year ago

intoto-deserializer v0.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Intoto Deserializer Package

Description

Intoto Deserializer Package is a NPM package written in typescript that provides a deserializer for the intoto apparatus binary format. The deserializer converts the binary packet into a JSON object to be easier to work with.

Installation

npm install intoto-deserializer

Usage

import { deserialize } from 'intoto-deserializer';

const binary: Buffer;
const json = deserialize(binary);

console.log(json);

// Example output:
// {
//   "serial": "IN000000",
//   "firmware: "1.0.0",
//   "topic": "data,
//   "packets": [
//      {
//         "date": "2022-12-05T21:11:17Z",
//         "internals": [
//              21.014480590820312,
//              1015.6759033203125,
//              45.13324737548828
//         ],
//         "battery": -1,
//         "sensor": [
//              -1,
//              -1,
//              -1,
//              -1
//         ],
//       }
//    ],
//  }
0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

0.0.0

1 year ago