Node.js Module
The@credo-ts/node package provides Node.js-specific dependencies and utilities for running Credo agents on Node.js platforms.
Installation
Requires Node.js version 20.19 or higher.
What It Provides
The Node module exports:- agentDependencies - Platform-specific dependencies for Node.js
- DidCommHttpInboundTransport - HTTP transport for DIDComm messages
- DidCommWsInboundTransport - WebSocket transport for DIDComm messages
- NodeFileSystem - File system implementation for Node.js
- NodeKeyManagementService - Key management for Node.js
Usage
Transport Configuration
For DIDComm-based applications, you can configure HTTP and WebSocket transports:Platform Dependencies
TheagentDependencies object includes:
- FileSystem: Node.js file system implementation
- fetch: Native fetch API
- EventEmitterClass: Node.js EventEmitter
- WebSocketClass: ws library WebSocket implementation
See Also
- React Native Module - React Native platform support
- Platform Setup Guide - Platform-specific configuration
- Agent Configuration - General agent configuration