Class TradeAdapterWebsocket

Hierarchy

  • TradeAdapterWebsocket

Implements

Constructors

Properties

activeSubscriptions: Set<string> = ...
config: {
    accountAddress: string;
    timeout: number;
} = DEFAULT_CONFIG

Type declaration

  • accountAddress: string
  • timeout: number
connectionPromise: Promise<void>
listeners: WebsocketListener[] = []
localNonces: NonceMap = {}
provider: Provider
resubscriptionResults: string[] = []
socket: w3cwebsocket
subscriptionRequests: SubscriptionRequest<any>[] = []

Methods

  • Parameters

    • signerAddress: string
    • accountId: number

    Returns Promise<Bytes>

  • Private

    Sets up a listener for the subscription. The listener will loop through sever updates for as long as the client keeps the subscription active. When called, this function should not be awaited as it is meant to be executed as a background task.

    Type Parameters

    • C

    Parameters

    Returns Promise<void>

  • This function has no validation that the returned type is T

    Type Parameters

    • T

    Parameters

    • requestId: string
    • timeout: number = ...

    Returns {
        cancel: (() => void);
        result: Promise<T>;
    }

    • cancel: (() => void)
        • (): void
        • Returns void

    • result: Promise<T>

Generated using TypeDoc