All static constructors in EthereumJS packages were removed as part of tree-shaking optimizations.
Ultralight's portalnetwork package contains several static constructors. PortalNetwork.create is a big one, but also uTP packet constructors Packet.from... and possibly more.
To follow the optimization pattern executed in the EthJS packages, we would replace these static constructors with an exported function. For example, in the PortalNetwork class, public static create = async (...) => {...} would be replaced with export async function createPortalNetwork(...) {...} with the same internal logic, and moved to a new file client/constructor.ts
All static constructors in EthereumJS packages were removed as part of tree-shaking optimizations.
Ultralight's
portalnetworkpackage contains several static constructors.PortalNetwork.createis a big one, but also uTP packet constructorsPacket.from...and possibly more.To follow the optimization pattern executed in the EthJS packages, we would replace these static constructors with an exported function. For example, in the
PortalNetworkclass,public static create = async (...) => {...}would be replaced withexport async function createPortalNetwork(...) {...}with the same internal logic, and moved to a new fileclient/constructor.ts