executeDeleteBlobTransaction method

Future<String> executeDeleteBlobTransaction({
  1. required String blobObjectId,
  2. required SuiAccount signer,
})

Execute a transaction that deletes a deletable blob.

Builds and signs a delete_blob transaction using signer. Returns the transaction digest.

Mirrors the TS SDK's executeDeleteBlobTransaction().

Implementation

Future<String> executeDeleteBlobTransaction({
  required String blobObjectId,
  required SuiAccount signer,
}) async {
  final txBuilder = await _ensureTxBuilder();
  final tx = txBuilder.deleteBlobTransaction(blobObjectId: blobObjectId);
  tx.setSender(signer.getAddress());

  final result = await suiClient.signAndExecuteTransactionBlock(
    signer,
    tx,
    responseOptions: SuiTransactionBlockResponseOptions(
      showEffects: true,
      showObjectChanges: true,
    ),
  );

  return result.digest;
}