Skip to content

openagents_sdk::profile_earnings

Private earnings previews and explicit publication of individual receipts.

ItemWhat it does
Earning structA private preview of one verified credit and its publication choice.
EarningsSource enumThe private credit identity selected for publication; never include it in public copy.
HiddenReceipt structConfirmation that a credit is hidden from the public profile.
ProfileEarnings structPrivate earnings for an account's verified Nostr identity.
PublishedEarnings structSelected public receipts and the service issuers trusted for this response.
PublishedReceipt structOne service-signed earnings receipt.

Earning

pub struct Earning {
    pub source: EarningsSource,
    pub receipt: Receipt,
    pub published: bool,
}

A private preview of one verified credit and its publication choice.

EarningsSource

pub enum EarningsSource {
    Ledger { sequence: i64, role: String },
    Tip { payment_hash: String },
}

The private credit identity selected for publication; never include it in public copy.

HiddenReceipt

pub struct HiddenReceipt {
    pub hidden: bool,
}

Confirmation that a credit is hidden from the public profile.

ProfileEarnings

pub struct ProfileEarnings {
    pub rows: Vec<Earning>,
}

Private earnings for an account's verified Nostr identity.

PublishedEarnings

pub struct PublishedEarnings {
    pub events: Vec<Event>,
    pub issuers: BTreeSet<String>,
}

Selected public receipts and the service issuers trusted for this response.

PublishedReceipt

pub struct PublishedReceipt {
    pub event: Event,
}

One service-signed earnings receipt.