UNPKG

@slashid/react

Version:

React SDK for the /id platform

15 lines 625 B
import type { SlashID, PublicReadEvents } from "@slashid/slashid"; export type Event = PublicReadEvents[keyof PublicReadEvents]; type EventNames = keyof PublicReadEvents; export type EventCallback = (event: Event) => void; export type CreateEventBufferArgs = { sdk: SlashID; }; export type EventBuffer = { subscribe: (eventName: EventNames, handler: EventCallback) => void; unsubscribe: (eventName: EventNames, handler: EventCallback) => void; destroy: () => void; }; export declare function createEventBuffer({ sdk }: CreateEventBufferArgs): EventBuffer; export {}; //# sourceMappingURL=event-buffer.d.ts.map