@oaath/cli 0.3.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 +89 -0
- package/dist/cli.mjs +1030 -0
- package/dist/deploy-BtvOPlub.mjs +161 -0
- package/dist/journal-DkNIXY4X.mjs +92 -0
- package/package.json +43 -0
package/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# @oaath/cli
|
|
2
|
+
|
|
3
|
+
Node CLI for the canonical Kernel v4 / EntryPoint 0.7 runtime. The package
|
|
4
|
+
installs the `oaath` command and belongs to the same fixed release group as
|
|
5
|
+
`@oaath/sdk`.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npx @oaath/cli doctor --chain 143
|
|
9
|
+
npx @oaath/cli doctor --chain 143 --rpc https://rpc.monad.xyz --json
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
From a repository checkout, run `bun run --filter @oaath/cli build` and
|
|
13
|
+
`node packages/cli/dist/cli.mjs doctor --chain 143`.
|
|
14
|
+
|
|
15
|
+
`doctor` reads one explicit RPC endpoint. Defaults cover Monad 143, World 480,
|
|
16
|
+
MegaETH 4326, Tempo 4217, Robinhood 4663 and Arc 5042. Other chains need `--rpc`.
|
|
17
|
+
The command does not read provider environment variables, request signatures or
|
|
18
|
+
send transactions. It checks chain ID before contract reads, uses one block
|
|
19
|
+
number for the snapshot, and allows at most 32 requests, four concurrently,
|
|
20
|
+
five seconds per request and 60 seconds total. There are no retries or fallbacks.
|
|
21
|
+
|
|
22
|
+
Each row is `verified` (pinned runtime hash), `present` (code at the canonical
|
|
23
|
+
CREATE2 address), `missing`, `mismatch` or `unreadable`. Kernel implementation
|
|
24
|
+
code contains chain-specific immutables: known-chain hashes are checked where
|
|
25
|
+
available; other chains report `present`, consistently with SDK binding. The
|
|
26
|
+
hash-pinned factory must also return the canonical implementation from `UUPS()`.
|
|
27
|
+
An unreadable endpoint is never reported as an absent contract.
|
|
28
|
+
|
|
29
|
+
Exit 0 means the ECDSA session module set and its prerequisites are ready;
|
|
30
|
+
exit 1 means not ready or unreadable; exit 2 means invalid arguments. JSON uses
|
|
31
|
+
the `oaath.runtime-readiness/v2` schema. Readiness is a snapshot, not a guarantee
|
|
32
|
+
of later RPC availability, account ownership, bundler/paymaster service or finality.
|
|
33
|
+
|
|
34
|
+
The owner validator remains application-selected. `passkeySessionsReady` reports
|
|
35
|
+
whether WebAuthn (passkey) sessions can bind: the WebAuthn signer and Daimo's
|
|
36
|
+
P-256 verifier must both carry their pinned runtime hashes. It never affects
|
|
37
|
+
`ready` or the exit code. The P-256 validator row is an optional owner capability;
|
|
38
|
+
the pinned P-256 validator requires the chain's native P-256 precompile. No test ECDSA validator is distributed by this CLI.
|
|
39
|
+
|
|
40
|
+
## Deploy the missing runtime
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
npx @oaath/cli deploy-runtime --chain 143 --rpc https://rpc.monad.xyz --dry-run
|
|
44
|
+
# Supply OAATH_DEPLOYER_PRIVATE_KEY through your secret manager or environment.
|
|
45
|
+
npx @oaath/cli deploy-runtime --chain 143 --rpc https://rpc.monad.xyz
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The command requires an explicit RPC URL. The endpoint must report the requested
|
|
49
|
+
chain and carry the exact EntryPoint 0.7 and singleton CREATE2 deployer runtimes.
|
|
50
|
+
It deploys only missing core components: Kernel UUPS, the factory's immutable
|
|
51
|
+
ECDSA implementation, factory, OAAth ValidityPolicy, CallPolicy, RateLimitPolicy,
|
|
52
|
+
the fixed-window RateLimitPolicy for windowed operation limits
|
|
53
|
+
and ECDSASigner, plus the passkey-session WebAuthnSigner and P-256 verifier. Every payload uses the canonical `0x4e59…956C` deployer and zero
|
|
54
|
+
salt; addresses are derived from the retained creation code and checked against
|
|
55
|
+
SDK bindings. Existing code with a wrong hash or unreadable evidence stops the
|
|
56
|
+
command. EntryPoint, the singleton deployer and the P-256 validator are not deployed.
|
|
57
|
+
|
|
58
|
+
New transactions use the funded account named by `OAATH_DEPLOYER_PRIVATE_KEY`.
|
|
59
|
+
Keys are never accepted as command-line arguments or saved to the journal.
|
|
60
|
+
`--dry-run` loads no key, writes no journal and sends no transactions. Without
|
|
61
|
+
`--dry-run`, invoking the command authorizes deployment fees using the RPC's gas
|
|
62
|
+
and fee estimates; each transaction is limited to ten million gas. This supports
|
|
63
|
+
ordinary EIP-1559 and legacy EIP-155 transactions. Chain-specific fee-token
|
|
64
|
+
transaction formats are not implemented.
|
|
65
|
+
|
|
66
|
+
The default journal is `~/.local/state/oaath/runtime.sqlite`; use `--journal <path>`
|
|
67
|
+
to choose a persistent file. It records chain, sender, component, creation-input
|
|
68
|
+
hash, nonce and transaction hash **before broadcasting once**. It saves no signed
|
|
69
|
+
transaction or private key. SQLite schema version 1 admits only one attempted
|
|
70
|
+
deployment per chain across concurrent commands sharing this journal.
|
|
71
|
+
|
|
72
|
+
Keep the same journal when rerunning. A timeout, missing receipt, lost reply or
|
|
73
|
+
unavailable provider only resumes observation of the recorded hash, even when
|
|
74
|
+
the wallet key is unavailable. The command requires the exact transaction,
|
|
75
|
+
canonical finalized receipt block and expected deployed code before confirming
|
|
76
|
+
its attempt. A finalized revert stops the command; it never retries automatically.
|
|
77
|
+
Do not delete or switch journals to bypass an unresolved transaction. An RPC
|
|
78
|
+
without `finalized` block support leaves the attempt pending.
|
|
79
|
+
|
|
80
|
+
Deployment allows at most 256 RPC requests and 180 seconds per invocation, with
|
|
81
|
+
five seconds per request, four concurrent snapshot reads, no transport retries,
|
|
82
|
+
and at most 30 receipt-observation attempts one second apart per transaction.
|
|
83
|
+
If finality takes longer, rerun later with the same journal. A later invocation
|
|
84
|
+
may load the key to deploy the *next* missing component after recovery finishes.
|
|
85
|
+
Once all core components verify, rerunning needs no key and sends nothing.
|
|
86
|
+
Exit 0 means ready or a successful dry run; exit 1 means incomplete or failed.
|
|
87
|
+
`--json` returns `oaath.runtime-deployment/v1` with the plan, readiness snapshot
|
|
88
|
+
and pending transaction hash. Production writes are deferred in the current
|
|
89
|
+
six-chain rollout; the command has been proved locally on Anvil.
|