executeWriteBlobAttributesTransaction method
Execute a transaction that writes attributes to a blob.
Reads existing attributes, builds a transaction, then signs and executes it. Returns the transaction digest.
Mirrors the TS SDK's executeWriteBlobAttributesTransaction().
Implementation
Future<String> executeWriteBlobAttributesTransaction({
required String blobObjectId,
required Map<String, String?> attributes,
required SuiAccount signer,
}) async {
final tx = await writeBlobAttributesTransaction(
blobObjectId: blobObjectId,
attributes: attributes,
);
tx.setSender(signer.getAddress());
final result = await suiClient.signAndExecuteTransactionBlock(
signer,
tx,
responseOptions: SuiTransactionBlockResponseOptions(
showEffects: true,
showObjectChanges: true,
),
);
return result.digest;
}