> ## Documentation Index
> Fetch the complete documentation index at: https://developers.circle.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign transaction

> Sign a transaction from a specific developer-controlled wallet.

To identify the wallet, you must provide either `walletId`, or both `walletAddress` and `blockchain` in the request body.

NOTE: This endpoint is only available for the following chains: `SOL`, `SOL-DEVNET`, `NEAR`, `NEAR-TESTNET`, `EVM`, `EVM-TESTNET`. Each chain defines its own standard, please refer to [Signing APIs doc](https://learn.circle.com/w3s/signing-apis).




## OpenAPI

````yaml openapi/developer-controlled-wallets.yaml post /v1/w3s/developer/sign/transaction
openapi: 3.0.3
info:
  version: '1.0'
  title: Developer-Controlled Wallets
  description: Developer-Controlled Wallets API documentation.
servers:
  - url: https://api.circle.com
security:
  - BearerAuth: []
tags:
  - name: Wallet Sets
  - name: Wallets
  - name: Signing
  - name: Transactions
  - name: Token Lookup
paths:
  /v1/w3s/developer/sign/transaction:
    post:
      tags:
        - Signing
      summary: Sign transaction
      description: >
        Sign a transaction from a specific developer-controlled wallet.


        To identify the wallet, you must provide either `walletId`, or both
        `walletAddress` and `blockchain` in the request body.


        NOTE: This endpoint is only available for the following chains: `SOL`,
        `SOL-DEVNET`, `NEAR`, `NEAR-TESTNET`, `EVM`, `EVM-TESTNET`. Each chain
        defines its own standard, please refer to [Signing APIs
        doc](https://learn.circle.com/w3s/signing-apis).
      operationId: signTransaction
      parameters:
        - $ref: '#/components/parameters/XRequestId'
      requestBody:
        $ref: '#/components/requestBodies/SignTransaction'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignTransactionResponse'
          description: Successfully signed a transaction.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/NotAuthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - BearerAuth: []
components:
  parameters:
    XRequestId:
      name: X-Request-Id
      in: header
      description: >
        Developer-provided identifier for this request, used for tracing
        requests in Wallets API logs and the Developer Console, and when
        communicating with Circle Support.

        **Must be a UUID to appear in logs.** Non-UUID values are accepted by
        the API but are ignored by logging and tracing systems.
      schema:
        $ref: '#/components/schemas/XRequestId'
  requestBodies:
    SignTransaction:
      content:
        application/json:
          schema:
            type: object
            required:
              - entitySecretCiphertext
            properties:
              walletId:
                $ref: '#/components/schemas/Id'
              rawTransaction:
                $ref: '#/components/schemas/RawTransaction'
              transaction:
                $ref: '#/components/schemas/TransactionObject'
              memo:
                $ref: '#/components/schemas/Memo'
              entitySecretCiphertext:
                $ref: '#/components/schemas/EntitySecretCiphertext'
              blockchain:
                $ref: '#/components/schemas/Blockchain'
              walletAddress:
                $ref: '#/components/schemas/Address'
      required: true
      description: Schema for the request payload to sign a transaction.
  schemas:
    SignTransactionResponse:
      title: SignTransactionResponse
      type: object
      required:
        - data
      properties:
        data:
          type: object
          required:
            - signature
            - signedTransaction
          properties:
            signature:
              $ref: '#/components/schemas/Signature'
            signedTransaction:
              $ref: '#/components/schemas/SignedTransaction'
            txHash:
              $ref: '#/components/schemas/TransactionHash'
              description: >
                Blockchain-generated identifier of the transaction. Present if
                the wallet blockchain is not Solana.
    XRequestId:
      type: string
      format: uuid
      description: >-
        A unique identifier, which can be helpful for identifying a request when
        communicating with Circle support.
      example: 2adba88e-9d63-44bc-b975-9b6ae3440dde
    Id:
      type: string
      format: uuid
      description: System-generated unique identifier of the resource.
      example: c4d1da72-111e-4d52-bdbf-2e74a2d803d5
    RawTransaction:
      type: string
      description: >
        Raw transaction string that needs to be signed. Excluded with
        `transaction`. Required without `transaction`.

        Required to be base64 encoded for NEAR, Solana chains. Required to be
        hex encoded for EVM chains.
      example: >-
        AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAIAAQROrEbiYfF3zCII9...
    TransactionObject:
      title: Transaction
      type: string
      description: >
        Transaction object in JSON that needs to be signed. Excluded with
        `rawTransaction`. Required without `rawTransaction`.


        NOTE: This field is only supported by `EVM` chains.
      example: >-
        {"nonce":1,"to":"0x9e4ebf23f713268b8e72cd162337f20c536357c9","value":"10000000000000000","gas":"21000","maxFeePerGas":"42000000000","maxPriorityFeePerGas":"25000000000","chainId":80002}
    Memo:
      type: string
      description: >-
        The human readable explanation for this sign action. Useful for
        presenting with extra information.
      example: Transfer USDC to Sam
    EntitySecretCiphertext:
      type: string
      description: >
        A base64 string expression of the entity secret ciphertext. The entity
        secret should be encrypted by the entity public key. Circle mandates
        that the entity secret ciphertext is unique for each API request.
      format: byte
      example: >-
        M8OAwbJ8rMsPd8+NT4xRDBDJSNqUKAvJeWPyuwZSlVXgRucogAlBxjvjIw4nsKeJ4hejjlpmyaaJrusHm6zsvy4BLuL1an3dYn3wORjYf3sU4QN9Rdk9OJxZvE5hDNPq7okucvb1eElxPVREZvr4ew7sh4ktmwDrwWFUYwKoly4fEzxYI9zvVpCY9xPSgkA5m3u1/P2vMYZ0QFtn8lRZxCuTyc4wRLpT9TOaK46CEXCakmAYaYWnLkl18QXOSY6FhCbGm+zQ2Uu4cUPU/bqjIyQIB80ut3drInDzysQLE/FJjcJW9+q+E75LKGKnrp2zCg/Xv3TEvru9a2A0vd7InZ9kNuxnPPFc1JSO7BT2TPP89YcLO0OmtRiGoXPlYzXuNIfUsVQ5/FW9FPp4qp+iMPrAidsjQrskHPxhW92GeezLpOSkUl7lAWQoioYED979mqGfzNIZTF5Ob6fJifboiwhOab6sAKnxmvWjgFnW/bZ5a8xkzgPc4RHpIejot1Q7fpT+67eA+DVxvUqakJI6t3iEaZTNITCSU2Cfj1oyCQfrZGf9tauW49rO1zYHKoV4z9ylymOWtCUk641iyxwFCNSW47CDsc0M8iI4J6JqsNMpQuR9sdWVhROi5yn9UR7ac7pizB3dFmc0/qjtTRoYStaaSEYg3L5woALv5kAA2j4=
    Blockchain:
      type: string
      description: >-
        The blockchain network that the resource is to be created on or is
        currently on.
      enum:
        - ETH
        - ETH-SEPOLIA
        - AVAX
        - AVAX-FUJI
        - MATIC
        - MATIC-AMOY
        - SOL
        - SOL-DEVNET
        - ARB
        - ARB-SEPOLIA
        - NEAR
        - NEAR-TESTNET
        - EVM
        - EVM-TESTNET
        - UNI
        - UNI-SEPOLIA
        - BASE
        - BASE-SEPOLIA
        - OP
        - OP-SEPOLIA
        - APTOS
        - APTOS-TESTNET
        - ARC-TESTNET
        - MONAD
        - MONAD-TESTNET
      example: MATIC-AMOY
    Address:
      title: Address
      description: >
        Blockchain generated unique identifier, associated with wallet
        (account), smart contract or other blockchain objects.
      type: string
      example: '0xca9142d0b9804ef5e239d3bc1c7aa0d1c74e7350'
    Signature:
      type: string
      description: >-
        Each chain encode signatures in a different way, please refer to
        [Signing APIs doc](https://learn.circle.com/w3s/signing-apis) and the
        blockchain's document.
      example: 3W6r38STvZuBSmk2bbbct132SjEsYSARo3CJi3JQvNUaFoYu...
    SignedTransaction:
      type: string
      description: >-
        Signed transaction. Base64 encoded for NEAR and Solana chains. Hex
        encoded for EVM chains.
      example: >-
        AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABpzlAhqqen7eyTe0KQ3w+9NS4E+7sscb+Cr...
    TransactionHash:
      type: string
      description: Blockchain generated identifier of the transaction.
      example: '0x4a25cc5e661d8504b59c5f38ba93f010e8518966f00e2ceda7955c4b8621357d'
  headers:
    XRequestId:
      description: >
        Developer-provided header parameter or Circle-generated universally
        unique identifier (UUID v4). Useful for identifying a specific request
        when communicating with Circle Support.
      schema:
        $ref: '#/components/schemas/XRequestId'
  responses:
    BadRequest:
      content:
        application/json:
          schema:
            type: object
            title: BadRequestResponse
            required:
              - code
              - message
            properties:
              code:
                type: integer
                description: Code that corresponds to the error.
              message:
                type: string
                description: Message that describes the error.
            example:
              code: 400
              message: Bad request.
      description: Request cannot be processed due to a client error.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    NotAuthorized:
      content:
        application/json:
          schema:
            type: object
            title: NotAuthorizedResponse
            required:
              - code
              - message
            properties:
              code:
                type: integer
                description: Code that corresponds to the error.
              message:
                type: string
                description: Message that describes the error.
            example:
              code: 401
              message: Malformed authorization.
      description: >-
        Request has not been applied because it lacks valid authentication
        credentials.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    NotFound:
      content:
        application/json:
          schema:
            type: object
            title: NotFoundResponse
            required:
              - code
              - message
            properties:
              code:
                type: integer
                description: Code that corresponds to the error.
              message:
                type: string
                description: Message that describes the error.
            example:
              code: 404
              message: Not found.
      description: Specified resource was not found.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: PREFIX:ID:SECRET
      description: >-
        Circle's API Keys are formatted in the following structure
        "PREFIX:ID:SECRET". All three parts are required to make a successful
        request.

````