@not3/sdk
    Preparing search index...

    Class P2PClient

    Sub-client for live P2P transfers. Provides the gateway address, feature detection, and the injectable runtime primitives.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    api: AxiosInstance
    options: ClientOptions

    Methods

    • The WebSocket signaling gateway URL, derived from the API base URL.

      Returns string

      The ws:// or wss:// gateway URL.

    • Whether the connected API has P2P transfers enabled.

      Returns Promise<boolean>

      True if the feature is available.

      AxiosError If the request fails.

    • The WebSocket constructor to use (injected or global).

      Returns {
          CLOSED: 3;
          CLOSING: 2;
          CONNECTING: 0;
          OPEN: 1;
          prototype: WebSocket;
          new (url: string | URL, protocols?: string | string[]): WebSocket;
      }

      The constructor.

      Error If no implementation is available.