-
Notifications
You must be signed in to change notification settings - Fork 234
Expand file tree
/
Copy pathservices.ts
More file actions
24 lines (21 loc) · 920 Bytes
/
Copy pathservices.ts
File metadata and controls
24 lines (21 loc) · 920 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { Invoice } from './invoice'
import { Pubkey } from './base'
import { WoTSettings } from './settings'
export interface IMaintenanceService {
clearOldEvents(): Promise<void>
}
export interface IPaymentsService {
getInvoiceFromPaymentsProcessor(invoice: string | Invoice): Promise<Partial<Invoice>>
createInvoice(pubkey: Pubkey, amount: bigint, description: string): Promise<Invoice>
updateInvoice(invoice: Partial<Invoice>): Promise<void>
updateInvoiceStatus(invoice: Pick<Invoice, 'id' | 'status'>): Promise<Invoice>
confirmInvoice(invoice: Pick<Invoice, 'id' | 'amountPaid' | 'confirmedAt' | 'status' | 'pubkey'>): Promise<void>
sendInvoiceUpdateNotification(invoice: Invoice): Promise<void>
getPendingInvoices(): Promise<Invoice[]>
}
export interface IWotService {
buildGraph(settings: WoTSettings): Promise<void>
isTrusted(pubkey: string): boolean
isReady(): boolean
reset(): void
}