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-coingecko-maop-plugin

v0.1.0

Published

coingecko plugin for GAME SDK under questflow MAOP

Downloads

3

Readme

Coingecko Plugin for Virtuals Game

The Coingecko plugin seamlessly empowers G.A.M.E agents with cryptocurrency data fetching capabilities using the Coingecko API, enabling the retrieval of current market data without introducing any additional complexity.

Features

  • Fetch current cryptocurrency prices
  • Retrieve market data for various cryptocurrencies
  • Built-in error handling and status tracking

Available Functions

  1. fetchPrice: Retrieves the current price of a specified cryptocurrency

Installation

To install the plugin, use npm or yarn:

npm install @virtuals-protocol/game-coingecko-maop-plugin

or

yarn add @virtuals-protocol/game-coingecko-maop-plugin

Usage

Importing the Plugin

First, import the CoingeckoMAOPPlugin class from the plugin:

import CoingeckoMAOPPlugin from "@virtuals-protocol/game-coingecko-maop-plugin";

Setup environment variables

Set the following environment variables:

  • COINGECKO_MAOP_API_KEY: Create an API key by contact questflow.

Creating a Worker

Create a worker with the necessary questflow maop API client config:

const coingeckoMAOPPlugin = new CoingeckoMAOPPlugin({
  apiClientConfig: {
    apiKey: process.env.MAOP_GAME_PLUGIN_API_KEY,
  },
});

Creating an Agent

Create an agent and add the worker to it:

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

const agent = new GameAgent("GAME_API_KEY", {
  name: "Cryptocurrency Data Worker",
  goal: "Fetch the current price of Bitcoin.",
  description:
    "You are an AI agent specialized in fetching cryptocurrency data. You can retrieve current market data using the Coingecko API.",
  workers: [coingeckoMAOPPlugin.getWorker({})],
});

Running the Agent

Initialize and run the agent:

(async () => {
  // Optional: Set up logging
  agent.setLogger((agent, message) => {
    console.log(`-----[${agent.name}]-----`);
    console.log(message);
    console.log("\n");
  });

  await agent.init();

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

Example Worker Usage

Here's a simple example of using the worker directly:

const worker = coingeckoMAOPPlugin.getWorker({});

// The worker will automatically use the fetch_price function
// to retrieve the current price of Bitcoin
worker.run("retrieve the current price of Bitcoin");

Configuration Options

The plugin accepts the following configuration options when initializing:

interface ICoingeckoMAOPPluginOptions {
  id?: string; // Custom worker ID
  name?: string; // Custom worker name
  description?: string; // Custom worker description
  apiClientConfig: {
    apiKey?: string; // Questflow maop API key
    baseApiUrl?: string; // Custom API endpoint (optional)
  };
}

Development

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Set up environment variables:
export GAME_API_KEY="your-game-api-key"
export MAOP_GAME_PLUGIN_API_KEY="your-maop-game-plugin-api-key"
  1. Build the plugin:
npm run tsup
  1. Run the example:
ts-node examples/example.ts

or

npm run example
  1. Run special function example:
npm run coinDataByID