Chat actions represent blockchain transactions or operations that Nebula has prepared in response to your request. The response includes both a detailed explanation in the message
field and the actual transaction data in the actions
array.
Example Response with Chat Action:
Action Properties:
session_id
: Unique identifier for the current sessionrequest_id
: Unique identifier for the specific requesttype
: The type of action (e.g., "sign_transaction")source
: Origin of the action (e.g., "executor")data
: Transaction parameters including:chainId
: Network identifier (e.g., 11155111 for Sepolia)to
: Recipient's addressdata
: Transaction data (if any)value
: Amount to send in wei
When handling actions:
- Parse the
message
field for human-readable transaction details - Extract the transaction data from the
actions
array - Present transaction details to the user for review
- Use a local wallet to sign the transaction
- Broadcast the signed transaction to the network
Example Implementation with thirdweb SDK: