Skip to content

Reference

stellarPublicKeyToHex

Hex-encode raw Ed25519 public keys from Stellar Keypairs for validator-facing tooling.

Returns keypair.rawPublicKey().toString('hex').

Setup

import { generateStellarKeypair, stellarPublicKeyToHex } from '@fairmint/canton-node-sdk';

Minimal example

const hex = stellarPublicKeyToHex(generateStellarKeypair());
console.log(hex);

Parameters

  • keypairKeypair whose raw public bytes convert to lowercase hex without 0x.

Returns

string — Hex-encoded raw key (64 chars).

Source

src/utils/external-signing/stellar-utils.ts