@elizaos/plugin-steward-app 2.0.11-beta.7
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/LICENSE +21 -0
- package/README.md +90 -0
- package/package.json +82 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shaw Walters and elizaOS 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.
|
package/README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# @elizaos/plugin-steward-app
|
|
2
|
+
|
|
3
|
+
Wallet management plugin for elizaOS agents. Provides EVM and Solana wallet infrastructure, Steward cloud-signing vault integration, a browser wallet bridge, DEX trade/transfer execution, and a React dashboard view.
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
- **Wallet operations:** generate or import EVM/Solana wallets; read addresses and balances; export private keys; read/write config.
|
|
8
|
+
- **Steward vault integration:** connects (via the `@stwd/sdk` client) to a Steward signing vault for cloud-managed key custody, policy enforcement, pending approval queues, and webhook events.
|
|
9
|
+
- **Browser wallet bridge:** relays sign/transaction requests between an in-browser wallet (MetaMask, Phantom, etc.) and the agent's API server.
|
|
10
|
+
- **DEX trading:** BSC trade preflight, quote, and execution; token transfers; transaction status tracking.
|
|
11
|
+
- **Context providers:** injects wallet balances and receive addresses into the agent's planning context every turn so the LLM can answer portfolio/holdings/address questions without invoking a mutating action.
|
|
12
|
+
- **Dashboard views:** `StewardView` (web, XR) and `StewardTuiView` (terminal) show transaction history and the pending approval queue.
|
|
13
|
+
|
|
14
|
+
## Capabilities added to an Eliza agent
|
|
15
|
+
|
|
16
|
+
| Capability | Details |
|
|
17
|
+
|------------|---------|
|
|
18
|
+
| `walletRouterAction` | Executes wallet sub-actions (preview, swap, transfer) across registered chain backends |
|
|
19
|
+
| `stewardBalanceProvider` | Per-turn balance snapshot (EVM chains + Solana) injected into planning context |
|
|
20
|
+
| `stewardReceiveAddressProvider` | Per-turn deposit address snapshot injected into planning context |
|
|
21
|
+
| ~30 HTTP routes | Full wallet + Steward management API under `/api/wallet/*` |
|
|
22
|
+
| `StewardView` | Dashboard panel: transaction history + approval queue |
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
Add `stewardPlugin` from this package to your agent's plugin list:
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { stewardPlugin } from "@elizaos/plugin-steward-app";
|
|
30
|
+
|
|
31
|
+
const agent = new AgentRuntime({
|
|
32
|
+
plugins: [stewardPlugin, /* ... */],
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The plugin is **not** auto-enabled. It must be explicitly included.
|
|
37
|
+
|
|
38
|
+
## Required / optional configuration
|
|
39
|
+
|
|
40
|
+
| Env var | Required | Description |
|
|
41
|
+
|---------|----------|-------------|
|
|
42
|
+
| `STEWARD_API_URL` | For Steward signing | Base URL of your Steward vault instance |
|
|
43
|
+
| `STEWARD_API_KEY` | For Steward signing | API key (alternative to `STEWARD_AGENT_TOKEN`) |
|
|
44
|
+
| `STEWARD_AGENT_TOKEN` | For Steward signing | JWT bearer token for agent auth (alternative to `STEWARD_API_KEY`) |
|
|
45
|
+
| `STEWARD_AGENT_ID` | No | Agent ID in Steward; falls back to EVM address |
|
|
46
|
+
| `STEWARD_TENANT_ID` | No | Tenant ID for multi-tenant Steward deployments |
|
|
47
|
+
| `EVM_PRIVATE_KEY` | No | EVM wallet private key (local mode). Hydrated from OS keychain if absent. |
|
|
48
|
+
| `SOLANA_PRIVATE_KEY` | No | Solana wallet private key. Hydrated from OS keychain if absent. |
|
|
49
|
+
| `ELIZA_CLOUD_PROVISIONED` | No | Set to `1` in cloud containers to route all EVM signing through Steward (no local keys) |
|
|
50
|
+
|
|
51
|
+
Steward credentials can also be stored in `$ELIZA_STATE_DIR/steward-credentials.json` (written via the settings UI or `saveStewardCredentials`).
|
|
52
|
+
|
|
53
|
+
## Cloud-provisioned (key-less) mode
|
|
54
|
+
|
|
55
|
+
When running in a cloud container with `ELIZA_CLOUD_PROVISIONED=1` and `STEWARD_AGENT_TOKEN` set, the plugin can operate without any local private keys. Call `stewardEvmPreBoot` before loading plugins and `stewardEvmPostBoot` after to activate the Steward viem account bridge. All EVM signing is then delegated to the Steward API.
|
|
56
|
+
|
|
57
|
+
## Build
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
bun run --cwd plugins/plugin-steward-app build
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The build has three stages:
|
|
64
|
+
- `build:js` — tsup compiles server/lib TypeScript
|
|
65
|
+
- `build:views` — Vite bundles the React dashboard views (`StewardView`, `StewardTuiView`)
|
|
66
|
+
- `build:types` — tsc emits `.d.ts` declarations
|
|
67
|
+
|
|
68
|
+
## Tests
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
bun run --cwd plugins/plugin-steward-app test
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Live E2E tests (requires real Steward API credentials):
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
bun run --cwd plugins/plugin-steward-app test:e2e:manual
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## API surface
|
|
81
|
+
|
|
82
|
+
All routes are registered under `/api/wallet/*` with no plugin-name prefix. Key groups:
|
|
83
|
+
|
|
84
|
+
- **Core wallet:** `/api/wallet/addresses`, `/api/wallet/balances`, `/api/wallet/import`, `/api/wallet/generate`, `/api/wallet/config`, `/api/wallet/export`
|
|
85
|
+
- **Trade:** `/api/wallet/trade/preflight`, `/api/wallet/trade/quote`, `/api/wallet/trade/execute`, `/api/wallet/trade/tx-status`, `/api/wallet/transfer/execute`
|
|
86
|
+
- **Steward vault:** `/api/wallet/steward-status`, `/api/wallet/steward-policies`, `/api/wallet/steward-tx-records`, `/api/wallet/steward-pending-approvals`, `/api/wallet/steward-approve-tx`, `/api/wallet/steward-deny-tx`, `/api/wallet/steward-sign`, `/api/wallet/steward-addresses`, `/api/wallet/steward-balances`, `/api/wallet/steward-tokens`, `/api/wallet/steward-webhook`, `/api/wallet/steward-webhook-events`
|
|
87
|
+
- **Browser bridge:** `/api/wallet/browser-transaction`, `/api/wallet/browser-sign-message`, `/api/wallet/browser-solana-sign-message`, `/api/wallet/browser-solana-transaction`
|
|
88
|
+
- **Compat:** `/api/wallet/os-store`, `/api/wallet/keys`, `/api/wallet/nfts`, `/api/wallet/trading/profile`, `/api/wallet/production-defaults`
|
|
89
|
+
|
|
90
|
+
The Steward webhook endpoint (`/api/wallet/steward-webhook`) is public (no auth required) to accept inbound webhook events from the Steward cloud.
|
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elizaos/plugin-steward-app",
|
|
3
|
+
"version": "2.0.11-beta.7",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"eliza-source": {
|
|
10
|
+
"types": "./src/index.ts",
|
|
11
|
+
"import": "./src/index.ts",
|
|
12
|
+
"default": "./src/index.ts"
|
|
13
|
+
},
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./plugin": {
|
|
18
|
+
"types": "./dist/plugin.d.ts",
|
|
19
|
+
"import": "./dist/plugin.js",
|
|
20
|
+
"default": "./dist/plugin.js"
|
|
21
|
+
},
|
|
22
|
+
"./*.css": "./dist/*.css",
|
|
23
|
+
"./*": {
|
|
24
|
+
"types": "./dist/*.d.ts",
|
|
25
|
+
"eliza-source": {
|
|
26
|
+
"types": "./src/*.ts",
|
|
27
|
+
"import": "./src/*.ts",
|
|
28
|
+
"default": "./src/*.ts"
|
|
29
|
+
},
|
|
30
|
+
"import": "./dist/*.js",
|
|
31
|
+
"default": "./dist/*.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@elizaos/agent": "2.0.11-beta.7",
|
|
36
|
+
"@elizaos/app-core": "2.0.11-beta.7",
|
|
37
|
+
"@elizaos/core": "2.0.11-beta.7",
|
|
38
|
+
"@elizaos/plugin-wallet": "2.0.11-beta.7",
|
|
39
|
+
"@elizaos/ui": "2.0.11-beta.7",
|
|
40
|
+
"@noble/curves": "2.2.0",
|
|
41
|
+
"@simplewebauthn/browser": "^13.0.0",
|
|
42
|
+
"@solana/web3.js": "1.98.4",
|
|
43
|
+
"@stwd/sdk": "^0.8.1",
|
|
44
|
+
"ethers": "^6.16.0",
|
|
45
|
+
"lucide-react": "^1.0.0",
|
|
46
|
+
"react": "^19.0.0",
|
|
47
|
+
"viem": "^2.48.8"
|
|
48
|
+
},
|
|
49
|
+
"elizaos": {
|
|
50
|
+
"app": {
|
|
51
|
+
"heroImage": "assets/hero.png"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"access": "public"
|
|
56
|
+
},
|
|
57
|
+
"types": "./dist/index.d.ts",
|
|
58
|
+
"scripts": {
|
|
59
|
+
"build": "bun run build:js && bun run build:views && bun run build:types",
|
|
60
|
+
"clean": "rm -rf dist",
|
|
61
|
+
"test": "vitest run --config vitest.config.ts",
|
|
62
|
+
"build:js": "tsup --config ../tsup.plugin-packages.shared.ts",
|
|
63
|
+
"build:views": "bunx --bun vite build --config vite.config.views.ts",
|
|
64
|
+
"build:types": "tsc --noCheck -p tsconfig.build.json",
|
|
65
|
+
"test:e2e:manual": "vitest run --config ../../vitest.config.ts test/*.real.e2e.test.ts test/*.live.e2e.test.ts"
|
|
66
|
+
},
|
|
67
|
+
"files": [
|
|
68
|
+
"dist"
|
|
69
|
+
],
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@testing-library/react": "^16.3.2",
|
|
72
|
+
"@types/react": "^19.0.0",
|
|
73
|
+
"@types/react-dom": "^19.0.0",
|
|
74
|
+
"jsdom": "^29.0.0",
|
|
75
|
+
"react": "^19.0.0",
|
|
76
|
+
"react-dom": "^19.0.0",
|
|
77
|
+
"tsup": "^8.5.1",
|
|
78
|
+
"vite": "^8.0.0",
|
|
79
|
+
"vitest": "^4.1.5"
|
|
80
|
+
},
|
|
81
|
+
"gitHead": "cdbc876f793d96073d7eb0d09715a031ce0cd32e"
|
|
82
|
+
}
|