@artblocks/abx-cli 0.7.3 → 0.8.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 (42) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/capabilities.d.ts +9 -6
  3. package/dist/capabilities.d.ts.map +1 -1
  4. package/dist/capabilities.js +9 -6
  5. package/dist/capabilities.js.map +1 -1
  6. package/dist/commands/auth.d.ts.map +1 -1
  7. package/dist/commands/auth.js +2 -1
  8. package/dist/commands/auth.js.map +1 -1
  9. package/dist/commands/deploy.d.ts.map +1 -1
  10. package/dist/commands/deploy.js +13 -3
  11. package/dist/commands/deploy.js.map +1 -1
  12. package/dist/creator-payment.d.ts +30 -0
  13. package/dist/creator-payment.d.ts.map +1 -0
  14. package/dist/creator-payment.js +100 -0
  15. package/dist/creator-payment.js.map +1 -0
  16. package/dist/creator-signer.d.ts +7 -2
  17. package/dist/creator-signer.d.ts.map +1 -1
  18. package/dist/creator-signer.js +38 -24
  19. package/dist/creator-signer.js.map +1 -1
  20. package/dist/deploy-plan.d.ts +6 -3
  21. package/dist/deploy-plan.d.ts.map +1 -1
  22. package/dist/deploy-plan.js +5 -3
  23. package/dist/deploy-plan.js.map +1 -1
  24. package/dist/flag-allowlists.d.ts +1 -1
  25. package/dist/flag-allowlists.d.ts.map +1 -1
  26. package/dist/flag-allowlists.js +1 -0
  27. package/dist/flag-allowlists.js.map +1 -1
  28. package/dist/flags.d.ts.map +1 -1
  29. package/dist/flags.js +3 -0
  30. package/dist/flags.js.map +1 -1
  31. package/dist/main.js +7 -7
  32. package/dist/main.js.map +1 -1
  33. package/dist/riskgate.d.ts.map +1 -1
  34. package/dist/riskgate.js +4 -2
  35. package/dist/riskgate.js.map +1 -1
  36. package/dist/signer.d.ts +1 -1
  37. package/dist/signer.js +3 -3
  38. package/dist/signer.js.map +1 -1
  39. package/package.json +6 -6
  40. package/skill/SKILL.md +3 -3
  41. package/skill/reference/services.md +38 -46
  42. package/skill/reference/setup.md +11 -13
@@ -112,52 +112,44 @@ the API key or account. A creator can always opt out by setting their own `ABX_R
112
112
 
113
113
  ## Creator wallet and sponsorship
114
114
 
115
- An account with a verified email can use one persistent ABX creator wallet. The
116
- `ABX_SERVICES_API_KEY` identifies the account but cannot sign. `--sponsor` discovers the provider's
117
- `abx-creator-wallet/v1` endpoint and reuses the wallet created during login. `abx auth wallet`
118
- provisions or shows it explicitly when needed. The first sponsored command
119
- asks the human to match one code and approve a Privy agent grant. The CLI keeps the rotating grant in
120
- the operating system's credential store and reuses it for up to 30 days, unless the creator revokes
121
- it first. The request-signing key remains memory-only. A reused grant removes another browser step; it does
122
- not remove the dry run, transaction summary, or production confirmation.
123
-
124
- The approval is authority for the agent to use the creator wallet, not approval of one displayed
125
- transaction. Review each exact network and transaction plan in the terminal. The creator can inspect
126
- and revoke active grants at `https://services.abx.io/authorize`.
127
-
128
- Treat the live descriptor and account capabilities as the authority for sponsored networks. The
129
- public [network table](https://docs.abx.io/docs/reference/deployments) is the human-readable summary,
130
- but it does not guarantee sponsorship for an account or moment. When the creator has not selected
131
- another signer, prefer this lane for an eligible testnet operation. For production, prove the flow on
132
- the paired testnet and repeat the production warning before confirmation. Before using it:
133
-
134
- 1. run `abx auth login` if the account has no API key;
135
- 2. inspect `abx capabilities --json` and the command help;
136
- 3. run the same command with `--dry-run --json`;
137
- 4. summarize the network, creator-wallet address, transaction group, zero value, permanent choices,
138
- and any experimental or beta status;
139
- 5. repeat with `--sponsor`; if no usable grant exists, give the human the verified URL and code and
140
- resume the same command after approval.
141
-
142
- The lane accepts zero-value calls and receipt-dependent staged content groups up to the live network
143
- and provider policy. ABX does not impose an additional per-transaction gas ceiling. Use
144
- `abx deploy-contract` for exact already-compiled creation bytecode; its sponsored path calls the
145
- keyless CREATE2 proxy because provider-backed raw creation is unsupported. The constructor therefore
146
- sees the proxy as `msg.sender`; use explicit constructor arguments for ownership. ABX does not
147
- compile or audit it. Never add retries around a sponsored write. An `unknown` outcome means the
148
- provider may have submitted it: preserve the operation ID and reconcile status before any new send.
149
- Use `abx auth operation <operation-id>` for that read-only reconciliation. If Services has confirmed
150
- an operation but a public RPC cannot return its receipt, the confirmation and transaction hash still
151
- stand; switch RPCs or inspect the hash, never replay the write.
152
-
153
- Sponsorship is optional service policy, not protocol support. `--send`, `--sign`, and `--unsigned`
154
- remain first-class bring-your-own alternatives. Honor an explicit choice of any of them. If the
155
- provider does not advertise the chain, the account is ineligible, or the transaction group exceeds
156
- policy, select one of those lanes rather than refusing the underlying operation. Do not use
157
- sponsorship on a production network unless the live descriptor, account capabilities, and command
158
- all explicitly support it. Never infer eligibility merely because the CLI recognizes the lane.
159
- During a network rollout, the descriptor may advertise a chain before every account is entitled.
160
- Check account capabilities too; a test-account grant does not establish general availability.
115
+ An account with a verified email has one persistent creator wallet. Its API key cannot sign.
116
+ `--embedded` discovers `abx-creator-wallet/v1` and reuses that wallet. `--sponsor` is a legacy alias
117
+ for this same automatic lane. Use `abx auth wallet` to provision/show the address before a dry run.
118
+
119
+ The default payment policy is automatic: when the provider advertises self-payment on the active
120
+ network and the wallet can cover native transaction value plus quoted fees, it pays its own gas.
121
+ Otherwise, eligible zero-value calls use sponsorship. Non-zero native value always requires enough
122
+ funds for value plus fees. Balances belong to each network; never infer funding from another chain
123
+ or from ERC-20 balances. Older providers retain sponsored-only behavior until they advertise self-payment.
124
+
125
+ One Privy agent grant authorizes wallet use, including transfers and gas spending. The CLI stores
126
+ its rotating grant in the OS credential store for up to 30 days unless revoked. Do not ask for a
127
+ separate grant when payment changes, or another browser approval when a grant is reusable. Manage
128
+ or revoke grants at `https://services.abx.io/authorize`. Review exact actions before sending; an agent
129
+ grant is not a per-transaction human approval.
130
+
131
+ Before sending, inspect live descriptor/account capabilities, run command help and a JSON dry run,
132
+ and summarize the active chain, creator-wallet address, native value, transaction group, estimated
133
+ fees and permanent choices. Honor an explicit bring-your-own signer choice. Repeat production risks
134
+ and prove the same flow on the paired testnet before production.
135
+
136
+ The CLI independently checks the service-returned payload against its local intent, including the
137
+ wallet, chain, recipient, calldata, value, gas limit, payer and native fee ceilings. A mismatch must
138
+ stop before signing. Fees on Base include estimated L1/operator charges in the funding reserve;
139
+ these rollup fees can change. The chosen payer and fee bounds are shown before submission.
140
+
141
+ Receipt-dependent staged content uses the same wallet serially, quoting each transaction before it
142
+ is prepared. `deploy-contract` routes exact creation bytecode through the keyless CREATE2 proxy;
143
+ pass ownership explicitly because the constructor caller is the proxy. ABX does not compile or audit it.
144
+
145
+ Once prepared, payment mode and fee ceilings cannot change. Never retry an uncertain result or
146
+ switch payers after submission. Preserve the operation ID and use `abx auth operation <operation-id>`
147
+ for read-only reconciliation. A provider-confirmed transaction remains submitted even if another
148
+ RPC cannot find its receipt; inspect the hash rather than replaying it.
149
+
150
+ `--send`, `--sign`, and `--unsigned` remain first-class alternatives. Funding cannot bypass a disabled
151
+ wallet, revoked authorization, unsupported network or provider policy. Sponsorship eligibility is
152
+ separate from network/protocol support and wallet self-payment.
161
153
 
162
154
  ## Feedback targets
163
155
 
@@ -136,17 +136,16 @@ Every write uses one of four lanes:
136
136
 
137
137
  | Lane | Select | Use when |
138
138
  |---|---|---|
139
- | Sponsored | `--sponsor` | The live remote advertises sponsorship for this chain and command |
139
+ | Creator wallet | `--embedded` (alias `--sponsor`) | The live provider enables self-payment or sponsorship on this chain |
140
140
  | Hot | `--send` or default | An environment key may sign unattended |
141
141
  | Wallet | `--sign --for 0x…` | A human approves in their browser wallet |
142
142
  | Cold | `--unsigned --for 0x…` | A multisig/offline signer needs prepared transactions |
143
143
 
144
144
  Honor an explicit creator choice. Otherwise run `abx capabilities --json`, the command help, and
145
- `abx remote abx`. Prefer `--sponsor` when the provider advertises the active chain, the command and
146
- transaction group are eligible, and sponsorship is enabled—especially on a testnet, where it removes
147
- wallet and faucet setup. Sponsorship is provider policy, not protocol support: if it is unavailable,
148
- paused, or ineligible, fall back to the appropriate bring-your-own lane rather than treating the ABX
149
- operation as unsupported.
145
+ `abx remote abx`. Prefer `--embedded` when the provider advertises the wallet on the active chain.
146
+ It self-pays when native funds cover value plus quoted fees; otherwise eligible zero-value calls
147
+ use sponsorship. Non-zero-value transactions need funds. Honor live wallet/payment capabilities;
148
+ if unavailable, choose a bring-your-own lane. Never switch an explicitly chosen signer.
150
149
 
151
150
  Select the lane before the JSON dry run. The signer can affect ownership, salts, and predicted
152
151
  addresses. If the lane changes, rerun the dry run and summarize the revised plan before execution.
@@ -216,10 +215,9 @@ human confirmation authorizes execution.
216
215
  8. Run command help, then a JSON dry run.
217
216
  9. Confirm the plan and only then execute.
218
217
 
219
- For an eligible first-party account, `--sponsor` replaces local key and faucet setup with an
220
- account-bound creator wallet. The first use opens a Privy agent grant; later commands reuse that
221
- grant for up to 30 days, unless the creator revokes it first. Do not ask for another browser approval when the
222
- CLI resumes an existing grant. Use sponsorship only when the live descriptor and account
223
- capabilities advertise the active chain. Test the exact flow on the reported paired testnet before
224
- production. Read [services.md](services.md) before using it. Sponsorship is zero-value and never a
225
- reason to skip the dry run or transaction summary.
218
+ For an eligible first-party account, `--embedded` uses the account-bound wallet without a local key.
219
+ One reusable agent grant covers both native self-payment and sponsorship. Do not request another
220
+ grant when the payer changes. The provider must advertise the network/payment capabilities; fund
221
+ the same address on the active chain when self-payment is needed. Read [services.md](services.md),
222
+ prove the paired testnet flow and review the dry run before sending. Only sponsored calls must
223
+ have zero native value; self-paid calls may carry value when the wallet covers value plus fees.