The Account Identifier is used in Ledger Canister, so it’s important to get the account identifier in motoko for those canisters integrating with Ledger Canister.
I find the source code of get account identifier in golang:
the blob (Principal’s bytes format) is
principal.NewSelfAuthenticatingId(der).Bytes(), and to convert to account identifier, it involves complex functions such as sha224.
How to get the Account Identifier from Principal in Motoko.