MCPcopy Create free account
hub / github.com/cameri/nostream / NullPaymentsProcessor

Class NullPaymentsProcessor

src/payments-processors/null-payments-processor.ts:4–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2import { InvoiceStatus, InvoiceUnit } from '../@types/invoice'
3
4export class NullPaymentsProcessor implements IPaymentsProcessor {
5 public async getInvoice(invoiceId: string): Promise<GetInvoiceResponse> {
6 const date = new Date()
7 return {
8 id: invoiceId,
9 pubkey: '',
10 bolt11: '',
11 description: '',
12 status: InvoiceStatus.PENDING,
13 unit: InvoiceUnit.MSATS,
14 amountRequested: 0n,
15 expiresAt: date,
16 confirmedAt: null,
17 createdAt: date,
18 updatedAt: date,
19 verifyURL: '',
20 }
21 }
22
23 public async createInvoice(_request: CreateInvoiceRequest): Promise<CreateInvoiceResponse> {
24 return {
25 description: '',
26 status: InvoiceStatus.PENDING,
27 unit: InvoiceUnit.MSATS,
28 amountRequested: 0n,
29 id: '',
30 expiresAt: new Date(),
31 bolt11: '',
32 pubkey: '',
33 rawResponse: '',
34 confirmedAt: null,
35 createdAt: new Date(),
36 verifyURL: '',
37 }
38 }
39}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected