MCPcopy Create free account
hub / github.com/Effect-TS/effect / encodeRemoteIdField

Function encodeRemoteIdField

packages/effect/src/eventlog/EventLogSessionAuth.ts:254–257  ·  view source on GitHub ↗
(remoteId: string | Uint8Array)

Source from the content-addressed store, hash-verified

252}
253
254const encodeRemoteIdField = (remoteId: string | Uint8Array): Uint8Array =>
255 typeof remoteId === "string"
256 ? textEncoder.encode(remoteId)
257 : textEncoder.encode(bytesToHex(remoteId))
258
259/**
260 * Encodes a session authentication payload into the canonical byte format.

Callers 1

Calls 2

bytesToHexFunction · 0.85
encodeMethod · 0.80

Tested by

no test coverage detected