Comment on page
This page contains information what's changed on the first stable release from alpha stage. It's mostly directed to partners whose decided to integrate SwapKit in it's alpha version.
v1we change naming of packages with additional change of organisation name. This both cuts out clearly a
alphaversions from official release & keep naming of SDK simpler.
@thorswap-lib packages will be deprecated and will be
removed in future
SwapKit previously operated on entities like
AssetAmountinternally to handle calculations & other manipulation. With
v1we came up with one
AssetValuewhich handles a couple of things out of the box:
Initialisation of chain gas assets - together with value
For Synchronous initialisation you have to install Tokens(TODO) package.
Initialisation of any asset via new
They also validate if asset has proper format and starts with chain supported via
TypeScript can utilise over static token lists when installed which can heavily improve Developer Experience
TypeScript helps with providing proper identifiers to all tokens supported & listed via SwapKit API
v1we also introduce migration from old
AssetValueimplementation covers that and also has stored precision via native JS BigInt which reduces number of dependencies needed to run & library size. Click here to open
AssetValuemethods reference for more information.
We found current methods in alpha not self-explanatory enough, often complicate to use and sometimes implementing same thing in 2 methods because of older legacy code. With
v1release we renamed some of the methods and changed it's parameters to utilise new
AssetValueentity which will help handle assets, values, decimals & arithmetics.