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.@skip-go/client v1.0.0
Breaking changes
This section details the migration from previous versions to the latest@skip-go/client.No More SkipClient Class
TheSkipClient class has been removed. Instead, import and use individual functions directly:Example import
Initialization Changes
If not usingexecuteRoute:- Call
setApiOptions({ apiUrl, apiKey })once at initialization. - Alternatively, pass
apiUrlandapiKeyas arguments to each individual API function call.
executeRoute:- Call
setClientOptions()with the same options object previously passed to theSkipClientconstructor. - Exception:
getCosmosSigner,getEVMSigner, andgetSVMSignerhave been removed fromsetClientOptions. These signer functions are now passed directly toexecuteRoutewhen needed. - Renamed:
getEVMSigneris nowgetEvmSigner, andgetSVMSigneris nowgetSvmSigner.
Example migration
Build Format Change
The library build format has changed from CommonJS (CJS) toES 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 tocamelCase.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:{ requests: [...] } object.ibcOriginAssets
Old:{ assets: [...] } object.getFeeInfoForChain
Parameters for getFeeInfoForChain should now be passed as an object.Old:getRecommendedGasPrice
Parameters for getRecommendedGasPrice should now be passed as an object.Old: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 byexecuteRoute:executeTxsexecuteEvmMsg(merged withexecuteEvmTransaction)executeCosmosMessage(merged withexecuteCosmosTransaction)executeEVMTransactionexecuteSVMTransactionsignCosmosMessageDirectsignCosmosMessageAminogetRpcEndpointForChaingetRestEndpointForChainvalidateGasBalancesvalidateEvmGasBalancevalidateEvmTokenApprovalvalidateSvmGasBalancevalidateUserAddressesgetMainnetAndTestnetChainsgetMainnetAndTestnetAssetsgetAccountNumberAndSequence
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.@skip-router/core v4.0.0
Breaking changes
- Removed
clientIDparam inSkipClient - Added
apiKeyparam inSkipClient - Added
requiredChainAddressesinSkipClient.routeresponse - Added
smartSwapOptionsinSkipClient.routerequest
Type signature
@skip-router/core v3.0.0
Breaking changes
- Changed parameter type of
userAddressesfrom a map of chainIDs to addresses to an array ofUserAddresstypes
Type signature
@skip-router/core v2.0.0
Breaking changes
- Removed
SkipClient.executeMultiChainMessagemethod - Renamed
SkipClient.getGasAmountForMessagemethod toSkipClient.getCosmosGasAmountForMessage - Renamed
SkipClient.getFeeForMessagetoSkipClient.getCosmosFeeForMe - Renamed
MultiChainMsgtype toCosmosMsg - Renamed and changed parameters of
SkipClient.executeMultiChainMsgstoSkipClient.executeTxs
Diff
- Param of
SkipClient.executeCosmosMessagechanged frommessage:MultiChainMsgtomessages: CosmosMsg[]
Diff