machinomy
Version:
Micropayments powered by Ethereum
15 lines (14 loc) • 719 B
TypeScript
import * as BigNumber from 'bignumber.js';
import ChainManager from './ChainManager';
import { PaymentChannel } from './PaymentChannel';
import Payment from './payment';
import ChannelContract from './ChannelContract';
import MachinomyOptions from './MachinomyOptions';
export default class PaymentManager {
private chainManager;
private channelContract;
private options;
constructor(chainManager: ChainManager, channelContract: ChannelContract, options: MachinomyOptions);
buildPaymentForChannel(channel: PaymentChannel, price: BigNumber.BigNumber, totalValue: BigNumber.BigNumber, meta: string): Promise<Payment>;
isValid(payment: Payment, paymentChannel: PaymentChannel): Promise<boolean>;
}