Skip to content

Commit cf65f4f

Browse files
committed
Merge branch 'main' into yash/ocr-contracts-integration
2 parents 6f42264 + a6483f4 commit cf65f4f

File tree

526 files changed

+33287
-25679
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

526 files changed

+33287
-25679
lines changed

.changeset/cute-actors-beam.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Faster payment widget quote discovery

README.md

Lines changed: 144 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,150 @@
1515

1616
<p align="center"><strong>All-in-one web3 SDK for Browser, Node and Mobile apps</strong></p>
1717

18-
## Features
19-
20-
- Support for React & React-Native
21-
- First party support for [Embedded Wallets](https://portal.thirdweb.com/connect/embedded-wallet/overview) (social/email login)
22-
- First party support for [Account Abstraction](https://portal.thirdweb.com/connect/account-abstraction/overview)
23-
- Instant connection to any chain with RPC Edge integration
24-
- Integrated IPFS upload/download
25-
- UI Components for connection, transactions, nft rendering
26-
- High level contract extensions for interacting with common standards
18+
## Core Package
19+
20+
#### [`thirdweb`](./packages/thirdweb/README.md)
21+
22+
The main SDK package providing all-in-one web3 functionality for Browser, Node, and Mobile applications.
23+
24+
```bash
25+
npm install thirdweb
26+
```
27+
28+
**Features:**
29+
30+
- Type-safe contract and transaction APIs
31+
- In-app wallets with social/email login
32+
- Account abstraction (ERC4337/EIP7702) support
33+
- 500+ external wallets supported
34+
- Built in infra (RPC, bundler, paymaster, indexer)
35+
- React hooks and UI components
2736
- Automatic ABI resolution
37+
- IPFS upload/download
38+
- Cross-platform support (Web, React Native)
39+
40+
### Documentation
41+
42+
Visit the [developer portal](https://portal.thirdweb.com) for full documentation.
43+
44+
### 🚀 Quick Start
45+
46+
#### For React Applications
47+
48+
```bash
49+
npm install thirdweb
50+
```
51+
52+
```typescript
53+
import { createThirdwebClient } from "thirdweb";
54+
import { ConnectButton, useActiveAccount } from "thirdweb/react";
55+
56+
const client = createThirdwebClient({
57+
clientId: "YOUR_CLIENT_ID",
58+
});
59+
60+
function App() {
61+
const account = useActiveAccount();
62+
console.log("Connected as", account?.address);
63+
64+
return <ConnectButton client={client} />;
65+
}
66+
```
67+
68+
For React Native Applications, you'll also need to install the `@thirdweb-dev/react-native-adapter` package and import it at app startup for polyfills.
69+
70+
#### For Backend Applications
71+
72+
```bash
73+
npm install thirdweb
74+
```
75+
76+
```typescript
77+
import { createThirdwebClient, Engine } from "thirdweb";
78+
79+
const client = createThirdwebClient({
80+
secretKey: "YOUR_SECRET_KEY",
81+
});
82+
83+
const wallet = Engine.serverWallet({
84+
client,
85+
address: "0x...",
86+
});
87+
88+
const transaction = transfer({
89+
contract: getContract({
90+
client,
91+
address: "0x...", // token contract
92+
chain: defineChain(1),
93+
}),
94+
to: "0x...", // recipient
95+
amount: "0.01", // amount in tokens
96+
});
97+
98+
await wallet.enqueueTransaction({
99+
transaction,
100+
});
101+
```
102+
103+
## Adapters
104+
105+
#### [`@thirdweb-dev/react-native-adapter`](./packages/react-native-adapter/README.md)
106+
107+
Required polyfills and configuration for running the thirdweb SDK in React Native applications.
108+
109+
```bash
110+
npm install @thirdweb-dev/react-native-adapter
111+
```
112+
113+
#### [`@thirdweb-dev/wagmi-adapter`](./packages/wagmi-adapter/README.md)
114+
115+
Integration layer for using thirdweb's in-app wallets with wagmi.
116+
117+
```bash
118+
npm install @thirdweb-dev/wagmi-adapter
119+
```
120+
121+
## Type safe API wrappers
122+
123+
#### [`@thirdweb-dev/api`](./packages/api/README.md)
124+
125+
TypeScript SDK for thirdweb's API, combining all of thirdweb products.
126+
127+
```bash
128+
npm install @thirdweb-dev/api
129+
```
130+
131+
#### [`@thirdweb-dev/engine`](./packages/engine/README.md)
132+
133+
TypeScript SDK for Engine, thirdweb's backend onchain executor service.
134+
135+
```bash
136+
npm install @thirdweb-dev/engine
137+
```
138+
139+
#### [`@thirdweb-dev/insight`](./packages/insight/README.md)
140+
141+
TypeScript SDK for Insight, thirdweb's multichain indexer service.
142+
143+
```bash
144+
npm install @thirdweb-dev/insight
145+
```
146+
147+
#### [`@thirdweb-dev/vault-sdk`](./packages/vault-sdk/README.md)
148+
149+
SDK for interacting with Vault, thirdweb's secure key management service.
150+
151+
```bash
152+
npm install @thirdweb-dev/vault-sdk
153+
```
154+
155+
#### [`@thirdweb-dev/nebula`](./packages/nebula/README.md)
156+
157+
TypeScript SDK for Nebula, thirdweb's AI agent service.
28158

29-
## Library Comparison
30-
31-
| | thirdweb | Wagmi + Viem | Ethers@6 |
32-
| ----------------------------------------- | -------- | ------------------ | -------- |
33-
| Type safe contract API ||||
34-
| Type safe wallet API ||||
35-
| EVM utils ||||
36-
| RPC for any EVM | ✅  | ⚠️ public RPC only ||
37-
| Automatic ABI Resolution ||||
38-
| IPFS Upload/Download ||||
39-
| Embedded wallet (email/ social login) || ⚠️ via 3rd party ||
40-
| Account abstraction (ERC4337) support || ⚠️ via 3rd party ||
41-
| Web3 wallet connectors ||||
42-
| Local wallet creation ||||
43-
| Auth (SIWE) ||||
44-
| Extensions functions for common standards ||||
45-
| React Hooks ||||
46-
| React UI components ||||
47-
| React Native Hooks ||||
48-
| React Native UI Components ||||
159+
```bash
160+
npm install @thirdweb-dev/nebula
161+
```
49162

50163
## Contributing
51164

@@ -55,7 +168,8 @@ See our [open source page](https://thirdweb.com/open-source) for more informatio
55168

56169
## Additional Resources
57170

58-
- [Documentation](https://portal.thirdweb.com/typescript/v5)
171+
- [Dashboard](https://thirdweb.com/login)
172+
- [Documentation](https://portal.thirdweb.com/)
59173
- [Templates](https://thirdweb.com/templates)
60174
- [YouTube](https://www.youtube.com/c/thirdweb)
61175

apps/dashboard/.eslintrc.js

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ module.exports = {
1010
"plugin:storybook/recommended",
1111
],
1212
overrides: [
13-
// disable restricted imports in chakra
14-
{
15-
files: "src/chakra/**/*",
16-
rules: {
17-
"no-restricted-imports": ["off"],
18-
},
19-
},
2013
// allow direct PostHog imports inside analytics helpers
2114
{
2215
files: "src/@/analytics/**/*",
@@ -91,60 +84,6 @@ module.exports = {
9184
"error",
9285
{
9386
paths: [
94-
{
95-
// these are provided by chakra folder, so we don't want to import them from chakra directly
96-
importNames: [
97-
"Card",
98-
"Button",
99-
"Checkbox",
100-
"Badge",
101-
"Drawer",
102-
"Heading",
103-
"Text",
104-
"FormLabel",
105-
"FormHelperText",
106-
"FormErrorMessage",
107-
"MenuGroup",
108-
"VStack",
109-
"HStack",
110-
"AspectRatio",
111-
"useToast",
112-
"useClipboard",
113-
"Badge",
114-
"Stack",
115-
// also the types
116-
"ButtonProps",
117-
"BadgeProps",
118-
"DrawerProps",
119-
"HeadingProps",
120-
"TextProps",
121-
"FormLabelProps",
122-
"HelpTextProps",
123-
"MenuGroupProps",
124-
"MenuItemProps",
125-
"AspectRatioProps",
126-
"BadgeProps",
127-
"StackProps",
128-
],
129-
message:
130-
'import component from "chakra" folder instead if you have to use chakra component, But use shadcn component otherwise',
131-
name: "@chakra-ui/react",
132-
},
133-
{
134-
message:
135-
"Import from `@chakra-ui/react` instead of `@chakra-ui/layout`.",
136-
name: "@chakra-ui/layout",
137-
},
138-
{
139-
message:
140-
"Import from `@chakra-ui/react` instead of `@chakra-ui/button`.",
141-
name: "@chakra-ui/button",
142-
},
143-
{
144-
message:
145-
"Import from `@chakra-ui/react` instead of `@chakra-ui/menu`.",
146-
name: "@chakra-ui/menu",
147-
},
14887
{
14988
importNames: ["useRouter"],
15089
message:

apps/dashboard/.storybook/main.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ const config: StorybookConfig = {
2020
name: getAbsolutePath("@storybook/nextjs"),
2121
options: {},
2222
},
23-
refs: {
24-
"@chakra-ui/react": {
25-
disable: true,
26-
},
27-
},
2823
staticDirs: ["../public"],
2924
features: {
3025
experimentalRSC: true,

apps/dashboard/next.config.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,6 @@ const SENTRY_OPTIONS: SentryBuildOptions = {
115115
const FRAMER_ADDITIONAL_LANGUAGES = ["es"];
116116

117117
const baseNextConfig: NextConfig = {
118-
compiler: {
119-
emotion: true,
120-
},
121118
eslint: {
122119
ignoreDuringBuilds: true,
123120
},

apps/dashboard/package.json

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
{
22
"dependencies": {
3-
"@chakra-ui/react": "^2.8.2",
4-
"@chakra-ui/styled-system": "^2.9.2",
5-
"@chakra-ui/theme-tools": "^2.1.2",
6-
"@emotion/react": "11.14.0",
7-
"@emotion/styled": "11.14.1",
83
"@hookform/resolvers": "^3.9.1",
94
"@marsidev/react-turnstile": "^1.1.0",
105
"@radix-ui/react-accordion": "^1.2.11",
@@ -34,14 +29,11 @@
3429
"@vercel/functions": "2.2.2",
3530
"@vercel/og": "^0.6.8",
3631
"abitype": "1.0.8",
37-
"chakra-react-select": "^4.7.6",
3832
"class-variance-authority": "^0.7.1",
3933
"clsx": "^2.1.1",
40-
"color": "5.0.0",
4134
"compare-versions": "^6.1.0",
4235
"date-fns": "4.1.0",
4336
"fast-xml-parser": "^5.2.5",
44-
"framer-motion": "12.23.0",
4537
"fuse.js": "7.1.0",
4638
"input-otp": "^1.4.1",
4739
"ioredis": "^5.6.1",
@@ -57,7 +49,6 @@
5749
"posthog-js": "1.256.1",
5850
"posthog-node": "^5.4.0",
5951
"prettier": "3.6.2",
60-
"qrcode": "^1.5.3",
6152
"react": "19.1.0",
6253
"react-children-utilities": "^2.10.0",
6354
"react-day-picker": "^8.10.1",
@@ -66,6 +57,7 @@
6657
"react-error-boundary": "6.0.0",
6758
"react-hook-form": "7.55.0",
6859
"react-markdown": "10.1.0",
60+
"react-qrcode-logo": "^3.0.0",
6961
"react-table": "^7.8.0",
7062
"recharts": "2.15.3",
7163
"remark-gfm": "4.0.1",
@@ -86,7 +78,6 @@
8678
},
8779
"devDependencies": {
8880
"@biomejs/biome": "2.0.6",
89-
"@chakra-ui/cli": "^2.4.1",
9081
"@chromatic-com/storybook": "4.0.1",
9182
"@next/bundle-analyzer": "15.3.5",
9283
"@next/eslint-plugin-next": "15.3.5",
@@ -99,7 +90,6 @@
9990
"@types/node": "22.14.1",
10091
"@types/papaparse": "^5.3.16",
10192
"@types/pluralize": "^0.0.33",
102-
"@types/qrcode": "^1.5.5",
10393
"@types/react": "19.1.8",
10494
"@types/react-dom": "19.1.6",
10595
"@types/react-table": "^7.7.20",
@@ -129,17 +119,15 @@
129119
"dev": "next dev --turbopack",
130120
"fix": "biome check ./src --fix && eslint ./src --fix",
131121
"format": "biome format ./src --write",
132-
"gen:theme-typings": "chakra-cli tokens src/chakra/theme/index.ts",
133122
"knip": "knip",
134123
"lint": "biome check ./src && knip && eslint ./src",
135124
"playwright": "playwright test",
136125
"postbuild": "next-sitemap",
137-
"postinstall": "pnpm run gen:theme-typings",
138126
"preinstall": "npx only-allow pnpm",
139127
"start": "next start",
140128
"storybook": "storybook dev -p 6006",
141129
"typecheck": "tsc --noEmit",
142130
"update-checkly": "npx checkly deploy"
143131
},
144132
"version": "3.0.0"
145-
}
133+
}

apps/dashboard/public/assets/examples/example-with-ipfs.csv

Lines changed: 0 additions & 2 deletions
This file was deleted.

apps/dashboard/public/assets/examples/example-with-maps.csv

Lines changed: 0 additions & 4 deletions
This file was deleted.

apps/dashboard/public/assets/examples/example.csv

Lines changed: 0 additions & 2 deletions
This file was deleted.

apps/dashboard/public/assets/examples/snapshot-with-maxclaimable.csv

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)