Skip to content

Commit cfc1398

Browse files
authored
Update endpoint documentation on portal (#5810)
Signed-off-by: samina <57885104+saminacodes@users.noreply.github.com>
1 parent 8d17d05 commit cfc1398

File tree

1 file changed

+13
-23
lines changed
  • apps/portal/src/app/nebula/api-reference

1 file changed

+13
-23
lines changed

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

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ data: {
151151
"request_id": "9efc7f6a-8576-4d9c-8603-f6c72aa72164",
152152
"type": "sign_transaction",
153153
"source": "executor",
154-
"data": "{\"maxPriorityFeePerGas\": 13620452, \"maxFeePerGas\": 53197870998, \"chainId\": 11155111, \"from\": \"0xc3F2b2a12Eba0f5989cD75B2964E31D56603a2cE\", \"to\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\", \"data\": \"0x\", \"value\": 100000000000000, \"gas\": 0}"
154+
"data": "{\"chainId\": 11155111, \"to\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\", \"data\": \"0x\", \"value\": \"0x5af3107a4000\"}"
155155
}
156156

157157
event: delta
@@ -290,18 +290,18 @@ Chat actions represent blockchain transactions or operations that Nebula has pre
290290
**Example Response with Chat Action:**
291291
```json
292292
{
293-
"message": "You need to sign the following blockchain transaction to transfer 0.0001 ETH to the address resolved from the ENS name `vitalik.eth`, which is `0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045`. The transaction simulation shows that it will most likely succeed.\n\nHere are the transaction details:\n\n- **From:** 0xc3F2b2a12Eba0f5989cD75B2964E31D56603a2cE\n- **To:** 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\n- **Value:** 0.0001 ETH\n- **Gas Limit:** 0 (will be set automatically)\n- **Chain ID:** 11155111 (Sepolia)\n\nPlease sign the transaction with the following details:\n\n<UnsignedTransaction>{\"maxPriorityFeePerGas\":16142638,\"maxFeePerGas\":2673759432,\"chainId\":11155111,\"from\":\"0xc3F2b2a12Eba0f5989cD75B2964E31D56603a2cE\",\"to\":\"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\",\"data\":\"0x\",\"value\":100000000000000,\"gas\":0}</UnsignedTransaction>",
293+
"message": "The transaction to transfer 0.0001 ETH to the address resolved from the ENS name `vitalik.eth` (which is `0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045`) is set up successfully. The simulation indicates that the transaction is likely to succeed.\n\nPlease proceed by signing and confirming the transaction.",
294294
"actions": [
295295
{
296-
"session_id": "41d577b7-87d0-40fd-9a82-6dac2783e340",
297-
"request_id": "d5caf693-775f-4906-ac18-d98163474dfa",
296+
"session_id": "437a0df7-d512-4ef4-95b5-6168ccbbe097",
297+
"request_id": "c2b51ed6-da79-49ac-b411-206a42059509",
298298
"type": "sign_transaction",
299299
"source": "executor",
300-
"data": "{\"maxPriorityFeePerGas\": 16142638, \"maxFeePerGas\": 2673759432, \"chainId\": 11155111, \"from\": \"0xc3F2b2a12Eba0f5989cD75B2964E31D56603a2cE\", \"to\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\", \"data\": \"0x\", \"value\": 100000000000000, \"gas\": 0}"
300+
"data": "{\"chainId\": 11155111, \"to\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\", \"data\": \"0x\", \"value\": \"0x5af3107a4000\"}"
301301
}
302302
],
303-
"session_id": "41d577b7-87d0-40fd-9a82-6dac2783e340",
304-
"request_id": "d5caf693-775f-4906-ac18-d98163474dfa"
303+
"session_id": "437a0df7-d512-4ef4-95b5-6168ccbbe097",
304+
"request_id": "c2b51ed6-da79-49ac-b411-206a42059509"
305305
}
306306
```
307307

@@ -311,14 +311,10 @@ Chat actions represent blockchain transactions or operations that Nebula has pre
311311
- `type`: The type of action (e.g., "sign_transaction")
312312
- `source`: Origin of the action (e.g., "executor")
313313
- `data`: Transaction parameters including:
314-
- `maxPriorityFeePerGas`: Maximum priority fee per gas unit
315-
- `maxFeePerGas`: Maximum total fee per gas unit
316314
- `chainId`: Network identifier (e.g., 11155111 for Sepolia)
317-
- `from`: Sender's address
318315
- `to`: Recipient's address
319316
- `data`: Transaction data (if any)
320317
- `value`: Amount to send in wei
321-
- `gas`: Gas limit (0 for automatic estimation)
322318

323319
When handling actions:
324320
1. Parse the `message` field for human-readable transaction details
@@ -362,8 +358,6 @@ async function handleNebulaResponse(response) {
362358
to: txData.to,
363359
data: txData.data,
364360
value: BigInt(txData.value),
365-
maxFeePerGas: BigInt(txData.maxFeePerGas),
366-
maxPriorityFeePerGas: BigInt(txData.maxPriorityFeePerGas),
367361
chain: txData.chainId,
368362
client
369363
});
@@ -434,18 +428,18 @@ Execute specific blockchain commands or actions. This endpoint is designed for d
434428
**Example Response:**
435429
```json
436430
{
437-
"message": "The transaction is to transfer 0.0001 ETH to the address 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045. The transaction simulation indicates that it will most likely succeed. \n\nPlease go ahead and sign and confirm the transaction.",
431+
"message": "The transaction to transfer 0.0001 ETH to the address resolved from the ENS name `vitalik.eth` (which is `0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045`) is set up successfully. The simulation indicates that the transaction is likely to succeed.\n\nPlease proceed by signing and confirming the transaction.",
438432
"actions": [
439433
{
440-
"session_id": "d8ca7326-fea4-4bcc-9bb7-9c84dd138379",
441-
"request_id": "40404a54-be4a-4540-8c97-d74f8c454d0e",
434+
"session_id": "437a0df7-d512-4ef4-95b5-6168ccbbe097",
435+
"request_id": "c2b51ed6-da79-49ac-b411-206a42059509",
442436
"type": "sign_transaction",
443437
"source": "executor",
444-
"data": "{\"maxPriorityFeePerGas\": \"0x6a392bd\", \"maxFeePerGas\": \"0x546126ce9\", \"chainId\": 11155111, \"from\": \"0xc3F2b2a12Eba0f5989cD75B2964E31D56603a2cE\", \"to\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\", \"data\": \"0x\", \"value\": \"0x5af3107a4000\", \"gas\": \"0x5208\"}"
438+
"data": "{\"chainId\": 11155111, \"to\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\", \"data\": \"0x\", \"value\": \"0x5af3107a4000\"}"
445439
}
446440
],
447-
"session_id": "d8ca7326-fea4-4bcc-9bb7-9c84dd138379",
448-
"request_id": "40404a54-be4a-4540-8c97-d74f8c454d0e"
441+
"session_id": "437a0df7-d512-4ef4-95b5-6168ccbbe097",
442+
"request_id": "c2b51ed6-da79-49ac-b411-206a42059509"
449443
}
450444
```
451445

@@ -473,14 +467,10 @@ curl -X POST https://nebula-api.thirdweb.com/execute \
473467
- `type`: The type of action (e.g., "sign_transaction")
474468
- `source`: Origin of the action
475469
- `data`: Transaction data in hexadecimal format including:
476-
- `maxPriorityFeePerGas`: Maximum priority fee per gas in hex
477-
- `maxFeePerGas`: Maximum fee per gas in hex
478470
- `chainId`: Network identifier
479-
- `from`: Sender's address
480471
- `to`: Recipient's address
481472
- `data`: Transaction data
482473
- `value`: Amount to send in hex
483-
- `gas`: Gas limit in hex
484474
- `session_id`: Session identifier for this execution
485475
- `request_id`: Unique identifier for this request
486476

0 commit comments

Comments
 (0)