Installing our SDK

Install the SDK via npm or yarn.
npm install --save @0xsquid/sdk
or
yarn add @0xsquid/sdk
Import Squid at the top of your Typescript file and off you go! Config
import { Squid } from "@0xsquid/sdk";
const getSDK = (): Squid => {
const squid = new Squid({
baseUrl: "https://testnet.api.0xsquid.com" // for mainnet use "https://api.0xsquid.com"
});
return squid;
};
(async () => {
// instantiate the SDK
const squid = getSDK();
// init the SDK
await squid.init();
console.log("Squid inited");
})();

Advanced configuration

Check out Advanced set up if you're a power user.