import { Value } from '@emurgo/cardano-serialization-lib-browser';

declare global {
    interface Window {
        cardano: {
            [key: string]: {
                enable: () => Promise<Cip30Api>;
                isEnabled: () => Promise<boolean>;
            };
        };
    }
}
type User = {
    walletAddress: string | undefined;
    allHandles: string[] | undefined;
    preferredHandle: string | undefined;
    lovelaceBalance: string | undefined;
    lockedLovelace: string | undefined;
    walletNameSpace: string | undefined;
};
type Cip30Api = {
    getNetworkId: () => Promise<number>;
    getUnusedAddresses: () => Promise<string[]>;
    getUsedAddresses: () => Promise<string[]>;
    getUtxos: (amount?: any, paginate?: boolean) => Promise<string[]>;
    getBalance: () => Promise<string>;
    signTx: (txHex: string, partialSign?: boolean, complete?: boolean) => Promise<string>;
    submitTx: (txHex: string) => Promise<string>;
};
type WalletButtonProps = {
    theme: 'glam' | 'default';
};
type BtnWalletProps = {
    theme: 'glam' | 'default';
};
/**
 * @param txHash Transaction hash of the UTxO
 * @param txId Transaction index of the UTxO
 * @param ttl Time at which the transaction expires for this particular UTxO, expressed in UNIX time
 */
type utxoState = {
    txHash: string;
    txId: number;
    ttl: number;
    amount?: Value;
};
export type { User, Cip30Api, WalletButtonProps, utxoState, BtnWalletProps };
