@hsuite/smart-config
Last updated
Last updated
A powerful and flexible configuration management module for Hashgraph network applications, built on top of NestJS.
The Smart Config module provides a centralized configuration management system for Hashgraph network operations. It handles various aspects of configuration including network environments, node management, service discovery, and fee structures.
Network Environment Management
Support for testnet and mainnet environments
Public and private network configurations
Custom network settings
Local development environment support
Node Configuration
Dynamic node discovery and management
Consensus threshold calculation
Network entity configuration
Node health monitoring
Service Integration
Mirror node configuration
HTTP service integration
Utility service discovery
Fee structure management
Operator Management
Operator credentials handling
Access permission management
Operation parameter configuration
The Smart Config module can be registered asynchronously in your NestJS application:
Inject and use the SmartConfigService in your application:
The module supports various network configurations through the SmartConfigOptionsFactory
interface:
Multiple configuration strategies are available:
Factory Function
Existing Factory
Class Factory
getEnvironment()
: Get current network environment
getClientEnvironment()
: Get client environment as LedgerId
getNodes()
: Retrieve network node configurations
getUtilities()
: Get network utility services
getFees()
: Retrieve network fee structure
getIssuer()
: Get Hashgraph network issuer configuration
getOperator()
: Get client operator configuration
getMirrorNode()
: Get mirror node settings
getThreshold()
: Calculate network consensus threshold
Generate documentation using Compodoc:
Check documentation coverage:
Built with ❤️ by the HbarSuite Team Copyright © 2024 HbarSuite. All rights reserved.