Skip to content

getAccountIdentifierFromAddress

getAccountIdentifierFromAddress(address): string

Creates an account identifier from a given account address.

address: string

The account address used to derive the identifier.

string

The account identifier, which is the address prefixed with a standard identifier prefix.

This function takes an account address and appends a predefined prefix (if not already present) to generate a standardized account identifier. It ensures that all account identifiers have a consistent format.

const accountAddress = '0x1234...';
const identifier = getAccountIdentifierFromAddress(accountAddress);
console.log('Account Identifier:', identifier);

identifier/src/Identifier.ts:587