Skip to content

openagents_sdk::lightning_address

Account-owned Lightning addresses. Wallet proofs are signed on the device.

ItemWhat it does
AddressState enumWhether a Lightning address is waiting for proof, active, disabled, or retired.
LightningAddress structAn account's Lightning address and the wallet linked to it.
LightningAddresses structWhether receiving is configured and the account's Lightning addresses.
LightningChallenge structA message for the wallet to sign before linking it to a Lightning address.

AddressState

pub enum AddressState {
    Pending,
    Active,
    Disabled,
    Retired,
}

Whether a Lightning address is waiting for proof, active, disabled, or retired.

LightningAddress

pub struct LightningAddress {
    pub name: String,
    pub account: String,
    pub nostr_pubkey: String,
    pub spark_pubkey: String,
    pub domain: String,
    pub revision: u64,
    pub state: AddressState,
    pub created: u64,
    pub updated: u64,
    pub last_challenge: String,
}

An account's Lightning address and the wallet linked to it.

LightningAddresses

pub struct LightningAddresses {
    pub configured: bool,
    pub addresses: Vec<LightningAddress>,
}

Whether receiving is configured and the account's Lightning addresses.

LightningChallenge

pub struct LightningChallenge {
    pub id: String,
    pub account: String,
    pub name: String,
    pub domain: String,
    pub operation: String,
    pub expected_revision: u64,
    pub expires_at: u64,
    pub message: String,
}

A message for the wallet to sign before linking it to a Lightning address.