npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@virtuals-protocol/game-enso-plugin

v0.1.0

Published

The Enso action plugin allows your GAME agents to access 180+ protocols through Enso for onchain actions, such as swap, deposit, lend, borrow, etc

Readme

Enso Plugin for Virtuals Game

The Enso action plugin allows your GAME agents to access 180+ protocols through Enso for onchain actions, such as swap, deposit, lend, borrow, etc

Chains supported:

  • Ethereum
  • Optimism
  • BNB Chain
  • Gnosis
  • Polygon
  • ZkSync
  • Base
  • Arbitrum
  • Avalanche
  • Berachain

Example operations:

  • "Swap 15000 USDT to WETH"
  • "Withdraw aEthWBTC from Aave V3 for USDC"
  • "Deposit 10 ETH into stETH Curve pool"

Installation

To install the plugin, use npm or yarn:

npm install @virtuals-protocol/game-enso-plugin

or

yarn add @virtuals-protocol/game-enso-plugin

Usage

  1. Make sure the .env variables are set

Get your Enso API key here

WALLET_PRIVATE_KEY=
RPC_PROVIDER_URL=
ENSO_API_KEY=1e02632d-6feb-4a75-a157-documentation
  1. Import the getOnChainActionsWorker function from the plugin:
import { getEnsoWorker } from "@virtuals-protocol/game-enso-plugin";
  1. Setup up a wallet and public clients

Make sure to use the correct chain from viem/chains

Example for Base

import { Address, createPublicClient, createWalletClient, http } from "viem";
import { base } from "viem/chains";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as Address);

const publicClient = createPublicClient({
  transport: http(process.env.RPC_PROVIDER_URL),
  chain: base,
});

const walletClient = createWalletClient({
  account: account,
  transport: http(process.env.RPC_PROVIDER_URL),
  chain: base,
});
  1. Create the worker adding the wallet, public client and Enso API key
const ensoActionsWorker = await getEnsoWorker({
   wallet: walletClient,
   publicClient,
   apiKey: process.env.ENSO_API_KEY || "1e02632d-6feb-4a75-a157-documentation",
});
  1. Create an agent and add Enso worker to it:

Swap example on Ethereum:

import { GameAgent } from "@virtuals-protocol/game";

const agent = new GameAgent(process.env.GAME_API_KEY ?? "", {
   name: "Enso Actions Agent",
   goal: "Swap 100 0xdac17f958d2ee523a2206206994597c13d831ec7 (USDT) for 0x2260fac5e5542a773aa44fbcfedf7c193bc2c599 (WBTC)",
   description:
    "An agent that finds the best route between tokens and executes it",
   workers: [ensoActionsWorker],
});

Withdraw from Aave example on Ethereum:

import { GameAgent } from "@virtuals-protocol/game";

const agent = new GameAgent(process.env.GAME_API_KEY ?? "", {
   name: "Enso Actions Agent",
   goal: "Withdraw 1 0x5ee5bf7ae06d1be5997a1a72006fe6c607ec6de8 (aEthWBTC) for 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 (USDC)",
   description:
    "An agent that finds the best route between tokens and executes it",
   workers: [ensoActionsWorker],
});
  1. Initialize and run the agent:
(async () => {
  await agent.init();

  while (true) {
    await agent.step({
      verbose: true,
    });
  }
})();