Wraps rawPublicKey with the canonical ASN.1 prefix for id-Ed25519 (1.3.101.112) followed by the raw key bits.
Throws ValidationError when buffer length differs from 32 bytes.
Setup
import { wrapEd25519PublicKeyInDER } from '@fairmint/canton-node-sdk';
Minimal example
const der = wrapEd25519PublicKeyInDER(Buffer.from(RAW_THIRTY_TWO_BYTE_HEX, 'hex'));
console.log(der.toString('base64'));
Parameters
rawPublicKey—Buffercontaining exactly 32 bytes.
Returns
Buffer — DER-encoded SubjectPublicKeyInfo.
Errors
Throws ValidationError describing unexpected lengths.