writeBlobFlow method
Create a multi-step write blob flow for dApp wallet integration.
Returns a WriteBlobFlow whose register() and certify() methods
return unsigned Transaction objects for external signing.
In direct mode (no relay), the flow encodes the blob client-side
and writes slivers to storage nodes during the upload() step.
Implementation
Future<WriteBlobFlow> writeBlobFlow({
required Uint8List blob,
BlobMetadata? metadata,
}) async {
if (_relayClient == null) _requireDirectSigning();
final committee = _relayClient == null ? await getCommittee() : _committee;
final txBuilder = await _ensureTxBuilder();
await _ensureTipConfig();
return WriteBlobFlow(
blob: blob,
txBuilder: txBuilder,
relayClient: _relayClient,
tipConfig: _tipConfig,
encoder: encoder ?? WalrusBlobEncoder(),
precomputedMetadata: metadata,
committee: committee,
directClient: _relayClient == null ? this : null,
stateReader: _stateReader,
suiClient: suiClient,
);
}