Typed Solana WebSocket subscription client.

Supports accountSubscribe, programSubscribe, logsSubscribe, signatureSubscribe, slotSubscribe, and rootSubscribe.

Works in both browser and Node.js environments.

1.0.0

Constructors

Methods

  • Close the WebSocket connection and clear all subscriptions. Disables auto-reconnect.

    Returns void

    1.0.0

  • Subscribe to transaction logs.

    Parameters

    Returns number

    Local subscription ID.

    1.0.0

  • Subscribe to changes on all accounts owned by a program.

    Parameters

    Returns number

    Local subscription ID.

    1.0.0

  • Subscribe to a specific transaction signature's confirmation.

    Parameters

    Returns number

    Local subscription ID.

    1.0.0

  • Unsubscribe from a previously created subscription.

    Parameters

    • localId: number

      The ID returned by one of the on* methods.

    Returns void

    1.0.0