@nktkas/hyperliquid
Version:
Hyperliquid API SDK for all major JS runtimes, written in TypeScript.
41 lines (40 loc) • 1.45 kB
TypeScript
/// <amd-module name="file:///home/runner/work/hyperliquid/hyperliquid/src/api/info/_methods/gossipRootIps.ts" />
import * as v from "valibot";
/**
* Request gossip root IPs.
* @see null
*/
export declare const GossipRootIpsRequest: v.ObjectSchema<{
/** Type of request. */
readonly type: v.LiteralSchema<"gossipRootIps", undefined>;
}, undefined>;
export type GossipRootIpsRequest = v.InferOutput<typeof GossipRootIpsRequest>;
/**
* Array of gossip root IPs.
* @see null
*/
export type GossipRootIpsResponse = `${number}.${number}.${number}.${number}`[];
import type { InfoConfig } from "./_base/mod.js";
/**
* Request gossip root IPs.
*
* @param config General configuration for Info API requests.
* @param signal {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal} to cancel the request.
* @return Array of gossip root IPs.
*
* @throws {ValidationError} When the request parameters fail validation (before sending).
* @throws {TransportError} When the transport layer throws an error.
*
* @example
* ```ts
* import { HttpTransport } from "@nktkas/hyperliquid";
* import { gossipRootIps } from "@nktkas/hyperliquid/api/info";
*
* const transport = new HttpTransport(); // or `WebSocketTransport`
*
* const data = await gossipRootIps({ transport });
* ```
*
* @see null
*/
export declare function gossipRootIps(config: InfoConfig, signal?: AbortSignal): Promise<GossipRootIpsResponse>;