You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thirdweb AI can either auto execute transactions or prepare them for signing.
6
+
7
+
-**Auto Execute**: The API will auto execute the transaction. Requires wallet authentication.
8
+
-**Prepare for Signing**: The API will only prepare the transaction for signing. The user will need to sign the transaction manually.
9
+
10
+
## Auto Execute
11
+
12
+
Requirements:
13
+
14
+
- The context object must be set with:
15
+
-`from` set to the wallet address to execute the transaction from
16
+
-`auto_execute_transaction` set to `true`
17
+
- (Optional) `chain_ids` set to the chain IDs to execute the transaction on
18
+
- The API must be called with either:
19
+
- your `x-secret-key` header for server wallet authentication
20
+
- OR a `Authorization` header with a valid wallet JWT for user wallet authentication
21
+
22
+
Model behavior:
23
+
24
+
If all the requirements are met, the transaction will be executed automatically and the model will return a message with the transaction ID.
25
+
26
+
It will also include an `actions` array with a `monitor_transaction` action. This action can be used to monitor the transaction status and get the transaction receipt via the thirdweb API.
When the `auto_execute` parameter is set to `false` or omitted, the API will prepare the transaction for signing and return the transaction data in the `actions` array as a 'sign_transaction' action type.
The thirdweb AI chat API is a standard OpenAI-compatible chat completion API that allows you to interact with the thirdweb AI model, optimized for blockchain interactions.
5
+
The thirdweb API exposes a standard OpenAI-compatible chat completion API that allows you to interact with the thirdweb AI model, optimized for blockchain interactions.
6
6
7
7
- Query real-time data from the blockchain
8
8
- Analyze transactions
9
9
- Fetch token balances, prices and metadata
10
-
-Prepare any contract call or transaction for signing
11
-
-Prepare swaps from/to any token pair
10
+
-Execute or prepare any contract call or transaction
0 commit comments