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.
This section details the migration from previous versions to the latest @skip-go/client
.
The SkipClient
class has been removed. Instead, import and use individual functions directly:
If not using executeRoute
:
setApiOptions({ apiUrl, apiKey })
once at initialization.apiUrl
and apiKey
as arguments to each individual API function call.If using executeRoute
:
setClientOptions()
with the same options object previously passed to the SkipClient
constructor.getCosmosSigner
, getEVMSigner
, and getSVMSigner
have been removed from setClientOptions
. These signer functions are now passed directly to executeRoute
when needed.getEVMSigner
is now getEvmSigner
, and getSVMSigner
is now getSvmSigner
.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
is no longer a dependency. All API calls now utilize the standard window.fetch
API internally.
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 |
Some methods now require named parameters or an options object instead of positional arguments:
Old:
New:
Wrap the array in a { requests: [...] }
object.
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:
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 with executeEvmTransaction
)executeCosmosMessage
(merged with executeCosmosTransaction
)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.
clientID
param in SkipClient
apiKey
param in SkipClient
requiredChainAddresses
in SkipClient.route
responsesmartSwapOptions
in SkipClient.route
requestuserAddresses
from a map of chainIDs to addresses to an array of UserAddress
typesSkipClient.executeMultiChainMessage
methodSkipClient.getGasAmountForMessage
method to SkipClient.getCosmosGasAmountForMessage
SkipClient.getFeeForMessage
to SkipClient.getCosmosFeeForMe
MultiChainMsg
type to CosmosMsg
SkipClient.executeMultiChainMsgs
to SkipClient.executeTxs
SkipClient.executeCosmosMessage
changed from message:MultiChainMsg
to messages: CosmosMsg[]