import { IEthereumChain } from '@phantom/chain-interfaces'; declare function isInstalled(): boolean; type Extension = { isInstalled: typeof isInstalled; }; declare function createExtensionPlugin(): Plugin; declare module "../index" { interface Phantom { extension: Extension; } } type EthereumTransaction = { to?: string; from?: string; value?: string; gas?: string; gasPrice?: string; maxFeePerGas?: string; maxPriorityFeePerGas?: string; data?: string; nonce?: string; type?: string; chainId?: string; }; type EthereumSignInData = { address: `0x${string}`; chainId: number; domain: string; expirationTime?: Date | undefined; issuedAt?: Date | undefined; nonce: string; notBefore?: Date | undefined; requestId?: string | undefined; resources?: Array | undefined; scheme?: string | undefined; statement?: string | undefined; uri: string; version: "1"; }; type EthereumEventType = "connect" | "disconnect" | "accountsChanged" | "chainChanged"; interface PhantomEthereumProvider { isPhantom: boolean; selectedAddress: string | null; chainId: string; isConnected: boolean; request: (args: { method: string; params?: any[]; }) => Promise; on: (event: EthereumEventType, handler: (...args: any[]) => void) => void; off: (event: EthereumEventType, handler: (...args: any[]) => void) => void; removeAllListeners: (event?: EthereumEventType) => void; } declare function createEthereumPlugin(): Plugin; /** * Creates an EIP-4361 Sign In With Ethereum message. * * Adapted from viem's createSiweMessage implementation: * https://github.com/wevm/viem/blob/53d302049e166706fecde453ea984284dd180ca6/src/utils/siwe/createSiweMessage.ts * * Copyright (c) 2023-present weth, LLC * Licensed under the MIT License. */ declare function createSiweMessage({ address, chainId, domain, nonce, uri, version, scheme, statement: _statement, requestId, resources, issuedAt, expirationTime, notBefore, }: EthereumSignInData): string; declare module "../index" { interface Phantom { ethereum: IEthereumChain; } } type Plugin = { name: string; create: () => T; }; type CreatePhantomConfig = { plugins?: Plugin[]; }; interface Phantom { } /** * Creates a Phantom instance with the provided plugins. * Each plugin extends the Phantom interface via declaration merging. */ declare function createPhantom({ plugins }: CreatePhantomConfig): Phantom; export { CreatePhantomConfig as C, EthereumTransaction as E, Plugin as P, createSiweMessage as a, PhantomEthereumProvider as b, createEthereumPlugin as c, EthereumSignInData as d, EthereumEventType as e, Phantom as f, createPhantom as g, createExtensionPlugin as h, Extension as i, isInstalled as j };