(bytes: Uint8Array)
| 126 | } |
| 127 | |
| 128 | const decodeUtf8 = (bytes: Uint8Array) => |
| 129 | Effect.try({ |
| 130 | try: () => textDecoder.decode(bytes), |
| 131 | catch: (cause) => |
| 132 | new EventLogSessionAuthError({ |
| 133 | reason: "InvalidPayload", |
| 134 | message: "Session auth payload contains invalid UTF-8 bytes", |
| 135 | cause |
| 136 | }) |
| 137 | }) |
| 138 | |
| 139 | const assertSigningPublicKeyLength = (signingPublicKey: Uint8Array): Effect.Effect<void, EventLogSessionAuthError> => { |
| 140 | if (signingPublicKey.byteLength === Ed25519PublicKeyLength) return Effect.void |
no outgoing calls
no test coverage detected