// Copyright (c) RoochNetwork // SPDX-License-Identifier: Apache-2.0 export interface RoochTransportRequestOptions { method: string params: unknown[] } export interface RoochSSETransportSubscribeOptions { method: string params: unknown onMessage: (event: T) => void onError?: (error: Error) => void signal?: AbortSignal } export interface RoochTransportSubscribeOptions { method: string params: unknown[] onMessage: (event: T) => void signal?: AbortSignal } export interface RoochTransport { /** * Send a request to the Rooch node * @param input Request options containing method and parameters * @returns Promise resolving to the response */ request(input: RoochTransportRequestOptions): Promise subscribeWithSSE( input: RoochSSETransportSubscribeOptions, ): Promise<() => Promise> subscribe(input: RoochTransportSubscribeOptions): Promise<() => Promise> /** * Clean up resources and close connections * Should be called when the transport is no longer needed */ destroy(): void }