import { Computed } from '@tma.js/signals'; import { InitData as InitDataType } from '@tma.js/types'; import { either as E, option as O } from 'fp-ts'; export interface InitDataOptions { /** * Retrieves init data from the current environment. */ retrieveInitData: () => E.Either>; } export declare class InitData { constructor({ retrieveInitData }: InitDataOptions); private fromState; private readonly _state; private readonly _raw; /** * Complete component state. */ readonly state: Computed; /** * @see InitDataType.auth_date */ readonly authDate: Computed; /** * @see InitDataType.can_send_after */ readonly canSendAfter: Computed; /** * Date after which it is allowed to call * the [answerWebAppQuery](https://core.telegram.org/bots/api#answerwebappquery) method. */ readonly canSendAfterDate: Computed; /** * @see InitDataType.chat */ readonly chat: Computed; /** * @see InitDataType.chat_type */ readonly chatType: Computed; /** * @see InitDataType.chat_instance */ readonly chatInstance: Computed; /** * @see InitDataType.hash */ readonly hash: Computed; /** * @see InitDataType.query_id */ readonly queryId: Computed; /** * Raw representation of init data. */ readonly raw: Computed; /** * @see InitDataType.receiver */ readonly receiver: Computed; /** * @see InitDataType.signature */ readonly signature: Computed; /** * @see InitDataType.start_param */ readonly startParam: Computed; /** * @see InitDataType.user */ readonly user: Computed; /** * Restores the component state. */ readonly restoreFp: () => E.Either; /** * @see restoreFp */ readonly restore: () => void; }