@xylabs/sdk-react
    Preparing search index...

    Interface EthWallet

    Base interface for wallet state and interaction

    interface EthWallet {
        additionalAccounts?: string[];
        chainId?: number;
        chainName?: string;
        connectError?: Error;
        connectRefused?: boolean;
        connectWallet?: () => Promise<string[] | null | undefined>;
        currentAccount?: EthAddressWrapper;
        installed?: boolean;
        provider?: BrowserProvider;
        providerInfo?: EIP6963ProviderInfo;
        providerName?: string;
        rawProvider?: Eip1193Provider;
        signer?: JsonRpcSigner;
        signerAddress?: EthAddressWrapper;
        signMessage?: (
            message: string,
            address?: string,
        ) => Promise<string | undefined>;
        signTypedMessage?: (
            domain: TypedDataDomain,
            types: TypedDataTypes,
            value: TypedDataValues,
            allowedAccount?: string,
        ) => Promise<string | undefined>;
        verifyTypedDataSignature?: (
            domain: TypedDataDomain,
            types: TypedDataTypes,
            value: TypedDataValues,
            signature: string,
            expectedSignerAddress: string,
        ) => boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    additionalAccounts?: string[]
    chainId?: number
    chainName?: string
    connectError?: Error
    connectRefused?: boolean
    connectWallet?: () => Promise<string[] | null | undefined>
    currentAccount?: EthAddressWrapper
    installed?: boolean
    provider?: BrowserProvider
    providerInfo?: EIP6963ProviderInfo
    providerName?: string
    rawProvider?: Eip1193Provider
    signer?: JsonRpcSigner
    signerAddress?: EthAddressWrapper
    signMessage?: (message: string, address?: string) => Promise<string | undefined>
    signTypedMessage?: (
        domain: TypedDataDomain,
        types: TypedDataTypes,
        value: TypedDataValues,
        allowedAccount?: string,
    ) => Promise<string | undefined>

    Type Declaration

      • (
            domain: TypedDataDomain,
            types: TypedDataTypes,
            value: TypedDataValues,
            allowedAccount?: string,
        ): Promise<string | undefined>
      • Sign a typed message with a specific account enabled in the wallet according to EIP-712

        Parameters

        • domain: TypedDataDomain

          eip712Domain

        • types: TypedDataTypes

          A specific field of a structured eip-712 type.

        • value: TypedDataValues

          The contents of the message to sign

        • OptionalallowedAccount: string

          Account being used to sign the message

        Returns Promise<string | undefined>

        see - https://eips.ethereum.org/EIPS/eip-712

    verifyTypedDataSignature?: (
        domain: TypedDataDomain,
        types: TypedDataTypes,
        value: TypedDataValues,
        signature: string,
        expectedSignerAddress: string,
    ) => boolean