import Payment from './payment' ; import * as BigNumber from 'bignumber.js' ; import ChannelId from './ChannelId' ; import { EventEmitter } from 'events' ; import { TransactionResult } from 'truffle-contract' ; import { PaymentChannel } from './PaymentChannel' ; import { RemoteChannelInfo } from './RemoteChannelInfo' ; export default interface IChannelManager extends EventEmitter { openChannel ( sender , receiver , amount , minDepositAmount ? , channelId ? , tokenContract ? ) : Promise < PaymentChannel > ; closeChannel ( channelId ) : Promise < TransactionResult > ; deposit ( channelId , value ) : Promise < TransactionResult > ; nextPayment ( channelId , amount , meta ) : Promise < Payment > ; spendChannel ( payment , token ? ) : Promise < Payment > ; acceptPayment ( payment ) : Promise < string > ; requireOpenChannel ( sender , receiver , amount , minDepositAmount ? , tokenContract ? ) : Promise < PaymentChannel > ; channels ( ) : Promise < PaymentChannel [ ] > ; openChannels ( ) : Promise < PaymentChannel [ ] > ; settlingChannels ( ) : Promise < PaymentChannel [ ] > ; channelById ( channelId ) : Promise < PaymentChannel | null > ; verifyToken ( token ) : Promise < boolean > ; syncChannels ( sender , receiver , remoteChannels ) : Promise < void > ; lastPayment ( channelId ) : Promise < Payment | null > ; }