Skip to content

Commit

Permalink
chore: add more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenvechain committed Nov 9, 2023
1 parent 935f7c8 commit f912883
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/react-wallet-kit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
- Allow easy interaction with all wallets.
- Connex is designed to play nice with one wallet at a time, this library provides a layer on top of Connex to easily
allow interaction with all wallets.
- Easy setup for wallet connect.
- Create your own
- Easy setup for wallet connect

## Installation

Expand Down
59 changes: 59 additions & 0 deletions packages/vanilla-wallet-kit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# `@vechainfoundation/vanilla-wallet-kit`

## Why ?

- Creating some reusable UI components for connecting wallets
- Allow easy interaction with all wallets.
- Connex is designed to play nice with one wallet at a time, this library provides a layer on top of Connex to easily
allow interaction with all wallets.
- Easy setup for wallet connect.

## Installation

- See the parent [README](../../README.md) for installation instructions.

### Build

```bash
yarn build
```

## Usage

```bash
yarn add @vechainfoundation/vanilla-wallet-kit
```

- In your root `index.ts`

```typescript
import type { WalletConnectOptions } from '@vechainfoundation/wallet-connect';
import type { Options } from '@vechain/connex';
import { configureThorModal } from '@vechainfoundation/vanilla-wallet-kit';

const walletConnectOptions: WalletConnectOptions = {
projectId: '<PROJECT_ID>', // Create your project here: https://cloud.walletconnect.com/sign-up
metadata: {
name: 'My dApp',
description: 'My dApp description',
url: window.location.origin, // Your app URL
icons: [`${window.location.origin}/images/my-dapp-icon.png`], // Your app Icon
},
};

const nodeOptions: Omit<Options, 'signer'> = {
node: 'https://testnet.vechain.org/',
network: 'test',
};

configureThorModal(vechainWalletKitOptions);
```

- 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
<body>
<vwk-connect-button-with-modal mode="DARK"></vwk-connect-button-with-modal>
</body>
```
1 change: 0 additions & 1 deletion packages/wallet-kit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
- Connex is designed to play nice with one wallet at a time, this library provides a layer on top of Connex to easily
allow interaction with all wallets.
- Easy setup for wallet connect.
- Create your own

## Installation

Expand Down

0 comments on commit f912883

Please sign in to comment.