Align chat endpoints with "distinguished key" changes in key transparency service

This commit is contained in:
Katherine
2024-08-15 14:35:15 -04:00
committed by GitHub
parent 97e566d470
commit 2aa1eee29d
6 changed files with 136 additions and 45 deletions

View File

@@ -45,7 +45,10 @@ public record KeyTransparencyMonitorRequest(
Optional<List<@Positive Long>> usernameHashPositions,
@Schema(description = "The tree head size to prove consistency against.")
Optional<@Positive Long> lastTreeHeadSize
Optional<@Positive Long> lastNonDistinguishedTreeHeadSize,
@Schema(description = "The distinguished tree head size to prove consistency against.")
Optional<@Positive Long> lastDistinguishedTreeHeadSize
) {
@AssertTrue

View File

@@ -33,6 +33,9 @@ public record KeyTransparencySearchRequest(
@Schema(description = "The username hash to look up, encoded in web-safe unpadded base64.")
Optional<byte[]> usernameHash,
@Schema(description = "The tree head size to prove consistency against.")
Optional<@Positive Long> lastTreeHeadSize
@Schema(description = "The non-distinguished tree head size to prove consistency against.")
Optional<@Positive Long> lastTreeHeadSize,
@Schema(description = "The distinguished tree head size to prove consistency against.")
Optional<@Positive Long> distinguishedTreeHeadSize
) {}