Skip to content

feat(python): Add WarpPay402 Micropayment Plugin & Oracle Suite - #14613

Open
golfgolfgolf200 wants to merge 2 commits into
microsoft:mainfrom
Warppay402:feat/python-warppay402-plugin
Open

golfgolfgolf200 wants to merge 2 commits into
microsoft:mainfrom
Warppay402:feat/python-warppay402-plugin

Conversation

@golfgolfgolf200

@golfgolfgolf200 golfgolfgolf200 commented Oct 16, 2026 •

Copy link
Copy Markdown

Motivation and Context

This PR introduces the WarpPay402Plugin for Semantic Kernel in Python, enabling enterprise AI developers and their autonomous agents to programmatically query and execute pay-per-use Oracles, Web3 utilities, and real-time data feeds monetized via the open x402 V2 protocol.

Description

Adds the WarpPay402Plugin native plugin under python/samples/concepts/plugins/warppay402_plugin/. It bridges Semantic Kernel agents to 29 pay-per-use Oracles and M2M capabilities without requiring pre-registered API keys or manual subscription setups. Payments are settled on-the-fly via HTTP 402 Payment Required challenges.

Key Capabilities

  • Zero Native Gas Requirement (ERC-7677 Sponsorship): Built-in support for gasless execution via an ERC-7677 Paymaster on Base Mainnet. Agents without native ETH can execute tools and sponsor gas fees directly using USDC.
  • Stateless x402 Payment Protocol: Native, non-blocking handling of x402 HTTP 402 payment challenges. Payment authorizations are signed on-the-fly and verified instantly alongside the tool call.
  • Multi-Chain Asset Settlement: Flexible settlement options supporting USDC on Base Mainnet (eip155:8453), Solana Mainnet (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp), Arbitrum One (eip155:42161), and Arc Mainnet (eip155:5042).
  • Self-Hosted Infrastructure: Operates entirely on self-hosted facilitator nodes, eliminating third-party relayer dependencies to minimize latency and transaction overhead.

Complete Oracle & Tool Capabilities (29 Total)

Category Tool / Endpoint Description Price (USDC)
Data Feeds public_data_feed Public attestation data feed JSON records. $0.0001
data_feeds Pre-scraped AI market data feeds and yield reports. $0.0010
Web & Content Extraction web_scraper Scrapes webpage HTML into clean Markdown. $0.0010
browser_scraper Unblockable Chromium JS-rendering proxy scraper. $0.0050
pdf_extractor Downloads and parses plain text from public PDF URLs. $0.0050
render_screenshot Captures full-page rendered PNG web screenshots. $0.0100
extract_json Extracts structured JSON schema data from web pages. $0.0100
DeFi & Liquidity Engine get_aerodrome_yields Fetches live Aerodrome DEX yield pools, APYs, and TVL. $0.0030
aerodrome_swap Executes low-slippage token swaps via Aerodrome Router. $0.0100
aerodrome_clamm Manages Aerodrome Slipstream concentrated liquidity positions. $0.0100
aerodrome_veaero Automates $AERO locking, gauge voting, and bribe harvesting. $0.0100
Real-World Infrastructure outage_oracle Resolves real-time power grid, ISP, and cell tower outages by ZIP. $0.0020
weather_oracle Live atmospheric conditions and drone flight safety clearances. $0.0010
address_normalizer Standardizes address strings and returns lat/lon coordinates. $0.0010
shipping_rate_estimator Calculates ground, priority, and express USPS parcel rates. $0.0010
forex_oracle Real-time global foreign exchange fiat spot rates (EUR, GBP, JPY). $0.0005
Real Estate & Analytics real_estate_calculator Calculates NOI, Cap Rate, Monthly Cash Flow, and DSCR ratios. $0.0005
property_comps_estimator Market valuations, price-per-sqft comps, and property taxes. $0.0050
E-Commerce & Catalog ucp_deals_oracle Searches UCP merchant product catalogs and checkout links. $0.0010
Blockchain Analytics base_analytics Fetches Base Mainnet 0x wallet balances, nonces, and stats. $0.0020
arc_analytics Arc Mainnet block height, gas prices, and RPC metrics. $0.0010
arc_network_oracle_query Pre-flight Arc telemetry: RPC latency (ms), gas, balance, nonce. $0.1000
arc_dex_oracle Real-time ETH/USDC spot price resolver for Arc Mainnet. $0.0010
smart_contract_verifier Source code analysis, ABI fetching, and proxy validation. $0.0200
Cross-Chain & Contracts arc_cctp_bridge Bridges USDC cross-chain from Arc Mainnet via Circle CCTP V2. $0.2500
deploy_contract Deploys custom Escrow, Bounty, or Agent contracts to Base. $5.0000
deploy_solana_contract Deploys SPL Escrows, cNFT Badges, or Raydium Vaults to Solana. $5.0000
deploy_arc_contract Deploys custom Escrow, Bounty, or Agent contracts to Arc. $5.0000

Quickstart Usage

import asyncio
import os
from semantic_kernel import Kernel
from warppay402_plugin import WarpPay402Plugin

async def main():
    kernel = Kernel()

    # 1. Initialize WarpPay402 Plugin with agent key & gasless Paymaster RPC
    warppay = WarpPay402Plugin(
        private_key=os.getenv("AGENT_PRIVATE_KEY"),
        paymaster_rpc="[https://api.warppay402.com/api/v1/paymaster/rpc](https://api.warppay402.com/api/v1/paymaster/rpc)"
    )
    kernel.add_plugin(warppay, plugin_name="WarpPay402")

    # 2. Invoke Outage Oracle ($0.002 USDC)
    result = await kernel.invoke(
        kernel.plugins["WarpPay402"]["outage_oracle"],
        zip_code="78704"
    )
    print("Live Outage Telemetry:", result.value)

if __name__ == "__main__":
    asyncio.run(main())

Contribution Checklist

[x] Added plugin module under python/samples/concepts/plugins/warppay402_plugin/

[x] Included exported WarpPay402Plugin class and module init files (__init__.py)

[x] Added sample execution script (warppay402_sample.py)

Copilot AI balanced review requested due to automatic review settings October 16, 2026 19:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

This branch was previously deployed

1 inactive deployment
github-app-auth — 25389407 Deployed Oct 16, 2026 by golfgolfgolf200 via team_check #636
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants