New:Socket for Asana Is Now Available.Learn more
Get Started

@yolfi/agent

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yolfi/agent

Thin SDK, CLI, and MCP adapter that lets AI coding agents integrate Yolfi payments.

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
61
-19.74%
Maintainers
1
Weekly downloads
 
Created
Source

Yolfi Agent

Thin SDK, CLI, and MCP adapter for AI coding agents that add Yolfi crypto payments to user apps.

This package does not create a second Yolfi API. It maps agent actions to the existing Yolfi endpoints:

Agent actionEndpoint
Register workspacePOST /api/auth/agent/register
Check accountGET /api/private/organization/current
Configure organization/webhooks/settlementPUT /api/private/organization/current
Create paylinkPOST /api/private/paylinks/create
List paylinksGET /api/private/paylinks
Create paymentPOST /api/public/payments
Payment statusGET /api/public/payments/:id

Install

npx -y @yolfi/agent help

Register Agent Workspace

yolfi auth:agent-register \
  --project-name "Space Shop" \
  --agent-name "Codex" \
  --integration-intent accept_payments \
  --ref npm

The returned apiKey is shown once. Store it in an ignored env file as YOLFI_API_KEY.

MCP

{
  "mcpServers": {
    "yolfi-api": {
      "command": "npx",
      "args": ["-y", "@yolfi/agent", "mcp"],
      "env": {
        "YOLFI_API_KEY": "..."
      }
    },
    "yolfi-knowledge": {
      "command": "npx",
      "args": ["-y", "@yolfi/agent", "mcp"]
    }
  }
}

Safety Rules

  • Ask the user for settlement wallet addresses.
  • Ask the user for product names, price, currency, and recurring interval.
  • Do not commit YOLFI_API_KEY.
  • Do not treat redirects as payment confirmation.
  • Verify X-Yolfi-Signature on webhook payloads.
  • List existing paylinks before creating another paylink after a timeout.
  • Require explicit user approval before disabling paylinks.

Webhook Verification

Yolfi signs the raw JSON payload with HMAC-SHA256 base64 using X-Yolfi-Signature. In v1 the signing secret is the organization API key.

import { verifyWebhookSignature } from '@yolfi/agent';

const valid = verifyWebhookSignature(rawBody, signature, process.env.YOLFI_API_KEY);

Keywords

mcp

FAQs

Package last updated on 16 Jun 2026

Related posts