How to translate principal to account-id in ledger canister

i want to know how to translate a principal into an account-id. And the principal in https://nns.ic0.app/ is derive from the host “https://nns.ic0.app/”?

2 Likes