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

Function decodeIdentityString

packages/effect/src/unstable/eventlog/EventLog.ts:458–464  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

456 * @since 4.0.0
457 */
458export const decodeIdentityString = (value: string): Identity["Service"] => {
459 const decoded = Schema.decodeUnknownSync(IdentityStringSchema)(value)
460 return {
461 publicKey: decoded.publicKey,
462 privateKey: Redacted.make(decoded.privateKey as Uint8Array<ArrayBuffer>)
463 }
464}
465
466/**
467 * Encodes an event-log identity as a base64url string containing the public key

Callers

nothing calls this directly

Calls 2

decodeUnknownSyncMethod · 0.80
makeMethod · 0.65

Tested by

no test coverage detected