PredictReads class

client.read.* — chain reads and dry-run quotes.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

balance(String owner) → Future<double>
The owner's stored quote-coin balance, in human units.
hasPosition(String owner, String marketId, BigInt orderId) → Future<bool>
Validate an app-stored order id against the chain (stale after full close or partial-close replacement — see RedeemReceipt.replacementOrderId).
market({required String underlying, required Object expiryMs}) → Future<MarketSummary?>
A resolved live market's on-chain state summary, or null when no market exists for the coordinates. Deliberately re-queries and overwrites the cache instead of reading through it: this read must return live state (nav, mintPaused), and refreshing the cache on the way keeps later tx builds consistent.
markets() → Future<List<ActiveMarket>>
All tradeable (active) markets with the state a frontend needs to render and mint: one chain read for ids + one batched PTB for the states.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
plpBalance(String owner) → Future<BigInt>
PLP shares held in the owner's account custody (raw u64, 6-decimal PLP coin).
pool() → Future<PoolSummary>
Aggregate pool figures (see PoolSummary).
positions(String owner) → Future<List<OpenPosition>>
All open positions for an owner, enumerated from the chain (the account's positions Table): 1 call per page warm, +2 resolution calls once per owner. Returns [] for owners with no Predict account.
price(MarketDescriptor m) → Future<({double down, double up})>
Anonymous board pricing: the chain's probability for both sides of a strike, from one fresh pricer (no account needed). This is the ↑/↓ button price before a user has onboarded. m must be a binary descriptor (strike-bearing) — anonymous board pricing has no range semantics.
pricer({required String underlying, required Object expiryMs}) → Future<BoardPricerWithSources>
A client-side board pricer for one market: ONE simulate reads the chain's resolved pricer (already forward-selected + rolled to now), then prices every strike LOCALLY with no further chain calls — pricer.up(strike), .down(strike), .range(lo, hi), .strikeAt(p). Use this to paint a whole board instantly; price / quoteMint stay the authoritative per-strike quote at trade time. Throws the same typed stale-oracle/expired PredictMoveError that price would when the chain itself cannot quote.
quoteMint(String owner, MarketDescriptor m, {required num quantity}) → Future<MintQuote>
Exact pre-trade quote: dry-runs the caller's own mint (same tx as tx.mint) and decodes the receipt. Requires a funded account; throws the same typed errors the real trade would — quote doubles as preflight.
quoteMintCost(String owner, MarketDescriptor m, MintCostOptions opts) → Future<MintQuote>
Simulate the v2 all-in budget mint against current account and market state.
quoteRedeem(String owner, MarketDescriptor m, CloseOptions opts) → Future<RedeemQuote>
Exact pre-close quote: dry-runs the caller's own redeem and decodes the receipt — the informed close against the floor-less deployed redeem.
toString() → Side
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited