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

# Generate wallets

> Derives one or more new addresses on the business HD tree. Requires the `wallet.hd.generate` capability and an `Idempotency-Key` header. See [Idempotency](/getting-started/conventions#idempotency).



## OpenAPI

````yaml POST /v1/wallet/hd/generate
openapi: 3.1.0
info:
  title: Convexity Infra API
  version: 1.0.0
  description: >-
    REST API reference for Convexity Infra: the backend services your business
    integrates to build and operate on-chain products. Every response is wrapped
    in a `{ status, message, data }` envelope and authorized with an OAuth 2.0
    bearer token minted by Auth-Edge.
  contact:
    name: Convexity Infra
    url: https://withconvexity.com
    email: infra@withconvexity.com
servers:
  - url: https://dev.api.withconvexity.com
    description: Development
security:
  - bearerAuth: []
tags:
  - name: Auth-Edge
    description: >-
      OAuth 2.0 token issuance. Exchange a project API key for a short-lived
      bearer token that authorizes every other Infra API call.
  - name: Projects
    description: >-
      Manage the calling project itself: rotate its API key pair and control
      which IP addresses may authenticate with it.
  - name: Payments
    description: >-
      List project and subscription payments, and mint virtual bank accounts
      (via KoraPay) for wallet top-ups and subscriptions.
  - name: Products
    description: >-
      Browse the products and capabilities available to your project. Each
      product maps to a plan and a set of capability keys.
  - name: Subscriptions
    description: List available plans and manage your project's subscriptions.
  - name: Wallet
    description: >-
      HD wallet lifecycle, balances, transfers, transaction signing, and
      supported-chain discovery. Wallets are scoped to the business in your
      token: accessing another business's wallet returns `403`.


      **Capabilities**: each operation is gated on a capability granted by your
      plan; a missing one returns `403: Missing required capability:
      <capability>`.


      | Capability | Grants |

      |---|---|

      | `wallet.hd.generate` | Generate wallets. |

      | `wallet.hd.read` | List and read wallets, counts, and HD status. |

      | `wallet.hd.sign` | Sign transactions. |

      | `wallet.hd.deactivate` | Deactivate a wallet. |

      | `wallet.transfer.create` | Initiate transfers. |

      | `wallet.transfer.read` | Read transaction history and records. |

      | `wallet.balance.read` | Read the USD balance. |
  - name: Indexer
    description: >-
      Subscribe to decoded on-chain events, receive signed webhooks, and inspect
      or replay delivery logs. Every endpoint requires a token with project +
      business context and a per-operation capability.
  - name: Tokenization
    description: >-
      Issue and manage tokenized real-world assets: create tokens, mint, burn,
      transfer, manage holders and registered wallets, and run yield operations
      (coupons, distributions, claims, and principal redemption).
paths:
  /v1/wallet/hd/generate:
    post:
      tags:
        - Wallet
      summary: Generate wallets
      description: >-
        Derives one or more new addresses on the business HD tree. Requires the
        `wallet.hd.generate` capability and an `Idempotency-Key` header. See
        [Idempotency](/getting-started/conventions#idempotency).
      operationId: generateWallets
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
          example: 0c1d2e3f-4a5b-6c7d-8e9f-001122334455
          description: >-
            Unique client-generated key (use a UUID) that makes this request
            safe to retry. A retry sent with the same key returns the original
            result instead of submitting again. See
            [Idempotency](/getting-started/conventions#idempotency).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - chainType
              properties:
                chainType:
                  type: string
                  enum:
                    - EVM
                    - SOLANA
                purpose:
                  type: string
                  description: Logical tag for the addresses (e.g. `deposit`).
            example:
              chainType: EVM
              purpose: deposit
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                status: true
                message: Wallets generated successfully
                data:
                  - address: '0x71C7656EC7ab88b098defB751B7401B5f6d8976F'
                    chainType: EVM
                    isActive: true
                    addressIndex: 10
                  - address: '0x9e1d5B0F3aA4C2e88b7B1c2D3E4F5a6B7c8D9e0F'
                    chainType: EVM
                    isActive: true
                    addressIndex: 11
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
              examples:
                400_Validation_error:
                  summary: 400 Validation error
                  value:
                    status: false
                    message: >-
                      chainType: Invalid enum value. Expected 'EVM' | 'SOLANA' |
                      'XBN' | 'TRON'
                400_Idempotency_Key_required:
                  summary: 400 Idempotency-Key required
                  value:
                    status: false
                    message: Idempotency-Key header is required
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
              example:
                status: false
                message: Authorization token is missing or malformed.
        '402':
          description: Payment required
          content:
            application/json:
              schema:
                type: object
              example:
                status: false
                message: No subscription found for this product's plan
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
              examples:
                403_Forbidden_test_token:
                  summary: 403 Forbidden – test token
                  value:
                    status: false
                    message: Test tokens are not allowed, please use your live api key.
                403_Forbidden_capability_not_granted:
                  summary: 403 Forbidden – capability not granted
                  value:
                    status: false
                    message: Capability wallet.hd.generate not granted
        '409':
          description: Response
          content:
            application/json:
              schema:
                type: object
              example:
                status: false
                message: Idempotency-Key was already used with a different request body
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
              examples:
                429_Quota_exceeded:
                  summary: 429 Quota exceeded
                  value:
                    status: false
                    message: >-
                      Plan quota exceeded for wallet.hd.generate: limit 100
                      (lifetime), current usage 100, requested 2. Upgrade your
                      plan to continue.
                429_Too_Many_Requests_throttled:
                  summary: 429 Too Many Requests – throttled
                  value:
                    status: false
                    message: Too many requests. Please try again later.
                    retryAfter: 60
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth 2.0 access token from Auth-Edge.

````