Skip to content

Commit db6db6a

Browse files
Agilulfo1820claude
andcommitted
docs: AI-first npm README, fix broken banner image
Rewrite packages/vechain-kit/README.md to lead with two AI prompts ("Start a new VeChain dApp" via create-vechain-dapp, "Add to existing project") that tell the agent to read the relevant VeChain AI Skill first. The manual install path is preserved below as a fallback. Root README banner was 404 (i.ibb.co); replace with the same S3-hosted shocase image already used by the npm README and the GitBook docs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6451fcc commit db6db6a

2 files changed

Lines changed: 92 additions & 42 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#### An all-in-one library for building VeChain applications.
44

55
<div align="center">
6-
<img src="https://i.ibb.co/NgDN6XD3/kit-preview.png" alt="VeChain Kit Banner">
6+
<img src="https://prod-vechainkit-docs-images-bucket.s3.eu-west-1.amazonaws.com/vechain-kit-v2-shocase.png" alt="VeChain Kit Banner">
77
</div>
88

99
## Introduction

packages/vechain-kit/README.md

Lines changed: 91 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,77 @@ An all-in-one SDK for building frontend applications on VeChain, supporting wall
44
<img src="https://prod-vechainkit-docs-images-bucket.s3.eu-west-1.amazonaws.com/vechain-kit-v2-shocase.png" alt="VeChain Kit Banner">
55
</div>
66

7-
### Introduction
7+
## What's inside
88

9-
VeChain Kit is a comprehensive SDK designed to make building frontend applications on VeChain fast and straightforward. It offers:
9+
- **Seamless Wallet Integration:** VeWorld, Sync2, WalletConnect, and social logins (Google, Apple, GitHub, X/Twitter, Discord, TikTok, LINE, email, passkey via Privy).
10+
- **Custom Connection UI:** A themeable connect modal owns the VeWorld and Sync2 flows end-to-end. WalletConnect's QR modal is preserved.
11+
- **Developer-Friendly Hooks:** Easy-to-use React Hooks that let you read and write data on VeChainThor.
12+
- **Pre-Built UI Components:** TransactionModal, ProfileModal, SendTokenModal — drop them in and go.
13+
- **Token Operations:** Send, swap, check balances, manage VET domains.
1014

11-
- <b>Seamless Wallet Integration:</b> Support for VeWorld, Sync2, WalletConnect, and social logins (Google, Apple, GitHub, email, passkey via Privy).
12-
- <b>Custom Connection UI:</b> A built-in, themeable connect modal owns the VeWorld and Sync2 flows end-to-end (no dapp-kit modal hand-off). WalletConnect's QR modal is preserved.
13-
- <b>Developer-Friendly Hooks:</b> Easy-to-use React Hooks that let you read and write data on the VeChainThor blockchain.
14-
- <b>Token Operations:</b> Send and swap tokens, check balances, manage VET domains, and more—all in one place.
15-
- <b>Pre-Built UI Components:</b> Ready-to-use components (e.g., TransactionModal) to simplify wallet operations and enhance your users’ experience.
15+
> **Note:** Currently supports React and Next.js only.
1616
17-
> **Note**: Currently supports React and Next.js only
17+
## Start with AI (recommended)
1818

19-
### Resources
19+
The fastest path is to hand a prompt to your coding agent (Claude Code, Cursor, or any agent). The prompts below tell the agent to read the relevant [VeChain AI Skill](https://github.com/vechain/vechain-ai-skills) first so it follows current conventions.
2020

21-
- [Live Demo](https://vechainkit.vechain.org/)
22-
- [Documentation](https://docs.vechainkit.vechain.org/)
21+
### 🚀 Start a new VeChain dApp
22+
23+
```text
24+
Before doing anything, read these VeChain AI Skills so you follow current conventions:
25+
- create-vechain-dapp: https://github.com/vechain/vechain-ai-skills/tree/main/skills/create-vechain-dapp
26+
- vechain-kit: https://github.com/vechain/vechain-ai-skills/tree/main/skills/vechain-kit
27+
28+
Now the task:
29+
30+
Scaffold a new VeChain dApp for me using create-vechain-dapp, with:
31+
- VeChain Kit pre-wired (Privy social login: Google + email, plus VeWorld and WalletConnect)
32+
- Chakra UI v3 (with next-themes) and dark mode by default — follow the next-chakra-v3 example in the vechain-kit repo for wiring the kit's `theme` prop via `useChakraContext().token.var(...)` so theme tokens stay reactive
33+
- A landing page that shows the connected user's address, B3TR balance, and a "Send B3TR" button
34+
- A GitHub Pages deploy workflow ready to use
35+
36+
Name the project "my-vechain-dapp". When done, run `yarn dev` and tell me the URL.
37+
```
38+
39+
### Or: add VeChain Kit to an existing project
40+
41+
```text
42+
Before doing anything, read this VeChain AI Skill so you follow current conventions:
43+
- vechain-kit: https://github.com/vechain/vechain-ai-skills/tree/main/skills/vechain-kit
44+
45+
Now the task:
46+
47+
I already have a Next.js app and I want to add VeChain Kit to it.
48+
49+
1. Install @vechain/vechain-kit and any required peer deps.
50+
2. Find my root layout (app/layout.tsx for App Router or pages/_app.tsx for Pages Router) and wrap it with VeChainKitProvider.
51+
3. Enable Privy social login (Google + email), VeWorld and WalletConnect.
52+
4. Read Privy keys from NEXT_PUBLIC_PRIVY_* and the WalletConnect projectId from NEXT_PUBLIC_WC_PROJECT_ID.
53+
5. Add a <WalletButton /> to my existing header.
54+
6. Don't change my existing Chakra theme.
55+
56+
If you hit peer-dependency conflicts, stop and tell me before applying any fix.
57+
```
2358

24-
### Quicks Start
59+
### Why this works
2560

26-
#### Install dependencies
61+
[VeChain AI Skills](https://github.com/vechain/vechain-ai-skills) give your coding agent up-to-date domain knowledge (wallet UX, smart contracts, VeBetterDAO, StarGate, and more). Install once:
2762

28-
Install the core package along with its peer dependencies:
63+
```bash
64+
npx skills add vechain/vechain-ai-skills
65+
```
66+
67+
Or in Claude Code:
68+
69+
```text
70+
/plugin marketplace add vechain/vechain-ai-skills
71+
```
72+
73+
Browse all 11 skills and try each in context: <https://playground.vechainkit.vechain.org/ai-skills>.
74+
75+
## Manual install
2976

77+
Prefer to wire it yourself?
3078

3179
```bash
3280
yarn add @vechain/vechain-kit \
@@ -38,30 +86,21 @@ yarn add @vechain/vechain-kit \
3886
framer-motion@^11.15.0
3987
```
4088

89+
Wrap your app with the provider:
4190

42-
#### Setup Provider
43-
44-
Wrap your app with the VeChainKitProvider:
45-
46-
```typescript
91+
```tsx
4792
'use client';
4893

4994
import { VeChainKitProvider } from '@vechain/vechain-kit';
5095

5196
export function Providers({ children }: { children: React.ReactNode }) {
52-
return (
53-
<VeChainKitProvider>
54-
{children}
55-
</VeChainKitProvider>
56-
);
97+
return <VeChainKitProvider>{children}</VeChainKitProvider>;
5798
}
5899
```
59100

60-
That's it! Your app is now ready to connect to VeChain mainnet with VeWorld wallet.
101+
Add a wallet button anywhere:
61102

62-
#### Add Wallet Button
63-
64-
```typescript
103+
```tsx
65104
'use client';
66105

67106
import { WalletButton } from '@vechain/vechain-kit';
@@ -71,36 +110,47 @@ export function Page() {
71110
}
72111
```
73112

113+
That's it — your app is ready to connect to VeChain mainnet with VeWorld.
74114

75115
#### Customize the login modal
76116

77117
The connect modal renders a grid of login methods. Reorder, hide, or swap them via `loginMethods` on the provider:
78118

79119
```tsx
80120
<VeChainKitProvider
81-
privy={{ appId: '...', clientId: '...', loginMethods: ['google', 'apple', 'email'], appearance: {...} }}
82-
dappKit={{ allowedWallets: ['veworld', 'sync2', 'wallet-connect'], walletConnectOptions: {...} }}
121+
privy={{
122+
appId: '...',
123+
clientId: '...',
124+
loginMethods: ['google', 'apple', 'email'],
125+
appearance: { /* ... */ },
126+
}}
127+
dappKit={{
128+
allowedWallets: ['veworld', 'sync2', 'wallet-connect'],
129+
walletConnectOptions: { /* ... */ },
130+
}}
83131
loginMethods={[
84-
{ method: 'veworld', gridColumn: 4 }, // primary CTA (filled, recommended)
132+
{ method: 'veworld', gridColumn: 4 }, // primary CTA (filled, recommended)
85133
{ method: 'google', gridColumn: 4 },
86134
{ method: 'apple', gridColumn: 4 },
87-
{ method: 'more', gridColumn: 4 }, // opens an in-modal sub-view with overflow socials, wallets, ecosystem apps
135+
{ method: 'more', gridColumn: 4 }, // opens an in-modal sub-view
88136
]}
89-
// Optional: theme the brand accent (spinner, focus rings, "Waiting for signature…" headline)
90137
theme={{ accent: '#3b82f6' }}
91138
>
92139
```
93140

94-
Available `method` values: `veworld`, `sync2`, `wallet-connect`, `google`, `apple`, `github`, `email`, `passkey`, `vechain` (cross-app), `ecosystem`, `more`, and the legacy `dappkit` (which still opens dapp-kit's native modal for backwards compatibility).
141+
Available `method` values: `veworld`, `sync2`, `wallet-connect`, `google`, `apple`, `github`, `email`, `passkey`, `vechain` (cross-app), `ecosystem`, `more`, and the legacy `dappkit`.
95142

96-
For complete configuration options, check the [full documentation](https://docs.vechainkit.vechain.org/).
143+
For full configuration options see the [documentation](https://docs.vechainkit.vechain.org/) or try every feature live in the [playground](https://playground.vechainkit.vechain.org/).
97144

98-
---
145+
## Resources
99146

100-
# Troubleshooting
147+
- [VeKit Playground](https://playground.vechainkit.vechain.org/) — interactive demos + code + AI prompts for every kit feature
148+
- [Homepage](https://vechainkit.vechain.org/)
149+
- [Documentation](https://docs.vechainkit.vechain.org/)
150+
- [VeChain AI Skills](https://github.com/vechain/vechain-ai-skills)
101151

102-
Are you having issues using the kit?
152+
## Troubleshooting
103153

104-
- Check our [Troubleshooting](https://docs.vechainkit.vechain.org/vechain-kit/troubleshooting) section.
105-
- Contact us on [Discord](https://discord.gg/wGkQnPpRVq)
106-
- Open an issue on [Github](https://github.com/vechain/vechain-kit/issues)
154+
- [Troubleshooting docs](https://docs.vechainkit.vechain.org/vechain-kit/troubleshooting)
155+
- [Discord](https://discord.gg/wGkQnPpRVq)
156+
- [Open an issue on GitHub](https://github.com/vechain/vechain-kit/issues)

0 commit comments

Comments
 (0)