publicKeyToIdentity
Encodes a 32-byte FourQ public key as a 60-character Qubic identity string, the inverse of identityToPublicKey.
Signature
publicKeyToIdentity(publicKey: Uint8Array): IdentityPurpose
Encodes a 32-byte FourQ public key as an Identity string. The inverse of identityToPublicKey. Use this after performing raw key operations that return a Uint8Array and you need the human-readable identity format.
import { publicKeyToIdentity } from "@qubic.org/crypto"
const identity = publicKeyToIdentity(publicKey)
// identity: Identity — 60-character uppercase stringParameters
| Name | Type | Description |
|---|---|---|
publicKey | Uint8Array | 32-byte FourQ public key |
Returns
Identity — 60-character uppercase identity string.