isValidRespondAuthenticate static method
Implementation
static bool isValidRespondAuthenticate({
required int id,
required Map<int, PendingSessionAuthRequest> pendingRequests,
List<Cacao>? auths,
}) {
if (!pendingRequests.containsKey(id)) {
throw Errors.getInternalError(
Errors.MISSING_OR_INVALID,
context:
'approveSessionAuthenticate() Could not find pending auth request with id $id',
).toSignError();
}
if (auths == null || auths.isEmpty) {
throw Errors.getInternalError(
Errors.MISSING_OR_INVALID,
context:
'approveSessionAuthenticate() invalid response. Must contain Cacao signatures.',
).toSignError();
}
return true;
}