Skip to content

Commit 2caa2bb

Browse files
committed
added v3
1 parent c93f7a9 commit 2caa2bb

File tree

8 files changed

+686
-282
lines changed

8 files changed

+686
-282
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Details } from "@doc";
2+
3+
# Server Wallets
4+
5+
Smart server wallets are the recommended way to perform blockchain operations with Engine.
6+
7+
You can create smart server wallets by navigating to Engine > Server Wallets in your project dashboard.
8+
Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
import { Callout, Step, Steps, Tabs, TabsContent, TabsTrigger, TabsList } from "@doc";
2+
3+
# Get started
4+
5+
Learn how to get started with thirdweb Engine. This guide will walk you through the steps to start building with thirdweb Engine by creating a Vault, server wallets, and integrating into your application.
6+
7+
## Prerequisites
8+
9+
- Create a thirdweb project. If you don't have a project yet, [learn how to create a project](/account/api-keys/create).
10+
11+
## Engine Setup
12+
13+
<Steps>
14+
<Step title="Navigate to Engine">
15+
In your project dashboard, navigate to **Engine** to get started.
16+
</Step>
17+
18+
<Step title="Create Vault">
19+
Create a vault to manage your Engine's server wallets. After setup, you can manage your Vault to create additional access tokens or rotate admin keys.
20+
21+
<Callout variant="info" title="Vault">
22+
Vault is thirdweb's key management service designed to store smart server wallets non-custodially. Learn more about [Vault].
23+
</Callout>
24+
</Step>
25+
26+
<Step title="Create Server Wallet">
27+
Create a server wallet to perform blockchain actions with Engine.
28+
29+
<Callout variant="info" title="Server Wallet">
30+
Server wallets are smart wallets Engine uses to perform blockchain actions. [Learn more about server wallets](/engine/configure-wallets/server-wallets).
31+
</Callout>
32+
</Step>
33+
34+
<Step title="Send Test Transaction">
35+
To verify your server wallet setup and see how transactions work, you can send a test transaction in the next step. This sends a no-op transaction—a transaction with zero value—to your own wallet.
36+
37+
You can send additional test transactions or proceed with the full setup whenever you're ready.
38+
</Step>
39+
40+
<Step title="Integrate with your app">
41+
Integrate Engine into your application using the thirdweb SDK or Engine API. [View full API reference.](https://client.scalar.com/workspace/default/request/yq_Wx56PL4Ur6jOZsAOpA)
42+
43+
<Tabs defaultValue="curl">
44+
<TabsList>
45+
<TabsTrigger value="curl">Curl</TabsTrigger>
46+
<TabsTrigger value="javascript">JavaScript</TabsTrigger>
47+
<TabsTrigger value="python">Python</TabsTrigger>
48+
<TabsTrigger value="go">Go</TabsTrigger>
49+
<TabsTrigger value="c-sharp">C#</TabsTrigger>
50+
</TabsList>
51+
52+
<TabsContent value="curl">
53+
```bash
54+
curl -X POST "https://engine-cloud-dev-l8wt.chainsaw-dev.zeet.app/v1/write/contract" \
55+
-H "Content-Type: application/json" \
56+
-H "x-secret-key: <your-project-secret-key>" \
57+
-H "x-vault-access-token: <your-vault-access-token>" \
58+
-d '{
59+
"executionOptions": {
60+
"from": "<your-server-wallet-address>",
61+
"chainId": "84532"
62+
},
63+
"params": [
64+
{
65+
"contractAddress": "0x...",
66+
"method": "function mintTo(address to, uint256 amount)",
67+
"params": ["0x...", "100"]
68+
}
69+
]
70+
}'
71+
```
72+
73+
</TabsContent>
74+
75+
<TabsContent value="javascript">
76+
```typescript
77+
const response = await fetch(
78+
"https://engine-cloud-dev-l8wt.chainsaw-dev.zeet.app/v1/write/contract",
79+
{
80+
method: "POST",
81+
headers: {
82+
"Content-Type": "application/json",
83+
"x-secret-key": "<your-project-secret-key>",
84+
"x-vault-access-token": "<your-vault-access-token>",
85+
},
86+
body: JSON.stringify({
87+
executionOptions: {
88+
from: "<your-server-wallet-address>",
89+
chainId: "84532",
90+
},
91+
params: [
92+
{
93+
contractAddress: "0x...",
94+
method: "function mintTo(address to, uint256 amount)",
95+
params: ["0x...", "100"],
96+
},
97+
],
98+
}),
99+
}
100+
);
101+
```
102+
</TabsContent>
103+
104+
<TabsContent value="python">
105+
```python
106+
import requests
107+
import json
108+
109+
url = "https://engine-cloud-dev-l8wt.chainsaw-dev.zeet.app/v1/write/contract"
110+
headers = {
111+
"Content-Type": "application/json",
112+
"x-secret-key": "<your-project-secret-key>",
113+
"x-vault-access-token": "<your-vault-access-token>"
114+
}
115+
payload = {
116+
"executionOptions": {
117+
"from": "<your-server-wallet-address>",
118+
"chainId": "84532"
119+
},
120+
"params": [
121+
{
122+
"contractAddress": "0x...",
123+
"method": "function mintTo(address to, uint256 amount)",
124+
"params": ["0x...", "100"]
125+
}
126+
]
127+
}
128+
129+
response = requests.post(url, headers=headers, json=payload)
130+
result = response.json()
131+
```
132+
</TabsContent>
133+
134+
<TabsContent value="go">
135+
```go
136+
package main
137+
138+
import (
139+
"bytes"
140+
"encoding/json"
141+
"fmt"
142+
"net/http"
143+
)
144+
145+
func main() {
146+
url := "https://engine-cloud-dev-l8wt.chainsaw-dev.zeet.app/v1/write/contract"
147+
148+
// Create the request payload
149+
type Param struct {
150+
ContractAddress string `json:"contractAddress"`
151+
Method string `json:"method"`
152+
Params []string `json:"params"`
153+
}
154+
155+
type RequestBody struct {
156+
ExecutionOptions struct {
157+
From string `json:"from"`
158+
ChainId string `json:"chainId"`
159+
} `json:"executionOptions"`
160+
Params []Param `json:"params"`
161+
}
162+
163+
requestBody := RequestBody{
164+
Params: []Param{
165+
{
166+
ContractAddress: "0x...",
167+
Method: "function mintTo(address to, uint256 amount)",
168+
Params: []string{"0x...", "100"},
169+
},
170+
},
171+
}
172+
requestBody.ExecutionOptions.From = "<your-server-wallet-address>"
173+
requestBody.ExecutionOptions.ChainId = "84532"
174+
175+
jsonData, _ := json.Marshal(requestBody)
176+
177+
// Create the HTTP request
178+
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
179+
req.Header.Set("Content-Type", "application/json")
180+
req.Header.Set("x-secret-key", "<your-project-secret-key>")
181+
req.Header.Set("x-vault-access-token", "<your-vault-access-token>")
182+
183+
// Send the request
184+
client := &http.Client{}
185+
resp, err := client.Do(req)
186+
if err != nil {
187+
fmt.Println("Error:", err)
188+
return
189+
}
190+
defer resp.Body.Close()
191+
192+
// Process the response
193+
var result map[string]interface{}
194+
json.NewDecoder(resp.Body).Decode(&result)
195+
fmt.Println("Response:", result)
196+
}
197+
```
198+
</TabsContent>
199+
200+
<TabsContent value="c-sharp">
201+
```
202+
using System;
203+
using System.Net.Http;
204+
using System.Text;
205+
using System.Text.Json;
206+
using System.Threading.Tasks;
207+
208+
class Program
209+
{
210+
static async Task Main()
211+
{
212+
var url = "https://engine-cloud-dev-l8wt.chainsaw-dev.zeet.app/v1/write/contract";
213+
214+
var requestData = new
215+
{
216+
executionOptions = new
217+
{
218+
from = "<your-server-wallet-address>",
219+
chainId = "84532"
220+
},
221+
@params = new[]
222+
{
223+
new
224+
{
225+
contractAddress = "0x...",
226+
method = "function mintTo(address to, uint256 amount)",
227+
@params = new[] { "0x...", "100" }
228+
}
229+
}
230+
};
231+
232+
var json = JsonSerializer.Serialize(requestData);
233+
var content = new StringContent(json, Encoding.UTF8, "application/json");
234+
235+
using var httpClient = new HttpClient();
236+
httpClient.DefaultRequestHeaders.Add("x-secret-key", "<your-project-secret-key>");
237+
httpClient.DefaultRequestHeaders.Add("x-vault-access-token", "<your-vault-access-token>");
238+
239+
var response = await httpClient.PostAsync(url, content);
240+
var responseContent = await response.Content.ReadAsStringAsync();
241+
242+
Console.WriteLine(responseContent);
243+
}
244+
}
245+
```
246+
</TabsContent>
247+
</Tabs>
248+
249+
<Callout variant="info" title="TypeScript SDK">
250+
You can use the full TypeScript SDK in your backend, allowing you to use:
251+
- The full catalog of extension functions
252+
- The prepareContractCall function to encode your transactions
253+
- The full account interface, predefined chains, and more
254+
The SDK handles encoding your transactions, signing them to Engine and polling for status.
255+
</Callout>
256+
</Step>
257+
</Steps>
258+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { DocLayout } from "@/components/Layouts/DocLayout";
2+
import { createMetadata } from "@doc";
3+
import { sidebar } from "./sidebar";
4+
5+
export default async function Layout(props: { children: React.ReactNode }) {
6+
return (
7+
<DocLayout sideBar={sidebar} editPageButton={true}>
8+
{props.children}
9+
</DocLayout>
10+
);
11+
}
12+
13+
export const metadata = createMetadata({
14+
title: "Engine V3",
15+
description:
16+
"Engine is a backend HTTP server that calls smart contracts using your managed backend wallets.",
17+
});
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
import { DocImage, FeatureCard, OpenSourceCard, Callout } from "@doc";
2+
import { createMetadata } from "@/components/Document";
3+
import { Activity, CircleCheck, RotateCcw, Ban, File, MessageCircle, Wallet, Blocks, ArrowLeftRight, SlidersHorizontal} from "lucide-react";
4+
import SupportedChains from "../_images/supported-chains.png";
5+
6+
7+
export const metadata = createMetadata({
8+
title: "thirdweb Engine",
9+
description: "An open-source, backend server that reads, writes, and deploys contracts at production scale.",
10+
});
11+
12+
# Engine
13+
14+
Engine provides a way to read and write to the blockchain at scale through simple API endpoints.
15+
16+
<OpenSourceCard title="Engine" href="https://github.com/thirdweb-dev/engine" />
17+
18+
<Callout variant="info" title="Looking for the previous documentation?">
19+
We just launched Engine Cloud in beta — we're actively adding new features, endpoints, and performance improvements.
20+
Engine Standard and Premium have now been rebranded as Engine Dedicated V2, with Engine Dedicated V3 on the way.
21+
22+
Looking for the previous version? [Head back to the Engine V2 documentation.](/engine)
23+
</Callout>
24+
25+
## Features
26+
27+
<div
28+
className="my-4 grid gap-2 md:grid-cols-2 lg:grid-cols-2 "
29+
>
30+
<FeatureCard
31+
title="Concurrent Transactions"
32+
description="Send multiple transactions at once with automatic nonce management"
33+
iconUrl={<ArrowLeftRight />}
34+
/>
35+
36+
<FeatureCard
37+
title="Avoid Transaction Failures"
38+
description="Resubmits stuck transactions, handling nonce values, gas settings, and RPC errors."
39+
iconUrl={<RotateCcw/>}
40+
/>
41+
42+
<FeatureCard
43+
title="Wallet Management"
44+
description="Manage funds and send transactions without worrying about topping up gas fees."
45+
iconUrl={<Wallet/>}
46+
/>
47+
48+
<FeatureCard
49+
title="Granular Access Control"
50+
description="Control access to server wallets via access tokens with specified permission scopes"
51+
iconUrl={<SlidersHorizontal/>}
52+
/>
53+
54+
<FeatureCard
55+
title="Abstract Blockchain Complexity"
56+
description="Sponsor gas fees using built-in relayers and session keys to transact on behalf of users."
57+
iconUrl={<CircleCheck/>}
58+
/>
59+
60+
<FeatureCard
61+
title="Offchain Integrations"
62+
description="Integrate with existing services to do onchain actions triggered from offchain events."
63+
iconUrl={<Blocks/>}
64+
/>
65+
66+
<FeatureCard
67+
title="Programmatic Deployments"
68+
description="Deploy smart accounts, tokens, NFTs, marketplaces, and more."
69+
iconUrl={<Blocks/>}
70+
/>
71+
72+
<FeatureCard
73+
title="Transaction Observability"
74+
description="Debug transaction failures with detailed timelines, onchain errors, and gas details."
75+
iconUrl={<Activity/>}
76+
/>
77+
</div>
78+
79+
## Engine Cloud vs. Dedicated
80+
81+
| Feature | Cloud ☁️ | Dedicated (Coming Soon) |
82+
|--------------------|-------------------------------------------|------------------------------------------|
83+
| Wallets | Server Wallets | Server Wallets, AWS, GCP, Circle |
84+
| Database Backups || 30 Day Backups |
85+
| Infrastructure | Shared | Isolated |
86+
| Rate Limits | [Limited by RPC Plan](https://thirdweb.com/pricing) | Unlimited |
87+
| Pricing | [See pricing page](https://thirdweb.com/pricing) | [See pricing page](https://thirdweb.com/pricing) |
88+
89+
90+
## Supported Chains
91+
92+
Engine is supported on every EVM compatible chain and private subnets. To view the full list, visit [thirdweb chainlist](https://thirdweb.com/chainlist?service=engine).
93+
94+
<DocImage src={SupportedChains} />
95+
96+

0 commit comments

Comments
 (0)