Skip to main content

Crate algo_ops

Crate algo_ops 

Source
Expand description

Algorand implementation of the blockchain_ops traits, over algonaut.

AlgoOps is the low-level Algorand operations struct; it implements BlockChainOps, AssetOps, and TransactionQueryOps and provides the Algorand-specific AlgoOps::new_for_algorand constructor.

Re-exports§

pub use error::AlgoError;

Modules§

error

Structs§

AccountScanCache
A caller-owned incremental scan cache for the accounts opted into an application — the account-scan sibling of TxnScanCache, holding the accumulated account set (keyed by address) plus the last_round / last_updated watermark.
AccountScanPage
One page of a full opted-in-account scan: the page’s accounts, the next-page token (None at the end of the results), and the indexer’s current-round (the safe refresh watermark). Returned by the full-scan page fetcher AlgoOps::fetch_opted_in_accounts_cached drives; public so the engine can be unit-tested with a stubbed fetcher.
AlgoAccountFunds
An account’s balance and the minimum balance it must keep, both in µALGO — returned by AlgoOps::account_funds. Plain types only, like AlgoSuggestedParams.
AlgoChainConfig
Configuration for Algod and Indexer endpoints.
AlgoOps
Main operations struct analogous to Kotlin’s AlgoOps.
AlgoSuggestedParams
Neutral snapshot of the algod suggested transaction parameters, returned by AlgoOps::suggested_params.
ChangedAddressesPage
One page of the change-discovery scan an incremental account refresh runs: the addresses touched by app transactions past the watermark, the next-page token, and the indexer’s current-round. The account index has no min-round filter, so an incremental refresh finds which accounts to re-read through the app-scoped transaction index instead. Returned by the change-discovery fetcher AlgoOps::fetch_opted_in_accounts_cached drives; public so the engine can be unit-tested with a stubbed fetcher.
ConfirmedTxn
Neutral view of a pending or confirmed transaction, returned by the TransactionQueryOps reads.
DailyBudgetConfig
A wall-clock daily request cap aligned to a configurable start-of-day, independent of RateLimitConfig.
DailyBudgetState
A snapshot of the daily-budget window for persistence, returned by AlgoOps::daily_budget_state. A consumer persists {window_start_unix, spent} and, on boot, restores spent with AlgoOps::with_daily_spent iff the persisted window still matches the current one — resuming mid-day rather than from zero (a restart does not refill the provider’s quota).
RateLimitConfig
An optional outbound rate limit for algod/indexer calls.
ScannedAccount
An account opted into an application, as seen by the incremental cached account scanner (AlgoOps::fetch_opted_in_accounts_cached).
ScannedTxn
A confirmed transaction as seen by the incremental cached scanner (AlgoOps::fetch_transactions_cached).
TransactionGroupBuilder
Fluent builder for an atomic transaction group, created by AlgoOps::transaction_group.
TxnScanCache
A caller-owned incremental scan cache: the last fully-scanned round, the freshness stamp, and the accumulated caller-defined entries.
TxnScanFilter
Optional server-side narrowing for AlgoOps::fetch_transactions_cached, so the incremental fetch stays cheap. Every field is optional; an all-None filter scans every transaction.
TxnScanPage
One page of a cached transaction scan: the page’s confirmed transactions, the next-page token (None when the indexer reports no more results), and the indexer’s current-round (the safe refresh watermark). Returned by the page fetcher that AlgoOps::fetch_transactions_cached drives; public so the engine can be unit-tested with a stubbed fetcher.

Enums§

AppArg
Application argument type, similar to Kotlin variant handling.
CallKind
Which kind of request a retried call makes. It decides which HTTP statuses are retried and names the operation in warnings and errors, so an indexer failure is not reported as algod’s.
QueryMode
How AlgoOps::fetch_transactions_cached should treat the cache on this call.
RateLimitMode
What the outbound rate limiter does when the token bucket is empty.

Traits§

KeyProvider
Minimal key provider trait analogous to the Kotlin IKeyProvider interface.
TransactionQueryOps
Reads that locate a confirmed transaction and return it as a neutral ConfirmedTxn.

Functions§

address_to_byte_key
Decode first 32 bytes of an Algorand address’ base32 to get the public key.
byte_key_to_address
Build an Algorand address from a 32-byte public key.