End User Accounts

Sign transaction via end user EVM account

Changed on

Signs a transaction with the given end user EVM account. The transaction should be serialized as a hex string using RLP.

The transaction must be an EIP-1559 dynamic fee transaction. The developer is responsible for ensuring that the unsigned transaction is valid, as the API will not validate the transaction.

post/v2/embedded-wallet-api/end-users/{userId}/evm/sign/transaction

Request

  • Base URL
    https://api.cdp.coinbase.com/platform
  • Auth
    • HTTP bearer
    • or HTTP bearer

Path parameters

userId, string required
Example:e051beeb-7163-4527-a5b6-35e301529ff2

The ID of the end user.

Query parameters

projectID, string
Example:8e03978e-40d5-43e8-bc93-6894a57f9324

The ID of the CDP Project. Required for end users authenticated using custom auth (i.e. a non-CDP JWT provider).

Headers

X-Wallet-Auth, string

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.

X-Idempotency-Key, string

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.

X-Developer-Auth, string

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

object required
address, string required

The 0x-prefixed address of the EVM account belonging to the end user.

transaction, string required

The RLP-encoded transaction to sign, as a 0x-prefixed hex string.

walletSecretId, string

Required when not using delegated signing. The ID of the Temporary Wallet Secret that was used to sign the X-Wallet-Auth Header.

Example request

{
  "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
  "transaction": "0xf86b098505d21dba00830334509431415daf58e2c6b7323b4c58712fd92952145da79018080",
  "walletSecretId": "e051beeb-7163-4527-a5b6-35e301529ff2"
}

Response

Successfully signed transaction.

object required
signedTransaction, string required

The RLP-encoded signed transaction, as a 0x-prefixed hex string.

Example response

{
  "signedTransaction": "0x1b0c9cf8cd4554c6c6d9e7311e88f1be075d7f25b418a044f4bf2c0a42a93e212ad0a8b54de9e0b5f7e3812de3f2c6cc79aa8c3e1c02e7ad14b4a8f42012c2c01b"
}

Changes

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    7 more changes in this revision