Vanilla JS DAppKit
npm install @vechain/dapp-kit-ui@vechain/dapp-kit-uiThe Vechain DApp Kit serves as a sophisticated layer built upon @vechain/sdk-network, providing a simplified and
efficient
avenue for engaging with a multitude of Vechain wallets. This innovative toolkit enhances the ease of interaction,
offering developers a seamless bridge to connect with diverse Vechain wallet functionalities. For more information,
please refer to the official Vechain Docs
``bash`
yarn add @vechain/dapp-kit-ui
- In your root main.ts
`typescript
import type { WalletConnectOptions, DAppKitOptions } from '@vechain/dapp-kit';
import { DAppKitUI } from '@vechain/dapp-kit-ui';
const walletConnectOptions: WalletConnectOptions = {
projectId: '
metadata: {
name: 'Sample VeChain dApp',
description: 'A sample VeChain dApp',
url: window.location.origin,
icons: [${window.location.origin}/images/logo/my-dapp.png],
},
};
const options: DAppKitOptions = {
node: 'https://testnet.vechain.org/',
walletConnectOptions,
usePersistence: true,
};
DAppKitUI.configure(options);
`
- In your root index.html. This will add a button to your page, when clicked it will open a modal with the wallet
connect QR code.
`html``