DocsModules

Modules

Explore the module system and how to extend Wolvo with custom logic.

Modules are reusable units of logic that extend Wolvo's capabilities. They can process signals, transform data, connect to external services, or implement custom business logic.

Extensibility: Build once, use everywhere. Modules can be shared across workflows and even published to the module registry.

Module Types

Processor Module

Transform and process incoming data.

Data cleaning, formatting, aggregation

Connector Module

Connect to external APIs and services.

Fetch prices, send notifications, sync data

Analyzer Module

Analyze signals and generate insights.

Pattern detection, scoring, classification

Action Module

Perform actions based on workflow triggers.

Send alerts, update databases, trigger webhooks

Creating Modules

Create custom modules using the Wolvo SDK:

Basic Module Structure
import { WolvoModule } from '@wolvo/sdk'

export const priceAlertModule = new WolvoModule({
  name: 'price-alert',
  version: '1.0.0',
  type: 'analyzer',
  
  // Define input schema
  input: {
    token: { type: 'string', required: true },
    threshold: { type: 'number', required: true },
    direction: { type: 'enum', values: ['above', 'below'] }
  },
  
  // Define output schema
  output: {
    triggered: { type: 'boolean' },
    currentPrice: { type: 'number' },
    message: { type: 'string' }
  },
  
  // Module logic
  async handler(input, context) {
    const price = await context.services.getPrice(input.token)
    
    const triggered = input.direction === 'above'
      ? price > input.threshold
      : price < input.threshold
    
    return {
      triggered,
      currentPrice: price,
      message: triggered 
        ? `${input.token} is ${input.direction} ${input.threshold}`
        : null
    }
  }
})
Register & Deploy
// Register module
await client.modules.register(priceAlertModule)

// Deploy module
await client.modules.deploy('price-alert')

// Use in workflow
const workflow = await client.workflows.create({
  name: 'Price Monitor',
  trigger: { type: 'schedule', cron: '*/5 * * * *' },
  actions: [{
    type: 'module',
    id: 'price-alert',
    input: {
      token: 'SOL',
      threshold: 100,
      direction: 'above'
    }
  }]
})

Module Registry

Browse and install pre-built modules from the Wolvo registry:

@wolvo/price-feeds

Real-time price data from multiple sources.

2.3k installs

@wolvo/telegram-notify

Send notifications to Telegram channels.

1.8k installs

@wolvo/wallet-analyzer

Analyze wallet behavior and history.

1.2k installs

@wolvo/discord-webhook

Post messages to Discord webhooks.

980 installs
Install from Registry
// Install module
await client.modules.install('@wolvo/price-feeds')

// List installed modules
const modules = await client.modules.list()

// Update module
await client.modules.update('@wolvo/price-feeds')

Best Practices

Keep modules focused

Each module should do one thing well. Split complex logic into multiple modules.

Handle errors gracefully

Always wrap external API calls in try-catch and return meaningful error messages.

Use input validation

Define strict input schemas to catch errors early and provide clear feedback.

Document your modules

Include clear descriptions, examples, and changelog for each version.

Test thoroughly

Write unit tests for module logic before deploying to production.