TypeScript SDK
Use @net-mesh/sdk for capability discovery and invocation from Node.js.
@net-mesh/core supplies the lower-level event-bus surface.
npm install @net-mesh/sdk @net-mesh/coreChoose the entry point
NetNodeis the event bus. UseemitandsubscribeTyped.MeshNodeprovides capabilities, tools, and nRPC.
Node.js finalizers are not deterministic. Always await node.shutdown() and call
handle.close() on RPC handles so streams and native resources drain explicitly.
Follow the capability path
Protected services
Both authority surfaces live in @net-mesh/core: organization auth
(serveOrgTyped, TypedOrgClient — concepts)
and the subnet authority plane (concepts) —
mesh.serveSubnetExported(service, exportName, handler) for a provider
inside a protected subnet, org.callExported(service, req) for the caller, and
subnet.admin.* for runtime gateway administration. Named exports and trust
anchors are configured on the mesh constructor (subnetExports,
subnetAuthorities, …) and validated before the node exists. subnet:<kind>
failures classify through classifySubnetError
(reference).
The concepts match the other SDKs, while method names, lifecycle, and error shapes follow TypeScript and Node.js conventions.