(ab: ArrayBuffer | undefined)
| 100 | c => c.codePointAt(0) ?? 0 |
| 101 | ) |
| 102 | const asBase64 = (ab: ArrayBuffer | undefined) => |
| 103 | btoa(String.fromCodePoint(...new Uint8Array(ab ?? []))) |
| 104 | .replaceAll('+', '-') |
| 105 | .replaceAll('/', '_') |
| 106 | |
| 107 | async function getPublicKey(username: string, create = false) { |
| 108 | const r = await fetch( |