# Generate addresses from public key Generates multiple HD addresses from the public key using either specific indexes or a range. The address format is automatically determined based on the public key's derivation path. You can specify either: - A list of specific indexes to generate addresses for - A range (from/to) to generate consecutive addresses If neither is specified, generates a single address at the next available index. Endpoint: POST /public_keys/{public_key_id}/addresses Version: 1.0.0 Security: ApiKeyAuth ## Path parameters: - `public_key_id` (string, required) Unique identifier (UUID) of the public key. Example: "550e8400-e29b-41d4-a716-446655440000" ## Request fields (application/json): - `range` (object, required) Range definition for HD address generation - `range.startIndex` (integer, required) Starting index (inclusive) Example: 100 - `range.count` (integer, required) Number of addresses to generate Example: 50 - `chainFamily` (string, required) Chain family that identifies blockchain ecosystems united by common protocol or account model for address generation. Available families for generation: - evm: Ethereum Virtual Machine-based blockchains - bitcoin: Bitcoin and Bitcoin-compatible networks - tron: Tron blockchain ecosystem Note: Solana is not supported for HD address generation from public keys. The chain family is used to determine which blockchain ecosystem the address belongs to and how it should be generated or validated. Enum: "evm", "bitcoin", "tron" ## Response 200 fields (application/json): - `items` (array, required) Array of generated address values Example: ["0x8521E8b15eCEF4D4269Fded3E6694225E096959E"] - `count` (integer, required) Number of addresses generated Example: 3 ## Response 201 fields (application/json): - `items` (array, required) Array of generated address values Example: ["0x8521E8b15eCEF4D4269Fded3E6694225E096959E"] - `count` (integer, required) Number of addresses generated Example: 3 ## Response 400 fields (application/problem+json): - `type` (string, required) A URI reference that identifies the problem type Example: "https://docs.vilna.io/apis/problems/invalid-request" - `title` (string, required) A short, human-readable summary of the problem type Example: "Invalid Request" - `status` (integer, required) The HTTP status code Example: 400 - `detail` (string) A human-readable explanation specific to this occurrence of the problem Example: "Validation error" - `instance` (string) A URI reference that identifies the specific occurrence of the problem Example: "/errors?id=XXXXXX-xxxxx" - `fields` (array) List of invalid fields in the request - `fields.name` (string, required) The name of the invalid field Example: "meta" - `fields.reason` (string, required) Why this field is invalid Example: "Exceeded maximum data size — must not exceed 1000 characters" ## Response 404 fields (application/problem+json): - `type` (string, required) A URI reference that identifies the problem type Example: "https://docs.vilna.io/apis/problems/not-found" - `title` (string, required) A short, human-readable summary of the problem type Example: "Not Found" - `status` (integer, required) The HTTP status code Example: 404 - `detail` (string) A human-readable explanation specific to this occurrence of the problem Example: "The requested resource was not found" - `instance` (string) A URI reference that identifies the specific occurrence of the problem Example: "/errors?id=XXXXXX-xxxxx" ## Response 422 fields (application/problem+json): - `type` (string, required) A URI reference that identifies the problem type Example: "https://docs.vilna.io/apis/problems/precondition-failed" - `title` (string, required) A short, human-readable summary of the problem type Example: "Precondition Failed" - `status` (integer, required) The HTTP status code Example: 422 - `detail` (string) A human-readable explanation specific to this occurrence of the problem Example: "Cannot generate mainnet address from a key with format secp256k1" - `instance` (string) A URI reference that identifies the specific occurrence of the problem Example: "/errors?id=XXXXXX-xxxxx" - `fields` (array) Details about the failed precondition - `fields.name` (string, required) The field or context where the precondition failed Example: "format" - `fields.reason` (string, required) Explanation of why the precondition failed Example: "Cannot generate the Bitcoin address from a key with format EVM" ## Response default fields (application/problem+json): - `detail` (string) A human-readable explanation specific to this occurrence of the problem Example: "An unexpected error occurred while processing your request" - `instance` (string) A URI reference that identifies the specific occurrence of the problem Example: "/errors/1234567890" - `status` (integer, required) The HTTP status code Example: 500 - `title` (string, required) A short, human-readable summary of the problem type Example: "Internal Server Error" - `type` (string, required) A URI reference that identifies the problem type Example: "https://api.vilna.io/problems/internal-error"