> ## 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.

# Get call quote

> Gets a quote for arbitrary contract call operations with multi-account support. This V3 endpoint extends the V1 functionality by supporting cross-chain operations with mixed Solana and EVM accounts, and handles the execution of pre-signed user operations with typed data signatures.

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




## OpenAPI

````yaml post /v3/quote/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/call-quote:
    post:
      tags:
        - Quotes
      summary: Get call quote
      description: >
        Gets a quote for arbitrary contract call operations with multi-account
        support. This V3 endpoint extends the V1 functionality by supporting
        cross-chain operations with mixed Solana and EVM accounts, and handles
        the execution of pre-signed user operations with typed data signatures.


        **V3 Multi-Account Features:**

        - Cross-chain operations with mixed Solana and EVM accounts

        - Source asset specification via `fromAggregatedAssetId` for bridging

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

        - Multi-account routing for complex cross-chain scenarios    
      operationId: getCallQuoteV3
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/call-request-v3'
            examples:
              SolanaUsdcToEvmCall:
                summary: Solana USDC to EVM contract call
                description: >-
                  Cross-chain operation executing EVM contract call funded by
                  Solana USDC
                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: >-
                        0x47e6d128f7565732d13d8f59ac876aa3256da6441c0fbb7aad9b73125c617abf181a7bd4c44e4bec03b8369eec23ede97f63917bed538a067f4d17eed68a754e1b
                    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
                  fromAggregatedAssetId: ob:usdc
              MultiAccountDeFiInteraction:
                summary: Multi-account DeFi interaction
                description: >-
                  Complex cross-chain DeFi interaction using role-based and
                  Solana accounts
                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: >-
                        0x8cbd9df26744e2a02cde9fb8832d2b5fbf5224261061a92bddb673cbfeb9849737cb80c5b5ae535007a1d57a377294c5a61033baef242b93faede408322feb651c
                    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
                  fromAggregatedAssetId: ob:usdc
      responses:
        '200':
          description: Call quote
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/quote-response-v3'
        '400':
          description: Invalid request or delegation errors
          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 fromAggregatedAssetId for cross-chain operation
                  value:
                    error: Validation failed
                    message: >-
                      fromAggregatedAssetId is required when using accounts from
                      different chains
                    statusCode: 400
                MissingDelegationSignature:
                  summary: Missing delegation signature
                  value:
                    error: Validation failed
                    message: >-
                      Delegation signature required for EIP-7702 account. Sign
                      delegation object from prepare-call-quote response.
                    statusCode: 400
                InvalidDelegationNonce:
                  summary: Invalid delegation nonce
                  value:
                    error: Delegation error
                    message: >-
                      Delegation nonce is outdated. Current nonce is 5, provided
                      nonce is 3.
                    statusCode: 400
        '401':
          $ref: '#/components/responses/unauthorized'
        '422':
          description: Unable to process quote
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http-exception'
              examples:
                MultiChainConstraint:
                  summary: Multi-chain routing constraint
                  value:
                    error: Routing constraint violation
                    message: >-
                      An execution requires ≤1 additional source chain. Use
                      manual delegation for complex routing with >1 additional
                      source chains.
                    statusCode: 422
                AccountNotDelegated:
                  summary: Account needs delegation first
                  value:
                    error: Account deployment required
                    message: >-
                      Account needs to be deployed on destination chain first
                      for multi-input routing.
                    statusCode: 422
        4XX:
          description: Call quote failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http-exception'
components:
  schemas:
    call-request-v3:
      type: object
      description: >-
        V3 call request with multi-account support for cross-chain contract call
        execution
      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
        chainOperation:
          description: Operation (including userOp and typed data) to be executed on-chain.
          allOf:
            - $ref: '#/components/schemas/chain-operation'
        tamperProofSignature:
          type: string
          description: Tamper-proof signature for the entire call request.
          example: >-
            0x0e1f9f56bb4072894a24ebc6fe6e41e15f8b9c8ce7bc1d9d88e9a46b85353d55238f0e7a75fbeb71249292e2206887adc894849488d8d8c23a5a17542d5ab2511b
        fromAggregatedAssetId:
          type: string
          description: >-
            Aggregated asset id for the token to transfer from for bridging to
            target chain.

            Used when executing cross-chain operations with multiple accounts.
          example: ob:usdc
        slippageTolerance:
          $ref: '#/components/schemas/slippage-tolerance'
      required:
        - accounts
        - chainOperation
        - tamperProofSignature
    quote-response-v3:
      type: object
      description: Quote response with support for multiple blockchain types (v3)
      required:
        - id
        - accounts
        - originChainsOperations
        - originToken
        - destinationToken
        - expirationTimestamp
        - tamperProofSignature
      properties:
        id:
          type: string
          description: Unique quote identifier
          pattern: ^0x[a-fA-F0-9]{64}$
          example: '0xcd3a5cfe80d1b84db755bfb8ebe0a617ff153cc48ab6d5ab28436386f06ce100'
        accounts:
          type: array
          description: Array of accounts used in this quote
          minItems: 1
          items:
            $ref: '#/components/schemas/multi-account'
          example:
            - type: solana
              accountAddress: J5CCzBULFax899tcirb6wMbenQUd8whbaetG7EfSick5
        originChainsOperations:
          type: array
          description: >-
            Array of blockchain operations to execute, supporting both EVM and
            Solana
          items:
            oneOf:
              - $ref: '#/components/schemas/chain-operation'
              - $ref: '#/components/schemas/solana-chain-operation'
            discriminator:
              propertyName: type
              mapping:
                evm:
                  $ref: '#/components/schemas/chain-operation'
                solana:
                  $ref: '#/components/schemas/solana-chain-operation'
          example:
            - type: solana
              instructions:
                - keys:
                    - pubkey: J5CCzBULFax899tcirb6wMbenQUd8whbaetG7EfSick5
                      isSigner: true
                      isWritable: true
                  programId: '11111111111111111111111111111111'
                  data: '020000008096980000000000'
              recentBlockHash: 2UoZifqUWTS8vZF25LrpJJUwabdDrfRqXSLMScDh4WDp
              feePayer: 6roz4r5VGs67YdDvjNdALSQgXZecwqUzpqvmKTdmjXyH
              assetType: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/slip44:501
              amount: '10000000'
              dataToSign: >-
                gAIABQ1XDQTmmqW/djyUx9QxVovp4LBhd9nKW9lbKmZgBJpASP2prCGRAhJ2LZxv7WJqmNSI35tMGa1fy+dTOYTdb2um
        originToken:
          $ref: '#/components/schemas/origin-asset-used'
        destinationToken:
          $ref: '#/components/schemas/destination-asset-used'
        expirationTimestamp:
          type: string
          description: Unix timestamp when the quote expires
          pattern: ^[0-9]+$
          example: '1752673847'
        slippage:
          type: object
          description: Slippage information for origin and destination
          example:
            origin:
              percent: '3.57'
              usd: '0.059593'
              value: '59761'
            destination:
              percent: '3.45'
              usd: '0.054180'
              value: '54279'
          properties:
            origin:
              type: object
              example:
                percent: '3.57'
                usd: '0.059593'
                value: '59761'
              properties:
                percent:
                  type: string
                  description: Slippage percentage
                  example: '3.57'
                usd:
                  type: string
                  description: Slippage amount in USD
                  example: '0.059593'
                value:
                  type: string
                  description: Slippage amount in asset units
                  example: '59761'
            destination:
              type: object
              example:
                percent: '3.45'
                usd: '0.054180'
                value: '54279'
              properties:
                percent:
                  type: string
                  description: Slippage percentage
                  example: '3.45'
                usd:
                  type: string
                  description: Slippage amount in USD
                  example: '0.054180'
                value:
                  type: string
                  description: Slippage amount in asset units
                  example: '54279'
        fees:
          type: object
          description: Fee breakdown by asset type
          example:
            assets:
              solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/slip44:501: '183581'
              solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v: '93373'
            cumulativeUSD: '0.12'
          properties:
            assets:
              type: object
              description: Fee amounts by asset type
              additionalProperties:
                type: string
                description: Fee amount in the asset's smallest unit
              example:
                solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/slip44:501: '183581'
                solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v: '93373'
            cumulativeUSD:
              type: string
              description: Total fees in USD
              example: '0.12'
        tamperProofSignature:
          type: string
          description: Cryptographic signature to verify quote integrity
          example: >-
            0x1ae7e61279f297d5e6bd702388db0069a3cc2b5168eecd91b53ea0b8bbdf7c412742dd8f0ab778c9a3faa7be38031ce6279b65c202b920c65632840accf01d021c
    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
    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
    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
    solana-chain-operation:
      type: object
      description: Solana blockchain operation details
      required:
        - type
        - instructions
        - recentBlockHash
        - feePayer
        - assetType
        - amount
        - dataToSign
      properties:
        type:
          type: string
          enum:
            - solana
          description: Blockchain type identifier
          example: solana
        instructions:
          type: array
          description: Array of Solana instructions for the transaction
          items:
            type: object
            required:
              - keys
              - programId
              - data
            properties:
              keys:
                type: array
                description: Account keys required for the instruction
                items:
                  type: object
                  required:
                    - pubkey
                    - isSigner
                    - isWritable
                  properties:
                    pubkey:
                      type: string
                      description: Base58-encoded public key
                      example: J5CCzBULFax899tcirb6wMbenQUd8whbaetG7EfSick5
                    isSigner:
                      type: boolean
                      description: Whether this account must sign the transaction
                      example: true
                    isWritable:
                      type: boolean
                      description: Whether this account will be modified
                      example: true
              programId:
                type: string
                description: Base58-encoded program ID to invoke
                example: '11111111111111111111111111111111'
              data:
                type: string
                description: Hex-encoded instruction data
                example: '020000008096980000000000'
        recentBlockHash:
          type: string
          description: Recent blockhash for transaction validity
          example: 2UoZifqUWTS8vZF25LrpJJUwabdDrfRqXSLMScDh4WDp
        feePayer:
          type: string
          description: Base58-encoded address that will pay transaction fees
          example: 6roz4r5VGs67YdDvjNdALSQgXZecwqUzpqvmKTdmjXyH
        signature:
          type: string
          description: Base58-encoded transaction signature (when signed)
          example: >-
            2z1h92bonjpq5yELFiDfNgKoAFEp1MxU8qLuAV7RRbFDTHZ6Ts8AvGYBry7TR9doZK1ePMdWJGNt7XiNzU9wAd5B
        addressLookupTableAddresses:
          type: array
          description: Optional address lookup table addresses for transaction compression
          items:
            type: string
            example: BpQ5uMzQNWNgBCRNf6jffChhYMX5XVZuaoM4Rx16NCdf
        assetType:
          type: string
          description: CAIP-19 asset identifier for the asset being operated on
          example: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/slip44:501
        amount:
          type: string
          description: Amount being operated on in the smallest unit
          pattern: ^[0-9]+$
          example: '10000000'
        dataToSign:
          type: string
          description: >
            Base64-encoded serialized transaction data that needs to be signed.

            This should be converted to MessageV0, then to VersionedTransaction
            for signing.
          example: >-
            gAIABQ1XDQTmmqW/djyUx9QxVovp4LBhd9nKW9lbKmZgBJpASP2prCGRAhJ2LZxv7WJqmNSI35tMGa1fy+dTOYTdb2um...
    origin-asset-used:
      type: object
      properties:
        aggregatedAssetId:
          type: string
          description: The aggregated asset ID (e.g., ob:usd)
          example: ob:eth
        amount:
          type: string
          description: The amount of the token
          example: '1000000000000000000'
        assetType:
          description: >-
            The type of the individual assets (e.g., eip155:1/erc20:... or
            eip155:1/slip44:...)
          example:
            - eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7
            - eip155:1/slip44:60
          type: array
          items:
            type: string
        fiatValue:
          description: The fiat values of the individual asset types
          type: array
          items:
            $ref: '#/components/schemas/asset-used-fiat'
          example:
            - assetType: eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7
              fiatValue: '1800.00'
            - assetType: eip155:1/slip44:60
              fiatValue: '1800.00'
      required:
        - aggregatedAssetId
        - amount
        - assetType
        - fiatValue
    destination-asset-used:
      type: object
      properties:
        aggregatedAssetId:
          type: string
          description: The aggregated asset ID (e.g., ob:usd)
          example: ob:usdc
        amount:
          type: string
          description: The amount of the token
          example: '100000000'
        assetType:
          type: string
          description: >-
            The type of the individual asset (e.g., eip155:1/erc20:... or
            eip155:1/slip44:...)
          example: eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7
        fiatValue:
          type: string
          description: The fiat value of the individual asset in USD
          example: '100'
        minimumAmount:
          type: string
          description: The minimum amount of the token
          example: '100'
        minimumFiatValue:
          type: string
          description: The minimum fiat value of the token
          example: '100'
        symbol:
          type: string
          description: The token symbol (e.g., USDC, ETH)
          example: USDC
        name:
          type: string
          description: The human-readable name of the token
          example: USDC
        decimals:
          type: integer
          description: The number of decimal places for the token
          example: 18
        recipientAccount:
          type: string
          description: >-
            The recipient account address with chain identifier where the
            destination tokens will be received
          example: eip155:42161:0x895Cf62399bF1F8b88195E741b64278b41EB7F09
      required:
        - aggregatedAssetId
        - amount
        - assetType
        - fiatValue
    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:
      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
    asset-used-fiat:
      type: object
      properties:
        assetType:
          type: string
          description: >-
            The CAIP-19 asset type identifier (e.g., eip155:1/erc20:... or
            eip155:1/slip44:...).
          example: eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7
        fiatValue:
          type: string
          description: The fiat value of the individual asset in USD
          example: '100'
      required:
        - assetType
        - fiatValue
    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).

````