Installation

How to install `@vechain/dapp-kit` in order to use it with TypeScript or Javascript.

If using TypeScript follow the installation steps, for JavaScript follow the CommonJS (CJS) installation steps.

Should you wish to implement this in a pure JavaScript project, it is recommended to use CommonJS (CJS) imports. Potential complications might arise with ES Module (ESM) imports.

NPM

npm i @vechain/dapp-kit

Upon installation, you may utilize the subsequent code snippet to verify the proper functioning within your TypeScript project:

import { DAppKit } from "@vechain/dapp-kit"

const dappKit = new DAppKit({
  //Required
  nodeUrl: 'https://sync-testnet.vechain.org/', 
  // Required if not connecting to the mainnet
  genesis: 'test', 
});

Last updated