(claim: SessionControllerClaim | undefined)
| 591 | } |
| 592 | |
| 593 | function normalizeClaim(claim: SessionControllerClaim | undefined): SessionControllerOwner | null { |
| 594 | if (!claim?.controllerId) return null; |
| 595 | return { id: claim.controllerId, kind: claim.controllerKind || 'unknown' }; |
| 596 | } |
| 597 | |
| 598 | function toBuffer(raw: unknown): Buffer | null { |
| 599 | if (Buffer.isBuffer(raw)) return raw; |