New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

twinkle-sdk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twinkle-sdk

Gasless payments for AI agents using MNEE. SDK for the x402 protocol with USDC-to-MNEE bridge support.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

✨ Twinkle SDK: The Universal MNEE Adoption Engine

Powering Agentic Commerce with Gasless MNEE Settlement & Native Monetization.

Twinkle is an Institutional-Grade SDK for the x402 (Payment Required) ecosystem. It provides AI agents with the ability to discover, negotiate, and settle payments gaslessly using MNEE (The Agentic Stablecoin), while offering a seamless "Universal Bridge" for legacy USDC users.

🏛️ Institutional Architecture

Twinkle Architecture

⚡ Key Advantages

FeatureTwinkle (MNEE)Traditional (USDC)
Gas CostGasless (Facilitator Covered)Heavy (Approval + Transfer)
UX FlowAtomic (Signature only)Complex (Multi-step)
MonetizationNative 5% Dev FeeManual/Social Layer
OnboardingInstant Bridge (USDC/MNEE)Friction-Heavy
LoyaltyAutomated RebatesNone

🔗 The Universal Bridge (Swap-Relay)

Twinkle features a first-of-its-kind Universal Bridge that captures legacy USDC traffic and settles natively in MNEE. When a service provider requests USDC, the SDK provides the agent with a "Migration Quote"—showing the gas savings and loyalty rebates gained by switching to MNEE.

The Swap-Relay Sequence

sequenceDiagram
    participant Agent as AI Agent (USDC Only)
    participant SDK as Twinkle SDK
    participant Fac as Facilitator
    participant DEX as Uniswap V3
    participant Provider as Provider (MNEE)

    SDK->>Agent: "Detected USDC request. Switch for $2.50 savings?"
    Agent->>SDK: Signs USDC Permit2 Intent
    SDK->>Fac: Signed Intent + Conversion Meta
    Fac->>Fac: Pull USDC via Permit2
    Fac->>DEX: Atomic Swap (USDC -> MNEE)
    Fac->>Provider: Settle MNEE Payment
    Fac->>Agent: Send MNEE Rebate (Adoption Reward)

🛠️ Implementation Guide

1. Build the Agent

Initialize the TwinkleAgent with your developer address to start earning 5% fees automatically.

const agent = new TwinkleAgent({
  privateKey: process.env.AGENT_KEY,
  developerAddress: "0xYourDevWallet",
  autoSwitch: true, // Enable the Adoption Engine
});

2. Settle Gaslessly

Simply call any x402-enabled API. The SDK handles the 402 redirects and Permit2 signing.

const result = await agent.fetch("https://premium-agent-service.com/api");

3. Deploy the Server

Gate your AI services with the TwinkleServer middleware.

app.get("/api/resource", twinkleServer.middleware(), (req, res) => {
  res.json({ message: "Content Unlocked via Gasless MNEE" });
});

💎 Developer Monetization

Twinkle enforces a native 5% developer fee split on all transactions.

  • Provider: Receives 95% of the service price.
  • Developer: Receives 5% royalty for building the agent/integration.
  • Agent: Receives a gasless experience + optional loyalty rebates.

📜 License & Ecosystem

Built for the x402 Protocol and the MNEE Ecosystem. ISC License | Powered by Twinkle Facilitators

Keywords

x402

FAQs

Package last updated on 05 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts