@nktkas/hyperliquid
Version:
Unofficial Hyperliquid API SDK for all major JS runtimes, written in TypeScript and provided with tests
23 lines • 902 B
TypeScript
import type { Hex } from "../base.js";
/** Abstract interface for a [window.ethereum](https://eips.ethereum.org/EIPS/eip-1193) object. */
export interface AbstractWindowEthereum {
request(args: {
method: any;
params: any;
}): Promise<any>;
}
/** Signs typed data using `window.ethereum` (EIP-1193) with `eth_signTypedData_v4` (EIP-712). */
export declare function signTypedDataWithWindowEthereum(ethereum: AbstractWindowEthereum, domain: {
name: string;
version: string;
chainId: number;
verifyingContract: Hex;
}, types: {
[key: string]: {
name: string;
type: string;
}[];
}, message: Record<string, unknown>): Promise<Hex>;
/** Checks if the given value is an abstract `window.ethereum` object. */
export declare function isAbstractWindowEthereum(client: unknown): client is AbstractWindowEthereum;
//# sourceMappingURL=_window.d.ts.map