What is the maximum number of subaccounts that an account can have?

I am trying to find info on this so that I know if I would be able to use a subaccount per transaction for my app if let’s say the app becomes very large and there will be many transactions going through it in the end? Would I be able to use a different subaccount of my main account for each transaction, or is there a limit (and if so, what would be the highest number of subaccounts an account could have) ?

You’re allowed 32 bytes as a subaccount identifier, this is all zeros for the default account. It gets appended to the principal before hashing to derive the account id.

Some details here:
https://github.com/dfinity/ic/blob/master/rs/rosetta-api/docs/modules/rosetta-api/pages/ledger.adoc#accounts
And here:
https://fxa77-fiaaa-aaaae-aaana-cai.raw.ic0.app/wrongzoo

1 Like