Migration Guide
Both the Skip Router SDK (@skip-router/core
) and Skip Go Core (@skip-go/core
)
are deprecated. Please migrate to Skip Go Client (@skip-go/client
), our actively maintained client package.
Breaking changes
This section details the migration from previous versions to the latest @skip-go/client
.
No More SkipClient Class
The SkipClient
class has been removed. Instead, import and use individual functions directly:
Initialization Changes
If not using executeRoute
:
- Call
setApiOptions({ apiUrl, apiKey })
once at initialization. - Alternatively, pass
apiUrl
andapiKey
as arguments to each individual API function call.
If using executeRoute
:
- Call
setClientOptions()
with the same options object previously passed to theSkipClient
constructor. - Exception:
getCosmosSigner
,getEVMSigner
, andgetSVMSigner
have been removed fromsetClientOptions
. These signer functions are now passed directly toexecuteRoute
when needed. - Renamed:
getEVMSigner
is nowgetEvmSigner
, andgetSVMSigner
is nowgetSvmSigner
.
Build Format Change
The library build format has changed from CommonJS (CJS) to ES Modules (ESM)
.
This change enables better tree-shaking, leading to significantly smaller bundle sizes for applications that don’t use all the library’s features.
If you’re not using executeRoute
, your final bundle size should decrease dramatically (e.g., from ~5MB to potentially ~7KB for a single API function usage), assuming tree-shaking is enabled in your bundler.
Axios Removed
axios
is no longer a dependency. All API calls now utilize the standard window.fetch
API internally.
CamelCase Update
All property names in API responses and configuration objects now strictly adhere to camelCase
.
Examples:
Before | After |
---|---|
chainID | chainId |
apiURL | apiUrl |
logoURI | logoUri |
asset.isCW20 | asset.isCw20 |
Named parameter enforcement for API functions
Some methods now require named parameters or an options object instead of positional arguments:
recommendAssets
Old:
New:
Wrap the array in a { requests: [...] }
object.
ibcOriginAssets
Old:
New:
Wrap the assets array in a { assets: [...] }
object.
getFeeInfoForChain
Parameters for getFeeInfoForChain
should now be passed as an object.
Old:
New:
getRecommendedGasPrice
Parameters for getRecommendedGasPrice
should now be passed as an object.
Old:
New:
Removed Internal Functions
The following functions that were previously exported are no longer available in v1.0.0. These were internal functions that were not intended for direct use by integrators, as they are used internally by executeRoute
:
executeTxs
executeEvmMsg
(merged withexecuteEvmTransaction
)executeCosmosMessage
(merged withexecuteCosmosTransaction
)executeEVMTransaction
executeSVMTransaction
signCosmosMessageDirect
signCosmosMessageAmino
getRpcEndpointForChain
getRestEndpointForChain
validateGasBalances
validateEvmGasBalance
validateEvmTokenApproval
validateSvmGasBalance
validateUserAddresses
getMainnetAndTestnetChains
getMainnetAndTestnetAssets
getAccountNumberAndSequence
If your application was using any of these functions directly, consider using executeRoute
instead, which handles all transaction execution internally. If you have a specific use case that requires access to any of these functions, please open a ticket on our Discord.
Breaking changes
- Removed
clientID
param inSkipClient
- Added
apiKey
param inSkipClient
- Added
requiredChainAddresses
inSkipClient.route
response - Added
smartSwapOptions
inSkipClient.route
request
Breaking changes
- Changed parameter type of
userAddresses
from a map of chainIDs to addresses to an array ofUserAddress
types
Breaking changes
- Removed
SkipClient.executeMultiChainMessage
method - Renamed
SkipClient.getGasAmountForMessage
method toSkipClient.getCosmosGasAmountForMessage
- Renamed
SkipClient.getFeeForMessage
toSkipClient.getCosmosFeeForMe
- Renamed
MultiChainMsg
type toCosmosMsg
- Renamed and changed parameters of
SkipClient.executeMultiChainMsgs
toSkipClient.executeTxs
- Param of
SkipClient.executeCosmosMessage
changed frommessage:MultiChainMsg
tomessages: CosmosMsg[]