``` const privateKey = peerId.toJSON() privateKey.toB58String = peerId.toB58String ```