@black-market/sdk 0.11.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.
- package/README.md +96 -79
- package/dist/lifecycle/abi.d.ts +1 -0
- package/dist/lifecycle/abi.d.ts.map +1 -1
- package/dist/lifecycle/abi.js +1 -0
- package/dist/lifecycle/abi.js.map +1 -1
- package/dist/lifecycle/deployments/ufg-dynamic-pool-20261021.d.ts +71 -0
- package/dist/lifecycle/deployments/ufg-dynamic-pool-20261021.d.ts.map +1 -0
- package/dist/lifecycle/deployments/ufg-dynamic-pool-20261021.js +73 -0
- package/dist/lifecycle/deployments/ufg-dynamic-pool-20261021.js.map +1 -0
- package/dist/lifecycle/deployments/ufg-fixed-pool-20261021.d.ts +71 -0
- package/dist/lifecycle/deployments/ufg-fixed-pool-20261021.d.ts.map +1 -0
- package/dist/lifecycle/deployments/ufg-fixed-pool-20261021.js +73 -0
- package/dist/lifecycle/deployments/ufg-fixed-pool-20261021.js.map +1 -0
- package/dist/lifecycle/index.d.ts +1 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/index.js +1 -0
- package/dist/lifecycle/index.js.map +1 -1
- package/dist/lifecycle/markets.d.ts +3 -1
- package/dist/lifecycle/markets.d.ts.map +1 -1
- package/dist/lifecycle/markets.js +20 -3
- package/dist/lifecycle/markets.js.map +1 -1
- package/dist/lifecycle/planner.d.ts.map +1 -1
- package/dist/lifecycle/planner.js +101 -46
- package/dist/lifecycle/planner.js.map +1 -1
- package/dist/lifecycle/presets.d.ts +4 -2
- package/dist/lifecycle/presets.d.ts.map +1 -1
- package/dist/lifecycle/presets.js +11 -4
- package/dist/lifecycle/presets.js.map +1 -1
- package/dist/lifecycle/progress.d.ts +3 -1
- package/dist/lifecycle/progress.d.ts.map +1 -1
- package/dist/lifecycle/progress.js +145 -59
- package/dist/lifecycle/progress.js.map +1 -1
- package/dist/lifecycle/rpc.d.ts +8 -2
- package/dist/lifecycle/rpc.d.ts.map +1 -1
- package/dist/lifecycle/rpc.js +165 -9
- package/dist/lifecycle/rpc.js.map +1 -1
- package/dist/lifecycle/simulation.d.ts +1 -1
- package/dist/lifecycle/simulation.d.ts.map +1 -1
- package/dist/lifecycle/simulation.js +15 -11
- package/dist/lifecycle/simulation.js.map +1 -1
- package/dist/lifecycle/types.d.ts +23 -1
- package/dist/lifecycle/types.d.ts.map +1 -1
- package/dist/lifecycle/types.js.map +1 -1
- package/dist/lifecycle/ufg-abi.d.ts +2386 -0
- package/dist/lifecycle/ufg-abi.d.ts.map +1 -0
- package/dist/lifecycle/ufg-abi.js +171 -0
- package/dist/lifecycle/ufg-abi.js.map +1 -0
- package/dist/lifecycle/ufg-config.d.ts +38 -0
- package/dist/lifecycle/ufg-config.d.ts.map +1 -0
- package/dist/lifecycle/ufg-config.js +75 -0
- package/dist/lifecycle/ufg-config.js.map +1 -0
- package/dist/lifecycle/ufg.d.ts +21 -0
- package/dist/lifecycle/ufg.d.ts.map +1 -0
- package/dist/lifecycle/ufg.js +98 -0
- package/dist/lifecycle/ufg.js.map +1 -0
- package/docs/launch-lifecycle.md +611 -1363
- package/docs/reference.md +332 -0
- package/examples/.env.example +3 -2
- package/examples/README.md +172 -539
- package/examples/launch-example-support.ts +11 -3
- package/examples/launch-example.ts +1 -1
- package/examples/launch-lifecycle-smoke.ts +1 -1
- package/examples/ufg-launch-config.ts +31 -0
- package/package.json +1 -1
- package/src/lifecycle/abi.ts +1 -0
- package/src/lifecycle/deployments/ufg-dynamic-pool-20261021.ts +74 -0
- package/src/lifecycle/deployments/ufg-fixed-pool-20261021.ts +74 -0
- package/src/lifecycle/index.ts +1 -0
- package/src/lifecycle/markets.ts +16 -3
- package/src/lifecycle/planner.ts +95 -45
- package/src/lifecycle/presets.ts +11 -4
- package/src/lifecycle/progress.ts +131 -51
- package/src/lifecycle/rpc.ts +158 -10
- package/src/lifecycle/simulation.ts +14 -10
- package/src/lifecycle/types.ts +15 -2
- package/src/lifecycle/ufg-abi.ts +173 -0
- package/src/lifecycle/ufg-config.ts +77 -0
- package/src/lifecycle/ufg.ts +86 -0
package/examples/README.md
CHANGED
|
@@ -1,574 +1,207 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
The launch examples use the public `@black-market/sdk` 0.11.0 package and viem.
|
|
4
|
-
Build this checkout before running its examples; in a consumer project install
|
|
5
|
-
`@black-market/sdk@0.11.0` for current gas packing and proof-coverage 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
|
-
| `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. |
|
|
29
|
-
| `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. |
|
|
30
|
-
| `launch-lifecycle-smoke.ts` | Actual SDK launch/recovery/custody/fee operations, only on an explicitly authorized owned disposable loopback graph. |
|
|
31
|
-
| `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. |
|
|
32
|
-
|
|
33
|
-
## Deployed read-only discovery
|
|
34
|
-
|
|
35
|
-
```sh
|
|
36
|
-
pnpm install
|
|
37
|
-
pnpm examples
|
|
38
|
-
# Optional: RPC_URL=https://your-robinhood-rpc pnpm examples
|
|
39
|
-
```
|
|
1
|
+
# Run the examples
|
|
40
2
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
`
|
|
44
|
-
|
|
45
|
-
|
|
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).
|
|
46
8
|
|
|
47
|
-
##
|
|
9
|
+
## Set up the checkout
|
|
48
10
|
|
|
49
|
-
|
|
11
|
+
Run from the repository root:
|
|
50
12
|
|
|
51
13
|
```sh
|
|
14
|
+
pnpm install --frozen-lockfile
|
|
52
15
|
pnpm build
|
|
53
|
-
|
|
54
|
-
|
|
16
|
+
cp -n examples/.env.example .env
|
|
17
|
+
chmod 600 .env
|
|
55
18
|
```
|
|
56
19
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
`
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
`
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
##
|
|
97
|
-
|
|
98
|
-
The real HTTP integration suite uses the public `LaunchApiClient` against a separately
|
|
99
|
-
running service. Reads are unsigned; metadata-session writes require a disposable key
|
|
100
|
-
and an owned loopback service with real application storage:
|
|
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.
|
|
25
|
+
|
|
26
|
+
### Configure the environment
|
|
27
|
+
|
|
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
|
|
101
60
|
|
|
102
61
|
```sh
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
62
|
+
pnpm examples
|
|
63
|
+
# quickstart.ts does not load .env; load it explicitly if needed:
|
|
64
|
+
node --env-file=.env examples/quickstart.ts
|
|
106
65
|
```
|
|
107
66
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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.
|
|
111
72
|
|
|
112
|
-
##
|
|
73
|
+
## Choose one of eleven launch cases
|
|
113
74
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
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.
|
|
118
78
|
|
|
119
|
-
|
|
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:
|
|
120
101
|
|
|
121
102
|
```sh
|
|
122
|
-
|
|
123
|
-
node examples/launch-
|
|
124
|
-
# 2. After reviewing the output, explicitly execute the same case.
|
|
125
|
-
node examples/launch-erc20-v4.ts --broadcast
|
|
103
|
+
node examples/hmm-launch-config.ts
|
|
104
|
+
node examples/ufg-launch-config.ts
|
|
126
105
|
```
|
|
127
106
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
`planning.json` and all other planning evidence in a fresh `launch-results/` directory.
|
|
133
|
-
The creator's public address is derived locally (including authenticated keystore
|
|
134
|
-
decryption when selected), but no wallet signer is created. The final output line
|
|
135
|
-
is the exact case command with `--broadcast` appended.
|
|
136
|
-
|
|
137
|
-
**Choosing `--broadcast` is the authorization. It deliberately skips manual
|
|
138
|
-
economic-review admission: there is no interactive hash prompt or hash input.**
|
|
139
|
-
The full review is still printed and saved, including its computed provenance hash.
|
|
140
|
-
The broadcast run plans afresh with current state, fresh random identity and funding
|
|
141
|
-
builds; it does not submit the dry run's saved plan. Planner admission, unchanged
|
|
142
|
-
economic authority, deadlines, image verification and canonical/reorg barriers remain
|
|
143
|
-
mandatory before signing and publication.
|
|
144
|
-
`--resume <recovery-dir>` retains its existing continuation/publication behavior;
|
|
145
|
-
it does not become a dry run and does not need `--broadcast`. Unknown, duplicated
|
|
146
|
-
or combined mode flags fail before configuration or artifact creation with usage text.
|
|
147
|
-
|
|
148
|
-
### Setup once
|
|
149
|
-
|
|
150
|
-
Use **Node 24+**. In this repository run `pnpm install`. In a consumer project install
|
|
151
|
-
both public dependencies with `pnpm add @black-market/sdk viem` (or
|
|
152
|
-
`npm install @black-market/sdk viem`) and copy the selected files with
|
|
153
|
-
`launch-example.ts`, `launch-example-support.ts`, and `launch-example-kyber.ts`
|
|
154
|
-
into `examples/`, using the matching updated SDK build.
|
|
155
|
-
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
|
|
156
111
|
|
|
157
112
|
```sh
|
|
158
|
-
|
|
159
|
-
|
|
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>"
|
|
160
116
|
```
|
|
161
117
|
|
|
162
|
-
|
|
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 |
|
|
163
123
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
RPC_URL=
|
|
168
|
-
```
|
|
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`.
|
|
169
127
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
the bounded loader authenticates its Keccak MAC and declared address before deriving
|
|
175
|
-
the creator. It uses Node crypto and existing viem, with no extra dependency.
|
|
176
|
-
Dry-run configuration derives only the public creator address; signing methods are
|
|
177
|
-
constructed only in broadcast or nonterminal resume execution.
|
|
178
|
-
Never commit the keystore/password or use a published test key for a real launch.
|
|
179
|
-
Set `LAUNCH_API_URL` to your actual HTTPS or owned loopback service root. There is
|
|
180
|
-
no default wallet, guessed metadata API, or silent API skip. The API needs actual
|
|
181
|
-
application storage and an indexer observing the same chain as the execution RPC.
|
|
182
|
-
Existing environment variables take precedence over the working-directory `.env`,
|
|
183
|
-
loaded once using Node's native `process.loadEnvFile`. No shell interpolation is used.
|
|
184
|
-
|
|
185
|
-
`EXAMPLE_BUY_AMOUNT_WEI` sets the exact **native ETH conversion input per opening
|
|
186
|
-
buy**, not the eventual WETH/USDG amount. Use a positive canonical decimal uint256
|
|
187
|
-
wei string; the default is `10000000000000` (**0.00001 ETH**). Kyber's app-compatible
|
|
188
|
-
exact-input domain additionally requires each aggregate input to be below `2^255`.
|
|
189
|
-
The runner aggregates ETH inputs per quote, obtains one fresh
|
|
190
|
-
`POST EXAMPLE_KYBER_API_URL/api/v1/quote/kyber/build?chainId=4663` build per quote,
|
|
191
|
-
and binds native zero-address input, exact input, sender/recipient equal to the
|
|
192
|
-
actual funding escrow, **50 bps conversion slippage**, and the same 300-second
|
|
193
|
-
launch-purpose deadline as the plan. The API owns fresh route preview; a preview
|
|
194
|
-
GET is not executable funding. `EXAMPLE_KYBER_API_URL` defaults to `LAUNCH_API_URL`
|
|
195
|
-
(the app's public trade default is `https://api.abyss.trading`); an explicit override
|
|
196
|
-
must meet the same HTTPS/owned-loopback safety rules.
|
|
197
|
-
|
|
198
|
-
Each funding row is `LifecycleFundingKind.Swap`, native zero-address `inputAsset`,
|
|
199
|
-
the reviewed router target and original built calldata. The runner decodes the
|
|
200
|
-
reviewed `swap` entry point and checks currencies, escrow recipient, exact input,
|
|
201
|
-
output floor, executor payload, flags and absence of redirected inputs/extra fees.
|
|
202
|
-
`amountOutMinimum = floor(amountOut * 9950 / 10000)` is the exact quote budget.
|
|
203
|
-
That budget is divided across the quote's ordered buys, with the integer remainder
|
|
204
|
-
in the last such buy, so their inputs sum exactly to the API minimum. No WETH/USDG
|
|
205
|
-
wallet balance or ERC20 approval is needed; the creator needs native ETH **plus gas**.
|
|
206
|
-
Registry target/spender/runtime admission is checked on the launch graph and
|
|
207
|
-
rechecked before signatures. Refusal, unavailable route, changed binding or expiry
|
|
208
|
-
stops unsigned with retained evidence: **never fall back to native-wrap, direct ERC20
|
|
209
|
-
funding, a separate wallet swap, dropped buys, or rewritten quote bytes/deadline**.
|
|
210
|
-
|
|
211
|
-
Optional `EXAMPLE_TOKEN_NAME`, `EXAMPLE_TOKEN_SYMBOL`, and
|
|
212
|
-
`EXAMPLE_TOKEN_DESCRIPTION` override each case's default metadata. Text is NFC
|
|
213
|
-
normalized and trimmed, with the unchanged API/lifecycle bounds (name: 100 Unicode
|
|
214
|
-
codepoints/128 UTF-8 bytes; symbol: 32 codepoints/bytes; description: 2000 codepoints).
|
|
215
|
-
`EXAMPLE_IMAGE_PATH` optionally loads 1 byte through 5 MiB of actual PNG/JPEG/WebP
|
|
216
|
-
bytes. The frozen image SHA-256/type/length is reviewed and signed, uploaded using
|
|
217
|
-
only the exact API-issued PUT URL/headers, and completed/verified before execution.
|
|
218
|
-
Without it the session remains metadata-only; no artwork is invented. API image
|
|
219
|
-
verification may reject malformed or animated files even when their type is valid.
|
|
220
|
-
With an image set, success additionally requires matching staged/published image
|
|
221
|
-
SHA-256/type/length, the same non-null public image URL in the publication and
|
|
222
|
-
indexed token DTO, and one bounded no-redirect GET of that URL returning **HTTP
|
|
223
|
-
200**, an image content-type family and nonempty bytes. Byte-identical output
|
|
224
|
-
must match the signed type/length/SHA-256. Different served bytes may be an API/CDN
|
|
225
|
-
transformation: `published-image.json` records the actual SHA-256/type/length and
|
|
226
|
-
that limited family/nonempty-body check, explicitly not byte identity. HTTP/type/
|
|
227
|
-
empty/oversized failures stop nonzero with evidence; no image retry or metadata-only
|
|
228
|
-
fallback occurs. The final canonical RPC barrier runs after this GET.
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
The target is **USD 5000**, not a fixed token/WETH ratio. Optional
|
|
232
|
-
`EXAMPLE_TARGET_MARKET_CAP_USD` accepts a positive exact USD decimal (up to 18
|
|
233
|
-
fractional digits). It does not grant signing permission or override the USD seed.
|
|
234
|
-
The runner makes one bounded, uncached GET to
|
|
235
|
-
`LAUNCH_API_URL/api/v1/token-prices?chainId=4663&limit=100`, without pagination,
|
|
236
|
-
redirects or retries. It selects the reviewed chain-4663 WETH address and requires
|
|
237
|
-
ready metadata, 18 decimals, `priced: true`, `source: "anchor"`, and direct
|
|
238
|
-
Chainlink-anchor provenance bound to WETH and the reviewed aggregator
|
|
239
|
-
`0x78F3556b67E17Df817D51Ef5a990cDaF09E8d3A9`. The exact positive uint256
|
|
240
|
-
`priceUsdX18` is an **indicative API-published launch seed**, not an executable
|
|
241
|
-
swap quote or on-chain execution authority. HTTP/body/validation failure or a missing
|
|
242
|
-
WETH row stops unsigned; there is no manual price or alternate-source fallback.
|
|
243
|
-
Each request has a 30-second timeout and a 1 MiB streamed response limit.
|
|
244
|
-
The review and console preserve API origin, index/graph blocks, upstream observation
|
|
245
|
-
timestamp and age, and local retrieval time. Retrieval does not make an old upstream
|
|
246
|
-
observation fresh. The API may continue publishing its price as upstream age grows;
|
|
247
|
-
the runner does not impose a 15-minute contract-round freshness gate.
|
|
248
|
-
USDG markets use the SDK-exported chain-4663 Global Dollar address, **6 decimals**
|
|
249
|
-
and the reviewed `usdPeg` source at exactly `1e18` USD-X18, matching the app. There
|
|
250
|
-
is no substituted WETH/USD value. Every market has its own quote precision, USD
|
|
251
|
-
seed, token/quote orientation and aligned valuation; multi-quote FDVs are not additive.
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
Before any attribution or transaction signature, the runner saves
|
|
255
|
-
`economic-review.json` and exact owner-only recovery and prints its financial summary.
|
|
256
|
-
The computed hash binds all quotes, target, actual supply, predicted per-market
|
|
257
|
-
token order, every allocation, fees, protected buys, Kyber conversion bytes/minima/
|
|
258
|
-
deadline, metadata/image and finalized plan. It is provenance evidence, never an
|
|
259
|
-
authorization input. Dry runs stop here without signing; broadcast runs save
|
|
260
|
-
`economic-admission.json` with `authorization: "--broadcast"` and that hash as
|
|
261
|
-
evidence of the chosen mode, not another gate.
|
|
262
|
-
Before every later signature the runner rereads the same configured API snapshot and
|
|
263
|
-
rechecks the immutable review, target, supply, finalized plan and predicted token
|
|
264
|
-
order. Any exact price, API origin, chain, WETH/decimals or direct-anchor identity,
|
|
265
|
-
kind or source change stops execution. Failed or unpriced reads also reject.
|
|
266
|
-
Index/graph blocks and observation/retrieval times may advance with the identical
|
|
267
|
-
price and source; they never replace the original review. Changed economics require
|
|
268
|
-
a new explicit review, never silent plan rewriting or submission replay. Actual
|
|
269
|
-
RPC chain, balances, nonce, prediction, deadline and native execution proof remain
|
|
270
|
-
execution authority; API block fields are observations, not RPC canonicality pins.
|
|
271
|
-
The original plan deadline must still be future at metadata signing/staging and
|
|
272
|
-
before each later signature, including **after asynchronous quote/authority reads**.
|
|
273
|
-
Expiry requires a new explicit review; the runner never extends the saved deadline.
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
Blank `RPC_URL` uses the SDK official Robinhood chain-4663 mainnet endpoint; HTTPS
|
|
277
|
-
providers and explicit owned loopback HTTP execution RPCs are supported.
|
|
278
|
-
The creator is derived locally from the configured signer; deployment/WETH addresses
|
|
279
|
-
come from `getAddresses(4663)`. The runner checks chain identity, EOA, deployed core
|
|
280
|
-
and registry, admitted profiles, funding escrow/core/native binding and each quote's
|
|
281
|
-
actual decimals. WETH keeps the registered P1 `(1,4096)` oracle. USDG discovers
|
|
282
|
-
`OracleConfigRegistered` history at a pinned block, rereads the factory mapping at
|
|
283
|
-
that same block, and selects a compatible registered config deterministically by
|
|
284
|
-
increasing max tick move, decreasing cardinality, then config ID. Factory configs
|
|
285
|
-
are generic, not a separate hardcoded USDG ID. No compatible config, unavailable
|
|
286
|
-
history, or a changed canonical pin fails loudly. V4 cases require config6/V2;
|
|
287
|
-
an old config5 profile is never selected instead.
|
|
288
|
-
V4 fixed cases encode max `10000`, min `1000` pips and sensitivity `7654321`
|
|
289
|
-
fee-pips × seconds/tick; all are immutable. The reviewed `FixedFeePoolHookV1` charges
|
|
290
|
-
the fixed maximum `10000` pips (1%) on applicable amounts. Minimum and sensitivity
|
|
291
|
-
are stored and exposed, not used for a dynamic fee calculation. The current defaults
|
|
292
|
-
resolve the matching October8 mined config6 graph. Position maxima exactly cover market budgets and budgets
|
|
293
|
-
exactly cover minted supply. Actual unused inventory burns before buys, never to the
|
|
294
|
-
creator. Verification accounts for burn `Transfer` logs, reduced `totalSupply`, an
|
|
295
|
-
empty core token balance, and creator balance equal only to paid opening-buy output.
|
|
296
|
-
Optional `NFT_BASE_URI` supplies your actually hosted ERC404 NFT metadata base URI.
|
|
297
|
-
Blank uses an empty base URI: NFT units/mirror behavior remain real, but the example
|
|
298
|
-
does not claim hosted NFT metadata exists.
|
|
299
|
-
|
|
300
|
-
The fixed Robinhood examples require native sequential Nitro `eth_simulateV1`, including
|
|
301
|
-
an isolated pinned ArbOS capability probe and exact fee-bearing replay. Generic
|
|
302
|
-
Anvil/Hardhat forks cannot certify Nitro compute/poster metering and are not a fallback.
|
|
303
|
-
Unsupported native simulation, insufficient funds or failed admission stop before API
|
|
304
|
-
staging/broadcast. Each immediate next envelope is additionally proved afresh against
|
|
305
|
-
the saved `reviewedTransaction` and preflighted read-only through the same execution
|
|
306
|
-
RPC before signing. Calldata, value, gas and gas price must remain exactly as reviewed.
|
|
307
|
-
There is no mode fallback, admission override, automatic submission replay or reduced case.
|
|
308
|
-
|
|
309
|
-
### Commands and launch matrix
|
|
310
|
-
|
|
311
|
-
Every command below defaults to a dry run. Append `--broadcast` to execute the
|
|
312
|
-
selected case; the table's atomic/staged mode is independent of the CLI dry-run/
|
|
313
|
-
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.
|
|
314
132
|
|
|
315
|
-
|
|
316
|
-
node examples/launch-erc20-v4.ts
|
|
317
|
-
node examples/launch-erc20-abyss.ts
|
|
318
|
-
node examples/launch-erc404-v4.ts
|
|
319
|
-
node examples/launch-erc404-abyss.ts
|
|
320
|
-
node examples/launch-erc20-staking-v4.ts
|
|
321
|
-
node examples/launch-erc20-dividends-abyss.ts
|
|
322
|
-
node examples/launch-erc20-burn-mixed.ts
|
|
323
|
-
node examples/launch-erc404-dividends-mixed.ts
|
|
324
|
-
node examples/launch-erc20-multi-quote.ts
|
|
325
|
-
node examples/launch-erc20-depth-v4.ts
|
|
326
|
-
node examples/launch-erc20-dividends-multiquote-mixed.ts
|
|
327
|
-
```
|
|
133
|
+
### Fund opening buys
|
|
328
134
|
|
|
329
|
-
|
|
|
330
|
-
| --- | --- |
|
|
331
|
-
|
|
|
332
|
-
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
`
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
and
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
simulation receipt, showing all-in average execution price and the premium against
|
|
378
|
-
opening price. That premium includes fees and price impact; it is **not** the
|
|
379
|
-
post-buy marginal spot price. Opening buys move the pool, so the actual post-buy
|
|
380
|
-
valuation must use observed post-activation pool price and retained total supply.
|
|
381
|
-
The old 1:1/fixed-liquidity examples could burn almost the entire intended supply
|
|
382
|
-
and produce a radically different retained-supply valuation. They are not a pricing
|
|
383
|
-
recipe or a valid precedent for a new launch.
|
|
384
|
-
|
|
385
|
-
### Optional execution restrictions
|
|
386
|
-
|
|
387
|
-
There are no default chain/RPC/account gas or calldata caps. The SDK reads current
|
|
388
|
-
Nitro protocol compute ceilings and exact-calldata poster budgets itself. Default
|
|
389
|
-
headroom is **1500 bps (15%)**. Set explicit decimal restrictions only when you intend
|
|
390
|
-
to tighten the complete transaction envelope: `EXAMPLE_CHAIN_GAS_CAP`,
|
|
391
|
-
`EXAMPLE_RPC_GAS_CAP`, `EXAMPLE_ACCOUNT_GAS_CAP`, `EXAMPLE_MAX_CALLDATA_BYTES`.
|
|
392
|
-
`EXAMPLE_HEADROOM_BPS` preserves your explicit 0–10000 policy. These are local
|
|
393
|
-
restrictions, not invented provider/account assurances or admission bypasses.
|
|
394
|
-
Poster allocation is already inside Nitro gas/affordability and is not charged twice.
|
|
395
|
-
|
|
396
|
-
Robinhood's separate aggregate simulation gas-used budget defaults to **50M**.
|
|
397
|
-
`EXAMPLE_SIMULATION_GAS_CAP` overrides that budget (positive decimal gas) for
|
|
398
|
-
providers supporting more or less. It does not change per-transaction compute
|
|
399
|
-
capacity. Multi-step examples requiring full activation outputs for buy protection
|
|
400
|
-
and economic review need a provider/budget covering activation, or refuse before
|
|
401
|
-
signing; do not raise the setting beyond the provider's actual supported budget.
|
|
402
|
-
|
|
403
|
-
### Evidence and failure recovery
|
|
404
|
-
|
|
405
|
-
Each dry run or broadcast automatically creates `launch-results/<timestamp-case-random>/`;
|
|
406
|
-
`--resume` reuses the original directory rather than creating another launch. Inspect
|
|
407
|
-
`result.json`, `events.jsonl`, finalized `plan.json`, `planning.json`,
|
|
408
|
-
`economic-review.json` and `receipts.json`. A dry-run result has `runMode: "dry-run"`,
|
|
409
|
-
`scope: "planning"` and `execution: "dry-run"`, with no transactions or API writes.
|
|
410
|
-
Publication-only artifacts (`publication-progress.json`, `published-token.json` and,
|
|
411
|
-
when configured, `published-image.json`) are produced only during broadcast/resume.
|
|
412
|
-
Exact admitted wallet envelopes are signed locally only during execution; computed
|
|
413
|
-
hashes and unsigned envelopes are durably retained as `broadcast-attempt`
|
|
414
|
-
**before the one raw broadcast**. Real receipts are saved before
|
|
415
|
-
status/canonical-state assertions. No unlocked-account signing or sending is used.
|
|
416
|
-
Public evidence preserves structured field names but redacts sensitive values:
|
|
417
|
-
known keys, signatures, signed raw bytes, API capabilities, authorization values
|
|
418
|
-
and endpoint credentials. Public `plan.json` may therefore differ from the exact
|
|
419
|
-
commitment and is **not recovery authority**. Before the first attribution or chain
|
|
420
|
-
signature, `private-recovery.json` durably retains the complete unredacted finalized
|
|
421
|
-
`plan`, original `mode`, `confirmations` and `economicReview`. Broadcast additionally
|
|
422
|
-
saves `economicAdmission` with the computed review hash and `authorization: "--broadcast"`.
|
|
423
|
-
This owner-only file (mode `0600` inside the mode `0700` run directory) also retains
|
|
424
|
-
raw signed transactions and one-time API recovery material across session updates.
|
|
425
|
-
Original plan and economic review/admission provenance are immutable.
|
|
426
|
-
Never share or commit it.
|
|
427
|
-
`launch-results/` is ignored.
|
|
428
|
-
|
|
429
|
-
Every broadcast case requires actual API metadata staging (and verified image completion
|
|
430
|
-
when configured), publication using the activation hash, and an indexed DTO
|
|
431
|
-
matching token/creator/hash/metadata/image. Genuine pending-indexer HTTP `202`
|
|
432
|
-
responses are polled for up to 90 seconds respecting `Retry-After`. Before **each
|
|
433
|
-
publication attempt** and before final success, fresh RPC progress must be
|
|
434
|
-
confirmation-safe canonical Active with all retained receipts confirmed and the
|
|
435
|
-
original activation still in its saved block number/hash. Reorg, moved inclusion,
|
|
436
|
-
missing/unconfirmed receipt or changed phase stops, retains `publication-progress.json`
|
|
437
|
-
and private recovery evidence, and exits nonzero—even if the API reports success.
|
|
438
|
-
Other API failures are not retried or converted to partial success. The runner
|
|
439
|
-
never retries a raw send, relaunches, cancels or rolls back the source chain.
|
|
440
|
-
**Do not blindly rerun after an ambiguous broadcast**: inspect the durable hash first.
|
|
441
|
-
See [chain/API invariants](../docs/launch-lifecycle.md#individual-token-creation-examples).
|
|
442
|
-
|
|
443
|
-
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
|
|
444
183
|
|
|
445
184
|
```sh
|
|
446
|
-
node examples/launch
|
|
185
|
+
node examples/launch.ts --plan plan.json \
|
|
186
|
+
--rpc https://rpc.mainnet.chain.robinhood.com/ --mode staged --mine
|
|
447
187
|
```
|
|
448
188
|
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
Canonical **Preparing/Ready** resumes only remaining `buildNextTransaction` steps
|
|
457
|
-
under the saved economic admission and signing gates; canonical **Active** recovers
|
|
458
|
-
the original activation receipt and runs chain verification/publication only,
|
|
459
|
-
including after the signing deadline. Unstarted/Cancelled state, changed inclusion,
|
|
460
|
-
replacement or unresolved signed hashes stop for read-only reconciliation.
|
|
461
|
-
|
|
462
|
-
Before publication the original API session is refreshed with `getUploadSession`;
|
|
463
|
-
the retained one-time capability is carried across every read/renew/complete response
|
|
464
|
-
because the API does not echo it. If an image is still awaiting upload, set
|
|
465
|
-
`EXAMPLE_IMAGE_PATH` to the original bytes: SHA-256, content type and length must
|
|
466
|
-
match the signed descriptor. An expired PUT URL is renewed once on HTTP 403/410/412
|
|
467
|
-
with `renewUploadUrl`, then the same bytes are uploaded and completed. A live ready
|
|
468
|
-
image is never reuploaded. No new attribution signature or session is created.
|
|
469
|
-
All existing chain/image/indexer checks and canonical activation barriers still apply.
|
|
470
|
-
|
|
471
|
-
After interruption, timeout, replacement or reorg, preserve the original identity,
|
|
472
|
-
`private-recovery.json` and every signed hash. Public `plan.json` and diagnostic
|
|
473
|
-
`planning.json` are not recovery authority; do not rerun a wrapper without `--resume`.
|
|
474
|
-
Supply receipt references including observed block number/hash;
|
|
475
|
-
when a replacement is known retain both `transactionHash` (original) and
|
|
476
|
-
`replacementHash` (effective). A same-nonce cancellation is not successful activation;
|
|
477
|
-
a missing receipt alone does not prove a reorg. No replacement is adopted or retried
|
|
478
|
-
automatically by these local-signing cases: a timed-out original hash requires manual
|
|
479
|
-
reconciliation. `launch.ts` provides unsigned reload/review for a privately extracted
|
|
480
|
-
exact plan: keep that file owner-only and supply the original `--mode`,
|
|
481
|
-
`--confirmations` and reconciled `--receipts`. Do not publish the extracted plan or
|
|
482
|
-
CLI output, which may contain sensitive committed values. Recovery of API publication
|
|
483
|
-
uses the original private session/capability and canonical activation hash, never
|
|
484
|
-
another launch.
|
|
485
|
-
|
|
486
|
-
### Owned-local wallet verification helpers
|
|
487
|
-
|
|
488
|
-
`launch-example-support.ts` exports
|
|
489
|
-
`createLocalLaunchWallet({privateKey,creator,chainId,orchestrator,client,redactor})`
|
|
490
|
-
and `submitSignedRecorded({transaction,wallet,client,wait,artifacts,signal})`.
|
|
491
|
-
`client.request({method,params})` is an explicit RPC adapter; `transaction` carries
|
|
492
|
-
`id`, `kind`, and exact unsigned `wire` chain/from/to/data/value/gas fields plus
|
|
493
|
-
optional nonce/fees/type/accessList. `wait(hash)` returns a real receipt.
|
|
494
|
-
The signer exposes `address`, `signTypedData(typedData)` and `signTransaction(wire)`
|
|
495
|
-
returning `{wire,rawTransaction,transactionHash}`. Retain the result privately.
|
|
496
|
-
Use `RunArtifacts(output,caseId,redactor)` with `Redactor` and a fresh directory for
|
|
497
|
-
durable evidence; call `initialize()` before work and `finish(status,error)` afterward.
|
|
498
|
-
The shared `runLaunchExample(caseObject, argv = process.argv.slice(2))` in
|
|
499
|
-
`launch-example.ts` takes the same fixed case objects as the eleven files, loads
|
|
500
|
-
environment and either auto-creates output for a new launch or resumes in place.
|
|
501
|
-
`RunArtifacts(output,caseId,redactor,{resume:true})` reopens private recovery and
|
|
502
|
-
retained transaction evidence without truncating the journal.
|
|
503
|
-
Offline diagnostics are in `test/launch-example.test.mjs`,
|
|
504
|
-
`test/launch-example-matrix.test.mjs` and `test/launch-example-resume.test.mjs`;
|
|
505
|
-
they do not claim real launch/indexer proof.
|
|
506
|
-
|
|
507
|
-
## Relationship to the application flows
|
|
508
|
-
|
|
509
|
-
The examples have been reviewed against `abyss-app`'s `scripts/launch-node.mjs`,
|
|
510
|
-
`launch-node-deploy.mjs`, `launch-browser-wallet.mjs`, `launch-staged-smoke.mjs`,
|
|
511
|
-
`launch-review-smoke.mjs`, and `src/lib/creation` / `src/lib/lifecycle` authoring,
|
|
512
|
-
funding, execution and recovery modules. These are behavioral references, not SDK
|
|
513
|
-
dependencies. The application consumes the published **`@black-market/sdk` 0.8.1** and
|
|
514
|
-
derives current deployment defaults through **`getAddresses`**, as do these examples.
|
|
515
|
-
The package pin alone is not live deployment authority. The mined graph
|
|
516
|
-
is recorded in the contracts repository at
|
|
517
|
-
`contracts/deployments/launch/pool-launch-v1/20261008T000141Z-e174ce6/manifest.json`;
|
|
518
|
-
examples resolve its SDK presets and certify live bindings, rather than copying
|
|
519
|
-
addresses from an application script.
|
|
520
|
-
|
|
521
|
-
| Flow | Shared contract / intentional difference |
|
|
522
|
-
| --- | --- |
|
|
523
|
-
| 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. |
|
|
524
|
-
| 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. |
|
|
525
|
-
| 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. |
|
|
526
|
-
| 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. |
|
|
527
|
-
| 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. |
|
|
528
|
-
| 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. |
|
|
529
|
-
| 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. |
|
|
530
|
-
| 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. |
|
|
531
|
-
|
|
532
|
-
### Safe verification without a funded launch
|
|
533
|
-
|
|
534
|
-
After rebuilding the package, run the ordinary offline suite (including
|
|
535
|
-
`test/launch-example.test.mjs`) and typecheck. The example tests retain endpoint,
|
|
536
|
-
chain/account, exact-signing, redaction, pre-broadcast durability, pending-publication
|
|
537
|
-
and no-retry behavior, plus residual-burn/no-creator-reserve accounting; they do not
|
|
538
|
-
claim an actual chain launch or indexer proof.
|
|
539
|
-
|
|
540
|
-
For CLI proof, run `node examples/launch.ts` without required arguments (usage refusal,
|
|
541
|
-
no RPC/signing) and `node examples/generate-lifecycle-commitment-fixture.ts` without
|
|
542
|
-
output paths (offline historical vector to stdout). Read-only deployed discovery is
|
|
543
|
-
`node examples/quickstart.ts`. With a reviewed exact saved current plan, use
|
|
544
|
-
`launch.ts --plan ... --rpc ... --mode ...` and retained receipt-reference JSON;
|
|
545
|
-
`--mine` performs only local mining and read-only native simulation on the source.
|
|
546
|
-
Do **not** run any of the eight configured wallet/API wrappers to verify this review.
|
|
547
|
-
Real metadata-session integration needs an owned disposable HTTP service; full custody,
|
|
548
|
-
receipt and fee execution proof needs the separately authorized owned fixture below.
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
## Actual owned-fixture proof
|
|
552
|
-
|
|
553
|
-
The manifest must declare `fixtureOnly: true`, exact reviewed graph addresses, and
|
|
554
|
-
`executionLimits.provenance.scope: "controlled-local-measurement"`. The plan file
|
|
555
|
-
contains Solidity-exported `plans` with encoded-plan/hash/identity/token vectors.
|
|
556
|
-
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
|
|
557
196
|
|
|
558
197
|
```sh
|
|
559
|
-
pnpm
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
LAUNCH_LIFECYCLE_ALLOW_LOCAL_EXECUTION=1 \
|
|
563
|
-
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
|
|
564
201
|
```
|
|
565
202
|
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
and
|
|
571
|
-
|
|
572
|
-
For chain boundary regressions, also set `LAUNCH_LIFECYCLE_MANIFEST` and
|
|
573
|
-
`LAUNCH_LIFECYCLE_FIXTURES`, then run `node --test test/lifecycle-chain.test.mjs` with
|
|
574
|
-
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.
|