Ledger uses BIP44 as specified here: bips/bip-0044.mediawiki at master · bitcoin/bips · GitHub
There’s a session reserved for Account Discovery in there, but the process is as follow:
- Let the derivation be as defined in BIP32:
m / purpose' / coin_type' / account' / change / address_index - Purpose is always 44’ and Coin_Type is 133 for ZEC, so far the derivation path is
m / 44' / 133' / account' / change / address_index
Then you follow the described algorithm:
- derive the first account’s node (index = 0)
- derive the external chain node of this account
- scan addresses of the external chain; respect the gap limit of 20 blank addresses
- if no transactions are found on the external chain, stop discovery
- if there are some transactions, increase the account index and go to step 1