@waiaas/core 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 +154 -0
- package/package.json +14 -11
- package/LICENSE +0 -21
package/README.md
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# WAIaaS
|
|
2
|
+
|
|
3
|
+
**Wallet-as-a-Service for AI Agents**
|
|
4
|
+
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://nodejs.org/)
|
|
7
|
+
[](#)
|
|
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/package.json
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@waiaas/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0-rc.1",
|
|
4
4
|
"description": "WAIaaS core types, schemas, and shared utilities",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/
|
|
9
|
+
"url": "git+https://github.com/minhoyoo-iotrust/WAIaaS.git",
|
|
10
10
|
"directory": "packages/core"
|
|
11
11
|
},
|
|
12
|
-
"homepage": "https://github.com/
|
|
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
|
},
|
|
@@ -28,13 +31,6 @@
|
|
|
28
31
|
"files": [
|
|
29
32
|
"dist"
|
|
30
33
|
],
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"@x402/core": "^2.3.1",
|
|
33
|
-
"zod": "^3.24.0"
|
|
34
|
-
},
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"@types/node": "^25.2.3"
|
|
37
|
-
},
|
|
38
34
|
"scripts": {
|
|
39
35
|
"build": "tsc -p tsconfig.build.json",
|
|
40
36
|
"test": "vitest run",
|
|
@@ -46,5 +42,12 @@
|
|
|
46
42
|
"lint": "eslint src/",
|
|
47
43
|
"typecheck": "tsc --noEmit",
|
|
48
44
|
"clean": "rm -rf dist"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@x402/core": "^2.3.1",
|
|
48
|
+
"zod": "^3.24.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/node": "^25.2.3"
|
|
49
52
|
}
|
|
50
|
-
}
|
|
53
|
+
}
|
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.
|