import { MasterNodeKey } from '@defichain/jellyfish-network'; import { DockerOptions } from 'dockerode'; import { StartOptions } from '../DeFiDContainer'; import { RegTestContainer } from './index'; import { NativeChainWaitFor } from '../../index'; /** * RegTest with MasterNode preconfigured */ export declare class MasterNodeRegTestContainer extends RegTestContainer { readonly masternodeKey: MasterNodeKey; waitFor: NativeChainWaitFor; /** * @param {string} [masternodeKey=RegTestFoundationKeys[0]] pair to use for minting * @param {string} [image=DeFiDContainer.image] docker image name * @param {DockerOptions} [options] */ constructor(masternodeKey?: MasterNodeKey, image?: string, options?: DockerOptions); /** * Additional debug options turned on for traceability. */ protected getCmd(opts: StartOptions): string[]; /** * @param {number} nblocks to generate * @param {string} address to generate to * @param {number} maxTries */ generate(nblocks: number, address?: string, maxTries?: number): Promise; /** * @param {number} nblocks to generate * @param {number} timeout * @param {string} address */ waitForGenerate(nblocks: number, timeout?: number, address?: string): Promise; /** * This will automatically import the necessary private key for master to mint tokens */ start(startOptions?: StartOptions): Promise; /** * Wait for block height by minting towards the target * * @param {number} height to wait for * @param {number} [timeout=590000] in ms */ waitForBlockHeight(height: number, timeout?: number): Promise; /** * Wait for master node wallet coin to be mature for spending. * * A coinbase transaction must be 100 blocks deep before you can spend its outputs. This is a * safeguard to prevent outputs that originate from the coinbase transaction from becoming * un-spendable (in the event the mined block moves out of the active chain due to a fork). * * @param {number} [timeout=180000] in ms * @param {boolean} [mockTime=true] to generate blocks faster */ waitForWalletCoinbaseMaturity(timeout?: number, mockTime?: boolean): Promise; /** * Wait for in wallet balance to be greater than an amount. * This allow test that require fund to wait for fund to be filled up before running the tests. * This method will trigger block generate to get to the required balance faster. * Set `timeout` to higher accordingly when large balance required. * * @param {number} balance to wait for in wallet to be greater than or equal * @param {number} [timeout=300000] in ms * @see waitForWalletCoinbaseMaturity */ waitForWalletBalanceGTE(balance: number, timeout?: number): Promise; /** * Wait for anchor teams * * @param {number} nodesLength * @param {number} [timeout=30000] in ms * @return {Promise} */ waitForAnchorTeams(nodesLength: number, timeout?: number): Promise; /** * Wait for anchor auths * * @param {number} nodesLength * @param {number} [timeout=30000] in ms * @return {Promise} */ waitForAnchorAuths(nodesLength: number, timeout?: number): Promise; /** * Wait for anchor reward confirms * * @param {number} [timeout=30000] in ms * @return {Promise} */ waitForAnchorRewardConfirms(timeout?: number): Promise; /** * Wait for price become valid * * @param {string} fixedIntervalPriceId * @param {number} [timeout=30000] in ms * @return {Promise} */ waitForPriceValid(fixedIntervalPriceId: string, timeout?: number): Promise; /** * Wait for price become invalid * * @param {string} fixedIntervalPriceId * @param {number} [timeout=30000] in ms * @return {Promise} */ waitForPriceInvalid(fixedIntervalPriceId: string, timeout?: number): Promise; /** * Wait for valut state * * @param {string} vaultId * @param {string} state * @param {number} [timeout=30000] in ms * @return {Promise} */ waitForVaultState(vaultId: string, state: string, timeout?: number): Promise; /** * Get next price block before the given target block * * @param {string} fixedIntervalPriceId * @param {number} [targetBlock] * @return {Promise} */ getImmediatePriceBlockBeforeBlock(fixedIntervalPriceId: string, targetBlock: number): Promise; /** * Wait for active price * * @param {string} fixedIntervalPriceId * @param {string} activePrice * @param {number} [timeout=30000] in ms * @return {Promise} */ waitForActivePrice(fixedIntervalPriceId: string, activePrice: string, timeout?: number): Promise; /** * Wait for next price * * @param {string} fixedIntervalPriceId * @param {string} nextPrice * @param {number} [timeout=30000] in ms * @return {Promise} */ waitForNextPrice(fixedIntervalPriceId: string, nextPrice: string, timeout?: number): Promise; /** * Fund an address with an amount and wait for 1 confirmation. * Funded address don't have to be tracked within the node wallet. * This allows for light wallet implementation testing. * * @param {string} address to fund * @param {number} amount to fund an address, take note of number precision issues, BigNumber not included in pkg. * @return {Promise<{txid: string, vout: number}>} txid and index of the transaction * @see waitForWalletCoinbaseMaturity * @see waitForWalletBalanceGTE */ fundAddress(address: string, amount: number): Promise<{ txid: string; vout: number; }>; /** * Create a new bech32 address and get the associated priv key for it. * The address is created in the wallet and the priv key is dumped out. * This is to facilitate raw tx feature testing, if you need an address that is not associated with the wallet, * use jellyfish-crypto instead. * * This is not a deterministic feature, each time you run this, you get a different set of address and keys. * * @return {Promise<{ address: string, privKey: string, pubKey: string }>} a new address and it's associated privKey */ newAddressKeys(): Promise<{ address: string; privKey: string; pubKey: string; }>; } //# sourceMappingURL=Masternode.d.ts.map