Merge main: relay hotfixes and the docs pages
Conflicts were comment wording only, from the WordPress purge. Kept this
branch's prose: main's side carries the rename's artifacts ('the the
previous platform'), and the code either side registers is identical.
Verified after resolving — one api index, no wp-json index, the
federation refusal path, HomeRelays, and FN_ACCOUNTS_URL all present.
This commit is contained in:
@@ -84,6 +84,29 @@ class PublishedVectorsTest {
|
||||
assertEquals(12, formatted.split(" ").size)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `account identity encodes exactly as published`() {
|
||||
val ai = vectors.getJSONObject("accountIdentity")
|
||||
val key = java.util.Base64.getDecoder().decode(ai.getString("accountKeyB64"))
|
||||
|
||||
assertEquals(ai.getString("encoded"), FNID.encode(key))
|
||||
assertEquals(ai.getString("address"), FNID.address(key))
|
||||
|
||||
val claim = ai.getJSONObject("claim")
|
||||
val input = claim.getJSONObject("input")
|
||||
assertEquals(
|
||||
claim.getString("canonical"),
|
||||
String(
|
||||
FNID.claimCanonical(
|
||||
audience = input.getString("audience"),
|
||||
userId = input.getLong("userId"),
|
||||
accountKeyB64 = input.getString("accountKeyB64"),
|
||||
),
|
||||
Charsets.UTF_8,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `canonical leaf encodes and hashes exactly as published`() {
|
||||
val leaf = vectors.getJSONObject("keyLog").getJSONObject("canonicalLeaf")
|
||||
|
||||
Reference in New Issue
Block a user