Skip to content

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

plugin-fizzl

plugin-fizzl

Watch: an Eliza agent using plugin-fizzl (39 s)

▶ Watch the 39-second video: install, then an agent answers "which coins are bullish on the 4h?" and "where would the stop go?", paying per call.

ElizaOS plugin that gives your agent 10 paid tools for crypto: ranked trade setups across 148 coins, trading signals, a market scan, price levels with stop and targets, and safety checks before it signs or pays. Your agent pays per call in USDC on Solana or Base over x402: no API keys, no accounts, no subscriptions.

You:   What should I trade on the 4h? Top 3.
Agent: Trade setups 4h: 44 in 147 coins (31 long · 13 short; R/R ≥ 1.5)
       1. FIL LONG · entry 1.1323 · stop 1.1012 · targets 1.1993 / 1.2585 · R/R 2.15 (6 of 6 indicators bullish)
       2. KMNO LONG · entry 0.04987 · stop 0.048255 · targets 0.053802 / 0.055767 · R/R 2.43 (6 of 6 indicators bullish)
       3. JST LONG · entry 0.12271 · stop 0.12146 · targets 0.12517 / 0.12759 · R/R 1.97 (6 of 6 indicators bullish; …)
       Paid via x402: https://solscan.io/tx/…

You:   Which coins are bullish on the 4h?
Agent: Market scan 4h: 98 of 148 coins bullish (98 bullish · 21 neutral · 29 bearish)
       Bullish (98): QNT +18.8% · XPL +16.1% · BP +15.7% · ONDO +14.1% · USELESS +8.94% · …
       % = price distance above (+) or below (−) the Ichimoku cloud. Not trade advice.
       Paid via x402: https://solscan.io/tx/…
Action Service What it does Price Pays on
FIZZL_TRADE_SETUPS Ichimoku Signal Which coins have a trade setup now: for 148 top-200 coins the six-indicator signal plus entry, stop, two targets and risk/reward, ranked best first, with each coin's liquidity rank by global trading volume (thin coins rank lower); "long only", "R/R 2", "top 5", "liquid" (the 30 most traded coins) or "50 most traded" and the interval come from the question (default 4h) $0.50 Solana or Base
FIZZL_ICHIMOKU_SIGNAL Ichimoku Signal Live Ichimoku Cloud signal for a crypto pair: bullish/bearish/neutral, cloud position, tenkan/kijun cross and all line values $0.02 Solana or Base
FIZZL_CONFLUENCE_SIGNAL Ichimoku Signal Six indicators in one call (Ichimoku, RSI, MACD, EMA 50/200, Bollinger, volume), each with a vote, plus a combined signal and confidence $0.15 Solana or Base
FIZZL_PRICE_LEVELS Ichimoku Signal Support/resistance, ATR, and a long/short plan with stop, two targets and risk/reward (levels, not advice) $0.05 Solana or Base
FIZZL_MARKET_SCAN Ichimoku Signal The Ichimoku signal for 148 top-200 coins at once, strongest bullish first, with market breadth; "which coins are bearish" filters $0.10 Solana or Base
FIZZL_CHECK_WALLET_APPROVALS PlainText Checks an EVM wallet's live token/NFT approvals and explains the risk: SAFE / CAUTION / RISK $0.10 Solana or Base
FIZZL_EXPLAIN_APPROVAL PlainText Explains a pasted approval/permission JSON in plain language with a verdict $0.05 Solana or Base
FIZZL_PREFLIGHT_X402 x402 Doctor Before paying an unknown x402 endpoint: GO / CAUTION / NO-GO, the recommended payment option and why (would not settle, over your budget, charges more than advertised, not HTTPS, unknown token). Never pays the endpoint itself $0.001 Solana or Base
FIZZL_PRESIGN_CHECK presign-guard Before signing a transaction, token approval or EIP-712 signature (Permit, Permit2, Seaport, x402 payment): GREEN / ORANGE / RED with reason codes, for who gets access and for the token itself (honeypots, fake tokens such as a fake USDC). Only sign on green, ask a person on orange, never sign on red. Add "explain" (optionally "in Dutch") for a plain-language explanation $0.01 ($0.03 explained) Base
FIZZL_DIAGNOSE_X402 x402 Doctor Diagnoses why an x402 paid endpoint fails (challenge, accepts[], Solana settlement, Bazaar/OpenAPI discovery, paywall) with a fix hint per check. Never pays the endpoint itself $0.01 Solana or Base

A FIZZL_SERVICES provider tells the agent which of these tools it has and which wallets pay for them.

Install

npm install plugin-fizzl        # or: npm install github:Fizzl13/plugin-fizzl
import { fizzlPlugin } from "plugin-fizzl";

export const character = {
  name: "TraderBot",
  plugins: ["plugin-fizzl"],          // or pass fizzlPlugin in a project's agent plugins
  settings: {
    secrets: {
      SVM_PRIVATE_KEY: process.env.SVM_PRIVATE_KEY,   // Solana wallet with USDC
      EVM_PRIVATE_KEY: process.env.EVM_PRIVATE_KEY,   // Base wallet with USDC
    },
  },
};

Settings

Setting Required Default Purpose
SVM_PRIVATE_KEY for Solana – Solana secret key (base58 export, or the CLI's JSON byte array) with USDC. No SOL needed: the facilitator pays the fee.
EVM_PRIVATE_KEY for Base – EVM private key (0x…) with USDC on Base. No ETH needed: payments are gasless EIP-3009 signatures.
FIZZL_MAX_PAYMENT_USD no 0.50 The agent refuses any single payment above this (trade setups cost $0.50; set 0.25 to allow everything else).
SOLANA_RPC_URL no public mainnet RPC RPC used to build Solana payments; the public one rate-limits.
ICHIMOKU_SIGNAL_URL, PLAINTEXT_URL, X402_DOCTOR_URL, PRESIGN_GUARD_URL no live services Point at another deployment.
FIZZL_VERIFY_RECEIPTS no require Check the signed receipt on every x402 Doctor and presign-guard answer; off skips it.
FIZZL_DOCTOR_SIGNERS, FIZZL_PRESIGN_SIGNERS no the published signers Comma-separated pinned signer addresses (for another deployment).
FIZZL_RECEIPT_AUTHORITY no the Fizzl payout wallet Wallet whose certificates also make a signer trusted, so a rotated key keeps working; none accepts only the pinned signers.

With both keys configured, services that accept both are paid on Solana. presign-guard is paid on Base only, so it needs EVM_PRIVATE_KEY. Use a dedicated wallet holding only what the agent may spend; the spend cap limits a single payment, not the total.

Signed verdicts

x402 Doctor and presign-guard sign every paid answer (EIP-191 over canonical JSON, with the request inside the signed body). The preflight, diagnose and presign actions check that signature before the agent uses the verdict:

  • signed by the service's published signer, pinned in the plugin: x402 Doctor 0xAaE66eF9Ee234397df33901568c8FBc36d43277d, presign-guard 0xf084Ea47Ca4D99BB4De3ECB0332b316bE6521EaE;
  • for exactly the request the agent sent (endpoint and budget, or the transaction or signature to check).

Key rotation: a service can change its signing key without a plugin update. The Fizzl payout wallet (0x6B0F4651eD42893ab58139938175E4a69f175F25, the payTo of every payment) certifies each key, and the certificate travels inside the receipt; the plugin accepts a key that is pinned or certified for that service.

A valid answer ends with "Signed by x402 Doctor ✓" (or presign-guard). A changed, unsigned or foreign answer, or one for another request, is not used: the action fails with "Do not pay on it" or "Do not sign until it can be checked".

What the agent understands

  • “What does the Ichimoku cloud say for SOL/USDT on the 4h?” → SOL-USDT, 4h
  • “Is $JUP above the cloud on the daily?” → JUP-USDT, 1d
  • “RSI, MACD and the other indicators for ETH on the 4h?” → confluence, ETH-USDT, 4h
  • “Where are support and resistance for BTC, and where would the stop go?” → price levels, BTC-USDT
  • “Scan the market on the daily: which coins are strongest?” → market scan, 1d
  • “Which coins are bearish on the 4h?” → market scan, 4h, bearish only
  • “Are the NFT approvals on 0x6B0F…5F25 safe on arbitrum?” → wallet check, arbitrum, nft
  • “Is this approval safe? json {…}” → explain the payload
  • “Is it safe to sign this? {"primaryType":"Permit","domain":{…},"message":{…}}” → presign check of the typed data (chain from domain.chainId); a transaction { "to", "data", "value", "chainId" } works too

Check before signing, in code

FIZZL_PRESIGN_CHECK also works as a guard in your own signing path:

import { FizzlClient, presignCheck } from "plugin-fizzl";

const client = await FizzlClient.create({ evmPrivateKey: process.env.EVM_PRIVATE_KEY });
const urls = { ichimoku: "", plaintext: "", doctor: "", presign: "https://presign-guard.fizzl.eu" };

const check = await presignCheck(client, urls, {
  request: { type: "signature", chainId: 8453, typedData },   // what you are about to sign
  explain: false,
  lang: "en",
});
if (!check.ok || check.data?.verdict !== "green") throw new Error("Not signing: " + (check.data?.verdict ?? check.error));

An error (presign-guard or a data source down) returns no verdict and costs nothing: treat it as "do not sign yet".

The LLM can also pass parameters directly (pair, interval; address, chain, kind; data; typedData, transaction or request, explain, lang), which take precedence over what is parsed from the message. Replies include the settlement transaction (Solscan/Basescan), and the action result carries the structured response in data and the verdict/signal in values for chained actions.

Development

npm install
npm test          # builds, then runs the tests

The tests pay fixture x402 services that behave like the live ones and verify every payment the way a facilitator does: the payer's Ed25519 signature on the Solana transaction and the EIP-3009 signature on Base. They cover network preference, the spend cap, rejected payments, missing wallets, message parsing and validate.

Releasing

Publishing runs in GitHub Actions (.github/workflows/publish.yml) and needs an NPM_TOKEN repository secret: an npm granular access token with read and write access to packages.

  1. Bump version in package.json and merge to main.
  2. Tag that commit and push the tag (git tag v0.1.1 && git push origin v0.1.1), or run "Publish to npm" from the Actions tab on main.

The workflow checks that the tag matches the version, runs the tests and publishes.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages