Module types

Source
Expand description

Reexported types needed by SDK consumers. All types exported here are considered part of the stable public API.

Structs§

Amount
A Bitcoin amount, internally represented as a satoshi [Decimal], which provides the following properties:
BasicPaymentV2
A basic payment type which contains all of the user-facing payment details for any kind of payment. These details are exposed in the Lexe app.
ClientCredentials
All secrets required for a non-RootSeed client to authenticate and communicate with a user’s node.
LxInvoice
Wraps [lightning_invoice::Bolt11Invoice] to impl serde Serialize / Deserialize using the LDK’s FromStr / Display impls.
LxPaymentHash
Newtype for [PaymentHash] which impls Serialize / Deserialize.
LxPaymentSecret
Newtype for [PaymentSecret] which impls Serialize / Deserialize.
LxTxid
Almost exactly [bitcoin::Txid], but fixes the inconsistency between the string-serialized and unserialized orderings caused by bitcoin sha256d hash types being displayed in reverse hex order (thanks Satoshi!). Also provides an Arbitrary impl. When neither of these are required, it is perfectly fine (and equivalent) to use [bitcoin::Txid] directly.
Measurement
An enclave measurement.
NodePk
A simple wrapper around [secp256k1::PublicKey] which allows for Arbitrary and other custom impls.
PaymentCreatedIndex
A payment identifier which:
PaymentUpdatedIndex
A payment identifier, conceptually a [(TimestampMs, LxPaymentId)], which:
RootSeed
The user’s root seed from which we derive all child secrets.
SdkCreateInvoiceRequest
A request to create a BOLT 11 invoice.
SdkCreateInvoiceResponse
The response to a BOLT 11 invoice request.
SdkGetPaymentRequest
A request to get information about a payment by its index.
SdkGetPaymentResponse
A response to a request to get information about a payment by its index.
SdkNodeInfo
Information about a Lexe node.
SdkPayInvoiceRequest
A request to pay a BOLT 11 invoice.
SdkPayInvoiceResponse
The response to a request to pay a BOLT 11 invoice.
SdkPayment
Information about a payment.
SysRng
A compatibility wrapper so we can use ring’s PRG with rand traits.
TimestampMs
The number of milliseconds since the UNIX_EPOCH.
UpdatePaymentNote
Update the note on a payment.
UserPk
A Lexe user’s primary identifier - their ed25519::PublicKey.

Enums§

ConfirmationPriority
The transaction confirmation priority levels used in Lexe APIs. Basically a simplified version of LDK’s [ConfirmationTarget] type. Lexe code should prefer to use this type when possible.
Credentials
Credentials required to connect to a user node via mTLS.
CredentialsRef
Borrowed credentials required to connect to a user node via mTLS.
LxPaymentId
A globally-unique identifier for any type of payment, including both on-chain and Lightning payments.
PaymentDirection
Specifies whether a payment is inbound or outbound.
PaymentKind
A granular application-level ‘type’ of a payment.
PaymentRail
The technical ‘rail’ used to fulfill a payment: onchain, invoice, offer, spontaneous, etc.
PaymentStatus
A general payment status that abstracts over all payment types.