Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@project-chip/matter.js
Advanced tools
[!IMPORTANT] With matter.js 0.11.0 the package structure was adjusted. This package is exposing the current API for Controller implementations (a new API will follow soon) and the Legacy Device building Node API and mainly contains compatibility re-exports. Please adjust your code to just use the relevant exports from here and switch for all other matter.js general packages to the @matter/main package.
Implementation of Matter protocol in typescript with no native dependencies (and very limited dependencies).
This is the JavaScript-only Core of the Matter protocol. It is used by other projects to implement Matter Nodes and Clients and add the relevant specific implementations for Network and other elements.
This package supports all Node.js LTS versions starting with 18.x
The following features are abstracted away to allow to be implemented environment specific:
This library exports the Matter protocol functionality as well as some helper functions as named exports:
Export | Description |
---|---|
@project-chip/matter.js | Exports the API to implement a Device or a Controller. |
@project-chip/matter.js/behavior | Exports Behavior classes (New API) as framework to implement all relevant Logic for clusters and internal logic. Contains auto-generated class structures and also Cluster default implementations. |
@project-chip/matter.js/certificate | Exports Certificate (Root-/PAA/PAI/IAC/DA-Certificates) related functionality |
@project-chip/matter.js/cluster | Exports Matter Cluster definitions and Default Cluster-Handlers |
@project-chip/matter.js/codec | Exports Codecs for e.g. Matter-Messages |
@project-chip/matter.js/common | Exports certain common functionalities |
@project-chip/matter.js/crypto | Exports Crypto related abstract functionality that needs to be implemented platform specific! |
@project-chip/matter.js/datatype | Exports Matter Data types |
@project-chip/matter.js/device | Exports Matter Device relevant classes (Legacy API!) |
@project-chip/matter.js/devices | Exports Matter Device type classes (NEW API!) |
@project-chip/matter.js/endpoint | Exports Matter Endpoint structure classes (NEW API!) |
@project-chip/matter-.js/environment | Exports environment functionalities, which handles central functions like MDNS and configuration |
@project-chip/matter.js/elements | Exports every standard Matter element defined by the Matter Object Model |
@project-chip/matter.js/fabric | Exports Matter-Fabric functionality |
@project-chip/matter.js/interaction | Exports Matter Interaction protocol functionality |
@project-chip/matter.js/log | Exports Logging functionality (based on "console") |
@project-chip/matter.js/math | Exports Math functionality used by Matter |
@project-chip/matter.js/mdns | Exports Basic MDNS functionality (uses Network implementation) |
@project-chip/matter.js/model | Exports a JavaScript version of the Matter data model |
@project-chip/matter.js/net | Exports Basic Network abstract functionality that needs to be implemented platform specific! |
@project-chip/matter.js/node | Exports Matter Node functionality which is used as basis for a device or controller (NEW API!). It also contains Matter Interaction model abstractions for the new API. |
@project-chip/matter.js/protocol | Exports Basic Matter protocol functionality |
@project-chip/matter.js/schema | Exports Schema definitions and functionality |
@project-chip/matter.js/securechannel | Exports Secure Channel functionality |
@project-chip/matter.js/session | Exports Session and Secure-Session functionality |
@project-chip/matter.js/spec | Exports Matter Specification References |
@project-chip/matter.js/storage | Exports Basic Storage abstract functionality that needs to be implemented platform specific! |
@project-chip/matter.js/tags | Exports Semantic Tag Standard namespace definitions of the Matter specification |
@project-chip/matter.js/time | Exports Basic Time/Timer abstract functionality that needs to be implemented platform specific! |
@project-chip/matter.js/tlv | Exports Matter TLV type definitions |
@project-chip/matter.js/util | Exports Basic Utility functionality |
Both exports and the typings are exported as CommonJS and ES6 modules.
For more details please refer to the API Documentation.
For more details see the main package documentation.
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
},
}
Additionally, we recommend using "strictNullChecks": true
or better for code quality "strict": true
to make sure that all types are correctly determined.
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 scratchnpm run test
: Run all testsFAQs
Matter protocol in pure js
The npm package @project-chip/matter.js receives a total of 1,649 weekly downloads. As such, @project-chip/matter.js popularity was classified as popular.
We found that @project-chip/matter.js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.