import * as BigNumber from 'bignumber.js'; import { PaymentChannel } from '../PaymentChannel'; import ChannelId from '../ChannelId'; export default interface IChannelsDatabase { save(paymentChannel: PaymentChannel): Promise; saveOrUpdate(paymentChannel: PaymentChannel): Promise; deposit(channelId: ChannelId | string, value: BigNumber.BigNumber): Promise; firstById(channelId: ChannelId | string): Promise; spend(channelId: ChannelId | string, spent: BigNumber.BigNumber): Promise; all(): Promise>; allOpen(): Promise; allSettling(): Promise; findUsable(sender: string, receiver: string, amount: BigNumber.BigNumber): Promise; findBySenderReceiver(sender: string, receiver: string): Promise>; findBySenderReceiverChannelId(sender: string, receiver: string, channelId: ChannelId | string): Promise; updateState(channelId: ChannelId | string, state: number): Promise; updateSettlingUntil(channelId: ChannelId | string, settlingUntil: BigNumber.BigNumber): Promise; }