<blockquote>
<p>does the wallet always create the first account at index 0?</p>
</blockquote>
<p>Yes, the wallet derivation path defaults are declared in the trezor suite wallet source code. <a href="https://github.com/trezor/trezor-suite/blob/5377ec9e20d5e37951db2ad4a8bbeca437ed8d69/packages/suite/src/utils/wallet/coinmarket/coinmarketUtils.ts#L115" rel="nofollow noreferrer">https://github.com/trezor/trezor-suite/blob/5377ec9e20d5e37951db2ad4a8bbeca437ed8d69/packages/suite/src/utils/wallet/coinmarket/coinmarketUtils.ts#L115</a></p>
<pre><code>{
    name: 'Bitcoin (legacy)',
    networkType: 'bitcoin',
    accountType: 'legacy',
    symbol: 'btc',
    bip44: &quot;m/44'/0'/i'&quot;,
    decimals: 8,
    explorer: {
        tx: 'https://btc1.trezor.io/tx/',
        account: 'https://btc1.trezor.io/xpub/',
    },
    features: ['rbf', 'sign-verify'],
},
    

const result = await TrezorConnect.getAddress({
    device,
    coin: legacy.symbol,
    path: `${legacy.bip44.replace('i', '0')}/0/0`,
    useEmptyPassphrase: device.useEmptyPassphrase,
    showOnTrezor: false,
});
if (result.success) {
    return result.payload.address;
}
</code></pre>
<blockquote>
<p>Is it possible for a user to generate an account at subsequent indices
if there are no funds at the previous index?</p>
</blockquote>
<p>Yes, under the receive tab of the wallet. Although it shows index 0 by default, there's a &quot;+ More Addresses&quot; button the users could click on and send BTC to a higher index prior to receiving anything at index 0. A user going too far ahead of the index on their own doing can complicate the way an HD wallet works due to look-ahead gaps. See <a href="https://bitcoin.stackexchange.com/a/54664/26873">https://bitcoin.stackexchange.com/a/54664/26873</a></p>

CC BY-SA 4.0
2021-11-15T17:36:08.853Z
Hey @m1xolyd1an, thanks for the reply.
I see that you can add more addresses and create gaps for a particular account. In my use case, I'm concerned about a user creating gaps at the account level. In the suite, I see that it blocks them from adding new accounts if the previous one is empty. Is there any other way for them to create gaps at the account level? [Screenshot for clarity](https://imgur.com/a/6aGi9aU)
Aman Saran
CC BY-SA 4.0
2021-11-12T04:56:13.230Z
2021-11-12T04:56:13.230Z
m1xolyd1an
<p>When a user sets up their Trezor hardware wallet to store bitcoin, does the wallet always create the first account at index 0? Is it possible for a user to generate an account at subsequent indices if there are no funds at the previous index? (i.e. a user creates an account at index 1 without having created an account at index 0)</p>
<p>For context, I'm working on a project that integrates with the Trezor Connect API and I want the user to be able to query their bitcoin balance from the accounts on their hardware wallet.</p>
<p>EDIT: For clarity, I'm referring to the <strong>account</strong> and not the addresses derived from that account. The Trezor Suite does not seem to allow subsequent accounts to be generated if a previous one is empty as shown in <a href="https://i.sstatic.net/TiZgh.jpg" rel="nofollow noreferrer">this screenshot</a> but my goal is to be able to calculate the balance of all or some of a user's bitcoin accounts so I would need to know at which point to stop looking for new accounts.</p>

<trezor>
Do Trezor wallets always generate the first account at the same index?
Aman Saran
# Do Trezor wallets always generate the first account at the same index?

(Asked by: username_0 on 2021-11-11)

When a user sets up their Trezor hardware wallet to store bitcoin, does the wallet always create the first account at index 0? Is it possible for a user to generate an account at subsequent indices if there are no funds at the previous index? (i.e. a user creates an account at index 1 without having created an account at index 0)

For context, I'm working on a project that integrates with the Trezor Connect API and I want the user to be able to query their bitcoin balance from the accounts on their hardware wallet.

EDIT: For clarity, I'm referring to the **account** and not the addresses derived from that account. The Trezor Suite does not seem to allow subsequent accounts to be generated if a previous one is empty as shown in [this screenshot](https://i.sstatic.net/TiZgh.jpg) but my goal is to be able to calculate the balance of all or some of a user's bitcoin accounts so I would need to know at which point to stop looking for new accounts.

**Tags:** trezor


---

## 1 answers

### Answer by username_1 on 2021-11-12. Score: 1

> does the wallet always create the first account at index 0?

Yes, the wallet derivation path defaults are declared in the trezor suite wallet source code. <https://github.com/trezor/trezor-suite/blob/5377ec9e20d5e37951db2ad4a8bbeca437ed8d69/packages/suite/src/utils/wallet/coinmarket/coinmarketUtils.ts#L115>

```
{
    name: 'Bitcoin (legacy)',
    networkType: 'bitcoin',
    accountType: 'legacy',
    symbol: 'btc',
    bip44: "m/44'/0'/i'",
    decimals: 8,
    explorer: {
        tx: 'https://btc1.trezor.io/tx/',
        account: 'https://btc1.trezor.io/xpub/',
    },
    features: ['rbf', 'sign-verify'],
},
    

const result = await TrezorConnect.getAddress({
    device,
    coin: legacy.symbol,
    path: `${legacy.bip44.replace('i', '0')}/0/0`,
    useEmptyPassphrase: device.useEmptyPassphrase,
    showOnTrezor: false,
});
if (result.success) {
    return result.payload.address;
}

```

> Is it possible for a user to generate an account at subsequent indices
> if there are no funds at the previous index?

Yes, under the receive tab of the wallet. Although it shows index 0 by default, there's a "+ More Addresses" button the users could click on and send BTC to a higher index prior to receiving anything at index 0. A user going too far ahead of the index on their own doing can complicate the way an HD wallet works due to look-ahead gaps. See <https://bitcoin.stackexchange.com/a/54664/26873>

> **Comments:**
> **username_0**: Hey @username_1, thanks for the reply. I see that you can add more addresses and create gaps for a particular account. In my use case, I'm concerned about a user creating gaps at the account level. In the suite, I see that it blocks them from adding new accounts if the previous one is empty. Is there any other way for them to create gaps at the account level? [Screenshot for clarity](https://imgur.com/a/6aGi9aU)  

---

