import type { IFeeds, IMessageIPFSWithCID, ParsedResponseType, PushAPI, Rules } from '@pushprotocol/restapi'; import { TypedDataDomain, TypedDataField } from 'ethers'; import type { ReactElement } from 'react'; import type { ENV } from '../config'; export interface IMessageIPFS { cid?: string; chatId?: string; event?: string; from?: string; message?: IMessage; meta?: any; origin?: string; reference?: string; to?: string[]; fromCAIP10: string; toCAIP10: string; fromDID: string; toDID: string; messageType: string; messageContent: string; signature: string; sigType: string; link: string | null; timestamp?: number; encType: string; encryptedSecret: string | null; icon?: ReactElement; } interface IMessage { content: string | undefined; type: string | undefined; } export interface AccountEnvOptionsType { env?: ENV; account: string; signer: SignerType; user: PushAPI; } export interface ITheme { bgColorPrimary?: string; bgColorSecondary?: string; textColorPrimary?: string; textColorSecondary?: string; btnColorPrimary?: string; btnColorSecondary?: string; border?: string; borderRadius?: string; moduleColor?: string; } export type ethersV5SignerType = { _signTypedData: (domain: TypedDataDomain, types: Record>, value: Record) => Promise; getAddress: () => Promise; signMessage: (message: Uint8Array | string) => Promise; privateKey?: string; provider?: any; }; export type ethersV6SignerType = { signTypedData: (domain: TypedDataDomain, types: Record>, value: Record) => Promise; getAddress: () => Promise; signMessage: (message: Uint8Array | string) => Promise; privateKey?: string; provider?: any; }; export type viemSignerType = { signTypedData: (args: { account: any; domain: any; types: any; primaryType: any; message: any; }) => Promise<`0x${string}`>; getChainId: () => Promise; signMessage: (args: { message: any; account: any; [key: string]: any; }) => Promise<`0x${string}`>; account: { [key: string]: any; }; privateKey?: string; provider?: any; }; export type SignerType = ethersV5SignerType | ethersV6SignerType | viemSignerType; export type ParsedNotificationType = ParsedResponseType & { channel: string; }; export type NotificationFeedsType = { [key: string]: ParsedNotificationType; }; export type ChatFeedsType = { [key: string]: IFeeds; }; export interface Web3NameListType { [key: string]: string; } export declare const PUSH_TABS: { readonly CHATS: "CHATS"; readonly APP_NOTIFICATIONS: "APP_NOTIFICATIONS"; }; export declare const SOCKET_TYPE: { readonly CHAT: "chat"; readonly NOTIFICATION: "notification"; }; export declare const PUSH_SUB_TABS: { readonly REQUESTS: "REQUESTS"; readonly SPAM: "SPAM"; }; export declare const LOCAL_STORAGE_KEYS: { readonly CHATS: "CHATS"; }; export declare const SIDEBAR_PLACEHOLDER_KEYS: { readonly CHAT: "CHAT"; readonly SEARCH: "SEARCH"; readonly NOTIFICATION: "NOTIFICATION"; readonly NEW_CHAT: "NEW_CHAT"; }; export type SidebarPlaceholderKeys = typeof SIDEBAR_PLACEHOLDER_KEYS[keyof typeof SIDEBAR_PLACEHOLDER_KEYS]; export type LocalStorageKeys = typeof LOCAL_STORAGE_KEYS[keyof typeof LOCAL_STORAGE_KEYS]; export type PushTabs = typeof PUSH_TABS[keyof typeof PUSH_TABS]; export type PushSubTabs = typeof PUSH_SUB_TABS[keyof typeof PUSH_SUB_TABS]; export type SocketType = typeof SOCKET_TYPE[keyof typeof SOCKET_TYPE]; export interface FileMessageContent { content: string; name: string; type: string; size: number; } export type Messagetype = { messages: IMessageIPFS[]; lastThreadHash: string | null; }; export interface IGroup { members: { wallet: string; publicKey: string; isAdmin: boolean; image: string; }[]; pendingMembers: { wallet: string; publicKey: string; isAdmin: boolean; image: string; }[]; contractAddressERC20: string | null; numberOfERC20: number; contractAddressNFT: string | null; numberOfNFTTokens: number; verificationProof: string; groupImage: string | null; groupName: string; isPublic: boolean; groupDescription: string | null; groupCreator: string; chatId: string; groupType?: string | undefined; rules?: Rules | null; } export declare const MODAL_BACKGROUND_TYPE: { readonly OVERLAY: "OVERLAY"; readonly BLUR: "BLUR"; readonly TRANSPARENT: "TRANSPARENT"; }; export type ModalBackgroundType = keyof typeof MODAL_BACKGROUND_TYPE; export declare const MODAL_POSITION_TYPE: { readonly RELATIVE: "RELATIVE"; readonly GLOBAL: "GLOBAL"; }; export type ModalPositionType = keyof typeof MODAL_POSITION_TYPE; export interface IFrameButton { index: string; content: string; action?: string; target?: string; post_url?: string; } export interface FrameDetails { version: string | null; image: string | null; ogTitle: string | null; ogDescription: string | null; ogType: string | null; ogImage: string | null; siteURL: string | null; postURL: string | null; buttons: IFrameButton[]; inputText?: string | null; state?: string | null; ofProtocolIdentifier?: string | null; } export interface IFrame { isValidFrame: boolean; frameType: string; frameDetails?: FrameDetails; message?: string; } export interface IReactionsForChatMessages { [key: string]: IMessageIPFSWithCID[]; } export type WalletType = { name: string; url: string; }; export type AppMetaDataType = { name: string; logo: string; icon: string; description: string; recommendedInjectedWallets: WalletType[]; }; export type ChainType = { id: string; token: string; label: string; rpcUrl: string; }; export {};