Virtuals G.A.M.E NodeJS Implementation

Eval Engine Plugin Javascript SDK For Virtual Game Node

Overview

The Eval Engine Plugin is a TypeScript/JavaScript SDK for integrating Twitter functionalities with content evaluation capabilities. It's built on top of the Virtuals Protocol game framework and uses the Eval SDK for content evaluation.

Changelog

0.1.0 https://github.com/game-by-virtuals/game-node/pull/19arrow-up-right

Features

  • All evaluation results of reply tweets are logged in EvalEngine

  • The evaluation results are then piped into the reply tweet function to determine whether to post the tweet or not

Installation

Setup Chromia Private Key: Guidearrow-up-right

To install the plugin, use npm or yarn:

or

Key Components

TwitterPlugin

The main class that handles Twitter integration with content evaluation. It provides several key capabilities:

  • Tweet posting and interaction

  • Content evaluation before posting

  • Score-based filtering

  • Twitter metrics tracking

Core Features

  1. Content Evaluation

  • Uses

EvaClient

for evaluating tweet content

  • Implements threshold scoring system

  • Validates content before posting

  1. Twitter Functions

  • Search tweets

  • Post tweets

  • Reply to tweets

  • Like tweets

  • Quote tweets

Usage Example

Available Functions

1. Search Tweets

2. Reply to Tweet

3. Post Tweet

4. Like Tweet

5. Quote Tweet

Configuration

The plugin accepts the following configuration options:

Error Handling

The plugin implements comprehensive error handling through

ExecutableGameFunctionResponse

with appropriate status codes and error messages.

Dependencies

  • @virtuals-protocol/game

  • eval-engine-sdk

  • twitter-api-v2

License

MIT License

Last updated