getBlob method
Get a WalrusBlob by blob ID for lazy reading.
Returns a WalrusBlob backed by a BlobReader that lazily fetches data from storage nodes. Use WalrusBlob.asFile() for single-file blobs, or WalrusBlob.files() for quilt-based files.
Mirrors the TS SDK's getBlob().
Implementation
Future<WalrusBlob> getBlob({required String blobId}) async {
final state = await _stateReader.systemState();
final reader = BlobReader(
blobId: blobId,
numShards: state.nShards,
readBlob: (id) => readBlob(blobId: id),
readSecondarySliver: (id, index) =>
getSecondarySliver(blobId: id, sliverIndex: index),
);
return WalrusBlob.fromReader(reader: reader, client: this);
}