Our core provider class for VeChain

Hierarchy (view full)

Implements

Constructors

Properties

enableDelegation: boolean = false

Enable fee delegation or not.

subscriptionManager: SubscriptionManager = ...
thorClient: ThorClient

ThorClient instance.

ProviderInternalWallet instance. It is optional because the majority of the methods do not require a wallet.

Methods

  • Checks if there are active subscriptions. This method checks if there are any active log subscriptions or a new heads subscription.

    Returns boolean

    A boolean indicating whether there are active subscriptions.

  • Initializes and starts the polling mechanism for subscription events. This method sets up an event poll that periodically checks for new events related to active subscriptions, such as 'newHeads' or log subscriptions. When new data is available, it emits these events to listeners.

    This method leverages the Poll.createEventPoll utility to create the polling mechanism, which is then started by invoking startListen on the poll instance.

    Returns boolean

  • Stops the polling mechanism for subscription events. This method stops the polling mechanism for subscription events, if it is active.

    Returns boolean

    A boolean indicating whether the polling mechanism was stopped.