Skip to main content

Overview

The Network class represents a blockchain network configuration including Indexer and Validator endpoints, chain ID, and denomination settings.

Static Methods

Network.staging()

Returns a pre-configured Network instance for the staging/testnet environment.
Returns: Network - Staging network configuration
Use Network.staging() for development and testing with test tokens.

Network.mainnet()

Returns a pre-configured Network instance for the production mainnet environment.
Returns: Network - Mainnet network configuration
Mainnet uses real assets. Always test thoroughly on staging first.

Constructor

Create a custom Network instance with your own configuration.

Parameters

string
required
The blockchain chain identifier (e.g., "lfg-mainnet-1", "lfg-staging-1")
IndexerConfig
required
Configuration for the Indexer client endpoints
ValidatorConfig
required
Configuration for the Validator client endpoints

Example

Properties

chainId

The blockchain chain identifier.

indexerConfig

The IndexerConfig instance for this network.

validatorConfig

The ValidatorConfig instance for this network.

Usage Examples

Connect to Staging

Connect to Mainnet

Environment-Based Configuration

IndexerConfig

Indexer endpoint configuration

ValidatorConfig

Validator endpoint configuration

CompositeClient

Main client using Network configuration

Configuration Guide

Detailed configuration guide