Skip to content

Commit c0ed64b

Browse files
authored
Merge branch 'main' into pb/add-solana-policies-to-access-token
2 parents 4e0fed9 + 1a19e14 commit c0ed64b

File tree

18 files changed

+1145
-50
lines changed

18 files changed

+1145
-50
lines changed

.changeset/solid-hotels-play.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+
CLI updates for stylus - new templates

apps/playground-web/src/app/api/chat/route.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ import { convertToModelMessages, streamText, type UIMessage } from "ai";
44
// Allow streaming responses up to 5 minutes
55
export const maxDuration = 300;
66

7-
const thirdwebAI = createThirdwebAI({
8-
baseURL: `https://${process.env.NEXT_PUBLIC_API_URL}`,
9-
secretKey: process.env.THIRDWEB_SECRET_KEY,
10-
});
11-
127
export async function POST(req: Request) {
8+
const SECRET_KEY = process.env.THIRDWEB_SECRET_KEY as string;
9+
10+
const thirdwebAI = createThirdwebAI({
11+
baseURL: `https://${process.env.NEXT_PUBLIC_API_URL}`,
12+
secretKey: SECRET_KEY,
13+
});
14+
1315
const body = await req.json();
1416
const { messages, id }: { messages: UIMessage[]; id: string } = body;
1517

apps/playground-web/src/app/api/paywall/route.ts

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,27 @@ import { token } from "../../payments/x402/components/constants";
77
// Allow streaming responses up to 5 minutes
88
export const maxDuration = 300;
99

10-
const client = createThirdwebClient({
11-
secretKey: process.env.THIRDWEB_SECRET_KEY as string,
12-
});
10+
export async function GET(request: NextRequest) {
11+
const SECRET_KEY = process.env.THIRDWEB_SECRET_KEY as string;
1312

14-
const BACKEND_WALLET_ADDRESS = process.env.ENGINE_BACKEND_WALLET as string;
15-
// const BACKEND_WALLET_ADDRESS = process.env.ENGINE_BACKEND_SMART_WALLET as string;
16-
const ENGINE_VAULT_ACCESS_TOKEN = process.env
17-
.ENGINE_VAULT_ACCESS_TOKEN as string;
18-
// const API_URL = `https://${process.env.NEXT_PUBLIC_API_URL || "api.thirdweb.com"}`;
19-
const API_URL = "http://localhost:3030";
13+
const client = createThirdwebClient({
14+
secretKey: SECRET_KEY,
15+
});
2016

21-
const twFacilitator = facilitator({
22-
baseUrl: `${API_URL}/v1/payments/x402`,
23-
client,
24-
serverWalletAddress: BACKEND_WALLET_ADDRESS,
25-
vaultAccessToken: ENGINE_VAULT_ACCESS_TOKEN,
26-
});
17+
const BACKEND_WALLET_ADDRESS = process.env.ENGINE_BACKEND_WALLET as string;
18+
// const BACKEND_WALLET_ADDRESS = process.env.ENGINE_BACKEND_SMART_WALLET as string;
19+
const ENGINE_VAULT_ACCESS_TOKEN = process.env
20+
.ENGINE_VAULT_ACCESS_TOKEN as string;
21+
// const API_URL = `https://${process.env.NEXT_PUBLIC_API_URL || "api.thirdweb.com"}`;
22+
const API_URL = "http://localhost:3030";
23+
24+
const twFacilitator = facilitator({
25+
baseUrl: `${API_URL}/v1/payments/x402`,
26+
client,
27+
serverWalletAddress: BACKEND_WALLET_ADDRESS,
28+
vaultAccessToken: ENGINE_VAULT_ACCESS_TOKEN,
29+
});
2730

28-
export async function GET(request: NextRequest) {
2931
const paymentData = request.headers.get("X-PAYMENT");
3032
const queryParams = request.nextUrl.searchParams;
3133

apps/wagmi-demo/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# wagmi-inapp
22

3+
## 0.0.8
4+
5+
### Patch Changes
6+
7+
- Updated dependencies []:
8+
9+
- @thirdweb-dev/wagmi-adapter@0.2.163
10+
311
## 0.0.7
412

513
### Patch Changes

apps/wagmi-demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "wagmi-inapp",
33
"private": true,
4-
"version": "0.0.7",
4+
"version": "0.0.8",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

packages/engine/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @thirdweb-dev/engine
22

3+
## 3.3.0
4+
5+
### Minor Changes
6+
7+
- [#8238](https://github.com/thirdweb-dev/js/pull/8238) [`9545b43`](https://github.com/thirdweb-dev/js/commit/9545b4367598408dbb88c63d8a8fe21305f870b5) Thanks [@d4mr](https://github.com/d4mr)! - Add Solana endpoints
8+
39
## 3.2.2
410

511
### Patch Changes

packages/engine/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@thirdweb-dev/engine",
3-
"version": "3.2.2",
3+
"version": "3.3.0",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/thirdweb-dev/js.git#main"

0 commit comments

Comments
 (0)