<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Wallet Guy</title>
    <description>The latest articles on Forem by Wallet Guy (@walletguy).</description>
    <link>https://forem.com/walletguy</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3839576%2Fca8024e8-c8ac-4f6a-845c-e8ad44732a67.jpeg</url>
      <title>Forem: Wallet Guy</title>
      <link>https://forem.com/walletguy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/walletguy"/>
    <language>en</language>
    <item>
      <title>Hardware Security for Trading Bots: D'CENT Integration with Human-in-the-Loop Approval</title>
      <dc:creator>Wallet Guy</dc:creator>
      <pubDate>Tue, 05 May 2026 08:30:43 +0000</pubDate>
      <link>https://forem.com/walletguy/hardware-security-for-trading-bots-dcent-integration-with-human-in-the-loop-approval-2okj</link>
      <guid>https://forem.com/walletguy/hardware-security-for-trading-bots-dcent-integration-with-human-in-the-loop-approval-2okj</guid>
      <description>&lt;p&gt;Hardware wallets are great for holding crypto, but automated trading bots need a different security model — one that balances execution speed with human oversight. D'CENT hardware wallet integration provides a solution where your bot executes instantly within policy limits, but escalates high-risk trades for hardware-backed human approval.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Hardware Security Matters for Trading Bots
&lt;/h2&gt;

&lt;p&gt;Trading bots handle significant capital and operate 24/7 in adversarial environments. A compromised hot wallet can drain funds in minutes, while a cold wallet can't execute trades automatically. The traditional security-versus-automation tradeoff forces you to choose between protecting funds and capturing opportunities.&lt;/p&gt;

&lt;p&gt;D'CENT integration bridges this gap with conditional hardware signing. Your bot operates autonomously for routine trades under policy limits, but routes large positions or unusual patterns through hardware verification. This creates a security perimeter that adapts to transaction risk rather than blocking all automation.&lt;/p&gt;

&lt;h2&gt;
  
  
  How D'CENT Integration Works
&lt;/h2&gt;

&lt;p&gt;WAIaaS connects to D'CENT hardware wallets through the signing SDK, creating multiple approval channels based on transaction tier. The policy engine evaluates each trade and routes it through the appropriate signing flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Check current D'CENT connection status&lt;/span&gt;
curl http://127.0.0.1:3100/v1/signing/status &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Master-Password: my-secret-password"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The signing channels include push notifications to your mobile device, Telegram integration, and direct hardware wallet prompts. Each channel handles different security tiers from the 4-tier policy system.&lt;/p&gt;

&lt;h3&gt;
  
  
  Multi-Tier Trading Authorization
&lt;/h3&gt;

&lt;p&gt;Set up spending limits that match your trading strategy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Master-Password: my-secret-password"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "SPENDING_LIMIT",
    "rules": {
      "instant_max_usd": 1000,
      "notify_max_usd": 5000,
      "delay_max_usd": 20000,
      "delay_seconds": 300,
      "daily_limit_usd": 50000
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration allows your bot to execute trades up to $1,000 instantly, sends notifications for trades up to $5,000, delays trades up to $20,000 for 5 minutes (giving you time to cancel), and requires hardware approval for anything larger.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hardware-Backed Transaction Approval
&lt;/h3&gt;

&lt;p&gt;When a trade exceeds policy limits, WAIaaS queues it for hardware approval:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Bot attempts large trade via session auth&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/actions/jupiter-swap/swap &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "inputMint": "So11111111111111111111111111111111111111112",
    "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "amount": "50000000000"
  }'&lt;/span&gt;

&lt;span class="c"&gt;# Response indicates approval required&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"id"&lt;/span&gt;: &lt;span class="s2"&gt;"tx_abc123"&lt;/span&gt;,
  &lt;span class="s2"&gt;"status"&lt;/span&gt;: &lt;span class="s2"&gt;"PENDING_APPROVAL"&lt;/span&gt;,
  &lt;span class="s2"&gt;"tier"&lt;/span&gt;: &lt;span class="s2"&gt;"APPROVAL"&lt;/span&gt;,
  &lt;span class="s2"&gt;"message"&lt;/span&gt;: &lt;span class="s2"&gt;"Transaction requires hardware wallet approval"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You receive a push notification with transaction details, review on your D'CENT device, and approve or reject with hardware-backed signatures. The bot continues operating normally for smaller trades while waiting for your decision on the large one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cross-Protocol Trading Security
&lt;/h2&gt;

&lt;p&gt;Trading bots often need access to multiple DeFi protocols and chains. D'CENT integration works across all 15 integrated DeFi protocols and 18 supported networks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Set up protocol-specific policies&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Master-Password: my-secret-password"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "CONTRACT_WHITELIST",
    "rules": {
      "contracts": [
        {"address": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4", "name": "Jupiter", "chain": "solana"},
        {"address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH", "name": "Drift", "chain": "solana"}
      ]
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your bot can trade on Jupiter, hedge on Drift perpetuals, and bridge assets via LI.FI — all through the same wallet with consistent security policies. Hardware approval applies across all protocols, so a large position on any platform requires the same verification.&lt;/p&gt;

&lt;h3&gt;
  
  
  Multi-Chain Hardware Security
&lt;/h3&gt;

&lt;p&gt;For cross-chain arbitrage or multi-chain strategies, D'CENT provides unified hardware security:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Execute cross-chain bridge with hardware approval for large amounts&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/actions/lifi/bridge &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "fromChain": "ethereum",
    "toChain": "polygon",
    "fromToken": "USDC",
    "toToken": "USDC",
    "amount": "25000"
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The hardware wallet verifies cross-chain transactions with full context about destination chains and amounts, preventing approval of malicious bridge transactions that could drain funds on remote chains.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gas Optimization with Hardware Security
&lt;/h2&gt;

&lt;p&gt;Trading bots need efficient gas management, especially during high volatility. WAIaaS combines gas conditional execution with hardware security:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/transactions/send &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "type": "ContractCall",
    "to": "0x...",
    "data": "0x...",
    "gasCondition": {
      "maxGasPrice": "20000000000",
      "timeout": 3600
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Trades execute only when gas prices meet your threshold, and hardware approval requirements remain consistent regardless of gas conditions. This prevents the common bot failure mode where high gas costs make profitable trades unprofitable, or where urgent trades get stuck in hardware approval workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation for Trading Bots
&lt;/h2&gt;

&lt;p&gt;Set up D'CENT integration for a production trading bot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;WAIaaSClient&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@waiaas/sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;WAIaaSClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;baseUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;http://127.0.0.1:3100&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;sessionToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;WAIAAS_SESSION_TOKEN&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Check if hardware approval is available&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;signingStatus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getSigningStatus&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;signingStatus&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;channels&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dcent-hardware&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;warn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hardware signing not configured&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Execute trade with automatic tier routing&lt;/span&gt;
&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;trade&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;executeAction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;jupiter-swap&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;swap&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;inputMint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;So11111111111111111111111111111111111111112&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;outputMint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;tradeAmount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;trade&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;PENDING_APPROVAL&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Large trade queued for hardware approval&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Trade &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;trade&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; requires hardware approval`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="c1"&gt;// Continue with other strategies while waiting&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Trade executed or queued normally&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Trade &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;trade&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; status: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;trade&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Handle policy violations, insufficient balance, etc.&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Quick Start: Hardware-Secured Trading Bot
&lt;/h2&gt;

&lt;p&gt;Here's how to set up D'CENT integration for your trading bot:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install and configure WAIaaS with D'CENT support:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @waiaas/cli
waiaas init
waiaas start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create a trading wallet with spending policies:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;waiaas wallet create &lt;span class="nt"&gt;--name&lt;/span&gt; trading-bot &lt;span class="nt"&gt;--chain&lt;/span&gt; solana
waiaas quickset &lt;span class="nt"&gt;--mode&lt;/span&gt; mainnet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Configure D'CENT hardware wallet connection through the admin UI:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Open admin interface&lt;/span&gt;
open http://127.0.0.1:3100/admin
&lt;span class="c"&gt;# Navigate to Signing Channels → D'CENT Setup&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Set up tiered approval policies for your trading strategy:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Master-Password: your-password"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "your-wallet-id",
    "type": "SPENDING_LIMIT",
    "rules": {
      "instant_max_usd": 500,
      "notify_max_usd": 2000,
      "delay_max_usd": 10000,
      "delay_seconds": 600
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Test hardware approval flow with a large transaction:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# This should trigger D'CENT approval&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/transactions/send &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer your-session-token"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"type": "TRANSFER", "to": "test-address", "amount": "15000", "dryRun": true}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your trading bot now has hardware-backed security for large trades while maintaining automation for routine operations. The D'CENT device provides an additional security layer without blocking time-sensitive arbitrage opportunities.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;D'CENT integration gives trading bots the security of hardware wallets with the speed of hot wallets through intelligent tier-based routing. This approach scales from individual traders to institutional trading operations that need both automation and compliance controls.&lt;/p&gt;

&lt;p&gt;Ready to secure your trading infrastructure? Check out the &lt;a href="https://github.com/minhoyoo-iotrust/WAIaaS" rel="noopener noreferrer"&gt;WAIaaS GitHub repository&lt;/a&gt; for complete setup instructions, or visit &lt;a href="https://waiaas.ai" rel="noopener noreferrer"&gt;waiaas.ai&lt;/a&gt; to learn more about hardware wallet integration and policy-based security.&lt;/p&gt;

</description>
      <category>security</category>
      <category>defi</category>
      <category>ai</category>
      <category>api</category>
    </item>
    <item>
      <title>Production AI Agent Wallet: GHCR Image with Auto-Provision and Healthcheck</title>
      <dc:creator>Wallet Guy</dc:creator>
      <pubDate>Mon, 04 May 2026 15:17:50 +0000</pubDate>
      <link>https://forem.com/walletguy/production-ai-agent-wallet-ghcr-image-with-auto-provision-and-healthcheck-5be0</link>
      <guid>https://forem.com/walletguy/production-ai-agent-wallet-ghcr-image-with-auto-provision-and-healthcheck-5be0</guid>
      <description>&lt;p&gt;Production AI agent wallet infrastructure doesn't have to mean trusting third parties with your private keys or accepting rate limits from hosted services. Self-hosting your wallet-as-a-service gives you complete control over your AI agent's financial operations, from private key storage to transaction policies, all running on your own infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Self-Hosting Matters for AI Agents
&lt;/h2&gt;

&lt;p&gt;When your AI agent manages real funds, custody becomes critical. Hosted solutions create single points of failure — API outages, account suspensions, or service shutdowns can instantly disable your autonomous systems. Self-hosting eliminates these dependencies while ensuring your private keys never leave your infrastructure.&lt;/p&gt;

&lt;p&gt;The stakes extend beyond uptime. AI agents often require custom transaction policies, specialized DeFi integrations, or compliance with specific regulatory requirements. Self-hosted infrastructure gives you the flexibility to configure these systems exactly as needed, without waiting for a SaaS provider to support your use case.&lt;/p&gt;

&lt;h2&gt;
  
  
  WAIaaS: Production-Ready Self-Hosted Wallet Infrastructure
&lt;/h2&gt;

&lt;p&gt;WAIaaS delivers enterprise-grade wallet infrastructure through a single Docker image. The platform provides 39 REST API route modules, supports 15 DeFi protocol providers, and includes comprehensive policy management with 21 policy types across 4 security tiers.&lt;/p&gt;

&lt;p&gt;The Docker image &lt;code&gt;ghcr.io/minhoyoo-iotrust/waiaas:latest&lt;/code&gt; includes auto-provisioning capabilities that generate secure master passwords on first startup. Default port binding runs on &lt;code&gt;127.0.0.1:3100:3100&lt;/code&gt;, keeping your wallet API isolated to localhost by default.&lt;/p&gt;

&lt;h3&gt;
  
  
  Auto-Provisioning for Secure Deployment
&lt;/h3&gt;

&lt;p&gt;Starting a production wallet should be both secure and simple. WAIaaS supports auto-provisioning with Docker Secrets for production environments:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Quick start with auto-generated security&lt;/span&gt;
docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; waiaas &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 127.0.0.1:3100:3100 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; waiaas-data:/data &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;WAIAAS_AUTO_PROVISION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  ghcr.io/minhoyoo-iotrust/waiaas:latest

&lt;span class="c"&gt;# Retrieve auto-generated master password&lt;/span&gt;
docker &lt;span class="nb"&gt;exec &lt;/span&gt;waiaas &lt;span class="nb"&gt;cat&lt;/span&gt; /data/recovery.key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The auto-provision feature generates cryptographically secure master passwords and stores them in &lt;code&gt;/data/recovery.key&lt;/code&gt;. This eliminates the bootstrap problem of securely distributing initial credentials to your deployment environment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Production Docker Compose Configuration
&lt;/h3&gt;

&lt;p&gt;The included &lt;code&gt;docker-compose.yml&lt;/code&gt; provides production-ready defaults with healthchecks and restart policies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;daemon&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ghcr.io/minhoyoo-iotrust/waiaas:latest&lt;/span&gt;
    &lt;span class="na"&gt;container_name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;waiaas-daemon&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;127.0.0.1:3100:3100"&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;waiaas-data:/data&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;WAIAAS_DATA_DIR=/data&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;WAIAAS_DAEMON_HOSTNAME=0.0.0.0&lt;/span&gt;
    &lt;span class="na"&gt;env_file&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;.env&lt;/span&gt;
        &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
    &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;
    &lt;span class="na"&gt;healthcheck&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;test&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;CMD"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;curl"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;-f"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;http://localhost:3100/health"&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
      &lt;span class="na"&gt;interval&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;30s&lt;/span&gt;
      &lt;span class="na"&gt;timeout&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;5s&lt;/span&gt;
      &lt;span class="na"&gt;start_period&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;10s&lt;/span&gt;
      &lt;span class="na"&gt;retries&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;

&lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;waiaas-data&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;driver&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;local&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The healthcheck monitors the &lt;code&gt;/health&lt;/code&gt; endpoint every 30 seconds, ensuring container orchestration systems can detect and restart failed instances. Named volumes preserve wallet data across container updates.&lt;/p&gt;

&lt;h3&gt;
  
  
  Docker Secrets for Production
&lt;/h3&gt;

&lt;p&gt;Production deployments require secure credential management. WAIaaS includes a production secrets overlay via &lt;code&gt;docker-compose.secrets.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create secret files&lt;/span&gt;
&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; secrets
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"your-secure-password"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; secrets/master_password.txt
&lt;span class="nb"&gt;chmod &lt;/span&gt;600 secrets/master_password.txt

&lt;span class="c"&gt;# Deploy with secrets overlay&lt;/span&gt;
docker compose &lt;span class="nt"&gt;-f&lt;/span&gt; docker-compose.yml &lt;span class="nt"&gt;-f&lt;/span&gt; docker-compose.secrets.yml up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This approach keeps sensitive credentials outside of environment variables and container images, following Docker security best practices.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up Your Self-Hosted AI Agent Wallet
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Deploy with Docker Compose
&lt;/h3&gt;

&lt;p&gt;Clone the repository and start the services:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/minhoyoo-iotrust/WAIaaS.git
&lt;span class="nb"&gt;cd &lt;/span&gt;WAIaaS
docker compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The daemon starts on port 3100 with automatic provisioning enabled. Check the logs to confirm successful startup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker compose logs &lt;span class="nt"&gt;-f&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Create Your First Wallet
&lt;/h3&gt;

&lt;p&gt;Use the CLI to create a wallet for your AI agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install the CLI&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @waiaas/cli

&lt;span class="c"&gt;# Initialize configuration&lt;/span&gt;
waiaas init

&lt;span class="c"&gt;# Create a Solana wallet&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/wallets &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Master-Password: &lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;docker &lt;span class="nb"&gt;exec &lt;/span&gt;waiaas &lt;span class="nb"&gt;cat&lt;/span&gt; /data/recovery.key&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"name": "trading-agent", "chain": "solana", "environment": "mainnet"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The wallet creation returns a unique identifier and public address. Store the wallet ID for session creation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Create an AI Agent Session
&lt;/h3&gt;

&lt;p&gt;Sessions provide scoped access for AI agents without exposing the master password:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/sessions &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Master-Password: &lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;docker &lt;span class="nb"&gt;exec &lt;/span&gt;waiaas &lt;span class="nb"&gt;cat&lt;/span&gt; /data/recovery.key&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"walletId": "&amp;lt;wallet-uuid-from-step-2&amp;gt;"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The response includes a session token (&lt;code&gt;wai_sess_...&lt;/code&gt;) that your AI agent uses for transactions. Sessions support configurable TTL, maximum renewals, and absolute lifetime limits.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Configure Security Policies
&lt;/h3&gt;

&lt;p&gt;Self-hosted infrastructure means you control the security model. Create spending limits and transaction policies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Master-Password: &lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;docker &lt;span class="nb"&gt;exec &lt;/span&gt;waiaas &lt;span class="nb"&gt;cat&lt;/span&gt; /data/recovery.key&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "SPENDING_LIMIT",
    "rules": {
      "instant_max_usd": 10,
      "notify_max_usd": 100,
      "delay_max_usd": 1000,
      "delay_seconds": 300,
      "daily_limit_usd": 5000
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The policy engine implements 4 security tiers (INSTANT, NOTIFY, DELAY, APPROVAL) with default-deny enforcement. Transactions execute immediately for small amounts, require delays for medium amounts, and demand human approval for large transactions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Test Agent Integration
&lt;/h3&gt;

&lt;p&gt;Your AI agent can now interact with the wallet through the REST API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Check balance&lt;/span&gt;
curl http://127.0.0.1:3100/v1/wallet/balance &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;your-session-token&amp;gt;"&lt;/span&gt;

&lt;span class="c"&gt;# Send tokens&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/transactions/send &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;your-session-token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "type": "TRANSFER",
    "to": "recipient-address",
    "amount": "0.001"
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Monitoring and Maintenance
&lt;/h2&gt;

&lt;p&gt;Self-hosted infrastructure requires operational visibility. WAIaaS includes comprehensive monitoring through structured logs and health endpoints.&lt;/p&gt;

&lt;p&gt;The included healthcheck monitors daemon availability, but production deployments should also monitor wallet balances, policy violations, and transaction success rates. The Admin Web UI at &lt;code&gt;/admin&lt;/code&gt; provides a dashboard for wallet management, session control, and DeFi positions.&lt;/p&gt;

&lt;p&gt;For automated maintenance, the Docker image supports watchtower auto-updates. Configure watchtower to monitor the &lt;code&gt;ghcr.io/minhoyoo-iotrust/waiaas:latest&lt;/code&gt; tag for security updates:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; watchtower &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; /var/run/docker.sock:/var/run/docker.sock &lt;span class="se"&gt;\&lt;/span&gt;
  containrrr/watchtower &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--interval&lt;/span&gt; 3600 &lt;span class="se"&gt;\&lt;/span&gt;
  waiaas-daemon
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Beyond Basic Deployment
&lt;/h2&gt;

&lt;p&gt;Self-hosting enables advanced configurations impossible with hosted services. The 15-package monorepo includes specialized components for different deployment scenarios.&lt;/p&gt;

&lt;p&gt;The push-relay service provides mobile notifications for transaction approvals. Deploy it alongside the main daemon for complete self-hosted infrastructure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Both services from the same codebase&lt;/span&gt;
docker compose up daemon push-relay
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For high-availability deployments, the stateless API design allows horizontal scaling behind a load balancer. Store the SQLite database on shared storage or migrate to PostgreSQL for multi-instance deployments.&lt;/p&gt;

&lt;p&gt;The OpenAPI 3.0 spec at &lt;code&gt;/doc&lt;/code&gt; and interactive documentation at &lt;code&gt;/reference&lt;/code&gt; support custom client development. Self-hosted infrastructure means you can modify the API surface or add custom endpoints without vendor approval.&lt;/p&gt;

&lt;p&gt;Your self-hosted WAIaaS instance provides complete sovereignty over your AI agent's financial infrastructure. From private key storage to transaction policies, everything runs under your control on your infrastructure.&lt;/p&gt;

&lt;p&gt;Ready to deploy your own instance? Start with the &lt;a href="https://github.com/minhoyoo-iotrust/WAIaaS" rel="noopener noreferrer"&gt;WAIaaS GitHub repository&lt;/a&gt; for the complete source code and deployment guides, or visit &lt;a href="https://waiaas.ai" rel="noopener noreferrer"&gt;waiaas.ai&lt;/a&gt; for additional documentation and community resources.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>selfhosted</category>
      <category>ai</category>
      <category>devops</category>
    </item>
    <item>
      <title>Claude Desktop + NFTs: MCP Tools for AI Agent NFT Management</title>
      <dc:creator>Wallet Guy</dc:creator>
      <pubDate>Mon, 04 May 2026 08:44:02 +0000</pubDate>
      <link>https://forem.com/walletguy/claude-desktop-nfts-mcp-tools-for-ai-agent-nft-management-3lm</link>
      <guid>https://forem.com/walletguy/claude-desktop-nfts-mcp-tools-for-ai-agent-nft-management-3lm</guid>
      <description>&lt;p&gt;NFT management through Claude Desktop becomes dramatically simpler when your AI agent can directly interact with blockchain networks. WAIaaS provides 45 MCP tools that transform Claude into a capable NFT portfolio manager, eliminating the need to switch between multiple interfaces for discovery, transfers, and metadata analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why AI-Native NFT Management Matters
&lt;/h2&gt;

&lt;p&gt;Traditional NFT management requires juggling multiple platforms—OpenSea for browsing, MetaMask for transactions, various analytics tools for portfolio tracking. Each context switch breaks your workflow and requires manual coordination between discovery and action.&lt;/p&gt;

&lt;p&gt;With Model Context Protocol integration, Claude can seamlessly handle the entire NFT lifecycle: discovering collections, analyzing metadata, executing transfers, and tracking portfolio changes—all within a single conversation thread. This unified approach reduces friction and enables more sophisticated NFT strategies that combine market analysis with immediate execution.&lt;/p&gt;

&lt;h2&gt;
  
  
  MCP Tools for Complete NFT Control
&lt;/h2&gt;

&lt;p&gt;WAIaaS integrates NFT functionality directly into Claude through its MCP server. Once configured, your agent gains access to comprehensive NFT capabilities across both EVM chains (ERC-721/ERC-1155) and Solana (Metaplex) with built-in metadata caching for fast responses.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick MCP Setup
&lt;/h3&gt;

&lt;p&gt;First, configure Claude Desktop to connect with WAIaaS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install and setup WAIaaS&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @waiaas/cli
waiaas init
waiaas start
waiaas quickset &lt;span class="nt"&gt;--mode&lt;/span&gt; mainnet    &lt;span class="c"&gt;# Creates wallets + MCP sessions&lt;/span&gt;
waiaas mcp setup &lt;span class="nt"&gt;--all&lt;/span&gt;           &lt;span class="c"&gt;# Auto-registers with Claude Desktop&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This automatically adds the MCP server configuration to your &lt;code&gt;claude_desktop_config.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"waiaas"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@waiaas/mcp"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"WAIAAS_BASE_URL"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://127.0.0.1:3100"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"WAIAAS_SESSION_TOKEN"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"wai_sess_eyJhbGciOiJIUzI1NiJ9..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"WAIAAS_DATA_DIR"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"~/.waiaas"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Core NFT Tools Available to Claude
&lt;/h3&gt;

&lt;p&gt;Once configured, Claude gains access to these NFT-specific MCP tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;list-nfts&lt;/strong&gt; — Browse entire NFT collection with metadata&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;get-nft-metadata&lt;/strong&gt; — Detailed analysis of individual NFTs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;transfer-nft&lt;/strong&gt; — Execute NFT transfers with policy enforcement&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;get-assets&lt;/strong&gt; — Portfolio view including NFT valuations&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Practical NFT Operations
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Portfolio Discovery&lt;/strong&gt;: Claude can analyze your complete NFT holdings across networks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User: "Show me all my NFTs and highlight any that might be valuable"

Claude: I'll check your NFT collection across all networks.

*calls list-nfts tool*

You have 23 NFTs across Ethereum and Solana:

Ethereum (12 NFTs):
- Bored Ape #4532 - Floor: 12.3 ETH
- 3 Pudgy Penguins - Floor: 2.1 ETH each
- CryptoPunk #8745 - Rare traits detected

Solana (11 NFTs):
- DeGods #1234 - High rarity score
- 5 Okay Bears - Active community
- Magic Eden verified collections

The Bored Ape and CryptoPunk show significant value. Would you like detailed trait analysis for any specific pieces?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Metadata Analysis&lt;/strong&gt;: Deep dive into NFT characteristics and provenance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User: "Analyze the rarity and traits of my Bored Ape #4532"

Claude: *calls get-nft-metadata tool*

Bored Ape #4532 Analysis:
- Background: Orange (12% rarity)
- Eyes: Laser Eyes (1.2% rarity) ⭐
- Mouth: Grin (5.8% rarity)
- Hat: Party Hat (3.4% rarity) ⭐

Rarity Score: 8.2/10 (Top 5%)
Last Sale: 15.2 ETH (3 months ago)
Current Floor: 12.3 ETH

The Laser Eyes trait is particularly rare and drives significant value premium. This piece ranks in the top 5% by rarity.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Smart Transfer Execution&lt;/strong&gt;: NFT transfers with built-in policy protection:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Behind the scenes: Claude calls the transfer-nft tool&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/transactions/nft-transfer &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "contractAddress": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D",
    "tokenId": "4532",
    "to": "0x742d35Cc6664C8532D24C15D8eb18C9C95F5FB45",
    "standard": "ERC721"
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Policy-Protected NFT Operations
&lt;/h3&gt;

&lt;p&gt;WAIaaS applies the same 4-tier security model to NFT operations. You can configure policies that require approval for high-value transfers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create NFT-specific policies&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'X-Master-Password: &amp;lt;password&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "SPENDING_LIMIT", 
    "rules": {
      "instant_max_usd": 100,
      "delay_max_usd": 1000,
      "delay_seconds": 300
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures that valuable NFT transfers require human approval, while smaller transfers execute instantly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cross-Chain NFT Management
&lt;/h3&gt;

&lt;p&gt;Claude can manage NFTs across both Ethereum and Solana ecosystems seamlessly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User: "Compare my NFT portfolios on Ethereum vs Solana"

Claude: *calls list-nfts and get-assets tools*

Portfolio Comparison:

Ethereum NFTs (Total Value: ~45 ETH):
- Blue-chip focus: BAYC, CryptoPunks, Azuki  
- Higher individual values
- Established marketplace liquidity
- Gas costs impact smaller trades

Solana NFTs (Total Value: ~120 SOL):
- Diverse collection: DeGods, Okay Bears, Magic Eden drops
- More experimental/utility-focused
- Lower transaction costs enable frequent trading
- Faster settlement times

Strategy Recommendation: Your Ethereum holdings are wealth preservation plays, while Solana NFTs offer more trading flexibility due to low fees.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Quick Start: Your First AI NFT Operation
&lt;/h2&gt;

&lt;p&gt;Get Claude managing NFTs in under 5 minutes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Setup WAIaaS&lt;/strong&gt;: &lt;code&gt;npm install -g @waiaas/cli &amp;amp;&amp;amp; waiaas init &amp;amp;&amp;amp; waiaas start&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create session&lt;/strong&gt;: &lt;code&gt;waiaas quickset --mode mainnet&lt;/code&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Register MCP&lt;/strong&gt;: &lt;code&gt;waiaas mcp setup --all&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Restart Claude Desktop&lt;/strong&gt; to load the new MCP server&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Try it&lt;/strong&gt;: Ask Claude "Show me all my NFTs" or "What's the rarity of my [collection] #[id]?"&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Claude now has direct access to your NFT portfolio and can execute transfers, analyze metadata, and track portfolio performance—all through natural conversation.&lt;/p&gt;

&lt;p&gt;For developers building more complex NFT applications, the same MCP tools work programmatically through the REST API, enabling hybrid approaches where Claude handles discovery and analysis while custom code manages bulk operations.&lt;/p&gt;

&lt;p&gt;Ready to give your AI agent NFT superpowers? Check out &lt;a href="https://dev.to/walletguy/mcp-tools-for-claude-desktop-complete-wallet-integration-guide"&gt;MCP Tools for Claude Desktop: Complete Wallet Integration Guide&lt;/a&gt; for the full setup process, or explore &lt;a href="https://dev.to/walletguy/policy-engine-deep-dive-4-tier-security-for-ai-agent-transactions"&gt;Policy Engine Deep Dive: 4-Tier Security for AI Agent Transactions&lt;/a&gt; to understand how transaction policies protect your valuable NFT transfers.&lt;/p&gt;

&lt;p&gt;The combination of AI reasoning with direct blockchain access opens up entirely new possibilities for NFT portfolio management. Start experimenting at &lt;a href="https://github.com/minhoyoo-iotrust/WAIaaS" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; or learn more at &lt;a href="https://waiaas.ai" rel="noopener noreferrer"&gt;waiaas.ai&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>nft</category>
      <category>mcp</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Risk Management for Perpetual Trading Bots: Leverage and Position Limits</title>
      <dc:creator>Wallet Guy</dc:creator>
      <pubDate>Sun, 03 May 2026 14:14:52 +0000</pubDate>
      <link>https://forem.com/walletguy/risk-management-for-perpetual-trading-bots-leverage-and-position-limits-5gek</link>
      <guid>https://forem.com/walletguy/risk-management-for-perpetual-trading-bots-leverage-and-position-limits-5gek</guid>
      <description>&lt;p&gt;Your perpetual trading bot needs bulletproof risk management to survive volatile markets. Without proper leverage limits and position controls, even profitable strategies can blow up accounts during extreme price moves or flash crashes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Risk Management Is Critical for Automated Trading
&lt;/h2&gt;

&lt;p&gt;Trading bots operate 24/7 without human oversight, making automated risk controls essential. A single misconfigured position or runaway leverage can wipe out weeks of profits in minutes. Traditional exchanges offer basic position limits, but they can't coordinate risk across multiple protocols or implement sophisticated pre-trade checks.&lt;/p&gt;

&lt;p&gt;Professional trading operations need infrastructure that enforces risk rules at the wallet level — before transactions hit the blockchain. This means position sizing, leverage caps, and exposure limits that work across Hyperliquid, Drift, Jupiter, and any other protocol your bot trades on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Built-in Risk Controls for Trading Infrastructure
&lt;/h2&gt;

&lt;p&gt;WAIaaS provides wallet-as-a-service infrastructure specifically designed for automated trading systems. Instead of building risk management from scratch, you get 21 policy types that enforce limits before transactions execute.&lt;/p&gt;

&lt;p&gt;The policy engine operates with 4 security tiers: INSTANT execution for small trades, NOTIFY for medium positions (with alerts), DELAY for large trades (with cancellation windows), and APPROVAL for maximum positions requiring human oversight.&lt;/p&gt;

&lt;h3&gt;
  
  
  Perpetual Futures Risk Policies
&lt;/h3&gt;

&lt;p&gt;For perpetual trading specifically, WAIaaS enforces three critical policy types:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PERP_MAX_LEVERAGE&lt;/strong&gt; prevents your bot from exceeding safe leverage ratios:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Master-Password: my-secret-password"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "PERP_MAX_LEVERAGE",
    "rules": {
      "maxLeverage": 5.0,
      "leverageTiers": {
        "BTC-USD": 3.0,
        "ETH-USD": 4.0,
        "ALT-USD": 2.0
      }
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;PERP_MAX_POSITION_USD&lt;/strong&gt; caps position sizes across all perpetual markets:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Master-Password: my-secret-password"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "PERP_MAX_POSITION_USD",
    "rules": {
      "maxPositionUsd": 50000,
      "marketLimits": {
        "BTC-USD": 25000,
        "ETH-USD": 15000,
        "SOL-USD": 10000
      }
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;PERP_ALLOWED_MARKETS&lt;/strong&gt; restricts trading to approved perpetual contracts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Master-Password: my-secret-password"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "PERP_ALLOWED_MARKETS",
    "rules": {
      "allowedMarkets": [
        "BTC-USD",
        "ETH-USD",
        "SOL-USD"
      ]
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Multi-Tier Spending Limits
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;SPENDING_LIMIT&lt;/strong&gt; policy creates automatic circuit breakers based on trade size:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Master-Password: my-secret-password"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "SPENDING_LIMIT",
    "rules": {
      "instant_max_usd": 1000,
      "notify_max_usd": 5000,
      "delay_max_usd": 20000,
      "delay_seconds": 300,
      "daily_limit_usd": 50000,
      "monthly_limit_usd": 500000
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Small positions under $1,000 execute instantly. Medium positions ($1,000-$5,000) execute with notifications sent to your monitoring systems. Large positions ($5,000-$20,000) are delayed 5 minutes, giving you time to cancel if needed. Positions over $20,000 require manual approval.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rate Limiting for High-Frequency Strategies
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;RATE_LIMIT&lt;/strong&gt; policies prevent runaway bot behavior:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Master-Password: my-secret-password"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "RATE_LIMIT",
    "rules": {
      "maxTransactions": 100,
      "period": "hourly"
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Hyperliquid Integration for Perpetual Trading
&lt;/h2&gt;

&lt;p&gt;WAIaaS includes native Hyperliquid support for perpetual futures, spot trading, and sub-accounts. Your bot can execute sophisticated strategies across multiple markets:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Open BTC perpetual position with built-in risk checks&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/actions/hyperliquid/place-order &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "asset": "BTC",
    "isBuy": true,
    "sz": "0.5",
    "limitPx": "45000",
    "orderType": "limit",
    "reduceOnly": false
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The policy engine validates leverage ratios and position sizes before the order hits Hyperliquid's API. If your bot tries to exceed configured limits, the transaction is blocked with a clear error message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"POLICY_DENIED"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Position would exceed PERP_MAX_POSITION_USD limit of 50000"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"domain"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"POLICY"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"retryable"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Cross-Protocol Risk Management
&lt;/h2&gt;

&lt;p&gt;Professional trading strategies often span multiple protocols — arbitrage between Jupiter and Hyperliquid, hedging spot positions with perpetuals, or managing collateral across lending protocols. WAIaaS tracks exposure across all 15 integrated DeFi protocols.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;ACTION_CATEGORY_LIMIT&lt;/strong&gt; policy sets spending limits by DeFi category:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Master-Password: my-secret-password"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "ACTION_CATEGORY_LIMIT",
    "rules": {
      "categoryLimits": {
        "swap": {"daily_limit_usd": 100000},
        "lending": {"daily_limit_usd": 50000},
        "derivatives": {"daily_limit_usd": 200000}
      }
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your bot can swap on Jupiter, lend on AAVE, and trade perps on Hyperliquid — but each category has separate risk budgets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gas-Conditional Execution for MEV Protection
&lt;/h2&gt;

&lt;p&gt;Trading bots often compete for block space with MEV bots and arbitrageurs. WAIaaS includes gas conditional execution — transactions only execute when gas prices meet your threshold:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/transactions/send &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "type": "ContractCall",
    "to": "0x...",
    "data": "0x...",
    "gasCondition": {
      "maxGasPrice": "20000000000",
      "timeout": 300
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your arbitrage opportunity gets queued until gas drops below 20 gwei, then executes automatically. No more paying 100+ gwei for unprofitable trades during network congestion.&lt;/p&gt;

&lt;h2&gt;
  
  
  Transaction Simulation and Dry-Run Testing
&lt;/h2&gt;

&lt;p&gt;Before risking real funds, test your trading logic with the dry-run API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/transactions/send &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "type": "TRANSFER",
    "to": "recipient-address",
    "amount": "0.1",
    "dryRun": true
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This validates policies, checks balances, and estimates gas costs without broadcasting to the network. Essential for testing new strategies or debugging policy configurations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Start: Set Up Risk-Controlled Trading Infrastructure
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Deploy with Docker:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/minhoyoo-iotrust/WAIaaS.git
&lt;span class="nb"&gt;cd &lt;/span&gt;WAIaaS
docker compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create trading wallets:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @waiaas/cli
waiaas init
waiaas start
waiaas quickset &lt;span class="nt"&gt;--mode&lt;/span&gt; mainnet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Configure perpetual trading policies:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Set maximum leverage limits&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Master-Password: &lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; ~/.waiaas/master.password&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;your-wallet-id&amp;gt;",
    "type": "PERP_MAX_LEVERAGE",
    "rules": {"maxLeverage": 5.0}
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start trading with risk controls:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Execute Hyperliquid trade with automatic risk validation&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/actions/hyperliquid/place-order &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"asset": "BTC", "isBuy": true, "sz": "0.1", "limitPx": "45000"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Monitor positions and policy compliance:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Check current DeFi positions across all protocols&lt;/span&gt;
curl http://127.0.0.1:3100/v1/defi/positions &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your trading infrastructure now enforces leverage limits, position caps, and spending controls automatically — no manual intervention required.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related Posts
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://dev.to/walletguy/building-high-frequency-trading-bots-with-waiaas-gas-optimization-and-multi-protocol-access"&gt;Building High-Frequency Trading Bots with WAIaaS: Gas Optimization and Multi-Protocol Access&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/walletguy/cross-chain-arbitrage-automation-bridge-mev-with-lifi-and-across-integration"&gt;Cross-Chain Arbitrage Automation: Bridge MEV with LI.FI and Across Integration&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/walletguy/mev-bot-infrastructure-account-abstraction-and-gasless-transactions-for-competitive-execution"&gt;MEV Bot Infrastructure: Account Abstraction and Gasless Transactions for Competitive Execution&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;Ready to build bulletproof trading infrastructure? Check out the complete documentation and get started with risk-controlled perpetual trading at &lt;a href="https://waiaas.ai" rel="noopener noreferrer"&gt;waiaas.ai&lt;/a&gt;. The full source code and deployment guides are available at &lt;a href="https://github.com/minhoyoo-iotrust/WAIaaS" rel="noopener noreferrer"&gt;github.com/minhoyoo-iotrust/WAIaaS&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>defi</category>
      <category>trading</category>
      <category>security</category>
      <category>api</category>
    </item>
    <item>
      <title>Contract and Token Whitelists: How to Lock Down Your AI Agent's Spending</title>
      <dc:creator>Wallet Guy</dc:creator>
      <pubDate>Sun, 03 May 2026 08:17:55 +0000</pubDate>
      <link>https://forem.com/walletguy/contract-and-token-whitelists-how-to-lock-down-your-ai-agents-spending-39gb</link>
      <guid>https://forem.com/walletguy/contract-and-token-whitelists-how-to-lock-down-your-ai-agents-spending-39gb</guid>
      <description>&lt;p&gt;Contract and token whitelists are your first line of defense when giving an AI agent spending power in DeFi. Without explicit guardrails, an autonomous agent with wallet access can drain funds, approve unlimited token transfers, or interact with malicious contracts—turning innovation into financial catastrophe.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Whitelist Security Matters
&lt;/h2&gt;

&lt;p&gt;Traditional web applications fail gracefully. A bug might crash a server or corrupt some data. But crypto applications fail expensively. A single malicious transaction can empty a wallet permanently. When you add AI agents to the equation—with their tendency toward unpredictable behavior and susceptibility to prompt injection—the stakes become even higher.&lt;/p&gt;

&lt;p&gt;The problem isn't theoretical. We've seen autonomous trading bots lose millions due to oracle manipulation, smart contracts drain funds through reentrancy attacks, and AI systems get tricked into signing malicious transactions through carefully crafted inputs. Default-allow security models don't work when every transaction can be irreversible.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Default-Deny Security Model
&lt;/h2&gt;

&lt;p&gt;WAIaaS implements a default-deny security architecture across 21 policy types, with contract and token whitelists forming the foundation. When an AI agent attempts a transaction, the system starts from a position of "no" and only permits explicitly authorized actions.&lt;/p&gt;

&lt;p&gt;Here's how the three core whitelist policies work:&lt;/p&gt;

&lt;h3&gt;
  
  
  ALLOWED_TOKENS: Token Transfer Whitelist
&lt;/h3&gt;

&lt;p&gt;By default, your AI agent cannot transfer any tokens—not even native ETH or SOL. You must explicitly whitelist each token the agent is allowed to touch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'X-Master-Password: &amp;lt;password&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "ALLOWED_TOKENS",
    "rules": {
      "tokens": [
        {
          "address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", 
          "symbol": "USDC", 
          "chain": "solana"
        },
        {
          "address": "native:solana", 
          "symbol": "SOL", 
          "chain": "solana"
        }
      ]
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without this policy configured, any attempt to send tokens results in immediate denial. With it configured, the agent can only transfer the specific tokens you've authorized—USDC and SOL in this example.&lt;/p&gt;

&lt;h3&gt;
  
  
  CONTRACT_WHITELIST: Smart Contract Interaction Control
&lt;/h3&gt;

&lt;p&gt;Smart contract calls are even more dangerous than simple transfers. A single &lt;code&gt;approve()&lt;/code&gt; call can grant unlimited spending power to a malicious contract. The contract whitelist prevents your agent from interacting with any smart contract you haven't explicitly approved:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'X-Master-Password: &amp;lt;password&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "CONTRACT_WHITELIST",
    "rules": {
      "contracts": [
        {
          "address": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4", 
          "name": "Jupiter", 
          "chain": "solana"
        },
        {
          "address": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
          "name": "Uniswap V2 Router",
          "chain": "ethereum"
        }
      ]
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration allows your agent to swap tokens on Jupiter (Solana) and Uniswap V2 (Ethereum), but blocks all other contract interactions.&lt;/p&gt;

&lt;h3&gt;
  
  
  APPROVED_SPENDERS: Token Approval Restrictions
&lt;/h3&gt;

&lt;p&gt;Token approvals deserve special attention because they can grant persistent spending power to third parties. The approved spenders whitelist controls which contracts can receive approval to spend your tokens:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'X-Master-Password: &amp;lt;password&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "APPROVED_SPENDERS",
    "rules": {
      "spenders": [
        {
          "address": "0xDEF1C0ded9bec7F1a1670819833240f027b25EfF",
          "name": "0x Protocol",
          "maxAmount": "1000000000"
        }
      ]
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;maxAmount&lt;/code&gt; field prevents unlimited approvals—a common attack vector where malicious contracts request &lt;code&gt;type(uint256).max&lt;/code&gt; approval amounts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layered Security Beyond Whitelists
&lt;/h2&gt;

&lt;p&gt;Whitelists provide the foundation, but WAIaaS implements defense in depth with multiple security layers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Spending Limits&lt;/strong&gt;: Even whitelisted actions can be restricted by amount. Small transactions execute instantly, medium amounts trigger notifications, large amounts require time delays, and the biggest transactions need explicit human approval:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"SPENDING_LIMIT"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"rules"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"instant_max_usd"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"notify_max_usd"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"delay_max_usd"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"delay_seconds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Time Restrictions&lt;/strong&gt;: Limit agent activity to specific hours when you're available to monitor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"TIME_RESTRICTION"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; 
  &lt;/span&gt;&lt;span class="nl"&gt;"rules"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"allowedHours"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"end"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;17&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"timezone"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"UTC"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Rate Limits&lt;/strong&gt;: Prevent rapid-fire transactions that could indicate compromise:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"RATE_LIMIT"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"rules"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"maxTransactions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"period"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"hourly"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Authentication and Authorization Architecture
&lt;/h2&gt;

&lt;p&gt;WAIaaS uses three distinct authentication methods, each serving a different role in the security model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;masterAuth&lt;/strong&gt;: Administrative control (Argon2id password hashing)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;sessionAuth&lt;/strong&gt;: AI agent transaction execution (JWT HS256 tokens)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ownerAuth&lt;/strong&gt;: Human approval override (SIWS/SIWE signatures)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The AI agent operates with limited &lt;code&gt;sessionAuth&lt;/code&gt; permissions. When policies require human approval, the transaction enters a pending state until the fund owner provides &lt;code&gt;ownerAuth&lt;/code&gt; approval through WalletConnect, Telegram, or push notifications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monitoring and Emergency Response
&lt;/h2&gt;

&lt;p&gt;Security doesn't end at prevention. WAIaaS includes comprehensive monitoring and emergency response capabilities:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transaction Monitoring&lt;/strong&gt;: Every transaction is logged with full context—policy evaluations, approval flows, and execution results. The 39 REST API route modules provide detailed audit trails.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-time Notifications&lt;/strong&gt;: The system can alert you immediately when transactions approach policy limits or require approval. Integration with 3 signing channels (push-relay, Telegram, WalletConnect) ensures you never miss critical decisions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kill Switch&lt;/strong&gt;: Owners can instantly disable agent permissions or kill pending transactions through the emergency interface.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Start: Securing Your AI Agent
&lt;/h2&gt;

&lt;p&gt;Here's how to set up whitelist-based security for a trading agent:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start WAIaaS with auto-provision&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @waiaas/cli
waiaas init &lt;span class="nt"&gt;--auto-provision&lt;/span&gt;
waiaas start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create a trading wallet&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;waiaas wallet create &lt;span class="nt"&gt;--name&lt;/span&gt; trading-bot &lt;span class="nt"&gt;--chain&lt;/span&gt; solana
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Configure token whitelist&lt;/strong&gt; (allow only USDC and SOL):
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'X-Master-Password: &amp;lt;your-password&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "ALLOWED_TOKENS",
    "rules": {
      "tokens": [
        {"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "symbol": "USDC", "chain": "solana"},
        {"address": "native:solana", "symbol": "SOL", "chain": "solana"}
      ]
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Set contract whitelist&lt;/strong&gt; (allow only Jupiter for swapping):
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'X-Master-Password: &amp;lt;your-password&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "CONTRACT_WHITELIST",
    "rules": {
      "contracts": [
        {"address": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4", "name": "Jupiter", "chain": "solana"}
      ]
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Test the restrictions&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# This will work (USDC is whitelisted)&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/transactions/send &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer &amp;lt;session-token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"type": "TokenTransfer", "token": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "amount": "1"}'&lt;/span&gt;

&lt;span class="c"&gt;# This will be denied (BONK not whitelisted)&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/transactions/send &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer &amp;lt;session-token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"type": "TokenTransfer", "token": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263", "amount": "1000"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your AI agent now operates within strict boundaries—it can only touch approved tokens and interact with approved contracts. Any attempt to step outside these constraints results in immediate denial.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/walletguy/ai-agent-security-3-layer-defense-against-crypto-exploits"&gt;AI Agent Security: 3-Layer Defense Against Crypto Exploits&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/walletguy/self-hosted-crypto-wallets-why-ai-agents-need-local-control"&gt;Self-Hosted Crypto Wallets: Why AI Agents Need Local Control&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;Contract and token whitelists provide the foundation for AI agent security, but they're just the beginning. Explore the full 21-policy security framework, set up human-approval workflows for high-value transactions, and implement comprehensive monitoring. Get started at &lt;a href="https://github.com/minhoyoo-iotrust/WAIaaS" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; or learn more at &lt;a href="https://waiaas.ai" rel="noopener noreferrer"&gt;waiaas.ai&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>web3</category>
      <category>policy</category>
    </item>
    <item>
      <title>When AI Agents Trade Autonomously: Building Economic Actors That Never Sleep</title>
      <dc:creator>Wallet Guy</dc:creator>
      <pubDate>Sat, 02 May 2026 14:14:03 +0000</pubDate>
      <link>https://forem.com/walletguy/when-ai-agents-trade-autonomously-building-economic-actors-that-never-sleep-5cb3</link>
      <guid>https://forem.com/walletguy/when-ai-agents-trade-autonomously-building-economic-actors-that-never-sleep-5cb3</guid>
      <description>&lt;p&gt;AI agents will need to pay for compute, data, and API calls autonomously — but most lack the economic infrastructure to participate in real transactions. The missing piece isn't smarter models or better reasoning; it's wallet infrastructure that lets agents operate as independent economic actors without human intermediaries for every payment.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Autonomous Agent Economy Is Already Here
&lt;/h2&gt;

&lt;p&gt;We're witnessing the emergence of AI agents that don't just answer questions — they take actions. They trade stocks, manage DeFi positions, execute complex workflows, and consume paid APIs. But there's a fundamental bottleneck: these agents still depend on humans to handle their economic interactions.&lt;/p&gt;

&lt;p&gt;Consider an AI trading bot that identifies arbitrage opportunities across multiple DEXs. It can analyze markets, calculate optimal routes, and determine profitable trades faster than any human. But when it comes time to execute — to actually move funds, swap tokens, or pay for premium market data — it hits a wall. The agent needs a human to approve transactions, top up balances, or manage API credits.&lt;/p&gt;

&lt;p&gt;This creates a paradox: we have agents sophisticated enough to outperform humans at complex economic reasoning, but they can't autonomously pay for a $0.01 API call.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Infrastructure Gap: Wallets for Agents
&lt;/h2&gt;

&lt;p&gt;Traditional wallet infrastructure was designed for humans. It assumes someone is present to approve transactions, manage private keys, and handle security decisions. But autonomous agents operate differently:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They need to transact 24/7 across global markets&lt;/li&gt;
&lt;li&gt;They require programmatic access without GUI interactions
&lt;/li&gt;
&lt;li&gt;They must handle micropayments efficiently (paying per API call, per computation)&lt;/li&gt;
&lt;li&gt;They need sophisticated policy controls to prevent runaway spending&lt;/li&gt;
&lt;li&gt;They require audit trails for compliance and debugging&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;WAIaaS bridges this gap with wallet infrastructure purpose-built for AI agents. Instead of retrofitting human-centered wallets, it starts from the agent's requirements: REST APIs, session-based authentication, programmable policies, and autonomous transaction execution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Session-Based Authentication: Agents Without Private Keys
&lt;/h2&gt;

&lt;p&gt;The fundamental challenge is giving agents transaction capabilities without exposing private keys. WAIaaS solves this with session-based authentication:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create a session for your AI agent (one-time setup)&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/sessions &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Master-Password: my-secret-password"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"walletId": "&amp;lt;wallet-uuid&amp;gt;"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent receives a session token with limited capabilities and lifetime. It can transact within predefined policies, but cannot access the underlying private keys:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Agent checks its balance autonomously&lt;/span&gt;
curl http://127.0.0.1:3100/v1/wallet/balance &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_eyJhbGciOiJIUzI1NiJ9..."&lt;/span&gt;

&lt;span class="c"&gt;# Agent executes DeFi trade&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/actions/jupiter-swap/swap &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "inputMint": "So11111111111111111111111111111111111111112",
    "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "amount": "1000000000"
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Policy-Driven Autonomy: Smart Guardrails
&lt;/h2&gt;

&lt;p&gt;True autonomy doesn't mean unlimited freedom. The most successful autonomous agents operate within clearly defined boundaries. WAIaaS implements this through 21 policy types with 4 security tiers: INSTANT, NOTIFY, DELAY, and APPROVAL.&lt;/p&gt;

&lt;p&gt;For an AI trading agent, you might configure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Master-Password: my-secret-password"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "SPENDING_LIMIT",
    "rules": {
      "instant_max_usd": 100,
      "notify_max_usd": 1000,
      "delay_max_usd": 5000,
      "delay_seconds": 300,
      "daily_limit_usd": 10000
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a four-tier system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trades under $100: Execute immediately&lt;/li&gt;
&lt;li&gt;$100-$1000: Execute and notify the owner&lt;/li&gt;
&lt;li&gt;$1000-$5000: Wait 5 minutes (allowing cancellation), then execute
&lt;/li&gt;
&lt;li&gt;Above $5000: Require explicit human approval&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can layer multiple policies. Add contract whitelists to restrict which DEXs the agent can use, time restrictions for trading hours, or token whitelists to prevent the agent from buying speculative assets.&lt;/p&gt;

&lt;h2&gt;
  
  
  x402 HTTP Payments: Agents as API Customers
&lt;/h2&gt;

&lt;p&gt;One of the most immediate use cases for autonomous agent payments is API consumption. The x402 HTTP payment protocol lets agents automatically pay for API calls without pre-funded accounts or subscription management.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;WAIaaSClient&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@waiaas/sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;WAIaaSClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;baseUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;http://127.0.0.1:3100&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;sessionToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;WAIAAS_SESSION_TOKEN&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Agent makes HTTP request, automatically pays if 402 Payment Required&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;x402Fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://api.premium-data.com/market-data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;GET&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Accept&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;marketData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Behind the scenes, if the API returns a 402 status code, WAIaaS automatically:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Parses the payment request&lt;/li&gt;
&lt;li&gt;Checks agent policies (is this domain whitelisted? Is the amount within limits?)&lt;/li&gt;
&lt;li&gt;Executes payment&lt;/li&gt;
&lt;li&gt;Retries the original request with payment proof&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This enables new business models. API providers can charge per-call instead of managing subscriptions. Agents can dynamically discover and pay for services they need. The economic friction between agents and services disappears.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multi-Chain DeFi Operations
&lt;/h2&gt;

&lt;p&gt;Autonomous agents excel at complex DeFi strategies that require 24/7 monitoring and rapid execution. WAIaaS supports 15 DeFi protocols across multiple chains, enabling agents to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provide liquidity across AMMs and rebalance based on fee returns&lt;/li&gt;
&lt;li&gt;Execute yield farming strategies, automatically compounding rewards&lt;/li&gt;
&lt;li&gt;Manage lending positions, adjusting collateral to maintain healthy ratios&lt;/li&gt;
&lt;li&gt;Execute cross-chain arbitrage via bridging protocols&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An agent monitoring Aave positions can automatically supply additional collateral if the health factor drops:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Agent checks current DeFi positions&lt;/span&gt;
curl http://127.0.0.1:3100/v1/defi/positions &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt;

&lt;span class="c"&gt;# If health factor is low, supply more collateral&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/actions/aave-v3/supply &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "asset": "0xA0b86a33E6441d89C6fE6D9E9Dc3A6E7e57B4F2a",
    "amount": "1000000000000000000"
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Real-World Implementation: MCP Integration
&lt;/h2&gt;

&lt;p&gt;The Model Context Protocol (MCP) provides a standardized way for AI assistants to access external tools and data. WAIaaS offers 45 MCP tools that turn any MCP-compatible AI assistant into an autonomous economic agent.&lt;/p&gt;

&lt;p&gt;Setting up Claude Desktop with WAIaaS takes minutes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install CLI and start daemon&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @waiaas/cli
waiaas init
waiaas start

&lt;span class="c"&gt;# Create wallets and sessions, auto-configure MCP&lt;/span&gt;
waiaas quickset &lt;span class="nt"&gt;--mode&lt;/span&gt; mainnet
waiaas mcp setup &lt;span class="nt"&gt;--all&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now Claude can autonomously:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check wallet balances: "What's my current portfolio value?"&lt;/li&gt;
&lt;li&gt;Execute trades: "Swap 0.1 SOL for USDC on Jupiter"&lt;/li&gt;
&lt;li&gt;Manage DeFi positions: "Show my lending positions and health factors"&lt;/li&gt;
&lt;li&gt;Pay for premium data: "Get the latest options flow data for AAPL"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The agent operates within your predefined policies, with full transaction history and the ability to require approval for large operations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security Model: Three Layers of Protection
&lt;/h2&gt;

&lt;p&gt;Autonomous agents handling real funds require robust security. WAIaaS implements three layers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer 1: Session Authentication&lt;/strong&gt;&lt;br&gt;
Agents never access private keys directly. Sessions provide limited capabilities with configurable TTL and renewal limits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer 2: Policy Engine&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
21 policy types enforce spending limits, contract whitelists, time restrictions, and more. Default-deny architecture blocks transactions unless explicitly allowed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer 3: Human Override&lt;/strong&gt;&lt;br&gt;
Fund owners retain ultimate control through WalletConnect integration. Kill switches, transaction approval, and emergency recovery ensure humans can intervene when needed.&lt;/p&gt;

&lt;p&gt;This creates the optimal balance: agents operate autonomously within safe boundaries, but humans maintain oversight and control.&lt;/p&gt;
&lt;h2&gt;
  
  
  Getting Started: Deploy an Economic Agent
&lt;/h2&gt;

&lt;p&gt;Ready to build your first autonomous economic agent? Here's the minimal setup:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Start WAIaaS Infrastructure&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @waiaas/cli
waiaas init
waiaas start
waiaas quickset &lt;span class="nt"&gt;--mode&lt;/span&gt; mainnet  &lt;span class="c"&gt;# Creates wallets + sessions&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Configure Your AI Agent&lt;/strong&gt;&lt;br&gt;
Add MCP integration to Claude Desktop or use the SDK directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;WAIaaSClient&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@waiaas/sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;WAIaaSClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;baseUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;http://127.0.0.1:3100&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;sessionToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;WAIAAS_SESSION_TOKEN&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Set Policies&lt;/strong&gt;&lt;br&gt;
Define what your agent can do autonomously:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Allow small transactions instantly, require approval for large ones&lt;/span&gt;
waiaas policies create &lt;span class="nt"&gt;--type&lt;/span&gt; SPENDING_LIMIT &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--instant-max&lt;/span&gt; 50 &lt;span class="nt"&gt;--delay-max&lt;/span&gt; 500 &lt;span class="nt"&gt;--approval-above&lt;/span&gt; 1000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4: Fund and Deploy&lt;/strong&gt;&lt;br&gt;
Transfer initial funds to your agent's wallet and let it start operating. Monitor via the admin UI at &lt;code&gt;http://localhost:3100/admin&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The agent can now participate in the economy: paying for APIs, executing trades, managing DeFi positions, and more — all within the guardrails you've defined.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Road Ahead: Agents as Economic Participants
&lt;/h2&gt;

&lt;p&gt;We're at the beginning of a fundamental shift. AI agents are evolving from tools that provide information to autonomous actors that take economic action. This requires infrastructure that doesn't exist in traditional fintech or DeFi — it needs to be built specifically for agents.&lt;/p&gt;

&lt;p&gt;The implications extend beyond individual agents. We're heading toward agent-to-agent commerce, where AI systems automatically discover, negotiate with, and pay each other for services. Imagine an AI researcher that automatically purchases compute from cloud providers, pays for academic paper access, and compensates data providers — all without human intervention.&lt;/p&gt;

&lt;p&gt;This future requires wallet infrastructure designed for autonomy, not retrofitted from human-centered systems. WAIaaS provides that foundation today.&lt;/p&gt;

&lt;p&gt;For more insights on AI agent infrastructure, check out &lt;a href="https://dev.to/walletguy/how-to-set-up-ai-agents-with-wallet-access-using-mcp-5a8l"&gt;How to Set Up AI Agents with Wallet Access Using MCP&lt;/a&gt; and &lt;a href="https://dev.to/walletguy/why-ai-agents-need-their-own-wallets-2eh7"&gt;Why AI Agents Need Their Own Wallets&lt;/a&gt; for deeper technical details.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;The autonomous agent economy is emerging now, not in some distant future. The question isn't whether AI agents will need economic capabilities — it's whether you'll be ready to deploy them safely and effectively.&lt;/p&gt;

&lt;p&gt;Start experimenting with autonomous agents today. Explore the full codebase on &lt;a href="https://github.com/minhoyoo-iotrust/WAIaaS" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; or learn more at &lt;a href="https://waiaas.ai" rel="noopener noreferrer"&gt;waiaas.ai&lt;/a&gt;. The infrastructure for the agent economy is here — what will you build with it?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>defi</category>
      <category>web3</category>
      <category>trading</category>
    </item>
    <item>
      <title>7-Stage Transaction Validation: How AI Agents Execute Safe DeFi Operations</title>
      <dc:creator>Wallet Guy</dc:creator>
      <pubDate>Sat, 02 May 2026 08:02:17 +0000</pubDate>
      <link>https://forem.com/walletguy/7-stage-transaction-validation-how-ai-agents-execute-safe-defi-operations-gee</link>
      <guid>https://forem.com/walletguy/7-stage-transaction-validation-how-ai-agents-execute-safe-defi-operations-gee</guid>
      <description>&lt;p&gt;Giving an AI agent access to your DeFi portfolio without proper guardrails is like handing over your bank account with a sticky note saying "please be careful." Most wallet-as-a-service solutions either give agents unlimited access or rely on simple spending limits that don't account for the complexity of DeFi operations. WAIaaS takes a different approach with a 7-stage transaction pipeline that validates every operation through multiple security layers before execution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Multi-Stage Validation Matters
&lt;/h2&gt;

&lt;p&gt;DeFi operations carry amplified risks compared to simple transfers. When your AI agent interacts with lending protocols, DEXs, or yield farms, a single malicious or misconfigured transaction can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Approve unlimited token spending to untrusted contracts&lt;/li&gt;
&lt;li&gt;Deposit funds into high-risk lending pools&lt;/li&gt;
&lt;li&gt;Execute leveraged positions beyond your risk tolerance
&lt;/li&gt;
&lt;li&gt;Interact with unaudited or compromised protocols&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Traditional approaches either block AI agents entirely or use crude spending limits that don't distinguish between sending $100 to your friend versus approving $100 to an experimental DeFi protocol. WAIaaS recognizes that transaction amount alone doesn't determine risk—context matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 7-Stage Transaction Pipeline
&lt;/h2&gt;

&lt;p&gt;WAIaaS processes every transaction through seven sequential stages, each with specific validation logic and security checks. Here's how an AI agent's Jupiter swap request gets validated:&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 1: Validate
&lt;/h3&gt;

&lt;p&gt;The pipeline first validates the transaction structure, network compatibility, and basic feasibility checks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Example: AI agent requests SOL → USDC swap&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/actions/jupiter-swap/swap &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "inputMint": "So11111111111111111111111111111111111111112",
    "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "amount": "1000000000"
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stage 1 validates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Transaction type matches expected schema (7 types: Transfer, TokenTransfer, ContractCall, Approve, Batch, NftTransfer, ContractDeploy)&lt;/li&gt;
&lt;li&gt;Target network is active and RPC accessible&lt;/li&gt;
&lt;li&gt;Basic parameter validation (addresses, amounts, gas estimates)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Stage 2: Authentication
&lt;/h3&gt;

&lt;p&gt;Three authentication methods provide different security contexts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# sessionAuth — AI agent operations (transactions, queries)&lt;/span&gt;
&lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_eyJhbGciOiJIUzI1NiJ9..."&lt;/span&gt;

&lt;span class="c"&gt;# masterAuth — system administration (policies, wallet creation)&lt;/span&gt;
&lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Master-Password: my-secret-password"&lt;/span&gt;  

&lt;span class="c"&gt;# ownerAuth — fund owner (approvals, emergency controls)&lt;/span&gt;
&lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Owner-Signature: &amp;lt;ed25519-or-secp256k1-signature&amp;gt;"&lt;/span&gt;
&lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"X-Owner-Message: &amp;lt;signed-message&amp;gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Session tokens include TTL, renewal limits, and absolute lifetime bounds. The pipeline verifies the session is valid, not expired, and authorized for the requested operation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 3: Policy Engine
&lt;/h3&gt;

&lt;p&gt;This is where WAIaaS's security model shines. The policy engine evaluates 21 different policy types against the transaction, assigning one of four security tiers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create a comprehensive DeFi policy&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'X-Master-Password: &amp;lt;password&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "SPENDING_LIMIT",
    "rules": {
      "instant_max_usd": 50,
      "notify_max_usd": 200,
      "delay_max_usd": 1000,
      "delay_seconds": 300,
      "daily_limit_usd": 2000
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Default-Deny Protection&lt;/strong&gt;: The policy engine implements default-deny for critical operations. Without explicit ALLOWED_TOKENS and CONTRACT_WHITELIST policies, agents cannot transfer tokens or interact with smart contracts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Four Security Tiers&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;INSTANT&lt;/strong&gt;: Execute immediately (low-risk operations under threshold)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NOTIFY&lt;/strong&gt;: Execute immediately, send notification to owner
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DELAY&lt;/strong&gt;: Queue for time delay, owner can cancel during delay period&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;APPROVAL&lt;/strong&gt;: Require explicit human approval before execution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For our Jupiter swap example, the policy engine checks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SPENDING_LIMIT: Is 1 SOL under the appropriate tier threshold?&lt;/li&gt;
&lt;li&gt;ALLOWED_TOKENS: Is SOL → USDC swap permitted?&lt;/li&gt;
&lt;li&gt;CONTRACT_WHITELIST: Is Jupiter router address approved?&lt;/li&gt;
&lt;li&gt;RATE_LIMIT: Has the agent exceeded transaction frequency limits?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Stage 4: Wait (Conditional)
&lt;/h3&gt;

&lt;p&gt;If the policy engine assigns DELAY tier, the transaction enters a waiting period. During this time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Transaction is queued with visible countdown timer&lt;/li&gt;
&lt;li&gt;Owner receives notification with cancellation option&lt;/li&gt;
&lt;li&gt;Agent receives pending status, not failure&lt;/li&gt;
&lt;li&gt;Emergency kill switch can cancel all pending transactions
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"tx_abc123"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"PENDING_DELAY"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"delayUntil"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2024-03-15T10:35:00Z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"delaySeconds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"cancellable"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Stage 5: Execute
&lt;/h3&gt;

&lt;p&gt;For approved transactions, the execution stage handles the actual blockchain interaction:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gas price conditional execution (wait for gas below threshold)&lt;/li&gt;
&lt;li&gt;Nonce management and transaction ordering
&lt;/li&gt;
&lt;li&gt;Multi-chain RPC routing&lt;/li&gt;
&lt;li&gt;Dry-run simulation before real execution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The pipeline supports complex transaction types including ERC-4337 Account Abstraction UserOps and batch transactions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 6: Confirm
&lt;/h3&gt;

&lt;p&gt;Final stage monitors blockchain confirmation and updates transaction status:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Block confirmation tracking&lt;/li&gt;
&lt;li&gt;Failed transaction detection and retry logic&lt;/li&gt;
&lt;li&gt;Balance updates and cache invalidation&lt;/li&gt;
&lt;li&gt;Notification dispatch for completed operations&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Real-World Policy Configuration
&lt;/h2&gt;

&lt;p&gt;Here's how to configure policies that make sense for AI agents operating in DeFi:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Token Whitelist (Required for Agent Operations)&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'X-Master-Password: &amp;lt;password&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "ALLOWED_TOKENS",
    "rules": {
      "tokens": [
        {"address": "So11111111111111111111111111111111111111112", "symbol": "SOL", "chain": "solana"},
        {"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "symbol": "USDC", "chain": "solana"}
      ]
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;DeFi Protocol Whitelist&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'X-Master-Password: &amp;lt;password&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "CONTRACT_WHITELIST", 
    "rules": {
      "contracts": [
        {"address": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4", "name": "Jupiter", "chain": "solana"},
        {"address": "KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD", "name": "Kamino", "chain": "solana"}
      ]
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Lending Risk Controls&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'X-Master-Password: &amp;lt;password&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "LENDING_LTV_LIMIT",
    "rules": {
      "maxLtv": 0.65,
      "assetWhitelist": ["SOL", "USDC", "ETH"]
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Security Through Multiple Layers
&lt;/h2&gt;

&lt;p&gt;WAIaaS implements defense in depth through three distinct security layers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer 1: Session Authentication + Time Limits&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JWT session tokens with configurable TTL and renewal limits&lt;/li&gt;
&lt;li&gt;Per-session absolute lifetime bounds&lt;/li&gt;
&lt;li&gt;Immediate revocation capability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Layer 2: Policy Engine + Time Delays&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;21 policy types covering spending, contracts, networks, DeFi parameters&lt;/li&gt;
&lt;li&gt;Time delays allow human intervention before execution&lt;/li&gt;
&lt;li&gt;Default-deny for undefined scenarios&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Layer 3: Human Approval + Kill Switch&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WalletConnect integration for mobile approval workflows&lt;/li&gt;
&lt;li&gt;Telegram and push notification channels for approval requests&lt;/li&gt;
&lt;li&gt;Emergency kill switch to halt all agent operations&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Start: Secure AI Agent Setup
&lt;/h2&gt;

&lt;p&gt;Here's how to set up a DeFi-capable AI agent with proper security guardrails:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install and initialize WAIaaS&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @waiaas/cli
waiaas init
waiaas start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create wallet and session&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;waiaas wallet create &lt;span class="nt"&gt;--name&lt;/span&gt; defi-agent &lt;span class="nt"&gt;--chain&lt;/span&gt; solana &lt;span class="nt"&gt;--environment&lt;/span&gt; mainnet
waiaas session prompt &lt;span class="nt"&gt;--wallet-name&lt;/span&gt; defi-agent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Configure security policies&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Spending limits with 4-tier security&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'X-Master-Password: &amp;lt;password&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "SPENDING_LIMIT",
    "rules": {
      "instant_max_usd": 10,
      "notify_max_usd": 100, 
      "delay_max_usd": 500,
      "delay_seconds": 600,
      "daily_limit_usd": 1000
    }
  }'&lt;/span&gt;

&lt;span class="c"&gt;# Allow specific tokens and protocols&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'X-Master-Password: &amp;lt;password&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "ALLOWED_TOKENS",
    "rules": {"tokens": [{"address": "So11111111111111111111111111111111111111112", "symbol": "SOL", "chain": "solana"}]}
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Test the pipeline with a dry run&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/transactions/send &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "type": "TRANSFER",
    "to": "recipient-address",
    "amount": "0.01",
    "dryRun": true
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Set up approval channels for high-value transactions&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;waiaas owner connect  &lt;span class="c"&gt;# WalletConnect for mobile approvals&lt;/span&gt;
waiaas notification setup  &lt;span class="c"&gt;# Configure push notifications&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The 7-stage pipeline ensures your AI agent operates within defined boundaries while maintaining the flexibility to execute complex DeFi strategies. Each stage provides specific validation logic, and the policy engine gives you granular control over risk parameters.&lt;/p&gt;

&lt;p&gt;For developers building autonomous trading systems or yield optimization bots, this approach provides the security foundation needed to deploy AI agents with real funds. The pipeline processes over 683 test cases across all transaction types and DeFi protocols, ensuring robust validation of edge cases and attack vectors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Related posts that dive deeper:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/walletguy/open-source-wallet-as-a-service-self-hosted-alternative-to-coinbase-developer-platform-2d4b"&gt;Open-Source Wallet-as-a-Service: Self-Hosted Alternative to Coinbase Developer Platform&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/walletguy/ai-agent-crypto-wallets-mcp-integration-for-claude-desktop-and-cline-18hm"&gt;AI Agent Crypto Wallets: MCP Integration for Claude Desktop and Cline&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;The 7-stage transaction pipeline provides the security foundation, but WAIaaS offers additional capabilities for production AI agents including cross-chain bridging, NFT management, and x402 HTTP payment protocols. Explore the full codebase at &lt;a href="https://github.com/minhoyoo-iotrust/WAIaaS" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; or learn more about self-hosted deployment at &lt;a href="https://waiaas.ai" rel="noopener noreferrer"&gt;waiaas.ai&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>defi</category>
      <category>architecture</category>
    </item>
    <item>
      <title>15 DeFi Protocols, 631 Tests: Building Reliable Multi-Protocol Trading Infrastructure</title>
      <dc:creator>Wallet Guy</dc:creator>
      <pubDate>Fri, 01 May 2026 14:20:51 +0000</pubDate>
      <link>https://forem.com/walletguy/15-defi-protocols-631-tests-building-reliable-multi-protocol-trading-infrastructure-3n1c</link>
      <guid>https://forem.com/walletguy/15-defi-protocols-631-tests-building-reliable-multi-protocol-trading-infrastructure-3n1c</guid>
      <description>&lt;p&gt;Your arb bot spotted the opportunity — Jupiter has USDC 2 basis points cheaper than the CEX. But by the time your bot assembles the wallet connection, builds the transaction, handles gas estimation, and executes the swap, the opportunity is gone. You need trading infrastructure that executes in milliseconds, not seconds.&lt;/p&gt;

&lt;p&gt;Building reliable trading infrastructure across 15 DeFi protocols isn't just about connecting to APIs. It's about gas optimization, execution reliability, and risk controls that keep your bot profitable when markets move fast. One failed transaction or missed arbitrage opportunity costs more than robust infrastructure saves.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Multi-Protocol Trading Infrastructure Matters
&lt;/h2&gt;

&lt;p&gt;Professional trading operations don't stick to one DEX. They arbitrage between Jupiter and Drift on Solana, hedge positions across Aave and Hyperliquid, and bridge liquidity via LI.FI when opportunities emerge on different chains. Each protocol has different APIs, different transaction patterns, and different failure modes.&lt;/p&gt;

&lt;p&gt;Your trading bot needs to execute complex strategies: spot a price difference on Jupiter, immediately hedge with a perpetual position on Drift, maybe stake the proceeds on Jito for yield. These multi-step strategies require atomic execution — if step 2 fails, you're left with unwanted exposure.&lt;/p&gt;

&lt;p&gt;Traditional approaches force you to integrate each protocol separately: Jupiter's SDK for swaps, Drift's SDK for perps, Aave's contracts for lending. Managing 15 different SDKs, keeping them updated, handling their different error patterns — that's months of infrastructure work before you write a single trading strategy.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Multi-Protocol Approach
&lt;/h2&gt;

&lt;p&gt;WAIaaS provides a unified API layer across 15 DeFi protocols with 631+ tests ensuring execution reliability. Instead of managing multiple SDKs, your bot makes simple HTTP calls to a local daemon that handles protocol-specific complexity.&lt;/p&gt;

&lt;p&gt;Here's how your bot executes a cross-protocol strategy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Check positions across all protocols&lt;/span&gt;
curl http://127.0.0.1:3100/v1/defi/positions &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt;

&lt;span class="c"&gt;# Response shows unified view&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"positions"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
    &lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"protocol"&lt;/span&gt;: &lt;span class="s2"&gt;"jupiter-swap"&lt;/span&gt;, &lt;span class="s2"&gt;"type"&lt;/span&gt;: &lt;span class="s2"&gt;"swap"&lt;/span&gt;, &lt;span class="s2"&gt;"value_usd"&lt;/span&gt;: 0&lt;span class="o"&gt;}&lt;/span&gt;,
    &lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"protocol"&lt;/span&gt;: &lt;span class="s2"&gt;"drift"&lt;/span&gt;, &lt;span class="s2"&gt;"type"&lt;/span&gt;: &lt;span class="s2"&gt;"perp"&lt;/span&gt;, &lt;span class="s2"&gt;"market"&lt;/span&gt;: &lt;span class="s2"&gt;"SOL-PERP"&lt;/span&gt;, &lt;span class="s2"&gt;"size"&lt;/span&gt;: &lt;span class="s2"&gt;"-1.5"&lt;/span&gt;, &lt;span class="s2"&gt;"pnl_usd"&lt;/span&gt;: 125.50&lt;span class="o"&gt;}&lt;/span&gt;,
    &lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"protocol"&lt;/span&gt;: &lt;span class="s2"&gt;"jito-staking"&lt;/span&gt;, &lt;span class="s2"&gt;"type"&lt;/span&gt;: &lt;span class="s2"&gt;"stake"&lt;/span&gt;, &lt;span class="s2"&gt;"amount"&lt;/span&gt;: &lt;span class="s2"&gt;"45.2"&lt;/span&gt;, &lt;span class="s2"&gt;"rewards_usd"&lt;/span&gt;: 12.30&lt;span class="o"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;]&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Execute a Jupiter swap when gas conditions are favorable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Set gas condition — only execute when gas &amp;lt; 0.0001 SOL&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/actions/jupiter-swap/swap &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "inputMint": "So11111111111111111111111111111111111111112",
    "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "amount": "1000000000",
    "gasCondition": {"maxGasPrice": "100000"}
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The transaction queues until gas price meets your threshold, then executes automatically. No polling, no gas price monitoring — the infrastructure handles timing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Production-Grade Execution Pipeline
&lt;/h2&gt;

&lt;p&gt;Every transaction flows through a 7-stage pipeline designed for trading reliability:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Validation&lt;/strong&gt; — Check balance, validate addresses, ensure sufficient gas&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authentication&lt;/strong&gt; — Verify session token, check permissions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Policy&lt;/strong&gt; — Apply spending limits, gas conditions, protocol restrictions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wait&lt;/strong&gt; — Queue for gas conditions or rate limits&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execute&lt;/strong&gt; — Submit to blockchain with retry logic&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm&lt;/strong&gt; — Monitor for confirmation, handle reorgs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Notify&lt;/strong&gt; — Update bot with final status&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This pipeline prevents the common trading bot failures: insufficient balance checks, gas estimation errors, dropped transactions, missed confirmations.&lt;/p&gt;

&lt;p&gt;Here's how your bot handles a complex arbitrage strategy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Build batch transaction — buy on Jupiter, hedge on Drift&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/transactions/send &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "type": "BATCH",
    "transactions": [
      {
        "type": "ACTION",
        "provider": "jupiter-swap",
        "action": "swap",
        "params": {
          "inputMint": "So11111111111111111111111111111111111111112",
          "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
          "amount": "1000000000"
        }
      },
      {
        "type": "ACTION",
        "provider": "drift",
        "action": "place_order",
        "params": {
          "market": "SOL-PERP",
          "side": "short",
          "size": "1.0",
          "orderType": "market"
        }
      }
    ]
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both transactions execute atomically — if the Drift order fails, the Jupiter swap is reverted. No partial fills, no unwanted exposure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Risk Controls for Automated Trading
&lt;/h2&gt;

&lt;p&gt;Trading bots need automated risk controls. WAIaaS provides 21 policy types with 4 security tiers specifically designed for algorithmic trading.&lt;/p&gt;

&lt;p&gt;Set position size limits per protocol:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'X-Master-Password: &amp;lt;password&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "PERP_MAX_POSITION_USD",
    "rules": {
      "maxPositionUsd": 10000,
      "protocols": ["drift", "hyperliquid"]
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Implement gas-conditional trading — only execute when profitable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"type"&lt;/span&gt;: &lt;span class="s2"&gt;"GAS_CONDITION"&lt;/span&gt;,
  &lt;span class="s2"&gt;"rules"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"maxGasPrice"&lt;/span&gt;: &lt;span class="s2"&gt;"100000"&lt;/span&gt;,
    &lt;span class="s2"&gt;"maxSlippage"&lt;/span&gt;: &lt;span class="s2"&gt;"0.005"&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your bot submits trades anytime. The policy engine ensures they only execute when gas costs preserve profitability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cross-Chain Arbitrage Infrastructure
&lt;/h2&gt;

&lt;p&gt;Real arbitrage opportunities span chains. WAIaaS handles cross-chain complexity through integrated bridging protocols.&lt;/p&gt;

&lt;p&gt;Execute Ethereum → Solana arbitrage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Step 1: Bridge USDC from Ethereum to Solana via LI.FI&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/actions/lifi/bridge &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "fromChain": "ethereum-mainnet",
    "toChain": "solana-mainnet",
    "token": "0xA0b86a33E6441c4ED7a4c03b6d80b1f3aFF6A4F7",
    "amount": "1000000000"
  }'&lt;/span&gt;

&lt;span class="c"&gt;# Step 2: Auto-execute Jupiter swap once bridge completes&lt;/span&gt;
&lt;span class="c"&gt;# (WAIaaS monitors bridge status, executes follow-up automatically)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The infrastructure tracks bridge completions and executes follow-up trades without manual intervention. Cross-chain arbitrage becomes a single API call.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Start for Trading Bots
&lt;/h2&gt;

&lt;p&gt;Get your trading infrastructure running in minutes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Deploy with Docker&lt;/strong&gt; — Production-ready deployment
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/minhoyoo-iotrust/WAIaaS.git
&lt;span class="nb"&gt;cd &lt;/span&gt;WAIaaS
docker compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create trading wallet&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker &lt;span class="nb"&gt;exec &lt;/span&gt;waiaas-daemon waiaas-cli wallet create &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; trading-bot &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--chain&lt;/span&gt; solana &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--environment&lt;/span&gt; mainnet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Generate session token for your bot&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker &lt;span class="nb"&gt;exec &lt;/span&gt;waiaas-daemon waiaas-cli session create &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--wallet-id&lt;/span&gt; &amp;lt;wallet-uuid&amp;gt;
&lt;span class="c"&gt;# Returns: wai_sess_eyJhbGciOiJIUzI1NiJ9...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Configure trading policies&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'X-Master-Password: &amp;lt;password&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "SPENDING_LIMIT",
    "rules": {
      "instant_max_usd": 1000,
      "daily_limit_usd": 50000
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start trading&lt;/strong&gt; — Your bot makes HTTP calls, WAIaaS handles execution
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;WAIAAS_SESSION_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"wai_sess_..."&lt;/span&gt;
&lt;span class="c"&gt;# Your trading bot is now live&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your trading infrastructure is now handling gas optimization, transaction reliability, and cross-protocol execution. Focus on strategy, not plumbing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance and Reliability
&lt;/h2&gt;

&lt;p&gt;With 631+ tests across 15 protocols, WAIaaS infrastructure handles the edge cases that break trading bots: failed transactions, network congestion, protocol upgrades, slippage protection. The 7-stage execution pipeline ensures your trades execute reliably even when market conditions change rapidly.&lt;/p&gt;

&lt;p&gt;Gas conditional execution means your arbitrage strategies remain profitable even during network congestion. Transaction batching reduces MEV exposure. Cross-chain bridging opens opportunities beyond single-chain trading.&lt;/p&gt;

&lt;p&gt;Trading bot development shifts from months of infrastructure work to days of strategy implementation.&lt;/p&gt;

&lt;p&gt;For more trading infrastructure insights, check out &lt;a href="https://dev.to/walletguy/building-ai-trading-bots-with-mcp-integration"&gt;Building AI Trading Bots with MCP Integration&lt;/a&gt; and &lt;a href="https://dev.to/walletguy/docker-deployment-production-trading"&gt;Docker Deployment for Production Trading&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;Your trading bot needs reliable infrastructure that executes in milliseconds, not seconds. WAIaaS provides the multi-protocol foundation that lets you focus on profitable strategies instead of wallet plumbing.&lt;/p&gt;

&lt;p&gt;Ready to build serious trading infrastructure? Get started at &lt;a href="https://github.com/minhoyoo-iotrust/WAIaaS" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; or explore the full platform at &lt;a href="https://waiaas.ai" rel="noopener noreferrer"&gt;waiaas.ai&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>defi</category>
      <category>testing</category>
      <category>blockchain</category>
      <category>architecture</category>
    </item>
    <item>
      <title>All 45 MCP Tools Explained: Complete Reference for Claude AI Agents</title>
      <dc:creator>Wallet Guy</dc:creator>
      <pubDate>Fri, 01 May 2026 08:27:10 +0000</pubDate>
      <link>https://forem.com/walletguy/all-45-mcp-tools-explained-complete-reference-for-claude-ai-agents-23ne</link>
      <guid>https://forem.com/walletguy/all-45-mcp-tools-explained-complete-reference-for-claude-ai-agents-23ne</guid>
      <description>&lt;p&gt;MCP tools transform Claude from a text-only assistant into an agent capable of executing onchain transactions, managing DeFi positions, and handling cryptocurrency operations. WAIaaS provides 45 specialized MCP tools that integrate seamlessly with Claude Desktop, giving your AI agent comprehensive blockchain capabilities without requiring custom integrations or complex setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why MCP Integration Matters for AI Agents
&lt;/h2&gt;

&lt;p&gt;Most AI agents can only read blockchain data or generate transaction code that humans must execute manually. This creates a frustrating gap between what the agent knows and what it can actually do. The Model Context Protocol (MCP) bridges this gap by providing a standardized way for Claude to call external tools directly.&lt;/p&gt;

&lt;p&gt;With WAIaaS MCP integration, Claude can check wallet balances, execute DeFi swaps, manage lending positions, transfer NFTs, and even handle micropayments for API calls — all autonomously within the conversation. This transforms Claude from a helpful advisor into an active participant in your onchain workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Complete MCP Tool Reference
&lt;/h2&gt;

&lt;p&gt;WAIaaS provides 45 MCP tools organized into five categories. Here's the complete reference:&lt;/p&gt;

&lt;h3&gt;
  
  
  Wallet Management Tools
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;get-balance&lt;/strong&gt; — Returns native token balance and USD value&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# What Claude sees when you ask "What's my balance?"&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"balance"&lt;/span&gt;: &lt;span class="s2"&gt;"2.5"&lt;/span&gt;,
  &lt;span class="s2"&gt;"symbol"&lt;/span&gt;: &lt;span class="s2"&gt;"SOL"&lt;/span&gt;, 
  &lt;span class="s2"&gt;"usd_value"&lt;/span&gt;: 425.50,
  &lt;span class="s2"&gt;"chain"&lt;/span&gt;: &lt;span class="s2"&gt;"solana"&lt;/span&gt;,
  &lt;span class="s2"&gt;"network"&lt;/span&gt;: &lt;span class="s2"&gt;"mainnet"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;get-address&lt;/strong&gt; — Get wallet's public address&lt;br&gt;
&lt;strong&gt;get-wallet-info&lt;/strong&gt; — Complete wallet metadata including creation date and chain&lt;br&gt;
&lt;strong&gt;get-assets&lt;/strong&gt; — List all token holdings with balances and USD values&lt;br&gt;
&lt;strong&gt;get-tokens&lt;/strong&gt; — Available tokens for the current network&lt;br&gt;
&lt;strong&gt;list-credentials&lt;/strong&gt; — Show configured RPC endpoints and API keys&lt;/p&gt;
&lt;h3&gt;
  
  
  Transaction Tools
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;send-token&lt;/strong&gt; — Transfer native tokens or SPL/ERC-20 tokens&lt;br&gt;
&lt;strong&gt;transfer-nft&lt;/strong&gt; — Transfer NFTs with automatic metadata resolution&lt;br&gt;
&lt;strong&gt;send-batch&lt;/strong&gt; — Execute multiple transactions atomically&lt;br&gt;
&lt;strong&gt;sign-transaction&lt;/strong&gt; — Sign arbitrary transactions without broadcasting&lt;br&gt;
&lt;strong&gt;sign-message&lt;/strong&gt; — Sign messages for authentication or proofs&lt;br&gt;
&lt;strong&gt;get-transaction&lt;/strong&gt; — Retrieve transaction details and status&lt;br&gt;
&lt;strong&gt;list-transactions&lt;/strong&gt; — Transaction history with filtering options&lt;br&gt;
&lt;strong&gt;simulate-transaction&lt;/strong&gt; — Dry-run transactions before execution&lt;/p&gt;

&lt;p&gt;Example of Claude using send-token:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# User: "Send 0.1 SOL to Alice"&lt;/span&gt;
&lt;span class="c"&gt;# Claude calls send-token MCP tool:&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"type"&lt;/span&gt;: &lt;span class="s2"&gt;"TRANSFER"&lt;/span&gt;,
  &lt;span class="s2"&gt;"to"&lt;/span&gt;: &lt;span class="s2"&gt;"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"&lt;/span&gt;,
  &lt;span class="s2"&gt;"amount"&lt;/span&gt;: &lt;span class="s2"&gt;"0.1"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  DeFi Integration Tools
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;get-defi-positions&lt;/strong&gt; — View lending, staking, and LP positions across all protocols&lt;br&gt;
&lt;strong&gt;get-health-factor&lt;/strong&gt; — Current liquidation risk for lending positions&lt;br&gt;
&lt;strong&gt;action-provider&lt;/strong&gt; — Execute actions on any of the 15 supported DeFi protocols&lt;/p&gt;

&lt;p&gt;The action-provider tool works with these protocols:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;jupiter-swap&lt;/strong&gt; — Solana's best-price DEX aggregator&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;lido-staking&lt;/strong&gt; — Ethereum liquid staking&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;jito-staking&lt;/strong&gt; — Solana liquid staking
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;aave-v3&lt;/strong&gt; — Cross-chain lending and borrowing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;kamino&lt;/strong&gt; — Solana lending with leveraged strategies&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;hyperliquid&lt;/strong&gt; — Perpetual futures trading&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;polymarket&lt;/strong&gt; — Prediction market trading&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;lifi&lt;/strong&gt; — Cross-chain bridging&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;across&lt;/strong&gt; — Fast cross-chain transfers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;zerox-swap&lt;/strong&gt; — Professional-grade DEX trading&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pendle&lt;/strong&gt; — Yield tokenization and trading&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example DeFi interaction:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# User: "Swap 100 USDC for SOL on Jupiter"&lt;/span&gt;
&lt;span class="c"&gt;# Claude calls action-provider with jupiter-swap:&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"provider"&lt;/span&gt;: &lt;span class="s2"&gt;"jupiter-swap"&lt;/span&gt;,
  &lt;span class="s2"&gt;"action"&lt;/span&gt;: &lt;span class="s2"&gt;"swap"&lt;/span&gt;,
  &lt;span class="s2"&gt;"params"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"inputMint"&lt;/span&gt;: &lt;span class="s2"&gt;"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"&lt;/span&gt;,
    &lt;span class="s2"&gt;"outputMint"&lt;/span&gt;: &lt;span class="s2"&gt;"So11111111111111111111111111111111111111112"&lt;/span&gt;, 
    &lt;span class="s2"&gt;"amount"&lt;/span&gt;: &lt;span class="s2"&gt;"100000000"&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Policy and Security Tools
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;get-policies&lt;/strong&gt; — View active spending limits and security rules&lt;br&gt;
&lt;strong&gt;approve-token&lt;/strong&gt; — Approve ERC-20 token spending for DeFi protocols&lt;br&gt;
&lt;strong&gt;get-provider-status&lt;/strong&gt; — Check if DeFi providers are operational&lt;/p&gt;
&lt;h3&gt;
  
  
  Advanced Protocol Tools
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;build-userop&lt;/strong&gt; — Create ERC-4337 UserOperations for gasless transactions&lt;br&gt;
&lt;strong&gt;sign-userop&lt;/strong&gt; — Sign UserOperations for Account Abstraction&lt;br&gt;
&lt;strong&gt;call-contract&lt;/strong&gt; — Execute arbitrary smart contract calls&lt;br&gt;
&lt;strong&gt;encode-calldata&lt;/strong&gt; — Generate transaction calldata for contracts&lt;br&gt;
&lt;strong&gt;get-nonce&lt;/strong&gt; — Get current transaction nonce&lt;br&gt;
&lt;strong&gt;resolve-asset&lt;/strong&gt; — Resolve token symbols to addresses&lt;/p&gt;
&lt;h3&gt;
  
  
  Web3 Authentication Tools
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;erc8128-sign-request&lt;/strong&gt; — Sign HTTP requests with wallet for API authentication&lt;br&gt;
&lt;strong&gt;erc8128-verify-signature&lt;/strong&gt; — Verify ERC-8128 HTTP signatures&lt;br&gt;
&lt;strong&gt;wc-connect&lt;/strong&gt;, &lt;strong&gt;wc-disconnect&lt;/strong&gt;, &lt;strong&gt;wc-status&lt;/strong&gt; — WalletConnect session management&lt;/p&gt;
&lt;h3&gt;
  
  
  Reputation and Trust Tools
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;erc8004-get-agent-info&lt;/strong&gt; — Retrieve onchain agent metadata&lt;br&gt;
&lt;strong&gt;erc8004-get-reputation&lt;/strong&gt; — Check agent reputation score&lt;br&gt;
&lt;strong&gt;erc8004-get-validation-status&lt;/strong&gt; — Verify agent trustworthiness&lt;/p&gt;
&lt;h3&gt;
  
  
  NFT Tools
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;list-nfts&lt;/strong&gt; — Show all NFTs in wallet with metadata&lt;br&gt;
&lt;strong&gt;get-nft-metadata&lt;/strong&gt; — Detailed NFT information and attributes&lt;/p&gt;
&lt;h3&gt;
  
  
  Network and Infrastructure Tools
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;get-rpc-proxy-url&lt;/strong&gt; — Get proxied RPC endpoints for better reliability&lt;br&gt;
&lt;strong&gt;list-sessions&lt;/strong&gt; — Active AI agent sessions&lt;br&gt;
&lt;strong&gt;list-incoming-transactions&lt;/strong&gt; — Monitor incoming transfers&lt;br&gt;
&lt;strong&gt;get-incoming-summary&lt;/strong&gt; — Summary of recent deposits&lt;br&gt;
&lt;strong&gt;list-offchain-actions&lt;/strong&gt; — Pending transactions requiring approval&lt;/p&gt;
&lt;h3&gt;
  
  
  Micropayment Tools
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;x402-fetch&lt;/strong&gt; — HTTP requests with automatic cryptocurrency payment for 402 Payment Required responses&lt;/p&gt;

&lt;p&gt;Example of Claude using x402-fetch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# User: "Get premium market data from that paid API"&lt;/span&gt;
&lt;span class="c"&gt;# Claude calls x402-fetch, automatically pays the microfee, gets the data&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"url"&lt;/span&gt;: &lt;span class="s2"&gt;"https://api.example.com/premium-data"&lt;/span&gt;,
  &lt;span class="s2"&gt;"method"&lt;/span&gt;: &lt;span class="s2"&gt;"GET"&lt;/span&gt;,
  &lt;span class="s2"&gt;"auto_pay"&lt;/span&gt;: &lt;span class="nb"&gt;true&lt;/span&gt;,
  &lt;span class="s2"&gt;"max_payment_usd"&lt;/span&gt;: 0.10
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Quick Setup Guide
&lt;/h2&gt;

&lt;p&gt;Here's how to connect Claude Desktop to WAIaaS:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;: Start WAIaaS daemon&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @waiaas/cli
waiaas quickstart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;: Create a session for Claude&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;waiaas quickset &lt;span class="nt"&gt;--mode&lt;/span&gt; mainnet
&lt;span class="c"&gt;# Creates wallets + MCP sessions, prints config&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt;: Add to Claude Desktop config&lt;br&gt;
Open &lt;code&gt;~/Library/Application Support/Claude/claude_desktop_config.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"waiaas"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@waiaas/mcp"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"WAIAAS_BASE_URL"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://127.0.0.1:3100"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"WAIAAS_SESSION_TOKEN"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"wai_sess_eyJhbGciOiJIUzI1NiJ9..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"WAIAAS_DATA_DIR"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"~/.waiaas"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4&lt;/strong&gt;: Restart Claude Desktop and test&lt;br&gt;
Ask Claude: "What's my wallet balance?" You should see your actual onchain balance with USD values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5&lt;/strong&gt;: Set up security policies&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'X-Master-Password: &amp;lt;your-password&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "SPENDING_LIMIT", 
    "rules": {
      "instant_max_usd": 10,
      "notify_max_usd": 100,
      "delay_max_usd": 1000,
      "delay_seconds": 300
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Real-World Usage Examples
&lt;/h2&gt;

&lt;p&gt;With all 45 MCP tools available, Claude can handle sophisticated onchain workflows:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Portfolio Management&lt;/strong&gt;: "Show me my DeFi positions across all protocols and suggest rebalancing opportunities"&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude calls get-defi-positions, analyzes yield rates, suggests optimal allocation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cross-Chain Operations&lt;/strong&gt;: "Bridge 500 USDC from Ethereum to Arbitrum using the cheapest route"  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude calls action-provider with lifi, compares bridge costs, executes optimal route&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Automated Trading&lt;/strong&gt;: "If SOL drops below $100, swap half my SOL for USDC"&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude monitors prices, uses simulate-transaction for safety, executes conditional swaps&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;NFT Management&lt;/strong&gt;: "List my NFTs by floor price and transfer the least valuable one to my cold wallet"&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude calls list-nfts, fetches floor prices, identifies target NFT, executes transfer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Micropayment Workflows&lt;/strong&gt;: "Get the latest research report from three different crypto data providers"&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude uses x402-fetch to automatically pay for premium API access across multiple services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The key advantage is that Claude sees all wallet state, understands DeFi protocols, and can execute multi-step operations autonomously while respecting your security policies.&lt;/p&gt;

&lt;p&gt;Ready to give your Claude agent onchain superpowers? Get started at &lt;a href="https://github.com/minhoyoo-iotrust/WAIaaS" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; or visit the &lt;a href="https://waiaas.ai" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt; to explore advanced configuration options.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;These 45 MCP tools provide the foundation for sophisticated AI agent workflows. Explore advanced patterns like multi-wallet strategies, automated yield farming, and cross-protocol arbitrage as you build more complex onchain agents.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>web3</category>
      <category>api</category>
    </item>
    <item>
      <title>20 CLI Commands for Complete Self-Hosted AI Wallet Management</title>
      <dc:creator>Wallet Guy</dc:creator>
      <pubDate>Thu, 30 Apr 2026 15:21:02 +0000</pubDate>
      <link>https://forem.com/walletguy/20-cli-commands-for-complete-self-hosted-ai-wallet-management-1b71</link>
      <guid>https://forem.com/walletguy/20-cli-commands-for-complete-self-hosted-ai-wallet-management-1b71</guid>
      <description>&lt;p&gt;Self-hosted AI wallet management requires a command-line interface that balances security with simplicity, and WAIaaS delivers exactly that with 20 CLI commands designed for complete wallet infrastructure control. When you're managing crypto wallets for AI agents on your own infrastructure, you need tools that respect your sovereignty while providing enterprise-grade functionality. The alternative—trusting third parties with your agents' private keys—compromises the very principles that make crypto valuable in the first place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Self-Hosted Wallet Management Matters
&lt;/h2&gt;

&lt;p&gt;Running your own wallet infrastructure isn't just about privacy—it's about control. Third-party wallet services can rate-limit your API calls, freeze accounts based on algorithmic decisions, or simply disappear overnight. When your AI agents need to execute hundreds of transactions per day across multiple DeFi protocols, these limitations become operational risks.&lt;/p&gt;

&lt;p&gt;Self-hosted solutions also eliminate the custody problem entirely. Your private keys never leave your server, your transaction policies are enforced locally, and you decide which networks and protocols your agents can access. It's the difference between renting someone else's infrastructure and owning your own.&lt;/p&gt;

&lt;h2&gt;
  
  
  The WAIaaS CLI: 20 Commands for Complete Control
&lt;/h2&gt;

&lt;p&gt;WAIaaS provides a comprehensive CLI that handles everything from initial setup to production wallet management. Let's walk through the key commands organized by use case.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installation and Setup Commands
&lt;/h3&gt;

&lt;p&gt;The foundation starts with getting WAIaaS running on your infrastructure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @waiaas/cli
waiaas init                        &lt;span class="c"&gt;# Create data directory + config.toml&lt;/span&gt;
waiaas start                       &lt;span class="c"&gt;# Start daemon (sets master password on first run)&lt;/span&gt;
waiaas status                      &lt;span class="c"&gt;# Check daemon health&lt;/span&gt;
waiaas stop                        &lt;span class="c"&gt;# Graceful shutdown&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;init&lt;/code&gt; command creates your local data directory and configuration file, establishing the foundation for your self-hosted setup. The &lt;code&gt;start&lt;/code&gt; command launches the daemon process that handles all wallet operations, while &lt;code&gt;status&lt;/code&gt; and &lt;code&gt;stop&lt;/code&gt; give you operational control.&lt;/p&gt;

&lt;p&gt;For completely automated deployment, you can use auto-provisioning:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;waiaas init &lt;span class="nt"&gt;--auto-provision&lt;/span&gt;     &lt;span class="c"&gt;# Generates random master password → recovery.key&lt;/span&gt;
waiaas start                     &lt;span class="c"&gt;# No password prompt needed&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Wallet Management Commands
&lt;/h3&gt;

&lt;p&gt;Creating and managing wallets is where the CLI really shines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;waiaas wallet create &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"trading-bot"&lt;/span&gt; &lt;span class="nt"&gt;--chain&lt;/span&gt; solana &lt;span class="nt"&gt;--environment&lt;/span&gt; mainnet
waiaas wallet info &amp;lt;wallet-id&amp;gt;   &lt;span class="c"&gt;# Display wallet details and address&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;wallet create&lt;/code&gt; command supports both EVM and Solana chains across 18 different networks. Each wallet gets a unique identifier and can be configured with specific policies and permissions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Session and Authentication Commands
&lt;/h3&gt;

&lt;p&gt;WAIaaS uses a three-tier authentication system, and the CLI manages all aspects:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;waiaas session prompt &amp;lt;wallet-id&amp;gt;    &lt;span class="c"&gt;# Create session for AI agent&lt;/span&gt;
waiaas owner connect                 &lt;span class="c"&gt;# Connect wallet owner for approvals&lt;/span&gt;
waiaas owner status                  &lt;span class="c"&gt;# Check owner connection status&lt;/span&gt;
waiaas owner disconnect              &lt;span class="c"&gt;# Disconnect owner&lt;/span&gt;
waiaas set-master                    &lt;span class="c"&gt;# Update master password&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The session system is crucial for AI agent operations. Sessions provide scoped access tokens that agents can use without exposing master credentials. The owner commands handle the human-in-the-loop approval system for high-value transactions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Backup and Recovery Commands
&lt;/h3&gt;

&lt;p&gt;Self-hosted infrastructure requires robust backup strategies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;waiaas backup create &lt;span class="nt"&gt;--output&lt;/span&gt; backup-&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; +%Y%m%d&lt;span class="si"&gt;)&lt;/span&gt;.tar.gz
waiaas backup list                   &lt;span class="c"&gt;# Show available backups&lt;/span&gt;
waiaas backup inspect backup.tar.gz  &lt;span class="c"&gt;# Verify backup contents&lt;/span&gt;
waiaas restore backup.tar.gz         &lt;span class="c"&gt;# Restore from backup&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These commands handle complete system state including wallets, policies, transaction history, and configuration. The backup format is portable across different WAIaaS installations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick Setup Commands
&lt;/h3&gt;

&lt;p&gt;For rapid deployment, WAIaaS provides convenience commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;waiaas quickstart              &lt;span class="c"&gt;# Interactive setup wizard&lt;/span&gt;
waiaas quickset &lt;span class="nt"&gt;--mode&lt;/span&gt; mainnet &lt;span class="c"&gt;# Create wallets + MCP sessions in one step&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;quickset&lt;/code&gt; command is particularly powerful—it creates both EVM and Solana wallets, generates session tokens, and outputs the complete MCP configuration for Claude Desktop integration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Integration Commands
&lt;/h3&gt;

&lt;p&gt;Modern AI workflows require seamless integration with AI frameworks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;waiaas mcp setup &lt;span class="nt"&gt;--all&lt;/span&gt;         &lt;span class="c"&gt;# Auto-register all wallets with Claude Desktop&lt;/span&gt;
waiaas notification setup      &lt;span class="c"&gt;# Configure push notifications&lt;/span&gt;
waiaas update                  &lt;span class="c"&gt;# Update to latest version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The MCP setup command automatically configures Claude Desktop to use your self-hosted WAIaaS instance, eliminating manual JSON configuration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advanced CLI Features
&lt;/h2&gt;

&lt;p&gt;Beyond the basic commands, the CLI provides sophisticated functionality for production deployments.&lt;/p&gt;

&lt;h3&gt;
  
  
  Docker Integration
&lt;/h3&gt;

&lt;p&gt;While the CLI handles local development perfectly, production deployments often use Docker:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# The CLI works seamlessly with Docker deployments&lt;/span&gt;
docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; waiaas &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 127.0.0.1:3100:3100 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; waiaas-data:/data &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;WAIAAS_AUTO_PROVISION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  ghcr.io/minhoyoo-iotrust/waiaas:latest

&lt;span class="c"&gt;# CLI can manage the containerized instance&lt;/span&gt;
waiaas status    &lt;span class="c"&gt;# Works with Docker deployment&lt;/span&gt;
waiaas backup create    &lt;span class="c"&gt;# Backs up containerized data&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Policy Management via CLI
&lt;/h3&gt;

&lt;p&gt;While policies can be managed through the REST API or admin UI, the CLI provides direct access for automation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create spending limits via API using CLI-managed sessions&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'X-Master-Password: &amp;lt;from-cli-setup&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;from-wallet-create&amp;gt;",
    "type": "SPENDING_LIMIT",
    "rules": {
      "instant_max_usd": 10,
      "notify_max_usd": 100,
      "delay_max_usd": 1000,
      "delay_seconds": 300
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Session Token Management
&lt;/h3&gt;

&lt;p&gt;The CLI makes it easy to generate and manage session tokens for multiple AI agents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create dedicated sessions for different agents&lt;/span&gt;
waiaas session prompt &lt;span class="si"&gt;$(&lt;/span&gt;waiaas wallet info &lt;span class="nt"&gt;--json&lt;/span&gt; | jq &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="s1"&gt;'.id'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"trading-agent"&lt;/span&gt;
waiaas session prompt &lt;span class="si"&gt;$(&lt;/span&gt;waiaas wallet info &lt;span class="nt"&gt;--json&lt;/span&gt; | jq &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="s1"&gt;'.id'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"defi-manager"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each session can have different policies and permissions, allowing fine-grained access control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Start: Self-Hosted AI Wallet in 5 Steps
&lt;/h2&gt;

&lt;p&gt;Here's how to get a complete self-hosted AI wallet infrastructure running:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install and Initialize&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @waiaas/cli
   waiaas init &lt;span class="nt"&gt;--auto-provision&lt;/span&gt;
   waiaas start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create Wallets and Sessions&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   waiaas quickset &lt;span class="nt"&gt;--mode&lt;/span&gt; mainnet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Set Up AI Integration&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   waiaas mcp setup &lt;span class="nt"&gt;--all&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Test the Setup&lt;/strong&gt;&lt;br&gt;
Open Claude Desktop and ask: "Check my wallet balance"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Configure Backups&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   waiaas backup create &lt;span class="nt"&gt;--output&lt;/span&gt; initial-backup.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your AI agents now have access to a fully self-hosted wallet infrastructure with 39 REST API endpoints, 45 MCP tools, and integration with 15 DeFi protocols.&lt;/p&gt;

&lt;h2&gt;
  
  
  Production Considerations
&lt;/h2&gt;

&lt;p&gt;Self-hosting in production requires additional considerations:&lt;/p&gt;

&lt;h3&gt;
  
  
  Security Hardening
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;waiaas set-master    &lt;span class="c"&gt;# Replace auto-generated password&lt;/span&gt;
&lt;span class="nb"&gt;rm &lt;/span&gt;recovery.key      &lt;span class="c"&gt;# Remove auto-provision key after securing&lt;/span&gt;
waiaas backup create &lt;span class="c"&gt;# Regular automated backups&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Monitoring and Maintenance
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;waiaas status        &lt;span class="c"&gt;# Health checks&lt;/span&gt;
waiaas backup list   &lt;span class="c"&gt;# Verify backup schedule&lt;/span&gt;
waiaas update        &lt;span class="c"&gt;# Keep current with security updates&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Network Configuration
&lt;/h3&gt;

&lt;p&gt;The default binding is &lt;code&gt;127.0.0.1:3100&lt;/code&gt; for security. Production deployments should use reverse proxies and proper TLS termination.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;The CLI provides the foundation, but WAIaaS offers much more for self-hosters: Docker deployment with automatic updates, comprehensive backup systems, and integration with 15 DeFi protocols. Your self-hosted infrastructure can scale from simple token transfers to complex multi-protocol trading strategies.&lt;/p&gt;

&lt;p&gt;Ready to take control of your AI agent's financial infrastructure? Clone the repository at &lt;a href="https://github.com/minhoyoo-iotrust/WAIaaS" rel="noopener noreferrer"&gt;https://github.com/minhoyoo-iotrust/WAIaaS&lt;/a&gt; and start with &lt;code&gt;waiaas init&lt;/code&gt;. For complete documentation and deployment guides, visit &lt;a href="https://waiaas.ai" rel="noopener noreferrer"&gt;https://waiaas.ai&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>selfhosted</category>
      <category>docker</category>
      <category>ai</category>
      <category>web3</category>
    </item>
    <item>
      <title>TypeScript SDK Deep Dive: 40+ Methods for AI Agent Wallet Control</title>
      <dc:creator>Wallet Guy</dc:creator>
      <pubDate>Thu, 30 Apr 2026 08:37:37 +0000</pubDate>
      <link>https://forem.com/walletguy/typescript-sdk-deep-dive-40-methods-for-ai-agent-wallet-control-45in</link>
      <guid>https://forem.com/walletguy/typescript-sdk-deep-dive-40-methods-for-ai-agent-wallet-control-45in</guid>
      <description>&lt;p&gt;Your Claude agent can browse the web, write code, and manage files. But can it swap tokens, check DeFi positions, or pay for its own API calls? WAIaaS TypeScript SDK gives AI agents everything they need for blockchain interactions through 40+ wallet control methods.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why AI Agents Need Wallet SDKs
&lt;/h2&gt;

&lt;p&gt;Most AI agents today can read from the blockchain but can't write to it. They can fetch token prices but can't execute trades. They can analyze DeFi protocols but can't manage positions. Without wallet functionality, agents remain observers rather than participants in the crypto economy.&lt;/p&gt;

&lt;p&gt;The challenge isn't just technical — it's also about security. AI agents need the ability to transact, but with proper guardrails to prevent catastrophic mistakes. They need session-based authentication that can be revoked, spending limits that prevent ruination, and policy engines that encode human judgment.&lt;/p&gt;

&lt;h2&gt;
  
  
  WAIaaS TypeScript SDK: Full Wallet Control
&lt;/h2&gt;

&lt;p&gt;The WAIaaS TypeScript SDK provides 40+ methods that transform AI agents from blockchain observers into active participants. Unlike simple RPC wrappers, it provides session authentication, built-in error handling, and integration with WAIaaS's policy engine.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installation and Setup
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @waiaas/sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;WAIaaSClient&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@waiaas/sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;WAIaaSClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;baseUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;http://127.0.0.1:3100&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;sessionToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;WAIAAS_SESSION_TOKEN&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The SDK requires a session token that you create once through the CLI or admin interface. Sessions can have TTLs, renewal limits, and absolute lifetimes — giving you precise control over how long agents can operate autonomously.&lt;/p&gt;

&lt;h3&gt;
  
  
  Core Wallet Methods
&lt;/h3&gt;

&lt;p&gt;Every AI agent needs to know where it stands financially. The SDK provides comprehensive wallet introspection:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Get native token balance&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getBalance&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Get all token balances&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;assets&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getAssets&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;assets&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;asset&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;asset&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;asset&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; (&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;asset&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;usdValue&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; USD)`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Get wallet address&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;address&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getAddress&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Wallet: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These methods work across all 18 networks supported by WAIaaS, from Ethereum mainnet to Solana devnet.&lt;/p&gt;

&lt;h3&gt;
  
  
  Transaction Methods
&lt;/h3&gt;

&lt;p&gt;The SDK handles 7 transaction types through a unified interface:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Simple transfer&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sendToken&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;recipient-address&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0.1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Token transfer with specific mint&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tokenTx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sendToken&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;TokenTransfer&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;recipient-address&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;100&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;token&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// USDC&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Contract interaction&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;contractTx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;executeTransaction&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ContractCall&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;contract-address&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0x...&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The SDK automatically handles chain-specific details like gas estimation on EVM chains and priority fees on Solana.&lt;/p&gt;

&lt;h3&gt;
  
  
  DeFi Integration Methods
&lt;/h3&gt;

&lt;p&gt;Rather than building separate integrations for each protocol, the SDK provides a unified DeFi interface across 15 protocol providers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Get all DeFi positions&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;positions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getDeFiPositions&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;positions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;protocol&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; - &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; USD`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Execute DeFi action (Jupiter swap example)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;swapResult&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;executeAction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;jupiter-swap&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;swap&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;inputMint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;So11111111111111111111111111111111111111112&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// SOL&lt;/span&gt;
  &lt;span class="na"&gt;outputMint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// USDC&lt;/span&gt;
  &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1000000000&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// 1 SOL&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works across protocols like Jupiter, Uniswap, Aave, Lido, and 11 others. The agent doesn't need to understand protocol-specific APIs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Advanced Methods
&lt;/h3&gt;

&lt;p&gt;The SDK includes specialized methods for complex use cases:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Dry-run transactions before execution&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;simulation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;simulateTransaction&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Transfer&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;recipient&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1.0&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;dryRun&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Sign arbitrary messages&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;signature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;signMessage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hello, blockchain!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// x402 HTTP payments — agent pays for API calls automatically&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;x402Fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://api.example.com/premium-endpoint&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The x402 method is particularly powerful — it lets agents pay for premium APIs automatically when they encounter HTTP 402 (Payment Required) responses.&lt;/p&gt;

&lt;h3&gt;
  
  
  Error Handling
&lt;/h3&gt;

&lt;p&gt;The SDK provides structured error handling with specific error codes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;WAIaaSClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;WAIaaSError&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@waiaas/sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sendToken&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;...&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1000.0&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="k"&gt;instanceof&lt;/span&gt; &lt;span class="nx"&gt;WAIaaSError&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;INSUFFICIENT_BALANCE&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Not enough funds&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POLICY_DENIED&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Blocked by spending limit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;TOKEN_EXPIRED&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Session expired, need to refresh&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows agents to make intelligent decisions when transactions fail — like trying smaller amounts when hitting spending limits.&lt;/p&gt;

&lt;h3&gt;
  
  
  Transaction Lifecycle Management
&lt;/h3&gt;

&lt;p&gt;Unlike simple send-and-forget APIs, the SDK helps agents manage the complete transaction lifecycle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Submit transaction&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sendToken&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;recipient-address&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0.1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Poll for confirmation&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;POLL_TIMEOUT_MS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="nx"&gt;_000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;startTime&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;startTime&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;POLL_TIMEOUT_MS&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTransaction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;COMPLETED&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Confirmed! Hash: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;tx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;txHash&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;FAILED&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Failed: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;tx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c1"&gt;// Still pending, wait and retry&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pattern is essential for agents that need to know when transactions actually settle before proceeding.&lt;/p&gt;

&lt;h3&gt;
  
  
  Integration with Policy Engine
&lt;/h3&gt;

&lt;p&gt;The SDK automatically enforces the 21 policy types configured in WAIaaS. When an agent attempts a transaction that violates policy, the SDK returns structured information about why it was blocked:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sendToken&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;unknown-address&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;100&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POLICY_DENIED&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Could be SPENDING_LIMIT, WHITELIST, ALLOWED_TOKENS, etc.&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Blocked by policy: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows agents to adapt their behavior based on policy constraints rather than blindly retrying failed transactions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Real Agent Example
&lt;/h3&gt;

&lt;p&gt;Here's how an AI trading agent might use multiple SDK methods together:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;tradingAgent&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// 1. Check current positions&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getBalance&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;positions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getDeFiPositions&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Current balance: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Active DeFi positions: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;positions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// 2. Decide if we should trade (agent logic here)&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;shouldSwapToUSDC&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;positions&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;// 3. Execute swap with dry-run first&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;simulation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;executeAction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;jupiter-swap&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;swap&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;inputMint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;So11111111111111111111111111111111111111112&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;outputMint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;parseFloat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
        &lt;span class="na"&gt;dryRun&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;});&lt;/span&gt;

      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;simulation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;success&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// 4. Execute for real&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;swap&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;executeAction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;jupiter-swap&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;swap&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;inputMint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;So11111111111111111111111111111111111111112&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;outputMint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;parseFloat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;

        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Swap initiated: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;swap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Trading failed: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Quick Start: Add Wallet to Your Agent
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Install and start WAIaaS&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @waiaas/cli
waiaas init &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; waiaas start
waiaas quickset &lt;span class="nt"&gt;--mode&lt;/span&gt; mainnet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Install SDK in your agent project&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @waiaas/sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Add wallet functionality&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;WAIaaSClient&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@waiaas/sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;wallet&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;WAIaaSClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;baseUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;http://127.0.0.1:3100&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;sessionToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;WAIAAS_SESSION_TOKEN&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Your agent can now check balances, send tokens, interact with DeFi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4: Set spending policies&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;waiaas policy add &lt;span class="nt"&gt;--type&lt;/span&gt; SPENDING_LIMIT &lt;span class="nt"&gt;--instant&lt;/span&gt; 10 &lt;span class="nt"&gt;--notify&lt;/span&gt; 100 &lt;span class="nt"&gt;--delay&lt;/span&gt; 1000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 5: Test with a simple balance check&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;wallet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getBalance&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Agent wallet: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ready to give your AI agents the financial tools they need? Check out the &lt;a href="https://github.com/minhoyoo-iotrust/WAIaaS" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt; for the complete codebase or visit &lt;a href="https://waiaas.ai" rel="noopener noreferrer"&gt;waiaas.ai&lt;/a&gt; to get started. Your agents are about to become a lot more capable.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>api</category>
      <category>ai</category>
      <category>web3</category>
    </item>
    <item>
      <title>Docker Compose for Crypto Wallets: Self-Hosted AI Agent Infrastructure</title>
      <dc:creator>Wallet Guy</dc:creator>
      <pubDate>Wed, 29 Apr 2026 15:25:35 +0000</pubDate>
      <link>https://forem.com/walletguy/docker-compose-for-crypto-wallets-self-hosted-ai-agent-infrastructure-502o</link>
      <guid>https://forem.com/walletguy/docker-compose-for-crypto-wallets-self-hosted-ai-agent-infrastructure-502o</guid>
      <description>&lt;p&gt;Docker Compose makes it possible to run your own crypto wallet infrastructure for AI agents in just one command, giving you complete control over your private keys without trusting any third-party service. Self-hosted wallet infrastructure eliminates custody risks while providing unlimited API access without rate limits or monthly fees.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Self-Custody Matters for AI Agents
&lt;/h2&gt;

&lt;p&gt;When your AI agents handle real money, custody becomes critical. Hosted wallet services create a fundamental contradiction: you're building autonomous agents while surrendering control to centralized providers. Every transaction flows through someone else's infrastructure, subject to their terms, rate limits, and potential service interruptions.&lt;/p&gt;

&lt;p&gt;Self-hosting puts you back in control. Your private keys never leave your server. Your transaction policies run on your hardware. Your AI agents operate with the sovereignty that crypto was designed to enable. It's the difference between renting computational power and owning your infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  WAIaaS: Docker-First Wallet Infrastructure
&lt;/h2&gt;

&lt;p&gt;WAIaaS delivers enterprise-grade wallet functionality through a 15-package monorepo designed for self-hosting. The Docker deployment supports 2 Docker images (the main daemon plus push-relay for notifications), auto-provision for zero-touch setup, and production secrets overlay via docker-compose.secrets.yml.&lt;/p&gt;

&lt;p&gt;The architecture provides 39 REST API route modules accessible through a simple session-based authentication system. AI agents authenticate with JWT tokens while owners retain ultimate control through cryptographic signatures. This separation lets you grant spending permissions without giving up custody.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick Start: Zero to Running
&lt;/h3&gt;

&lt;p&gt;Clone and start — that's it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/minhoyoo-iotrust/WAIaaS.git
&lt;span class="nb"&gt;cd &lt;/span&gt;WAIaaS
docker compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For completely hands-off deployment with auto-generated credentials:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; waiaas &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 127.0.0.1:3100:3100 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; waiaas-data:/data &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;WAIAAS_AUTO_PROVISION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  ghcr.io/minhoyoo-iotrust/waiaas:latest

&lt;span class="c"&gt;# Retrieve auto-generated master password&lt;/span&gt;
docker &lt;span class="nb"&gt;exec &lt;/span&gt;waiaas &lt;span class="nb"&gt;cat&lt;/span&gt; /data/recovery.key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The default port binding (127.0.0.1:3100:3100) keeps your API private to localhost unless you explicitly expose it. Auto-provision generates a secure master password and saves it to &lt;code&gt;/data/recovery.key&lt;/code&gt; for later hardening.&lt;/p&gt;

&lt;h3&gt;
  
  
  Production Deployment with Secrets
&lt;/h3&gt;

&lt;p&gt;For production environments, use Docker Secrets to avoid environment variable exposure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create secret files&lt;/span&gt;
&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; secrets
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"your-secure-password"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; secrets/master_password.txt
&lt;span class="nb"&gt;chmod &lt;/span&gt;600 secrets/master_password.txt

&lt;span class="c"&gt;# Deploy with secrets overlay&lt;/span&gt;
docker compose &lt;span class="nt"&gt;-f&lt;/span&gt; docker-compose.yml &lt;span class="nt"&gt;-f&lt;/span&gt; docker-compose.secrets.yml up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The secrets overlay supports production patterns like external secret management and automated rotation. The daemon runs as non-root (UID 1001) with healthcheck endpoints and restart policies.&lt;/p&gt;

&lt;h3&gt;
  
  
  Multi-Chain Support Out of the Box
&lt;/h3&gt;

&lt;p&gt;WAIaaS supports 2 chain types (evm, solana) across 18 networks, from Ethereum mainnet to Solana devnet. Chain configuration happens through environment variables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;WAIAAS_RPC_SOLANA_MAINNET&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://api.mainnet-beta.solana.com
&lt;span class="nv"&gt;WAIAAS_RPC_EVM_ETHEREUM_MAINNET&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://eth-mainnet.g.alchemy.com/v2/YOUR-KEY
&lt;span class="nv"&gt;WAIAAS_DAEMON_PORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3100
&lt;span class="nv"&gt;WAIAAS_DAEMON_LOG_LEVEL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;info
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No external dependencies beyond your chosen RPC providers. You can use public endpoints for testing or private RPC services for production workloads.&lt;/p&gt;

&lt;h2&gt;
  
  
  Policy-Driven Security
&lt;/h2&gt;

&lt;p&gt;Self-hosting doesn't mean self-endangering. WAIaaS includes a sophisticated policy engine with 21 policy types and 4 security tiers (INSTANT/NOTIFY/DELAY/APPROVAL) that let you define exactly what your AI agents can do.&lt;/p&gt;

&lt;p&gt;Create spending limits that escalate based on transaction size:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:3100/v1/policies &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'X-Master-Password: &amp;lt;password&amp;gt;'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "walletId": "&amp;lt;wallet-uuid&amp;gt;",
    "type": "SPENDING_LIMIT",
    "rules": {
      "instant_max_usd": 10,
      "notify_max_usd": 100,
      "delay_max_usd": 1000,
      "delay_seconds": 300,
      "daily_limit_usd": 500,
      "monthly_limit_usd": 5000
    }
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The policy system follows default-deny enforcement — transactions are blocked unless explicitly allowed by ALLOWED_TOKENS or CONTRACT_WHITELIST policies. This prevents your agents from interacting with unknown contracts or tokens without your approval.&lt;/p&gt;

&lt;p&gt;Time-based restrictions, rate limiting, and network restrictions provide additional guardrails. Your agents operate within bounds you define, with escalation paths for larger transactions.&lt;/p&gt;

&lt;h2&gt;
  
  
  API-First Architecture
&lt;/h2&gt;

&lt;p&gt;The 39 REST API endpoints expose every wallet function through consistent HTTP interfaces. AI agents authenticate with session tokens and interact through standard HTTP:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Check wallet balance (sessionAuth)&lt;/span&gt;
curl http://127.0.0.1:3100/v1/wallet/balance &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_eyJhbGciOiJIUzI1NiJ9..."&lt;/span&gt;

&lt;span class="c"&gt;# Execute DeFi action (sessionAuth)&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/actions/jupiter-swap/swap &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "inputMint": "So11111111111111111111111111111111111111112",
    "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "amount": "1000000000"
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The API includes OpenAPI 3.0 spec auto-generated at &lt;code&gt;/doc&lt;/code&gt; with interactive Scalar API reference UI at &lt;code&gt;/reference&lt;/code&gt;. Standard error codes and consistent response formats make integration straightforward.&lt;/p&gt;

&lt;p&gt;The 7-stage transaction pipeline (validate, auth, policy, wait, execute, confirm) provides full visibility into transaction state. Dry-run API support lets you test transactions before execution.&lt;/p&gt;

&lt;h2&gt;
  
  
  DeFi Integration Without Vendor Lock-in
&lt;/h2&gt;

&lt;p&gt;WAIaaS integrates 15 DeFi protocol providers covering swaps, lending, staking, and bridges. Your agents can interact with Jupiter, Aave, Lido, Hyperliquid, and other major protocols without depending on external aggregator APIs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://127.0.0.1:3100/v1/actions/lido-staking/stake &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer wai_sess_&amp;lt;token&amp;gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"amount": "1000000000000000000"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cross-chain bridging via LI.FI and Across protocols enables multi-chain strategies. Liquid staking via Lido (EVM) and Jito (Solana) generates yield. Hyperliquid integration provides perpetual futures, spot trading, and sub-accounts.&lt;/p&gt;

&lt;p&gt;All DeFi interactions respect your policy constraints and follow the same authentication model. No separate API keys or external service dependencies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monitoring and Observability
&lt;/h2&gt;

&lt;p&gt;The Admin Web UI (Preact) provides wallet management, policy editor, and DeFi positions dashboard through a clean interface at &lt;code&gt;/admin&lt;/code&gt;. Real-time monitoring shows transaction status, policy violations, and system health.&lt;/p&gt;

&lt;p&gt;Incoming transaction monitoring with real-time notifications ensures you know when funds arrive. Push notifications through Telegram or custom webhooks keep you informed of significant events.&lt;/p&gt;

&lt;p&gt;Structured logging and health check endpoints support standard monitoring tools. The Docker healthcheck uses &lt;code&gt;curl -f http://localhost:3100/health&lt;/code&gt; with configurable intervals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Start: From Zero to AI Agent Trading
&lt;/h2&gt;

&lt;p&gt;Here's how to get a trading AI agent running against your self-hosted infrastructure:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Deploy WAIaaS
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/minhoyoo-iotrust/WAIaaS.git
&lt;span class="nb"&gt;cd &lt;/span&gt;WAIaaS
docker compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Create Wallet and Session
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install CLI&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @waiaas/cli

&lt;span class="c"&gt;# Quick setup with auto-generated wallets&lt;/span&gt;
waiaas init &lt;span class="nt"&gt;--auto-provision&lt;/span&gt;
waiaas start
waiaas quickset &lt;span class="nt"&gt;--mode&lt;/span&gt; mainnet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Configure Policies
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Set spending limits for safety&lt;/span&gt;
waiaas policy create spending-limit &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--instant-max&lt;/span&gt; 10 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--daily-limit&lt;/span&gt; 500
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Connect Your AI Agent
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install SDK in your AI agent project&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt; @waiaas/sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;WAIaaSClient&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@waiaas/sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;WAIaaSClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;baseUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;http://127.0.0.1:3100&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;sessionToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;WAIAAS_SESSION_TOKEN&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Your agent can now trade autonomously within policy limits&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getBalance&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;positions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getDeFiPositions&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Scale and Monitor
&lt;/h3&gt;

&lt;p&gt;Access the admin dashboard at &lt;code&gt;http://localhost:3100/admin&lt;/code&gt; to monitor positions and adjust policies as your agent's strategy evolves.&lt;/p&gt;

&lt;p&gt;Self-hosted wallet infrastructure gives you the foundation to build sophisticated AI trading systems without custody compromises. Your keys, your server, your rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;Self-hosting WAIaaS puts you in complete control of your AI agent's financial infrastructure while maintaining enterprise-grade security and DeFi access. Check out the full documentation and source code at &lt;a href="https://github.com/minhoyoo-iotrust/WAIaaS" rel="noopener noreferrer"&gt;https://github.com/minhoyoo-iotrust/WAIaaS&lt;/a&gt;, or visit &lt;a href="https://waiaas.ai" rel="noopener noreferrer"&gt;https://waiaas.ai&lt;/a&gt; to explore the complete platform capabilities.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>selfhosted</category>
      <category>web3</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
