QubicTypeScript

publicKeyToIdentity

Encodes a 32-byte FourQ public key as a 60-character Qubic identity string, the inverse of identityToPublicKey.

Signature

publicKeyToIdentity(publicKey: Uint8Array): Identity

Purpose

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 string

Parameters

NameTypeDescription
publicKeyUint8Array32-byte FourQ public key

Returns

Identity — 60-character uppercase identity string.

On this page