agentaos 0.2.0

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.
Files changed (183) hide show
  1. package/LICENSE +199 -0
  2. package/README.md +249 -0
  3. package/dist/cli/commands/admin.command.d.ts +3 -0
  4. package/dist/cli/commands/admin.command.d.ts.map +1 -0
  5. package/dist/cli/commands/admin.command.js +415 -0
  6. package/dist/cli/commands/admin.command.js.map +1 -0
  7. package/dist/cli/commands/balance.command.d.ts +3 -0
  8. package/dist/cli/commands/balance.command.d.ts.map +1 -0
  9. package/dist/cli/commands/balance.command.js +65 -0
  10. package/dist/cli/commands/balance.command.js.map +1 -0
  11. package/dist/cli/commands/deploy.command.d.ts +3 -0
  12. package/dist/cli/commands/deploy.command.d.ts.map +1 -0
  13. package/dist/cli/commands/deploy.command.js +101 -0
  14. package/dist/cli/commands/deploy.command.js.map +1 -0
  15. package/dist/cli/commands/info.command.d.ts +3 -0
  16. package/dist/cli/commands/info.command.d.ts.map +1 -0
  17. package/dist/cli/commands/info.command.js +30 -0
  18. package/dist/cli/commands/info.command.js.map +1 -0
  19. package/dist/cli/commands/init.command.d.ts +3 -0
  20. package/dist/cli/commands/init.command.d.ts.map +1 -0
  21. package/dist/cli/commands/init.command.js +364 -0
  22. package/dist/cli/commands/init.command.js.map +1 -0
  23. package/dist/cli/commands/link.command.d.ts +3 -0
  24. package/dist/cli/commands/link.command.d.ts.map +1 -0
  25. package/dist/cli/commands/link.command.js +111 -0
  26. package/dist/cli/commands/link.command.js.map +1 -0
  27. package/dist/cli/commands/login.command.d.ts +4 -0
  28. package/dist/cli/commands/login.command.d.ts.map +1 -0
  29. package/dist/cli/commands/login.command.js +149 -0
  30. package/dist/cli/commands/login.command.js.map +1 -0
  31. package/dist/cli/commands/network.command.d.ts +3 -0
  32. package/dist/cli/commands/network.command.d.ts.map +1 -0
  33. package/dist/cli/commands/network.command.js +206 -0
  34. package/dist/cli/commands/network.command.js.map +1 -0
  35. package/dist/cli/commands/proxy.command.d.ts +3 -0
  36. package/dist/cli/commands/proxy.command.d.ts.map +1 -0
  37. package/dist/cli/commands/proxy.command.js +248 -0
  38. package/dist/cli/commands/proxy.command.js.map +1 -0
  39. package/dist/cli/commands/receive.command.d.ts +3 -0
  40. package/dist/cli/commands/receive.command.d.ts.map +1 -0
  41. package/dist/cli/commands/receive.command.js +360 -0
  42. package/dist/cli/commands/receive.command.js.map +1 -0
  43. package/dist/cli/commands/send.command.d.ts +3 -0
  44. package/dist/cli/commands/send.command.d.ts.map +1 -0
  45. package/dist/cli/commands/send.command.js +83 -0
  46. package/dist/cli/commands/send.command.js.map +1 -0
  47. package/dist/cli/commands/sign.command.d.ts +3 -0
  48. package/dist/cli/commands/sign.command.d.ts.map +1 -0
  49. package/dist/cli/commands/sign.command.js +53 -0
  50. package/dist/cli/commands/sign.command.js.map +1 -0
  51. package/dist/cli/commands/status.command.d.ts +3 -0
  52. package/dist/cli/commands/status.command.d.ts.map +1 -0
  53. package/dist/cli/commands/status.command.js +109 -0
  54. package/dist/cli/commands/status.command.js.map +1 -0
  55. package/dist/cli/index.d.ts +2 -0
  56. package/dist/cli/index.d.ts.map +1 -0
  57. package/dist/cli/index.js +50 -0
  58. package/dist/cli/index.js.map +1 -0
  59. package/dist/cli/theme.d.ts +35 -0
  60. package/dist/cli/theme.d.ts.map +1 -0
  61. package/dist/cli/theme.js +96 -0
  62. package/dist/cli/theme.js.map +1 -0
  63. package/dist/index.d.ts +3 -0
  64. package/dist/index.d.ts.map +1 -0
  65. package/dist/index.js +20 -0
  66. package/dist/index.js.map +1 -0
  67. package/dist/lib/__tests__/transfer-crypto.test.d.ts +2 -0
  68. package/dist/lib/__tests__/transfer-crypto.test.d.ts.map +1 -0
  69. package/dist/lib/__tests__/transfer-crypto.test.js +151 -0
  70. package/dist/lib/__tests__/transfer-crypto.test.js.map +1 -0
  71. package/dist/lib/authenticated-fetch.d.ts +6 -0
  72. package/dist/lib/authenticated-fetch.d.ts.map +1 -0
  73. package/dist/lib/authenticated-fetch.js +74 -0
  74. package/dist/lib/authenticated-fetch.js.map +1 -0
  75. package/dist/lib/config.d.ts +42 -0
  76. package/dist/lib/config.d.ts.map +1 -0
  77. package/dist/lib/config.js +163 -0
  78. package/dist/lib/config.js.map +1 -0
  79. package/dist/lib/erc20-abi.d.ts +43 -0
  80. package/dist/lib/erc20-abi.d.ts.map +1 -0
  81. package/dist/lib/erc20-abi.js +34 -0
  82. package/dist/lib/erc20-abi.js.map +1 -0
  83. package/dist/lib/errors.d.ts +12 -0
  84. package/dist/lib/errors.d.ts.map +1 -0
  85. package/dist/lib/errors.js +23 -0
  86. package/dist/lib/errors.js.map +1 -0
  87. package/dist/lib/keychain.d.ts +11 -0
  88. package/dist/lib/keychain.d.ts.map +1 -0
  89. package/dist/lib/keychain.js +216 -0
  90. package/dist/lib/keychain.js.map +1 -0
  91. package/dist/lib/policy-conversions.d.ts +19 -0
  92. package/dist/lib/policy-conversions.d.ts.map +1 -0
  93. package/dist/lib/policy-conversions.js +62 -0
  94. package/dist/lib/policy-conversions.js.map +1 -0
  95. package/dist/lib/signer-manager.d.ts +17 -0
  96. package/dist/lib/signer-manager.d.ts.map +1 -0
  97. package/dist/lib/signer-manager.js +80 -0
  98. package/dist/lib/signer-manager.js.map +1 -0
  99. package/dist/lib/transfer-crypto.d.ts +36 -0
  100. package/dist/lib/transfer-crypto.d.ts.map +1 -0
  101. package/dist/lib/transfer-crypto.js +109 -0
  102. package/dist/lib/transfer-crypto.js.map +1 -0
  103. package/dist/lib/x402-client.d.ts +63 -0
  104. package/dist/lib/x402-client.d.ts.map +1 -0
  105. package/dist/lib/x402-client.js +236 -0
  106. package/dist/lib/x402-client.js.map +1 -0
  107. package/dist/mcp/index.d.ts +6 -0
  108. package/dist/mcp/index.d.ts.map +1 -0
  109. package/dist/mcp/index.js +73 -0
  110. package/dist/mcp/index.js.map +1 -0
  111. package/dist/mcp/tools/call-contract.d.ts +4 -0
  112. package/dist/mcp/tools/call-contract.d.ts.map +1 -0
  113. package/dist/mcp/tools/call-contract.js +68 -0
  114. package/dist/mcp/tools/call-contract.js.map +1 -0
  115. package/dist/mcp/tools/execute.d.ts +4 -0
  116. package/dist/mcp/tools/execute.d.ts.map +1 -0
  117. package/dist/mcp/tools/execute.js +59 -0
  118. package/dist/mcp/tools/execute.js.map +1 -0
  119. package/dist/mcp/tools/get-audit-log.d.ts +4 -0
  120. package/dist/mcp/tools/get-audit-log.d.ts.map +1 -0
  121. package/dist/mcp/tools/get-audit-log.js +85 -0
  122. package/dist/mcp/tools/get-audit-log.js.map +1 -0
  123. package/dist/mcp/tools/get-balances.d.ts +4 -0
  124. package/dist/mcp/tools/get-balances.d.ts.map +1 -0
  125. package/dist/mcp/tools/get-balances.js +84 -0
  126. package/dist/mcp/tools/get-balances.js.map +1 -0
  127. package/dist/mcp/tools/get-status.d.ts +4 -0
  128. package/dist/mcp/tools/get-status.d.ts.map +1 -0
  129. package/dist/mcp/tools/get-status.js +66 -0
  130. package/dist/mcp/tools/get-status.js.map +1 -0
  131. package/dist/mcp/tools/list-networks.d.ts +4 -0
  132. package/dist/mcp/tools/list-networks.d.ts.map +1 -0
  133. package/dist/mcp/tools/list-networks.js +36 -0
  134. package/dist/mcp/tools/list-networks.js.map +1 -0
  135. package/dist/mcp/tools/list-signers.d.ts +4 -0
  136. package/dist/mcp/tools/list-signers.d.ts.map +1 -0
  137. package/dist/mcp/tools/list-signers.js +36 -0
  138. package/dist/mcp/tools/list-signers.js.map +1 -0
  139. package/dist/mcp/tools/read-contract.d.ts +4 -0
  140. package/dist/mcp/tools/read-contract.d.ts.map +1 -0
  141. package/dist/mcp/tools/read-contract.js +62 -0
  142. package/dist/mcp/tools/read-contract.js.map +1 -0
  143. package/dist/mcp/tools/resolve-address.d.ts +4 -0
  144. package/dist/mcp/tools/resolve-address.d.ts.map +1 -0
  145. package/dist/mcp/tools/resolve-address.js +37 -0
  146. package/dist/mcp/tools/resolve-address.js.map +1 -0
  147. package/dist/mcp/tools/send-eth.d.ts +4 -0
  148. package/dist/mcp/tools/send-eth.d.ts.map +1 -0
  149. package/dist/mcp/tools/send-eth.js +52 -0
  150. package/dist/mcp/tools/send-eth.js.map +1 -0
  151. package/dist/mcp/tools/send-token.d.ts +4 -0
  152. package/dist/mcp/tools/send-token.d.ts.map +1 -0
  153. package/dist/mcp/tools/send-token.js +102 -0
  154. package/dist/mcp/tools/send-token.js.map +1 -0
  155. package/dist/mcp/tools/sign-message.d.ts +4 -0
  156. package/dist/mcp/tools/sign-message.d.ts.map +1 -0
  157. package/dist/mcp/tools/sign-message.js +33 -0
  158. package/dist/mcp/tools/sign-message.js.map +1 -0
  159. package/dist/mcp/tools/sign-typed-data.d.ts +4 -0
  160. package/dist/mcp/tools/sign-typed-data.d.ts.map +1 -0
  161. package/dist/mcp/tools/sign-typed-data.js +48 -0
  162. package/dist/mcp/tools/sign-typed-data.js.map +1 -0
  163. package/dist/mcp/tools/simulate.d.ts +4 -0
  164. package/dist/mcp/tools/simulate.d.ts.map +1 -0
  165. package/dist/mcp/tools/simulate.js +54 -0
  166. package/dist/mcp/tools/simulate.js.map +1 -0
  167. package/dist/mcp/tools/wallet-overview.d.ts +4 -0
  168. package/dist/mcp/tools/wallet-overview.d.ts.map +1 -0
  169. package/dist/mcp/tools/wallet-overview.js +109 -0
  170. package/dist/mcp/tools/wallet-overview.js.map +1 -0
  171. package/dist/mcp/tools/x402-check.d.ts +3 -0
  172. package/dist/mcp/tools/x402-check.d.ts.map +1 -0
  173. package/dist/mcp/tools/x402-check.js +44 -0
  174. package/dist/mcp/tools/x402-check.js.map +1 -0
  175. package/dist/mcp/tools/x402-discover.d.ts +3 -0
  176. package/dist/mcp/tools/x402-discover.d.ts.map +1 -0
  177. package/dist/mcp/tools/x402-discover.js +42 -0
  178. package/dist/mcp/tools/x402-discover.js.map +1 -0
  179. package/dist/mcp/tools/x402-fetch.d.ts +4 -0
  180. package/dist/mcp/tools/x402-fetch.d.ts.map +1 -0
  181. package/dist/mcp/tools/x402-fetch.js +45 -0
  182. package/dist/mcp/tools/x402-fetch.js.map +1 -0
  183. package/package.json +68 -0
package/LICENSE ADDED
@@ -0,0 +1,199 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to the Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by the Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding any notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. Please also get an
185
+ OpenPGP-compatible signature on the file.
186
+
187
+ Copyright 2025-2026 Aristokrates OÜ
188
+
189
+ Licensed under the Apache License, Version 2.0 (the "License");
190
+ you may not use this file except in compliance with the License.
191
+ You may obtain a copy of the License at
192
+
193
+ http://www.apache.org/licenses/LICENSE-2.0
194
+
195
+ Unless required by applicable law or agreed to in writing, software
196
+ distributed under the License is distributed on an "AS IS" BASIS,
197
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
198
+ See the License for the specific language governing permissions and
199
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,249 @@
1
+ # agenta
2
+
3
+ **AgentaOS CLI + MCP Server -- threshold signing for AI agents.**
4
+
5
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-green.svg)](../../LICENSE)
6
+ [![npm](https://img.shields.io/npm/v/agentaos)](https://www.npmjs.com/package/agentaos)
7
+ [![Node.js](https://img.shields.io/badge/Node.js-20%2B-339933.svg)](https://nodejs.org)
8
+
9
+ CLI and [MCP](https://modelcontextprotocol.io/) server for [AgentaOS](https://github.com/AgentaOS/agentaos). Gives AI agents (Claude, GPT, custom) secure on-chain spending power through threshold ECDSA -- the full private key never exists.
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install -g agentaos
15
+ # or
16
+ npx agentaos --help
17
+ ```
18
+
19
+ ## Quick Start
20
+
21
+ ```bash
22
+ # Create a new signer (no dashboard required)
23
+ agenta init
24
+
25
+ # Check status
26
+ agenta status
27
+
28
+ # Send ETH
29
+ agenta send 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 0.001
30
+
31
+ # Manage policies
32
+ agenta admin unlock
33
+ agenta admin policies
34
+ ```
35
+
36
+ `agenta init` walks you through everything interactively -- create a new signer on the server, or import an existing one from the dashboard.
37
+
38
+ ## CLI
39
+
40
+ ```bash
41
+ agenta --help
42
+ ```
43
+
44
+ ### Commands
45
+
46
+ | Command | Description |
47
+ |---------|-------------|
48
+ | `agenta init` | Create a new signer or import an existing one |
49
+ | `agenta status` | Show signer info, server health, and balances |
50
+ | `agenta info` | Show raw signer config (debug) |
51
+ | `agenta balance` | Show ETH and token balances |
52
+ | `agenta send <to> <amount>` | Send ETH to an address |
53
+ | `agenta sign-message <message>` | Sign a message (EIP-191) |
54
+ | `agenta deploy <bytecode>` | Deploy a contract |
55
+ | `agenta proxy` | Start a JSON-RPC signing proxy for Foundry/Hardhat |
56
+ | `agenta admin` | Admin commands (policies, pause/resume, audit) |
57
+
58
+ ### Multi-Signer
59
+
60
+ Each signer gets its own config file under `~/.agenta/signers/`.
61
+
62
+ ```bash
63
+ # Create multiple signers
64
+ agenta init # creates "my-agent"
65
+ agenta init # creates "trading-bot"
66
+
67
+ # Use a specific signer
68
+ agenta --signer trading-bot send 0x... 0.01
69
+ agenta --signer my-agent balance
70
+
71
+ # Default signer is auto-detected (single signer) or set during init
72
+ ```
73
+
74
+ ### Admin Commands
75
+
76
+ Manage policies, pause/resume, and view audit logs for your signers. Requires an admin unlock (user share from OS keychain).
77
+
78
+ ```bash
79
+ # Unlock admin access (retrieves user share from keychain, computes auth token)
80
+ agenta admin unlock
81
+
82
+ # Policy management
83
+ agenta admin policies # list policies
84
+ agenta admin policies add # interactive policy creation
85
+ agenta admin policies remove <id> # remove a policy
86
+ agenta admin policies toggle <id> # enable/disable a policy
87
+
88
+ # Signer control
89
+ agenta admin pause # pause signer (blocks all signing)
90
+ agenta admin resume # resume signer
91
+
92
+ # Audit log
93
+ agenta admin audit # last 20 signing requests
94
+ agenta admin audit --limit 50 # more results
95
+ agenta admin audit --status blocked # filter by status
96
+
97
+ # Lock admin (remove token from disk)
98
+ agenta admin lock
99
+ ```
100
+
101
+ ### Config Layout
102
+
103
+ ```
104
+ ~/.agenta/
105
+ signers/
106
+ my-agent.json # { serverUrl, apiKey, apiSecret, network, ... }
107
+ trading-bot.json
108
+ admin/
109
+ my-agent.token # SHA-256(userShare) -- admin auth credential
110
+ .default # default signer name
111
+
112
+ OS Keychain (service: agenta):
113
+ my-agent/user-share # user share for admin auth + backup signing
114
+ ```
115
+
116
+ ## MCP Server
117
+
118
+ When invoked with no arguments, runs as an MCP server over stdio. This lets AI agents interact with the wallet through the [Model Context Protocol](https://modelcontextprotocol.io/).
119
+
120
+ ### 18 Tools
121
+
122
+ | Tool | Description |
123
+ |------|-------------|
124
+ | `agenta_wallet_overview` | Wallet address, balances, recent activity |
125
+ | `agenta_list_signers` | List all signers |
126
+ | `agenta_get_status` | Server health and vault connectivity |
127
+ | `agenta_list_networks` | Available networks and chain IDs |
128
+ | `agenta_get_balances` | ETH and token balances |
129
+ | `agenta_get_audit_log` | Transaction history and audit trail |
130
+ | `agenta_resolve_address` | Resolve ENS names or validate addresses |
131
+ | `agenta_simulate` | Simulate a transaction (gas estimate) |
132
+ | `agenta_read_contract` | Read from any smart contract |
133
+ | `agenta_sign_message` | Sign an EIP-191 message |
134
+ | `agenta_sign_typed_data` | Sign EIP-712 typed data |
135
+ | `agenta_send_eth` | Send ETH to an address |
136
+ | `agenta_send_token` | Send ERC-20 tokens |
137
+ | `agenta_call_contract` | Call any smart contract function |
138
+ | `agenta_execute` | Execute a raw transaction |
139
+ | `agenta_x402_check` | Check if a URL requires x402 payment |
140
+ | `agenta_x402_discover` | Discover x402-protected endpoints |
141
+ | `agenta_x402_fetch` | Fetch a 402-protected resource with auto-payment |
142
+
143
+ ### Claude Desktop
144
+
145
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
146
+
147
+ ```json
148
+ {
149
+ "mcpServers": {
150
+ "agenta": {
151
+ "command": "npx",
152
+ "args": ["-y", "agentaos", "mcp"],
153
+ "env": {
154
+ "AGENTA_API_KEY": "your-api-key",
155
+ "AGENTA_API_SECRET": "your-api-secret"
156
+ }
157
+ }
158
+ }
159
+ }
160
+ ```
161
+
162
+ ### Cursor
163
+
164
+ Add to `.cursor/mcp.json`:
165
+
166
+ ```json
167
+ {
168
+ "mcpServers": {
169
+ "agenta": {
170
+ "command": "npx",
171
+ "args": ["-y", "agentaos", "mcp"],
172
+ "env": {
173
+ "AGENTA_API_KEY": "your-api-key",
174
+ "AGENTA_API_SECRET": "your-api-secret"
175
+ }
176
+ }
177
+ }
178
+ }
179
+ ```
180
+
181
+ ### From Source (development)
182
+
183
+ ```json
184
+ {
185
+ "mcpServers": {
186
+ "agenta": {
187
+ "command": "node",
188
+ "args": ["packages/wallet/dist/index.js"],
189
+ "env": {
190
+ "AGENTA_API_KEY": "your-api-key",
191
+ "AGENTA_API_SECRET": "your-api-secret"
192
+ }
193
+ }
194
+ }
195
+ }
196
+ ```
197
+
198
+ ## JSON-RPC Proxy
199
+
200
+ The `agenta proxy` command starts a local HTTP server that acts as an Ethereum JSON-RPC endpoint. It intercepts signing methods (`eth_sendTransaction`, `eth_signTransaction`, `eth_sign`, `personal_sign`) and routes them through Agenta's threshold signing, while forwarding all other calls to the upstream RPC.
201
+
202
+ ```bash
203
+ agenta proxy --port 8545 --rpc-url https://sepolia.base.org
204
+
205
+ # Use with Foundry
206
+ forge script Deploy.s.sol --rpc-url http://localhost:8545
207
+
208
+ # Use with cast
209
+ cast send 0x... "transfer(address,uint256)" 0x... 1000000 --rpc-url http://localhost:8545
210
+ ```
211
+
212
+ ## x402 Payment Support
213
+
214
+ Built-in support for the [x402 payment protocol](https://www.x402.org/). AI agents can discover, check, and pay for 402-protected resources automatically.
215
+
216
+ ```bash
217
+ # Check if a URL requires payment
218
+ # (via MCP: agenta_x402_check)
219
+
220
+ # Discover protected endpoints on a domain
221
+ # (via MCP: agenta_x402_discover)
222
+
223
+ # Fetch and auto-pay
224
+ # (via MCP: agenta_x402_fetch)
225
+ ```
226
+
227
+ ## Environment Variables
228
+
229
+ Environment variables are an alternative to file-based config. Useful for CI/CD, Docker, or MCP server mode.
230
+
231
+ | Variable | Description | Required |
232
+ |----------|-------------|----------|
233
+ | `AGENTA_API_KEY` | API key for authentication | Yes |
234
+ | `AGENTA_API_SECRET` | Base64-encoded signer key share | Yes |
235
+ | `AGENTA_SERVER` | Server URL (defaults to `https://api.agentaos.ai`) | No |
236
+ | `AGENTA_NETWORK` | Default network name (e.g. `base-sepolia`, `mainnet`) | No |
237
+
238
+ ## Security
239
+
240
+ - The full private key **never exists** -- not in memory, not on disk, not ever
241
+ - Signing is a distributed MPC protocol between your signer share and the server share
242
+ - Signer share stored in config file (`chmod 600`)
243
+ - User share stored in OS keychain (macOS Keychain, Windows Credential Manager, Linux libsecret)
244
+ - Admin auth uses a Bitwarden-model double hash -- server never stores raw credentials
245
+ - Server shares wiped from memory after every operation
246
+
247
+ ## License
248
+
249
+ Apache-2.0 -- see [LICENSE](../../LICENSE).
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const adminCommand: Command;
3
+ //# sourceMappingURL=admin.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin.command.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/admin.command.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAA+B,MAAM,WAAW,CAAC;AA0iBjE,eAAO,MAAM,YAAY,SAKC,CAAC"}