Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigation: Restructure SDK into plugin architecture #5322

Open
jmrossy opened this issue Jan 29, 2025 · 0 comments
Open

Investigation: Restructure SDK into plugin architecture #5322

jmrossy opened this issue Jan 29, 2025 · 0 comments
Assignees

Comments

@jmrossy
Copy link
Contributor

jmrossy commented Jan 29, 2025

Problem

For each protocol that Hyperlane supports, the utils and SDK packages must add one or more protocol-specific crypto libs, which are always large. We must also add a lot of our own code. The end result is a steadily growing bundle size which hurts app UX and security (a single compromised lib can easily own user funds).

The Hyperlane packages do use ESM so they're tree-shakeable but most crypto libs other than Viem + Ethers are poorly structured and don't support shaking (looking at you Cosmos). Meaning even if our own house is in order, the libs we require devs to use are not.

We should explore options for de-coupling our libs from protocol-specific libs. Two ideas would be a plugin architecture with separate packages or separated exports under the same package.

Related

#5321

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants