npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@vilic/matter-node.js

v0.5.1-alpha.0-20231005-d8f807e.1

Published

Matter protocol for node.js

Downloads

69

Readme

matter-node.js

license

Matter protocol for node.js with no native dependencies (and very limited dependencies).

This package requires Node 16+ for the required Crypto primitives

This package is meant to be used as library as basis for Node.js based implementation of Matter Device and controller functionality

A basic CLI reference implementation of a Matter Device and Controller (might be split in own package soon) is available in the matter-node.js-examples package.

For questions on how to use or pair Matter devices or controllers please refer to the base package Readme! Especially for Google special steps are needed and mostly Hub devices are needed.

Exported functionality

This library enhances Matter.js and implements the needed native functionality using Node.js 16+ as platform. The library exports the added Node.js specific implementations and also the core Matter protocol functionality as well as some helper functions as named exports. Because of this the library can be used as only dependency which makes sure the correct matter.js version is used.

For more details please refer to the API Documentation.

Node.js native enhanced exports

| Export | Description | |----------------------------------------|-----------------------------------------------------------------------------------------------------| | @project-chip/matter-node.js/crypto | Exports Crypto base functionality and Node.js specific implementation | | @project-chip/matter-node.js/net | Exports network base functionality and Node.js specific implementation | | @project-chip/matter-node.js/storage | Exports storage base functionality and Node.js specific implementation of a directory based storage | | @project-chip/matter-node.js/time | Exports Time/Timer base functionality and Node.js specific implementation | | @project-chip/matter-node.js/util | Exports Basic Utility functionality and enhance it by adding some Node.js specific functionality |

Unchanged Re-Exports from Matter.js

| Export | Description | |----------------------------------------------|----------------------------------------------------------------------------------| | @project-chip/matter-node.js | Re-Exports the API to implement a Device or a Controller. | | @project-chip/matter-node.js/certificate | Re-Exports Certificate (Root-/PAA/PAI/IAC/DA-Certificates) related functionality | | @project-chip/matter-node.js/cluster | Re-Exports Matter CLuster definitions and Default Cluster-Handlers | | @project-chip/matter-node.js/codec | Re-Exports Codecs for e.g. Matter-Messages | | @project-chip/matter-node.js/common | Re-Exports certain common functionalities | | @project-chip/matter-node.js/datatype | Re-Exports Matter Data types | | @project-chip/matter-node.js/fabric | Re-Exports Matter-Fabric functionality | | @project-chip/matter-node.js/interaction | Re-Exports Matter Interaction protocol functionality | | @project-chip/matter-node.js/log | Re-Exports Logging functionality (based on "console") | | @project-chip/matter-node.js/math | Re-Exports Math functionality used by Matter | | @project-chip/matter-node.js/mdns | Re-Exports Basic MDNS functionality (uses Network implementation) | | @project-chip/matter-node.js/model | Re-Exports a JavaScript version of the Matter data model | | @project-chip/matter-node.js/protocol | Re-Exports Basic Matter protocol functionality | | @project-chip/matter-node.js/schema | Re-Exports Schema definitions and functionality | | @project-chip/matter-node.js/securechannel | Re-Exports Secure Channel functionality | | @project-chip/matter-node.js/session | Re-Exports Session and Secure-Session functionality | | @project-chip/matter-node.js/spec | Re-Exports Matter Specification References | | @project-chip/matter-node.js/tlv | Re-Exports Matter TLV type definitions | Both exports and the typings are exported as CommonJS only!.

Typescript note

To have Typescript and your IDE know all the relevant exported functionality you need to use the following in your tsconfig.json:

{
    "compilerOptions": {
        "moduleResolution": "node16", // Required to support package.json exports
        "module": "node16" // Required to make sure all imports are js
    }
}

Building

  • npm run build: Build all code and create CommonJS and ES6 variants in dist directory. This will built incrementally and only build the changed files.
  • npm run build-clean: Clean the dist directory and build all code from scratch

Testing

  • npm run test: Run all code-side tests

Chip-Tool Certification Testing

To make sure that matter.js is compliant to the Matter specifications we implemented automated testing options by using the test suites included in chip-tool. These tests are not part of the standard test run describe above because they need prerequisites and also a lot of resources.

Please refer to the ../chip-testing folder for prerequisites and details.