@waiaas/skills 2.2.1 → 2.3.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,154 @@
1
+ # WAIaaS
2
+
3
+ **Wallet-as-a-Service for AI Agents**
4
+
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
+ [![Node.js](https://img.shields.io/badge/Node.js-22_LTS-green.svg)](https://nodejs.org/)
7
+ [![Tests](https://img.shields.io/badge/Tests-3%2C599_passing-brightgreen.svg)](#)
8
+
9
+ A self-hosted wallet daemon that lets AI agents perform on-chain transactions securely -- while the owner keeps full control of funds.
10
+
11
+ ## The Problem
12
+
13
+ AI agents that need to transact on-chain face an impossible choice: hold private keys (and risk total loss if compromised) or depend on a centralized custodian (single point of failure, trust dependency).
14
+
15
+ WAIaaS bridges the gap -- agents handle small transactions instantly, large amounts require owner approval, and everything runs on your machine with no third-party dependency.
16
+
17
+ ## How It Works
18
+
19
+ WAIaaS is a local daemon that sits between your AI agent and the blockchain:
20
+
21
+ - **3-tier authentication** -- Separate roles for the daemon operator (masterAuth), fund owner (ownerAuth), and AI agent (sessionAuth)
22
+ - **4-tier policy engine** -- Transactions are auto-classified by USD value into INSTANT / NOTIFY / DELAY / APPROVAL tiers
23
+ - **12 policy types** -- Cumulative spend limits, token allowlists, contract whitelists, approved spenders, and more
24
+ - **Defense in depth** -- Kill Switch, AutoStop engine, audit logging, 4-channel notifications
25
+
26
+ See [Security Model](docs/security-model.md) for full details.
27
+
28
+ ## Quick Start
29
+
30
+ ```bash
31
+ npm install -g @waiaas/cli
32
+ waiaas init # Create data directory + config.toml
33
+ waiaas start # Start daemon (sets master password on first run)
34
+ waiaas quickset --mode testnet # Create wallets + MCP sessions in one step
35
+ ```
36
+
37
+ The `quickset` command does everything you need to get started:
38
+
39
+ 1. Creates **Solana Devnet + EVM Sepolia** wallets automatically
40
+ 2. Issues **MCP session tokens** for each wallet
41
+ 3. Outputs a **Claude Desktop MCP config** snippet -- just copy and paste
42
+
43
+ > Starting with mainnet? Use `waiaas quickset --mode mainnet` to create Solana Mainnet + EVM Ethereum Mainnet wallets instead. Mainnet mode recommends configuring spending limits and registering an owner wallet for high-value transaction approval.
44
+
45
+ ### Admin UI
46
+
47
+ After starting the daemon, manage everything from the admin panel at `http://127.0.0.1:3100/admin` (masterAuth required).
48
+
49
+ ## Connect Your AI Agent
50
+
51
+ After quickset, choose one of two integration paths:
52
+
53
+ ### Path A: MCP (Claude Desktop / Claude Code)
54
+
55
+ For AI agents that support the [Model Context Protocol](https://modelcontextprotocol.io):
56
+
57
+ ```bash
58
+ # quickset already printed the MCP config JSON -- paste it into
59
+ # ~/Library/Application Support/Claude/claude_desktop_config.json
60
+ # Or auto-register with all wallets:
61
+ waiaas mcp setup --all
62
+ ```
63
+
64
+ The daemon runs as an MCP server. Your agent calls wallet tools directly -- send tokens, check balances, manage policies -- all through the MCP protocol.
65
+
66
+ ### Path B: Skill Files (Any AI Agent)
67
+
68
+ For agents that don't support MCP, or when you prefer REST API integration:
69
+
70
+ ```bash
71
+ npx @waiaas/skills add all
72
+ ```
73
+
74
+ This adds `.skill.md` instruction files to your project. Include them in your agent's context and it learns the WAIaaS API automatically. Available skills: `quickstart`, `wallet`, `transactions`, `policies`, `admin`, `actions`, `x402`.
75
+
76
+ ## Alternative: Docker
77
+
78
+ ```bash
79
+ git clone https://github.com/minho-yoo/waiaas.git && cd waiaas
80
+ docker compose up -d
81
+ ```
82
+
83
+ The daemon listens on `http://127.0.0.1:3100`.
84
+
85
+ ## Using the SDK
86
+
87
+ ```typescript
88
+ import { WAIaaSClient } from '@waiaas/sdk';
89
+
90
+ const client = new WAIaaSClient({
91
+ baseUrl: 'http://127.0.0.1:3100',
92
+ sessionToken: process.env.WAIAAS_SESSION_TOKEN,
93
+ });
94
+
95
+ const balance = await client.getBalance();
96
+ console.log(`Balance: ${balance.amount} SOL`);
97
+
98
+ const tx = await client.sendToken({
99
+ to: 'recipient-address...',
100
+ amount: '0.1',
101
+ });
102
+ console.log(`Transaction: ${tx.signature}`);
103
+ ```
104
+
105
+ ## Admin UI
106
+
107
+ Access the admin panel at `http://127.0.0.1:3100/admin` with your master password:
108
+
109
+ - **Dashboard** -- System overview, wallet balances, recent transactions
110
+ - **Wallets** -- Create, manage, and monitor wallets across chains; RPC endpoints, balance monitoring, and WalletConnect settings
111
+ - **Sessions** -- Issue and revoke agent session tokens; session lifetime and rate limit settings
112
+ - **Policies** -- Configure 12 policy types with visual form editors; default deny and tier settings
113
+ - **Notifications** -- Channel status and delivery logs; Telegram, Discord, ntfy, and Slack settings
114
+ - **Security** -- Kill Switch emergency controls, AutoStop protection rules, JWT rotation
115
+ - **System** -- API keys, display currency, price oracle, rate limits, log level, and daemon shutdown
116
+
117
+ Features include settings search (Ctrl+K / Cmd+K) and unsaved changes protection.
118
+
119
+ Enabled by default (`admin_ui = true` in config.toml).
120
+
121
+ ## Supported Networks
122
+
123
+ | Chain | Environment | Networks |
124
+ |-------|-------------|----------|
125
+ | Solana | mainnet | mainnet |
126
+ | Solana | testnet | devnet, testnet |
127
+ | EVM | mainnet | ethereum-mainnet, polygon-mainnet, arbitrum-mainnet, optimism-mainnet, base-mainnet |
128
+ | EVM | testnet | ethereum-sepolia, polygon-amoy, arbitrum-sepolia, optimism-sepolia, base-sepolia |
129
+
130
+ 13 networks total (Solana 3 + EVM 10).
131
+
132
+ ## Features
133
+
134
+ - **Self-hosted local daemon** -- No central server; keys never leave your machine
135
+ - **Multi-chain** -- Solana (SPL / Token-2022) and EVM (ERC-20) via `IChainAdapter`
136
+ - **Token, contract, and DeFi** -- Native transfers, token transfers, contract calls, approve, batch transactions, Action Provider plugins (Jupiter Swap, etc.)
137
+ - **USD policy evaluation** -- Price oracles (CoinGecko / Pyth / Chainlink) evaluate all transactions in USD
138
+ - **x402 payments** -- Automatic HTTP 402 payment handling with EIP-3009 signatures
139
+ - **Multiple interfaces** -- REST API, TypeScript SDK, Python SDK, MCP server, CLI, Admin Web UI, Tauri Desktop, Telegram Bot
140
+ - **Skill files** -- Pre-built instruction files that teach AI agents how to use the API
141
+
142
+ ## Documentation
143
+
144
+ | Document | Description |
145
+ |----------|-------------|
146
+ | [Security Model](docs/security-model.md) | Authentication, policy engine, Kill Switch, AutoStop |
147
+ | [Deployment Guide](docs/deployment.md) | Docker, npm, configuration reference |
148
+ | [API Reference](docs/api-reference.md) | REST API endpoints and authentication |
149
+ | [Why WAIaaS?](docs/why-waiaas/) | Background on AI agent wallet security |
150
+ | [Contributing](CONTRIBUTING.md) | Development setup, code style, testing, PR guidelines |
151
+
152
+ ## License
153
+
154
+ [MIT](LICENSE) -- Copyright (c) 2026 WAIaaS Contributors
package/dist/cli.js CHANGED
File without changes
package/dist/registry.js CHANGED
@@ -3,7 +3,7 @@ export const SKILL_REGISTRY = [
3
3
  {
4
4
  name: "quickstart",
5
5
  filename: "quickstart.skill.md",
6
- description: "End-to-end quickstart: create wallet, session, check balance, send first transfer",
6
+ description: "End-to-end quickset: create wallet, session, check balance, send first transfer",
7
7
  },
8
8
  {
9
9
  name: "wallet",
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAQ7B,MAAM,CAAC,MAAM,cAAc,GAA0B;IACnD;QACE,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,qBAAqB;QAC/B,WAAW,EACT,mFAAmF;KACtF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,iBAAiB;QAC3B,WAAW,EACT,oGAAoG;KACvG;IACD;QACE,IAAI,EAAE,cAAc;QACpB,QAAQ,EAAE,uBAAuB;QACjC,WAAW,EACT,6GAA6G;KAChH;IACD;QACE,IAAI,EAAE,UAAU;QAChB,QAAQ,EAAE,mBAAmB;QAC7B,WAAW,EACT,kLAAkL;KACrL;IACD;QACE,IAAI,EAAE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,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AACxD,CAAC"}
package/package.json CHANGED
@@ -1,15 +1,18 @@
1
1
  {
2
2
  "name": "@waiaas/skills",
3
- "version": "2.2.1",
3
+ "version": "2.3.0-rc.1",
4
4
  "description": "WAIaaS skill files for AI agents - install via npx @waiaas/skills add <name>",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/minho-yoo/waiaas.git",
9
+ "url": "git+https://github.com/minhoyoo-iotrust/WAIaaS.git",
10
10
  "directory": "packages/skills"
11
11
  },
12
- "homepage": "https://github.com/minho-yoo/waiaas#readme",
12
+ "homepage": "https://github.com/minhoyoo-iotrust/WAIaaS#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/minhoyoo-iotrust/WAIaaS/issues"
15
+ },
13
16
  "publishConfig": {
14
17
  "access": "public"
15
18
  },
@@ -20,14 +23,15 @@
20
23
  "dist",
21
24
  "skills"
22
25
  ],
26
+ "scripts": {
27
+ "prebuild": "node scripts/sync-version.mjs",
28
+ "build": "tsc -p tsconfig.build.json",
29
+ "clean": "rm -rf dist"
30
+ },
23
31
  "engines": {
24
32
  "node": ">=22.0.0"
25
33
  },
26
34
  "devDependencies": {
27
35
  "@types/node": "^22.0.0"
28
- },
29
- "scripts": {
30
- "build": "tsc -p tsconfig.build.json",
31
- "clean": "rm -rf dist"
32
36
  }
33
- }
37
+ }
@@ -3,7 +3,7 @@ name: "WAIaaS Actions"
3
3
  description: "Action Provider framework: list providers, execute DeFi actions through the 6-stage transaction pipeline"
4
4
  category: "api"
5
5
  tags: [wallet, blockchain, defi, actions, waiass]
6
- version: "1.5.0"
6
+ version: "2.3.0-rc.1"
7
7
  dispatch:
8
8
  kind: "tool"
9
9
  allowedCommands: ["curl"]
@@ -3,7 +3,7 @@ name: "WAIaaS Admin"
3
3
  description: "Admin API: daemon status, kill switch, notifications, settings management, JWT rotation, shutdown, oracle status, API key management"
4
4
  category: "api"
5
5
  tags: [wallet, blockchain, admin, security, oracle, defi, waiass]
6
- version: "1.8.0"
6
+ version: "2.3.0-rc.1"
7
7
  dispatch:
8
8
  kind: "tool"
9
9
  allowedCommands: ["curl"]
@@ -3,7 +3,7 @@ name: "WAIaaS Policies"
3
3
  description: "Policy engine CRUD: 12 policy types for spending limits, whitelists, time restrictions, rate limits, token/contract/approve controls, network restrictions, x402 domain controls"
4
4
  category: "api"
5
5
  tags: [wallet, blockchain, policies, security, waiass]
6
- version: "1.5.3"
6
+ version: "2.3.0-rc.1"
7
7
  dispatch:
8
8
  kind: "tool"
9
9
  allowedCommands: ["curl"]
@@ -1,18 +1,77 @@
1
1
  ---
2
- name: "WAIaaS Quickstart"
3
- description: "End-to-end quickstart: create wallet, session, check balance, send first transfer"
2
+ name: "WAIaaS Quickset"
3
+ description: "End-to-end quickset: create wallet, session, check balance, send first transfer"
4
4
  category: "api"
5
- tags: [wallet, blockchain, solana, ethereum, quickstart, waiass]
6
- version: "1.8.0"
5
+ tags: [wallet, blockchain, solana, ethereum, quickset, quickstart, waiass]
6
+ version: "2.3.0-rc.1"
7
7
  dispatch:
8
8
  kind: "tool"
9
9
  allowedCommands: ["curl"]
10
10
  ---
11
11
 
12
- # WAIaaS Quickstart
12
+ # WAIaaS Quickset
13
13
 
14
14
  WAIaaS (Wallet-as-a-Service for AI Agents) is a self-hosted local daemon that lets AI agents execute on-chain transactions on Solana and Ethereum with policy-based security controls. This guide walks through the complete workflow from creating your first wallet to sending a transaction.
15
15
 
16
+ ## 0. Connection Info
17
+
18
+ ### Magic Word (Agent Connection Prompt)
19
+
20
+ If the user provides a `[WAIaaS Connection]` block, extract connection info and start API calls immediately:
21
+
22
+ - `URL` -> API base URL
23
+ - `Wallets` -> numbered list with wallet name, ID, network, session token
24
+ - `Session` -> use as `Authorization: Bearer {token}` header
25
+
26
+ Example format:
27
+ ```
28
+ [WAIaaS Connection]
29
+ - URL: http://localhost:3100
30
+
31
+ Wallets:
32
+ 1. solana-testnet (019c6fb6-...) -- solana-devnet
33
+ Session: eyJhbG...
34
+ ```
35
+
36
+ ### Session Renewal
37
+
38
+ On `401 Unauthorized` response:
39
+ 1. Extract `sessionId` from JWT payload `sub` claim
40
+ 2. `POST /v1/wallets/{walletId}/sessions/{sessionId}/renew`
41
+ 3. Use the new token from response for subsequent requests
42
+
43
+ ### No Connection Info?
44
+
45
+ Ask the user:
46
+ "WAIaaS connection info is needed. Copy the agent prompt from the Admin UI dashboard or from the `waiaas quickset` completion screen using 'Copy Agent Prompt' and paste it here."
47
+
48
+ ### Manual Discovery
49
+
50
+ Check if the daemon is running and discover existing wallets before starting.
51
+
52
+ #### Health Check
53
+
54
+ ```bash
55
+ curl -s http://localhost:3100/health
56
+ ```
57
+
58
+ If successful, you get `{"status":"ok", ...}`. If the daemon is not running, start it with `waiaas start`.
59
+
60
+ #### List Existing Wallets (requires masterAuth)
61
+
62
+ ```bash
63
+ curl -s http://localhost:3100/v1/wallets \
64
+ -H 'X-Master-Password: <master-password>'
65
+ ```
66
+
67
+ This returns all wallets. If wallets already exist, you can skip to Step 3 (Create a Session) using an existing wallet ID.
68
+
69
+ > **Note**: The master password is the value set during `waiaas init`.
70
+ >
71
+ > Skill files are API references. For interactive use with an AI agent,
72
+ > set up the MCP server (`waiaas mcp setup`) or provide the daemon URL
73
+ > and authentication credentials directly.
74
+
16
75
  ## Base URL
17
76
 
18
77
  ```
@@ -259,12 +318,12 @@ Transaction status values:
259
318
  - `FAILED` -- execution or confirmation failed
260
319
  - `CANCELLED` -- cancelled by wallet or owner
261
320
 
262
- ## CLI Quickstart (Alternative)
321
+ ## CLI Quickset (Alternative)
263
322
 
264
323
  If you have the CLI installed, create wallets in one step:
265
324
 
266
325
  ```bash
267
- waiaas quickstart --mode testnet
326
+ waiaas quickset --mode testnet
268
327
  ```
269
328
 
270
329
  This creates Solana + EVM wallets and prints MCP configuration.
@@ -304,3 +363,5 @@ Common error codes:
304
363
  - **transactions.skill.md** -- All 5 transaction types (TRANSFER, TOKEN_TRANSFER, CONTRACT_CALL, APPROVE, BATCH) with full parameters
305
364
  - **policies.skill.md** -- Policy management (spending limits, whitelists, rate limits, approval tiers)
306
365
  - **admin.skill.md** -- Admin operations (kill switch, status, settings, notifications)
366
+ - **actions.skill.md** -- DeFi action providers: list and execute DeFi actions through the transaction pipeline
367
+ - **x402.skill.md** -- x402 auto-payment protocol for fetching paid URLs with cryptocurrency
@@ -3,7 +3,7 @@ name: "WAIaaS Transactions"
3
3
  description: "All 5 transaction types (TRANSFER, TOKEN_TRANSFER, CONTRACT_CALL, APPROVE, BATCH) with lifecycle management"
4
4
  category: "api"
5
5
  tags: [wallet, blockchain, solana, ethereum, transactions, waiass]
6
- version: "1.5.3"
6
+ version: "2.3.0-rc.1"
7
7
  dispatch:
8
8
  kind: "tool"
9
9
  allowedCommands: ["curl"]
@@ -3,7 +3,7 @@ name: "WAIaaS Wallet Management"
3
3
  description: "Wallet CRUD, asset queries, session management, token registry, MCP provisioning, owner management"
4
4
  category: "api"
5
5
  tags: [wallet, blockchain, solana, ethereum, sessions, tokens, mcp, waiass]
6
- version: "1.6.1"
6
+ version: "2.3.0-rc.1"
7
7
  dispatch:
8
8
  kind: "tool"
9
9
  allowedCommands: ["curl"]
@@ -3,7 +3,7 @@ name: "WAIaaS x402"
3
3
  description: "x402 auto-payment protocol: fetch URLs with automatic cryptocurrency payments"
4
4
  category: "api"
5
5
  tags: [wallet, blockchain, x402, payments, waiass]
6
- version: "1.5.1"
6
+ version: "2.3.0-rc.1"
7
7
  dispatch:
8
8
  kind: "tool"
9
9
  allowedCommands: ["curl"]
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 WAIaaS Contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.