Install and initialize
📝Guides
Typescript SDK
The Typescript SDK is a wrapper around our API and provides the bulk of the functionality of the Immutable platform. Before you can start using the SDK, you must initialize the client.
Initialize the SDK client with the network on which you want your application to run:
Network | Description |
---|---|
Sandbox | The default test network (currently, it is Sepolia) |
Production | Ethereum network |
Install the npm package
npm install @imtbl/sdk --save
# or
yarn add @imtbl/sdk
Initialize the SDK with the desired environment:
import { config, x } from "@imtbl/sdk";
const { Environment } = config;
const {
IMXClient,
imxClientConfig, // helper method to create a client config
} = x;
const environment = Environment.SANDBOX; // or Environment.PRODUCTION
const client = new IMXClient(imxClientConfig({ environment }));;