Node.js
Install​
info
For Node.js, the WalletConnect SignClient additionally requires lokijs
to manage storage internally.
- npm
- Yarn
- pnpm
npm install --save @walletconnect/sign-client lokijs@1.x
yarn add @walletconnect/sign-client lokijs@1.x
pnpm add @walletconnect/sign-client lokijs@1.x
Create Session​
- Initiate your WalletConnect client with the relay server, using your Project ID.
import SignClient from "@walletconnect/sign-client";
const signClient = await SignClient.init({
projectId: "<YOUR_PROJECT_ID>",
metadata: {
name: "Test Wallet",
description: "Test Wallet",
url: "#",
icons: ["https://walletconnect.com/walletconnect-logo.png"],
},
});