Skip to main content

Crate glsdk

Crate glsdk 

Source

Structs§

Config
Credentials
Credentials is a container for node_id, the mTLS client certificate used to authenticate a client against a node, as well as the seed secret if present. If no seed is present in the credentials, then the Client will not start a signer in the background.
DeveloperCert
A developer certificate obtained from the Greenlight Developer Console (GDC). When provided to a Scheduler via with_developer_cert(), nodes registered through that scheduler will be associated with the developer’s account.
FundChannel
FundOutput
GetInfoResponse
Handle
A handle to interact with a signer loop running and processing requests in the background. Used primarily to stop the loop and exiting the signer.
Invoice
InvoicePaidEvent
Details of a paid invoice.
ListFundsResponse
ListInvoicesResponse
ListPaymentsRequest
ListPaysResponse
ListPeerChannelsResponse
ListPeersResponse
LnUrlErrorData
Error returned by an LNURL service endpoint.
LnUrlPayRequest
Request to execute an LNURL-pay flow.
LnUrlPayRequestData
Data from an LNURL-pay endpoint (LUD-06).
LnUrlPaySuccessData
Successful LNURL-pay result data.
LnUrlWithdrawRequest
Request to execute an LNURL-withdraw flow.
LnUrlWithdrawRequestData
Data from an LNURL-withdraw endpoint (LUD-03).
LnUrlWithdrawSuccessData
Successful LNURL-withdraw result data.
LogEntry
A single log message from the SDK.
Node
The Node is an RPC stub representing the node running in the cloud. It is the main entrypoint to interact with the node.
NodeBuilder
Configurable Node construction. See module docs.
NodeEventStream
A stream of node events. Call next() to receive the next event.
NodeState
A point-in-time snapshot of the node’s balances, capacity, and connectivity. Returned by node_state().
OnchainFeeRates
On-chain fee rates in sats per virtual byte at various confirmation targets, derived from the connected node’s view of network mempool conditions. Use as the basis for a fee-picker UI.
OnchainReceiveResponse
A pair of on-chain addresses for receiving funds.
OnchainSendResponse
Result of an on-chain send. The transaction has already been broadcast.
Outpoint
A specific on-chain output, identified by its outpoint.
ParsedInvoice
Parsed BOLT11 invoice with extracted fields.
Pay
Payment
Peer
PeerChannel
PreparedOnchainSend
Preview of an on-chain send: the inputs CLN would select at the given fee rate, the resulting fee, and the amount the recipient would receive. Inputs are NOT reserved — the wallet is free to spend them via other paths until onchain_send actually broadcasts.
ReceiveResponse
Scheduler
SendResponse
Signer

Enums§

ChannelState
Error
InvoiceStatus
ListIndex
Index field used by CLN’s paginated list RPCs.
LnUrlPayResult
Result of an LNURL-pay operation.
LnUrlWithdrawResult
Result of an LNURL-withdraw operation.
LogLevel
Log level for filtering messages.
Network
NodeEvent
A real-time event from the node.
OnchainBalanceState
Classifies the on-chain wallet into discrete cases that a wallet UI can switch on to render the correct entry-point for the withdraw flow. Derived purely from NodeState — no RPC.
OutputStatus
ParsedInput
The result of parse_input: an offline classification of the input. No HTTP, no I/O. LNURL bech32 strings are returned as their decoded URL; Lightning Addresses as the unparsed user@host form.
PayStatus
PaymentStatus
PaymentType
PaymentTypeFilter
ResolvedInput
The result of resolve_input: a fully-resolved input ready for the caller’s next action. LNURL bech32 strings and Lightning Addresses are resolved over HTTP into typed pay or withdraw request data; BOLT11 and node IDs pass through unchanged.
SuccessActionProcessed
A processed success action from an LNURL-pay callback.

Traits§

LogListener
Callback interface for receiving log messages.
NodeEventListener
Callback interface for receiving node events.

Functions§

parse_input
Synchronously classify the input. No HTTP, no I/O.
resolve_input
Classify and resolve the input.
set_log_level
Change the log filter at runtime without reinstalling the listener.
set_logger
Set up SDK logging. Call once before any other SDK function.