import { Address, PrivateKey, SignedState, State } from '@statechannels/wallet-core'; import { providers } from 'ethers'; import { Bytes32 } from '../type-aliases'; import { ChainEventSubscriberInterface, ChainRequest, ChainServiceArgs, ChainServiceInterface, FundChannelArg } from './types'; export declare class ChainService implements ChainServiceInterface { private logger; private readonly ethWallet; private provider; private allowanceMode; private channelToEventTrackers; private nitroAdjudicator; private readonly blockConfirmations; private transactionQueue; private finalizingChannels; constructor({ provider, pk, // TODO require pk to be defined and remove if (!pk) throw (below) pollingInterval, logger, blockConfirmations, allowanceMode, }: Partial); /** * Create and send transactions for the chain requests. * @param chainRequests A collection of chain requests * @returns A collection of transaction responses for the submitted chain requests. */ handleChainRequests(chainRequests: ChainRequest[]): Promise; checkChainId(networkChainId: number): Promise; destructor(): void; private sendTransaction; fundChannel(arg: FundChannelArg): Promise; concludeAndWithdraw(finalizationProof: SignedState[]): Promise; challenge(challengeStates: SignedState[], privateKey: PrivateKey): Promise; withdraw(state: State): Promise; registerChannel(channelId: Bytes32, assets: Address[], subscriber: ChainEventSubscriberInterface): void; unregisterChannel(channelId: Bytes32): void; private checkFinalizingChannels; private addFinalizingChannel; private registerFinalizationStatus; private getFinalizedAt; private getInitialHoldings; private waitForConfirmations; private listenForAssetEvents; private onAssetEvent; private increaseAllowance; private getDepositedEvent; private getAllocationUpdatedEvent; /** * * @param appDefinition Address of state channels app * * Rejects with 'Bytecode missing' if there is no contract deployed at `appDefinition`. */ fetchBytecode(appDefinition: string): Promise; } //# sourceMappingURL=chain-service.d.ts.map