mirror of
https://github.com/tompro/sattle.git
synced 2026-10-26 01:49:58 +00:00
Formatting
This commit is contained in:
+30
-30
@@ -7,58 +7,58 @@
|
||||
// IS the asset); the displayable bech32/lnurlw:// forms are re-encoded from
|
||||
// it on demand.
|
||||
export type Bearer = {
|
||||
id: string
|
||||
url: string
|
||||
callback: string // the mutating callback from the withdrawRequest JSON, '' until first verified
|
||||
amount: number // msat, last known (maxWithdrawable) - refreshed on demand
|
||||
verified: boolean // false while the issuing service hasn't confirmed the note yet
|
||||
id: string;
|
||||
url: string;
|
||||
callback: string; // the mutating callback from the withdrawRequest JSON, '' until first verified
|
||||
amount: number; // msat, last known (maxWithdrawable) - refreshed on demand
|
||||
verified: boolean; // false while the issuing service hasn't confirmed the note yet
|
||||
// the issuing service's signing pubkey, cached once seen (withdrawRequest/
|
||||
// payRequest's optional mintPubkey) - lets a note's ?sig= be checked
|
||||
// offline against it without a network round trip
|
||||
mintPubkey?: string
|
||||
mintPubkey?: string;
|
||||
// a local-only lock, not a server-verified state: true once this wallet
|
||||
// has melted/handed over the note, or the holder marked it manually. It
|
||||
// just disables further mutating actions here so this copy can't be
|
||||
// reused by accident - it says nothing about whether the service has
|
||||
// actually burned it yet
|
||||
spent?: boolean
|
||||
spent?: boolean;
|
||||
// manual display order within its mint group - absent means "never
|
||||
// manually placed", which sorts by -createdAt instead, i.e. newest first
|
||||
sortIndex?: number
|
||||
sortIndex?: number;
|
||||
// a free-text note the holder can attach for their own reference (e.g.
|
||||
// "rent", "gift for Alex") - purely local, never sent anywhere, no
|
||||
// protocol meaning at all
|
||||
label?: string
|
||||
label?: string;
|
||||
// present if this note's secret lives on a paired LNURLvault device,
|
||||
// never in this browser's storage - the device's own note id. When set,
|
||||
// `url` never carries a real k1 (see lnurlcash.ts's withoutK1) - it's a
|
||||
// blank mirror, kept only so this bearer displays like any other
|
||||
// (amount/host/label/state)
|
||||
deviceId?: string
|
||||
deviceId?: string;
|
||||
// A wallet-chosen mint output persisted before invoice creation. It stays
|
||||
// zero-valued until the mint confirms it; transfers also remember the
|
||||
// source record that must be locked when a late settlement is recovered.
|
||||
pendingMint?: {
|
||||
sourceBearerId?: string
|
||||
sourceRecoverySecret?: string
|
||||
mintPubkey?: string
|
||||
retireAfter?: number
|
||||
}
|
||||
createdAt: number
|
||||
updatedAt: number
|
||||
}
|
||||
sourceBearerId?: string;
|
||||
sourceRecoverySecret?: string;
|
||||
mintPubkey?: string;
|
||||
retireAfter?: number;
|
||||
};
|
||||
createdAt: number;
|
||||
updatedAt: number;
|
||||
};
|
||||
|
||||
export type NewBearer = {
|
||||
url: string
|
||||
callback: string
|
||||
amount: number
|
||||
verified: boolean
|
||||
mintPubkey?: string
|
||||
deviceId?: string
|
||||
url: string;
|
||||
callback: string;
|
||||
amount: number;
|
||||
verified: boolean;
|
||||
mintPubkey?: string;
|
||||
deviceId?: string;
|
||||
pendingMint?: {
|
||||
sourceBearerId?: string
|
||||
sourceRecoverySecret?: string
|
||||
mintPubkey?: string
|
||||
retireAfter?: number
|
||||
}
|
||||
}
|
||||
sourceBearerId?: string;
|
||||
sourceRecoverySecret?: string;
|
||||
mintPubkey?: string;
|
||||
retireAfter?: number;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user