/** * barkd REST API * A simple REST API for barkd, a wallet daemon for integrating bitcoin payments into your app over HTTP. Supports self-custodial Lightning, Ark, and on-chain out of the box. barkd is a long-running daemon best suited for always-on or high-connectivity environments like nodes, servers, desktops, and point-of-sale terminals. All endpoints return JSON. Amounts are denominated in satoshis. * * The version of the OpenAPI document: 0.6.1 * Contact: hello@second.tech * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import type { InvoiceInfo, LightningInvoiceForAddressRequest, LightningInvoiceRequest, LightningPayRequest, LightningPayResponse, LightningReceiveInfo } from '../models/index'; export interface CancelReceiveRequest { identifier: string; } export interface GenerateInvoiceRequest { lightningInvoiceRequest: LightningInvoiceRequest; } export interface GenerateInvoiceForAddressRequest { lightningInvoiceForAddressRequest: LightningInvoiceForAddressRequest; } export interface GetReceiveStatusRequest { identifier: string; } export interface PayRequest { lightningPayRequest: LightningPayRequest; } /** * */ export declare class LightningApi extends runtime.BaseAPI { /** * Creates request options for cancelReceive without sending the request */ cancelReceiveRequestOpts(requestParameters: CancelReceiveRequest): Promise; /** * Cancels a pending Lightning receive identified by its payment hash or invoice string. The server will refuse cancellation if HTLC-recv VTXOs have already been granted. Bark also prevents cancellation when the preimage has been revealed. * Cancel a pending receive */ cancelReceiveRaw(requestParameters: CancelReceiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Cancels a pending Lightning receive identified by its payment hash or invoice string. The server will refuse cancellation if HTLC-recv VTXOs have already been granted. Bark also prevents cancellation when the preimage has been revealed. * Cancel a pending receive */ cancelReceive(requestParameters: CancelReceiveRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for generateInvoice without sending the request */ generateInvoiceRequestOpts(requestParameters: GenerateInvoiceRequest): Promise; /** * Generates a new BOLT11 invoice for the specified amount via the Ark server, creating a pending Lightning receive. * Create a BOLT11 invoice */ generateInvoiceRaw(requestParameters: GenerateInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Generates a new BOLT11 invoice for the specified amount via the Ark server, creating a pending Lightning receive. * Create a BOLT11 invoice */ generateInvoice(requestParameters: GenerateInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for generateInvoiceForAddress without sending the request */ generateInvoiceForAddressRequestOpts(requestParameters: GenerateInvoiceForAddressRequest): Promise; /** * Generates a new BOLT11 invoice. When paid, the wallet claims the Lightning receive and forwards the resulting Ark VTXO to the supplied Ark address mailbox. * Create a BOLT11 invoice for an Ark address */ generateInvoiceForAddressRaw(requestParameters: GenerateInvoiceForAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Generates a new BOLT11 invoice. When paid, the wallet claims the Lightning receive and forwards the resulting Ark VTXO to the supplied Ark address mailbox. * Create a BOLT11 invoice for an Ark address */ generateInvoiceForAddress(requestParameters: GenerateInvoiceForAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for getReceiveStatus without sending the request */ getReceiveStatusRequestOpts(requestParameters: GetReceiveStatusRequest): Promise; /** * Returns the status of a specified Lightning receive, identified by its payment hash, invoice string, or preimage. The response tracks progress through timestamps: `htlc_vtxos` is populated once HTLCs are created by the Ark server, `preimage_revealed_at` records when the preimage was sent, and `finished_at` indicates the receive has settled or been canceled. * Get receive status */ getReceiveStatusRaw(requestParameters: GetReceiveStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Returns the status of a specified Lightning receive, identified by its payment hash, invoice string, or preimage. The response tracks progress through timestamps: `htlc_vtxos` is populated once HTLCs are created by the Ark server, `preimage_revealed_at` records when the preimage was sent, and `finished_at` indicates the receive has settled or been canceled. * Get receive status */ getReceiveStatus(requestParameters: GetReceiveStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; /** * Creates request options for listReceiveStatuses without sending the request */ listReceiveStatusesRequestOpts(): Promise; /** * Returns the statuses of all pending Lightning receives, ordered from oldest to newest. A receive is pending until its `finished_at` timestamp is set, indicating it has settled or been canceled. * List all pending receive statuses */ listReceiveStatusesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>>; /** * Returns the statuses of all pending Lightning receives, ordered from oldest to newest. A receive is pending until its `finished_at` timestamp is set, indicating it has settled or been canceled. * List all pending receive statuses */ listReceiveStatuses(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Creates request options for pay without sending the request */ payRequestOpts(requestParameters: PayRequest): Promise; /** * Sends a payment to a Lightning destination. Accepts a BOLT11 invoice, BOLT12 offer, or Lightning address. The `amount_sat` field is required for Lightning addresses but optional for invoices and offers. Comments are only supported for Lightning addresses. * Send a Lightning payment */ payRaw(requestParameters: PayRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** * Sends a payment to a Lightning destination. Accepts a BOLT11 invoice, BOLT12 offer, or Lightning address. The `amount_sat` field is required for Lightning addresses but optional for invoices and offers. Comments are only supported for Lightning addresses. * Send a Lightning payment */ pay(requestParameters: PayRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; }