zk-agent-cli 0.1.0-beta.1 → 0.1.0-beta.3

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 (31) hide show
  1. package/README.md +23 -8
  2. package/dist/builtin-account-profiles/artifacts/daily-spend-limit/Account.json +693 -0
  3. package/dist/builtin-account-profiles/artifacts/sed-lite/Account.json +970 -0
  4. package/dist/builtin-account-profiles/artifacts/sed-lite/EOAValidator.json +50 -0
  5. package/dist/builtin-account-profiles/artifacts/sed-lite/NativePerTxLimitHook.json +267 -0
  6. package/dist/builtin-account-profiles/artifacts/sed-lite/TargetAllowlistHook.json +346 -0
  7. package/dist/builtin-account-profiles/artifacts/sed-lite/TargetSelectorAllowlistHook.json +643 -0
  8. package/dist/builtin-account-profiles/contracts/daily-spend-limit/AAFactory.sol +28 -0
  9. package/dist/builtin-account-profiles/contracts/daily-spend-limit/Account.sol +179 -0
  10. package/dist/builtin-account-profiles/contracts/daily-spend-limit/SpendLimit.sol +85 -0
  11. package/dist/builtin-account-profiles/contracts/sed-lite/Account.sol +230 -0
  12. package/dist/builtin-account-profiles/contracts/sed-lite/Auth.sol +16 -0
  13. package/dist/builtin-account-profiles/contracts/sed-lite/BootloaderAuth.sol +11 -0
  14. package/dist/builtin-account-profiles/contracts/sed-lite/EOAValidator.sol +23 -0
  15. package/dist/builtin-account-profiles/contracts/sed-lite/IValidationHook.sol +20 -0
  16. package/dist/builtin-account-profiles/contracts/sed-lite/IValidator.sol +11 -0
  17. package/dist/builtin-account-profiles/contracts/sed-lite/ModuleAuth.sol +11 -0
  18. package/dist/builtin-account-profiles/contracts/sed-lite/ModuleManager.sol +46 -0
  19. package/dist/builtin-account-profiles/contracts/sed-lite/NativePerTxLimitHook.sol +67 -0
  20. package/dist/builtin-account-profiles/contracts/sed-lite/OwnerManager.sol +25 -0
  21. package/dist/builtin-account-profiles/contracts/sed-lite/SelfAuth.sol +9 -0
  22. package/dist/builtin-account-profiles/contracts/sed-lite/TargetAllowlistHook.sol +110 -0
  23. package/dist/builtin-account-profiles/contracts/sed-lite/TargetSelectorAllowlistHook.sol +263 -0
  24. package/dist/builtin-account-profiles/contracts/sed-lite/ValidationHookManager.sol +76 -0
  25. package/dist/builtin-account-profiles/contracts/sed-lite/ValidatorManager.sol +31 -0
  26. package/dist/builtin-account-profiles/package.json +5 -0
  27. package/dist/connector-ui/assets/index-BnFLonFL.css +1 -0
  28. package/dist/connector-ui/assets/index-WTJRR5fK.js +40 -0
  29. package/dist/connector-ui/index.html +13 -0
  30. package/dist/index.js +248 -26
  31. package/package.json +1 -1
package/README.md CHANGED
@@ -34,7 +34,9 @@ zksync-agent --help
34
34
 
35
35
  ## Prerequisites
36
36
 
37
- - Node.js `>=24` if you install globally.
37
+ - Node.js `>=24` for either `npx zk-agent-cli ...` or global install.
38
+ Older Node versions may still start the CLI, but the current package is not
39
+ supported there and npm will emit `EBADENGINE` warnings.
38
40
  - The default local approval path expects the connector UI to be reachable at
39
41
  `http://localhost:4444`. Override it with
40
42
  `zk-agent setup --connector-url <url>` when needed.
@@ -91,6 +93,7 @@ zk-agent workflow fund --wallet main --amount <amount> --execute
91
93
  Shortest relay-backed path in one command:
92
94
 
93
95
  ```bash
96
+ zk-agent relay inspect --relay-url <relay-url>
94
97
  zk-agent wallet create --relay-url <relay-url> --wait-relay --prompt-code
95
98
  zk-agent wallet reapprove --name main --relay-url <relay-url> --wait-relay --prompt-code
96
99
  ```
@@ -98,13 +101,18 @@ zk-agent wallet reapprove --name main --relay-url <relay-url> --wait-relay --pro
98
101
  Local relay prototype path:
99
102
 
100
103
  ```bash
101
- zk-agent relay serve
104
+ zk-agent relay serve --public-origin https://relay.example.com
102
105
  zk-agent wallet create --relay-url <relay-url>
103
106
  zk-agent wallet request approve --request-id <id> --relay-url <relay-url> --code <code> --wait
104
107
  ```
105
108
 
106
109
  The built-in relay is a local file-backed prototype. It is useful for operator
107
- testing, not a production hosted relay service.
110
+ testing, not a production hosted relay service. When it sits behind a tunnel or
111
+ reverse proxy, pass `--public-origin` so the emitted share/status URLs point at
112
+ the externally reachable hosted URL instead of the local bind address. The
113
+ published package now also ships the bundled connector UI build used by
114
+ `relay serve`, so hosted share-link approval no longer depends on a separate
115
+ source checkout just to serve the UI.
108
116
 
109
117
  ## Local Storage
110
118
 
@@ -124,18 +132,25 @@ Common files created by the default path:
124
132
 
125
133
  ## Smart-Account Profiles
126
134
 
127
- The published package can inspect built-in profiles:
135
+ The published package ships built-in profile artifacts for the first-party
136
+ smart-account presets:
128
137
 
129
138
  ```bash
130
139
  zk-agent wallet smart-account profiles --json
131
140
  ```
132
141
 
142
+ That means the packaged CLI can use:
143
+
144
+ - `zk-agent wallet smart-account predict --profile sed-lite`
145
+ - `zk-agent wallet smart-account deploy --profile sed-lite`
146
+ - the same built-in path for `daily-spend-limit`
147
+
133
148
  Current boundary:
134
149
 
135
- - profile inspection works from the packaged CLI
136
- - built-in profile deploys still require
137
- `ZK_AGENT_ACCOUNT_PROFILES_ROOT=<checked-out account-profiles package dir>`
138
- because the npm tarball does not ship the EraVM profile artifacts
150
+ - built-in profiles work from the packaged CLI
151
+ - custom profile artifacts still use `--artifact <json|@file>`
152
+ - `ZK_AGENT_ACCOUNT_PROFILES_ROOT` is now only a source-checkout override for
153
+ development or custom runtime layouts
139
154
 
140
155
  ## Common Failures
141
156