Natural language command parsing for payment operations.
import { parseIntent, executeIntent } from 'arcpay';
// Parse natural language command
const intent = await parseIntent("Send 50 USDC to alice");
// { action: 'pay', recipient: 'alice', amount: '50' }
// Execute the parsed intent
await executeIntent(intent);- Natural Language - Human-readable commands
- Fuzzy Matching - Handles typos and variations
- Multi-action - Parse complex commands
- Context Aware - Remembers previous context
| Function | Description |
|---|---|
parseIntent(text) |
Parse command to intent |
executeIntent(intent) |
Execute parsed intent |
validateIntent(intent) |
Validate before execution |
getIntentHistory() |
Get recent intents |
- "Send 50 to alice"
- "Pay bob 100 USDC"
- "Transfer 25 dollars to 0x..."
- "Create escrow for 500 to alice"
- "Release escrow 123"
- "Stream 5000 to bob over 30 days"
- "Cancel stream 456"
- "What's my balance?"
- "Show pending payments"
- "List my contacts"
{
action: 'pay',
recipient: 'alice',
amount: '50',
currency: 'USDC',
confidence: 0.95,
raw: 'Send 50 USDC to alice'
}