How to install Connex.

Connex is available to developers in several ways. The installation approach does not influence or modify the Connex features. Connex can be installed in any of the following ways:

  1. Browser Implementation: This conventional utilization aligns with dApp development similar to the EIP-1193 standard. In this context, Connex facilitates connections with Sync/Sync2 or VeWorld. This approach has two Sub-approaches:

    1. NPM

    2. Using Content Delivery Network (CDN)

  2. Framework: This technique empowers the instantiation of a Connex instance from the ground up. It is commonly employed for NodeJS projects and command line interface (CLI) applications.

The below snippets contain links to veblocks nodes feel free to connect to any of the public nodes Nodes

Connex Browser implementation


npm i @vechain/connex

Below is a snippet using Connex and React:

import { Connex } from '@vechain/connex'
import { useMemo } from 'react'

 * Connex instance
const connexInstance = new Connex({
  node: '',
  network: 'main'

export default function SimpleComponentWithConnex() {

  // Better to use useMemo to avoid re-rendering
  const connex: Connex = useMemo(() => {
    return connexInstance
  }, [connexInstance])

  return (


The Connex library can be seamlessly integrated by employing the subsequent CDN hyperlink:

<!-- install the latest v2 -->
<script src="" />

Below is a snippet using Connex and HTML:

<html lang="en">

    <meta charset="UTF-8">
    <title>Connex Test Project</title>

    <!-- install the latest v2 -->
    <script src=""></script>

        // Initialize Connex on mainnet
        const connex = new Connex({
            node: '',
            network: 'main'

        // Simple log of genesis block id



npm i @vechain/connex-framework @vechain/connex-driver

You can create a low level Connex instance using the following example:

import { Driver, SimpleNet } from '@vechain/connex-driver'
import { Framework } from '@vechain/connex-framework'

// Init newtork and driver
const network = new SimpleNet('')
const driver = await Driver.connect(network)

// Init connex instance
const connex = new Framework(driver)


Last updated