@easy1staking/cip113-sdk-ts 0.10.0 → 0.11.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 +55 -0
- package/dist/index.d.ts +15 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +81 -1
- package/dist/index.js.map +1 -1
- package/dist/standard/bootstrap.d.ts +552 -0
- package/dist/standard/bootstrap.d.ts.map +1 -0
- package/dist/standard/bootstrap.js +1077 -0
- package/dist/standard/bootstrap.js.map +1 -0
- package/dist/substandards/address-guard.d.ts +60 -0
- package/dist/substandards/address-guard.d.ts.map +1 -0
- package/dist/substandards/address-guard.js +159 -0
- package/dist/substandards/address-guard.js.map +1 -0
- package/dist/substandards/dummy/index.d.ts.map +1 -1
- package/dist/substandards/dummy/index.js +32 -5
- package/dist/substandards/dummy/index.js.map +1 -1
- package/dist/substandards/freeze-and-seize/index.d.ts.map +1 -1
- package/dist/substandards/freeze-and-seize/index.js +45 -9
- package/dist/substandards/freeze-and-seize/index.js.map +1 -1
- package/dist/substandards/interface.d.ts +20 -2
- package/dist/substandards/interface.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,552 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Protocol bootstrap — the transactions that stand up a CIP-113 instance.
|
|
3
|
+
*
|
|
4
|
+
* TARGETS CIP-113 0.5.0-alpha.4 (upstream 7e8a63198c5b240135f1aa2f043ce5d7c046b2c4).
|
|
5
|
+
*
|
|
6
|
+
* ⚑ WHY THIS IS EXPORTED AT ALL. Until 2026-09-17 this sequence lived only in
|
|
7
|
+
* `test/harness/bootstrap.ts`, which `files: ["dist","blueprints"]` does not
|
|
8
|
+
* ship — so the platform maintained ITS OWN PORT of a protocol-critical
|
|
9
|
+
* sequence. That port had already diverged (it reserves the seed UTxOs from
|
|
10
|
+
* coin selection where the harness did not) and the divergence was CORRECT.
|
|
11
|
+
* Two implementations, one right and the other not yet wrong, is worse than one
|
|
12
|
+
* supported export. See CLAUDE.md, "Protocol bootstrap — AMENDED 2026-09-17",
|
|
13
|
+
* and `design/bootstrap-export.md` for the step boundaries and their reasons.
|
|
14
|
+
*
|
|
15
|
+
* ⛔ WHAT THIS MODULE DOES NOT DO, AND WILL NOT. It does not sign, submit, await,
|
|
16
|
+
* poll, fund, retry, or hold a key. It builds unsigned transactions and returns
|
|
17
|
+
* them. Orchestration is the caller's, and that is not a gap — it is what lets
|
|
18
|
+
* the platform keep its own UTxO reservation and its own confirmation strategy.
|
|
19
|
+
*
|
|
20
|
+
* ⛔ AND IT SHIPS NO FIXTURE VALUES. No mnemonic, no endpoint, no nonce, no
|
|
21
|
+
* security parameter, no placeholder policy id, no `any`. A value the caller
|
|
22
|
+
* must decide is a REQUIRED INPUT, never a default. That rule is the whole
|
|
23
|
+
* reason this export is safe to make: everything the devnet fixture chose for
|
|
24
|
+
* itself is now something its CALL passes in.
|
|
25
|
+
*
|
|
26
|
+
* ---------------------------------------------------------------------------
|
|
27
|
+
* THE SEQUENCE IS DEPENDENT, SO THE EXPORT IS STEPWISE
|
|
28
|
+
* ---------------------------------------------------------------------------
|
|
29
|
+
*
|
|
30
|
+
* The one-shot minting policies are parameterised by SPECIFIC OUTPUT REFERENCES
|
|
31
|
+
* of an earlier transaction, so step N+1 cannot be built until step N has been
|
|
32
|
+
* submitted and its outputs observed. There is no "give me five transactions"
|
|
33
|
+
* shape available; asking for one would mean signing, and signing is out.
|
|
34
|
+
*
|
|
35
|
+
* 1 buildSeedTx -> three distinct seed UTxOs
|
|
36
|
+
* 2 buildMultisigGenesisTx -> the upgrade authority's config UTxO
|
|
37
|
+
* 3 buildProtocolGenesisTx -> params, registry origin, issuance CBOR
|
|
38
|
+
* 4 buildReferenceScriptsTx -> the seven reference scripts
|
|
39
|
+
* 5 buildStakeRegistrationTx -> the six withdraw-0 registrations
|
|
40
|
+
* assembleDeploymentParams -> DeploymentParams (pure)
|
|
41
|
+
*
|
|
42
|
+
* ⚑ RESUMPTION. `planBootstrap(config)` is pure and deterministic: persist the
|
|
43
|
+
* CONFIG and every hash, address, datum and asset unit can be re-derived on any
|
|
44
|
+
* machine with no chain access. No step needs an earlier step's CONSUMED
|
|
45
|
+
* inputs, which is the property that makes resuming at step N work at all — by
|
|
46
|
+
* the time you resume at step 4 the seeds are spent and unfetchable.
|
|
47
|
+
*/
|
|
48
|
+
import type { Evaluator } from "@evolution-sdk/evolution/sdk/builders/TransactionBuilder";
|
|
49
|
+
import type { Address, DeploymentParams, HexString, PlutusBlueprint, PlutusData, PlutusScript, ScriptHash, TxHash, TxInput, UTxO } from "../types.js";
|
|
50
|
+
import type { EvoClient, UnsignedTx } from "../substandards/interface.js";
|
|
51
|
+
import type { UpstreamPin } from "../core/provenance.js";
|
|
52
|
+
import type { MultisigScriptTree } from "../core/evo-utils.js";
|
|
53
|
+
/**
|
|
54
|
+
* Three seed UTxOs, and the count is not negotiable.
|
|
55
|
+
*
|
|
56
|
+
* utxo1 -> protocol_params AND registry, utxo2 -> issuance_cbor_hex_mint,
|
|
57
|
+
* utxo3 -> upgrade_multisig.
|
|
58
|
+
*
|
|
59
|
+
* ⛔ THREE DISTINCT ONES, NOT ONE REUSED. Reusing utxo1 for upgrade_multisig
|
|
60
|
+
* deploys perfectly well — a one-shot outref is consumed once, and the two
|
|
61
|
+
* policies consume it in different transactions, so nothing on chain objects.
|
|
62
|
+
* The reason it must be distinct is OFF chain: `DeploymentParams` carries TWO
|
|
63
|
+
* same-typed one-shot outrefs, `protocolParams.txInput` and
|
|
64
|
+
* `upgradeMultisig.txInput`, and `assertDeploymentScripts` derives a hash from
|
|
65
|
+
* each. A record that gives them ONE value makes the upgrade_multisig check
|
|
66
|
+
* pass whichever field the code reads, so the check cannot fail and a real
|
|
67
|
+
* defect in which field is read is invisible. That is not hypothetical: it hid
|
|
68
|
+
* a wrong derivation for an entire migration once already.
|
|
69
|
+
*/
|
|
70
|
+
export declare const BOOTSTRAP_SEED_COUNT = 3;
|
|
71
|
+
/**
|
|
72
|
+
* The reference-script publication order, which is ONE FACT WRITTEN ONCE.
|
|
73
|
+
*
|
|
74
|
+
* ⛔ APPENDED, NEVER INSERTED. `buildReferenceScriptsTx` pays them in this
|
|
75
|
+
* order and `assembleDeploymentParams` derives every `…RefInput` index from the
|
|
76
|
+
* same array. alpha.3 inserted the dispatcher at index 1 and shifted all three
|
|
77
|
+
* delegates down — and a mismatch here does not fail loudly. It hands out a
|
|
78
|
+
* reference input carrying the WRONG script, and the transaction dies at
|
|
79
|
+
* evaluation naming neither.
|
|
80
|
+
*
|
|
81
|
+
* ⛔ AND APPENDING IS NOT FREE — THERE IS A CAP AND THIS LIST IS NEAR IT (F-9).
|
|
82
|
+
* MEASURED on devnet, 2026-09-17: the transaction publishing these seven comes
|
|
83
|
+
* to **12,496 bytes against a 16,384-byte protocol maximum — 76%**. Two more
|
|
84
|
+
* scripts of the size already here would burst it, and the failure arrives at
|
|
85
|
+
* SUBMISSION rather than at build. This is the same cap that forced the
|
|
86
|
+
* mint/publish/register split in the first place: the 0.3.x single-transaction
|
|
87
|
+
* fixture measured 21,816 bytes. `buildReferenceScriptsTx` now refuses over the
|
|
88
|
+
* chain's own `maxTxSize` rather than letting the ledger say it; when that
|
|
89
|
+
* refusal fires, the answer is a SECOND publish transaction and a second
|
|
90
|
+
* recorded tx hash, not a shorter list.
|
|
91
|
+
*/
|
|
92
|
+
export declare const REFERENCE_SCRIPT_ORDER: readonly ["programmableLogicBase", "programmableLogicGlobal", "transfer", "thirdParty", "unfracking", "issuanceLogic", "upgradeMultisig"];
|
|
93
|
+
export type ReferenceScriptName = (typeof REFERENCE_SCRIPT_ORDER)[number];
|
|
94
|
+
/**
|
|
95
|
+
* The six withdraw-0 credentials a bootstrap must register.
|
|
96
|
+
*
|
|
97
|
+
* ⛔ SIX, AND EVERY OMISSION IS UNDIAGNOSABLE. An unregistered stake credential
|
|
98
|
+
* does not fail with "not registered": the ledger answers code 3141, "rewards
|
|
99
|
+
* withdrawals must consume rewards in full", which reads as a balance problem
|
|
100
|
+
* and sends the reader to the wrong subsystem entirely. MEASURED on devnet —
|
|
101
|
+
* every programmable operation failed that way until the dispatcher joined this
|
|
102
|
+
* list, and `issuance_logic` rides EVERY mint and EVERY burn.
|
|
103
|
+
*/
|
|
104
|
+
export declare const STAKE_REGISTRATION_ORDER: readonly ["programmableLogicGlobal", "transfer", "thirdParty", "unfracking", "issuanceLogic", "upgradeMultisig"];
|
|
105
|
+
export type StakeCredentialName = (typeof STAKE_REGISTRATION_ORDER)[number];
|
|
106
|
+
/** The five steps, in order. Exported so a caller can name where it resumed. */
|
|
107
|
+
export declare const BOOTSTRAP_STEPS: readonly ["seed", "multisig-genesis", "protocol-genesis", "reference-scripts", "stake-registrations"];
|
|
108
|
+
export type BootstrapStepId = (typeof BOOTSTRAP_STEPS)[number];
|
|
109
|
+
/**
|
|
110
|
+
* The 28-byte marker `issuance_mint` is parameterised against so the stored
|
|
111
|
+
* CBOR can be cut either side of its minting-logic argument.
|
|
112
|
+
*
|
|
113
|
+
* ⛔ NOT A PARAMETER, NOT A DEFAULT, AND NEVER DEPLOYED. It is applied and
|
|
114
|
+
* immediately cut back out; what reaches the chain is `pre` and `post` with the
|
|
115
|
+
* marker gone from between them, so that a later registration can splice a REAL
|
|
116
|
+
* minting-logic hash in without re-deriving the script. Passing this value
|
|
117
|
+
* anywhere a minting-logic hash is expected would produce a policy nobody can
|
|
118
|
+
* mint under — it is a cutting guide, not an identifier.
|
|
119
|
+
*
|
|
120
|
+
* ⚑ EXPORTED SO THE OCCURRENCE GUARD CAN BE EXERCISED, and for no other reason.
|
|
121
|
+
* `splitParts.length !== 2` below is the entire reason shipping a fixed hex
|
|
122
|
+
* marker is tolerable — and an unmutated guard is a claim rather than a check.
|
|
123
|
+
* A test cannot construct a body that collides with a marker it cannot see, so
|
|
124
|
+
* the marker is visible. (MEASURED: the `pre`/`post` halves do not depend on
|
|
125
|
+
* this VALUE — two different markers yield byte-identical halves, because the
|
|
126
|
+
* argument occupies the same bit positions either way.)
|
|
127
|
+
*/
|
|
128
|
+
export declare const ISSUANCE_SPLICE_MARKER = "deadbeefcafebabedeadbeefcafebabedeadbeefcafebabedeadbeef";
|
|
129
|
+
/** The three one-shot seed output references, by the role each plays. */
|
|
130
|
+
export interface BootstrapSeeds {
|
|
131
|
+
/** Parameterises `protocol_params` AND `registry`. Consumed by the protocol genesis. */
|
|
132
|
+
readonly protocolParams: TxInput;
|
|
133
|
+
/** Parameterises `issuance_cbor_hex_mint`. Consumed by the protocol genesis. */
|
|
134
|
+
readonly issuance: TxInput;
|
|
135
|
+
/** Parameterises `upgrade_multisig`. Consumed by the multisig genesis. */
|
|
136
|
+
readonly upgradeMultisig: TxInput;
|
|
137
|
+
}
|
|
138
|
+
/** The same three, resolved to the UTxOs a transaction can actually spend. */
|
|
139
|
+
export interface BootstrapSeedUtxos {
|
|
140
|
+
readonly protocolParams: UTxO;
|
|
141
|
+
readonly issuance: UTxO;
|
|
142
|
+
readonly upgradeMultisig: UTxO;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Whether this deployment's dispatcher can reach `unfracking`.
|
|
146
|
+
*
|
|
147
|
+
* ⚠ A CHOICE HERE, A VALUE IN THE RECORD, AND THE ASYMMETRY IS DELIBERATE.
|
|
148
|
+
* `DeploymentParams.programmableLogicGlobal.unfrackingParameter` must be a
|
|
149
|
+
* VALUE — a deployment file opened in three years has to say what the
|
|
150
|
+
* dispatcher was compiled from without needing a version of this SDK to
|
|
151
|
+
* interpret a boolean. But at bootstrap time the "enabled" value IS the
|
|
152
|
+
* `unfracking` script's own hash, which does not exist until the plan derives
|
|
153
|
+
* it, so a choice is the only thing a caller can express. `planBootstrap`
|
|
154
|
+
* resolves the choice into the value and `assembleDeploymentParams` records it.
|
|
155
|
+
*
|
|
156
|
+
* ⛔ Two deployments differing ONLY here are DIFFERENT PROTOCOLS: the parameter
|
|
157
|
+
* is baked into the dispatcher's hash. There is no default.
|
|
158
|
+
*/
|
|
159
|
+
export type UnfrackingChoice = "enabled" | "disabled";
|
|
160
|
+
/**
|
|
161
|
+
* Everything needed to derive a protocol instance — and nothing that needs a
|
|
162
|
+
* network, a key or a clock.
|
|
163
|
+
*
|
|
164
|
+
* ⚑ THIS IS THE RESUME TOKEN. Persist it and `planBootstrap` re-derives every
|
|
165
|
+
* script, address, datum and asset unit byte-identically, offline.
|
|
166
|
+
*
|
|
167
|
+
* ⛔ IT IS NOT `JSON.stringify`-ABLE AS IT STANDS, AND THE FAILURE IS LOUD
|
|
168
|
+
* RATHER THAN SILENT (F-8): `maxInlineDatumBytes` is a `bigint`, and
|
|
169
|
+
* `JSON.stringify` THROWS `TypeError: Do not know how to serialize a BigInt`
|
|
170
|
+
* on it. Persist it with that one field converted — `String(...)` on the way
|
|
171
|
+
* out, `BigInt(...)` on the way back — and never with `Number(...)`, which
|
|
172
|
+
* would make a security parameter depend on a lossy round trip. The blueprint
|
|
173
|
+
* is ordinary JSON and needs no special handling.
|
|
174
|
+
*/
|
|
175
|
+
export interface BootstrapConfig {
|
|
176
|
+
/** The standard blueprint this instance is built from. */
|
|
177
|
+
readonly blueprint: PlutusBlueprint;
|
|
178
|
+
/** 0 for any testnet, 1 for mainnet. Determines every derived address. */
|
|
179
|
+
readonly networkId: number;
|
|
180
|
+
/** The three one-shot output references. */
|
|
181
|
+
readonly seeds: BootstrapSeeds;
|
|
182
|
+
/**
|
|
183
|
+
* `always_fail`'s nonce — REQUIRED, with no default and no generator.
|
|
184
|
+
*
|
|
185
|
+
* ⛔ THE CHOICE IS THE CALLER'S AND MUST STAY SO. A fixed nonce makes a
|
|
186
|
+
* rebuild against the same chain reproduce the same hashes, which is what a
|
|
187
|
+
* devnet fixture wants and what a production deployment usually does not. A
|
|
188
|
+
* value shipped here would be a value every deployment in the world shared.
|
|
189
|
+
*/
|
|
190
|
+
readonly alwaysFailNonce: HexString;
|
|
191
|
+
/**
|
|
192
|
+
* `max_inline_datum_bytes` — REQUIRED. A SECURITY PARAMETER with no upstream
|
|
193
|
+
* guidance, and a compile-time parameter of all four delegates, so it is
|
|
194
|
+
* baked into their hashes.
|
|
195
|
+
*
|
|
196
|
+
* ⛔ THIS PACKAGE DELIBERATELY SHIPS NO VALUE FOR IT. The devnet fixture uses
|
|
197
|
+
* 1024n because that is what upstream's own test fixtures use; its own
|
|
198
|
+
* comment records that this is NOT a recommendation and that the production
|
|
199
|
+
* value is deferred. Defaulting it here would turn one fixture's convenience
|
|
200
|
+
* into everyone's security posture.
|
|
201
|
+
*/
|
|
202
|
+
readonly maxInlineDatumBytes: bigint;
|
|
203
|
+
/** Whether the dispatcher is compiled against `unfracking` or the sentinel. */
|
|
204
|
+
readonly unfracking: UnfrackingChoice;
|
|
205
|
+
}
|
|
206
|
+
/** Every script this deployment derives, by the name the rest of the SDK uses. */
|
|
207
|
+
export interface BootstrapScripts {
|
|
208
|
+
readonly alwaysFail: PlutusScript;
|
|
209
|
+
readonly protocolParams: PlutusScript;
|
|
210
|
+
readonly programmableLogicBase: PlutusScript;
|
|
211
|
+
readonly issuanceCborHexMint: PlutusScript;
|
|
212
|
+
readonly registry: PlutusScript;
|
|
213
|
+
readonly transfer: PlutusScript;
|
|
214
|
+
readonly thirdParty: PlutusScript;
|
|
215
|
+
readonly unfracking: PlutusScript;
|
|
216
|
+
readonly programmableLogicGlobal: PlutusScript;
|
|
217
|
+
readonly issuanceLogic: PlutusScript;
|
|
218
|
+
readonly upgradeMultisig: PlutusScript;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* A fully derived protocol instance, before a single byte reaches a chain.
|
|
222
|
+
*
|
|
223
|
+
* Every field is a function of {@link BootstrapConfig} alone. Nothing here was
|
|
224
|
+
* read from a network and nothing here can disagree with what gets deployed —
|
|
225
|
+
* the build steps and `assembleDeploymentParams` both read THIS.
|
|
226
|
+
*/
|
|
227
|
+
export interface BootstrapPlan {
|
|
228
|
+
readonly config: BootstrapConfig;
|
|
229
|
+
readonly scripts: BootstrapScripts;
|
|
230
|
+
/** The resolved dispatcher parameter: the real hash, or `UNFRACKING_DISABLED`. */
|
|
231
|
+
readonly unfrackingParameter: ScriptHash;
|
|
232
|
+
readonly addresses: {
|
|
233
|
+
/** policy id == address payment credential. One value, one derivation. */
|
|
234
|
+
readonly protocolParams: Address;
|
|
235
|
+
/** Same collapse: node NFT policy AND node address. */
|
|
236
|
+
readonly registry: Address;
|
|
237
|
+
/** `always_fail`'s address — where the issuance CBOR UTxO is locked. */
|
|
238
|
+
readonly issuanceCborHex: Address;
|
|
239
|
+
/** The multisig config UTxO's address. */
|
|
240
|
+
readonly upgradeMultisig: Address;
|
|
241
|
+
};
|
|
242
|
+
readonly assetUnits: {
|
|
243
|
+
readonly protocolParamsNft: HexString;
|
|
244
|
+
/** The registry origin node's NFT — empty asset name, so the unit IS the policy. */
|
|
245
|
+
readonly registryNode: HexString;
|
|
246
|
+
readonly issuanceCborHexNft: HexString;
|
|
247
|
+
readonly upgradeMultisigNft: HexString;
|
|
248
|
+
};
|
|
249
|
+
readonly datums: {
|
|
250
|
+
readonly protocolParams: PlutusData;
|
|
251
|
+
readonly registryOrigin: PlutusData;
|
|
252
|
+
readonly issuanceCborHex: PlutusData;
|
|
253
|
+
};
|
|
254
|
+
/** The issuance_mint body either side of the minting-logic hash. */
|
|
255
|
+
readonly issuanceCbor: {
|
|
256
|
+
readonly pre: HexString;
|
|
257
|
+
readonly post: HexString;
|
|
258
|
+
};
|
|
259
|
+
/** The seven scripts of {@link REFERENCE_SCRIPT_ORDER}, in that order. */
|
|
260
|
+
readonly referenceScripts: readonly PlutusScript[];
|
|
261
|
+
/** The six scripts of {@link STAKE_REGISTRATION_ORDER}, in that order. */
|
|
262
|
+
readonly stakeCredentialScripts: readonly PlutusScript[];
|
|
263
|
+
/**
|
|
264
|
+
* Every parameterisation this plan performed, EXCLUDING `issuance_mint`.
|
|
265
|
+
*
|
|
266
|
+
* DERIVED, NEVER TRANSCRIBED — the unapplied hash and the application-order
|
|
267
|
+
* arguments are properties of the calls that made them and of nothing else.
|
|
268
|
+
* Feed to `buildCip171RecordFromPin`.
|
|
269
|
+
*
|
|
270
|
+
* ⚠ `issuance_mint` is excluded for a SEMANTIC reason, not a convenient one:
|
|
271
|
+
* it is parameterised PER MINTING-LOGIC HASH, once per substandard, so the
|
|
272
|
+
* instance derived here belongs to whichever substandard registers a token —
|
|
273
|
+
* not to the core deployment. Recording it here would name a script this
|
|
274
|
+
* deployment does not run.
|
|
275
|
+
*/
|
|
276
|
+
readonly parameterizations: readonly {
|
|
277
|
+
rawScriptHash: HexString;
|
|
278
|
+
params: PlutusData[];
|
|
279
|
+
}[];
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Derive a whole protocol instance from a config. Pure: no client, no network,
|
|
283
|
+
* no clock, no filesystem.
|
|
284
|
+
*
|
|
285
|
+
* ⚠ THE PARAMETERISATION ORDER IS LOAD-BEARING and each script's hash feeds the
|
|
286
|
+
* next. It is NOT a single chain — `programmable_logic_base` hangs off the
|
|
287
|
+
* params-NFT policy and everything downstream fans out — but the edges that do
|
|
288
|
+
* exist cannot be reordered. See `scripts.ts` for the full graph.
|
|
289
|
+
*
|
|
290
|
+
* ⛔ PARAMETER TYPES ARE NOT INTERCHANGEABLE AND TYPESCRIPT CANNOT TELL THEM
|
|
291
|
+
* APART: every one is a hex string at the call site. `issuance_logic` in
|
|
292
|
+
* particular takes TWO ADJACENT PolicyIds — `registry_node_cs` then
|
|
293
|
+
* `params_policy` — and swapping them yields a script that builds, hashes,
|
|
294
|
+
* deploys and is registered without a murmur. It simply looks for the registry
|
|
295
|
+
* under the params policy for the rest of its life.
|
|
296
|
+
*/
|
|
297
|
+
export declare function planBootstrap(config: BootstrapConfig): BootstrapPlan;
|
|
298
|
+
/**
|
|
299
|
+
* What every build step needs, and what none of them will invent for you.
|
|
300
|
+
*
|
|
301
|
+
* ⛔ `availableUtxos` IS REQUIRED, AND THAT IS THE MOST IMPORTANT WORD IN THIS
|
|
302
|
+
* MODULE. Without it Evolution queries the wallet itself and coin selection may
|
|
303
|
+
* spend ANYTHING in it — including outputs carrying REFERENCE SCRIPTS. Spending
|
|
304
|
+
* one destroys protocol infrastructure silently: the script_ref is not carried
|
|
305
|
+
* into the change output, nothing errors, and the damage surfaces only when a
|
|
306
|
+
* later operation needs the script. MEASURED on preview: two of a live
|
|
307
|
+
* deployment's four reference scripts were consumed that way.
|
|
308
|
+
*
|
|
309
|
+
* ⚑ AND IT IS HOW A CALLER RESERVES THE SEEDS. The bootstrap's own seed UTxOs
|
|
310
|
+
* are ordinary wallet UTxOs until the step that consumes them runs; a caller
|
|
311
|
+
* that leaves them in `availableUtxos` for an EARLIER step invites coin
|
|
312
|
+
* selection to spend one for fees, and the later step then names a spent input.
|
|
313
|
+
* The ledger answers code 3117, "unknown UTxO references as inputs", which
|
|
314
|
+
* names a UTxO and reads as a builder bug — it is not. Exclude the seeds you
|
|
315
|
+
* have not consumed yet.
|
|
316
|
+
*/
|
|
317
|
+
export interface BootstrapBuildContext {
|
|
318
|
+
/** A read-only or signing Evolution client. The SDK never constructs one. */
|
|
319
|
+
readonly client: EvoClient;
|
|
320
|
+
/** Bech32 change address. */
|
|
321
|
+
readonly changeAddress: Address;
|
|
322
|
+
/** Exactly the UTxOs this transaction may spend. See the note above. */
|
|
323
|
+
readonly availableUtxos: readonly UTxO[];
|
|
324
|
+
/**
|
|
325
|
+
* Optional script evaluator.
|
|
326
|
+
*
|
|
327
|
+
* Without one the client's provider evaluates, and Kupmios reports a bare
|
|
328
|
+
* "evaluateTx failed" naming neither the script nor the reason. The SDK never
|
|
329
|
+
* constructs an evaluator and never names an endpoint — inject one.
|
|
330
|
+
*/
|
|
331
|
+
readonly evaluator?: Evaluator;
|
|
332
|
+
}
|
|
333
|
+
export interface SeedTxParams extends BootstrapBuildContext {
|
|
334
|
+
/**
|
|
335
|
+
* Where the seed outputs are paid. Usually the bootstrapping wallet's own
|
|
336
|
+
* address: the steps that consume them must be able to spend them.
|
|
337
|
+
*/
|
|
338
|
+
readonly ownerAddress: Address;
|
|
339
|
+
/**
|
|
340
|
+
* Lovelace per seed output — REQUIRED.
|
|
341
|
+
*
|
|
342
|
+
* Each seed funds part of the transaction that consumes it, so it must clear
|
|
343
|
+
* min-UTxO with room for a fee. There is no default because the right figure
|
|
344
|
+
* depends on the chain and on what the caller wants left over.
|
|
345
|
+
*/
|
|
346
|
+
readonly seedLovelace: bigint;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Step 1 — fragment the wallet into {@link BOOTSTRAP_SEED_COUNT} distinct UTxOs.
|
|
350
|
+
*
|
|
351
|
+
* ⚑ THIS STEP IS OPTIONAL. A caller that already holds three distinct unspent
|
|
352
|
+
* UTxOs may skip it and call {@link planBootstrap} with their outrefs directly.
|
|
353
|
+
* It exists because most callers do not.
|
|
354
|
+
*
|
|
355
|
+
* ⚠ Its outputs cannot be predicted: the plan needs the OBSERVED outrefs. Submit
|
|
356
|
+
* this, wait for it, read the outputs back, then {@link selectBootstrapSeeds}.
|
|
357
|
+
*/
|
|
358
|
+
export declare function buildSeedTx(params: SeedTxParams): Promise<UnsignedTx>;
|
|
359
|
+
/**
|
|
360
|
+
* Pick the three seeds out of a seed transaction's observed outputs.
|
|
361
|
+
*
|
|
362
|
+
* ⚠ REFUSES FEWER THAN THREE, LOUDLY. An earlier version of this logic asked
|
|
363
|
+
* for three and tolerated two, which handed `undefined` to the third consumer.
|
|
364
|
+
*
|
|
365
|
+
* The change output of the seed transaction lands at the same address and is a
|
|
366
|
+
* legitimate candidate; ordering by output index keeps the assignment stable
|
|
367
|
+
* across reads of an indexer that does not preserve order.
|
|
368
|
+
*/
|
|
369
|
+
export declare function selectBootstrapSeeds(utxos: readonly UTxO[], seedTxHash: TxHash): {
|
|
370
|
+
seeds: BootstrapSeeds;
|
|
371
|
+
utxos: BootstrapSeedUtxos;
|
|
372
|
+
};
|
|
373
|
+
export interface MultisigGenesisTxParams extends BootstrapBuildContext {
|
|
374
|
+
readonly plan: BootstrapPlan;
|
|
375
|
+
/** The unspent `seeds.upgradeMultisig` UTxO. Checked against the plan. */
|
|
376
|
+
readonly seedUtxo: UTxO;
|
|
377
|
+
/**
|
|
378
|
+
* WHO CONTROLS THE PROTOCOL — required, with no default of any kind.
|
|
379
|
+
*
|
|
380
|
+
* The signer tree lives in this UTxO's datum rather than in the script's
|
|
381
|
+
* parameters, which is what makes signer rotation possible without moving the
|
|
382
|
+
* hash. `multisigScriptDatum` enforces upstream's `well_formed` rules.
|
|
383
|
+
*
|
|
384
|
+
* ⛔ AN UNSATISFIABLE TREE IS A ONE-WAY BRICK, in upstream's own words: the
|
|
385
|
+
* authority check becomes "permanently unsatisfiable, with no repair path".
|
|
386
|
+
*/
|
|
387
|
+
readonly upgradeMultisigTree: MultisigScriptTree;
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Step 2 — mint the `upgrade_multisig` one-shot NFT and lock it with the signer
|
|
391
|
+
* tree, BEFORE the protocol genesis names this authority.
|
|
392
|
+
*
|
|
393
|
+
* ⛔ THE ORDER IS THE POINT, AND IT IS NOT A STYLE CHOICE. Step 3 writes a
|
|
394
|
+
* genesis datum naming `upgrade_cred = Script(upgrade_multisig)`. That authority
|
|
395
|
+
* is usable only while its config UTxO exists — the tree lives there, not in the
|
|
396
|
+
* script's parameters. Running this AFTER the protocol genesis and failing
|
|
397
|
+
* leaves a protocol on chain naming an authority whose config UTxO does not
|
|
398
|
+
* exist: upstream's documented ONE-WAY BRICK, manufactured by transaction
|
|
399
|
+
* ordering rather than by any defect in the validators. Failing BEFORE the
|
|
400
|
+
* irreversible step costs one transaction and nothing else.
|
|
401
|
+
*
|
|
402
|
+
* The four rails `upgrade_multisig.mint` enforces, all satisfied here:
|
|
403
|
+
* 1. the named UTxO is consumed -> collectFrom
|
|
404
|
+
* 2. exactly one "UpgradeMultisig" token of this policy -> mintAssets
|
|
405
|
+
* 3. an output found by `has_nft_strict` -> the output below
|
|
406
|
+
* 4. well_formed(tree), NO reference script, address == from_script(policy)
|
|
407
|
+
*
|
|
408
|
+
* ⛔ THE NFT AND NOTHING ELSE in that output. `has_nft_strict` is strict about
|
|
409
|
+
* the WHOLE value: bundling any other asset with the config NFT means the output
|
|
410
|
+
* is simply NOT FOUND by `list.expect_find`, and the genesis fails naming
|
|
411
|
+
* nothing about bundling. Change is a separate output.
|
|
412
|
+
*
|
|
413
|
+
* ⚠ NO `script:` ON THE OUTPUT — rail 4 requires `reference_script == None`.
|
|
414
|
+
* The reference script is published in step 4 like every other one.
|
|
415
|
+
*
|
|
416
|
+
* ⚑ Additional outputs are the CALLER's to add in their own transaction if they
|
|
417
|
+
* want them. Rail 3 uses `list.expect_find`, which SKIPS a non-matching output
|
|
418
|
+
* rather than rejecting it, so a junk UTxO parked at this address is harmless —
|
|
419
|
+
* but it is not protocol state and this step will not mint one.
|
|
420
|
+
*/
|
|
421
|
+
export declare function buildMultisigGenesisTx(params: MultisigGenesisTxParams): Promise<UnsignedTx>;
|
|
422
|
+
/**
|
|
423
|
+
* Assert the multisig config UTxO on chain is the one the genesis datum is
|
|
424
|
+
* about to name. PURE — the caller fetches the UTxOs, this decides.
|
|
425
|
+
*
|
|
426
|
+
* ⛔ AN OPERABILITY GATE, NOT DECORATION. The measured instance of "correct and
|
|
427
|
+
* useless" in this repo is a deployment naming an authority credential that
|
|
428
|
+
* could not be registered at all: every hash reproduced, every read-back
|
|
429
|
+
* matched, every test passed, and the protocol's upgrade path was permanently
|
|
430
|
+
* unsatisfiable. "It exists and is well-formed" left "and can be used" untested.
|
|
431
|
+
* Run this between step 2 and step 3, so it is structurally impossible for the
|
|
432
|
+
* genesis datum to name an authority that is not there.
|
|
433
|
+
*
|
|
434
|
+
* ⚑ FILTERS STRUCTURALLY, BY POLICY, EXACTLY AS THE VALIDATOR DOES — not by
|
|
435
|
+
* equality against a unit string we ourselves built. A lookup keyed on our own
|
|
436
|
+
* constructed unit shares a blind spot with the code that constructed it: get
|
|
437
|
+
* the asset name wrong in both places and the check agrees with itself.
|
|
438
|
+
*/
|
|
439
|
+
export declare function assertMultisigConfigUtxo(params: {
|
|
440
|
+
readonly plan: BootstrapPlan;
|
|
441
|
+
/** Every UTxO currently at `plan.addresses.upgradeMultisig`. */
|
|
442
|
+
readonly utxosAtAddress: readonly UTxO[];
|
|
443
|
+
/** The tree passed to {@link buildMultisigGenesisTx}. */
|
|
444
|
+
readonly expectedTree: MultisigScriptTree;
|
|
445
|
+
}): {
|
|
446
|
+
utxo: UTxO;
|
|
447
|
+
ref: TxInput;
|
|
448
|
+
};
|
|
449
|
+
export interface ProtocolGenesisTxParams extends BootstrapBuildContext {
|
|
450
|
+
readonly plan: BootstrapPlan;
|
|
451
|
+
/** The unspent `seeds.protocolParams` UTxO. Checked against the plan. */
|
|
452
|
+
readonly protocolParamsSeedUtxo: UTxO;
|
|
453
|
+
/** The unspent `seeds.issuance` UTxO. Checked against the plan. */
|
|
454
|
+
readonly issuanceSeedUtxo: UTxO;
|
|
455
|
+
/**
|
|
456
|
+
* Optional CIP-171 provenance. Supply the `UPSTREAM_PIN.json` shipped beside
|
|
457
|
+
* the blueprint (import it via the "./blueprints/*" export path) and this
|
|
458
|
+
* transaction carries a record of what was parameterised into what.
|
|
459
|
+
*
|
|
460
|
+
* ⚠ A wrong-arity record is DISCARDED SILENTLY by the registry — no error, no
|
|
461
|
+
* REJECTED row. From outside, dropped and never-published are
|
|
462
|
+
* indistinguishable, so verify with a POSITIVE lookup by tx hash.
|
|
463
|
+
*
|
|
464
|
+
* ⛔ Pass the pin that ships WITH this package's blueprint. A copied
|
|
465
|
+
* repo/commit/compiler triple is a second copy that drifts silently and still
|
|
466
|
+
* verifies — against the wrong source.
|
|
467
|
+
*/
|
|
468
|
+
readonly provenancePin?: UpstreamPin;
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Step 3 — the protocol genesis: three one-shot mints and the three UTxOs that
|
|
472
|
+
* hold this instance's state.
|
|
473
|
+
*
|
|
474
|
+
* Outputs, and the indices are POSITIONAL — `assembleDeploymentParams` reads
|
|
475
|
+
* output 0 and nothing checks the rest but the chain:
|
|
476
|
+
* 0 the params UTxO (NFT + the six-field params datum)
|
|
477
|
+
* 1 the registry origin node (NFT + the sentinel head of the linked list)
|
|
478
|
+
* 2 the issuance CBOR UTxO (NFT + the spliced issuance_mint body)
|
|
479
|
+
*/
|
|
480
|
+
export declare function buildProtocolGenesisTx(params: ProtocolGenesisTxParams): Promise<UnsignedTx>;
|
|
481
|
+
export interface ReferenceScriptsTxParams extends BootstrapBuildContext {
|
|
482
|
+
readonly plan: BootstrapPlan;
|
|
483
|
+
/**
|
|
484
|
+
* Where the reference scripts live — REQUIRED.
|
|
485
|
+
*
|
|
486
|
+
* ⚠ A LASTING DECISION, not a formality. These outputs are protocol
|
|
487
|
+
* infrastructure for the life of the deployment; every programmable
|
|
488
|
+
* transaction reads them. Pay them somewhere your own coin selection will
|
|
489
|
+
* never touch. MEASURED on preview: a wallet holding them alongside funds had
|
|
490
|
+
* two of four consumed by an ordinary retry, and nothing errored.
|
|
491
|
+
*/
|
|
492
|
+
readonly referenceScriptAddress: Address;
|
|
493
|
+
/** Lovelace per reference-script output — REQUIRED. min-UTxO scales with the script's size. */
|
|
494
|
+
readonly referenceScriptLovelace: bigint;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Step 4 — publish the seven reference scripts, in {@link REFERENCE_SCRIPT_ORDER}.
|
|
498
|
+
*
|
|
499
|
+
* Cannot be folded into step 3: a transaction cannot reference a script it is
|
|
500
|
+
* itself creating.
|
|
501
|
+
*/
|
|
502
|
+
export declare function buildReferenceScriptsTx(params: ReferenceScriptsTxParams): Promise<UnsignedTx>;
|
|
503
|
+
export interface StakeRegistrationTxParams extends BootstrapBuildContext {
|
|
504
|
+
readonly plan: BootstrapPlan;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Step 5 — the six Conway `RegCert`s, in one transaction.
|
|
508
|
+
*
|
|
509
|
+
* ⛔ `registerStake` + `attachScript` + a void redeemer, NEVER
|
|
510
|
+
* `registerAndDelegateTo`, FOR A SCRIPT CREDENTIAL. MEASURED: a combined
|
|
511
|
+
* certificate is a Conway `vote_reg_deleg_cert`, which arrives at the `publish`
|
|
512
|
+
* handler as a DIFFERENT `Certificate` constructor, and both
|
|
513
|
+
* `upgrade_multisig.publish` and `issuance_logic.publish` admit
|
|
514
|
+
* `RegisterCredential` and nothing else.
|
|
515
|
+
*
|
|
516
|
+
* ⚠ The DRep delegation a KEY credential needs is not missing here by oversight.
|
|
517
|
+
* A script withdraw-0 needs three things — a script witness, a registration, and
|
|
518
|
+
* the withdrawal itself. The DRep delegation is the FOURTH thing a key
|
|
519
|
+
* credential needs, and a script cannot have one.
|
|
520
|
+
*
|
|
521
|
+
* ⚠ Kept separate from step 3 because each certificate executes its script under
|
|
522
|
+
* the PUBLISH purpose: carrying all six script bodies alongside the mint
|
|
523
|
+
* witnesses is what breaks the 16,384-byte size cap. MEASURED at 21,816 bytes
|
|
524
|
+
* when this was one transaction.
|
|
525
|
+
*/
|
|
526
|
+
export declare function buildStakeRegistrationTx(params: StakeRegistrationTxParams): Promise<UnsignedTx>;
|
|
527
|
+
/** The four things only a submitted chain can tell you. */
|
|
528
|
+
export interface BootstrapObservations {
|
|
529
|
+
/** Step 3's transaction hash. Becomes `txHash` and the params UTxO reference. */
|
|
530
|
+
readonly protocolGenesisTxHash: TxHash;
|
|
531
|
+
/** Step 4's transaction hash. Becomes all seven reference inputs. */
|
|
532
|
+
readonly referenceScriptsTxHash: TxHash;
|
|
533
|
+
/**
|
|
534
|
+
* The multisig config UTxO, READ BACK OFF THE CHAIN — see
|
|
535
|
+
* {@link assertMultisigConfigUtxo}, which returns exactly this.
|
|
536
|
+
*
|
|
537
|
+
* ⚠ MUTABLE STATE. A signer rotation spends and recreates it, so a recorded
|
|
538
|
+
* value goes stale; re-read it rather than trusting an old record.
|
|
539
|
+
*/
|
|
540
|
+
readonly multisigConfigUtxo: TxInput;
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Assemble `DeploymentParams` from the plan and what was observed. Pure.
|
|
544
|
+
*
|
|
545
|
+
* ⛔ THE RECORD MUST SAY WHAT THE DATUM SAYS. `upgradeAuthority` is the
|
|
546
|
+
* deployment's account of the ACTIVE authority and the genesis datum writes
|
|
547
|
+
* `upgradeCred: Script(upgradeMultisig)`. Nothing derives one from the other and
|
|
548
|
+
* nothing may check them against each other on chain — which is exactly why
|
|
549
|
+
* both come from the same plan here, rather than being written twice.
|
|
550
|
+
*/
|
|
551
|
+
export declare function assembleDeploymentParams(plan: BootstrapPlan, observed: BootstrapObservations): DeploymentParams;
|
|
552
|
+
//# sourceMappingURL=bootstrap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../src/standard/bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAaH,OAAO,KAAK,EAEV,SAAS,EAGV,MAAM,0DAA0D,CAAC;AAIlE,OAAO,KAAK,EACV,OAAO,EACP,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,UAAU,EACV,YAAY,EAEZ,UAAU,EACV,MAAM,EACN,OAAO,EACP,IAAI,EACL,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAgC/D;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,sBAAsB,2IAQzB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,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