DefiConnect Library is a collection of shared core backend entities for microservices and shared types (interfaces). It provides a common set of data structures and interfaces that can be used across multiple services within your DefiConnect ecosystem.
You can install DefiConnect Library via npm:
npm install defi-connect-library
To use DefiConnect Library in your Node.js project, simply import the desired modules or interfaces:
- To import core entities:
import { coreEntities } from 'defi-connect-library';
- To import a specific entity use the relative path like
defi-connect-library/entities/{entityName}
, for instance:
import { UserEntity } from 'defi-connect-library/entities/user.entity';
-
Shared Core Backend Entities: Includes common data structures such as:
UserEntity
, etc., which can be used across different microservices. - Shared Types (Interfaces): Provides shared TypeScript interfaces for consistent data handling and communication between services.