Skip to content

Built spending controls demo using Tether WDK - feedback welcome #18

@L1AD

Description

@L1AD

Hey Tether WDK community! 👋

I built a non-custodial policy layer for AI agent wallets and chose Tether WDK for
the demo implementation.

Why I Chose WDK

Tether WDK's tagline mentions "empowering humans, machines and AI agents" - perfect
for this use case. The multi-chain support and self-custodial architecture made it
ideal for demonstrating spending controls.

What I Built

Policy layer that wraps WDK wallet methods to enforce spending limits before signing:

Features:

  • Daily/hourly/per-tx limits
  • Recipient whitelists
  • Frequency caps (e.g., max 3 tx/hour)
  • Intent fingerprinting (tamper detection)
  • Single-use JWT tokens
  • Real-time monitoring dashboard
  • Full audit trail

Architecture:

import { WDK } from '@tetherto/wdk';
import { PolicyWallet } from 'agent-spending-controls';

const wdk = new WDK({ seedPhrase });
const wallet = new PolicyWallet(wdk, {
  apiUrl: 'http://localhost:3001',
  agentId: 'agent-1',
  orgId: 'my-org',
  walletId: 'wallet-1'
});

// Policy checks happen before WDK signs
await wallet.send({
  chain: 'ethereum',
  asset: 'eth',
  to: '0x...',
  amount: '1000000000000000000'
});

Demo

https://github.com/L1AD/agent-spending-controls

Demonstrates 3 agents with different spending policies + real-time monitoring. Runs
in dry-run mode so you can try it without needing funded wallets.

Question for WDK Team

Would spending controls be useful as an optional add-on for WDK? The wrapper pattern
means:
-  No changes to WDK core
-  Works with any WDK-powered wallet
-  Developers opt-in when needed
-  Non-custodial throughout

Could even be packaged as @tetherto/wdk-policy-controls if there's interest.

Feedback welcome!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions