Cookbook Community Meetup - 12pm ET / 5pm GMT every week on Wednesdays



Contributors: Luke Cassady-Dorion, Tom Wilson
Last Updated:

Warp (SmartWeave) SDK Intro

Warp is a popular SmartWeave Protocol SDK. With Warp and Irys your SmartWeave deployments and interactions can be extremely fast.


This guide is a short introduction to the Warp SDK and some of its API methods, if you want to learn more about SmartWeave Contracts in general visit Core Concepts: SmartWeave.


You can find the Warp SDK on githubopen in new window. For a deeper dive on Warp SmartWeave visit Warp Websiteopen in new window

To use the SDK on the server, you will need access to a wallet.json file, to use the SDK in the browser you will need to connect to an arweave supported wallet.


To install warp in your project you can use npm or yarn or other npm clients.

npm install warp-contracts
yarn add warp-contracts


When using Warp with your project there are several ways to import the sdk depending on your project setup.

import { WarpFactory } from "warp-contracts";
import { WarpFactory } from "warp-contracts/mjs";
const { WarpFactory } = require("warp-contracts");

Connecting to an environment

There are several environments that you may want to interact with, you can connect to those environments using the forXXXX helpers.

const warp = WarpFactory.forMainnet();
const warp = WarpFactory.forTestnet();
const warp = WarpFactory.forLocal();
const warp = WarpFactory.custom(
	arweave, // arweave-js
	cacheOptions, // { ...defaultCacheOptions, inMemory: true}
	environment, // 'local', 'testnet', 'mainnet'


When using local environment, you will need to have arLocal running on port 1984.


This intro guide is to help you get setup with Warp, the following guides will show you how to deploy SmartWeave contracts using the Warp SDK, how to interact with those contracts and finally, how to evolve SmartWeave contracts.