You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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?
The text was updated successfully, but these errors were encountered:
🚀 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/[email protected]
https://bundlephobia.com/package/@aptos-labs/[email protected]
Possible Solutions
Make the
poseidon-lite
optional dependency and dynamically load the module when deriving Keyless account, or right before it's usedOptionally allow offloading idCommitment derivation to pepper service? (if it makes sense security wise)
Additional context
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).The text was updated successfully, but these errors were encountered: