import { ErrorResponse, SubscriptionResponse, SuccessResponse } from "frontblock-generic/Service"; import { Coin, Transaction, Account } from "frontblock-generic/Types"; export declare class Payment { readonly dollarValue: number; readonly amount: number; readonly currency: C; readonly sendTo: Account; received: number; readonly createdAt: Date; updatedAt: Date; readonly paymentID: string; status: PaymentStatus; transactions: Transaction[]; error?: string; constructor(dollarValue: number, amount: number, currency: C, sendTo: Account, received?: number, createdAt?: Date, updatedAt?: Date, paymentID?: string); addTransaction(tx: Transaction): void; } export declare type PaymentStatus = "Created" | "Pending" | "Completed" | "Expired" | "Underpaid" | "Overpaid" | "Resolved" | "Canceled" | "Other (See error field)" | "Finalized"; export interface PaymentService { createUsdValuePayment(currency: C, amount: number): Promise | ErrorResponse>; createCryptoPayment(currency: C, amount: number): Promise | ErrorResponse>; getPayment(paymentID: string | Payment): Promise | ErrorResponse>; cancelPayment(paymentID: string | Payment): Promise; resolvePayment(paymentID: string | Payment): Promise; finalizePayment(paymentID: string | Payment): Promise; streamPayments(callback: (payment: Payment) => void): Promise; cancelStream(uid: string | SubscriptionResponse): Promise; }