V1 -> V2 Migration
New SDK or Widget version
~ Widget V2 version to be released soon
Base URLs
V1
API
https://api.squidrouter.com/v1
SDK
https://api.squidrouter.com
V2
API
https://v2.api.squidrouter.com/v2
SDK
https://v2.api.squidrouter.com
Ethers version (Squid SDK integrations only)
V1: Ethers V5
V2: Ethers V5 or V6 up to v6.7.1 ##HIGHER VERSION NOT SUPPORTED YET##
npm i ethers@6.7.1
Change /route from GET to POST
The /route endpoint is now POST. /status is still a /GET request.
Our SDK handles this behind the scenes. No changes needed
Importing types
V1:
V2: Slightly different import path
integrator-id
is required on all requests in V2
integrator-id
is required on all requests in V2Click the tabs for example code
Chain IDs are always strings in V2
Specifically check for
fromChain
andtoChain
e.g. if chainId = 1, convert to chainId = "1"
enableExpress
has been renamed to enableBoost
enableExpress
has been renamed to enableBoost
This is a request param in the
getRoute
function. Or on the/route
API endpoint.
Setting slippage in the route request
V2 introduces auto-slippage as default. Setting slippage manually is now optional
V1
V2
Rename customContractCalls
to postHook
customContractCalls
to postHook
Add chainType: ChainType.EVM,
to every call object in your array of calls.
The array of calls is now set under the calls
key of the postHook object. There are some other params now.
Last updated