How to generate address of account by myself, does not depend on the tool client

when i get an json file of id object form identy provider, i want to generate the address of account by myself, not use the user_cli tool , there is any example of source code by golang or rust ? , then i construct a transacton of createAccount send to chain by rpc, i need to integrated the code to my project of golang, as the enviroment limit i can`t use any client tool,eg concordium-client; please give some infomation, thanks


The address of the account is derived solely from the initial credential’s credential-id, which is also referred to as a registration-id (regId), in the request you send to the identity provider.

The account address is just the sha256 hash of this regId, represented in base58check.
The construction of the account address can be found in our base library.