Expand description
Native-independent browser boundaries plus wasm-only Fetch and injected Quai adapters.
Browser APIs require an application-selected endpoint/provider. Construction performs no network requests and never prompts for accounts. Heavy derivation and persistent wallet storage remain separate worker/storage responsibilities.
Structs§
- Browser
Config - Browser resource limits. Concurrent calls fail fast when capacity is exhausted.
- Browser
Fetch Transport - Browser Fetch transport with streaming response limits, CORS and credential omission.
- Browser
Resource Fetch - Window/worker resource backend with streamed decoded-body limits and abort on drop. Browser CORS/header/compression policies apply. Opaque redirects reject; callers must explicitly supply a resolved URL rather than requesting auto-follow.
- Browser
Snapshot - Monotonic snapshot revision and opaque bytes. A tombstone retains its revision, preventing stale tabs from recreating deleted state with an old revision.
- Browser
Snapshot Store - IndexedDB snapshots with atomic compare-and-exchange across tabs and workers. The caller owns snapshot serialization and encryption. No plaintext secret origin belongs in this store. A cancelled write may already have committed; read the current revision before deciding whether to retry.
- Browser
Snapshot Update - One entry in an atomic multi-journal commit. Bytes must be public or encrypted.
- Browser
Socket Config - Browser WebSocket request and notification resource limits.
- Browser
Storage Scope - Exact network and wallet namespace. Bind it as associated data when encrypting the snapshot: database names alone do not authenticate ciphertext ownership.
- Browser
Subscription - One bounded subscription. Queue overflow is explicit and requires backfill; receipt of a notification is never a canonicality or finality assertion. Drop attempts bounded unsubscribe; if cleanup capacity is exhausted it closes the shared session. Use explicit unsubscribe when completion matters.
- Browser
Wait Config - Explicit browser transaction-wait limits. Milliseconds must be positive and fit a browser timer; polling attempts are independently bounded. No implicit defaults.
- Browser
WebSocket Transport - One explicit browser/worker WebSocket connection. Clones share bounded requests and subscriptions. No reconnect, retry, chain inference or write replay occurs. Last-owner drop closes the socket; an active subscription also owns the session.
- Injected
Provider - Explicit adapter for an application-selected Quai EIP-1193 provider object.
- Injected
Submission Transport - Explicit transport capability for canonical, already-signed Quai/Qi payloads.
Compose with
quai_provider::Providerto retain its expected transaction ID, acknowledgement validation and ambiguous-submission errors. All other wallet signing/permission/sending methods remain unavailable throughTransport. - Typed
Data - An immutable, validated EIP-712 RPC document with its cached signing hash.
- Wallet
Send Acknowledgement - Structurally valid wallet acknowledgement, pending independent transaction verification. Unlike raw submission, there was no locally signed payload from which to compute its ID.
- Wallet
Send Identity - Original request identity to retain before awaiting a wallet-mediated send. The signing digest is NOT a transaction ID. A wallet can change fields in its approval flow; after an unknown outcome this identity alone cannot prove reuse safe.
- Wallet
Send Observation - Independently verified transaction bytes and explicit comparison to the request.
Enums§
- Browser
Error - Sanitized browser failures. No provider strings, payloads, keys or URLs are retained.
- Browser
Receipt Wait Error - Wait failure never cancels a transaction or authorizes releasing its claims.
- Domain
Policy - Explicit policy for typed-data domains that omit a chain identifier.
- Wallet
Send Error - Whether the adapter failed before dispatch or after submission could occur.
Functions§
- compare_
exchange_ snapshots - Commit 1..=128 distinct namespaces in one IndexedDB transaction, with a combined 16 MiB payload limit. Any conflict/error aborts every update. Returns revisions in input order. Cross-database updates and duplicate keys reject. Cancellation after dispatch may commit all entries: re-read before retrying.
- fill_
random - Fill at most 65,536 bytes using secure-context Web Crypto, with no fallback PRNG. No wallet key storage or generation is performed automatically.
- wait_
for_ account_ transaction - Wait for a verified original or unregistered same-sender/nonce competitor. Uses the same portable page tracker as native waiting and window/worker monotonic timers. max_polls bounds completed pages/idle observations; an overall deadline also covers stalled reads. No Send requirement, custody adoption, claim release or submission. Missing history never advances the cursor; changed anchors return an error requiring explicit restart at a trusted height. Browser suspension may delay timeout delivery but cannot allow success after observed expiry. Dropping the future clears timers and the active read future.
- wait_
for_ contract_ code - Wait under an observable monotonic deadline and completed-observation budget. Empty code or changed anchors remain pending; mismatched genesis/runtime or other source errors stop. Suspension can delay notification but cannot permit success after observed expiry. Drop clears timers and active reads. No Send bound, hidden deployment, binding mutation or finality assertion is involved.
- wait_
for_ receipt - Wait using portable confirmation checks and window/worker monotonic timers. At most two timers are held; drop clears them and drops the active read future. Non-Send transports are supported. The deadline covers RPCs and polling delays; delayed background callbacks cannot return success after observed clock expiry. Browser scheduling is not real-time and confirmations do not prove finality. Execution-failed receipts remain explicit successful observations.
- wait_
for_ transaction - Wait for rechecked transaction inclusion, including Qi without receipts. Explicit monotonic deadline covers stalled RPCs; max_polls bounds completed observations. Browser suspension can delay delivery but not permit success after observed expiry. Drop clears timers and active reads. No submission, signature verification, replacement adoption or release of custody claims.
Type Aliases§
- Browser
Account Wait Error - Account replacement waits share bounded timer/observation error information.
- Browser
Transaction Wait Error - Shared deadline, completed-observation and provider-error information.