moneyos 0.5.1 → 0.6.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/CHANGELOG.md +33 -0
- package/README.md +139 -6
- package/dist/cli/index.js +1067 -110
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +90 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +93 -12
- package/dist/index.js.map +1 -1
- package/node_modules/@moneyos/gasless/CHANGELOG.md +5 -0
- package/node_modules/@moneyos/gasless/README.md +29 -0
- package/node_modules/@moneyos/gasless/contracts/MoneyOSAccountFactoryV1.sol +58 -0
- package/node_modules/@moneyos/gasless/contracts/MoneyOSAccountV1.sol +330 -0
- package/node_modules/@moneyos/gasless/contracts/interfaces/IIntentTypesV1.sol +20 -0
- package/node_modules/@moneyos/gasless/contracts/lib/ECDSA.sol +41 -0
- package/node_modules/@moneyos/gasless/contracts/lib/IntentHashV1.sol +74 -0
- package/node_modules/@moneyos/gasless/dist/index.cjs +753 -0
- package/node_modules/@moneyos/gasless/dist/index.cjs.map +1 -0
- package/node_modules/@moneyos/gasless/dist/index.d.cts +514 -0
- package/node_modules/@moneyos/gasless/dist/index.d.ts +514 -0
- package/node_modules/@moneyos/gasless/dist/index.js +706 -0
- package/node_modules/@moneyos/gasless/dist/index.js.map +1 -0
- package/node_modules/@moneyos/gasless/package.json +43 -0
- package/node_modules/@moneyos/gasless/vectors/intent-v1-golden.json +36 -0
- package/package.json +14 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the repo's current `main` branch are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.6.0 - 2026-04-15
|
|
6
|
+
|
|
7
|
+
Gasless execution, local contacts, and a wave of wallet UX cleanup.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Gasless execution mode, opt-in and default-off. `moneyos gasless status|enable|disable` routes write commands through a smart-account executor instead of the owner EOA. The relay sponsors gas; the smart account still has to hold the asset being sent or swapped. Arbitrum One is the v1 target, with baked defaults for the relay URL, sponsor, factory, and derived smart-account address so `moneyos gasless enable` works out of the box.
|
|
12
|
+
- Smart-account primitives shipped inside the new `@moneyos/gasless` workspace package: `MoneyOSAccountV1`, `MoneyOSAccountFactoryV1` with deterministic CREATE2 deployment, EIP-712 `IntentV1`, ERC-1271 owner-only validation, and replay-safe signer-scoped nonce lanes. The package is bundled inside the published root `moneyos` tarball and is not published to npm on its own.
|
|
13
|
+
- Hosted gasless relay at `services/relay/` — Fastify HTTP app with `POST /v1/execute`, `GET /v1/capabilities`, `GET /v1/tx/:id`; SQLite persistence for nonce reservations, submissions, and usage counters; nonce/simulation/treasury/wallet/health gates; submission adapter with `deployAndExecute` for undeployed smart accounts; kill switch; deploy artifacts for macOS launchd, Linux systemd, and Docker.
|
|
14
|
+
- Local contacts address book. `moneyos contact set|list|remove` stores `name → address` pairs in `~/.moneyos/contacts.json` with 0600 permissions. `moneyos send <amount> <token> <name>` now accepts either a 0x address or a saved contact name, and prints the resolved address before execution so the recipient is always visible.
|
|
15
|
+
- `moneyos update [tool] [--check]` for updating installed MoneyOS CLI tools from the user tool home.
|
|
16
|
+
- `moneyos balance --all` to list balances across every built-in token on the selected chain in one call.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Session send requests are idempotent by request ID at the session layer, so a disconnect after broadcast no longer races into a replay.
|
|
21
|
+
- Cross-chain writes resolve RPC URLs from the chain registry instead of always using the configured default chain's RPC.
|
|
22
|
+
- Core asset registry is honored consistently by balance reads.
|
|
23
|
+
- Release PR shape is mechanically enforced in CI: any PR that bumps a `package.json` version is rejected if it touches anything outside `package.json`, `CHANGELOG.md`, or `package-lock.json` (and their workspace equivalents).
|
|
24
|
+
- Release discipline documented end-to-end in `CONTRIBUTING.md` and `DEVELOPER_GUIDE.md`.
|
|
25
|
+
- Repo docs aligned with the shipped gasless state: `docs/architecture.md`, `DEVELOPER_GUIDE.md`, root `README.md`, `docs/adr-gasless-v1.md`, and the gasless planning documents relabeled as current-state or historical as appropriate.
|
|
26
|
+
- Dropped the implicit "no AI attribution" rule from `DEVELOPER_GUIDE.md`. Commit signature hygiene stays a norm; explicit AI attribution is neither required nor forbidden.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- `moneyos gasless enable` on a fresh install now derives and persists the default smart-account address before marking gasless enabled; previously the enabled flag could save without the derived account.
|
|
31
|
+
- First gasless send against an undeployed smart account no longer fails while trying to read nonce from bytecode that does not exist yet; missing account code is treated as nonce 0.
|
|
32
|
+
- Replayed relay submissions that were already `submitted` or `confirmed` are no longer overwritten by a later rejection record; replay idempotency holds at the app boundary.
|
|
33
|
+
- Gasless executor backdates `validAfter` by 30 seconds to tolerate small client/relay clock skew.
|
|
34
|
+
- The baked Arbitrum gasless relay default was refreshed to the live Funnel hostname after a Tailscale naming drift.
|
|
35
|
+
- Windows session socket/token transport: ACL handling for secure-file checks, named-pipe coverage, and a platform-specific regression fix.
|
|
36
|
+
- `moneyos update` edge cases covered by regression tests.
|
|
37
|
+
|
|
5
38
|
## 0.5.1 - 2026-04-13
|
|
6
39
|
|
|
7
40
|
### Fixed
|
package/README.md
CHANGED
|
@@ -12,12 +12,20 @@ but the repo is structured so each major surface can evolve independently.
|
|
|
12
12
|
|
|
13
13
|
- `moneyos`: the root SDK + CLI package for runtime, wallet, balance, and send
|
|
14
14
|
- `@moneyos/core`: runtime interfaces, shared types, chain/token registries
|
|
15
|
+
- `@moneyos/gasless`: smart-account contracts, intent helpers, gasless executor, relay client, and baked Arbitrum defaults
|
|
15
16
|
- `@moneyos/swap`: canonical swap package and Odos provider, published on npm
|
|
17
|
+
- `services/relay`: the hosted relay service that sponsors gas for the gasless path
|
|
16
18
|
|
|
17
19
|
Current package-boundary rules live in [`docs/architecture.md`](docs/architecture.md).
|
|
18
20
|
|
|
19
21
|
## CLI
|
|
20
22
|
|
|
23
|
+
Install the CLI globally:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install -g moneyos
|
|
27
|
+
```
|
|
28
|
+
|
|
21
29
|
Available commands:
|
|
22
30
|
|
|
23
31
|
```bash
|
|
@@ -26,16 +34,28 @@ moneyos auth unlock
|
|
|
26
34
|
moneyos auth lock
|
|
27
35
|
moneyos auth status
|
|
28
36
|
moneyos auth change-password
|
|
37
|
+
moneyos gasless status
|
|
38
|
+
moneyos gasless enable
|
|
39
|
+
moneyos gasless disable
|
|
29
40
|
moneyos add <tool>
|
|
30
41
|
moneyos remove <tool>
|
|
42
|
+
moneyos update [tool] [--check]
|
|
31
43
|
moneyos tools
|
|
32
|
-
moneyos swap <amount> <tokenIn> <tokenOut> [--chain <id>] [--provider odos]
|
|
33
44
|
moneyos backup export [--out ./wallet-backup.json] [--force]
|
|
34
45
|
moneyos backup restore <path> [--force]
|
|
35
46
|
moneyos backup status
|
|
47
|
+
moneyos contact set <name> <address>
|
|
48
|
+
moneyos contact list
|
|
49
|
+
moneyos contact remove <name>
|
|
36
50
|
moneyos keystore status
|
|
37
|
-
moneyos balance
|
|
38
|
-
moneyos send <amount> <token> <to>
|
|
51
|
+
moneyos balance [token] [--address 0x...] [--chain <id>] [--all]
|
|
52
|
+
moneyos send <amount> <token> <to|contact>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
After `moneyos add swap`, the installed swap tool adds:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
moneyos swap <amount> <tokenIn> <tokenOut> [--chain <id>] [--provider odos]
|
|
39
59
|
```
|
|
40
60
|
|
|
41
61
|
For the full command surface and flag details, run `moneyos --help`.
|
|
@@ -43,13 +63,102 @@ For the full command surface and flag details, run `moneyos --help`.
|
|
|
43
63
|
Example:
|
|
44
64
|
|
|
45
65
|
```bash
|
|
66
|
+
npm install -g moneyos
|
|
46
67
|
moneyos init
|
|
47
68
|
moneyos auth unlock
|
|
69
|
+
moneyos balance --all
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
If you want to try swap from the CLI, fund the wallet first with the token you
|
|
73
|
+
want to swap and enough gas for the target chain, then install the tool:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
48
76
|
moneyos add swap
|
|
49
77
|
moneyos tools
|
|
50
78
|
moneyos swap 0.1 RYZE ETH
|
|
51
79
|
```
|
|
52
80
|
|
|
81
|
+
### Local contacts
|
|
82
|
+
|
|
83
|
+
Save addresses as named contacts and send to them by name:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
moneyos contact set dad 0x689c78B4DBa64A88A0dC03a579D01681F52C5A73
|
|
87
|
+
moneyos contact list
|
|
88
|
+
moneyos send 10 USDC dad
|
|
89
|
+
moneyos contact remove dad
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Contacts are stored locally at `~/.moneyos/contacts.json`. The file is
|
|
93
|
+
per-user, never shared, never synced. `moneyos send` prints the resolved
|
|
94
|
+
address before executing so you can verify the recipient:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
$ moneyos send 10 USDC dad
|
|
98
|
+
Resolved dad → 0x689c78B4DBa64A88A0dC03a579D01681F52C5A73
|
|
99
|
+
Sending 10 USDC to 0x689c78B4... on Arbitrum One...
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Raw addresses still work — `moneyos send 10 USDC 0x...` behaves exactly as
|
|
103
|
+
before. If the recipient is neither a valid address nor a known contact, the
|
|
104
|
+
send fails with a clear error.
|
|
105
|
+
|
|
106
|
+
### Gasless mode (v1 opt-in)
|
|
107
|
+
|
|
108
|
+
Gasless is available but default-off in v1.
|
|
109
|
+
|
|
110
|
+
Gasless changes execution mode. It does not replace or convert the imported
|
|
111
|
+
wallet.
|
|
112
|
+
|
|
113
|
+
Mental model:
|
|
114
|
+
|
|
115
|
+
- your imported private key remains the owner EOA
|
|
116
|
+
- `moneyos gasless enable` derives and stores a separate deterministic smart-account address for that owner
|
|
117
|
+
- with the baked network defaults, the same owner derives the same smart-account address on a given chain, so the mapping is recoverable from the owner key alone
|
|
118
|
+
- after the next `moneyos auth unlock`, write commands execute from the smart account instead of the owner EOA
|
|
119
|
+
- balances do not move automatically between the owner EOA and the smart account
|
|
120
|
+
- the relay sponsors gas only; the smart account still needs the asset being sent or swapped
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
moneyos gasless status
|
|
124
|
+
moneyos gasless enable
|
|
125
|
+
# re-unlock so the new executor mode applies
|
|
126
|
+
moneyos auth unlock
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
When gasless mode is enabled, write commands use the gasless smart-account
|
|
130
|
+
executor instead of the EOA executor. Disable it to return to EOA:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
moneyos gasless disable
|
|
134
|
+
moneyos auth unlock
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
On Arbitrum One v1, `moneyos gasless enable` now bakes in the public relay URL, sponsor, and factory-derived smart-account address automatically. Manual overrides still exist through these environment variables:
|
|
138
|
+
|
|
139
|
+
- `MONEYOS_GASLESS_RELAY_URL`
|
|
140
|
+
- `MONEYOS_GASLESS_ACCOUNT`
|
|
141
|
+
- `MONEYOS_GASLESS_SPONSOR`
|
|
142
|
+
- optional: `MONEYOS_GASLESS_NONCE_KEY`
|
|
143
|
+
- optional: `MONEYOS_GASLESS_VALIDITY_WINDOW_SECONDS`
|
|
144
|
+
|
|
145
|
+
Important bootstrap note: this is gasless execution, not gasless onboarding. The relay sponsors gas, but it does not sponsor transfer value. A brand-new user still has to fund the smart account with actual assets first, for example USDC, ETH, WETH, or RYZE on Arbitrum One, before a gasless send can succeed.
|
|
146
|
+
|
|
147
|
+
If you already have funds in the owner EOA, the practical flow is:
|
|
148
|
+
|
|
149
|
+
1. have an initialized wallet (`moneyos init` or `moneyos init --key 0x...`) and unlock it with `moneyos auth unlock`
|
|
150
|
+
2. run `moneyos balance --all` to inspect the owner EOA balance
|
|
151
|
+
3. run `moneyos gasless enable`, then `moneyos auth unlock`
|
|
152
|
+
4. run `moneyos auth status` to see the active smart-account address
|
|
153
|
+
5. fund that smart-account address from the owner EOA or another wallet
|
|
154
|
+
6. run `moneyos balance --all --address <smart-account-address>` to inspect smart-account funds
|
|
155
|
+
7. retry the gasless send or swap
|
|
156
|
+
|
|
157
|
+
Note: `moneyos balance` without `--address` still shows the owner EOA balance,
|
|
158
|
+
even when gasless mode is active. Use `moneyos auth status` to get the active
|
|
159
|
+
smart-account address, then pass that address with `--address` to inspect
|
|
160
|
+
smart-account funds.
|
|
161
|
+
|
|
53
162
|
## SDK
|
|
54
163
|
|
|
55
164
|
```ts
|
|
@@ -86,6 +195,12 @@ const moneyos = createMoneyOS({
|
|
|
86
195
|
});
|
|
87
196
|
```
|
|
88
197
|
|
|
198
|
+
Session-backed writes currently support the registered chain set only:
|
|
199
|
+
Arbitrum `42161`, Ethereum `1`, and Polygon `137`. Each send/swap request
|
|
200
|
+
carries its own `chainId`, so a single unlocked session can target any of
|
|
201
|
+
those supported chains. A custom `rpcUrl` still applies only to the configured
|
|
202
|
+
default chain; other supported chains use the built-in chain registry RPC URLs.
|
|
203
|
+
|
|
89
204
|
Tool packages should still execute against `moneyos.runtime`; they should not
|
|
90
205
|
import `connectLocalSession()` themselves.
|
|
91
206
|
|
|
@@ -96,13 +211,19 @@ plug in.
|
|
|
96
211
|
Swap still lives in the separate `@moneyos/swap` package, but the root CLI now
|
|
97
212
|
owns first-class tool install/use UX for CLI-integrated packages.
|
|
98
213
|
|
|
99
|
-
For CLI usage, install the root package and
|
|
100
|
-
MoneyOS tool home:
|
|
214
|
+
For CLI usage, install the root package first and validate the wallet surface:
|
|
101
215
|
|
|
102
216
|
```bash
|
|
103
|
-
npm install moneyos
|
|
217
|
+
npm install -g moneyos
|
|
104
218
|
moneyos init
|
|
105
219
|
moneyos auth unlock
|
|
220
|
+
moneyos balance --all
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
If you want to use swap from the CLI, fund the wallet first with the input
|
|
224
|
+
token and enough gas for the target chain, then add the tool:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
106
227
|
moneyos add swap
|
|
107
228
|
moneyos tools
|
|
108
229
|
moneyos swap 0.1 RYZE ETH
|
|
@@ -147,6 +268,8 @@ Published packages:
|
|
|
147
268
|
- `@moneyos/core`
|
|
148
269
|
- `@moneyos/swap`
|
|
149
270
|
|
|
271
|
+
`@moneyos/gasless` exists in this repo but is not published to npm yet.
|
|
272
|
+
|
|
150
273
|
Current `moneyos` releases no longer bundle swap into the root SDK or CLI. If
|
|
151
274
|
you want swap from the root CLI, install `moneyos` and then run
|
|
152
275
|
`moneyos add swap`.
|
|
@@ -157,6 +280,7 @@ What is landed in code today:
|
|
|
157
280
|
|
|
158
281
|
- The CLI stores the root wallet in an encrypted local wallet file at `~/.moneyos/wallet.json`
|
|
159
282
|
- `~/.moneyos/config.json` now stores only non-secret settings such as chain and RPC configuration
|
|
283
|
+
- `moneyos gasless enable` keeps that encrypted wallet as the owner EOA and stores a separate smart-account config for gasless execution
|
|
160
284
|
- `MONEYOS_PRIVATE_KEY` remains an explicit override for ephemeral CI or agent runs
|
|
161
285
|
- `moneyos auth unlock` opens a short-lived local session for write commands
|
|
162
286
|
- workflow scripts can attach to that unlocked session with `connectLocalSession()`
|
|
@@ -193,6 +317,10 @@ MoneyOS prompts you for a wallet password, encrypts the key into
|
|
|
193
317
|
`~/.moneyos/backups/`. After that, use `moneyos auth unlock` before any
|
|
194
318
|
write command.
|
|
195
319
|
|
|
320
|
+
Importing a raw private key keeps that address as the owner EOA. If you later
|
|
321
|
+
enable gasless, MoneyOS derives a separate smart-account address from that
|
|
322
|
+
owner key; it does not convert the imported EOA or move its assets.
|
|
323
|
+
|
|
196
324
|
The CLI only supports raw hex private-key import today. Seed phrases,
|
|
197
325
|
keystore v3 JSON files, and hardware-wallet derivation are not implemented.
|
|
198
326
|
If your wallet currently lives in one of those formats, derive the raw hex
|
|
@@ -267,6 +395,7 @@ What we have verified locally on the current code:
|
|
|
267
395
|
- unit tests pass
|
|
268
396
|
- lint passes
|
|
269
397
|
- typechecks pass
|
|
398
|
+
- workspace lint/typecheck passes after `build:core`
|
|
270
399
|
- workspace builds pass
|
|
271
400
|
- the built CLI runs
|
|
272
401
|
- encrypted wallet creation, unlock/session, backup export, and backup restore protections are covered by tests
|
|
@@ -290,8 +419,12 @@ npm install
|
|
|
290
419
|
npm run build:core
|
|
291
420
|
npm run build:swap
|
|
292
421
|
npm run typecheck
|
|
422
|
+
npm run typecheck:core
|
|
423
|
+
npm run typecheck:swap
|
|
293
424
|
npm test
|
|
294
425
|
npm run lint
|
|
426
|
+
npm run lint:core
|
|
427
|
+
npm run lint:swap
|
|
295
428
|
npm run build
|
|
296
429
|
```
|
|
297
430
|
|