certify method
Transaction
certify()
Step 4: Build the certify transaction.
Implementation
Transaction certify() {
if (_step != _WriteFilesFlowStep.uploaded) {
throw StateError('Must call upload() before certify()');
}
if (_certificate == null) {
throw StateError('No certificate available for certification');
}
// Determine committee size for signers→bitmap conversion.
final committeeSize =
_committee?.nodes.length ??
((_certificate!.signers.isEmpty
? 0
: _certificate!.signers.reduce((a, b) => a > b ? a : b) + 1));
final tx = _txBuilder.certifyBlobTransaction(
CertifyBlobOptions(
blobId: _metadata!.blobId,
blobObjectId: _blobObjectId!,
deletable: _deletable,
certificate: _certificate,
committeeSize: committeeSize,
),
);
_step = _WriteFilesFlowStep.certified;
return tx;
}