serialize static method

String serialize(
  1. IPublicKey pubKey,
  2. String pathOrBip32Path,
  3. dynamic chainCodeOrBip32ChainCode,
  4. Slip32KeyNetVersions keyNetVer,
)

Serialize a public key with a given path, chain code, and network version.

This method serializes a public key pubKey into a SLIP-32 format along with the specified path or Bip32 path pathOrBip32Path, chain code, and public key network version keyNetVer. It returns the serialized public key as a Bech32-encoded string.

Implementation

static String serialize(
  IPublicKey pubKey,
  String pathOrBip32Path,
  dynamic chainCodeOrBip32ChainCode,
  Slip32KeyNetVersions keyNetVer,
) {
  return Slip32KeySerializer.serialize(
    pubKey.compressed,
    pathOrBip32Path,
    chainCodeOrBip32ChainCode,
    keyNetVer.public,
  );
}