Package-level declarations
Types
An operation currently in flight — the unit observed by the foreground service.
Optional cross-device backup of host app state (e.g. Kicks match witnesses, draft data) — distinct from the wallet seed/identity (carried by the passkey, reconstructed locally) and from the dust checkpoint (DustCloudBackup).
One-shot, SEED-FREE detection of inbound NIGHT receipts for an address on a network — what the background receive poll does while the full MidnightSdk may be dropped (session locked / process backgrounded).
Snapshot of every cloud-backup lane the wallet drives. Emitted by MidnightWallet.backupStatus on each backup attempt.
Cloud-backup status for one lane (dust checkpoint or app state), surfaced by MidnightWallet.backupStatus so the UI can show what's happening instead of a silent log. The SDK stays best-effort/non-crashing — this is observation only.
Full cross-device dust backup — adds the upload side to DustCloudBackupSource. One implementation serves both views: DustSyncManager consumes only fetch, MidnightWallet also drives upload.
Optional cross-device source of a dust checkpoint (e.g. Google Drive). The concrete implementation lives in sdk:wallet-runtime (it needs Drive + the backup crypto); core:indexer and this module stay transport-agnostic.
Dust state manager — keeps a single in-memory DustLocalState for the session.
Marks an API as experimental — subject to breaking changes between releases without going through the standard deprecation cycle declared in STABILITY.md.
Thrown when a balance can't proceed because the wallet has no spendable dust — specifically, every dust UTXO in the synced state is one the wallet already spent but whose spend the indexer's event stream hasn't reflected yet (so it's correctly excluded to avoid node error 115).
Thrown when the wallet's unshielded NIGHT can't cover a requested amount — e.g. funding the value a contract receives via receiveUnshielded in MidnightSdk.buildUnshieldedFundingJson.
Top-level entry point for the Midnight Android SDK.
Embedded wallet that handles transaction balancing and submission on-device.
A one-shot ATTENTION request (#264 inbound) — fired MID-flight to pull the user BACK to a tracked operation that needs them (a protocol step waiting on their input, a counterparty's move). Distinct from OperationOutcome, which fires when the op FINISHES. The presentation edge turns it into a heads-up notification and decides whether to suppress it (e.g. when the app is already foreground — no point summoning someone who's looking). title/body are caller-provided; contentIntent taps back to the op's screen.
Describes a foreground operation to track. label is CALLER-PROVIDED (the dApp/host owns its own strings) so the SDK emits no English of its own; when null, the presentation edge resolves a default label from kind. A Custom operation MUST provide a label. completionLabel optionally overrides the finalization-notification title (else the ongoing label is reused).
The kind of value-bearing wallet operation tracked by OperationRegistry and surfaced by the background foreground service (#261-264).
A one-shot terminal event — the unit the finalization notification rides.
Process-singleton registry of in-flight value-bearing wallet operations (#261-264). Mirrors MidnightWallet.syncStatus's observable-state model:
How a finished operation's normal return maps to a terminal outcome.
Terminal status of a tracked operation.
Outcome of a MidnightSdk.runProtocol segment.
The builder scope of a MidnightSdk.runProtocol saga — an ordered list of idempotent, ledger-anchored steps (#253 + #254).
The decoded app-state blob: SDK-level prefs (null when the blob predates the envelope — a legacy raw host payload — or was uploaded with no prefs set) + the host's own payload.
A restored dust checkpoint: enough to seed DustSyncManager so the next sync is a fast delta instead of a genesis replay.
Observable state of wallet syncing, exposed by MidnightWallet.syncStatus.
Pre-flight check that the client's bundled ledger version is coherent with the node it's talking to.
Thrown when a submit is aborted because the node's ledger version is incompatible with the client's bundled version AND the policy is set to hard-fail (VersionCoherence.HARD_FAIL_ON_SKEW). Under the default warn policy this is never thrown.
Wallet-level backup preferences that travel WITH the wallet (inside the seed-keyed app-state blob) instead of dying with the install (package-local prefs).
Snapshot of a wallet's full balance state across both pools.
Properties
Decimal places NIGHT is denominated in: a raw WalletBalance amount is in 10^-NIGHT_DECIMALS NIGHT units (the smallest unit). The one source of this scale — presentation layers (dapp-ui, wallet-runtime notifications) reference this rather than re-hardcoding 6.