WalrusChainReader class

Reads Walrus objects and state from Sui.

Constructors

WalrusChainReader({required SuiGrpcClient sui, required WalrusPackageConfig packageConfig, required String walCoinType, Duration cacheFor = const Duration(minutes: 1)})
WalrusChainReader.forNetwork(WalrusNetwork network, {SuiGrpcClient? sui})
A reader for one of the public networks.
factory

Properties

cacheFor → Duration
How long a system snapshot is reused. Prices and the committee change at most once per epoch, but a stale shard count would give a wrong blob ID, so the cache is short.
final
hashCode → int
The hash code for this object.
no setterinherited
packageConfig → WalrusPackageConfig
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sui → SuiGrpcClient
final
walCoinType → String
The WAL coin type storage is paid in.
final

Methods

balances(String owner) → Future<WalrusWalletBalances>
The SUI and WAL owner holds.
blobObject(String objectId) → Future<WalrusBlobObject>
Read a Walrus Blob object. Throws WalrusClientError if the object is not a Walrus blob on this network.
createdObjects(String digest, {required String type, Duration timeout = const Duration(seconds: 60)}) → Future<List<String>>
Wait for transaction digest, check that it succeeded, and return the IDs of the objects of type it created.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Forget the cached system snapshot.
serializeForWallet(Transaction tx, String sender) → Future<String>
Serialize tx for a wallet, with sender set and its WAL and SUI payments (CoinWithBalance intents) resolved against sender's coins and address balance, the way @mysten/sui's dApp Kit does before it calls sui:signAndExecuteTransaction. The wallet adds gas.
system() → Future<WalrusSystemSnapshot>
The current system snapshot, cached for cacheFor.
toString() → String
A string representation of this object.
inherited
waitForSuccess(String digest, {Duration timeout = const Duration(seconds: 60)}) → Future<void>
Wait until transaction digest is visible and check that it succeeded.

Operators

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