/** * The decoded link: the WAS server plus the controller secret AS A STRING. */ export interface WasLinkPayload { serverUrl: string; /** * The controller secret (already decoded back to the passphrase string). */ secret: string; } /** * The `t` discriminator member every `was-link` payload carries. */ export declare const WAS_LINK_TYPE = "was-link"; /** * Whether some scanned or pasted text has a `was-link` payload's JSON shape. * Matched structurally on the `t` member rather than by calling the parser, * so an unrelated JSON blob is not refused with a connection-code error * message. This is the recognizer a wallet hands `@interop/wallet-request`'s * input classifier for its `was-link` branch; whether the payload is valid * is {@link parseWasLinkPayload}'s answer. * * @param text {string} * @returns {boolean} */ export declare function isWasLinkPayload(text: string): boolean; /** * Encodes a passphrase into the payload's `secret` field: `base64url(utf8(...))`, * no padding. * * @param passphrase {string} * @returns {string} */ export declare function encodeWasLinkSecret(passphrase: string): string; /** * Builds the full `was-link` payload string a QR encodes. * * @param options {object} * @param options.serverUrl {string} * @param options.passphrase {string} * @returns {string} */ export declare function buildWasLinkPayload({ serverUrl, passphrase }: { serverUrl: string; passphrase: string; }): string; /** * Parses and validates a scanned payload, returning the server URL and the * decoded string secret. Throws {@link HumanReadableError} for anything that is * not a valid current-version `was-link` payload (so the scanner shows a clean * message rather than mis-handling an unrelated QR). * * @param raw {string} the raw scanned code value * @returns {WasLinkPayload} */ export declare function parseWasLinkPayload(raw: string): WasLinkPayload; //# sourceMappingURL=wasLink.d.ts.map