-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Labels
enhancementNew feature or requestNew feature or request
Description
π Feature Request Description
Motivation
Currently the sdk has the bundle size of over 500KB (minified and gzipped). 421KB come from poseidon-lite the Poseidon hash const table, but used only while deriving Keyless accounts. Since the sdk usually gets included in the initial bundle of the dapps, this affects negatively to page load speed for end users.
https://bundlephobia.com/package/poseidon-lite@0.3.0
https://bundlephobia.com/package/@aptos-labs/ts-sdk@1.33.0
Possible Solutions
-
Make the
poseidon-liteoptional dependency and dynamically load the module when deriving Keyless account, or right before it's used -
Optionally allow offloading idCommitment derivation to pepper service? (if it makes sense security wise)
Additional context
- Due to the bundle size, in our dApp, we dynamically import (
await import) the entire ts sdk module to reduce the initial page load delay (hope we no longer have to do this in the future). - Can we also somehow use built in fetch (undici on node, browser built in fetch on web) and remove axios?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request