LightningLike.send
ts
send(quote: LnQuoteLike): Promise<LnSendOperationLike>Pays the invoice of a quote.
Parameters
| Name | Type | Description |
|---|---|---|
quote | LnQuoteLike | The quote to pay. A quote that was already sent fails with QuoteExpired. |
Returns. LnSendOperationLike. The operation. It returns when the payment has started, not when it ends. The final state is Success, Refunded or Failed.
Throws. QuoteExpired, QuoteChanged, NetworkMismatch, InsufficientBalance, GatewayUnavailable, Recovering, NotSupported, FederationUnreachable, Timeout, Storage, Internal, FederationClosed.
Example
example.ts
ts
import type { LightningLike, LnQuoteLike } from '@fedimint/react-native'
declare const ln: LightningLike
declare const quote: LnQuoteLike
const operation = await ln.send(quote)
console.log((await operation.awaitFinal()).tag)Used in. Send, step 05