WriteBlobFlow class

Multi-step write blob flow for wallet integration.

This flow separates transaction building from signing, allowing external wallets (dApp Kit, WalletConnect) to handle signing.

Usage:

final flow = directClient.writeBlobFlow(blob: rawData);

// Step 1: Encode (compute metadata)
await flow.encode();

// Step 2: Get register transaction → sign externally
final registerTx = flow.register(WriteBlobFlowRegisterOptions(
  epochs: 3,
  owner: myAddress,
  deletable: true,
));
final registerResult = await wallet.signAndExecute(registerTx);

// Step 3: Upload to relay
await flow.upload(WriteBlobFlowUploadOptions(
  digest: registerResult.digest,
));

// Step 4: Get certify transaction → sign externally
final certifyTx = flow.certify();
await wallet.signAndExecute(certifyTx);

// Step 5: Get result
final result = await flow.getBlob();
print('Blob ID: ${result.blobId}');

Constructors

WriteBlobFlow({required Uint8List blob, required WalrusTransactionBuilder txBuilder, UploadRelayClient? relayClient, UploadRelayTipConfig? tipConfig, BlobEncoder? encoder, int? numShards, BlobMetadata? precomputedMetadata, CommitteeInfo? committee, dynamic directClient, SystemStateReader? stateReader, dynamic suiClient})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

certify() → Transaction
Step 4: Build the certify transaction.
encode() Future<void>
Step 1: Encode the blob and compute metadata.
getBlob() Future<WriteBlobResult>
Step 5: Get the final blob result.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register(WriteBlobFlowRegisterOptions options) Future<Transaction>
Step 2: Build the register transaction.
toString() String
A string representation of this object.
inherited
upload(WriteBlobFlowUploadOptions options) Future<void>
Step 3: Upload the blob data.

Operators

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