interface SuiHTTPTransportOptions {
    WebSocketConstructor?: {
        CLOSED: 3;
        CLOSING: 2;
        CONNECTING: 0;
        OPEN: 1;
        prototype: WebSocket;
        new (url, protocols?): WebSocket;
    };
    fetch?: ((input, init?) => Promise<Response>);
    rpc?: {
        headers?: HttpHeaders;
        url?: string;
    };
    url: string;
    websocket?: WebsocketClientOptions & {
        url?: string;
    };
}

Properties

WebSocketConstructor?: {
    CLOSED: 3;
    CLOSING: 2;
    CONNECTING: 0;
    OPEN: 1;
    prototype: WebSocket;
    new (url, protocols?): WebSocket;
}

Type declaration

    • new (url, protocols?): WebSocket
    • Parameters

      • url: string | URL
      • Optional protocols: string | string[]

      Returns WebSocket

  • Readonly CLOSED: 3
  • Readonly CLOSING: 2
  • Readonly CONNECTING: 0
  • Readonly OPEN: 1
  • prototype: WebSocket
fetch?: ((input, init?) => Promise<Response>)

Type declaration

    • (input, init?): Promise<Response>
    • Parameters

      • input: RequestInfo | URL
      • Optional init: RequestInit

      Returns Promise<Response>

rpc?: {
    headers?: HttpHeaders;
    url?: string;
}

Type declaration

url: string
websocket?: WebsocketClientOptions & {
    url?: string;
}

Type declaration

  • Optional url?: string