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

# Register a new account

> Register a new account with factory, factory data, session details, and target. `target.chain` must use a CAIP-2 chain identifier (for example "eip155:8453").



## OpenAPI

````yaml https://raw.githubusercontent.com/rhinestonewtf/openapi/refs/heads/main/deposit-service.json post /register
openapi: 3.1.0
info:
  title: Deposit Service API
  version: 1.0.0
  description: >-
    Cross-chain deposit processing service with automatic token bridging and gas
    sponsorship
servers:
  - url: https://v1.orchestrator.rhinestone.dev/deposit-processor
security: []
paths:
  /register:
    post:
      tags:
        - Accounts
      summary: Register a new account
      description: >-
        Register a new account with factory, factory data, session details, and
        target. `target.chain` must use a CAIP-2 chain identifier (for example
        "eip155:8453").
      parameters:
        - schema:
            type: string
            description: API key for authentication
            example: your-api-key
          required: true
          description: API key for authentication
          name: x-api-key
          in: header
        - schema:
            type: string
            pattern: ^\d{4}-\d{2}\.[a-z0-9]+$
            description: >-
              API version identifier (e.g. "2026-04.amazon"). Optional today,
              will become required in a future release.
            example: 2026-04.amazon
          required: false
          description: >-
            API version identifier (e.g. "2026-04.amazon"). Optional today, will
            become required in a future release.
          name: x-api-version
          in: header
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterRequestBody'
      responses:
        '200':
          description: Account registered successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterResponse'
        '400':
          description: Invalid account data or unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Failed to register with Alchemy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    RegisterRequestBody:
      type: object
      properties:
        account:
          $ref: '#/components/schemas/AccountInput'
      required:
        - account
    RegisterResponse:
      type: object
      properties:
        evmDepositAddress:
          type: string
        solanaDepositAddress:
          type: string
        tronDepositAddress:
          type: string
      required:
        - evmDepositAddress
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        details:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
              path:
                type: array
                items:
                  anyOf:
                    - type: string
                    - type: number
              code:
                type: string
            required:
              - message
      required:
        - error
    AccountInput:
      type: object
      properties:
        address:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Ethereum address (0x followed by 40 hex characters)
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
        accountParams:
          $ref: '#/components/schemas/AccountParams'
        target:
          $ref: '#/components/schemas/Target'
      required:
        - address
        - accountParams
        - target
    AccountParams:
      type: object
      properties:
        factory:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Ethereum address (0x followed by 40 hex characters)
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
        factoryData:
          type: string
          pattern: ^0x[a-fA-F0-9]+$
          description: Hex-encoded string (0x followed by hex characters)
          example: '0x1234abcd'
        sessionDetails:
          $ref: '#/components/schemas/EnableSessionDetails'
      required:
        - factory
        - factoryData
        - sessionDetails
    Target:
      type: object
      properties:
        recipient:
          type: string
        chain:
          type: string
          pattern: ^[a-z0-9]+:[a-zA-Z0-9]+$
          description: CAIP-2 chain identifier (e.g. "eip155:8453")
          example: eip155:8453
        token:
          type: string
          minLength: 1
        outputTokenRules:
          type: array
          items:
            $ref: '#/components/schemas/OutputTokenRule'
        rejectUnmapped:
          type: boolean
        postBridgeActions:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - orderbook-swap
                  contract:
                    type: string
                    pattern: ^0x[a-fA-F0-9]{40}$
                    description: Ethereum address (0x followed by 40 hex characters)
                    example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
                  outputToken:
                    type: string
                    pattern: ^0x[a-fA-F0-9]{40}$
                    description: Ethereum address (0x followed by 40 hex characters)
                    example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
                required:
                  - type
                  - contract
                  - outputToken
      required:
        - chain
        - token
      description: >-
        Destination target configuration. `chain` must be a CAIP-2 chain
        identifier such as "eip155:8453" or
        "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp". When `postBridgeActions` are
        present, `token` is the token bridged into the smart account before
        those actions execute, and the last action `outputToken` becomes the
        final token delivered to `recipient`.
      example:
        chain: eip155:8453
        token: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        outputTokenRules:
          - match:
              symbol: USDC
            outputToken: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
          - match:
              chain: eip155:10
              symbol: ETH
            outputToken: '0x0000000000000000000000000000000000000000'
        rejectUnmapped: true
        postBridgeActions:
          - type: orderbook-swap
            contract: '0xb6807116b3b1b321a390594e31ecd6e0076f6278'
            outputToken: '0x0000000000000000000000000000000000000001'
    EnableSessionDetails:
      type: object
      properties:
        hashesAndChainIds:
          type: array
          items:
            type: object
            properties:
              chainId:
                type: integer
                minimum: 0
                exclusiveMinimum: true
                description: Positive integer
                example: 1
              sessionDigest:
                type: string
                pattern: ^0x[a-fA-F0-9]+$
                description: Hex-encoded string (0x followed by hex characters)
                example: '0x1234abcd'
            required:
              - chainId
              - sessionDigest
        signature:
          type: string
          pattern: ^0x[a-fA-F0-9]+$
          description: Hex-encoded string (0x followed by hex characters)
          example: '0x1234abcd'
      required:
        - hashesAndChainIds
        - signature
    OutputTokenRule:
      type: object
      properties:
        match:
          $ref: '#/components/schemas/OutputTokenRuleMatch'
        outputToken:
          type: string
          minLength: 1
      required:
        - match
        - outputToken
      description: >-
        Destination token routing rule. Matches deposits by source token
        attributes and selects the target-chain output token.
      example:
        match:
          symbol: USDC
        outputToken: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
    OutputTokenRuleMatch:
      type: object
      properties:
        chain:
          type: string
          pattern: ^[a-z0-9]+:[a-zA-Z0-9]+$
          description: CAIP-2 chain identifier (e.g. "eip155:8453")
          example: eip155:8453
        token:
          type: string
          minLength: 1
        symbol:
          type: string
      description: >-
        Source-token match criteria. Rules may match by source chain, source
        token address, source symbol, or a combination.
      example:
        chain: eip155:10
        symbol: USDC

````