> ## 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 an account

> Registers a smart account for deposits.



## 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: >-
    Rhinestone Deposits API: accept deposits from any chain, asset or payment
    method, and settle them as one token on one chain.
servers:
  - url: https://v1.orchestrator.rhinestone.dev/deposit-processor
security: []
paths:
  /register:
    post:
      tags:
        - Accounts
      summary: Register an account
      description: Registers a smart account for deposits.
      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'
        '403':
          description: API key lacks required deposits scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Failed to register with Alchemy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: >-
            Temporarily unavailable; nothing was stored. Retry after the number
            of seconds in the Retry-After header.
          headers:
            Retry-After:
              description: Seconds to wait before retrying the registration
              schema:
                type: integer
          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
        code:
          type: string
          description: >-
            Deposit error code (e.g. `TOKEN-3`) when the refusal is one a
            deposit would also receive.
        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'
        sessionScopes:
          $ref: '#/components/schemas/SessionScopes'
      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: {}
      required:
        - chain
        - token
      description: >-
        Destination target configuration. `chain` must be a CAIP-2 chain
        identifier such as "eip155:8453",
        "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", "tron:mainnet" or
        "hypercore:mainnet" — see `destination` on `/chains`. `token` and
        `recipient` follow the chain's address format: 0x-hex for EVM and
        HyperCore, base58 for Solana, base58check (T-prefixed) for Tron. Tron
        and HyperCore destinations require an explicit `recipient`, since the
        EVM account address is not an address on those chains and cannot be
        defaulted to. `outputTokenRules` select the final target token per
        source token; `rejectUnmapped` ignores deposits with no matching rule.
      example:
        chain: eip155:8453
        token: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        outputTokenRules:
          - match:
              symbol: USDC
            outputToken: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
          - match:
              chain: eip155:10
              symbol: ETH
            outputToken: '0x0000000000000000000000000000000000000000'
        rejectUnmapped: true
    EnableSessionDetails:
      type: object
      properties:
        hashesAndChainIds:
          type: array
          items:
            type: object
            properties:
              chainId:
                type: integer
                exclusiveMinimum: 0
                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
    SessionScopes:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/SessionScope'
    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'
    SessionScope:
      type: object
      properties:
        sellToken:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Token the deposit arrives in.
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
        buyToken:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: >-
            Where value is allowed to end up — normally the account target
            token.
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
        recipient:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: >-
            Pinned output recipient, so a compromised signer cannot redirect the
            swap.
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
        settler:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: >-
            The 0x Settler this scope pins. Resolved server-side from 0x's
            registry and echoed back inside `accountParams`; re-send it
            unchanged on `/register`, because it is an input to the digest you
            signed.
          example: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91'
        maxSpend:
          type: string
          pattern: ^\d+$
          description: >-
            Optional cumulative ceiling on what may leave, in base units. The
            pinned Settler is what bounds the session, so a cap is only needed
            as a spend ceiling in its own right. It is a LIFETIME total: once
            reached the account stops converting deposits until it re-registers.
          example: '1000000000000000000'
      required:
        - sellToken
        - buyToken
        - recipient
    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

````