Send transaction via end user EVM account
Changed onSigns a transaction with the given end user EVM account and sends it to the indicated supported network. This API handles nonce management and gas estimation, leaving the developer to provide only the minimal set of fields necessary to send the transaction. The transaction should be serialized as a hex string using RLP.
The transaction must be an EIP-1559 dynamic fee transaction.
Transaction fields and API behavior
-
to (Required): The address of the contract or account to send the transaction to.
-
chainId (Ignored): The value of the chainId field in the transaction is ignored. The transaction will be sent to the network indicated by the network field in the request body.
-
nonce (Optional): The nonce to use for the transaction. If not provided, the API will assign a nonce to the transaction based on the current state of the account.
-
maxPriorityFeePerGas (Optional): The maximum priority fee per gas to use for the transaction. If not provided, the API will estimate a value based on current network conditions.
-
maxFeePerGas (Optional): The maximum fee per gas to use for the transaction. If not provided, the API will estimate a value based on current network conditions.
-
gasLimit (Optional): The gas limit to use for the transaction. If not provided, the API will estimate a value based on the to and data fields of the transaction.
-
value (Optional): The amount of ETH, in wei, to send with the transaction.
-
data (Optional): The data to send with the transaction; only used for contract calls.
-
accessList (Optional): The access list to use for the transaction.
Request
- Base URLhttps://api.cdp.coinbase.com/platform
- Auth
- HTTP bearer
- or HTTP bearer
Path parameters
The ID of the end user.
Query parameters
The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).
Headers
A JWT signed using your Wallet Secret, encoded in base64. Refer to the Generate Wallet Token section of our Authentication docs for more details on how to generate your Wallet Token.
An optional string request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our Idempotency docs for more information on using idempotency keys.
A JWT signed using your Wallet Secret, encoded in base64. Refer to the Generate Wallet Token section of our Authentication docs for more details on how to generate your Wallet Token.
Request body
The 0x-prefixed address of the EVM account belonging to the end user.
The network to send the transaction to.
Required when not using delegated signing. The ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.
The RLP-encoded transaction to sign and send, as a 0x-prefixed hex string.
Example request
{
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"network": "base-sepolia",
"walletSecretId": "e051beeb-7163-4527-a5b6-35e301529ff2",
"transaction": "0xf86b098505d21dba00830334509431415daf58e2c6b7323b4c58712fd92952145da79018080"
}Response
Successfully signed and sent transaction.
The hash of the transaction, as a 0x-prefixed hex string.
Example response
{
"transactionHash": "0xf8f98fb6726fc936f24b2007df5cb20e2b8444ff3dfaa2a929335f432a9be2e7"
}Changes
- warning
added the new
policy_not_applicableenum value to theerrorTyperesponse property for the response status - warning
added the new
policy_not_applicableenum value to theerrorTyperesponse property for the response status - warning
added the new
policy_not_applicableenum value to theerrorTyperesponse property for the response status
7 more changes in this revision
- warning