/** * How a signal's name and data ride inside one string. * * `SYNC_SIGNAL` reuses the sync frame's single payload field, so the app's name * for the signal and whatever it sends with it have to share it. A two-key JSON * object is the whole format: `{"n":"file.sending","d":"photo"}`. * * Short keys on purpose. A signal is capped at two kilobytes by the relay, and * spending eight of them on the word "name" would be spending somebody else's * budget. * * The relay never parses this. Only the two ends do, which is what keeps the * platform blind to what an app's signals mean. */ /** * Built by hand rather than from an object, so the two keys always come out in * the same order. An object's key order is its own business, and a format that * depends on it is a format that differs between platforms. */ export declare function encodeSignal(name: string, data: string): string; /** * Reads a signal back, or null when it is not one of ours. * * A signal from a newer app that carries something this one has never heard of * still reads as a name and some data, because nothing here interprets either. */ export declare function decodeSignal(payload: string): { name: string; data: string; } | null;