FluxA-agent-wallet

v1.0.1

FluxA Agent Wallet integration via CLI. Enables agents to make x402 payments for paid APIs, send USDC payouts to any wallet, and create payment links to receive payments. Use when the user asks about crypto payments, x402, USDC transfers, payment links, or interacting with the FluxA Agent Wallet.

3· 1.8k·7 current·7 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the included files and functionality: a bundled Node CLI implements x402 payments, USDC payouts, and payment-links. The declared capabilities (x402, payout, payment links) are implemented by the bundled script and the markdown docs — nothing unrelated (e.g., cloud provider credentials, system-level access) is requested.
Instruction Scope
The SKILL.md tells the agent to run the included CLI and to open authorization URLs in the user's browser (after asking the user). It also instructs using curl against payment endpoints returned by payment links (expected for this workflow). This is within scope, but users should note the skill will POST/GET to remote wallet and agent-id endpoints and will ask the user to open external authorization URLs.
Install Mechanism
No install spec — the skill ships a bundled JS CLI included in the package. No downloads from arbitrary URLs or third-party package installs are specified, so install-level risk is low.
Credentials
The skill declares no required environment variables; the code accepts optional environment overrides (AGENT_ID_API, WALLET_API, WALLET_APP, and optionally AGENT_ID/AGENT_TOKEN/AGENT_JWT). Those env vars are appropriate for configuring which FluxA endpoints and credentials the CLI uses and are proportional to the stated purpose.
Persistence & Privilege
The skill is not forced-always, does not request system-wide changes, and does not claim to modify other skills. It can operate autonomously per platform defaults, but the CLI flow requires user authorization for payouts and mandate signing, which limits destructive autonomous actions.
Assessment
This skill appears coherent with its description, but review these points before installing: - Trust the endpoints: the CLI communicates with default domains like wallet.fluxapay.xyz, walletapi.fluxapay.xyz, agentid.fluxapay.xyz and a workers.dev host (fluxa-x402-api.gmlgtm.workers.dev). Confirm you trust those services or override them via env vars. - Authorization URLs: the skill will ask to open authorization/approval URLs in your browser. Only approve transactions or sign mandates you expect — mandates allow the agent to spend within the configured budget and time window. - Secrets: you can pre-set AGENT_ID / AGENT_TOKEN / AGENT_JWT to avoid interactive registration; do not expose these to untrusted environments. The skill will send JWTs and agent identifiers to the wallet/agent-id APIs (expected for operation). - Payouts require explicit user approval (per docs), but mandates allow autonomous x402 payments within limits — avoid creating overly large or long-lived mandates unless you trust the agent. - If unsure, run the CLI in an isolated environment or review the bundled JS source fully; the bundle is included so you can audit network calls and logic before use.

Like a lobster shell, security has layers — review code before you run it.

latestvk9748fk4m26y4zaajdc1db58y180wht8
1.8kdownloads
3stars
2versions
Updated 1mo ago
v1.0.1
MIT-0

FluxA Agent Wallet

FluxA Agent Wallet lets AI agents perform onchain financial operations — payments, payouts, and payment links — without managing private keys. All operations use the CLI (scripts/fluxa-cli.bundle.js).

Setup

The CLI bundle is located at scripts/fluxa-cli.bundle.js within this skill directory. It requires Node.js v18+.

node scripts/fluxa-cli.bundle.js <command> [options]

All commands output JSON to stdout:

{ "success": true, "data": { ... } }

Or on error:

{ "success": false, "error": "Error message" }

Exit code 0 = success, 1 = failure.

Capabilities

CapabilityWhat it doesWhen to use
x402 Payment (v3)Pay for APIs using the x402 protocol with intent mandatesAgent hits HTTP 402, needs to pay for API access
PayoutSend USDC to any wallet addressAgent needs to transfer funds to a recipient
Payment LinkCreate shareable URLs to receive paymentsAgent needs to charge users, create invoices, sell content

Prerequisites — Register Agent ID

Before any operation, the agent must have an Agent ID. Register once:

node scripts/fluxa-cli.bundle.js init \
  --email "agent@example.com" \
  --name "My AI Agent" \
  --client "Agent v1.0"

Or pre-configure via environment variables:

export AGENT_ID="ag_xxxxxxxxxxxx"
export AGENT_TOKEN="tok_xxxxxxxxxxxx"
export AGENT_JWT="eyJhbGciOiJ..."

Verify status:

node scripts/fluxa-cli.bundle.js status

The CLI automatically refreshes expired JWTs.

Opening Authorization URLs (UX Pattern)

Many operations require user authorization via a URL (mandate signing, payout approval, agent registration). When you need the user to open a URL:

  1. Always ask the user first using AskUserQuestion tool with options:

    • "Yes, open the link"
    • "No, show me the URL"
  2. If user chooses YES: Use the open command to open the URL in their default browser:

    open "<URL>"
    
  3. If user chooses NO: Display the URL and ask how they'd like to proceed.

Example interaction flow:

Agent: I need to open the authorization URL to sign the mandate.
       [Yes, open the link] [No, show me the URL]

User: [Yes, open the link]

Agent: *runs* open "https://agentwallet.fluxapay.xyz/onboard/intent?oid=..."
Agent: I've opened the authorization page in your browser. Please sign the mandate, then let me know when you're done.

This pattern applies to:

  • Mandate authorization (authorizationUrl from mandate-create)
  • Payout approval (approvalUrl from payout)
  • Agent registration (if manual registration is needed)

Quick Decision Guide

I want to...Document
Pay for an API that returned HTTP 402X402-PAYMENT.md
Pay to a payment link (agent-to-agent)PAYMENT-LINK.md — "Paying TO a Payment Link" section
Send USDC to a wallet addressPAYOUT.md
Create a payment link to receive paymentsPAYMENT-LINK.md — "Create Payment Link" section

Common Flow: Paying to a Payment Link

This is a 6-step process using CLI:

1. PAYLOAD=$(curl -s <payment_link_url>)                    → Get full 402 payload JSON
2. mandate-create --desc "..." --amount <amount>            → Create mandate (BOTH flags required)
3. User signs at authorizationUrl                           → Mandate becomes "signed"
4. mandate-status --id <mandate_id>                         → Verify signed (use --id, NOT --mandate)
5. x402-v3 --mandate <id> --payload "$PAYLOAD"              → Get xPaymentB64 (pass FULL 402 JSON)
6. curl -H "X-Payment: <token>" <url>                       → Submit payment

Critical: The --payload for x402-v3 must be the complete 402 response JSON including the accepts array, not just extracted fields.

See PAYMENT-LINK.md for the complete walkthrough with examples.

Amount Format

All amounts are in smallest units (atomic units). For USDC (6 decimals):

Human-readableAtomic units
0.01 USDC10000
0.10 USDC100000
1.00 USDC1000000
10.00 USDC10000000

CLI Commands Quick Reference

CommandRequired FlagsDescription
status(none)Check agent configuration
init--email, --nameRegister agent ID
mandate-create--desc, --amountCreate an intent mandate
mandate-status--idQuery mandate status (NOT --mandate)
x402-v3--mandate, --payloadExecute x402 v3 payment
payout--to, --amount, --idCreate a payout
payout-status--idQuery payout status
paymentlink-create--amountCreate a payment link
paymentlink-list(none)List payment links
paymentlink-get--idGet payment link details
paymentlink-update--idUpdate a payment link
paymentlink-delete--idDelete a payment link
paymentlink-payments--idGet payment records for a link

Common Mistakes to Avoid:

WrongCorrect
mandate-create --amount 100000mandate-create --desc "..." --amount 100000
mandate-status --mandate mand_xxxmandate-status --id mand_xxx
x402-v3 --payload '{"maxAmountRequired":"100000"}'x402-v3 --payload '<full 402 response with accepts array>'

Environment Variables

VariableDescription
AGENT_IDPre-configured agent ID
AGENT_TOKENPre-configured agent token
AGENT_JWTPre-configured agent JWT
AGENT_EMAILEmail for auto-registration
AGENT_NAMEAgent name for auto-registration
CLIENT_INFOClient info for auto-registration
FLUXA_DATA_DIRCustom data directory (default: ~/.fluxa-ai-wallet-mcp)
WALLET_APIWallet API base URL (default: https://walletapi.fluxapay.xyz)
AGENT_ID_APIAgent ID API base URL (default: https://agentid.fluxapay.xyz)

Comments

Loading comments...