Skip to content

Commit 26a8210

Browse files
committed
fixed code snippet formatting
1 parent 4285c9e commit 26a8210

File tree

2 files changed

+29
-26
lines changed
  • apps/portal/src/app
    • connect/account-abstraction/erc-20-paymaster
    • nebula/api-reference

2 files changed

+29
-26
lines changed

apps/portal/src/app/connect/account-abstraction/erc-20-paymaster/page.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ In traditional Ethereum transactions, users pay gas fees in the native cryptocur
99

1010
1. Install Connect SDK
1111

12+
```bash
1213
npm install thirdweb
14+
```
1315

1416
2. Configure the Paymaster In your SDK code, specify the ERC-20 token you wish to use for gas fees.
1517

1618
Currently you may use Lisk LSK, Base USDC or Celo CUSD.
1719

18-
```
20+
21+
```tsx
1922
import { base, lisk, celo } from "thirdweb/chains";
2023
import { TokenPaymaster, smartWallet } from "thirdweb/wallets";
2124

apps/portal/src/app/nebula/api-reference/page.mdx

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ Nebula provides a conversational interface to interact with blockchain data and
1818

1919
All API requests should be made to:
2020

21-
```
21+
```bash
2222
https://nebula-api.thirdweb.com
2323
```
2424

2525
## Authentication
2626

2727
All API endpoints require authentication using the thirdweb secret key. Include this key in your request headers:
2828

29-
```http
29+
```bash
3030
x-secret-key: YOUR_THIRDWEB_SECRET_KEY
3131
```
3232

3333
Example curl with authentication:
34-
```
34+
```bash
3535
curl -X POST https://nebula-api.thirdweb.com/chat \
3636
-H "Content-Type: application/json" \
3737
-H "x-secret-key: YOUR_THIRDWEB_SECRET_KEY" \
@@ -130,7 +130,7 @@ When `stream: true`, the API uses Server-Sent Events (SSE) to stream the respons
130130
5. `error`: Contains error information if something goes wrong
131131

132132
**Example SSE Stream:**
133-
```
133+
```tsx
134134
event: init
135135
data: {
136136
"session_id": "f4b45429-9570-4ee8-8c8f-8b267429915a",
@@ -407,14 +407,14 @@ const result = await handleNebulaResponse(data);
407407

408408
#### Execute Command
409409

410-
```
410+
```bash
411411
POST /execute
412412
```
413413

414414
Execute specific blockchain commands or actions.
415415

416416
**Request Body:**
417-
```
417+
```bash
418418
{
419419
"message": "Deploy a new ERC20 contract",
420420
"session_id": "sess_01HKW2ZH45JNQRTM0YPKJ6QXXX", // Optional
@@ -427,7 +427,7 @@ Execute specific blockchain commands or actions.
427427
```
428428

429429
**Example curl:**
430-
```
430+
```bash
431431
curl -X POST https://nebula-api.thirdweb.com/execute \
432432
-H "Content-Type: application/json" \
433433
-H "x-secret-key: YOUR_THIRDWEB_SECRET_KEY" \
@@ -440,25 +440,25 @@ curl -X POST https://nebula-api.thirdweb.com/execute \
440440
}
441441
}'
442442
```
443-
-->
443+
444444
### Sessions
445445

446446
#### List Sessions
447447

448-
```
448+
```bash
449449
GET /session/list
450450
```
451451

452452
Retrieve available sessions for the authenticated account.
453453

454454
**Example curl:**
455-
```
455+
```bash
456456
curl -X GET https://nebula-api.thirdweb.com/session/list \
457457
-H "x-secret-key: YOUR_THIRDWEB_SECRET_KEY"
458458
```
459459

460460
**Response:**
461-
```
461+
```bash
462462
{
463463
"result": [
464464
{
@@ -475,20 +475,20 @@ curl -X GET https://nebula-api.thirdweb.com/session/list \
475475

476476
#### Get Session
477477

478-
```
478+
```bash
479479
GET /session/{session_id}
480480
```
481481

482482
Get details for a specific session.
483483

484484
**Example curl:**
485-
```
485+
```bash
486486
curl -X GET https://nebula-api.thirdweb.com/session/abc123 \
487487
-H "x-secret-key: YOUR_THIRDWEB_SECRET_KEY"
488488
```
489489

490490
**Response:**
491-
```
491+
```tsx
492492
{
493493
"result": {
494494
"id": "string",
@@ -504,14 +504,14 @@ curl -X GET https://nebula-api.thirdweb.com/session/abc123 \
504504

505505
#### Create Session
506506

507-
```
507+
```bash
508508
POST /session
509509
```
510510

511511
Create a new chat session.
512512

513513
**Request Body:**
514-
```
514+
```tsx
515515
{
516516
"title": "My DeFi Research", // Optional: Custom session title
517517
"is_public": true, // Optional: Make session publicly accessible
@@ -523,7 +523,7 @@ Create a new chat session.
523523
```
524524

525525
**Example curl:**
526-
```
526+
```bash
527527
curl -X POST https://nebula-api.thirdweb.com/session \
528528
-H "Content-Type: application/json" \
529529
-H "x-secret-key: YOUR_THIRDWEB_SECRET_KEY" \
@@ -538,14 +538,14 @@ curl -X POST https://nebula-api.thirdweb.com/session \
538538

539539
#### Update Session
540540

541-
```
541+
```bash
542542
PUT /session/{session_id}
543543
```
544544

545545
Update an existing session.
546546

547547
**Example curl:**
548-
```
548+
```bash
549549
curl -X PUT https://nebula-api.thirdweb.com/session/abc123 \
550550
-H "Content-Type: application/json" \
551551
-H "x-secret-key: YOUR_THIRDWEB_SECRET_KEY" \
@@ -556,7 +556,7 @@ curl -X PUT https://nebula-api.thirdweb.com/session/abc123 \
556556
```
557557

558558
**Request Body:**
559-
```
559+
```tsx
560560
{
561561
"title": "string",
562562
"is_public": boolean
@@ -565,28 +565,28 @@ curl -X PUT https://nebula-api.thirdweb.com/session/abc123 \
565565

566566
#### Clear Session
567567

568-
```
568+
```bash
569569
POST /session/{session_id}/clear
570570
```
571571

572572
Clear a session's message history.
573573

574574
**Example curl:**
575-
```
575+
```bash
576576
curl -X POST https://nebula-api.thirdweb.com/session/abc123/clear \
577577
-H "x-secret-key: YOUR_THIRDWEB_SECRET_KEY"
578578
```
579579

580580
#### Delete Session
581581

582-
```
582+
```bash
583583
DELETE /session/{session_id}
584584
```
585585

586586
Delete a session.
587587

588588
**Example curl:**
589-
```
589+
```bash
590590
curl -X DELETE https://nebula-api.thirdweb.com/session/abc123 \
591591
-H "x-secret-key: YOUR_THIRDWEB_SECRET_KEY"
592592
```
@@ -595,7 +595,7 @@ curl -X DELETE https://nebula-api.thirdweb.com/session/abc123 \
595595

596596
The API uses standard HTTP status codes and returns errors in this format:
597597

598-
```
598+
```bash
599599
{
600600
"error": {
601601
"message": "Error description"

0 commit comments

Comments
 (0)