moneyos 0.3.4 → 0.4.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.
package/README.md CHANGED
@@ -1,17 +1,20 @@
1
1
  # MoneyOS
2
2
 
3
3
  MoneyOS is an open source programmable money SDK and CLI for developers and AI
4
- agents. The repo includes balance, send, swap, runtime-composition, wallet,
5
- and executor code, with the project currently centered on Arbitrum.
4
+ agents. The root package covers runtime composition, balance/send flows,
5
+ wallet/session management, and executor code. Swap now lives as a separate
6
+ tool package, with the project currently centered on Arbitrum.
6
7
 
7
8
  The project is still early. Package boundaries and some APIs are still settling,
8
9
  but the repo is structured so each major surface can evolve independently.
9
10
 
10
11
  ## What lives in this repo
11
12
 
12
- - `moneyos`: the root SDK + CLI package
13
+ - `moneyos`: the root SDK + CLI package for runtime, wallet, balance, and send
13
14
  - `@moneyos/core`: runtime interfaces, shared types, chain/token registries
14
- - `@moneyos/tool-swap`: swap execution tool and provider surface
15
+ - `@moneyos/swap`: canonical swap package and Odos provider, published on npm
16
+
17
+ Current package-boundary rules live in [`docs/architecture.md`](docs/architecture.md).
15
18
 
16
19
  ## CLI
17
20
 
@@ -29,7 +32,6 @@ moneyos backup status
29
32
  moneyos keystore status
30
33
  moneyos balance <token> [--address 0x...]
31
34
  moneyos send <amount> <token> <to>
32
- moneyos swap <amount> <tokenIn> <tokenOut>
33
35
  ```
34
36
 
35
37
  For the full command surface and flag details, run `moneyos --help`.
@@ -64,12 +66,50 @@ The runtime seam is intentionally small. `createMoneyOS` can also take injected
64
66
  `execute`, `read`, and `assets` implementations, which is how external packages
65
67
  plug in.
66
68
 
67
- ## Published npm package
69
+ Swap is no longer built into the root SDK or CLI. The canonical implementation
70
+ lives in `@moneyos/swap`, which executes against `moneyos.runtime`.
71
+
72
+ Install it alongside the root package:
73
+
74
+ ```bash
75
+ npm install moneyos @moneyos/swap
76
+ ```
77
+
78
+ Then call it against the root runtime seam:
79
+
80
+ ```ts
81
+ import { createMoneyOS } from "moneyos";
82
+ import { executeSwap, OdosProvider } from "@moneyos/swap";
83
+
84
+ const moneyos = createMoneyOS({
85
+ chainId: 42161,
86
+ privateKey: process.env.MONEYOS_PRIVATE_KEY as `0x${string}`,
87
+ });
88
+
89
+ const result = await executeSwap(
90
+ {
91
+ tokenIn: "USDC",
92
+ tokenOut: "RYZE",
93
+ amount: "1",
94
+ provider: new OdosProvider(),
95
+ chainId: 42161,
96
+ },
97
+ moneyos.runtime,
98
+ );
99
+
100
+ console.log(result.hash);
101
+ ```
102
+
103
+ ## Published npm packages
104
+
105
+ Published packages:
106
+
107
+ - `moneyos`
108
+ - `@moneyos/core`
109
+ - `@moneyos/swap`
68
110
 
69
- `moneyos` is published on npm. `npm install moneyos` and `npx moneyos` give
70
- you the latest tagged release, not unreleased commits on `main`. If you want
71
- work that has not shipped in a tagged release yet, clone the repo and build
72
- from source.
111
+ `moneyos@0.4.0` no longer bundles swap into the root SDK or CLI. If you want
112
+ swap, install `@moneyos/swap` alongside `moneyos`.
73
113
 
74
114
  ## Current wallet model
75
115
 
@@ -152,7 +192,7 @@ What it does not protect against:
152
192
 
153
193
  ## Known operational limitations
154
194
 
155
- - If a session-backed `send` or `swap` returns a timeout or disconnect error,
195
+ - If a session-backed write command returns a timeout or disconnect error,
156
196
  do not assume nothing was broadcast. Verify on-chain before retrying.
157
197
  - PR #12 fixed the common 750ms false-timeout path, but client-disconnect
158
198
  detection and request idempotency are still follow-up work.
@@ -199,7 +239,7 @@ What still needs more hands-on validation:
199
239
 
200
240
  - live session-backed ETH send
201
241
  - live session-backed ERC-20 send
202
- - live session-backed swap
242
+ - live execution of external tools against the session-backed runtime seam
203
243
  - more live usage of the encrypted-wallet/auth/backup flow in a real terminal
204
244
 
205
245
  ## Development
@@ -207,16 +247,18 @@ What still needs more hands-on validation:
207
247
  ```bash
208
248
  npm install
209
249
  npm run build:core
210
- npm run build:tool-swap
250
+ npm run build:swap
211
251
  npm run typecheck
212
252
  npm test
213
253
  npm run lint
214
254
  npm run build
215
255
  ```
216
256
 
217
- The repo currently uses npm workspaces. Before any npm release, verify the
218
- packed tarballs with `npm pack --dry-run` and confirm publish-time dependency
219
- resolution for the extracted workspace packages.
257
+ The repo currently uses npm workspaces. Test runs build `@moneyos/core` and
258
+ `@moneyos/swap` first so the swap tests exercise the real workspace
259
+ package boundary instead of source-relative imports. Before any npm release,
260
+ verify the packed tarballs with `npm pack --dry-run` and confirm publish-time
261
+ dependency resolution for the extracted workspace packages.
220
262
 
221
263
  ## License
222
264