import { FeeOption, IntentDataSendTransaction, IntentResponseAccountFederated, IntentResponseAccountList, IntentResponseAuthInitiated, IntentResponseCode, IntentResponseGetSession, IntentResponseIdToken, IntentResponseValidationFinished, IntentResponseValidationStarted } from "../clients/intent.gen.js"; import { WebrpcEndpointError } from "../clients/authenticator.gen.js"; export type PayloadResponse = { code: string; data: T; }; export type ValidationRequiredResponse = { code: 'validationRequired'; data: { sessionId: string; }; }; type MetaTxnReceiptLog = { address: string; topics: string[]; data: string; }; type MetaTxnReceipt = { id: string; status: string; revertReason?: string | null; index: number; logs: MetaTxnReceiptLog[]; receipts: MetaTxnReceipt[]; txnReceipt: string; }; type SimulateResult = { executed: boolean; succeeded: boolean; result: string | null; reason: string | null; gasUsed: number; gasLimit: number; }; export type SentTransactionResponse = { code: 'transactionReceipt'; data: { txHash: string; metaTxHash: string; request: IntentDataSendTransaction; receipt: MetaTxnReceipt; nativeReceipt?: any | null; simulations?: SimulateResult[]; }; }; export type TransactionFailedResponse = { code: 'transactionFailed'; data: { error: string; request: IntentDataSendTransaction; simulations: SimulateResult[]; }; }; export type MaySentTransactionResponse = SentTransactionResponse | TransactionFailedResponse; export type FeeOptionsResponse = { code: 'feeOptions'; data: { feeOptions: FeeOption[]; feeQuote?: string; }; }; export type OpenSessionResponse = { code: 'sessionOpened'; data: { sessionId: string; wallet: string; }; }; export type CloseSessionResponse = { code: 'sessionClosed'; }; export type ListSessionsResponse = { code: 'listSessions'; data: { sessions: any[]; }; }; export type SignedMessageResponse = { code: 'signedMessage'; data: { message: string; signature: string; }; }; export type SignedTypedDataResponse = { code: 'signedTypedData'; data: { typedData: any; signature: string; }; }; export type SessionAuthProofResponse = { code: 'sessionAuthProof'; data: { sessionId: string; network: string; wallet: string; message: string; signature: string; }; }; export interface Response { code: Code; data: Data; } export type InitiateAuthResponse = Response; export type ValidateSessionResponse = Response; export type FinishValidateSessionResponse = Response; export type GetSessionResponse = Response; export type LinkAccountResponse = Response; export type ListAccountsResponse = Response; export type IdTokenResponse = Response; export declare function isInitiateAuthResponse(receipt: any): receipt is InitiateAuthResponse; export declare function isOpenSessionResponse(receipt: any): receipt is OpenSessionResponse; export declare function isSentTransactionResponse(receipt: any): receipt is SentTransactionResponse; export declare function isTimedOutTransactionResponse(receipt: any): receipt is SentTransactionResponse; export declare function isFailedTransactionResponse(receipt: any): receipt is TransactionFailedResponse; export declare function isMaySentTransactionResponse(receipt: any): receipt is MaySentTransactionResponse; export declare function isSignedMessageResponse(receipt: any): receipt is SignedMessageResponse; export declare function isSignedTypedDataResponse(receipt: any): receipt is SignedTypedDataResponse; export declare function isSessionAuthProofResponse(receipt: any): receipt is SessionAuthProofResponse; export declare function isFeeOptionsResponse(receipt: any): receipt is FeeOptionsResponse; export declare function isValidationRequiredResponse(receipt: any): receipt is ValidationRequiredResponse; export declare function isValidateSessionResponse(receipt: any): receipt is ValidateSessionResponse; export declare function isFinishValidateSessionResponse(receipt: any): receipt is FinishValidateSessionResponse; export declare function isCloseSessionResponse(receipt: any): receipt is CloseSessionResponse; export declare function isGetSessionResponse(receipt: any): receipt is GetSessionResponse; export declare function isLinkAccountResponse(receipt: any): receipt is LinkAccountResponse; export declare function isListAccountsResponse(receipt: any): receipt is ListAccountsResponse; export declare function isIntentTimeError(error: any): error is WebrpcEndpointError; export declare function isGetIdTokenResponse(receipt: any): receipt is IdTokenResponse; export {};