How-To Guides
Smart Wallet Endpoints
Bundler API Endpoints
Additional Resources
Smart Wallet Endpoints
wallet_prepareCalls
Prepares calls for smart wallet execution with specified capabilities.
POST
/
smartwallet
Copy
Ask AI
curl --request POST \
--url https://api.staging.gelato.digital/smartwallet \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "wallet_prepareCalls",
"params": [
{
"chainId": 123,
"from": "<string>",
"calls": [
{
"to": "<string>",
"data": "<string>",
"value": "<string>"
}
],
"capabilities": {
"wallet": {
"type": "gelato",
"encoding": "safe",
"version": "<string>"
},
"payment": {
"type": "sponsored",
"sponsorApiKey": "<string>"
},
"authorization": {
"address": "<string>",
"authorized": true
},
"nonceKey": "<string>"
}
}
]
}'
Copy
Ask AI
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"chainId": 123,
"signatureRequest": {
"type": "<string>",
"data": {
"sender": "<string>",
"nonce": "<string>",
"initCode": "<string>",
"callData": "<string>",
"signature": "<string>",
"paymasterAndData": "<string>",
"callGasLimit": "<string>",
"verificationGasLimit": "<string>",
"preVerificationGas": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"factory": "<string>",
"factoryData": "<string>"
}
},
"context": {
"wallet": {
"encoding": "<string>"
},
"payment": {
"type": "<string>",
"sponsorApiKey": "<string>"
},
"factory": {
"address": "<string>",
"data": "<string>"
},
"entryPoint": {
"version": "<string>",
"address": "<string>"
},
"userOp": {
"sender": "<string>",
"nonce": "<string>",
"initCode": "<string>",
"callData": "<string>",
"signature": "<string>",
"paymasterAndData": "<string>",
"callGasLimit": "<string>",
"verificationGasLimit": "<string>",
"preVerificationGas": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"factory": "<string>",
"factoryData": "<string>"
},
"quote": {
"fee": {
"amount": "<string>",
"rate": 123,
"decimals": 123
},
"gas": {
"amount": "<string>",
"l1": "<string>"
}
}
}
}
}
Query Parameters
API key for authentication.
Body
application/json
Response
200
application/json
Successful response
The response is of type object
.
Copy
Ask AI
curl --request POST \
--url https://api.staging.gelato.digital/smartwallet \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "wallet_prepareCalls",
"params": [
{
"chainId": 123,
"from": "<string>",
"calls": [
{
"to": "<string>",
"data": "<string>",
"value": "<string>"
}
],
"capabilities": {
"wallet": {
"type": "gelato",
"encoding": "safe",
"version": "<string>"
},
"payment": {
"type": "sponsored",
"sponsorApiKey": "<string>"
},
"authorization": {
"address": "<string>",
"authorized": true
},
"nonceKey": "<string>"
}
}
]
}'
Copy
Ask AI
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"chainId": 123,
"signatureRequest": {
"type": "<string>",
"data": {
"sender": "<string>",
"nonce": "<string>",
"initCode": "<string>",
"callData": "<string>",
"signature": "<string>",
"paymasterAndData": "<string>",
"callGasLimit": "<string>",
"verificationGasLimit": "<string>",
"preVerificationGas": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"factory": "<string>",
"factoryData": "<string>"
}
},
"context": {
"wallet": {
"encoding": "<string>"
},
"payment": {
"type": "<string>",
"sponsorApiKey": "<string>"
},
"factory": {
"address": "<string>",
"data": "<string>"
},
"entryPoint": {
"version": "<string>",
"address": "<string>"
},
"userOp": {
"sender": "<string>",
"nonce": "<string>",
"initCode": "<string>",
"callData": "<string>",
"signature": "<string>",
"paymasterAndData": "<string>",
"callGasLimit": "<string>",
"verificationGasLimit": "<string>",
"preVerificationGas": "<string>",
"maxFeePerGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"factory": "<string>",
"factoryData": "<string>"
},
"quote": {
"fee": {
"amount": "<string>",
"rate": 123,
"decimals": 123
},
"gas": {
"amount": "<string>",
"l1": "<string>"
}
}
}
}
}
Assistant
Responses are generated using AI and may contain mistakes.