/** * @license * Copyright 2024 Boxo pte. ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import type { MiniappEvent, HostAppResponse } from '../types'; /** * Create a message to send to miniapp */ export declare function createMiniappMessage(handler: string, params: any, requestId?: string | number): MiniappEvent; /** * Create a response to send back to miniapp * * Note: js-sdk expects the response in a specific format: * - For login: data should contain { token, refresh_token } (not wrapped in payload) * - request_id should be inside the data field */ export declare function createHostResponse(handler: string, data: any, requestId?: string | number): HostAppResponse; /** * Create error response */ export declare function createErrorResponse(handler: string, error: any, requestId?: string | number): HostAppResponse; //# sourceMappingURL=messageHelpers.d.ts.map