Skip to main content


Using npm

npm install warp-contracts

Using yarn

yarn add warp-contracts


Warp Contracts SDK requires Node.js version 16.5+.


You can import the full API or individual modules.

The SDK is available in both the ESM and CJS format - to make it possible for web bundlers (like webpack) to effectively perform tree-shaking.


import * as WarpSdk from 'warp-contracts';
import { Warp, Contract, ... } from 'warp-contracts'


const Warp = require('warp-contracts');
const { Warp, Contract, ... } = require('warp-contracts');

Using web bundles

Bundle files are possible to use in web environment only. Use minified version for production. It is possible to use latest or specified version.

<!-- Latest -->
<script src=""></script>

<!-- Latest, minified-->
<script src=""></script>

<!-- Specific version -->
<script src=""></script>

<!-- Specific version, minified -->
<script src=""></script>

All exports are stored under warp global variable.

const warp = warp.WarpFactory.forMainnet();

Web bundlers and meta-frameworks

Different meta-frameworks (like Next.js, Vite) and web-bundlers (like webpack 4,5, esbuild, etc.) have different requirements re. code packaging.


Examples of using the Warp Contracts SDK with different meta-frameworks and web bundles are available here.