Good news everyone! cosmic-lib beta-2 is out!
Check the README.
Edit: I tagged the release 1.0.0 to prevent any automatic update to the node library users because of compatibility breaking changes.
It is never such a great position when a few weeks before stable release you come
to realize that your software is not quite as good as you could make it. I had
to choose between introducing a bunch of (compatibility breaking) changes in
the last beta, or push them to an eventual stable v2. I was really eager to
release the best possible library, so I ended up going through yet another
rewrite.
My apologies to anybody who had waiting for this release since I first announce
it half-august: I badly underestimated the task ahead of me. There's a good news
though: the result is great!
cosmic-lib is gradually including host a few additional tools aimed at easing
wallet and cross-wallet applications development. A good example of this is
the new transaction builder in the library, which's really convenient.
Compatibility breaking changes (T_T)
- The whole format conversion mechanism have been reworked for simplicity.
Formats are now at cosmicLink.{format}° rather than
cosmicLink.get{Format}()`
and are directly accessible.
source
and network
options should now be set in cosmicLink.lock()
rather than
in constructor.
- cosmicLink.default renamed into cosmicLink.config.
- CSS attributes are now prefixed with "cosmiclib" instead of "CL" for clarity.
- CSS file should now be loaded with
cosmicLink.load.styles()
when needed.
New features (_)
- Transaction builder (
cosmicLink.addOperation()
).
- Transaction editor (
cosmicLink.setTxFields()
, cosmicLink.setOperation()
).
- Support for SEP-0007 in its XDR form.
- JSON/tdesc parsing with syntactic sugars.
- A
cosmicLink.lock()
method now performs all asynchronous operation needed to
build the Transaction object.
- Normalization of links (reduce link to its simplest possible form).
cosmicLink.htmlLink
provides an HTML link element that points to cosmicLink.uri.
cosmicLib.resolve
provides tools to deal with network configuration and fetch
data from federated server/horizon.
cosmicLib.signersUtils
provides tools to deal with multisig transactions.
cosmicLib.load
to asynchronously load CSS.
cosmicLib.withConfig()
allow to create new cosmicLib object with alternate
configuration.
Changes
- Federated & account response are now stored in a per-cosmicLink cache.
cosmicLink.htmlNode
renamed into cosmicLink.htmlDescription
.
- HTML description object systematically get type & field className.
- Improved signers handling.
- Improved error handling.
- Click handlers now works for any type of parameter
- Updated aliases.
- A few bugfixes.
- Rewrite documentation.
- Improved debug page.
- Improved demo page.
- Library have been modularized into logical parts (see @cosmic-plus).
- cosmic-lib components are now available at https://cosmic.plus/cosmic-lib (no frontpage yet)
- Code is better documented and organized.
- A README decicated to reviewers explains how the library works.
Deprecated
- cosmicLink.htmlNode, cosmicLink.statusNode, cosmicLink.transactionNode, cosmicLink.signersNode.
- cosmicLink.hasSigner(), cosmicLink.hasSigned() (moved to cosmicLink.transaction.hasSigner()
and cosmicLink.transaction.hasSigned()).
Removed
- formatHandlers have been removed (no more use case).
- cosmicLink.serve
Stats
63 files changed, 4936 insertions(+), 4090 deletions(-)
Change in library size: +8kB ?
Please share any thought ?