How to: generate account identifier from a principal and a subaccount_identifier

Hello!

Is there a (standard library?) motoko function to generate an account identifier from a principal and a subaccount_identifier as explained on The Ledger canister | Internet Computer Home ?

Thank you!

1 Like

I found this. Not sure if it needs updating.

This is really useful as well

I found this useful as well: B.Lynnity - Principals and Accounts

3 Likes

Motoko Version:
https://github.com/dfinity/examples/blob/master/motoko/ledger-transfer/src/ledger_transfer/Account.mo