Delegates to wrapEd25519PublicKeyInDER(Keypair.rawPublicKey()) then toString('base64').
Use before generateExternalPartyTopology publicKey.keyData payloads.
Setup
import { Keypair } from '@stellar/stellar-base';
import { stellarPublicKeyToBase64 } from '@fairmint/canton-node-sdk';
const keypair = Keypair.random();
Minimal example
const encoded = stellarPublicKeyToBase64(keypair);
console.log(encoded);
Parameters
keypair—Keypairfrom@stellar/stellar-base.
Returns
string — Base64 DER SubjectPublicKeyInfo blob.
Errors
Propagates ValidationError from wrapEd25519PublicKeyInDER when raw key malformed.