Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Latest commit

 

History

History
81 lines (64 loc) · 1.76 KB

File metadata and controls

81 lines (64 loc) · 1.76 KB

API Reference

Lightning Client Methods

Create Invoice

CreateInvoice(LightMoney amount, string description, TimeSpan expiry)

Creates a new Lightning invoice.

Pay Invoice

Pay(string bolt11, PayInvoiceParams payParams)

Pays a Lightning invoice.

Get Balance

GetBalance()

Returns wallet balance information.

Service Interfaces

IFlashInvoiceService

Manages Lightning invoices:

  • CreateInvoiceAsync(amount, description, expiry)
  • GetInvoiceAsync(paymentRequest)
  • CancelInvoiceAsync(paymentHash)

IFlashPaymentService

Handles payment operations:

  • PayInvoiceAsync(paymentRequest, amount)
  • GetPaymentStatusAsync(paymentHash)

IFlashWalletService

Wallet information and balance:

  • GetWalletInfoAsync()
  • GetBalanceAsync()

IFlashExchangeRateService

Exchange rate operations:

  • GetExchangeRateAsync(from, to)
  • ConvertAmountAsync(amount, from, to)

IFlashBoltcardService

NFC card operations:

  • ProcessBoltcardTapAsync(cardUid)
  • GetBoltcardBalanceAsync(cardId)
  • TopupBoltcardAsync(cardId, amount)

IFlashWebSocketService

Real-time updates:

  • ConnectAsync()
  • DisconnectAsync()
  • OnInvoiceUpdated
  • OnPaymentReceived

IFlashMonitoringService

System monitoring:

  • GetHealthStatusAsync()
  • GetMetricsAsync()

GraphQL API

The plugin communicates with Flash via GraphQL. Key operations:

Queries

  • walletInfo - Get wallet details
  • invoices - List invoices
  • payments - List payments
  • exchangeRates - Get current rates

Mutations

  • createInvoice - Generate new invoice
  • payInvoice - Send payment
  • cancelInvoice - Cancel pending invoice

Subscriptions

  • invoiceUpdated - Real-time invoice updates
  • paymentReceived - Instant payment notifications