HD Wallet Syncing and Address Derivation for Developers

HD Wallet Syncing and Address Derivation for Developers

xPub yPub zPub

Crypto APIs Team

Jan 22, 2026 • 6 min

Hierarchical Deterministic (HD) wallets are a widely used approach for generating and managing cryptocurrency addresses at scale. For a quick refresher, an HD wallet is a deterministic wallet where keys are derived from a single seed, rather than being generated as unrelated random keys that must each be backed up separately.

However, for most real-world products, the bigger challenge is not creating an HD wallet - it’s managing it in production. HD wallet management is the operational layer that helps you keep wallet data synchronized, track activity across derived addresses, and build transaction workflows in a way that is scalable and reliable.

This is exactly what Crypto APIs’ HD Wallet Management endpoints are designed to support.

HD wallets in practice: keys, derivation, and structure

A cryptocurrency wallet does not store coins. Instead, it stores cryptographic keys that are used to prepare, sign, and broadcast transactions.

Wallets can be divided into two broad categories:

  • Non-deterministic wallets generate keys randomly. This makes backup and long-term management more complex because many keys must be stored and protected.
  • Deterministic wallets, also known as HD wallets, derive keys from a single seed, often paired with a seed phrase (mnemonic) used for backup and recovery.

HD wallets generate a hierarchy of keys in a tree-like structure, making it possible to derive many keys and addresses from a single source. The original HD wallet structure is connected to BIP-32 (2012), which introduced hierarchical key derivation and made HD wallets possible.

In an HD wallet model, the main components are:

  • xPriv (extended private key) - generates all private keys in the wallet
  • xPub (extended public key) - can show balances of all public keys in the wallet

Public addresses can be generated from an xPub, which is why it must be handled carefully.

The Medium article also highlights BIP-44 as an example of how HD wallets can be structured into a hierarchy that supports:

  • different coins
  • multiple accounts
  • external and internal chains per account
  • large numbers of addresses per chain

This structure is powerful, but it also introduces a major operational challenge: the more addresses that can be derived, the harder it becomes to keep the wallet fully synchronized.

The data problem: why HD wallet management is difficult

An extended public key (xPub) can correspond to billions of derived addresses. While this makes HD wallets highly scalable, it also creates a technical challenge for any business that needs to monitor deposits, withdrawals, balances, and transaction history.

The core problem described in the source material is the need to synchronize:

  • all addresses that already exist for an xPub
  • all addresses that may be derived from that xPub in the future

This becomes especially important for platforms that operate at scale. For example, if a crypto exchange has millions of users, it may need to manage millions of addresses. In a non-deterministic wallet model, that implies storing and protecting huge numbers of private keys, which creates both operational overhead and security risk.

HD wallets solve part of the problem by allowing users to share only their xPub for monitoring purposes, while the wallet system can still track activity across derived addresses.

But to make that practical, you need a way to synchronize wallet data continuously and query it efficiently.

HD wallet management with Crypto APIs

Crypto APIs provides HD Wallet Management endpoints built around a clear operational flow: sync the extended public key first, then query wallet data and build transaction workflows using synced addresses.

This approach is designed for cases where retrieving all wallet information directly from the blockchain is too expensive or time-consuming, especially when HD wallets may contain large numbers of addresses and transactions.

Sync HD wallet (xPub, yPub, zPub)

Crypto APIs supports syncing an HD wallet by submitting an extended public key such as xPubyPub, or zPub. After the initial sync, Crypto APIs provides available wallet information related to that extended public key and continues updating the synced wallet with new data.

This sync step is positioned as a prerequisite for retrieving wallet details and transaction information.

Sync a new HD wallet (xPub, yPub, zPub)

Crypto APIs also provides an endpoint for syncing a brand new HD wallet in a way that prepares it for future derivation.

This endpoint is specifically described as:

  • not creating new addresses
  • not syncing old blockchain data

It is intended to register the wallet so it is ready for subsequent operations.

Deriving and syncing addresses

Once an extended public key is synced, Crypto APIs provides endpoints that derive and synchronize new addresses, ensuring that the system can track activity as the wallet expands.

Derive and sync receiving addresses

Crypto APIs can derive up to 100 receiving addresses, starting from the last index the system has data for. If there is no data, it starts from index 0.

These derived receiving addresses are then:

  • added to the xPub
  • subscribed for syncing
  • begin recording data

Derive and sync change addresses

Similarly, Crypto APIs can derive 100 change addresses, starting from the last index with available data. If there is no data, it starts from index 0.

These change addresses are then:

  • added to the xPub
  • subscribed for syncing
  • begin recording data

Querying wallet data once synced

After synchronization, Crypto APIs provides endpoints that allow applications to retrieve key wallet views without repeatedly performing heavy blockchain queries.

List synced addresses

This endpoint returns all addresses that have been synced for a specific extended public key, including both historical and newly derived addresses.

List HD wallet transactions

This endpoint lists the transactions associated with the HD wallet.

List HD wallet UTXOs

This endpoint lists the unspent transaction outputs (UTXOs) for an already synced HD wallet.

Get HD wallet assets

Crypto APIs provides an endpoint that returns supported asset details for a predefined extended public key, including:

  • a unique identifier (assetId)
  • the asset symbol string (for example, “USDT”)

Get HD wallet details

Crypto APIs also provides an endpoint described as a way to retrieve the most important wallet data without requiring many calculations. The key point is that once a wallet is synced and continuously updated, these wallet details can be calculated in advance.

Preparing and broadcasting transactions

Crypto APIs includes transaction endpoints designed to support production workflows where signing is performed locally.

Prepare a UTXO-based transaction from an HD wallet

Crypto APIs provides an endpoint that prepares a transaction for signing from all addresses synced with Crypto APIs for the specific xPub.

The preparation is based on:

  • the selectionStrategy
  • the addresses’ balances

A critical constraint is explicitly stated:

  • if a user has an address that is not synced with Crypto APIs, it will not be included in the transaction preparation process

The source material also gives examples of UTXO-based protocols such as Bitcoin and Litecoin.

Prepare an account-based transaction from an HD wallet

Crypto APIs also provides an endpoint that prepares an account-based transaction for signing from a synced with Crypto APIs address from the specific xPub.

The Medium article references account-based protocols such as Ethereum and BSC.

Broadcast a locally signed transaction

Crypto APIs provides an endpoint to broadcast a locally signed transaction. This is described as an alternative to broadcasting through your own node.

The flow is clearly defined:

  • the transaction is prepared and signed locally
  • Crypto APIs broadcasts it
  • Crypto APIs sends a callback indicating whether the broadcast was successful or unsuccessful

Practical applications of HD wallet management

The source material highlights several areas where HD wallet management capabilities are useful for crypto and blockchain products, including:

  • retrieving information from the blockchain
  • keeping track records of user activities
  • generating reports for taxes and accounting
  • creating and managing secure hardware wallets
  • creating and operating decentralized exchanges
  • preserving privacy and security of users

For any system that needs to work with extended public keys, derived addresses, and transaction workflows across multiple blockchain protocols, HD wallet management becomes a critical layer for reliability and scalability.

Crypto APIs’ HD Wallet Management endpoints provide a structured way to sync wallet data, derive addresses, retrieve wallet information, and support transaction preparation and broadcasting - without requiring teams to build the full indexing and monitoring infrastructure themselves.

Related articles

Share