import { GenericContainer, StartedTestContainer, AbstractStartedContainer } from 'testcontainers'; import { MasterNodeKey, Network as BlockchainNetwork, NetworkName } from '@defichain/jellyfish-network'; import { RestartOptions } from 'testcontainers/dist/src/test-container'; import { NativeChainRpc } from './NativeChainRpc'; import { NativeChainWaitFor } from './NativeChainWaitFor'; import { ExecResult } from 'testcontainers/dist/src/docker/types'; /** * DeFiChain NativeChain node managed in docker */ export declare class NativeChainContainer extends GenericContainer { /** * @param {string} image docker image name */ constructor(image?: string); static get image(): string; static readonly PREFIX = "defichain-testcontainers-"; /** * Generate a name for a new docker container with network type and random number */ generateName(): string; protected blockchainNetwork: BlockchainNetwork; /** * @param networkName Blockchain network name (e.g. 'testnet') * @returns this */ withBlockchainNetwork(networkName: NetworkName): this; static readonly DefaultRpcUser = "testcontainers-user"; static readonly DefaultRpcPassword = "testcontainers-password"; protected rpcUser: string; protected rpcPassword: string; withRpcUser(rpcUser: string): this; withRpcPassword(rpcPassword: string): this; protected masterNodeKey?: MasterNodeKey; withMasterNodeKey(key: MasterNodeKey): this; withPreconfiguredRegtestMasternode(masterNodeKey?: MasterNodeKey): this; static readonly defaultCmd: { prepend: string[]; changi: string[]; testnet: string[]; regtest: string[]; mainnet: never[]; devnet: never[]; masternode: string[]; }; /** * Convenience Cmd builder */ protected generateCmd(): string[]; private readonly addedCmds; addCmd(newCmd: string): this; /** * Create container and start it immediately waiting for NativeChain to be ready */ start(): Promise; } export interface StartedContainerConfig { rpcUser: string; rpcPassword: string; blockchainNetwork: BlockchainNetwork; } export declare class StartedNativeChainContainer extends AbstractStartedContainer { private readonly config; rpc: NativeChainRpc; waitFor: NativeChainWaitFor; private _masterNodeKey?; constructor(startedTestContainer: StartedTestContainer, config: StartedContainerConfig); get rpcUser(): string; get rpcPassword(): string; get blockchainNetwork(): BlockchainNetwork; get masterNodeKey(): MasterNodeKey | undefined; withMasterNode(key: MasterNodeKey): Promise; restart(options?: Partial | undefined): Promise; /** * Set contents of ~/.defi/defi.conf * @param {string[]} options to set */ setDeFiConf(options: string[]): Promise; } //# sourceMappingURL=NativeChainContainer.d.ts.map