GitHub - charlesms1246/minty: Autonomous cryptocurrency tipping for Rumble creators — powered by Tether WDK and AI. · GitHub
Skip to content

charlesms1246/minty

Repository files navigation

Minty

Minty

Autonomous cryptocurrency tipping for Rumble creators — powered by Tether WDK and AI.

Minty is a Chrome Extension (Manifest V3) that watches your Rumble sessions and automatically sends on-chain crypto tips to creators based on rules you define. Set it once, and Minty handles everything: detecting creators, tracking watch time, running AI-powered decisions, and broadcasting real blockchain transactions — no clicks required.

Chrome MV3 Tether WDK


Features

  • Autonomous tipping — no interaction needed after setup; tips fire automatically when watch time thresholds are met
  • Rule engine — per-creator or wildcard rules with configurable rate/min, min watch time, max tip, token, and network
  • AI reasoning — optional LLM layer (OpenAI, Anthropic, Gemini, Ollama) that adjusts tip amounts and can veto low-confidence decisions
  • Real on-chain transactions — uses the official Tether WDK; no mocking
  • Multi-network — Ethereum (Sepolia), Polygon (Amoy), Arbitrum Sepolia, Bitcoin testnet
  • Multi-token — USDT, USAT (Alloy Dollar), XAUT (Tether Gold), BTC
  • Budget guards — daily spending cap + per-session cap with midnight resets
  • Companion website — full analytics dashboard, leaderboard, and streamer profiles bundled inside the extension

Architecture Overview

┌──────────────────────────────────────────────────────────────┐
│  rumble.com (any video page)                                  │
│                                                               │
│  ┌─────────────────────────────────────────────────────────┐ │
│  │  content.js  (content script, injected by manifest)     │ │
│  │                                                         │ │
│  │  1. Detects video element & creator name                │ │
│  │  2. Extracts creator wallet via silent 3-step HTMX fetch│ │
│  │  3. Tracks real watch time (play/pause/seek events)     │ │
│  │  4. Reports to background every 30 seconds              │ │
│  │  5. Shows "Minty Active" badge overlay on player        │ │
│  │  6. Displays tip notification when a tip fires          │ │
│  └──────────────────────┬──────────────────────────────────┘ │
└─────────────────────────┼────────────────────────────────────┘
                          │  chrome.runtime.sendMessage
                          │  WATCH_UPDATE / VIDEO_ENDED / CREATOR_DETECTED
                          ▼
┌──────────────────────────────────────────────────────────────┐
│  background.js  (service worker — persistent orchestrator)    │
│                                                               │
│  handleWatchUpdate()                                          │
│    │                                                          │
│    ├──► agent.shouldTip()  ──────────────────────────────┐   │
│    │         (7-step decision pipeline)                   │   │
│    │                                                      │   │
│    └──► executeTip()  ◄────────── decision: shouldTip    │   │
│              │                                            │   │
│              ├──► wallet.sendTip()   (Tether WDK)         │   │
│              ├──► storage.addTipRecord()                  │   │
│              ├──► storage.addDailySpending()              │   │
│              ├──► chrome.tabs.sendMessage(TIP_SENT)       │   │
│              └──► chrome.action.setBadgeText()            │   │
│                                                           │   │
│  agent.js ─────────────────────────────────────────────── ┘   │
│    │  Rule Engine + AI Reasoning + Spending Guardian           │
│    └──► Optional LLM call (OpenAI / Anthropic / Gemini /       │
│         Ollama) for confidence scoring & amount adjustment      │
│                                                               │
│  wallet.js                                                    │
│    └──► Tether WDK (WalletManagerEvm / WalletManagerBtc)      │
│         Real BIP-39 HD wallet. Real on-chain transfers.        │
│                                                               │
│  storage.js                                                   │
│    └──► chrome.storage.local                                  │
│         settings / tipHistory / watchSessions /               │
│         dailySpending / tipRules / creatorCache               │
└──────────────────────────────────────────────────────────────┘
                          ▲
                          │  chrome.runtime.sendMessage
                          │  GET_STATS / CREATE_RULE / INIT_WALLET / ...
┌──────────────────────────────────────────────────────────────┐
│  popup/  (extension popup UI, 380×580px)                      │
│    popup.html / popup.css / popup.js                          │
│    4 tabs: Dashboard · Rules · History · Settings             │
└──────────────────────────────────────────────────────────────┘
                          │  chrome.tabs.create
                          ▼
┌──────────────────────────────────────────────────────────────┐
│  website/  (companion web app, bundled in extension package)  │
│    index.html       — landing page (works standalone)         │
│    dashboard.html   — personal analytics + charts             │
│    leaderboard.html — creator ranking from tip history        │
│    streamer.html    — per-creator profile search              │
│    css/ js/         — vanilla JS, canvas charts, no framework │
└──────────────────────────────────────────────────────────────┘

Auto-Tip Decision Pipeline

Every 30 seconds while video plays:
┌─────────────────────────────────────────┐
│  WATCH_UPDATE received                  │
│  watchMinutes = watchSeconds / 60       │
└────────────────┬────────────────────────┘
                 │
                 ▼
         ┌───────────────┐
         │ Already tipped │──YES──► skip (quiet)
         │  this session? │
         └───────┬───────┘
                 │ NO
                 ▼
         ┌───────────────┐
         │ Creator address│──NO───► skip (quiet)
         │   detected?   │
         └───────┬───────┘
                 │ YES
                 ▼
         ┌───────────────┐
         │ Matching rule  │──NO───► skip
         │    exists?    │
         └───────┬───────┘
                 │ YES
                 ▼
         ┌───────────────────────────────┐
         │ watchMin ≥ minWatchMinutes?    │──NO──► skip (quiet)
         └───────┬───────────────────────┘
                 │ YES
                 ▼
         ┌────────────────────────────────────────────┐
         │ amount = min(watchMin × rate, maxTipAmount) │
         └───────┬────────────────────────────────────┘
                 │
                 ▼
         ┌──────────────────────────────────────┐
         │ todaySpent + amount ≤ maxDailySpend?  │──NO──► skip (logs budget info)
         └───────┬──────────────────────────────┘
                 │ YES
                 ▼
         ┌────────────────────────┐
         │  AI enabled?           │──NO──────────────────────────┐
         └───────┬────────────────┘                              │
                 │ YES                                           │
                 ▼                                               │
         ┌──────────────────────────────────────────────┐       │
         │  LLM call → { shouldTip, confidence,         │       │
         │    adjustedAmount, reasoning, sentiment }     │       │
         │                                               │       │
         │  confidence < 0.3 AND shouldTip=false?       │       │
         │  └──► veto                                    │       │
         │                                               │       │
         │  LLM failure? → non-blocking fallback         │       │
         └───────┬───────────────────────────────────────┘       │
                 │                                               │
                 └────────────────────┬──────────────────────────┘
                                      │
                                      ▼
                    ┌─────────────────────────────────────┐
                    │  executeTip()                        │
                    │                                      │
                    │  1. Double-check daily budget        │
                    │  2. wallet.sendTip() → Tether WDK   │
                    │  3. storage.addTipRecord()           │
                    │  4. storage.addDailySpending()       │
                    │  5. TIP_SENT → badge on video page   │
                    │  6. Badge text = total tip count     │
                    └─────────────────────────────────────┘

Creator Wallet Extraction

Rumble uses HTMX — wallet addresses only appear inside dynamically-fetched HTML fragments. Minty extracts them silently via a 3-step fetch chain without opening any UI or modifying the DOM.

DOM: button[hx-get*="qr-modal"]
       │
       │ Step 1: htmxFetch(hx-get, hx-vals)
       ▼
   Tip modal HTML
   ├── Check hx-vals for address → found? ✓ DONE
   └── Find button[hx-get*="qr-address"]
              │
              │ Step 2: htmxFetch(hx-get, hx-vals)
              ▼
         Crypto network tabs HTML
         └── querySelectorAll('button[hx-vals*="address"]')
                    │
                    │ Step 3: Parse hx-vals JSON from each button
                    ▼
              Address priority:
              1st: blockchain=polygon + currency=usdt
              2nd: blockchain=polygon (any currency)
              3rd: any address found
              Fallback: regex scan (0x... or bc1...) in raw HTML

This chain depends on Rumble's current HTMX DOM structure. If wallet extraction breaks, start debugging at Step 1 by checking whether button[hx-get*="qr-modal"] still exists on video pages.


AI Agent

The AI layer is fully optional. If no credentials are configured, the agent runs in pure rule-based mode with no external calls.

How to enable:

  1. Open the popup → Dashboard → AI Agent section
  2. Select your provider and enter credentials
  3. Optionally specify a model override (blank = provider default)
  4. Click Connect AI Agent

What the AI does:

  • Receives watch context: creator, watch duration, base amount, rule parameters, daily budget, recent tip history
  • Returns a confidence score (0.0–1.0) and can adjust the tip amount (bounded by rule.maxTipAmount)
  • Vetoes the tip if confidence < 0.3 and shouldTip = false
  • AI failures are non-blocking — any error falls back to rule-based logic

Provider quick reference:

Provider Default model Credential needed
OpenAI gpt-4o-mini API key from platform.openai.com
Anthropic claude-haiku-4-5-20251001 API key from console.anthropic.com
Gemini gemini-2.5-flash-lite API key from aistudio.google.com
Ollama llama3.2 Local server URL (default: http://localhost:11434)

Supported Networks & Tokens

All networks are configured for testnet by default. Mainnet values are in .env.example.

Network Testnet RPC
Ethereum Sepolia https://1rpc.io/sepolia
Polygon Amoy https://rpc-amoy.polygon.technology
Arbitrum Sepolia https://sepolia-rollup.arbitrum.io/rpc
Bitcoin Testnet ElectrumWs
Token Full name Networks
USDT USD₮ (Tether Dollar) Ethereum, Polygon, Arbitrum
USAT USA₮ (Alloy Dollar) Ethereum
XAUT XAU₮ (Tether Gold) Ethereum
BTC Bitcoin Bitcoin

Getting Started

1. Clone and install

git clone https://github.com/charlesms1246/minty
cd minty
npm install

2. Build

npm run build

3. Load in Chrome

  1. Navigate to chrome://extensions
  2. Enable Developer mode (top-right toggle)
  3. Click Load unpacked
  4. Select the project root (the folder that contains manifest.json and extension/)

4. Set up your wallet

  1. Click the Minty icon in the toolbar → Settings → Wallet
  2. Click Generate New for a fresh wallet, or paste an existing seed phrase
  3. Click Initialize Wallet

Save your seed phrase — it is the only way to recover your wallet.

5. Fund your testnet wallet

6. Create your first rule

  1. Rules tab → fill in the form
  2. Recommended starting values: All Creators · $0.02/min · USDT · Polygon · 3 min min · $5 max
  3. Click Create Rule

7. Watch a Rumble video

Navigate to any video on rumble.com. The "Minty Active" badge appears in the top-right corner of the player. After the minimum watch time, a tip fires automatically.

8. (Optional) Connect an AI agent

Dashboard → AI Agent → select provider → enter API key → Connect AI Agent.


Mainnet Upgrade Guide

The extension ships in testnet mode. To switch to mainnet:

  1. src/wallet.js — replace RPC_PROVIDERS and TOKEN_CONTRACTS with the mainnet values documented in .env.example
  2. popup/popup.js — update getExplorerUrl() to mainnet explorers (polygonscan.com, etherscan.io, arbiscan.io, blockstream.info)
  3. wallet.js — update ElectrumWs endpoint to a mainnet Bitcoin Electrum server
  4. Security — implement proper seed phrase encryption before any mainnet use (see TODO in wallet.js)

Built for the Tether WDK Hackathon  ·  Powered by Tether WDK

About

Autonomous cryptocurrency tipping for Rumble creators — powered by Tether WDK and AI.

Resources

License

Stars

Watchers

Forks

Contributors