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

# Prepare call quote

> Prepares the necessary data structure for executing one or more contract calls on a target chain with multi-account support. This V3 endpoint extends the V1 functionality by supporting cross-chain operations with mixed Solana and EVM accounts.

**V3 Multi-Account Features:**
- Cross-chain operations with mixed Solana and EVM accounts
- Source asset specification via `fromAssetId` for bridging
- EIP-7702 delegation support for EOA-based contract calls
- Multi-account routing for complex cross-chain scenarios        




## OpenAPI

````yaml post /v3/quote/prepare-call-quote
openapi: 3.1.0
info:
  version: 1.6.2
  title: OneBalance API
  description: >
    # OneBalance API


    The OneBalance API provides a programmatic interface for managing OneBalance
    resources using standard HTTP requests. The API documentation includes a
    design and technology overview, followed by detailed endpoint information.


    ## Features


    OneBalance API provides a complete chain abstraction toolkit:


    - Smart Account Management: Predict addresses and deploy accounts

    - Cross-Chain Balances: View aggregated balances across multiple chains

    - Multichain Transactions: Execute transfers and swaps using aggregated
    balances

    - Transaction Status: Track multichain transaction history and status

    - Token Aggregation: Access unified token lists and pricing information


    Enterprise API Access: Need higher rate limits, dedicated infrastructure, or
    custom SLAs? [Contact our sales](mailto:sales@onebalance.io) team for
    enterprise API solutions.


    ## Base URL


    OneBalance API is built on REST principles and is served over HTTPS. To
    ensure data privacy, unencrypted HTTP is not supported.


    The Base URL for all API endpoints is:


    ```bash

    https://be.onebalance.io/api

    ```


    ## Quickstart


    Try our reference application at
    [app.onebalance.io](https://app.onebalance.io) to see the API in action or
    jump straight into our [API
    Reference](https://docs.onebalance.io/api-reference/account/predict-address)
    to start building.


    ## Authentication


    The OneBalance API uses API keys to authenticate requests. All API requests
    require authentication using an API key passed in the `x-api-key` header:


    ```bash

    curl -X 'GET' \
      'https://be.onebalance.io/api/path-to/endpoint' \
      -H 'x-api-key: 42bb629272001ee1163ca0dbbbc07bcbb0ef57a57baf16c4b1d4672db4562c11'
    ```


    A public API key is available for testing purposes with limited usage:
    **42bb629272001ee1163ca0dbbbc07bcbb0ef57a57baf16c4b1d4672db4562c11**


    All API requests must be made over
    [HTTPS](https://en.wikipedia.org/wiki/HTTPS). Calls made over plain HTTP
    will fail. API requests without authentication will also fail.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    name: OneBalance Support
    email: support@onebalance.io
  termsOfService: https://onebalance.io/terms-of-service
servers:
  - url: https://be.onebalance.io/api
    description: Production environment
security:
  - ApiKeyAuth: []
tags:
  - name: Account
    x-displayName: Smart Accounts
    description: >-
      Manage and predict addresses for OneBalance smart accounts. These accounts
      enable features like resource locks and streamlined cross-chain
      interactions.
  - name: Assets
    x-displayName: Aggregated Assets
    description: >-
      Retrieve details about supported aggregated assets. Aggregated assets
      represent a unified view of a token across multiple chains, simplifying
      cross-chain operations.
  - name: Balances
    x-displayName: Aggregated Balances
    description: >-
      Access and track aggregated asset balances for user accounts. These
      balances reflect a user's total holdings of an asset across all supported
      chains, usable for multichain transactions.
  - name: Chains
    x-displayName: Supported Chains
    description: >-
      List and get details about the blockchain networks currently integrated
      with and supported by the OneBalance platform.
  - name: Status
    x-displayName: Transaction Status & History
    description: >-
      Track the real-time status of quote executions and retrieve complete
      transaction histories for user accounts, offering visibility into
      multichain operations.
  - name: Quotes
    x-displayName: Quotes & Execution
    description: >-
      Request, prepare, and execute quotes for various cross-chain operations
      including asset transfers, swaps, and arbitrary contract interactions.
      These endpoints facilitate the core transaction lifecycle on OneBalance.
paths:
  /v3/quote/prepare-call-quote:
    post:
      tags:
        - Quotes
      summary: Prepare call quote
      description: >
        Prepares the necessary data structure for executing one or more contract
        calls on a target chain with multi-account support. This V3 endpoint
        extends the V1 functionality by supporting cross-chain operations with
        mixed Solana and EVM accounts.


        **V3 Multi-Account Features:**

        - Cross-chain operations with mixed Solana and EVM accounts

        - Source asset specification via `fromAssetId` for bridging

        - EIP-7702 delegation support for EOA-based contract calls

        - Multi-account routing for complex cross-chain scenarios        
      operationId: prepareCallQuoteV3
      parameters: []
      requestBody:
        required: true
        description: Details of the accounts, calls, and token requirements.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/prepare-call-request-v3'
            examples:
              SolanaUsdcToEvmCall:
                summary: Solana USDC to EVM contract call
                description: >-
                  Cross-chain operation using Solana USDC to fund EVM contract
                  execution with EIP-7702 account
                value:
                  accounts:
                    - type: solana
                      accountAddress: EB8Hi4LoqUVCGUPJ2y9MsHbEsJQJvmpQRUWrLpjEZxC6
                    - type: kernel-v3.3-ecdsa
                      accountAddress: '0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8'
                      signerAddress: '0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8'
                      deploymentType: EIP7702
                  targetChain: eip155:42161
                  calls:
                    - to: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
                      data: >-
                        0xa9059cbb0000000000000000000000004EbcFae0C3e747C95504CA7c79c46f725Cb4c7520000000000000000000000000000000000000000000000000000000000000001
                      value: '0x0'
                  tokensRequired:
                    - assetType: >-
                        eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831
                      amount: '10000'
                  fromAssetId: ob:usdc
              SolanaSolToEvmCall:
                summary: Solana SOL to EVM contract call
                description: >-
                  Cross-chain operation using native Solana SOL to fund EVM
                  contract execution
                value:
                  accounts:
                    - type: solana
                      accountAddress: EB8Hi4LoqUVCGUPJ2y9MsHbEsJQJvmpQRUWrLpjEZxC6
                    - type: kernel-v3.3-ecdsa
                      accountAddress: '0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8'
                      signerAddress: '0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8'
                      deploymentType: EIP7702
                  targetChain: eip155:42161
                  calls:
                    - to: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
                      data: >-
                        0xa9059cbb0000000000000000000000004EbcFae0C3e747C95504CA7c79c46f725Cb4c7520000000000000000000000000000000000000000000000000000000000000001
                      value: '0x0'
                  tokensRequired:
                    - assetType: >-
                        eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831
                      amount: '10000'
                  fromAssetId: ob:sol
              MultiAccountDeFiInteraction:
                summary: Multi-account DeFi interaction
                description: Complex cross-chain DeFi interaction using multiple accounts
                value:
                  accounts:
                    - type: role-based
                      accountAddress: '0xa8305CAD3ECEA0E4B4a02CE45E240e8687B4C2E0'
                      sessionAddress: '0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1'
                      adminAddress: '0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8'
                    - type: solana
                      accountAddress: J5CCzBULFax899tcirb6wMbenQUd8whbaetG7EfSick5
                  targetChain: eip155:1
                  calls:
                    - to: '0x6B175474E89094C44Da98b954EedeAC495271d0F'
                      data: >-
                        0xa9059cbb000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000056bc75e2d630eb20000
                      value: '0x0'
                  tokensRequired:
                    - assetType: >-
                        eip155:1/erc20:0x6B175474E89094C44Da98b954EedeAC495271d0F
                      amount: '100000000000000000000'
                  fromAssetId: ob:usdc
      responses:
        '200':
          description: Call quote prepared successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/target-call-quote-v3'
              examples:
                SolanaUsdcToEvmResponse:
                  summary: Solana USDC to EVM response
                  description: >-
                    Multi-account response for cross-chain Solana USDC to EVM
                    operation
                  value:
                    accounts:
                      - type: solana
                        accountAddress: EB8Hi4LoqUVCGUPJ2y9MsHbEsJQJvmpQRUWrLpjEZxC6
                      - type: kernel-v3.3-ecdsa
                        accountAddress: '0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8'
                        signerAddress: '0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8'
                        deploymentType: EIP7702
                    chainOperation:
                      userOp:
                        sender: '0xdb69a4ded06aad92c69c42232b691cfd8bf347e8'
                        nonce: >-
                          913479994650515257524606220465835134743662536739504622017003723935449089
                        callData: >-
                          0xe9ae5c53010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e5831000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb0000000000000000000000004ebcfae0c3e747c95504ca7c79c46f725cb4c752000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000
                        callGasLimit: '2831389'
                        verificationGasLimit: '46313'
                        preVerificationGas: '0'
                        maxFeePerGas: '0'
                        maxPriorityFeePerGas: '0'
                        paymaster: '0xa784e6482bd5edbfe5991b18cbd545ebd46e1cc4'
                        paymasterVerificationGasLimit: '13011'
                        paymasterPostOpGasLimit: '0'
                        paymasterData: 0x
                        signature: 0x
                      typedDataToSign:
                        domain:
                          name: RoleBasedECDSAValidator
                          version: 1.4.3
                          chainId: 42161
                          verifyingContract: '0xA24bD06230f3F54e5bf266AE7A41750eE3b789FA'
                        types:
                          Approve:
                            - name: callDataAndNonceHash
                              type: bytes32
                        primaryType: Approve
                        message:
                          callDataAndNonceHash: >-
                            0x68752061ab5e1f42561b192a3ea5e70c4005b62a7ea4698b14a35ab0004f6687
                      assetType: >-
                        eip155:42161/erc20:0xaf88d065e77c8cc2239327c5edb3a432268e5831
                      amount: '10000'
                    tamperProofSignature: >-
                      0x6316c2fe49d51af45b7bb7bb311395595fe29b7bd9de2e219cba0942fda2461c1c3f19108d6f391cd02c7cdc7d218ff0945d32ba784be1357b3c954ff7ae254e1c
                MultiAccountResponse:
                  summary: Multi-account DeFi interaction response
                  description: Response for complex multi-account cross-chain operations
                  value:
                    accounts:
                      - type: role-based
                        accountAddress: '0xa8305CAD3ECEA0E4B4a02CE45E240e8687B4C2E0'
                        sessionAddress: '0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1'
                        adminAddress: '0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8'
                      - type: solana
                        accountAddress: J5CCzBULFax899tcirb6wMbenQUd8whbaetG7EfSick5
                    chainOperation:
                      userOp:
                        sender: '0xa8305cad3ecea0e4b4a02ce45e240e8687b4c2e0'
                        nonce: >-
                          1120126849530300722547379539971600052481264750391572034956634531672621057
                        factory: '0xd703aae79538628d27099b8c4f621be4ccd142d5'
                        factoryData: 0x
                        callData: >-
                          0xe9ae5c53010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000056bc75e2d630eb2000000000000000000000000000000000000000000000000000000000000
                        callGasLimit: '735280'
                        verificationGasLimit: '3076170'
                        preVerificationGas: '0'
                        maxFeePerGas: '0'
                        maxPriorityFeePerGas: '0'
                        paymaster: '0xa784e6482bd5edbfe5991b18cbd545ebd46e1cc4'
                        paymasterVerificationGasLimit: '19219'
                        paymasterPostOpGasLimit: '0'
                        paymasterData: 0x
                        signature: 0x
                      typedDataToSign:
                        domain:
                          name: RoleBasedECDSAValidator
                          version: 1.4.3
                          chainId: 1
                          verifyingContract: '0xA24bD06230f3F54e5bf266AE7A41750eE3b789FA'
                        types:
                          Approve:
                            - name: callDataAndNonceHash
                              type: bytes32
                        primaryType: Approve
                        message:
                          callDataAndNonceHash: >-
                            0x9c4f1a2b8d3e7f6a5c9d8e7f2a1b0c3d4e5f6a9b8c7d6e5f4a3b2c1d0e9f8a7b
                      assetType: >-
                        eip155:1/erc20:0x6B175474E89094C44Da98b954EedeAC495271d0F
                      amount: '100000000000000000000'
                    tamperProofSignature: >-
                      0x9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http-exception'
              examples:
                InvalidAccountConfiguration:
                  summary: Invalid multi-account configuration
                  value:
                    error: Validation failed
                    message: Cannot combine multiple accounts of the same chain type
                    statusCode: 400
                MissingFromAssetId:
                  summary: Missing fromAssetId for cross-chain operation
                  value:
                    error: Validation failed
                    message: >-
                      fromAssetId is required when using accounts from different
                      chains
                    statusCode: 400
                EIP7702RequiresKernel:
                  summary: EIP-7702 deployment type constraint
                  value:
                    error: Validation failed
                    message: >-
                      EIP-7702 deployment type requires kernel-v3.3-ecdsa
                      account type
                    statusCode: 400
        '401':
          $ref: '#/components/responses/unauthorized'
        4XX:
          description: Prepare call quote failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http-exception'
components:
  schemas:
    prepare-call-request-v3:
      type: object
      description: >-
        V3 prepare call request with multi-account support for cross-chain
        contract calls
      properties:
        accounts:
          type: array
          description: |
            Array of account configurations. Each account type must be unique.
            Supports mixed Solana and EVM accounts for cross-chain operations.
          minItems: 1
          maxItems: 10
          items:
            $ref: '#/components/schemas/multi-account'
          example:
            - type: solana
              accountAddress: EB8Hi4LoqUVCGUPJ2y9MsHbEsJQJvmpQRUWrLpjEZxC6
            - type: kernel-v3.3-ecdsa
              accountAddress: '0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8'
              signerAddress: '0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8'
              deploymentType: EIP7702
        targetChain:
          type: string
          description: Target chain in CAIP-2 notation (e.g. "eip155:42161" for Arbitrum).
          pattern: ^[a-z0-9]+:[0-9]+$
          example: eip155:42161
        calls:
          description: Array of contract calls to be executed on the target chain.
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/evm-call-data'
          example:
            - to: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
              data: >-
                0xa9059cbb0000000000000000000000004EbcFae0C3e747C95504CA7c79c46f725Cb4c7520000000000000000000000000000000000000000000000000000000000000001
              value: '0x0'
        tokensRequired:
          description: Array of tokens needed for these calls on the target chain.
          type: array
          items:
            $ref: '#/components/schemas/token-requirement'
          example:
            - assetType: eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831
              amount: '10000'
        allowanceRequirements:
          description: >
            Optional array of token approvals required for the calls.

            Approvals need to be explicitly defined. Any approval passed as a
            call would result in a failing request.
          type: array
          items:
            $ref: '#/components/schemas/token-allowance-requirement'
          example:
            - assetType: eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831
              amount: '10000'
              spender: '0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8'
        overrides:
          description: Optional state overrides (e.g., fake balances for simulation).
          type: array
          items:
            $ref: '#/components/schemas/override'
          example:
            - address: '0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8'
              balance: '0x1'
        validAfter:
          type: string
          description: Permit valid after value in block timestamp.
          example: '1686239400'
        validUntil:
          type: string
          description: Permit valid until value in block timestamp.
          example: '1686339400'
        fromAssetId:
          type: string
          description: >
            Source asset identifier to spend from for bridging to target chain.

            Can be either aggregated asset ID (e.g., "ob:usdc") or CAIP-19 asset
            type (e.g.,
            "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48").

            This field enables cross-chain spending from specific assets in
            multi-account setups.
          example: ob:usdc
        slippageTolerance:
          $ref: '#/components/schemas/slippage-tolerance'
      required:
        - accounts
        - targetChain
        - calls
        - tokensRequired
    target-call-quote-v3:
      type: object
      description: >-
        V3 response from prepare-call-quote containing all necessary data to
        execute contract calls with multi-account support
      properties:
        accounts:
          type: array
          description: Array of account configurations involved in the operation
          items:
            $ref: '#/components/schemas/multi-account'
          example:
            - type: solana
              accountAddress: EB8Hi4LoqUVCGUPJ2y9MsHbEsJQJvmpQRUWrLpjEZxC6
            - type: kernel-v3.3-ecdsa
              accountAddress: '0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8'
              signerAddress: '0xDb69A4Ded06AaD92C69c42232b691CFD8bF347e8'
              deploymentType: EIP7702
        chainOperation:
          description: >-
            Operation (including userOp and typed data) to be executed on the
            target chain
          allOf:
            - $ref: '#/components/schemas/chain-operation'
        tamperProofSignature:
          type: string
          description: Tamper-proof signature for the entire call request
          example: >-
            0x0e1f9f56bb4072894a24ebc6fe6e41e15f8b9c8ce7bc1d9d88e9a46b85353d55238f0e7a75fbeb71249292e2206887adc894849488d8d8c23a5a17542d5ab2511b
        callType:
          allOf:
            - $ref: '#/components/schemas/call-type'
          description: >-
            Type of operation indicating the routing strategy for multi-account
            operations
        sourceAssetBalances:
          type: array
          description: >-
            Available balances across all accounts that could be used for this
            operation
          items:
            $ref: '#/components/schemas/source-asset-balance'
          example:
            - assetType: eip155:42161/erc20:0xaf88d065e77c8cc2239327c5edb3a432268e5831
              balance: '20476622'
              decimals: 6
              fiatValue: 20.52074709722842
        delegation:
          description: |
            EIP-7702 delegation object that needs to be signed before execution.
            Only present when using EIP-7702 accounts that require delegation.
          allOf:
            - $ref: '#/components/schemas/delegation'
      required:
        - accounts
        - chainOperation
        - tamperProofSignature
    http-exception:
      type: object
      properties:
        error:
          type: string
          description: Error name
          example: Validation failed
        message:
          type: string
          description: Error message
          example: >-
            Validation error: Must be a valid hex string starting with 0x at
            "address"
        statusCode:
          type: number
          description: Error status code
          example: 400
      required:
        - error
        - message
        - statusCode
    multi-account:
      oneOf:
        - $ref: '#/components/schemas/role-based-account'
        - $ref: '#/components/schemas/kernel-v3-1-account'
        - $ref: '#/components/schemas/kernel-v3-3-account'
        - $ref: '#/components/schemas/solana-account'
      discriminator:
        propertyName: type
        mapping:
          role-based:
            $ref: '#/components/schemas/role-based-account'
          kernel-v3.1-ecdsa:
            $ref: '#/components/schemas/kernel-v3-1-account'
          kernel-v3.3-ecdsa:
            $ref: '#/components/schemas/kernel-v3-3-account'
          solana:
            $ref: '#/components/schemas/solana-account'
      description: >
        Account configuration supporting multiple blockchain types.


        **Account Compatibility Rules:**

        - Cannot combine multiple accounts of the same chain type

        - Solana accounts can be combined with any EVM account type

        - Single account operations are supported for any account type


        **Supported Account Types:**

        - `role-based`: Traditional EVM account with session/admin addresses

        - `kernel-v3.1-ecdsa`: Kernel v3.1 ECDSA smart account

        - `kernel-v3.3-ecdsa`: Kernel v3.3 ECDSA smart account with EIP-7702
        support

        - `solana`: Solana blockchain account
    evm-call-data:
      type: object
      properties:
        data:
          type: string
          description: Hex-encoded call data.
          example: >-
            0x095ea7b3000000000000000000000000Bbef1E2dEA96c1c2001Eb48136e513A855F460970000000000000000000000000000000000000000000000000000000000000001
        to:
          type: string
          description: Address of the contract to be called.
          example: '0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85'
        value:
          type: string
          description: >-
            Amount of native currency (e.g. ETH) sent along with the call. Hex
            or decimal string.
          example: '0'
      required:
        - data
        - to
        - value
    token-requirement:
      type: object
      properties:
        assetType:
          type: string
          description: CAIP-19 identifier for the required token
          example: eip155:1/erc20:0x6b175474e89094c44da98b954eedeac495271d0f
        amount:
          type: string
          description: >-
            Required amount of the token in its smallest unit (considering token
            decimals). For example, if a token has 6 decimals, "1" token is
            represented as "1000000"
          example: '1000000000000000000'
      required:
        - assetType
        - amount
    token-allowance-requirement:
      type: object
      properties:
        assetType:
          type: string
          description: CAIP-19 identifier for the required token
          example: eip155:1/erc20:0x6b175474e89094c44da98b954eedeac495271d0f
        amount:
          type: string
          description: >-
            Required amount of the token in its smallest unit (considering token
            decimals). For example, if a token has 6 decimals, "1" token is
            represented as "1000000"
          example: '1000000000000000000'
        spender:
          type: string
          description: >-
            The address that is approved to transfer a specific amount on behalf
            of the user.
          example: '0x1234567890123456789012345678901234567890'
      required:
        - assetType
        - amount
    override:
      type: object
      properties:
        address:
          type: string
          description: Address whose balance/storage is being overridden.
          example: '0xb8e4b017f4a8870E3eB4eb15c5e180D2a34D877B'
        balance:
          type: string
          description: >-
            Hex-encoded balance override, e.g. "0x1", "0x5F5E100" for 100000000
            in decimal.
          example: '0x1'
      required:
        - address
        - balance
    slippage-tolerance:
      type: integer
      description: |
        Slippage tolerance in basis points (1/100th of a percent).
        For example, 50 = 0.5%, 100 = 1%, 1000 = 10%.
      minimum: 1
      example: 50
    chain-operation:
      type: object
      description: >
        Chain operation containing user operation data, typed data to sign, and
        optional EIP-7702 delegation.


        When EIP-7702 delegation is required, the delegation field will be
        present and must be signed before submission.
      properties:
        userOp:
          description: User Operation data (serialized).
          allOf:
            - $ref: '#/components/schemas/serialized-user-operation'
        typedDataToSign:
          description: Typed data to sign (EIP-712).
          allOf:
            - $ref: '#/components/schemas/hash-typed-data-parameters'
        assetType:
          type: string
          description: CAIP-19/CAIP-20 asset type, or e.g. "eth", "erc20:0x..." etc.
          example: eip155:10/erc20:0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85
        amount:
          type: string
          description: Amount in the smallest unit (wei for ETH, or token decimals).
          example: '8000000'
        delegation:
          allOf:
            - $ref: '#/components/schemas/delegation'
          description: >
            EIP-7702 delegation object (present only if account needs delegation
            on this chain).


            Must be signed using wallet's signAuthorization method before
            submission.
      required:
        - userOp
        - typedDataToSign
        - assetType
        - amount
    call-type:
      type: string
      description: >
        Type of call operation indicating the routing strategy:

        - `same_chain_exclude_solver`: Operation on the same chain without
        solver involvement

        - `cross_chain_with_solver`: Cross-chain operation requiring solver
        assistance

        - `same_chain_with_solver`: Same-chain operation with solver involvement

        - `cross_chain_with_solver_and_swaps`: Complex cross-chain operation
        with multiple swaps
      enum:
        - same_chain_exclude_solver
        - cross_chain_with_solver
        - same_chain_with_solver
        - cross_chain_with_solver_and_swaps
      example: cross_chain_with_solver
    source-asset-balance:
      type: object
      description: >-
        Available balance information for source assets during operation
        preparation
      properties:
        assetType:
          type: string
          description: CAIP-19/CAIP-20 asset type identifier
          example: eip155:42161/erc20:0xaf88d065e77c8cc2239327c5edb3a432268e5831
        balance:
          type: string
          description: >-
            Available balance in the smallest unit (wei for ETH, token decimals
            for ERC20)
          example: '20476622'
        decimals:
          type: integer
          description: Number of decimal places for the asset
          example: 6
          minimum: 0
          maximum: 18
        fiatValue:
          type: number
          description: Current fiat value of the balance in USD
          example: 20.52074709722842
          minimum: 0
      required:
        - assetType
        - balance
        - decimals
        - fiatValue
    delegation:
      type: object
      description: >-
        EIP-7702 delegation configuration for smart account operations. When an
        EOA needs to be delegated to a smart account contract, this object
        contains the delegation details that must be signed by the user.
      properties:
        contractAddress:
          type: string
          description: Address of the Kernel v3.3 smart account contract to delegate to
          example: '0xd6CEDDe84be40893d153Be9d467CD6aD37875b28'
          pattern: ^0x[a-fA-F0-9]{40}$
        nonce:
          type: integer
          description: >-
            Delegation nonce for preventing replay attacks. Must match the
            current nonce for the account on the target chain.
          example: 0
          minimum: 0
        signature:
          allOf:
            - $ref: '#/components/schemas/delegation-signature'
          description: >-
            Delegation signature (populated after signing with wallet's
            signAuthorization method)
      required:
        - contractAddress
        - nonce
    HttpUnauthorizedException:
      type: object
      properties:
        error:
          type: string
          description: Error name
          example: UnauthorizedException
        message:
          type: string
          description: Error message
          example: Invalid or missing API key
        statusCode:
          type: number
          description: Error status code
          example: 401
        timestamp:
          type: string
          description: Error timestamp
          example: '2024-12-18T14:38:24.793Z'
        path:
          type: string
          description: Error path
          example: /api/account/predict-address
      required:
        - error
        - message
        - statusCode
        - timestamp
        - path
    role-based-account:
      type: object
      title: Role-based Account
      description: >
        Role-based account using RoleBasedValidator with Kernel 3.1. Always has
        Resource Lock enabled.

        Allows a `user_admin` role (think user cold wallet) next to the signer
        role to rotate keys and execute trustless rage quit in emergency cases.

        Secure in emergency cases related to WaaS/TEE but consumes slightly more
        gas.
      properties:
        type:
          type: string
          description: Account type identifier for role-based accounts
          enum:
            - role-based
          example: role-based
        sessionAddress:
          type: string
          description: >-
            Address associated with user's ECDSA signing key used for
            session-based operations
          example: '0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1'
          pattern: ^0x[a-fA-F0-9]{40}$
        adminAddress:
          type: string
          description: >-
            Address selected by the user as backup admin. Can perform rage quit
            and key rotation. Must be different from sessionAddress.
          example: '0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8'
          pattern: ^0x[a-fA-F0-9]{40}$
        accountAddress:
          type: string
          description: >-
            Address of user's smart contract wallet (counterfactual if not yet
            deployed)
          example: '0xa8305CAD3ECEA0E4B4a02CE45E240e8687B4C2E0'
          pattern: ^0x[a-fA-F0-9]{40}$
      required:
        - type
        - sessionAddress
        - adminAddress
        - accountAddress
    kernel-v3-1-account:
      type: object
      title: Basic Account
      description: >
        Basic account using ECDSAValidator with Kernel v3.1. Standard
        ERC4337-compliant smart account

        that provides core account abstraction functionality without advanced
        features.
      properties:
        type:
          type: string
          description: Account type identifier for Kernel v3.1 ECDSA accounts
          enum:
            - kernel-v3.1-ecdsa
          example: kernel-v3.1-ecdsa
        signerAddress:
          type: string
          description: >-
            Address of the signer for this account using standard ECDSA
            authentication
          example: '0x5d6fb4eb211a6a2e406a1111b54d26c534753c8e'
          pattern: ^0x[a-fA-F0-9]{40}$
        accountAddress:
          type: string
          description: >-
            Address of user's smart contract wallet (counterfactual if not yet
            deployed)
          example: '0xb7bc0d7baf6761c302ff6772dfd8f9e22ec706e7'
          pattern: ^0x[a-fA-F0-9]{40}$
        deploymentType:
          type: string
          description: Deployment type - only ERC4337 supported for Kernel v3.1
          enum:
            - ERC4337
          example: ERC4337
      required:
        - type
        - signerAddress
        - accountAddress
    kernel-v3-3-account:
      type: object
      title: EIP-7702 Account
      description: >
        Advanced account using ECDSAValidator with Kernel v3.3. Supports both
        traditional ERC4337 deployment

        and EIP-7702 delegation for transforming existing EOAs into smart
        accounts.
      properties:
        type:
          type: string
          description: Account type identifier for Kernel v3.3 ECDSA accounts
          enum:
            - kernel-v3.3-ecdsa
          example: kernel-v3.3-ecdsa
        signerAddress:
          type: string
          description: >-
            Address of the signer for this account using standard ECDSA
            authentication
          example: '0x5d6fb4eb211a6a2e406a1111b54d26c534753c8e'
          pattern: ^0x[a-fA-F0-9]{40}$
        accountAddress:
          type: string
          description: >
            Address of user's smart contract wallet (for EIP-4337) or EOA
            address (for EIP-7702).


            **For EIP-7702**: Same as signerAddress - uses the existing EOA
            address.
          example: '0xb7bc0d7baf6761c302ff6772dfd8f9e22ec706e7'
          pattern: ^0x[a-fA-F0-9]{40}$
        deploymentType:
          type: string
          description: >
            Deployment type of the account:

            - `ERC4337`: Traditional smart contract account deployment

            - `EIP7702`: Delegate existing EOA to smart account contract (Kernel
            v3.3 exclusive feature)
          enum:
            - ERC4337
            - EIP7702
          example: ERC4337
      required:
        - type
        - signerAddress
        - accountAddress
    solana-account:
      type: object
      title: Solana Account
      description: Solana account configuration
      required:
        - type
        - accountAddress
      properties:
        type:
          type: string
          enum:
            - solana
          description: Account type identifier for Solana blockchain
          example: solana
        accountAddress:
          type: string
          description: Base58-encoded Solana account address
          pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
          example: J5CCzBULFax899tcirb6wMbenQUd8whbaetG7EfSick5
    serialized-user-operation:
      type: object
      properties:
        sender:
          type: string
          description: The address of the sender (EOA or Smart Contract).
          example: '0xb8e4b017f4a8870e3eb4eb15c5e180d2a34d877b'
        nonce:
          type: string
          description: >-
            Nonce for the UserOp, ensures uniqueness. Incremented for each
            operation.
          example: 1120126849530...
        factory:
          type: string
          description: >-
            The address of the factory that may be used to create an account
            contract (optional for deployed accounts).
          example: '0xd703aae79538628d27099b8c4f621be4ccd142d5'
        factoryData:
          type: string
          description: >-
            Hex-encoded data for the factory (optional, if needed to deploy or
            initialize an account).
          example: 0xc5265d5d000000000000000000000000...
        callData:
          type: string
          description: Hex-encoded data representing the actual call to be made.
          example: 0xe9ae5c530100000000000000000000000000...
        callGasLimit:
          type: string
          description: Gas limit for executing the callData portion.
          example: '737280'
        verificationGasLimit:
          type: string
          description: Gas limit for the verification step (signature checks, etc.).
          example: '3076170'
        preVerificationGas:
          type: string
          description: Gas used for overhead, e.g., hashing, EVM overhead, etc.
          example: '0'
        maxFeePerGas:
          type: string
          description: Maximum fee (in wei) per gas unit.
          example: '0'
        maxPriorityFeePerGas:
          type: string
          description: Priority fee (tip) per gas unit.
          example: '0'
        paymaster:
          type: string
          description: Address of the paymaster that will sponsor or pay for gas.
          example: '0xa784e6482bd5edbfe5991b18cbd545ebd46e1cc4'
        paymasterVerificationGasLimit:
          type: string
          description: Gas limit for the paymaster verification step.
          example: '19219'
        paymasterPostOpGasLimit:
          type: string
          description: Additional gas limit for the paymaster post-operation.
          example: '0'
        paymasterData:
          type: string
          description: Additional data used by the paymaster, if any.
          example: 0x
        signature:
          type: string
          description: Signature for the entire user operation.
          example: 0x8cbd9df26744e2a02cde9fb8832d2b5f...
      required:
        - sender
        - nonce
        - callData
        - callGasLimit
        - verificationGasLimit
        - preVerificationGas
        - maxFeePerGas
        - maxPriorityFeePerGas
        - paymaster
        - paymasterVerificationGasLimit
        - paymasterPostOpGasLimit
        - paymasterData
        - signature
    hash-typed-data-parameters:
      type: object
      properties:
        domain:
          type: object
          description: >-
            EIP-712 domain separator data (e.g. name, version, chainId,
            verifyingContract).
          example:
            name: RoleBasedECDSAValidator
            version: 1.4.3
            chainId: 10
            verifyingContract: '0xA24bD06230f3F54e5bf266AE7A41750eE3b789FA'
        types:
          type: object
          description: >-
            EIP-712 type definitions for the message. Must include at least the
            primary type.
          example:
            Approve:
              - name: callDataAndNonceHash
                type: bytes32
        primaryType:
          type: string
          description: Primary type string from the types object.
          example: Approve
        message:
          type: object
          description: Data to be signed (structured according to the types).
          example:
            callDataAndNonceHash: 0xaab2ddac63e4a7e25b7d339cacdff2f9...
      required:
        - domain
        - types
        - primaryType
        - message
    delegation-signature:
      type: object
      description: >-
        EIP-7702 delegation signature structure containing the ECDSA signature
        components for the delegation authorization
      properties:
        chainId:
          type: integer
          description: Chain ID where delegation occurs
          example: 10
          minimum: 1
        contractAddress:
          type: string
          description: >-
            Contract address being delegated to (must match delegation
            contractAddress)
          example: '0xd6CEDDe84be40893d153Be9d467CD6aD37875b28'
          pattern: ^0x[a-fA-F0-9]{40}$
        nonce:
          type: integer
          description: Delegation nonce (must match delegation nonce)
          example: 0
          minimum: 0
        r:
          type: string
          description: ECDSA signature r value
          example: '0x129b258b9d85f91dab87e488dea08e2803e88a96bb6a967d16fe158a09d95d0d'
          pattern: ^0x[a-fA-F0-9]{64}$
        s:
          type: string
          description: ECDSA signature s value
          example: '0x52adbaca42ea5b316df5ac0a6ae5f544f5eb450d94c76164e27252101e22d3c3'
          pattern: ^0x[a-fA-F0-9]{64}$
        v:
          type: string
          description: ECDSA signature v value (recovery ID)
          example: '0x1b'
          pattern: ^0x[a-fA-F0-9]{2}$
        yParity:
          type: integer
          description: Y parity of the signature point (0 or 1)
          example: 0
          enum:
            - 0
            - 1
        type:
          type: string
          description: >-
            Signature type identifier indicating the signature has been
            completed
          enum:
            - Signed
          example: Signed
      required:
        - chainId
        - contractAddress
        - nonce
        - r
        - s
        - v
        - yParity
        - type
  responses:
    unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HttpUnauthorizedException'
          example:
            error: UnauthorizedException
            message: Invalid or missing API key
            statusCode: 401
            timestamp: '2024-12-18T14:38:24.793Z'
            path: /api/xxx/xxx
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header
      description: >-
        The OneBalance API uses API keys to authenticate requests. All API
        requests require authentication using an API key passed in the
        `x-api-key` header:


        ```bash

        curl -X 'GET' \
          'https://be.onebalance.io/api/path-to/endpoint' \
          -H 'x-api-key: ${ONEBALANCE_API_KEY}' \
          ...
        ```


        A public API key is available for testing purposes with limited usage:
        `42bb629272001ee1163ca0dbbbc07bcbb0ef57a57baf16c4b1d4672db4562c11`.


        All API requests must be made over HTTPS. Calls made over plain HTTP
        will fail. API requests without authentication will also fail.


        Learn how to generate API access tokens at [OneBalance
        Docs](https://docs.onebalance.io).

````