xrpl.js
xrpl.js copied to clipboard
Make xrpl.js more modular
Currently xrpl.js (xrpl
) is a big code, including Client and Wallet.
Even if you use only xrpl
utils on the front end, it still contains Client and Wallet code.
The same goes if you want to use only the ledger
or transaction
models.
For example, how about splitting the code as follows?
@xrpl/wallet
@xrpl/client
@xrpl/models
@xrpl/utils
I completely agree. We will try to come up with a proposal for a more modular design and present it to the community.
In analyzing your request the largest problem seems to be bundle size of xrpl.js. We discovered that we can address this with relatively few breaking changes. That work has culminated in xrpl 3.0 having a 50-65%+ file size reduction in the official bundle.
This was done through cleaning up dependencies and polyfills. If your own code relies on these previously required polyfills you will not see such a drastic reduction but in our tests this is about a reduction of 300kb gzipped.
The focus of 4.0 will be then be to further reduce bundle size by further focusing on tree-shaking and modularization.