/// /// import * as Web3 from 'web3'; import { BigNumber } from 'bignumber.js'; import { TransactionResult } from 'truffle-contract'; import ChannelEthContract from './ChannelEthContract'; import ChannelTokenContract from './ChannelTokenContract'; import Signature from './Signature'; import ChannelId from './ChannelId'; import IChannelsDatabase from './storage/IChannelsDatabase'; import Payment from './payment'; export declare type Channel = [string, string, BigNumber, BigNumber, BigNumber]; export declare type ChannelWithTokenContract = [string, string, BigNumber, BigNumber, BigNumber, string]; export declare type ChannelFromContract = Channel | ChannelWithTokenContract | undefined; export default class ChannelContract { channelEthContract: ChannelEthContract; channelTokenContract: ChannelTokenContract; channelsDao: IChannelsDatabase; constructor(web3: Web3, channelsDao: IChannelsDatabase, channelEthContract: ChannelEthContract, channelTokenContract: ChannelTokenContract); open(sender: string, receiver: string, value: BigNumber, settlementPeriod: number | BigNumber, channelId?: ChannelId | string, tokenContract?: string): Promise; claim(receiver: string, channelId: string, value: BigNumber, signature: Signature): Promise; deposit(sender: string, channelId: string, value: BigNumber, tokenContract?: string): Promise; getState(channelId: string): Promise; getSettlementPeriod(channelId: string): Promise; startSettle(account: string, channelId: string): Promise; finishSettle(account: string, channelId: string): Promise; paymentDigest(channelId: string, value: BigNumber): Promise; canClaim(payment: Payment): Promise; channelById(channelId: string): Promise; getContractByChannelId(channelId: string): Promise; }