import { type UserSession as AuthUserSession } from '@futureverse/auth';
import { Environment, Address as SdkAddress } from '@futureverse/experience-sdk';
import * as t from '@sylo/io-ts';
import { Hex } from 'viem';
import { CreatedPayload } from 'xumm-sdk/dist/src/types';
import { GenericTokenBalancesQuery, NftsQuery } from '../__generated__/graphql';
export interface Address {
    eoa: string;
    chainId: number;
}
export type UserSession = AuthUserSession;
export interface FVEnvironmentConfig {
    clientId: string;
    redirectUri: string;
    environment?: Environment;
}
export type NFT = NonNullable<NftsQuery['nfts']>['edges'][number]['node'];
export type TokenRaw = NonNullable<GenericTokenBalancesQuery['genericTokenBalances']>['edges'];
export declare const WagmiConnectorId: t.UnionC<[t.LiteralC<"metaMaskSDK">, t.LiteralC<"walletConnect">, t.LiteralC<"coinbaseWalletSDK">, t.LiteralC<"futureverseCustodialEmail">, t.LiteralC<"futureverseCustodialFacebook">, t.LiteralC<"futureverseCustodialGoogle">]>;
export type WagmiConnectorId = t.TypeOf<typeof WagmiConnectorId>;
export type XamanConnectorId = 'Xaman';
export type ConnectorId = WagmiConnectorId | XamanConnectorId;
export type XamanSignMessageParams = {
    instructions?: string;
    genesisHash: string;
    accountNonce: string;
    maxBlockNumber: string;
    hashedExtrinsicWithoutPrefix: string;
};
export declare const XamanSignInTxResponse: t.TypeC<{
    AccountTxnID: t.UnionC<[t.UndefinedC, t.NullC, t.StringC]>;
    SigningPubKey: t.StringC;
    TxnSignature: t.StringC;
    Account: t.StringC;
}>;
export type XamanSignInTxResponse = t.TypeOf<typeof XamanSignInTxResponse>;
export type SignMessageResponse = {
    signedMessage: HexString | string;
    signature: HexString;
    details: XamanSignInTxResponse | null;
};
export declare const HexString: t.BrandC<t.Type<string, string, unknown>, t.HexString>;
export type HexString = t.TypeOf<typeof HexString>;
export type SignMessageCallbacks = {
    onRejected?: () => void;
    onCreated?: (createdPayload: CreatedPayload) => void;
    onOpened?: () => void;
};
export type SignMessageFunctionWagmiArgs = {
    connectorId: WagmiConnectorId;
    body: {
        message: HexString | string;
    };
};
export type SignMessageFunctionXamanArgs = {
    connectorId: XamanConnectorId;
    body: XamanSignMessageParams;
    signMessageCallbacks?: SignMessageCallbacks;
};
export type SignMessageFunction = (payload: SignMessageFunctionWagmiArgs | SignMessageFunctionXamanArgs) => Promise<SignMessageResponse>;
export type GetEthAccountFunction = (connectorId: ConnectorId, signMessageCallbacks?: SignMessageCallbacks) => Promise<{
    eoa: SdkAddress;
    publicKey: Hex | null;
    transaction: string | null;
}>;
export interface ILoginAdapter {
    /**
     * Returns EOA for Wagmi, rAddress for Xaman.
     */
    connect(connector: ConnectorId): Promise<string> | Promise<void>;
    signMessage: SignMessageFunction;
    getEthAccount: GetEthAccountFunction;
}
