predict/plp library

Full generated bindings for the plp Move module (deepbook_predict): every move-call builder and BCS struct, including symbols the flat package:deepbook/predict.dart surface hides to avoid name collisions. Import with a prefix: import 'package:deepbook/predict/plp.dart' as plp;

Properties

PLP → BcsType<Map<String, dynamic>, dynamic>
final
PoolValuation → BcsType<Map<String, dynamic>, dynamic>
final
PoolValuationProof → BcsType<Map<String, dynamic>, dynamic>
final
PoolVault → BcsType<Map<String, dynamic>, dynamic>
final
SnapshotStage → BcsType<Map<String, dynamic>, dynamic>
final

Functions

activeExpiryMarkets({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Return active expiry IDs for external PTB construction and pool inspection.
activeLiveExpiryCount({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Return the pre-expiry active count for SDK and devInspect capacity reads.
addUsdcToPlp({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Add USDC straight to pool idle liquidity without minting any PLP. Anyone may call it; the payment is an outright gift to the existing share base, so the caller receives nothing back and no share of it is recoverable.
cancelSupplyRequest({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Cancel a still-pending supply request, refunding its escrowed USDC straight into the requesting account. account must be the request's recorded recipient.
cancelWithdrawRequest({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Cancel a still-pending withdraw request, refunding its escrowed PLP straight into the requesting account. account must be the request's recorded recipient.
feeIncentiveReserve({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Return sponsor-funded fee reserves for SDK and devInspect state reads.
finishFlush({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Finish a full-pool valuation and run the LP flush: prove every snapshotted market was valued exactly once, price the pool NAV, then drain the supply/withdraw queues at that frozen mark (mint PLP for supplies, burn PLP and pay USDC for withdrawals), release the valuation flag, retire the in-flight valuation, and return the LP-attributable pool-wide USDC NAV (frozen idle + Σ active NAV, net of the pending-protocol-profit exclusion priced from the frozen profit basis — every term as of the snapshot instant). Each drain fills only requests submitted before the flush's snapshot instant (the recorded queue cutoffs); younger requests wait for the next mark.
id({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Return the pool vault object ID for external discovery and PTB construction.
idleBalance({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Return idle USDC for SDK and devInspect state reads.
lockCapital({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Bootstrap the pool exactly once: permanently lock payment USDC of minimum liquidity. Mints matching PLP (1:1) into the book's locked balance — never withdrawable, so the caller receives no shares — and joins the USDC into idle. This keeps total_supply > 0 while the vault exists and gives rounding dust a non-withdrawable PLP holder. Requires root authority and zero existing supply. Supply, withdrawal, and flush flows remain disabled until the locked liquidity has been created.
pendingProtocolProfit({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Return deferred protocol profit for external accounting observability.
plpTotalSupply({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Return total PLP supply for SDK and devInspect state reads.
profitBasisCredits({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Return the profit-basis credits for external accounting observability.
profitBasisDebits({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Return the profit-basis debits for external accounting observability.
protocolReserveBalance({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Return protocol-owned USDC for SDK and devInspect state reads.
rebalanceExpiryCash({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Move cash between pool idle liquidity and one expiry market.
requestSupply({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Queue a supply request: pull amount USDC from account custody into queue escrow, recording the account's receive address as the fill recipient. The pull auto-settles any flush-delivered USDC first. The flush charges the protocol's supply fee — zero by default — on the USDC it takes in and prices shares on the remainder, so min_plp_out is measured after that fee. The account receives minted PLP only at a mark that mints at least min_plp_out for the whole amount — a price floor, not a promise of that many shares: if the pool cap leaves room for only part of the deposit, the fill is proportionally smaller at the same price and the remainder stays queued with its limit rescaled. At the shipped attempt count of one, a flush whose mark quotes less cancels and refunds the request there and then; a higher configured count lets it rest and retry that many flushes first. Returns the queue index, the handle used to cancel before the flush.
requestWithdraw({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Queue a withdraw request: pull amount PLP shares from account custody into queue escrow, recording the account's receive address as the fill recipient. The pull auto-settles any flush-delivered PLP first. The flush withholds the protocol's withdraw fee from the marked payout, so min_usdc_out is measured after the fee. The account is paid only at a mark that quotes at least min_usdc_out for the whole amount — a price floor, not a promise of that much USDC: if idle liquidity covers only part of the payout, only the shares idle affords are burned, the fill is proportionally smaller at the same price, and the remainder stays queued with its limit rescaled. At the shipped attempt count of one, a flush whose mark quotes less cancels and refunds the request there and then; a higher configured count lets it rest and retry that many flushes first. Returns the queue index used to cancel before the flush.
sealValuationSnapshot({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Close the snapshot stage once every expected market has a frozen pricer, and freeze the vault-side figures — idle, the profit basis, the pending protocol cut — completing the snapshot.
snapshotExpiryPricer({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Freeze one snapshotted market's oracle state for this flush and stamp the market, capturing its cash rows and activating its payout-tree snapshot at this instant.
sponsorFeeIncentives({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Sponsor taker fee incentives with USDC. Anyone may contribute; the payment joins a pool-level reserve that is excluded from PLP NAV and later allocated to expiry markets by the normal rebalance flow.
startPoolValuation({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Begin a full-pool valuation using a registry-issued pool-valuation proof. The proof grants control over when current oracle state is frozen for queued LP fills. Starting engages the cross-transaction valuation flag, snapshots the active expiry set and each LP queue's eligibility cutoff, and opens the atomic snapshot stage: freeze every active market's pricer under the returned SnapshotStage, then seal it in the same transaction.
supplyRequestsPending({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Return pending LP supply count for SDK and devInspect queue reads.
valueExpiry({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Fold one snapshotted market's SNAPSHOT-INSTANT NAV into the running total. A market frozen as settled is swept and contributes 0; one frozen with a pricer is valued via expiry_market::snapshot_nav over its captured cash and tree shadows, then has its stamp cleared (releasing the tree snapshot), so later trades and the next flush start clean.
withdrawRequestsPending({dynamic arguments, String? package, Map<String, dynamic>? config}) → MoveCallBuilder
Return pending LP withdrawal count for SDK and devInspect queue reads.