@black-market/sdk 0.12.0 → 0.13.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.
@@ -1,588 +1,207 @@
1
- # Examples
2
-
3
- The launch examples use the public `@black-market/sdk` 0.12.0 package and viem.
4
- Build this checkout before running its examples; in a consumer project install
5
- `@black-market/sdk@0.12.0` for opt-in UFG treasuries and current proof semantics.
6
- The default chain-4663 launch cases retain
7
- the October8 mined fixed pool-bound V4 config6/V2 and canonical Abyss config1 deployment.
8
- The SDK additionally knows the October11 zero-author-royalty Dynamic Fee Hook;
9
- its registration does not change the fixed cases' selection or fee schedule.
10
- HMM Fixed/Dynamic V2 are additional admitted October17 presets; their required
11
- 512-byte typed launch tail and explicit bid/reference guards are demonstrated by
12
- `hmm-launch-config.ts`. The generic HMM profile keys now select V2 only.
13
- Existing fixed cases are intentionally unchanged. See the lifecycle guide for
14
- the breaking migration, per-swap funding and fee-owner configuration/pause ABIs.
15
- Historical October5 config5 evidence is not relabeled as these graphs. Discovery
16
- is read-only; fixed launch examples default to an unsigned dry run. Only
17
- `--broadcast` (or deliberate `--resume` continuation) authorizes real writes.
18
-
19
- Use Node 24+ to run these TypeScript files directly, for example
20
- `pnpm build && node examples/quickstart.ts`. No extra runtime dependency or
21
- `--experimental-strip-types` flag is needed. The build emits the SDK used by the
22
- examples; their relative support imports use explicit `.ts` extensions for Node ESM.
23
-
24
- | Script | Behavior |
25
- | --- | --- |
26
- | `quickstart.ts` | Reads the current mainnet orchestrator, checks its registry binding, and discovers admitted profiles. No wallet or writes. |
27
- | `hmm-launch-config.ts` | Pure HMM V2 fixed/dynamic config construction with caller-chosen bid/reference guards and an automatically appended 512-byte launch tail; no RPC, signatures or writes. |
28
- | `ufg-launch-config.ts` | Pure fixed/dynamic UFG quote-only config6 construction, canonical reserve tail and config hash; no RPC, wallet or writes. |
29
- | `launch.ts` | Reviews/reconstructs an explicit saved plan and selected atomic/staged mode; optional offchain config6/V2 salt mining. Prints simulation, progress, and an admitted unsigned next transaction when evidence permits. |
30
- | `generate-lifecycle-commitment-fixture.ts` | Frozen independent historical config4/Abyss ABI bytes/hash/identity vector. Its pre-cutover allocations are not an executable 0.7.1 plan. |
31
- | `launch-lifecycle-smoke.ts` | Actual SDK launch/recovery/custody/fee operations, only on an explicitly authorized owned disposable loopback graph. |
32
- | `launch-erc20-*.ts`, `launch-erc404-*.ts` | Eleven independent fixed cases: unsigned end-to-end planning by default; `--broadcast` adds guarded local signing, chain verification and mandatory API publication/indexing. |
33
-
34
- ## UFG treasury configuration
1
+ # Run the examples
35
2
 
36
- Run `pnpm build && node examples/ufg-launch-config.ts` for a pure consumer example.
37
- Real UFG plans use the proxy as creator and a principal-namespaced nonce, with
38
- `ufg: { config }` on `prepareAndPlanLifecycleLaunch`; the principal remains the
39
- planning/signing account. Use only reward-free ERC20, full treasury reserve share,
40
- launch-token burn policies, Abyss QUOTE/QUOTE_ORACLE or the UFG fixed/dynamic
41
- presets. Approvals go to the proxy. The existing eleven launch cases and their
42
- selected non-UFG offerings are intentionally unchanged.
3
+ These commands use the checkout's built `@black-market/sdk` **0.13.0** and viem.
4
+ Use **Node 24+** for direct TypeScript execution. Start with the one-market
5
+ `launch-erc20-abyss.ts`; larger cases can exceed the RPC's simulation budget.
6
+ For valuation, token ordering, ranges, and buy protection, read the
7
+ [launch guide](../docs/launch-lifecycle.md#price-the-launch).
43
8
 
44
- The opt-in owned-fork regression is `test/integration/ufg-launch.fork.mjs`; see the
45
- [lifecycle guide](../docs/launch-lifecycle.md#ufg-owned-fork-check).
9
+ ## Set up the checkout
46
10
 
47
- ## Deployed read-only discovery
11
+ Run from the repository root:
48
12
 
49
13
  ```sh
50
- pnpm install
51
- pnpm examples
52
- # Optional: RPC_URL=https://your-robinhood-rpc pnpm examples
14
+ pnpm install --frozen-lockfile
15
+ pnpm build
16
+ cp -n examples/.env.example .env
17
+ chmod 600 .env
53
18
  ```
54
19
 
55
- `CHAIN_ID` defaults to `4663`. Local `31337` and workbench `46631` require a matching
56
- RPC and explicit `LAUNCH_ORCHESTRATOR`, `LAUNCH_IMPLEMENTATION_REGISTRY`, and
57
- `LAUNCH_FEE_OWNER_REGISTRY`. The example checks RPC chain identity and registry binding.
58
- Profile discovery verifies live registry admission and certified dependencies; it does
59
- not build/sign a launch, choose a developer fee, or select market economics.
60
-
61
- ## Unsigned saved-plan review
20
+ Launch wrappers load `.env` from the working directory with `process.loadEnvFile`.
21
+ Existing environment values take precedence. Values are literal; shell interpolation
22
+ is not applied. Use the matching SDK version when copying wrappers into a consumer project:
23
+ `pnpm add @black-market/sdk@0.13.0 viem`.
24
+ Copy `launch-example.ts`, `launch-example-support.ts`, and `launch-example-kyber.ts` with the wrapper.
62
25
 
63
- Supply full `LaunchPlanV1` JSON using the selected RPC's current deployment:
64
-
65
- ```sh
66
- pnpm build
67
- node examples/launch.ts \
68
- --plan plan.json --rpc https://rpc.mainnet.chain.robinhood.com/ --mode staged --mine
69
- ```
26
+ ### Configure the environment
70
27
 
71
- `--mine` uses `prepareAndPlanLifecycleLaunch` to finalize config6/V2 salts and admit the
72
- requested mode in one SDK-owned invocation. Persist its exact returned plan before
73
- begin. `--receipts receipt-references.json` takes a JSON array of SDK receipt
74
- references, with bigint block numbers encoded as decimal strings; `--confirmations N`
75
- restores the selected canonical recovery depth. The CLI checks source chain identity
76
- before discovery. It never signs, submits source-chain transactions, uploads metadata,
77
- or publishes a launch. Modes never fall back silently.
78
-
79
- Executable admission requires actual stateful measurement and exact validated replay.
80
- `--limits current-limits.json` is optional tightening policy, not a required backend:
81
- missing caps stay explicit uncertainty, while supplied malformed/stale/mismatched
82
- provenance rejects. Encode bigint values as decimal strings. Robinhood `4663` reads
83
- pinned native Nitro compute/poster evidence and requires native `eth_simulateV1`.
84
- A **separate disposable loopback fork** (`--fork-rpc URL`) remains available for
85
- generic EVM, not as a Nitro metering substitute. Unsigned review reports
86
- `transportPreflight: "not-requested"` unless a consumer supplies its active submission
87
- RPC to build-next. See the
88
- [lifecycle guide](../docs/launch-lifecycle.md#execution-constraints-and-stateful-simulation).
89
-
90
- Robinhood defaults to a 50M aggregate simulation gas-used budget. Inspect
91
- `simulation.deferredTransactionIds`: admitted/proved means the proven prefix,
92
- not every future transaction or eventual activation. Deferred commands have no
93
- gas/price/estimate/admission; obtain each fresh immediate envelope through
94
- `buildNextTransaction` after canonical progress advances. Reviewed envelopes are
95
- replayed directly, without measuring/replaying the suffix again. The saved-plan
96
- CLI prints proof coverage and never signs. Override `limits.maxSimulationGas` only
97
- for a provider that supports the selected budget. Examples requiring actual
98
- activation outputs for `buySlippageBps` or economic review refuse if activation is
99
- deferred; use a suitably higher-budget provider rather than inventing buy outputs.
100
-
101
-
102
- For a real new graph, create the saved plan using `readLifecycleProfiles` with its
103
- explicit chain/core and admitted pool-bound config6 profile. Supply that graph's RPC
104
- to `launch.ts`; do not substitute the historical known preset. Applications may use
105
- the existing `LAUNCH_ORCHESTRATOR`, `LAUNCH_IMPLEMENTATION_REGISTRY`, and
106
- `LAUNCH_FEE_OWNER_REGISTRY` overrides from the same authentic deployment evidence.
107
- The SDK certifies actual registry/creation-code/runtime/constructor bindings and
108
- requires real execution proof; setting configuration does not certify a graph.
109
-
110
- ## Real HTTP metadata sessions
111
-
112
- The real HTTP integration suite uses the public `LaunchApiClient` against a separately
113
- running service. Reads are unsigned; metadata-session writes require a disposable key
114
- and an owned loopback service with real application storage:
28
+ | Variable | Value / default |
29
+ | --- | --- |
30
+ | `PRIVATE_KEY` | Your funded EOA's 32-byte hex key; leave blank when using a keystore. |
31
+ | `EXAMPLE_KEYSTORE_PATH` | Alternative signer: owner-only local V3 scrypt/AES-128-CTR keystore. |
32
+ | `EXAMPLE_KEYSTORE_PASSWORD` | Keystore password; defaults to empty. |
33
+ | `LAUNCH_API_URL` | Required service root: `https://api.abyss.trading`. |
34
+ | `RPC_URL` | Optional Robinhood mainnet RPC; defaults to the SDK's official endpoint. |
35
+ | `NFT_BASE_URI` | Optional hosted ERC404 NFT metadata base URI; defaults to empty. |
36
+ | `EXAMPLE_BUY_AMOUNT_WEI` | Native ETH input **per buy**; default `10000000000000` (0.00001 ETH). |
37
+ | `EXAMPLE_TARGET_MARKET_CAP_USD` | Whole-supply target FDV in decimal USD; default `5000`. |
38
+ | `EXAMPLE_TOKEN_NAME` / `EXAMPLE_TOKEN_SYMBOL` | Override the case's token identity. |
39
+ | `EXAMPLE_TOKEN_DESCRIPTION` | Override the case's metadata description. |
40
+ | `EXAMPLE_IMAGE_PATH` | Optional actual PNG, JPEG, or WebP file, 1 byte–5 MiB. |
41
+ | `EXAMPLE_KYBER_API_URL` | Optional conversion API root; defaults to `LAUNCH_API_URL`. |
42
+ | `EXAMPLE_CHAIN_GAS_CAP` | Optional complete transaction gas-envelope ceiling. |
43
+ | `EXAMPLE_RPC_GAS_CAP` | Optional provider transaction gas-envelope ceiling. |
44
+ | `EXAMPLE_ACCOUNT_GAS_CAP` | Optional wallet/account transaction gas-envelope ceiling. |
45
+ | `EXAMPLE_MAX_CALLDATA_BYTES` | Optional whole-transaction byte ceiling. |
46
+ | `EXAMPLE_HEADROOM_BPS` | Gas headroom, default `1500`; accepted range 0–10,000. |
47
+ | `EXAMPLE_SIMULATION_GAS_CAP` | Aggregate simulation-used gas budget; default 50M on chain 4663. |
48
+
49
+ Configure **exactly one** of `PRIVATE_KEY` and `EXAMPLE_KEYSTORE_PATH`.
50
+ A keystore must be a regular file owned by your user with owner-only permissions.
51
+ Dry-run derives the public address but does not construct a wallet signer.
52
+ Remote RPC/API endpoints require HTTPS; owned loopback services may use HTTP.
53
+
54
+ Metadata limits are 100 Unicode codepoints/128 UTF-8 bytes for name, 32 codepoints/bytes
55
+ for symbol, and 2,000 codepoints for description. The runner normalizes and trims text.
56
+ Images are hashed before attribution signing; malformed or animated files may fail API verification.
57
+ Keep `.env`, keystores, signed bytes, and private recovery material out of git.
58
+
59
+ ## Discover without a wallet
115
60
 
116
61
  ```sh
117
- LAUNCH_API_TEST_URL=http://127.0.0.1:18763 pnpm test:api
118
- LAUNCH_API_TEST_URL=http://127.0.0.1:18763 \
119
- LAUNCH_API_TEST_PRIVATE_KEY="$DISPOSABLE_TEST_PRIVATE_KEY" pnpm test:api:write
62
+ pnpm examples
63
+ # quickstart.ts does not load .env; load it explicitly if needed:
64
+ node --env-file=.env examples/quickstart.ts
120
65
  ```
121
66
 
122
- These are metadata-only session tests, not token deployment or image/transaction
123
- publication. No image store, indexer, wallet balance, or chain transaction is needed.
124
- See [service prerequisites](../docs/launch-lifecycle.md#real-http-api-integration).
67
+ `quickstart.ts` reads process environment, verifies the chain and core/registry binding,
68
+ and prints live profile admission. `CHAIN_ID` defaults to `4663`.
69
+ Local `31337` and workbench `46631` need a matching RPC and explicit
70
+ `LAUNCH_ORCHESTRATOR`, `LAUNCH_IMPLEMENTATION_REGISTRY`, and `LAUNCH_FEE_OWNER_REGISTRY`.
71
+ Discovery does not choose prices, construct a wallet, or write metadata.
125
72
 
126
- ## Individual token creation
73
+ ## Choose one of eleven launch cases
127
74
 
128
- **Without a mode flag, these files are dry runs: no transactions are signed or
129
- broadcast, and no metadata/image is uploaded or published. `--broadcast` signs,
130
- spends real funds and publishes to your configured API. Mainnet execution is
131
- irreversible.** Choose one case per intended launch.
75
+ All commands are `node examples/<file>`, with no required arguments.
76
+ V4 cases select the fixed-fee pool-bound profile. Quotes default to WETH.
77
+ Position counts below are permanent launch positions, not separate hooks.
132
78
 
133
- ### Two-step flow: dry run, then broadcast
79
+ | File | Token / rewards | Markets / positions | Mode / total buys |
80
+ | --- | --- | --- | --- |
81
+ | `launch-erc20-abyss.ts` | ERC20 / none | Abyss WETH: 1 | atomic / 1 |
82
+ | `launch-erc20-v4.ts` | ERC20 / none | V4 WETH: 1 | atomic / 1 |
83
+ | `launch-erc404-v4.ts` | ERC404 / none | V4 WETH: 1 | staged / 1 |
84
+ | `launch-erc404-abyss.ts` | ERC404 / none | Abyss WETH: 1 | atomic / 1 |
85
+ | `launch-erc20-staking-v4.ts` | ERC20 / staking | V4 WETH: 2 | staged / 2 |
86
+ | `launch-erc20-dividends-abyss.ts` | ERC20 / dividends | Abyss WETH: 3 | staged / 1 |
87
+ | `launch-erc20-burn-mixed.ts` | ERC20 / 30% token-fee burn | V4 WETH: 2; Abyss WETH: 1 | staged / 2 |
88
+ | `launch-erc404-dividends-mixed.ts` | ERC404 / dividends | V4 WETH: 2; Abyss WETH: 3 | staged / 2 |
89
+ | `launch-erc20-multi-quote.ts` | ERC20 / none | V4 WETH: 1; V4 USDG: 1; Abyss WETH: 1 | staged / 3 |
90
+ | `launch-erc20-depth-v4.ts` | ERC20 / none | V4 WETH: 4 adjacent Early Scarcity bands | staged / 1 |
91
+ | `launch-erc20-dividends-multiquote-mixed.ts` | ERC20 / dividends | V4 WETH: 2; V4 USDG: 2; Abyss WETH: 3 | staged / 3 |
92
+
93
+ Reward-enabled cases allocate 40% of fee assets to holder rewards and 60% to the owner;
94
+ this is a fee-revenue split, not a 40% trading tax. The burn case allocates 30% of
95
+ launch-token fee revenue to burn; quote fees are not burned.
96
+ At most one V4 market per quote is allowed; an Abyss market may reuse that quote.
97
+ Market budgets sum to supply; position caps sum to each market budget. Actual mint
98
+ debits can be smaller than caps: unused mint dust burns **before** opening buys.
99
+
100
+ The eleven wrappers use neither HMM nor UFG. Pure configuration commands are:
134
101
 
135
102
  ```sh
136
- # 1. Discover, build funding and plan; print the complete economic review and save artifacts.
137
- node examples/launch-erc20-v4.ts
138
- # 2. After reviewing the output, explicitly execute the same case.
139
- node examples/launch-erc20-v4.ts --broadcast
103
+ node examples/hmm-launch-config.ts
104
+ node examples/ufg-launch-config.ts
140
105
  ```
141
106
 
142
- The default output starts with **DRY RUN — no transactions signed or broadcast.**
143
- It performs the same profile discovery, quote/funding builds, image descriptor
144
- freezing, economics, salt preparation and planner admission as execution, then
145
- exits `0` on successful planning. It saves `plan.json`, `economic-review.json`,
146
- `planning.json` and all other planning evidence in a fresh `launch-results/` directory.
147
- The creator's public address is derived locally (including authenticated keystore
148
- decryption when selected), but no wallet signer is created. The final output line
149
- is the exact case command with `--broadcast` appended.
150
-
151
- **Choosing `--broadcast` is the authorization. It deliberately skips manual
152
- economic-review admission: there is no interactive hash prompt or hash input.**
153
- The full review is still printed and saved, including its computed provenance hash.
154
- The broadcast run plans afresh with current state, fresh random identity and funding
155
- builds; it does not submit the dry run's saved plan. Planner admission, unchanged
156
- economic authority, deadlines, image verification and canonical/reorg barriers remain
157
- mandatory before signing and publication.
158
- `--resume <recovery-dir>` retains its existing continuation/publication behavior;
159
- it does not become a dry run and does not need `--broadcast`. Unknown, duplicated
160
- or combined mode flags fail before configuration or artifact creation with usage text.
161
-
162
- ### Setup once
163
-
164
- Use **Node 24+**. In this repository run `pnpm install`. In a consumer project install
165
- both public dependencies with `pnpm add @black-market/sdk viem` (or
166
- `npm install @black-market/sdk viem`) and copy the selected files with
167
- `launch-example.ts`, `launch-example-support.ts`, and `launch-example-kyber.ts`
168
- into `examples/`, using the matching updated SDK build.
169
- Copy `examples/.env.example` to `.env` in the directory you will run commands from:
107
+ For actual HMM/UFG integrations, use the [guide](../docs/launch-lifecycle.md#launch-a-ufg-treasury).
108
+ `launch.ts` is a direct-core saved-plan tool and does not carry the UFG route/config.
109
+
110
+ ## Dry-run, broadcast, or resume
170
111
 
171
112
  ```sh
172
- cp examples/.env.example .env
173
- chmod 600 .env
113
+ node examples/launch-erc20-abyss.ts
114
+ node examples/launch-erc20-abyss.ts --broadcast
115
+ node examples/launch-erc20-abyss.ts --resume "launch-results/<original-run-dir>"
174
116
  ```
175
117
 
176
- Edit `.env` once:
118
+ | Mode | Reads / writes | Identity |
119
+ | --- | --- | --- |
120
+ | No flags | Live discovery, funding quotes, preparation, simulation, economic output; unsigned, no API writes | Fresh plan/run directory |
121
+ | `--broadcast` | Signs, spends, stages/uploads metadata, deploys, verifies, and publishes; no further prompt | **Fresh plan**, not the preceding dry run |
122
+ | `--resume <original-run-dir>` | May sign remaining steps or finish publication | Retained plan, receipts, mode, confirmation policy, and API session |
177
123
 
178
- ```dotenv
179
- PRIVATE_KEY=
180
- LAUNCH_API_URL=
181
- RPC_URL=
182
- ```
124
+ Dry-run needs the signer source, RPC/API, and sufficient funds for execution admission.
125
+ Review its economics, then review the fresh broadcast output too. Mode flags cannot
126
+ be combined or duplicated. Resume is an execution authorization; omit `--broadcast`.
183
127
 
184
- Configure **exactly one** signer: your funded EOA's 32-byte `PRIVATE_KEY`, or
185
- `EXAMPLE_KEYSTORE_PATH` pointing to a local V3 scrypt/AES-128-CTR JSON keystore.
186
- `EXAMPLE_KEYSTORE_PASSWORD` defaults to the empty string; both/neither signer
187
- sources reject. The keystore must be a regular owner-only file owned by your user;
188
- the bounded loader authenticates its Keccak MAC and declared address before deriving
189
- the creator. It uses Node crypto and existing viem, with no extra dependency.
190
- Dry-run configuration derives only the public creator address; signing methods are
191
- constructed only in broadcast or nonterminal resume execution.
192
- Never commit the keystore/password or use a published test key for a real launch.
193
- Set `LAUNCH_API_URL` to your actual HTTPS or owned loopback service root. There is
194
- no default wallet, guessed metadata API, or silent API skip. The API needs actual
195
- application storage and an indexer observing the same chain as the execution RPC.
196
- Existing environment variables take precedence over the working-directory `.env`,
197
- loaded once using Node's native `process.loadEnvFile`. No shell interpolation is used.
198
-
199
- `EXAMPLE_BUY_AMOUNT_WEI` sets the exact **native ETH conversion input per opening
200
- buy**, not the eventual WETH/USDG amount. Use a positive canonical decimal uint256
201
- wei string; the default is `10000000000000` (**0.00001 ETH**). Kyber's app-compatible
202
- exact-input domain additionally requires each aggregate input to be below `2^255`.
203
- The runner aggregates ETH inputs per quote, obtains one fresh
204
- `POST EXAMPLE_KYBER_API_URL/api/v1/quote/kyber/build?chainId=4663` build per quote,
205
- and binds native zero-address input, exact input, sender/recipient equal to the
206
- actual funding escrow, **50 bps conversion slippage**, and the same 300-second
207
- launch-purpose deadline as the plan. The API owns fresh route preview; a preview
208
- GET is not executable funding. `EXAMPLE_KYBER_API_URL` defaults to `LAUNCH_API_URL`
209
- (the app's public trade default is `https://api.abyss.trading`); an explicit override
210
- must meet the same HTTPS/owned-loopback safety rules.
211
-
212
- Each funding row is `LifecycleFundingKind.Swap`, native zero-address `inputAsset`,
213
- the reviewed router target and original built calldata. The runner decodes the
214
- reviewed `swap` entry point and checks currencies, escrow recipient, exact input,
215
- output floor, executor payload, flags and absence of redirected inputs/extra fees.
216
- `amountOutMinimum = floor(amountOut * 9950 / 10000)` is the exact quote budget.
217
- That budget is divided across the quote's ordered buys, with the integer remainder
218
- in the last such buy, so their inputs sum exactly to the API minimum. No WETH/USDG
219
- wallet balance or ERC20 approval is needed; the creator needs native ETH **plus gas**.
220
- Registry target/spender/runtime admission is checked on the launch graph and
221
- rechecked before signatures. Refusal, unavailable route, changed binding or expiry
222
- stops unsigned with retained evidence: **never fall back to native-wrap, direct ERC20
223
- funding, a separate wallet swap, dropped buys, or rewritten quote bytes/deadline**.
224
-
225
- Optional `EXAMPLE_TOKEN_NAME`, `EXAMPLE_TOKEN_SYMBOL`, and
226
- `EXAMPLE_TOKEN_DESCRIPTION` override each case's default metadata. Text is NFC
227
- normalized and trimmed, with the unchanged API/lifecycle bounds (name: 100 Unicode
228
- codepoints/128 UTF-8 bytes; symbol: 32 codepoints/bytes; description: 2000 codepoints).
229
- `EXAMPLE_IMAGE_PATH` optionally loads 1 byte through 5 MiB of actual PNG/JPEG/WebP
230
- bytes. The frozen image SHA-256/type/length is reviewed and signed, uploaded using
231
- only the exact API-issued PUT URL/headers, and completed/verified before execution.
232
- Without it the session remains metadata-only; no artwork is invented. API image
233
- verification may reject malformed or animated files even when their type is valid.
234
- With an image set, success additionally requires matching staged/published image
235
- SHA-256/type/length, the same non-null public image URL in the publication and
236
- indexed token DTO, and one bounded no-redirect GET of that URL returning **HTTP
237
- 200**, an image content-type family and nonempty bytes. Byte-identical output
238
- must match the signed type/length/SHA-256. Different served bytes may be an API/CDN
239
- transformation: `published-image.json` records the actual SHA-256/type/length and
240
- that limited family/nonempty-body check, explicitly not byte identity. HTTP/type/
241
- empty/oversized failures stop nonzero with evidence; no image retry or metadata-only
242
- fallback occurs. The final canonical RPC barrier runs after this GET.
243
-
244
-
245
- The target is **USD 5000**, not a fixed token/WETH ratio. Optional
246
- `EXAMPLE_TARGET_MARKET_CAP_USD` accepts a positive exact USD decimal (up to 18
247
- fractional digits). It does not grant signing permission or override the USD seed.
248
- The runner makes one bounded, uncached GET to
249
- `LAUNCH_API_URL/api/v1/token-prices?chainId=4663&limit=100`, without pagination,
250
- redirects or retries. It selects the reviewed chain-4663 WETH address and requires
251
- ready metadata, 18 decimals, `priced: true`, `source: "anchor"`, and direct
252
- Chainlink-anchor provenance bound to WETH and the reviewed aggregator
253
- `0x78F3556b67E17Df817D51Ef5a990cDaF09E8d3A9`. The exact positive uint256
254
- `priceUsdX18` is an **indicative API-published launch seed**, not an executable
255
- swap quote or on-chain execution authority. HTTP/body/validation failure or a missing
256
- WETH row stops unsigned; there is no manual price or alternate-source fallback.
257
- Each request has a 30-second timeout and a 1 MiB streamed response limit.
258
- The review and console preserve API origin, index/graph blocks, upstream observation
259
- timestamp and age, and local retrieval time. Retrieval does not make an old upstream
260
- observation fresh. The API may continue publishing its price as upstream age grows;
261
- the runner does not impose a 15-minute contract-round freshness gate.
262
- USDG markets use the SDK-exported chain-4663 Global Dollar address, **6 decimals**
263
- and the reviewed `usdPeg` source at exactly `1e18` USD-X18, matching the app. There
264
- is no substituted WETH/USD value. Every market has its own quote precision, USD
265
- seed, token/quote orientation and aligned valuation; multi-quote FDVs are not additive.
266
-
267
-
268
- Before any attribution or transaction signature, the runner saves
269
- `economic-review.json` and exact owner-only recovery and prints its financial summary.
270
- The computed hash binds all quotes, target, actual supply, predicted per-market
271
- token order, every allocation, fees, protected buys, Kyber conversion bytes/minima/
272
- deadline, metadata/image and finalized plan. It is provenance evidence, never an
273
- authorization input. Dry runs stop here without signing; broadcast runs save
274
- `economic-admission.json` with `authorization: "--broadcast"` and that hash as
275
- evidence of the chosen mode, not another gate.
276
- Before every later signature the runner rereads the same configured API snapshot and
277
- rechecks the immutable review, target, supply, finalized plan and predicted token
278
- order. Any exact price, API origin, chain, WETH/decimals or direct-anchor identity,
279
- kind or source change stops execution. Failed or unpriced reads also reject.
280
- Index/graph blocks and observation/retrieval times may advance with the identical
281
- price and source; they never replace the original review. Changed economics require
282
- a new explicit review, never silent plan rewriting or submission replay. Actual
283
- RPC chain, balances, nonce, prediction, deadline and native execution proof remain
284
- execution authority; API block fields are observations, not RPC canonicality pins.
285
- The original plan deadline must still be future at metadata signing/staging and
286
- before each later signature, including **after asynchronous quote/authority reads**.
287
- Expiry requires a new explicit review; the runner never extends the saved deadline.
288
-
289
-
290
- Blank `RPC_URL` uses the SDK official Robinhood chain-4663 mainnet endpoint; HTTPS
291
- providers and explicit owned loopback HTTP execution RPCs are supported.
292
- The creator is derived locally from the configured signer; deployment/WETH addresses
293
- come from `getAddresses(4663)`. The runner checks chain identity, EOA, deployed core
294
- and registry, admitted profiles, funding escrow/core/native binding and each quote's
295
- actual decimals. WETH keeps the registered P1 `(1,4096)` oracle. USDG discovers
296
- `OracleConfigRegistered` history at a pinned block, rereads the factory mapping at
297
- that same block, and selects a compatible registered config deterministically by
298
- increasing max tick move, decreasing cardinality, then config ID. Factory configs
299
- are generic, not a separate hardcoded USDG ID. No compatible config, unavailable
300
- history, or a changed canonical pin fails loudly. V4 cases require config6/V2;
301
- an old config5 profile is never selected instead.
302
- V4 fixed cases encode max `10000`, min `1000` pips and sensitivity `7654321`
303
- fee-pips × seconds/tick; all are immutable. The reviewed `FixedFeePoolHookV1` charges
304
- the fixed maximum `10000` pips (1%) on applicable amounts. Minimum and sensitivity
305
- are stored and exposed, not used for a dynamic fee calculation. The current defaults
306
- resolve the matching October8 mined config6 graph. Position maxima exactly cover market budgets and budgets
307
- exactly cover minted supply. Actual unused inventory burns before buys, never to the
308
- creator. Verification accounts for burn `Transfer` logs, reduced `totalSupply`, an
309
- empty core token balance, and creator balance equal only to paid opening-buy output.
310
- Optional `NFT_BASE_URI` supplies your actually hosted ERC404 NFT metadata base URI.
311
- Blank uses an empty base URI: NFT units/mirror behavior remain real, but the example
312
- does not claim hosted NFT metadata exists.
313
-
314
- The fixed Robinhood examples require native sequential Nitro `eth_simulateV1`, including
315
- an isolated pinned ArbOS capability probe and exact fee-bearing replay. Generic
316
- Anvil/Hardhat forks cannot certify Nitro compute/poster metering and are not a fallback.
317
- Unsupported native simulation, insufficient funds or failed admission stop before API
318
- staging/broadcast. Each immediate next envelope is additionally proved afresh against
319
- the saved `reviewedTransaction` and preflighted read-only through the same execution
320
- RPC before signing. Calldata, value, gas and gas price must remain exactly as reviewed.
321
- There is no mode fallback, admission override, automatic submission replay or reduced case.
322
-
323
- ### Commands and launch matrix
324
-
325
- Every command below defaults to a dry run. Append `--broadcast` to execute the
326
- selected case; the table's atomic/staged mode is independent of the CLI dry-run/
327
- broadcast choice.
128
+ The default proof window is **50M aggregate used gas**, not a per-transaction limit.
129
+ Opening-buy calibration needs activation inside the proven prefix. A deferred activation
130
+ cannot produce protected buy minima. Raise `EXAMPLE_SIMULATION_GAS_CAP` only when your
131
+ provider supports it; start with one market when checking an unfamiliar RPC.
328
132
 
329
- ```sh
330
- node examples/launch-erc20-v4.ts
331
- node examples/launch-erc20-abyss.ts
332
- node examples/launch-erc404-v4.ts
333
- node examples/launch-erc404-abyss.ts
334
- node examples/launch-erc20-staking-v4.ts
335
- node examples/launch-erc20-dividends-abyss.ts
336
- node examples/launch-erc20-burn-mixed.ts
337
- node examples/launch-erc404-dividends-mixed.ts
338
- node examples/launch-erc20-multi-quote.ts
339
- node examples/launch-erc20-depth-v4.ts
340
- node examples/launch-erc20-dividends-multiquote-mixed.ts
341
- ```
133
+ ### Fund opening buys
342
134
 
343
- | File suffix | Token / rewards | Markets and permanent positions | Mode / opening buys |
344
- | --- | --- | --- | --- |
345
- | `erc20-v4` | ERC20 / none | V4: 1 | atomic / 1 |
346
- | `erc20-abyss` | ERC20 / none | Abyss: 1 | atomic / 1 |
347
- | `erc404-v4` | ERC404 / none | V4: 1 | staged / 1 |
348
- | `erc404-abyss` | ERC404 / none | Abyss: 1 | atomic / 1 |
349
- | `erc20-staking-v4` | ERC20 / staking | V4: 2 | staged / 2 |
350
- | `erc20-dividends-abyss` | ERC20 / dividends | Abyss: 3 | staged / 1 |
351
- | `erc20-burn-mixed` | ERC20 / token-only burn 3000 bps | dual-fee V4: 2; Abyss: 1 | staged / 1 per market |
352
- | `erc404-dividends-mixed` | ERC404 / dividends | V4: 2; Abyss: 3 | staged / 1 per market |
353
- | `erc20-multi-quote` (new) | ERC20 / none | V4 WETH: 1; V4 USDG: 1; Abyss WETH: 1 | staged / 1 per market (3 total) |
354
- | `erc20-depth-v4` (new) | ERC20 / none | V4 WETH: 4, Early Scarcity / progressive Depth | staged / 1 |
355
- | `erc20-dividends-multiquote-mixed` (new) | ERC20 / dividends 4000 bps | V4 WETH: 2; V4 USDG: 2; Abyss WETH: 3 | staged / 1 per market (3 total) |
356
-
357
- The three new cases are **additions**, not replacements yet: the eight existing
358
- descriptors/topologies remain intact until the user validates new cases with real
359
- runs. At most one V4 market per quote is permitted; Abyss may reuse a quote.
360
-
361
- ERC20 supply is `1_000_000e18`; ERC404 supply is `10_000e18`, NFT unit `100e18`.
362
- `deriveLaunchPoolRecipe` prices against **the entire actual minted supply**, even
363
- in mixed-market cases. Per-market budgets divide that supply, with integer remainder
364
- assigned to the last market. One position uses the recipe's full one-sided range
365
- and budget-funded liquidity; multi-position markets use `deriveLaunchPositionRanges`
366
- with the exact requested count, `positionGaps: "adjacent"` and an explicitly
367
- extended final tail. Staircase remains the existing multi-position default; the
368
- new four-position Depth case uses **Early Scarcity**, increasing inventory from
369
- low-price scarcity to more inventory at higher prices. This is the requested Depth
370
- shape in the current SDK vocabulary, not a literal reproduction of the separate
371
- eight-position design catalogue. Spacing is 60 and LP fee is 3000 pips for both
372
- venues. Predicted address order sets orientation independently per quote; multi-quote
373
- markets aim at the same USD valuation, not the same raw sqrt price. Per-position
374
- maxima exactly cover each budget, except documented integer mint-rounding dust.
375
- Each buy defaults to `0.00001 ETH` through its quote's Kyber funding conversion.
376
- The unified SDK invocation sets
377
- every ordered buy's minimum from its actual stateful diagnostic output with **50 bps
378
- (0.5%) slippage**, then proves and saves only the final protected commitment. The draft's
379
- one-wei minima are diagnostic inputs, never the submitted protection.
380
- Rewards use 4000 bps where selected; token-only burn is 3000 bps in the burn case.
381
- V4 uses frozen registered
382
- treasury/author terms with developer rate `0`; executor fee is 275 bps.
383
- Hook salts/random identities are finalized and saved before execution. The shared
384
- runner uses the combined preparation/admission result without an immediate second
385
- planning pass. Staged cases simulate only staged work, never an unused atomic launch.
386
-
387
- USD 5000 is a **target before tick alignment**, not a promise of exactly USD 5000
388
- after alignment or buys. The economic review shows aligned unit price in USD/quote,
389
- minted-supply valuation, expected rounding burn, retained supply and its aligned
390
- opening valuation. It also decodes every ordered output/input from the final admitted
391
- simulation receipt, showing all-in average execution price and the premium against
392
- opening price. That premium includes fees and price impact; it is **not** the
393
- post-buy marginal spot price. Opening buys move the pool, so the actual post-buy
394
- valuation must use observed post-activation pool price and retained total supply.
395
- The old 1:1/fixed-liquidity examples could burn almost the entire intended supply
396
- and produce a radically different retained-supply valuation. They are not a pricing
397
- recipe or a valid precedent for a new launch.
398
-
399
- ### Optional execution restrictions
400
-
401
- There are no default chain/RPC/account gas or calldata caps. The SDK reads current
402
- Nitro protocol compute ceilings and exact-calldata poster budgets itself. Default
403
- headroom is **1500 bps (15%)**. Set explicit decimal restrictions only when you intend
404
- to tighten the complete transaction envelope: `EXAMPLE_CHAIN_GAS_CAP`,
405
- `EXAMPLE_RPC_GAS_CAP`, `EXAMPLE_ACCOUNT_GAS_CAP`, `EXAMPLE_MAX_CALLDATA_BYTES`.
406
- `EXAMPLE_HEADROOM_BPS` preserves your explicit 0–10000 policy. These are local
407
- restrictions, not invented provider/account assurances or admission bypasses.
408
- Poster allocation is already inside Nitro gas/affordability and is not charged twice.
409
-
410
- Robinhood's separate aggregate simulation gas-used budget defaults to **50M**.
411
- `EXAMPLE_SIMULATION_GAS_CAP` overrides that budget (positive decimal gas) for
412
- providers supporting more or less. It does not change per-transaction compute
413
- capacity. Multi-step examples requiring full activation outputs for buy protection
414
- and economic review need a provider/budget covering activation, or refuse before
415
- signing; do not raise the setting beyond the provider's actual supported budget.
416
-
417
- ### Evidence and failure recovery
418
-
419
- Each dry run or broadcast automatically creates `launch-results/<timestamp-case-random>/`;
420
- `--resume` reuses the original directory rather than creating another launch. Inspect
421
- `result.json`, `events.jsonl`, finalized `plan.json`, `planning.json`,
422
- `economic-review.json` and `receipts.json`. A dry-run result has `runMode: "dry-run"`,
423
- `scope: "planning"` and `execution: "dry-run"`, with no transactions or API writes.
424
- Publication-only artifacts (`publication-progress.json`, `published-token.json` and,
425
- when configured, `published-image.json`) are produced only during broadcast/resume.
426
- Exact admitted wallet envelopes are signed locally only during execution; computed
427
- hashes and unsigned envelopes are durably retained as `broadcast-attempt`
428
- **before the one raw broadcast**. Real receipts are saved before
429
- status/canonical-state assertions. No unlocked-account signing or sending is used.
430
- Public evidence preserves structured field names but redacts sensitive values:
431
- known keys, signatures, signed raw bytes, API capabilities, authorization values
432
- and endpoint credentials. Public `plan.json` may therefore differ from the exact
433
- commitment and is **not recovery authority**. Before the first attribution or chain
434
- signature, `private-recovery.json` durably retains the complete unredacted finalized
435
- `plan`, original `mode`, `confirmations` and `economicReview`. Broadcast additionally
436
- saves `economicAdmission` with the computed review hash and `authorization: "--broadcast"`.
437
- This owner-only file (mode `0600` inside the mode `0700` run directory) also retains
438
- raw signed transactions and one-time API recovery material across session updates.
439
- Original plan and economic review/admission provenance are immutable.
440
- Never share or commit it.
441
- `launch-results/` is ignored.
442
-
443
- Every broadcast case requires actual API metadata staging (and verified image completion
444
- when configured), publication using the activation hash, and an indexed DTO
445
- matching token/creator/hash/metadata/image. Genuine pending-indexer HTTP `202`
446
- responses are polled for up to 90 seconds respecting `Retry-After`. Before **each
447
- publication attempt** and before final success, fresh RPC progress must be
448
- confirmation-safe canonical Active with all retained receipts confirmed and the
449
- original activation still in its saved block number/hash. Reorg, moved inclusion,
450
- missing/unconfirmed receipt or changed phase stops, retains `publication-progress.json`
451
- and private recovery evidence, and exits nonzero—even if the API reports success.
452
- Other API failures are not retried or converted to partial success. The runner
453
- never retries a raw send, relaunches, cancels or rolls back the source chain.
454
- **Do not blindly rerun after an ambiguous broadcast**: inspect the durable hash first.
455
- See [chain/API invariants](../docs/launch-lifecycle.md#individual-token-creation-examples).
456
-
457
- Continue a begun launch with the same signer source and API endpoint:
135
+ | Quote | What the runner does with native ETH |
136
+ | --- | --- |
137
+ | WETH | Uses `LifecycleFundingKind.NativeWrap`; wraps ETH, no Kyber swap. |
138
+ | USDG | Uses `LifecycleFundingKind.Swap`; builds an admitted Kyber conversion with a minimum quote output. |
139
+
140
+ ETH for gas is additional. The SDK also supports direct ERC20 funding; the wrappers
141
+ use native ETH input. Buys sharing a quote use one aggregated funding output.
142
+ The plan expires after **3,600 seconds**; Kyber conversion calldata expires after
143
+ **300 seconds**. Conversion expiry must be at most 1,200 seconds away and no later
144
+ than plan expiry. A valid plan does not extend an expired conversion quote.
145
+ The conversion minimum protects ETH→USDG, not USDG→launch-token output;
146
+ [buy protection](../docs/launch-lifecycle.md#protect-the-opening-buy) is separate.
147
+
148
+ ## Keep artifacts and recover the original launch
149
+
150
+ Each fresh run creates `launch-results/<timestamp-case-random>/`. Resume reuses it.
151
+ Read `result.json`, `economic-review.json`, `planning.json`, and `receipts.json` to
152
+ separate planning, chain completion, publication, and indexing.
153
+ Public `plan.json` may be redacted and cannot reconstruct the exact commitment.
154
+ The owner-only `private-recovery.json` retains the exact plan and API capability;
155
+ keep it inside its mode-0700 run directory and never share it.
156
+
157
+ The runner records the signed transaction's hash and exact envelope **before** one raw send.
158
+ After a timeout or interrupted send, inspect that hash and chain progress before continuing.
159
+ It does not automatically retry sends, adopt replacements, cancel, or create another token.
160
+
161
+ | Saved chain state | Resume behavior / next action |
162
+ | --- | --- |
163
+ | Preparing / Ready, still executable | Re-admit the original plan and submit only remaining steps. |
164
+ | Active | Recover the original activation receipt; verify and publish, even after the launch deadline. |
165
+ | Expired Preparing / Ready | Use SDK cancellation after reconciling receipts; see [recovery](../docs/launch-lifecycle.md#recover-or-cancel). |
166
+ | Unstarted / Cancelled / unresolved signed hash | Stops for reconciliation; do not use a new invocation as a retry. |
167
+
168
+ Resume retains salts and buy minima; it does not rerun preparation or recalibrate economics.
169
+ For replacements, retain original `transactionHash` and effective `replacementHash`,
170
+ plus observed block number/hash. A missing receipt alone does not establish a reorg.
171
+
172
+ Metadata is staged before deployment. Publication uses the **original activation hash**.
173
+ A `LaunchPublishPending` response means indexing is pending; the runner polls for up
174
+ to 90 seconds, respecting `Retry-After`, and checks canonical Active before publication.
175
+ An image/indexing error after activation does not undo the launch. Resume publication.
176
+
177
+ Resume refreshes the original session and retains its one-time capability across responses.
178
+ If an image is still awaiting upload, supply the original `EXAMPLE_IMAGE_PATH` bytes;
179
+ the SHA-256, type, and length must match. It can renew an expired PUT URL once;
180
+ a verified image is not reuploaded. A reorg or changed activation inclusion stops recovery.
181
+
182
+ ## Review a saved direct-core plan without signing
458
183
 
459
184
  ```sh
460
- node examples/launch-erc20-v4.ts --resume launch-results/<original-run-directory>
185
+ node examples/launch.ts --plan plan.json \
186
+ --rpc https://rpc.mainnet.chain.robinhood.com/ --mode staged --mine
461
187
  ```
462
188
 
463
- All eleven wrappers accept this option; the retained plan/review, not the wrapper's
464
- case descriptor or new identity overrides, determines the resumed launch.
465
- The runner loads owner-only `private-recovery.json`, restores the original mode,
466
- confirmation policy, execution restrictions and typed receipts with observed block
467
- number/hash, and re-admits `parseLaunchPlan(JSON.stringify(recovery.plan))` with
468
- `planLaunch` against current canonical state. It does **not** call
469
- `prepareAndPlanLifecycleLaunch`, remine salts, recalibrate buys, or repeat begin.
470
- Canonical **Preparing/Ready** resumes only remaining `buildNextTransaction` steps
471
- under the saved economic admission and signing gates; canonical **Active** recovers
472
- the original activation receipt and runs chain verification/publication only,
473
- including after the signing deadline. Unstarted/Cancelled state, changed inclusion,
474
- replacement or unresolved signed hashes stop for read-only reconciliation.
475
-
476
- Before publication the original API session is refreshed with `getUploadSession`;
477
- the retained one-time capability is carried across every read/renew/complete response
478
- because the API does not echo it. If an image is still awaiting upload, set
479
- `EXAMPLE_IMAGE_PATH` to the original bytes: SHA-256, content type and length must
480
- match the signed descriptor. An expired PUT URL is renewed once on HTTP 403/410/412
481
- with `renewUploadUrl`, then the same bytes are uploaded and completed. A live ready
482
- image is never reuploaded. No new attribution signature or session is created.
483
- All existing chain/image/indexer checks and canonical activation barriers still apply.
484
-
485
- After interruption, timeout, replacement or reorg, preserve the original identity,
486
- `private-recovery.json` and every signed hash. Public `plan.json` and diagnostic
487
- `planning.json` are not recovery authority; do not rerun a wrapper without `--resume`.
488
- Supply receipt references including observed block number/hash;
489
- when a replacement is known retain both `transactionHash` (original) and
490
- `replacementHash` (effective). A same-nonce cancellation is not successful activation;
491
- a missing receipt alone does not prove a reorg. No replacement is adopted or retried
492
- automatically by these local-signing cases: a timed-out original hash requires manual
493
- reconciliation. `launch.ts` provides unsigned reload/review for a privately extracted
494
- exact plan: keep that file owner-only and supply the original `--mode`,
495
- `--confirmations` and reconciled `--receipts`. Do not publish the extracted plan or
496
- CLI output, which may contain sensitive committed values. Recovery of API publication
497
- uses the original private session/capability and canonical activation hash, never
498
- another launch.
499
-
500
- ### Owned-local wallet verification helpers
501
-
502
- `launch-example-support.ts` exports
503
- `createLocalLaunchWallet({privateKey,creator,chainId,orchestrator,client,redactor})`
504
- and `submitSignedRecorded({transaction,wallet,client,wait,artifacts,signal})`.
505
- `client.request({method,params})` is an explicit RPC adapter; `transaction` carries
506
- `id`, `kind`, and exact unsigned `wire` chain/from/to/data/value/gas fields plus
507
- optional nonce/fees/type/accessList. `wait(hash)` returns a real receipt.
508
- The signer exposes `address`, `signTypedData(typedData)` and `signTransaction(wire)`
509
- returning `{wire,rawTransaction,transactionHash}`. Retain the result privately.
510
- Use `RunArtifacts(output,caseId,redactor)` with `Redactor` and a fresh directory for
511
- durable evidence; call `initialize()` before work and `finish(status,error)` afterward.
512
- The shared `runLaunchExample(caseObject, argv = process.argv.slice(2))` in
513
- `launch-example.ts` takes the same fixed case objects as the eleven files, loads
514
- environment and either auto-creates output for a new launch or resumes in place.
515
- `RunArtifacts(output,caseId,redactor,{resume:true})` reopens private recovery and
516
- retained transaction evidence without truncating the journal.
517
- Offline diagnostics are in `test/launch-example.test.mjs`,
518
- `test/launch-example-matrix.test.mjs` and `test/launch-example-resume.test.mjs`;
519
- they do not claim real launch/indexer proof.
520
-
521
- ## Relationship to the application flows
522
-
523
- The examples have been reviewed against `abyss-app`'s `scripts/launch-node.mjs`,
524
- `launch-node-deploy.mjs`, `launch-browser-wallet.mjs`, `launch-staged-smoke.mjs`,
525
- `launch-review-smoke.mjs`, and `src/lib/creation` / `src/lib/lifecycle` authoring,
526
- funding, execution and recovery modules. These are behavioral references, not SDK
527
- dependencies. The application consumes the published **`@black-market/sdk` 0.8.1** and
528
- derives current deployment defaults through **`getAddresses`**, as do these examples.
529
- The package pin alone is not live deployment authority. The mined graph
530
- is recorded in the contracts repository at
531
- `contracts/deployments/launch/pool-launch-v1/20261008T000141Z-e174ce6/manifest.json`;
532
- examples resolve its SDK presets and certify live bindings, rather than copying
533
- addresses from an application script.
534
-
535
- | Flow | Shared contract / intentional difference |
536
- | --- | --- |
537
- | Eleven launch wrappers | Unified preparation/admission, explicit mode, exact allocations, immutable config6 fees, protected ordered buys, reviewed next envelopes and canonical Active/custody verification. Eight original descriptors remain; three new matrix additions await user live validation. |
538
- | App Node launch/deploy | Both use valuation-driven recipes with actual supply, per-quote orientation/budgets and native ETH-to-quote Kyber funding. Examples retain an indicative validated API WETH USD seed and the reviewed USDG peg; they default to a dry run, while `--broadcast` supplies explicit authorization independently of mandatory RPC execution proof. |
539
- | Browser wallet | Browser account/provider authority and explicit UI review are application-owned. The examples instead derive an EOA locally, hold one source/submission RPC, recheck chain before signing/sending, and preserve computed signed hashes before one raw send. A browser integration must bind the active account/provider/chain again after review and pass that provider's RPC adapter as `submissionClient`; read proof alone does not authorize wallet submission. |
540
- | App creation funding | All fixed examples use integrated native-input `Swap` funding. Current registry target/spender/code hash, native/quote precision and decoded exact receiver/input/minimum/calldata are checked. No separate swap, native-wrap fallback or ERC20 approval is submitted on refusal. Other app payment paths are not this example runner's signing allowlist. |
541
- | App metadata/image | Both sign chain/core/wallet-bound attribution. Optional `EXAMPLE_IMAGE_PATH` signs actual SHA-256/type/length, uses the exact issued `putImage` URL/headers and requires `completeUpload` verification before launch. Publication/indexed association and one bounded public image GET are also required before example success; transformed served bytes are recorded separately. Unset keeps metadata-only behavior. Signer may be a local key or authenticated V3 keystore; app legal/UI consent remains application-owned. |
542
- | App publication/recovery | Pending HTTP 202 is not success. Examples honor `LaunchPublishPending`/`Retry-After` and require indexed provenance plus fresh confirmation-safe RPC Active and the original activation inclusion before every attempt/final pass. The app's polling UI/two-confirmation/replacement policy differs intentionally from these one-confirmation stop-and-reconcile examples. |
543
- | App review/staged smoke | These app scripts exercise read-only browser review and large matrices, not permission to deploy. SDK `quickstart.ts` and `launch.ts` remain read-only on the source chain. SDK `launch-lifecycle-smoke.ts` is a different, explicitly authorized owned-loopback execution proof, including real ERC20 approval prerequisites when supplied by fixture plans. |
544
- | Historical commitment generator | Retains original independent config4 bytes/hashes for codec regression evidence; no addresses or allocations in that vector should be used to construct the current graph. |
545
-
546
- ### Safe verification without a funded launch
547
-
548
- After rebuilding the package, run the ordinary offline suite (including
549
- `test/launch-example.test.mjs`) and typecheck. The example tests retain endpoint,
550
- chain/account, exact-signing, redaction, pre-broadcast durability, pending-publication
551
- and no-retry behavior, plus residual-burn/no-creator-reserve accounting; they do not
552
- claim an actual chain launch or indexer proof.
553
-
554
- For CLI proof, run `node examples/launch.ts` without required arguments (usage refusal,
555
- no RPC/signing) and `node examples/generate-lifecycle-commitment-fixture.ts` without
556
- output paths (offline historical vector to stdout). Read-only deployed discovery is
557
- `node examples/quickstart.ts`. With a reviewed exact saved current plan, use
558
- `launch.ts --plan ... --rpc ... --mode ...` and retained receipt-reference JSON;
559
- `--mine` performs only local mining and read-only native simulation on the source.
560
- Do **not** run any of the eight configured wallet/API wrappers to verify this review.
561
- Real metadata-session integration needs an owned disposable HTTP service; full custody,
562
- receipt and fee execution proof needs the separately authorized owned fixture below.
563
-
564
-
565
- ## Actual owned-fixture proof
566
-
567
- The manifest must declare `fixtureOnly: true`, exact reviewed graph addresses, and
568
- `executionLimits.provenance.scope: "controlled-local-measurement"`. The plan file
569
- contains Solidity-exported `plans` with encoded-plan/hash/identity/token vectors.
570
- Do not pass a mined mainnet manifest as a writable fixture.
189
+ Use an owner-only exact `LaunchPlanV1` JSON file. `--mine` finalizes bound-hook salts
190
+ offchain; omit it when reviewing an already-finalized plan.
191
+ `--receipts receipts.json`, `--confirmations N`, and `--limits current-limits.json`
192
+ restore receipt references, confirmation depth, and optional tightening limits.
193
+ The CLI never signs, uploads, or publishes. It does not support UFG.
194
+
195
+ ## Run read-only and local smoke checks
571
196
 
572
197
  ```sh
573
- pnpm build
574
- LAUNCH_LIFECYCLE_RPC_URL=http://127.0.0.1:18555 \
575
- LAUNCH_LIFECYCLE_FORK_RPC_URL=http://127.0.0.1:18556 \
576
- LAUNCH_LIFECYCLE_ALLOW_LOCAL_EXECUTION=1 \
577
- node examples/launch-lifecycle-smoke.ts manifest.json sdk-plans.json
198
+ pnpm test
199
+ node examples/quickstart.ts
200
+ node examples/generate-lifecycle-commitment-fixture.ts
578
201
  ```
579
202
 
580
- This explicitly authorized command executes disposable fixture transactions and
581
- restores snapshots per plan/mode. It exercises ordered buys, canonical Active state,
582
- permanent custody, typed deployment provenance, V3 no-argument `claimAndSplit()`,
583
- reserved owner/developer balances, and authenticated author claims. Cursor completion
584
- and payment success stay separate.
585
-
586
- For chain boundary regressions, also set `LAUNCH_LIFECYCLE_MANIFEST` and
587
- `LAUNCH_LIFECYCLE_FIXTURES`, then run `node --test test/lifecycle-chain.test.mjs` with
588
- the same local-execution environment. Ordinary `pnpm test` does not authorize chain writes.
203
+ `pnpm test` is the offline unit suite. The generator prints a historical ABI vector,
204
+ not a current executable plan. Do not run a funded launch wrapper as a smoke check.
205
+ Owned-fork, owned-fixture, and HTTP API test commands are in the
206
+ [SDK reference](../docs/reference.md#run-owned-fixture-and-api-checks); they require
207
+ separate disposable infrastructure and explicit permission for any writes.