UNPKG

@ceramicnetwork/core

Version:

Typescript implementation of the Ceramic protocol

11 lines 407 B
import { StateLink } from './state-link.js'; export function streamFromState(context, handlersMap, state, update$) { const handler = handlersMap.get(state.type); const state$ = new StateLink(state, update$); const stream = new handler.stream_constructor(state$, context); if (!update$) { stream.makeReadOnly(); } return stream; } //# sourceMappingURL=stream-from-state.js.map