EnvVarRemoteTestEnvironment
For the complete documentation index, see llms.txt
@midnight-ntwrk/testkit-js v4.0.4
Test environment that configures services using environment variables. Allows specifying custom endpoints through environment variables.
Extends
Constructors
Constructor
new EnvVarRemoteTestEnvironment(
logger):EnvVarRemoteTestEnvironment
새 TestEnvironment 인스턴스를 생성합니다.
Parameters
logger
Logger
작업 기록용 Logger 인스턴스
Returns
EnvVarRemoteTestEnvironment
Inherited from
RemoteTestEnvironment.constructor
Methods
getEnvironmentConfiguration()
getEnvironmentConfiguration():
EnvironmentConfiguration
Returns the configuration for environment services based on environment variables. Required environment variables:
- MN_TEST_NETWORK_ID: 네트워크 식별자 (e.g., 'testnet', 'devnet')
- MN_TEST_INDEXER: GraphQL API endpoint for the indexer
- MN_TEST_INDEXER_WS: WebSocket endpoint for the indexer
- MN_TEST_NODE: RPC endpoint for the blockchain node Optional environment variables:
- MN_TEST_FAUCET: API endpoint for requesting test tokens
Returns
Object containing service URLs from environment variables
Throws
If any required environment variable is not set
Overrides
RemoteTestEnvironment.getEnvironmentConfiguration
getMidnightWalletProvider()
getMidnightWalletProvider():
Promise<MidnightWalletProvider>
단일 지갑 인스턴스를 시작합니다.
Returns
Promise<MidnightWalletProvider>
A promise that resolves to the started wallet
Throws
If no wallet could be started
Inherited from
RemoteTestEnvironment.getMidnightWalletProvider
healthCheck()
healthCheck():
Promise<void>
Performs a health check for the environment. Checks the health of the node, indexer, and optionally the faucet services.
Returns
Promise<void>
A promise that resolves when the health check is complete.
Inherited from
RemoteTestEnvironment.healthCheck
shutdown()
shutdown(
saveWalletState?):Promise<void>
Shuts down the test environment by closing all walletProviders and stopping the proof server.
Parameters
saveWalletState?
boolean
Returns
Promise<void>
Inherited from
RemoteTestEnvironment.shutdown
start()
start(
maybeProofServerContainer?):Promise<EnvironmentConfiguration>
Starts the test environment by initializing the proof server and environment configuration.
Parameters
maybeProofServerContainer?
Optional proof server container to use instead of creating a new one
Returns
Promise<EnvironmentConfiguration>
환경 구성
Inherited from
startMidnightWalletProviders()
startMidnightWalletProviders(
amount?,seeds?):Promise<MidnightWalletProvider[]>
Creates and starts the specified number of wallet providers.
Parameters
amount?
number = 1
seeds?
string[] | undefined
Returns
Promise<MidnightWalletProvider[]>
시작된 지갑 프로바이더 배열