Package-level declarations

Types

Link copied to clipboard
@Serializable
data class Balances(val ownedBalance: CurrencyAmount, val availableToSendBalance: CurrencyAmount, val availableToWithdrawBalance: CurrencyAmount)
Link copied to clipboard
Link copied to clipboard
@Serializable
data class CreateBitcoinFundingAddressOutput(val bitcoinAddress: String)
Link copied to clipboard
@Serializable
data class CreateInvoiceInput(val amountMsats: Long, val memo: String? = null, val invoiceType: InvoiceType? = null)
Link copied to clipboard
@Serializable
data class CreateInvoiceOutput(val invoiceId: EntityId)
Link copied to clipboard
@Serializable
data class CurrencyAmount(val originalValue: Long, val originalUnit: CurrencyUnit, val preferredCurrencyUnit: CurrencyUnit, val preferredCurrencyValueRounded: Long, val preferredCurrencyValueApprox: Float)

Represents the value and unit for an amount of currency.

Link copied to clipboard
Link copied to clipboard
@Serializable
data class DeployWalletOutput(val wallet: Wallet)
Link copied to clipboard
@Serializable
data class Deposit(val id: String, val createdAt: Instant, val updatedAt: Instant, val status: TransactionStatus, val amount: CurrencyAmount, val blockHeight: Int, val destinationAddresses: List<String>, val resolvedAt: Instant? = null, val transactionHash: String? = null, val fees: CurrencyAmount? = null, val blockHash: String? = null, val numConfirmations: Int? = null) : OnChainTransaction, Transaction, Entity

The transaction on Bitcoin blockchain to fund the Lightspark node's wallet.

Link copied to clipboard
interface Entity

This interface is used by all the entities in the Lightspark systems. It defines a few core fields that are available everywhere. Any object that implements this interface can be queried using the entity query and its ID.

Link copied to clipboard
@Serializable
data class EntityId(val id: String)
Link copied to clipboard
@Serializable
data class FeeEstimate(val feeFast: CurrencyAmount, val feeMin: CurrencyAmount)
Link copied to clipboard
@Serializable
data class IncomingPayment(val id: String, val createdAt: Instant, val updatedAt: Instant, val status: TransactionStatus, val amount: CurrencyAmount, val resolvedAt: Instant? = null, val transactionHash: String? = null, val paymentRequestId: EntityId? = null) : LightningTransaction, Transaction, Entity

A transaction that was sent to a Lightspark node on the Lightning Network.

Link copied to clipboard
@Serializable
data class InitializeWalletInput(val signingPublicKey: KeyInput)
Link copied to clipboard
@Serializable
data class InitializeWalletOutput(val wallet: Wallet)
Link copied to clipboard
@Serializable
data class Invoice(val id: String, val createdAt: Instant, val updatedAt: Instant, val data: InvoiceData, val status: PaymentRequestStatus, val amountPaid: CurrencyAmount? = null) : PaymentRequest, Entity

This object represents a BOLT #11 invoice (https://github.com/lightning/bolts/blob/master/11-payment-encoding.md) initiated by a Lightspark Node.

Link copied to clipboard
@Serializable
data class InvoiceData(val encodedPaymentRequest: String, val bitcoinNetwork: BitcoinNetwork, val paymentHash: String, val amount: CurrencyAmount, val createdAt: Instant, val expiresAt: Instant, val memo: String? = null) : PaymentRequestData

This object represents the BOLT #11 invoice protocol for Lightning Payments. See https://github.com/lightning/bolts/blob/master/11-payment-encoding.md.

Link copied to clipboard
Link copied to clipboard
@Serializable
data class KeyInput(val publicKey: String)
Link copied to clipboard
@Serializable(with = KeyTypeSerializer::class)
enum KeyType : Enum<KeyType>
Link copied to clipboard
Link copied to clipboard
@Serializable
data class LightningFeeEstimateForInvoiceInput(val encodedPaymentRequest: String, val amountMsats: Long? = null)
Link copied to clipboard
@Serializable
data class LightningFeeEstimateForNodeInput(val destinationNodePublicKey: String, val amountMsats: Long)
Link copied to clipboard
@Serializable
data class LightningFeeEstimateOutput(val feeEstimate: CurrencyAmount)
Link copied to clipboard
Link copied to clipboard
@Serializable
data class LoginWithJWTInput(val accountId: String, val jwt: String)
Link copied to clipboard
@Serializable
data class LoginWithJWTOutput(val accessToken: String, val wallet: Wallet, val validUntil: Instant)
Link copied to clipboard

Transaction happened on Bitcoin blockchain.

Link copied to clipboard
@Serializable
data class OutgoingPayment(val id: String, val createdAt: Instant, val updatedAt: Instant, val status: TransactionStatus, val amount: CurrencyAmount, val resolvedAt: Instant? = null, val transactionHash: String? = null, val fees: CurrencyAmount? = null, val paymentRequestData: PaymentRequestData? = null, val failureReason: PaymentFailureReason? = null, val failureMessage: RichText? = null) : LightningTransaction, Transaction, Entity

A transaction that was sent from a Lightspark node on the Lightning Network.

Link copied to clipboard
@Serializable
data class PageInfo(val hasNextPage: Boolean? = null, val hasPreviousPage: Boolean? = null, val startCursor: String? = null, val endCursor: String? = null)
Link copied to clipboard
@Serializable
data class PayInvoiceInput(val encodedInvoice: String, val timeoutSecs: Int, val maximumFeesMsats: Long, val amountMsats: Long? = null)
Link copied to clipboard
@Serializable
data class PayInvoiceOutput(val paymentId: EntityId)
Link copied to clipboard
Link copied to clipboard

The interface of a payment request on the Lightning Network (a.k.a. Lightning Invoice).

Link copied to clipboard
@Serializable
data class RequestWithdrawalInput(val bitcoinAddress: String, val amountSats: Long)
Link copied to clipboard
@Serializable
data class RequestWithdrawalOutput(val requestId: EntityId)
Link copied to clipboard
@Serializable
data class RichText(val text: String)
Link copied to clipboard
@Serializable
data class SendPaymentInput(val destinationPublicKey: String, val timeoutSecs: Int, val amountMsats: Long, val maximumFeesMsats: Long)
Link copied to clipboard
@Serializable
data class SendPaymentOutput(val paymentId: EntityId)
Link copied to clipboard
@Serializable
data class TerminateWalletOutput(val wallet: Wallet)
Link copied to clipboard
interface Transaction : Entity
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Serializable
data class Wallet(val id: String, val createdAt: Instant, val updatedAt: Instant, val status: WalletStatus, val balances: Balances? = null) : Entity
Link copied to clipboard
Link copied to clipboard
@Serializable
data class WalletToPaymentRequestsConnection(val pageInfo: PageInfo, val count: Int, val entities: List<PaymentRequest>)
Link copied to clipboard
@Serializable
data class WalletToTransactionsConnection(val pageInfo: PageInfo, val count: Int, val entities: List<Transaction>)
Link copied to clipboard
@Serializable
data class Withdrawal(val id: String, val createdAt: Instant, val updatedAt: Instant, val status: TransactionStatus, val amount: CurrencyAmount, val blockHeight: Int, val destinationAddresses: List<String>, val resolvedAt: Instant? = null, val transactionHash: String? = null, val fees: CurrencyAmount? = null, val blockHash: String? = null, val numConfirmations: Int? = null) : OnChainTransaction, Transaction, Entity

The transaction on the Bitcoin blockchain to withdraw funds from the Lightspark node to a Bitcoin wallet.

Link copied to clipboard
@Serializable
data class WithdrawalRequest(val id: String, val createdAt: Instant, val updatedAt: Instant, val amount: CurrencyAmount, val bitcoinAddress: String, val status: WithdrawalRequestStatus, val estimatedAmount: CurrencyAmount? = null, val completedAt: Instant? = null, val withdrawalId: EntityId? = null) : Entity