Skip to main content

Crate quai_provider

Crate quai_provider 

Source
Expand description

Typed provider with explicit routing, validated reads and signed transaction submission.

Modules§

event_hub
Runtime-independent bounded local event registration and delivery. Runtime-independent bounded local event delivery. Transport polling is explicit.
header_hash
Recompute a Quai zone header’s hashes from the node’s JSON, binding its state roots to the hashes other nodes report.
state_proof
Merkle-Patricia proofs of Quai account state, checked without trusting the node.

Structs§

AccessListEstimate
Node-generated access declaration and simulated gas for one exact call.
AccessListItem
An account transaction’s storage access declaration.
AccountNonceCandidate
A cryptographically verified transaction occupying the watched sender/nonce.
AccountReplacementScan
Advisory bounded scan result. Absence only covers the reported page prefix.
AccountReplacementScanRequest
One explicit page of canonical-by-number account transaction discovery.
AccountReplacementTracker
In-memory, timer-independent cursor for successive canonical replacement pages. A failed or cancelled poll never advances the cursor. Reorgs fail explicitly; reconstruct from a trusted start height rather than trusting a stale cursor.
AccountState
One account’s balance and nonce at the block an Provider::account_states call was pinned to.
AddressOutpoint
Address-index result; presence alone does not prove spendability or index completeness.
BlockHashes
A mined block containing executed transaction identities only. This saves transport/decoding work but cannot validate each transaction’s inclusion fields.
BlockMetadata
Borrowed block metadata; field parsing is explicit and performs no RPC.
BlockReference
A source-reported zone block identity, not a verified chain proof.
BroadcastResult
The server acknowledged the exact expected ID. Inclusion/finality are separate.
CallRequest
Account-only simulation request. This does not authorize or submit a transaction.
CodeWaitConfig
Portable millisecond limits for code-appearance waiting, without a misleading confirmation-depth setting. At most 100,000 completed observations.
ConfirmedReceipt
A receipt that passed the requested observed confirmations and consistency checks.
ConfirmedTransaction
Rechecked indexed transaction inclusion; signature verification is separate.
ContractCodeObservation
Source-reported runtime code at one exact canonical block, including empty code. This does not prove ABI semantics, proxy implementation, future code or finality.
ContractCodeTarget
Explicit account and trusted network/runtime constraints, with no deployment hash.
ConversionEstimate
One conversion priced two ways at the current head, and the gap between.
ConversionObservation
Current lifecycle observations; they are not a persistent monotonic state machine.
ConversionReference
Locally signed conversion identity and intent used to validate origin/final ETX observations.
DeploymentCode
Code in the source’s state at the end of the canonical inclusion block. Empty code is preserved: successful creation does not guarantee deployed code.
DeploymentReference
Exact locally signed creation intent and optional expected runtime-code hash.
EcdsaValues
ECDSA values reported by the node; parsing does not verify the signature.
EtxCorrelation
Stable ETX correlation identity; prime processing may change the final transaction hash.
EtxExecutionObservation
A final-hash ETX and its optionally available, association-checked receipt.
EtxScanRequest
Explicit inclusive scan bounds. There is no implicit genesis-to-latest lookup.
EtxScanResult
A bounded, linked and rechecked source observation.
Extensions
Unknown response fields retained explicitly; diagnostic formatting omits values.
ExternalObservation
Source-reported execution outcome, separate from token minting or Qi maturity.
ExternalReference
Exact nonconversion ETX expectation reconstructed from locally signed bytes. Persist those bytes to reconstruct this identity after a restart.
ExternalTransaction
External transaction fields, preserving protocol origin rather than pretending it is signed locally.
FeeData
Optional exact gas price view. Absence is metadata, never an automatic zero fee.
HeadFollowPolicy
Bounded reconnection and missed-notification polling policy.
HeadTracker
Memory-bounded replay cursor; clone before polling when application persistence must commit before advancing its in-memory cursor. No transaction is resubmitted.
HeadUpdate
A bounded update in application order: undo removed blocks, then apply added blocks.
Inclusion
Included transaction’s untrusted RPC location metadata.
LockedBalanceObservation
Latest-only aggregate locked balance; cannot attribute funds to a conversion or historical block.
Log
Contract log and its block/transaction association.
LogFilter
Zone-explicit log query with bounded addresses, topics and numeric span.
Network
Immutable human-readable label and exact chain ID. This does not include a genesis hash, RPC endpoint, activation state or any authenticated chain claim.
NetworkRegistry
Caller-owned network registry, containing at most 256 combined name/chain keys. No default mainnet entry, endpoint selection or process-global mutation occurs.
OutPoint
Exact UTXO identity.
OutpointDeltas
Exact created/deleted outpoints reported over a block-hash range, inclusive. The connected node must retain spent/trimmed history; this is not a proof.
PoolInspection
One source-formatted pool entry; its text is not parsed as authoritative values.
PoolStatus
Current pool counts, including Qi even though account pool content excludes Qi.
PoolTransaction
One validated account pool transaction. Absence cannot authorize nonce release.
ProvenAccount
An account’s state, proven against one block’s evmRoot.
ProvenSlot
One storage slot’s value, proven under its account’s storage root.
Provider
A provider with a fixed routing table and an explicitly expected chain ID.
QiCreditObservation
Current source-reported outputs attributable to one canonical external hash. This is not a complete historical credit or an atomic UTXO snapshot.
QiFeeQuote
Advisory quote for the exact specialized input/output shape and sampled head.
QiInput
Qi transaction input. Keys are structural bytes until cryptographic verification.
QiOutput
Qi output, including Quai destinations used by conversions.
QiTransaction
Qi transaction fields.
QuaiTransaction
Account transaction RPC fields.
Receipt
Initial typed transaction receipt for all three transaction kinds.
RpcData
Hex-encoded RPC bytes, distinct from a numeric quantity. Debug reveals length only.
StateAnchor
A block to prove state at, read once and shared by any number of proofs.
Transaction
Typed transaction lookup result. Pending inclusion is represented as None.
TransactionBlock
Executed block transactions; emitted outbound ETXs are deliberately separate extensions.
WaitConfig
Explicit limits for native confirmation polling. No retry/submission is performed.
WsHeadFollower
A new-head subscription paired with bounded canonical replay. Raw notifications are wake-up hints only. No transaction submission or pending-event replay occurs.
ZoneHeader
Fields needed to verify a receipt’s canonical block association on a zone.

Enums§

AccountReplacementPoll
Result of one portable replacement-tracker poll; no timer or custody change.
BlockTag
A block selector supported by the initial account read methods.
BlockTransactionId
Exact transaction lookup without numeric/string coercion.
BroadcastError
Submission errors distinguish preflight failures from ambiguous send outcomes.
CodeWaitError
Waiting errors do not undo deployments, change bindings or authorize transactions.
ConversionEffect
Interpretations of reported external subtypes under the pinned static mapping.
ConversionOriginObservation
Current origin-receipt observation; unavailable/noncanonical do not mean rejected.
ConversionSpendability
Receipts cannot qualify whether converted/refunded funds are currently spendable.
DeploymentObservation
Current source-reported direct deployment state.
DeploymentWaitError
Native bounded deployment-wait failures never cancel an already signed operation.
LogRange
Explicit bounded log location; no implicit genesis-to-latest query.
MinedBlock
A mined block selector. Hash lookup may return an orphan; latest is sampled once. Genesis has a root location and uses the separate genesis identity API.
NetworkError
Invalid or conflicting network metadata. Names are labels, never trusted identities.
NetworkMatch
Explicit matching intent, avoiding ambiguous numeric-name string coercion.
OutboundBlockTransaction
An outbound item is distinct from an executed transaction in this block.
ProviderError
Provider failures without raw endpoint URLs or remote response bodies.
QiFeeProfile
Caller-selected rules. Chain ID/client-version strings do not attest software.
ReceiptConfirmation
Result of one bounded observation, without timers or automatic retries.
ReceiptOutcome
Receipt execution outcome, preserving a historical post-state root when supplied.
ReplacementReason
Classification used by the pinned quais.js account response waiter. This is descriptive, never authorization to adopt a transaction or release a claim.
ScanCoverage
Completeness of this requested range only; neither variant proves complete wallet history.
TopicMatch
Match one event topic position.
TransactionConfirmation
One bounded transaction observation without timers, retry or submission.
TransactionDetails
A transaction’s complete initial typed variant.
TransactionKind
Node transaction discriminator. Unknown transaction kinds are rejected.
WaitError
Native confirmation-wait failures never imply a transaction was rejected or cancelled.

Constants§

MAX_ACCOUNT_STATES
Most accounts one Provider::account_states call accepts.
MAX_CONTRACT_CODE_TARGETS
Most addresses one Provider::observe_contract_codes call accepts: its second round carries a guard, every code read and two rechecks in one batch.
MAX_HEAD_STATE_BYTES
Maximum encoded public head cursor: 4,096 numbered hashes and fixed metadata.
MAX_OUTPOINT_ADDRESSES
Most addresses one Provider::outpoints_many call accepts. It pages them internally, so a caller needs no page size of its own.
MAX_PROVEN_ACCOUNTS
Most accounts one Provider::prove_accounts call accepts.
MAX_PROVEN_SLOTS
Most storage slots proven per account in one call.
MAX_RPC_DATA_BYTES
Maximum decoded byte payload accepted by these typed APIs.

Functions§

qi_special_gas
Conservative native gas bound for a same-zone conversion or wrapping.