Builds canonical binary transcripts and challenge plaintexts for relay host authentication proofs using domain-separated encoding for HMAC/box crypto.
// Source: https://github.com/stablyai/orca | License: MIT | Copyright 2026 Lovecast Inc
// Provided via justclaw.it.com; keep this notice with the code.
const textEncoder = new TextEncoder()
export const HOST_PROOF_TRANSCRIPT_DOMAIN = 'orca-relay-host-proof/v1'
export const HOST_CHALLENGE_PLAINTEXT_DOMAIN = 'orca-relay-host-challenge/v1'
export const HOST_CHALLENGE_BOX_ALGORITHM = 'Curve25519-XSalsa20-Poly1305'
export const HOST_PROOF_ALGORITHM = 'HMAC-SHA-256'
export interface HostProofTranscriptInput {
relayOrigin: string
relayEphemeralPublicKey: Uint8Array
challengeNonce: Uint8Array
challengeId: string
issuedAt: number
expiresAt: number
userId: string
profileId: string
organizationId: string
relayHostId: string
hostPublicKey: Uint8Array
assignmentEpoch: number
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key