(bytes: Uint8Array)
| 135 | }> {} |
| 136 | |
| 137 | const decodeUtf8 = (bytes: Uint8Array) => |
| 138 | Effect.try({ |
| 139 | try: () => textDecoder.decode(bytes), |
| 140 | catch: (cause) => |
| 141 | new EventLogSessionAuthError({ |
| 142 | reason: "InvalidPayload", |
| 143 | message: "Session auth payload contains invalid UTF-8 bytes", |
| 144 | cause |
| 145 | }) |
| 146 | }) |
| 147 | |
| 148 | const assertSigningPublicKeyLength = (signingPublicKey: Uint8Array): Effect.Effect<void, EventLogSessionAuthError> => { |
| 149 | if (signingPublicKey.byteLength === Ed25519PublicKeyLength) return Effect.void |
no test coverage detected