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§
Structs§
- Account
Scan Cache - 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 thelast_round/last_updatedwatermark. - Account
Scan Page - One page of a full opted-in-account scan: the page’s accounts, the next-page token (
Noneat the end of the results), and the indexer’scurrent-round(the safe refresh watermark). Returned by the full-scan page fetcherAlgoOps::fetch_opted_in_accounts_cacheddrives; public so the engine can be unit-tested with a stubbed fetcher. - Algo
Account Funds - An account’s balance and the minimum balance it must keep, both in µALGO — returned by
AlgoOps::account_funds. Plain types only, likeAlgoSuggestedParams. - Algo
Chain Config - Configuration for Algod and Indexer endpoints.
- AlgoOps
- Main operations struct analogous to Kotlin’s AlgoOps.
- Algo
Suggested Params - Neutral snapshot of the algod suggested transaction parameters, returned by
AlgoOps::suggested_params. - Changed
Addresses Page - 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 fetcherAlgoOps::fetch_opted_in_accounts_cacheddrives; public so the engine can be unit-tested with a stubbed fetcher. - Confirmed
Txn - Neutral view of a pending or confirmed transaction, returned by the
TransactionQueryOpsreads. - Daily
Budget Config - A wall-clock daily request cap aligned to a configurable start-of-day, independent of
RateLimitConfig. - Daily
Budget State - 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, restoresspentwithAlgoOps::with_daily_spentiff the persisted window still matches the current one — resuming mid-day rather than from zero (a restart does not refill the provider’s quota). - Rate
Limit Config - An optional outbound rate limit for algod/indexer calls.
- Scanned
Account - An account opted into an application, as seen by the incremental cached account scanner
(
AlgoOps::fetch_opted_in_accounts_cached). - Scanned
Txn - A confirmed transaction as seen by the incremental cached scanner
(
AlgoOps::fetch_transactions_cached). - Transaction
Group Builder - Fluent builder for an atomic transaction group, created by
AlgoOps::transaction_group. - TxnScan
Cache - A caller-owned incremental scan cache: the last fully-scanned round, the freshness stamp, and the accumulated caller-defined entries.
- TxnScan
Filter - Optional server-side narrowing for
AlgoOps::fetch_transactions_cached, so the incremental fetch stays cheap. Every field is optional; an all-Nonefilter scans every transaction. - TxnScan
Page - One page of a cached transaction scan: the page’s confirmed transactions, the next-page token
(
Nonewhen the indexer reports no more results), and the indexer’scurrent-round(the safe refresh watermark). Returned by the page fetcher thatAlgoOps::fetch_transactions_cacheddrives; public so the engine can be unit-tested with a stubbed fetcher.
Enums§
- AppArg
- Application argument type, similar to Kotlin variant handling.
- Call
Kind - 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.
- Query
Mode - How
AlgoOps::fetch_transactions_cachedshould treat the cache on this call. - Rate
Limit Mode - What the outbound rate limiter does when the token bucket is empty.
Traits§
- KeyProvider
- Minimal key provider trait analogous to the Kotlin IKeyProvider interface.
- Transaction
Query Ops - 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.