Set up your environment
Estimated time to complete: 15 minutes
Before you begin your Immutable integration, you will need to set up your environment correctly.


Task 1: Join Immutable Hub
Immutable Hub is the admin panel and learning platform for Immutable developers. Sign up typically takes between 3 and 5 minutes and you’ll be asked 8 simple questions to help us understand what you’re building.
Immutable Hub
Task 2: Use Hub to create a zkEVM project
Once you’ve set up your Hub account, you can create a project. Create a project and fill in the following in the setup flow:
- Project Name: the name of your application (e.g. My Project)
- Project Rollup: Immutable zkEVM
- Environment Name: anything you want (e.g. Testing)
- Environment Type: Testnet
Games should initially build on our testing/testnet environment before switching to production/mainnet.
Once complete, you should see the Project screen inside Immutable Hub, where you'll configure your Immutable integration for this project. Consider keeping the browser tab open so you can easily return to it later.

Task 3: Create Publishable and Secret API Keys
Once you've set up your project and environment, the next step is to create a Publishable and Secret API key under the environment you just created. You'll use these in the next step when you install and configure the Immutable Typescript SDK. You can learn more about our APIs and API keys.
You can create and manage your keys in the API Keys tab in an environment. Consider keeping this tab open to easily copy the keys when initialising and configuring the Immutable Typescript SDK.

Task 4: Install the Immutable SDK
Prerequisites
Node Version >18
Immutable's Typescript SDK requires Node v18 (Active LTS version) or higher. Node v18 can be installed via nvm
.
To install nvm
follow these instructions. Once installed, run:
nvm install --lts
Install the Immutable SDK
Run the following command in your project root directory.
- npm
- yarn
npm install -D @imtbl/sdk
# if necessary, install dependencies
npm install -D typescript ts-node
yarn add --dev @imtbl/sdk
# if necessary, install dependencies
yarn add --dev typescript ts-node
The Immutable SDK is still in early development. If experiencing complications, use the following commands to ensure the most recent release of the SDK is correctly installed:
- npm
- yarn
rm -Rf node_modules
npm cache clean --force
npm i
rm -Rf node_modules
yarn cache clean
yarn install
How to use API Keys
Using the Publishable Key
What is the Publishable Key for?
const baseConfig = {
environment: config.Environment.PRODUCTION,
publishableKey: '[YOUR_PUBLISHABLE_KEY]', // Replace with your Publishable Key from the Immutable Hub
};
Using the Secret API Key
What is the Secret API Key for?
import { config, blockchainData } from '@imtbl/sdk';
const client = new blockchainData.BlockchainData({
baseConfig: {
environment: config.Environment.PRODUCTION,
apiKey: '[YOUR_SECRET_API_KEY]',
publishableKey: '[YOUR_PUBLISHABLE_KEY]',
},
});