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

# Predict address

> Predicts the address for a new OneBalance smart account based on the provided EVM-compatible signer addresses (session and admin). This allows you to determine the smart account's on-chain address before its actual deployment. This predicted address serves as a primary identifier for the user within the OneBalance ecosystem.



## OpenAPI

````yaml post /account/predict-address
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:
  /account/predict-address:
    post:
      tags:
        - Account
      summary: Predict address
      description: >-
        Predicts the address for a new OneBalance smart account based on the
        provided EVM-compatible signer addresses (session and admin). This
        allows you to determine the smart account's on-chain address before its
        actual deployment. This predicted address serves as a primary identifier
        for the user within the OneBalance ecosystem.
      operationId: predictAddress
      parameters: []
      requestBody:
        required: true
        description: >-
          The input parameters vary based on account type:


          **Role-based Account:** Requires `sessionAddress` (used for signing
          operations) and `adminAddress` (backup admin that can perform rage
          quit).


          **Basic Account:** Requires `type` (account type identifier) and
          `signerAddress` (ECDSA signer address).
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/predict-address-input'
            examples:
              RoleBasedAccount:
                summary: Role-based account prediction
                description: >-
                  The `predictedAddress` returned for this example should be
                  `0xE20295ec513DEf805D9c3083b0C8EaB64692D764`
                value:
                  sessionAddress: '0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1'
                  adminAddress: '0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8'
              BasicAccount:
                summary: Basic account prediction
                description: Example prediction for a kernel-v3.1-ecdsa account type
                value:
                  type: kernel-v3.1-ecdsa
                  signerAddress: '0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1'
      responses:
        '201':
          description: Predicted address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/predict-address-response'
              examples:
                Success:
                  summary: Example of a successful prediction
                  value:
                    predictedAddress: '0xE20295ec513DEf805D9c3083b0C8EaB64692D764'
        '400':
          description: Supplied addresses invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http-exception'
              example:
                error: Validation failed
                message: >-
                  Validation error: Must be a valid hex string starting with 0x
                  at "sessionAddress"; Must be a valid hex string starting with
                  0x at "adminAddress"
                statusCode: 400
        '401':
          $ref: '#/components/responses/unauthorized'
components:
  schemas:
    predict-address-input:
      type: object
      description: >
        Input parameters for predicting a smart account address.


        Learn more about account types and their capabilities at [OneBalance
        Account Models](https://docs.onebalance.io/concepts/accounts).
      oneOf:
        - type: object
          title: Role-based Account
          description: >-
            Input for role-based account prediction using sessionAddress and
            adminAddress
          properties:
            sessionAddress:
              type: string
              description: >-
                Address associated with user's ECDSA signing key. This address
                is case-sensitive.
              example: '0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1'
              pattern: ^0x[a-fA-F0-9]{40}$
            adminAddress:
              type: string
              description: >-
                Address selected by the user as backup. It can do rage quit. It
                must be different from sessionAddress. This address is
                case-sensitive.
              example: '0xc162a3cE45ad151eeCd0a5532D6E489D034aB3B8'
              pattern: ^0x[a-fA-F0-9]{40}$
          required:
            - sessionAddress
            - adminAddress
        - type: object
          title: Basic Account
          description: >-
            Input for basic account prediction using account type and
            signerAddress
          properties:
            type:
              type: string
              description: >-
                Account type identifier specifying the validator and version
                combination
              example: kernel-v3.1-ecdsa
              enum:
                - kernel-v3.1-ecdsa
            signerAddress:
              type: string
              description: >-
                Address of the signer for this account using standard ECDSA
                authentication
              example: '0x1cBFbFd62a276BF6D79d504eA4CA75a7baDcf5b1'
              pattern: ^0x[a-fA-F0-9]{40}$
          required:
            - type
            - signerAddress
    predict-address-response:
      type: object
      properties:
        predictedAddress:
          type: string
          description: Predicted address
          example: '0xE20295ec513DEf805D9c3083b0C8EaB64692D764'
          pattern: ^0x[a-fA-F0-9]{40}$
      required:
        - predictedAddress
    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
    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
  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).

````