Skip to content

firstbatchxyz/warp-plugins

Repository files navigation

Custom Warp Contracts Plugins

This is a monorepo that includes all the FirstBatch custom warp plugins and examples.

Installation

yarn add warp-contracts-plugin-fetch
yarn add warp-contracts-plugin-snarkjs

Usage

All you need to do is import the plugin as you normally do with packages installed with npm or yarn.

import { WarpFactory } from "warp-contracts";
import { FetchExtension } from "warp-contracts-plugin-fetch";

const warp = WarpFactory.forMainnet().use(new FetchExtension());

You can cascade the plugins (use multiple plugins) like this,

const warp = WarpFactory.forMainnet()
  .use(new FetchExtension())
  .use(new SnarkjsExtension());

Check the example folder for example usage.