signAllWithPrivateKey method

AuthorizationBatch signAllWithPrivateKey(
  1. Uint8List privateKey
)

Signs all authorizations in the batch with a private key.

Returns a new batch with all authorizations signed.

Implementation

AuthorizationBatch signAllWithPrivateKey(Uint8List privateKey) {
  final signedBatch = AuthorizationBatch();

  for (final authorization in _authorizations) {
    final signedAuth = authorization.sign(privateKey);
    signedBatch.add(signedAuth);
  }

  return signedBatch;
}