The ThorClient class serves as an interface to interact with the VeChainThor blockchain. It provides various methods.

Constructors

Properties

accounts: AccountsModule

The AccountsModule instance

blocks: BlocksModule

The BlocksModule instance

contracts: ContractsModule

The 'ContractClient' instance

The DebugModule instance

forkDetector: ForkDetector

The 'GalacticaForkDetector' instance

The GasModule instance

httpClient: HttpClient

The HTTP client instance used for making network requests.

The LogsModule instance used for interacting with log-related endpoints.

The NodesModule instance

transactions: TransactionsModule

Methods

  • Destroys the ThorClient instance by stopping the event polling and any other cleanup.

    Returns void

  • Creates a new ThorClient instance from a given URL.

    Parameters

    • networkUrl: string

      The URL of the network to connect to.

    • Optionaloptions: BlocksModuleOptions

      Optional configuration settings for the Blocks module.

    Returns ThorClient

    A ThorClient instance connected to the specified network URL.

  • Creates a ThorClient instance from a network URL.

    Parameters

    • networkUrl: string

      The URL of the network to connect to.

    • Optionaloptions: BlocksModuleOptions

      Optional configuration settings for the Blocks module.

    Returns ThorClient

    A ThorClient instance connected to the specified network URL.

    Use ThorClient.at instead.