UNPKG

@agoric/zoe

Version:

Zoe: the Smart Contract Framework for Offer Enforcement

48 lines 1.6 kB
export { SubscriberShape }; export const PublicTopicShape: import("@endo/patterns").Matcher; /** * @template {object} T topic value * @typedef {{ * description?: string, * subscriber: Subscriber<T>, * storagePath: ERef<string>, * }} PublicTopic */ /** * A {PublicTopic} in which the `storagePath` is always a resolved string and the `subscriber is remote. * * Useful when working with Vows and async-flow. * * @template {object} T topic value * @typedef {{ * description?: string, * subscriber: Remote<Subscriber<T>>, * storagePath: string, * }} ResolvedPublicTopic */ export const TopicsRecordShape: import("@endo/patterns").Matcher; export function makeRecorderTopic<T>(description: string, recorderKit: import("./recorder.js").RecorderKit<T> | import("./recorder.js").EventualRecorderKit<T>): PublicTopic<T>; export type PublicTopic<T extends unknown> = { description?: string; subscriber: Subscriber<T>; storagePath: ERef<string>; }; /** * A {PublicTopic} in which the `storagePath` is always a resolved string and the `subscriber is remote. * * Useful when working with Vows and async-flow. */ export type ResolvedPublicTopic<T extends unknown> = { description?: string; subscriber: Remote<Subscriber<T>>; storagePath: string; }; export type TopicsRecord = { [topicName: string]: PublicTopic<unknown>; }; export type ResolvedTopicsRecord = { [topicName: string]: ResolvedPublicTopic<unknown>; }; import { SubscriberShape } from '@agoric/notifier'; import type { Remote } from '@agoric/internal'; //# sourceMappingURL=topics.d.ts.map